From: Eli Zaretskii <eliz@gnu.org>
To: gdb@sourceware.org
Subject: "disassemble" shows code, but not with /m
Date: Wed, 19 Mar 2014 17:50:00 -0000 [thread overview]
Message-ID: <83y50684dd.fsf@gnu.org> (raw)
Did anyone bump into something like below with GDB 7.7?
SUBRP is an inline function defined on the header file lisp.h in
Emacs:
INLINE bool
SUBRP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_SUBR);
}
Trying to disassemble it, I get these results:
(gdb) disassemble 0x10f3110,+30
Dump of assembler code from 0x10f3110 to 0x10f312e:
0x010f3110 <SUBRP+0>: push %ebp
0x010f3111 <SUBRP+1>: mov %esp,%ebp
0x010f3113 <SUBRP+3>: sub $0x8,%esp
0x010f3116 <SUBRP+6>: movl $0xa,0x4(%esp)
0x010f311e <SUBRP+14>: mov 0x8(%ebp),%eax
0x010f3121 <SUBRP+17>: mov %eax,(%esp)
0x010f3124 <SUBRP+20>: call 0x10f306f <PSEUDOVECTORP>
0x010f3129 <SUBRP+25>: leave
0x010f312a <SUBRP+26>: ret
0x010f312b <COMPILEDP+0>: push %ebp
0x010f312c <COMPILEDP+1>: mov %esp,%ebp
End of assembler dump.
(gdb) disassemble 0x10f3110
Dump of assembler code for function SUBRP:
0x010f3110 <+0>: push %ebp
0x010f3111 <+1>: mov %esp,%ebp
0x010f3113 <+3>: sub $0x8,%esp
0x010f3116 <+6>: movl $0xa,0x4(%esp)
0x010f311e <+14>: mov 0x8(%ebp),%eax
0x010f3121 <+17>: mov %eax,(%esp)
0x010f3124 <+20>: call 0x10f306f <PSEUDOVECTORP>
0x010f3129 <+25>: leave
0x010f312a <+26>: ret
End of assembler dump.
(gdb) disassemble 'lisp.h'::SUBRP
Dump of assembler code for function SUBRP:
0x010f3110 <+0>: push %ebp
0x010f3111 <+1>: mov %esp,%ebp
0x010f3113 <+3>: sub $0x8,%esp
0x010f3116 <+6>: movl $0xa,0x4(%esp)
0x010f311e <+14>: mov 0x8(%ebp),%eax
0x010f3121 <+17>: mov %eax,(%esp)
0x010f3124 <+20>: call 0x10f306f <PSEUDOVECTORP>
0x010f3129 <+25>: leave
0x010f312a <+26>: ret
End of assembler dump.
But:
(gdb) disassemble /m 0x10f3110
Dump of assembler code for function SUBRP:
End of assembler dump.
(gdb) disassemble /m 0x10f3110,+30
Dump of assembler code from 0x10f3110 to 0x10f312e:
End of assembler dump.
(gdb) disassemble /m 'lisp.h'::SUBRP
Dump of assembler code for function SUBRP:
End of assembler dump.
(gdb)
IOW, the /m switch somehow inhibits the disassembly. FWIW, using x/i
for the respective addresses shows the instructions just fine.
Is this a bug?
next reply other threads:[~2014-03-19 17:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 17:50 Eli Zaretskii [this message]
2014-03-19 18:45 ` Jan Kratochvil
2014-03-19 19:04 ` Eli Zaretskii
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=83y50684dd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sourceware.org \
/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