As Klaus Rudolph wrote:
> I think that problem comes not with ddd. If I use gdb 7.0.1 or
> older versions, ddd works as expected. The problem was introduced
> with version 7.1 of gdb.
Yes, I can now also reproduce that without DDD:
% echo 'int main(void) { return 42; }' > foo.c
% avr-gcc -mmcu=atmega128 -o foo.elf foo.c
% ./gdb-7.2/gdb/gdb -q
(gdb) disas 0x20, 0x23
Dump of assembler code from 0x800020 to 0x800023:
0x00800020: Cannot access memory at address 0x800020
Funny enough, if you try "disas 0,3", it attempts to disassemble
everything from 0 through 0x800003 ...
The problem has been introduced with a change in the argument handling
to the disassemble command:
% ./gdb-7.0.1/gdb/gdb -q
(gdb) help disas
Disassemble a specified section of memory.
Default is the function surrounding the pc of the selected frame.
With a /m modifier, source lines are included (if available).
With a /r modifier, raw instructions in hex are included.
With a single argument, the function surrounding that address is dumped.
Two arguments are taken as a range of memory to dump.
(gdb) quit
% ./gdb-7.2/gdb/gdb -q
(gdb) help disas
Disassemble a specified section of memory.
Default is the function surrounding the pc of the selected frame.
With a /m modifier, source lines are included (if available).
With a /r modifier, raw instructions in hex are included.
With a single argument, the function surrounding that address is dumped.
Two arguments (separated by a comma) are taken as a range of memory to dump,
in the form of "start,end", or "start,+length".
(gdb) quit
As can be seen, two numeric arguments to the disassemble command are
now to be separated by a comma rather than a space. Obviously, this
is a consequence of the arguments now being evaluated as expressions
rather than plain numbers, and for the AVR, this also has the side
effect of 0x800000 being added. :-(
I didn't find the actual point where this happens, but I though it's
important enough to file it as a bug:
http://sourceware.org/bugzilla/show_bug.cgi?id=13519
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
_______________________________________________
AVR-chat mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-chat