About "process 42000"
Pedro Alves
pedro@codesourcery.com
Sat Apr 4 06:52:00 GMT 2009
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
More information about the Gdb
mailing list