This is the mail archive of the gdb@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: breakpoint at address on Atmel AVR - parsing


> It seems GDB-7.4.91 badly parses program-space addresses given to
> `break' and `disassemble' at Atmel AVR architecture: an "0x4d2"
> becomes 0x8004d2.

As I understand it, this is a bit of an unfortunate "expected behavior"
at the moment.

One possible way to fix it, I think, it to enhance the linespec module
(used by the "break" command) and the "disassemble" command to automatically
treat integer values as code addresses. For instance, in the case
of the "disassemble" command, perhaps it would be sufficient to
simply cast the value obtained after parsing to a code pointer,
before extracting the value as an address:

  pc = value_as_address (parse_to_comma_and_eval (&arg));

After all, the command knows that the address should be code addresses,
not data addresses.

-- 
Joel


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