This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mixed mode disassembly listing -- impossible?

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.


2009/4/22 Timo Finnilä <>:
> Hi,
> In the section 8.6 of "GDB User Manual"
> (
> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]