This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [commit] fix for "info threads" printing multiple headers


On Tuesday 22 February 2011 18:25:27, Michael Snyder wrote:
> Pedro Alves wrote:
>
> > Examples of not handling the special zero:
> > 
> > (gdb) info threads a 1
> >   Id   Target Id         Frame 
> > * 1    Thread 0x7ffff7fd6700 (LWP 13769) "threads" 0x00007ffff7bc7285 in pthread_join () from /lib/libpthread.so.0
> > (gdb)
> > 
> > (gdb) info threads a-1
> > No threads match 'a-1'.
> > 
> > (gdb) info threads a -1
> >   Id   Target Id         Frame 
> > * 1    Thread 0x7ffff7fd6700 (LWP 13769) "threads" 0x00007ffff7bc7285 in pthread_join () from /lib/libpthread.so.0
> > (gdb) 
> > 
> > The last one only "works" by accident due to the extra space.
> 
> 
> OK, test for zero added, how's this?

Looks good.

I was hoping for turning the above into testcases,
making sure they fail.  Can I trick you into
doing it?  "No" is fine.  :-)

-- 
Pedro Alves


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