This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
disassemble on Linux x64
- From: "jj shen" <kbottle at gmail dot com>
- To: gdb at sourceware dot org
- Date: Fri, 4 May 2007 03:57:11 +0800
- Subject: disassemble on Linux x64
- References: <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