Re: Crash of GDB with gdbserver btrace enabled [Re: [patch v9 00/23] branch tracing support for Atom]

Pedro Alves
2013-03-07T15:41:50Z

On 03/07/2013 03:31 PM, Metzger, Markus T wrote:
> On a related topic, remote.c calls pop_target at various places, e.g.
> in readchar when the communication breaks down. It looks to me
> as if it assumes that it is the topmost target.
>
> If communication breaks down during remote recording, wouldn't
> this pop the record target instead of the remote target?

Yes.

record + gdbserver isn't much used I assume, as I've known
about that for ages, but never heard anyone complain.

Another similar issue in spirit is the to_stratum checks
in record.c:

static void
cmd_record_delete (char *args, int from_tty)
{
if (current_target.to_stratum == record_stratum)

That assumes the record target is always the topmost.

Nowadays we have arch_stratum on top of record. Only used
by Cell nowadays, so it's latent.

--
Pedro Alves