This is the mail archive of the gdb@sources.redhat.com 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] gdb/674: GDB/MI No way to know the current selected thread(fwd)


On Tue, 27 Aug 2002, Andrew Cagney wrote:

> Should this be an event anyway? (like selected-frame event).
> Info threads can be an expensive operation.

Well, it could be an event, but like selected-frame, the UI will still 
need a way to get the currently selected thread. Actually, the same 
problem really exists for stack frames, too, but it is mitigated by the 
fact that the UI can assume that whenever the target has executed, it is 
at stack depth 0. Unfortunately, the same is not true for threads. The 
thread numbers are "random" as far as the UI is concerned.

> > [BTW, is number-of-threads really necessary? When will number-of-threads 
> > differ from the number of thread-ids listed?]
> 
> I don't know.

Well, then we'll just leave it alone.

> > Proposed change:
> > ^done,thread-ids={thread-id="1",thread-id="2",thread-id="3"},number-of-threads="3",current_thread="1"
> 
> It should be called ``selected-thread''.  In GDB, ``current'' and 
> ``selected'' both have a special meaning.

Yes, good point.

> > I guess we should also change to use ui_out_list_begin/end instead of 
> > ui_out_tuple_begin/end?
> 
> Yep.

Ok. I'll work up a patch to address some of these things.

Keith



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