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 Fri, 2015-11-20 at 10:42 -0300, Martin Galvan wrote:
> 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.

I mean as a replacement for gdb, something like a small piece of code
that can pretend to be gdb and call the pretty printers.  Maybe stub is
the wrong word; I was thinking about something like a unit test thingy.
But I don't know whether that would actually be small, or whether it
would be easier to just test through 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.

But it is related to glibc's code, obviously.  The maintenance problem
is there even if we declare it a tool for the user.



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