From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4865 invoked by alias); 3 May 2007 20:10:03 -0000 Received: (qmail 4782 invoked by uid 22791); 3 May 2007 20:09:59 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 May 2007 20:09:52 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id E8CB54B267; Thu, 3 May 2007 15:09:50 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id D4B2B4B262; Thu, 3 May 2007 15:09:50 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1Hjhcc-0000GJ-9C; Thu, 03 May 2007 16:09:50 -0400 Date: Thu, 03 May 2007 20:10:00 -0000 From: Daniel Jacobowitz To: jj shen Cc: gdb@sourceware.org Subject: Re: disassemble on Linux x64 Message-ID: <20070503200950.GB727@caradoc.them.org> Mail-Followup-To: jj shen , gdb@sourceware.org References: <293b12a20705031255u1d211aa3hec1c464566d16b1f@mail.gmail.com> <293b12a20705031257x595cda47t1f87e1aa719e486d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <293b12a20705031257x595cda47t1f87e1aa719e486d@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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/msg00009.txt.bz2 On Fri, May 04, 2007 at 03:57:11AM +0800, jj shen wrote: > "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. Start the program running first. Those functions are in shared libraries. You may be seeing the PLT entry. > Is callq a new instruction added by x86-64? What is the difference > to the call instruction? Roughly nothing. > Another question: do I need to use a 32-bit GDB to debug 32-bit program? No. -- Daniel Jacobowitz CodeSourcery