This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 5/8] Doc for agent


On 02/23/2012 06:55 AM, Yao Qi wrote:
> On 02/11/2012 12:28 AM, Pedro Alves wrote:
>>>> The reasons for this kind of design are,
>>>>
>>>>   #1.  agent, inferior and debugger (GDB or GDBserver) are running
>>>> on the same machine, so protocol doesn't to have to handle machine
>>>> difference, such as endianess, word size, etc.  Binary copy should
>>>> work fine.
>> Nope, that's not true at all.  Several architectures can run in
>> different modes (x86 32-bit/64-bit; arm/thumbx big/little/mixed; mips; ppc, etc.).
>> Several architectures have more than one ABI.  We can have e.g., a 64-bit
>> gdbserver controlling a 32-bit process on x86.  You can have a gdbserver controlling
>> an inferior that's running a different endianness on some machines.
>>
> 
> I agree that the process of GDB/GDBserver and process of inferior have
> differences on ABI, word-size, except endianess.  I can't find an
> example that two processes on the same machine have different endianess.
>  I google'ed a while, and find some processors such as ARM, PowerPC, and
> Itanium have such capability to change endian mode on runtime, but seems
> not widely used.  Do we need to consider this case here?

Maybe not used much presently.  But I don't see how that makes a
difference.  It's best for GDBserver to not assume much from the inferior.

>> The current IPA has the limitation that fast tracepoints only work if the
>> inferior has the same arch/abi as gdbserver.  If we're adding a new IPC,
>> and an IPA v2, let's not repeat the mistake.
>>
> 
> Pedro, thanks for your input.  I'll post the agent protocol draft later.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]