Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Mixed mode disassembly listing -- impossible?
@ 2009-04-22  7:17 Timo Finnilä
  2009-04-22  9:16 ` Hui Zhu
  0 siblings, 1 reply; 2+ messages in thread
From: Timo Finnilä @ 2009-04-22  7:17 UTC (permalink / raw)
  To: gdb

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Mixed mode disassembly listing -- impossible?
  2009-04-22  7:17 Mixed mode disassembly listing -- impossible? Timo Finnilä
@ 2009-04-22  9:16 ` Hui Zhu
  0 siblings, 0 replies; 2+ messages in thread
From: Hui Zhu @ 2009-04-22  9:16 UTC (permalink / raw)
  To: Timo Finnilä; +Cc: gdb

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.
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-22  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-22  7:17 Mixed mode disassembly listing -- impossible? Timo Finnilä
2009-04-22  9:16 ` Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox