[lldb-dev] thread list format

Michael Sartain mikesart at gmail.com
Tue Jul 30 09:33:38 PDT 2013


On Tue, Jul 30, 2013 at 6:53 AM, Ed Maste <emaste at freebsd.org> wrote:

> On 29 July 2013 22:13, Michael Sartain <mikesart at gmail.com> wrote:
> >
> > Here is a patch that defaults thread ids to decimal for freebsd + linux,
> and
> > also adds the ability to add print specifiers to process.id, thread.id,
> > thread.protocol.id, thread.index, and line.number. Something like this:
> >
> >             // Allow format specifiers: x|X|u with optional width
> > specifiers.
> >             //   {thread.id%x}    ; hex
> >             //   {thread.id%X}    ; uppercase hex
> >             //   {thread.id%u}    ; unsigned decimal
> >             //   {thread.id%8.8X} ; width.precision + specifier
> >
> > http://llvm-reviews.chandlerc.com/D1234
> >
> > Please holler with any feedback. Thanks,
> >  -Mike
>
> Overall it looks fine to me.  I think we'd ideally have a run-time
> default, so that if you e.g. debug a Linux core on OS X you get
> decimal TIDs, but that could be done later if it's awkward.
>

I added a %tid specifier which seems to be a fairly clean way of getting
this. Default thread format looks like this now:

#define DEFAULT_THREAD_FORMAT "thread #${thread.index}: tid = ${thread.id
> %tid}"\
>     "{, ${frame.pc}}"\ ...


Let me know if this looks ok and I'll commit...
Thanks.
 -Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130730/993c65b2/attachment.html>


More information about the lldb-dev mailing list