This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Pretty printers for NPTL lock types


On 03/11/2015 11:21 AM, Martin Galvan wrote:
> As you can see, I used several global variables to represent the
> macros used in the NPTL code (e.g. those defined in pthreadP.h). I'm
> aware of how ugly this is, as they'll have to be maintained together
> with the NPTL values, but the alternative would be having users
> re-compile their glibc with debugging symbols (even then I'm not sure
> if it would work). Any suggestions on how to improve this will be
> appreciated.

At a high level this is looking good and making progress, I like that
you print the type of mutex, the status, the robust info, etc, it's
all very good information.
 
I would like to hear more about your testing.

I would suggest two ways to test this:

(a) Using gdb on the command line.

(b) Using Eclipse + CDT to debug native applications with a gdb that
    sources this information. Then in the debug view look at what happens
    when you inspect a mutex object.

As Tom noted the pretty-printers don't print things, they return strings
that the higher level gdb then presents to the user.

The last time I did this there were two easy ways to do this:

(1) Return some kind of long string with data the user can read.

(2) Return a tabular structure supported by gdb which results in 
    a tabular view for higher level IDEs using gdb's machine interface
    e.g. gdb/MI, and I think the table view was `[var="val", ...]`,
    but I can't remember.

Please post a v2 for review and detail your testing please.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]