This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Do not try g-packet-guess algorithm on exited targets
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <pedro at codesourcery dot com>, dgraham at nortel dot com
- Date: Mon, 1 Dec 2008 17:17:42 -0500
- Subject: Re: RFC: Do not try g-packet-guess algorithm on exited targets
- References: <20081123211454.GA17391@caradoc.them.org> <49346036.6060204@vmware.com>
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