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: [RFC/WIP PATCH 13/14] Make "thread apply all" only loop over threads in the current set


On Monday 28 November 2011 18:40:14, Eli Zaretskii wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Mon, 28 Nov 2011 15:40:09 +0000
> > 
> > This makes "thread apply all" only loop over threads in the current
> > set instead of always all threads.  That is,
> > 
> >   [all]> thread apply all printf "current thread is %d\n", $_thread
> > 
> >   Thread 3 (Thread 0x7ffff7028700 (LWP 30304)):
> >   current thread is 3
> > 
> >   Thread 2 (Thread 0x7ffff7829700 (LWP 30303)):
> >   current thread is 2
> > 
> >   Thread 1 (Thread 0x7ffff7fcb720 (LWP 30300)):
> >   current thread is 1
> > 
> > vs
> > 
> >   [all]> [1.1] thread apply all printf "current thread is %d\n", $_thread
> > 
> >   Thread 1 (Thread 0x7ffff7fcb720 (LWP 30300)):
> >   current thread is 1
> > 
> > 
> > I think it might make sense to make "info threads" only list threads
> > of the current focus too.  WDYT?
> 
> Shouldn't this be under user control?  Or are you sure no one will
> ever want to have the former?

The idea is that you can always do "(gdb) [all] info threads"
(the [all] prefix overrides the current set for the duration
of the command) to see all threads.  I just realized
that if we choose to default to a set that only includes the
current inferior instead of defaulting to [all], "info threads" no
longer behaves the same as currently, as it'd then only show
the threads of the current inferior by default.  But then again,
that may still be a desirable change anyway.  Hmm, choices, choices.

-- 
Pedro Alves


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