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: [PING][PATCH v3] Add pretty printers for the NPTL lock types


On Thu, Nov 19, 2015 at 9:03 PM, Torvald Riegel <triegel@redhat.com> wrote:
> I have no concrete suggestions right now.  Is there a stub that could be
> used to avoid having to test through gdb?

By "stub" do you mean a C code snippet, like the other tests? I do
have a few programs that play out different use cases; but I don't see
how we could test the printers without running gdb.

> There's still a question of how and where that implementation knowledge
> is encapsulated.  For example, glibc could potentially provide pretty
> printers by itself close to the actual implementation, or have more
> helper functions that serve as getters for the attributes you test (eg,
> assuming that some flag is nonzero meaning that it's process-shared).
> But I'm not sure whether we want to go to that way.

Indeed. The purpose of this particular contribution is to provide a
tool for the user, not to change the code of glibc itself.

> Ah, I see; so gen-py-const.awk will transform that into a specific
> number (without any maximum size), and python will compare against that
> very same number, right?

Yes, though it's gcc itself that generates those numbers.
gen-py-const.awk simply outputs something gcc can consume.


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