This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: fix GDB casts when pointers are not addresses
> Then I get this behavior:
>
> zenia:play$ $DD10v/gdb/gdb pointer2
> GNU gdb 2001-07-05-cvs (MI_OUT)
> Copyright 2001 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-linux-gnu --target=d10v-elf"...
> (gdb) print (int) &main
> $1 = 20503
> (gdb) p/x (int) &main
> $2 = 0x5017
> (gdb)
>
> Here, the expression yields the same result in GDB as it does under
> GCC.
Phew!
This only leaves ``x/...''. How does that behavour compare? The most
important thing was that given:
(gdb) print main
$1 = {int ()} 0x101405c <main>
(gdb) print/x &main
things like:
(gdb) x/i main
disassembled <main>
(gdb) x/i 0x101405c
disassembled <main>
(gdb) x/b 0x101405c
hex dump of main
and
(gdb) disassemble main
disassembled <main>
(gdb) disassemble 0x101405c
continued to work (assuming that they did before :-/). Similar for data
values.
Andrew
(Yes I'm trying to build a gcc for the d10v)