can target code change architecture setting?

Duane Ellis duane@duaneellis.com
Tue Oct 11 14:30:00 GMT 2016


> 
>> Question #2 - How should the remote debugger respond to GDB?
>> 
>>      I don't think there is an "architecture change" packet.
>> 
> 
> Such packet is not needed, because GDB has to determine the gdbarch
> of each when unwinding.

I think you are making the assumption that GDB always has access to full debug (i.e.: dwarf) information.

In bare metal - You don’t always have this, you might have *labels* only (function name vrs address) but no source, no dwarf information.

The only solution is to *ask* the target “what is your *current* arch.

Or the target needs to send a “target-arch-change-indication” in some way.

-Duane.




More information about the Gdb mailing list