[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] Thread names in CDT debug view?
|
>
> The way we determine native thread names in GDB is by using the "info threads" GDB
> command implemented in a custom GDB remote target connection. I believe that this
> approach is quite common in the embedded world. On Solaris, the "info threads" GDB
> command reports the Solaris LWP id. I don't remember what OS information "info
> threads" reports on Linux and Windows.
>
The problem, how do you get, in a portable way, the name of a thread in gdb.
1) GDB/MI:
-thread-list-ids
^done,thread-ids={thread-id="3",thread-id="2",thread-id="1"}, number-of-threads="3"
If this command could be enhance to provide, current selected thread and thread names,
that would be perfect.
2) "info threads"
The format is loose and depending on the OS. We could make the best possible guess
and return whatever string (See gdb doc for the multiple formats of "info threads").
I would prefer solution (1) but lack the time to do it, that will mean also that
CDT/MI will have to move to gdb-6.x as a requirement.
You could make a PR for (2) and we could find a way to do smart guesses on the output
of "info threads".