public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Thread name in remote stub protocol
@ 2015-06-24 20:02 Paul_Koning
  2015-06-25  9:28 ` Pedro Alves
  0 siblings, 1 reply; 4+ messages in thread
From: Paul_Koning @ 2015-06-24 20:02 UTC (permalink / raw)
  To: gdb

I’ve been looking into FreeBSD threads support, and gdbserver support.  FreeBSD has the notion of thread names, and it’s easy enough to make native GDB handle that.  gdbserver is another matter.  I looked all over the various thread related messages, and while there are a bunch of opportunities for this to be handled, it isn’t really there.

I can see the deprecated qP packet that carries a “shortname”.  That looks interesting, but while the packet parsing is there, it isn’t clear the value goes anywhere.  Similarly, there is qThreadExtraInfo which allows for a free form string.  And there is qXfer:threads, but that carries only an ID and a core number.  And none of these seem to be cleanly tied to the main gdb thread name machinery.

What to do about this?  Could qXfer:threads be extended to add a thread name field?  Or should I just use the ThreadExtraInfo mechanism and ignore the fact that it conveys extra info rather than the thread name?

	paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Thread name in remote stub protocol
  2015-06-24 20:02 Thread name in remote stub protocol Paul_Koning
@ 2015-06-25  9:28 ` Pedro Alves
  2015-06-25 13:56   ` Paul_Koning
  0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2015-06-25  9:28 UTC (permalink / raw)
  To: Paul_Koning, gdb

On 06/24/2015 09:00 PM, Paul_Koning@Dell.com wrote:
> I’ve been looking into FreeBSD threads support, and gdbserver support.  FreeBSD has the notion of thread names, and it’s easy enough to make native GDB handle that.  gdbserver is another matter.  I looked all over the various thread related messages, and while there are a bunch of opportunities for this to be handled, it isn’t really there.
> 
> I can see the deprecated qP packet that carries a “shortname”.  That looks interesting, but while the packet parsing is there, it isn’t clear the value goes anywhere.  Similarly, there is qThreadExtraInfo which allows for a free form string.  And there is qXfer:threads, but that carries only an ID and a core number.  And none of these seem to be cleanly tied to the main gdb thread name machinery.
> 
> What to do about this?  Could qXfer:threads be extended to add a thread name field?  Or should I just use the ThreadExtraInfo mechanism and ignore the fact that it conveys extra info rather than the thread name?

https://sourceware.org/ml/gdb-patches/2015-05/msg00370.html

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Thread name in remote stub protocol
  2015-06-25  9:28 ` Pedro Alves
@ 2015-06-25 13:56   ` Paul_Koning
  2015-06-25 14:19     ` Pedro Alves
  0 siblings, 1 reply; 4+ messages in thread
From: Paul_Koning @ 2015-06-25 13:56 UTC (permalink / raw)
  To: palves; +Cc: gdb


> On Jun 25, 2015, at 5:28 AM, Pedro Alves <palves@redhat.com> wrote:
> 
> On 06/24/2015 09:00 PM, Paul_Koning@Dell.com wrote:
>> I’ve been looking into FreeBSD threads support, and gdbserver support.  FreeBSD has the notion of thread names, and it’s easy enough to make native GDB handle that.  gdbserver is another matter.  I looked all over the various thread related messages, and while there are a bunch of opportunities for this to be handled, it isn’t really there.
>> 
>> I can see the deprecated qP packet that carries a “shortname”.  That looks interesting, but while the packet parsing is there, it isn’t clear the value goes anywhere.  Similarly, there is qThreadExtraInfo which allows for a free form string.  And there is qXfer:threads, but that carries only an ID and a core number.  And none of these seem to be cleanly tied to the main gdb thread name machinery.
>> 
>> What to do about this?  Could qXfer:threads be extended to add a thread name field?  Or should I just use the ThreadExtraInfo mechanism and ignore the fact that it conveys extra info rather than the thread name?
> 
> https://sourceware.org/ml/gdb-patches/2015-05/msg00370.html
> 
> Thanks,
> Pedro Alves

Thanks, that looks good.  I don’t see it in GIT, though.

	paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Thread name in remote stub protocol
  2015-06-25 13:56   ` Paul_Koning
@ 2015-06-25 14:19     ` Pedro Alves
  0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2015-06-25 14:19 UTC (permalink / raw)
  To: Paul_Koning; +Cc: gdb

On 06/25/2015 02:55 PM, Paul_Koning@Dell.com wrote:

> Thanks, that looks good.  I don’t see it in GIT, though.

It's going through the review process.  There were some follow
up comments.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-25 14:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 20:02 Thread name in remote stub protocol Paul_Koning
2015-06-25  9:28 ` Pedro Alves
2015-06-25 13:56   ` Paul_Koning
2015-06-25 14:19     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).