Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: "Timo Finnilä" <huoneusto@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Mixed mode disassembly listing -- impossible?
Date: Wed, 22 Apr 2009 09:16:00 -0000	[thread overview]
Message-ID: <daef60380904220017i63753c36yfcc927407ad7e95d@mail.gmail.com> (raw)
In-Reply-To: <e1e1c2c30904220005w58f78bc2l5897ca7bfadf4e89@mail.gmail.com>

I try it with gdb-cvs-head:

(top-gdb) disassemble /m main
Dump of assembler code for function main:
26	{
0x0808ce30 <main+0>:	lea    0x4(%esp),%ecx
0x0808ce34 <main+4>:	and    $0xfffffff0,%esp
0x0808ce37 <main+7>:	pushl  -0x4(%ecx)
0x0808ce3a <main+10>:	push   %ebp
0x0808ce3b <main+11>:	mov    %esp,%ebp
0x0808ce3d <main+13>:	push   %ecx
0x0808ce3e <main+14>:	sub    $0x14,%esp
0x0808ce41 <main+17>:	mov    (%ecx),%eax
0x0808ce43 <main+19>:	mov    0x4(%ecx),%edx

27	  struct captured_main_args args;
28	  memset (&args, 0, sizeof args);
0x0808ce46 <main+22>:	lea    -0x14(%ebp),%ecx

29	  args.argc = argc;
0x0808ce57 <main+39>:	mov    %eax,-0x14(%ebp)

30	  args.argv = argv;
0x0808ce5a <main+42>:	mov    %edx,-0x10(%ebp)

31	  args.use_windows = 0;
0x0808ce49 <main+25>:	movl   $0x0,-0xc(%ebp)

32	  args.interpreter_p = INTERP_CONSOLE;
0x0808ce50 <main+32>:	movl   $0x8299148,-0x8(%ebp)

33	  return gdb_main (&args);
---Type <return> to continue, or q <return> to quit---
0x0808ce5d <main+45>:	mov    %ecx,(%esp)
0x0808ce60 <main+48>:	call   0x808ce70 <gdb_main>

34	}
0x0808ce65 <main+53>:	add    $0x14,%esp
0x0808ce68 <main+56>:	pop    %ecx
0x0808ce69 <main+57>:	pop    %ebp
0x0808ce6a <main+58>:	lea    -0x4(%ecx),%esp
0x0808ce6d <main+61>:	ret

End of assembler dump.
(top-gdb) quit

Everything is OK.


Thanks,
Hui

2009/4/22 Timo Finnilä <huoneusto@gmail.com>:
> 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.
>


      reply	other threads:[~2009-04-22  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22  7:17 Timo Finnilä
2009-04-22  9:16 ` Hui Zhu [this message]

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=daef60380904220017i63753c36yfcc927407ad7e95d@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=huoneusto@gmail.com \
    /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