From: PAUL GILLIAM <pgilliam@us.ibm.com>
To: gdb@sources.redhat.com
Subject: strange dereferencing behavior in gdb expressions
Date: Wed, 25 Jan 2006 20:00:00 -0000 [thread overview]
Message-ID: <1138218150.1423.36.camel@dufur.beaverton.ibm.com> (raw)
This seems inconsistent: GDB says it can't access memory at an address,
but when given that address explicitly, it works fine.
GDB was configured like this: CC='gcc -m64' ../src/configure
(i.e. GDB
is a 64-bit application)
The target application is a 32-bit 'C' program.
(gdb) show version
GNU gdb 6.4.50.20060124-cvs
...
This GDB was configured as "powerpc64-unknown-linux-gnu".
(gdb) p/x *(*(0xffffc4a0)+4)
Cannot access memory at address 0xffffc504
(gdb) p/x *(int*)((*(int*)0xffffc4a0)+4)
$42 = 0xfd7e67c
(gdb) p/x *(0xffffc4a0)+4
$43 = 0xffffc504
(gdb) p/x *($43)
Cannot access memory at address 0xffffc504
(gdb) p/x *(0xffffc504)
$44 = 0xfd7e67c
(gdb)
Anyone what to hazard a guess as to what is going on?
Another clue:
When GDB is configured like this: ../src/configure (i.e. GDB is a
32-bitapplication), we get this:
(gdb) p/x *(*(0xffffc4a0)+4)
$5 = 0xfd7e67c
(gdb)
next reply other threads:[~2006-01-25 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-25 20:00 PAUL GILLIAM [this message]
2006-01-26 0:41 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1138218150.1423.36.camel@dufur.beaverton.ibm.com \
--to=pgilliam@us.ibm.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox