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)


---------- Forwarded message ----------

Number:         674
Category:       gdb
Synopsis:       GDB/MI No way to know the current selected thread
Description:
-thread-list-ids does not indicate which is the selected thread

For example, with "info threads" a little star "*" will say who is
the current thread.
---------- end forwarded message ----------

Would it be acceptable to change do_captured_list_thread_ids so that for newer MI versions (>=2) we simply append the current thread to the output?
Should this be an event anyway? (like selected-frame event).
Info threads can be an expensive operation.

Now:
^done,thread-ids={thread-id="1",thread-id="2",thread-id="3"},number-of-threads="3"

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

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.

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

Andrew



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