Re: [PATCH 1/5] Extended-remote exec events

Don Breazeal
2015-07-16T15:52:03Z

On 7/16/2015 7:00 AM, Yao Qi wrote:
> Don Breazeal <donb@codesourcery.com> writes:
>
>> IMPLEMENTATION
>> ----------------
>> Support for exec events in single-threaded programs was a fairly
>> straightforward replication of the implementation in native GDB:
>>
>> 1) Enable exec events via ptrace options.
>>
>> 2) Add support for handling the exec events to the handle_extended_wait and
>> linux_wait_for_event_filtered. Detect the exec event, then find and save
>> the pathname of the executable file being exec'd and set event status flags.
>>
>> 3) Implement an additional "stop reason", "exec", in the RSP stop reply
>> packet "T".
>>
>> Existing GDB code takes care of handling the exec event on the host side
>> without modification.
>
> Hi Don,
> How does GDBserver handle the multi-arch case? say, 64-bit process call
> exec to a 32-bit program. At least, the target description of that
> process in GDBserver should be updated.
>
Hi Yao,
You make a good point, GDBserver doesn't handle that case. I assume
that's what this is about:
---
warning: Selected architecture i386 is not compatible with reported
target architecture i386:x86-64
---
I'll investigate.
thanks
--Don