This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]