RFC: Do not try g-packet-guess algorithm on exited targets

Daniel Jacobowitz drow@false.org
Mon Dec 1 22:18:00 GMT 2008


On Mon, Dec 01, 2008 at 02:07:50PM -0800, Michael Snyder wrote:
> Daniel Jacobowitz wrote:
>> We got a bug report indicating that gdbserver --multi didn't work on
>> MIPS.  We'd connect to the target, try to read the XML description -
>> gdbserver reports an error because there's no process yet - and then
>> try to guess the description from the g packet length instead.  Of
>> course we can't do that; there's no process yet.
>>
>> This patch fixes the problem.  We try qXfer on connection, then try
>> 'g' only if (A) there was no XML description, and (B) there is a
>> running process, and (C) we are not in non-stop mode; assume that
>> non-stop targets can provide a description explicitly.
>
> Just curious -- how do you determine whether or not there is
> a running process?

We send out a "?" and see what we get back.  If there's a process,
it's a stop reply; if there's nothing, we get the exit status of the
last process.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list