"disassemble" shows code, but not with /m
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
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?