From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: addresses and pointers may be different sizes while printing Date: Thu, 05 Jul 2001 13:22:00 -0000 Message-id: <3B44CC74.8070603@cygnus.com> References: <20010628223546.BDE7F5E9CB@zwingli.cygnus.com> <3B43F682.1040502@cygnus.com> X-SW-Source: 2001-07/msg00110.html > Andrew Cagney writes: > >> Would you have an example illustrating the actual affect of this change? > > > Sure. First, read the section ``Pointers Are Not Always Addresses'' > in doc/gdbint.texinfo. It actually uses the D10V as its running > example. gdb.texinfo? Do we need a gdb.base/harvard.exp? > This patch only affects architectures where code addresses and > pointers are different sizes, like the D10V. Without my larger D10V > patch ("RFA: Remove D10V-specific code from arch-independent > modules"), GDB represents all code pointers as 32 bit values, so this > patch has no effect there, either. I can imagine that. I was kind of assuming you're examples would be pre/post all changes. > (gdb) print main > $1 = {int ()} 0x101405c
> (gdb) print/x &main > $2 = 0x405c > (gdb) then > (gdb) print main > $1 = {int ()} 0x101405c
> (gdb) print/x &main > $2 = 0x101405c > (gdb) to be 110% sure, all of: (gdb) print main (gdb) print &main (gdb) print/x main (gdb) print/x &main end up displaying the same hex (CORE_ADDR) value? Andrew