This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING][PATCH v3] Add pretty printers for the NPTL lock types
- From: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Tom Tromey <tom at tromey dot com>, "Carlos O'Donell" <carlos at redhat dot com>, Pedro Alves <palves at redhat dot com>, vapier at gentoo dot org, Daniel Gutson <daniel dot gutson at tallertechnologies dot com>
- Date: Fri, 20 Nov 2015 10:42:01 -0300
- Subject: Re: [PING][PATCH v3] Add pretty printers for the NPTL lock types
- Authentication-results: sourceware.org; auth=none
- References: <1447451408-3050-1-git-send-email-martin dot galvan at tallertechnologies dot com> <1447871395 dot 25500 dot 81 dot camel at localhost dot localdomain> <CAOKbPbajtscrEL53RPMB-YkLgUYzb01_EAS0nABqEUaspi2j2Q at mail dot gmail dot com> <1447977835 dot 25500 dot 119 dot camel at localhost dot localdomain>
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.