[Bug symtab/12317] New: mixed disassemble does not work for a function in included file
anemo at mba dot ocn.ne.jp
sourceware-bugzilla@sourceware.org
Wed Dec 15 19:31:00 GMT 2010
http://sourceware.org/bugzilla/show_bug.cgi?id=12317
Summary: mixed disassemble does not work for a function in
included file
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: symtab
AssignedTo: unassigned@sourceware.org
ReportedBy: anemo@mba.ocn.ne.jp
If a function body was in included file, disassemble with /m option does not
work.
--- foo.c ---
#include "foo2.c"
int main(int argc, char **argv)
{
int a = foo2(argc);
return a;
}
--- foo2.c ---
int foo2(int x)
{
return x + 1;
}
---
$ gcc -o foo -g foo.c
$ gdb ./foo
GNU gdb (GDB) 7.2.50.20101214-cvs
...
(gdb) disassemble /m main
Dump of assembler code for function main:
...
4 int a = foo2(argc);
0x08048390 <+17>: mov (%ecx),%eax
0x08048392 <+19>: mov %eax,(%esp)
0x08048395 <+22>: call 0x8048374 <foo2>
0x0804839a <+27>: mov %eax,-0x8(%ebp)
...
End of assembler dump.
(gdb) disassemble /m foo2
Dump of assembler code for function foo2:
End of assembler dump.
(gdb) disassemble foo2
Dump of assembler code for function foo2:
0x08048374 <+0>: push %ebp
0x08048375 <+1>: mov %esp,%ebp
0x08048377 <+3>: mov 0x8(%ebp),%eax
0x0804837a <+6>: add $0x1,%eax
0x0804837d <+9>: pop %ebp
0x0804837e <+10>: ret
End of assembler dump.
(gdb) list foo2
1 int foo2(int x)
2 {
3 return x + 1;
4 }
Normal disassemble command and list command works fine, but mixed disassemble
command does not work.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list