This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: expand-symtabs.exp
> Date: Sun, 27 Jan 2008 10:38:02 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> On Sun, Jan 27, 2008 at 04:28:22PM +0100, Mark Kettenis wrote:
> > The new expand-psymtabs.exp consistently fails on all systems I try it
> > on with something like:
> >
> >
> > (gdb) break 32
> > No line 32 in file "../../../../src/gdb/gdb/testsuite/gdb.base/expand-psymtabs.c".
> > (gdb) FAIL: gdb.base/expand-psymtabs.exp: Expand psymtabs
> >
> >
> > Looking at the source code for this test, GDB's respnse here is quite
> > reasonable, since line 32 is the line withe the comment /* Break here
> > */ in the code fragment below:
>
> GDB's historical behavior in that case is to set a breakpoint on the
> next line, and there ought to be code for the next line (the
> epilogue). It looks like you're hitting the bug the testcase was
> written for. Does break 32 work with -readnow?
Nope. And there is no line number info for the epilogue. As far as I
know, GCC never generated such info, so it must be something that's
new in GCC 4.
(gdb) disas foo
Dump of assembler code for function foo:
0x00000000004007e0 <foo+0>: push %rbp
0x00000000004007e1 <foo+1>: mov %rsp,%rbp
0x00000000004007e4 <foo+4>: leaveq
0x00000000004007e5 <foo+5>: retq
End of assembler dump.
...
$ readelf -wl expand-symtabs
...
Line Number Statements:
Extended opcode 2: set Address to 0x4007e0
Advance Line by 30 to 31
Copy
Special opcode 61: advance Address by 4 to 0x4007e4 and Line by 0 to 31
Advance PC by 2 to 4007e6
Extended opcode 1: End of Sequence