From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Shrinand Javadekar <shrinand@gmail.com>,
Michael Snyder <msnyder@vmware.com>
Subject: Re: About "process 42000"
Date: Sat, 04 Apr 2009 06:52:00 -0000 [thread overview]
Message-ID: <200904032303.37476.pedro@codesourcery.com> (raw)
In-Reply-To: <fe51cfa60904031446w776e4abbk7a0efeb79d5a45de@mail.gmail.com>
On Friday 03 April 2009 22:46:25, Shrinand Javadekar wrote:
> Ooops... I think this was because of my mistake. I have my own gdb
> server. In the list of processes being returned for "info threads", I
> was returning a process with pid 0. Gdb would then give this a process
> id of 42000.
Ah, I see. both -1 and 0 have special meaning in the remote protocol.
Thread '0' will more or less work since selecting thread 0 (Hg0 or Hc0)
0 means "select any thread", and 0 would be an "any thread". You're
better off avoiding doing that.
> Sending packet: $qsThreadInfo#c8...Ack
> Packet received: m0
> [New process 42000]
>
> Gdb then shows "process 42000" in the output. However, from here on,
> it does not try to find out if this process is alive. It will always
> show "process 42000" in the output. So every "info threads" command
> after this one will have "process 42000" in the output.
This is GDB assuming that the main thread is always
alive (src/gdb/remote.c:remote_thread_alive), for targets that
don't support qC or reporting the thread id in the T stop
reply packet, after a vAttach... You will indeed stop seeing
this happen when you make your target not report a thread id
of 0.
--
Pedro Alves
prev parent reply other threads:[~2009-04-03 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fe51cfa60904021742w99c2a16he506e10a01d1bb67@mail.gmail.com>
2009-04-03 1:10 ` Shrinand Javadekar
2009-04-03 2:58 ` Hui Zhu
2009-04-03 18:15 ` Michael Snyder
2009-04-03 19:30 ` Pedro Alves
2009-04-03 22:00 ` Shrinand Javadekar
2009-04-03 22:03 ` Michael Snyder
2009-04-04 6:52 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200904032303.37476.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=msnyder@vmware.com \
--cc=shrinand@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox