Re: [PATCH 2/2] Don't query stub if the pid is faked

Pedro Alves
2013-01-24T17:23:16Z

On 01/23/2013 08:35 AM, Yao Qi wrote:

> This patch fixes this problem by skipping query to the stub is the pid is faked.

Sorry, that's not correct.

`qAttached:pid'
Return an indication of whether the remote server attached to an existing
process or created a new process. When the multiprocess protocol extensions are
supported (...), pid is an integer in hexadecimal format identifying the
target process. Otherwise, gdb will omit the pid field and the query
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
packet will be simplified as `qAttached'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And in that case, the pid will be faked.
If the target supports the multiprocess extensions, then the T stop
reply will include the "thread:ptid" bit, so my alternative patch
to 1/2 also fixes this. We could perhaps add some warning, but
I'm thinking it's not worth the bother.

--
Pedro Alves

--
Pedro Alves