From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21658 invoked by alias); 3 May 2007 19:57:17 -0000 Received: (qmail 21646 invoked by uid 22791); 3 May 2007 19:57:16 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 May 2007 19:57:14 +0000 Received: by an-out-0708.google.com with SMTP id c2so622841anc for ; Thu, 03 May 2007 12:57:12 -0700 (PDT) Received: by 10.100.253.12 with SMTP id a12mr2008971ani.1178222231395; Thu, 03 May 2007 12:57:11 -0700 (PDT) Received: by 10.100.112.4 with HTTP; Thu, 3 May 2007 12:57:11 -0700 (PDT) Message-ID: <293b12a20705031257x595cda47t1f87e1aa719e486d@mail.gmail.com> Date: Thu, 03 May 2007 19:57:00 -0000 From: "jj shen" To: gdb@sourceware.org Subject: disassemble on Linux x64 In-Reply-To: <293b12a20705031255u1d211aa3hec1c464566d16b1f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <293b12a20705031255u1d211aa3hec1c464566d16b1f@mail.gmail.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00007.txt.bz2 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