From: "jj shen" <kbottle@gmail.com>
To: gdb@sourceware.org
Subject: disassemble on Linux x64
Date: Thu, 03 May 2007 19:57:00 -0000 [thread overview]
Message-ID: <293b12a20705031257x595cda47t1f87e1aa719e486d@mail.gmail.com> (raw)
In-Reply-To: <293b12a20705031255u1d211aa3hec1c464566d16b1f@mail.gmail.com>
Hi,
I try to disassemble a simple program on x64 Linux using GDB.
The test program is like:
> main()
> {
> getuid();
> }
"disassemble main" shows that getuid() corresponds to "callq addr".
But when I try to "disassemble getuid" or "disassemble addr", GDB says
it is not a vaild function address.
Why, while it is ok on x86 Linux? Is callq a new instruction added by
x86-64? What is the difference to the call instruction?
Another question: do I need to use a 32-bit GDB to debug 32-bit program?
Thanks,
Shen
next parent reply other threads:[~2007-05-03 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <293b12a20705031255u1d211aa3hec1c464566d16b1f@mail.gmail.com>
2007-05-03 19:57 ` jj shen [this message]
2007-05-03 20:10 ` 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=293b12a20705031257x595cda47t1f87e1aa719e486d@mail.gmail.com \
--to=kbottle@gmail.com \
--cc=gdb@sourceware.org \
/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