This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: RFA: addresses and pointers may be different sizes while printing


> Andrew Cagney <ac131313@cygnus.com> 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 <main>
> (gdb) print/x &main
> $2 = 0x405c
> (gdb) 


then


> (gdb) print main
> $1 = {int ()} 0x101405c <main>
> (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


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