From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25063 invoked by alias); 22 Apr 2009 07:17:25 -0000 Received: (qmail 25044 invoked by uid 22791); 22 Apr 2009 07:17:20 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_44,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.184) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Apr 2009 07:17:15 +0000 Received: by ti-out-0910.google.com with SMTP id a1so1687164tib.12 for ; Wed, 22 Apr 2009 00:17:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.8.5 with SMTP id 5mr46545tih.14.1240384632281; Wed, 22 Apr 2009 00:17:12 -0700 (PDT) In-Reply-To: References: Date: Wed, 22 Apr 2009 09:16:00 -0000 Message-ID: Subject: Re: Mixed mode disassembly listing -- impossible? From: Hui Zhu To: =?ISO-8859-1?Q?Timo_Finnil=E4?= Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2009-04/txt/msg00179.txt.bz2 I try it with gdb-cvs-head: (top-gdb) disassemble /m main Dump of assembler code for function main: 26 { 0x0808ce30 : lea 0x4(%esp),%ecx 0x0808ce34 : and $0xfffffff0,%esp 0x0808ce37 : pushl -0x4(%ecx) 0x0808ce3a : push %ebp 0x0808ce3b : mov %esp,%ebp 0x0808ce3d : push %ecx 0x0808ce3e : sub $0x14,%esp 0x0808ce41 : mov (%ecx),%eax 0x0808ce43 : mov 0x4(%ecx),%edx 27 struct captured_main_args args; 28 memset (&args, 0, sizeof args); 0x0808ce46 : lea -0x14(%ebp),%ecx 29 args.argc =3D argc; 0x0808ce57 : mov %eax,-0x14(%ebp) 30 args.argv =3D argv; 0x0808ce5a : mov %edx,-0x10(%ebp) 31 args.use_windows =3D 0; 0x0808ce49 : movl $0x0,-0xc(%ebp) 32 args.interpreter_p =3D INTERP_CONSOLE; 0x0808ce50 : movl $0x8299148,-0x8(%ebp) 33 return gdb_main (&args); ---Type to continue, or q to quit--- 0x0808ce5d : mov %ecx,(%esp) 0x0808ce60 : call 0x808ce70 34 } 0x0808ce65 : add $0x14,%esp 0x0808ce68 : pop %ecx 0x0808ce69 : pop %ebp 0x0808ce6a : lea -0x4(%ecx),%esp 0x0808ce6d : ret End of assembler dump. (top-gdb) quit Everything is OK. Thanks, Hui 2009/4/22 Timo Finnil=E4 : > Hi, > > In the section 8.6 of "GDB User Manual" > (http://sourceware.org/gdb/current/onlinedocs/gdb_9.html#SEC64) > is said that it is possible to get mixed mode (both source and machine > code) listing from > the "disassemble" command by using the "/m" option. However, when I > try this (e.g. by saying > "disassemble /m someFunction" with GDB 8.6, i only get "A syntax error > in expression, > near '/m'." complaint. What am I missing here? Or doing wrong? > > BR, > > Timo F. >