On 7/20/21 11:53 AM, Philippe Mathieu-Daudé wrote:
Practically, this is working around what I'd call a gdb bug wrt avr.
Which may even have been fixed -- I haven't looked.

This is not a bug but a feature to deal with the Harvard architecture.
QEMU AVR model is based on GCC sources so uses the same "feature".

The AVR core has 2 address spaces: "CODE" and "DATA". An address space
is always zero-based (so both are). To avoid having to deal with
relocation of symbols from different AS but having same address, the
DATA space is mapped at 0x800000 (bit 23 is "virtual" as inexistant
- masked - from the CODE AS).

The core can not execute from DATA, so CPUBreakpoint can only be
triggered from CODE.

I know all this. It begs the question why gdb would ever *ask* for a CODE breakpoint in DATA space.


r~

Reply via email to