Re: [PATCH] Remote debugging without a binary (regression)

Luis Machado
2016-02-12T16:08:59Z

On 02/12/2016 01:29 PM, Pedro Alves wrote:
> On 02/11/2016 02:19 PM, Luis Machado wrote:
>
>> gdb/ChangeLog:
>>
>> 2016-02-11 Luis Machado <lgustavo@codesourcery.com>
>>
>> * remote.c (remote_add_inferior): Guard block that can throw
>> errors.
>
> So the question is: why guard this call, and not the others?
>
> E.g., I'd think that failing to find the executable in the sysroot
> shouldn't error out of "attach" either.

I did not exercise that, but did not discard it either. I was attempting
to solve one problem at a time. There may be a failure there too.

If you're attempting to attach to a remote process via a remote
gdbserver, then GDB is already connected to gdbserver by the time it
issues a vAttach request, no?

If so, then it is not as problematic as not being able to connect to the
target at all, but still wrong.

In any case, GDB should honor the user option of not using a symbol file
at all for debugging processes that are already running.