This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: "disassemble" shows code, but not with /m
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 19 Mar 2014 21:05:02 +0200
- Subject: Re: "disassemble" shows code, but not with /m
- Authentication-results: sourceware.org; auth=none
- References: <83y50684dd dot fsf at gnu dot org> <20140319184506 dot GA25053 at host2 dot jankratochvil dot net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 19 Mar 2014 19:45:06 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb@sourceware.org
>
> On Wed, 19 Mar 2014 18:50:22 +0100, Eli Zaretskii wrote:
> > IOW, the /m switch somehow inhibits the disassembly.
>
> The /m switch is broken for -O2 -g code even if it prints something:
That executable is compiled with -O0, not -O2. Sorry I didn't mention
that.
Also, the /m switch does work for functions not declared inline in the
same executable.
> http://sourceware.org/bugzilla/show_bug.cgi?id=11833
That bug does not show such a complete failure to disassembly that I
experienced.
> Use objdump -dS in these cases - that one works
> (although I prefer rather objdump -dl for -O2 -g cases).
Thanks for the tip.
> /m is dependent on .debug_line which I guess is not right in your inferior.
Why not? it has DWARF2 debug info.