* expand-symtabs.exp
@ 2008-01-27 15:32 Mark Kettenis
2008-01-27 15:38 ` expand-symtabs.exp Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2008-01-27 15:32 UTC (permalink / raw)
To: cseo, jimb, gdb
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:
void
foo (void)
{
/* Break here */
}
Carlos, Jim, what is this test supposed to check? It makes absolutely
no sense to me.
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: expand-symtabs.exp
2008-01-27 15:32 expand-symtabs.exp Mark Kettenis
@ 2008-01-27 15:38 ` Daniel Jacobowitz
2008-01-27 16:17 ` expand-symtabs.exp Mark Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-01-27 15:38 UTC (permalink / raw)
To: Mark Kettenis; +Cc: cseo, jimb, gdb
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?
FWIW, it passed for me (Debian x86_64).
http://sourceware.org/ml/gdb-patches/2007-10/msg00456.html
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: expand-symtabs.exp
2008-01-27 15:38 ` expand-symtabs.exp Daniel Jacobowitz
@ 2008-01-27 16:17 ` Mark Kettenis
2008-01-27 16:26 ` expand-symtabs.exp Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2008-01-27 16:17 UTC (permalink / raw)
To: drow; +Cc: cseo, jimb, gdb
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: expand-symtabs.exp
2008-01-27 16:17 ` expand-symtabs.exp Mark Kettenis
@ 2008-01-27 16:26 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-01-27 16:26 UTC (permalink / raw)
To: Mark Kettenis; +Cc: cseo, jimb, gdb
On Sun, Jan 27, 2008 at 05:03:25PM +0100, Mark Kettenis wrote:
> 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
Interesting:
Extended opcode 2: set Address to 0x0
Advance Line by 30 to 31
Copy
Special opcode 63: advance Address by 4 to 0x4 and Line by 2 to 33
Advance PC by 2 to 0x6
Extended opcode 1: End of Sequence
GCC has done this for as long as I remebmer; your version has leaveq
associated with the open brace, which is clearly strange. I can
reproduce that with GCC 3.3 and 3.4, so you're right; it must be fixed
in 4.x.
Anyway, now we see how to fix the testcase :-) I'm pretty sure an
actual function body won't affect what they're testing for. Does
this help?
--
Daniel Jacobowitz
CodeSourcery
2008-01-27 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/expand-psymtabs.c (foo): Add a non-empty body.
Index: testsuite/gdb.base/expand-psymtabs.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/expand-psymtabs.c,v
retrieving revision 1.2
diff -u -p -r1.2 expand-psymtabs.c
--- testsuite/gdb.base/expand-psymtabs.c 1 Jan 2008 22:53:18 -0000 1.2
+++ testsuite/gdb.base/expand-psymtabs.c 27 Jan 2008 16:25:30 -0000
@@ -29,7 +29,7 @@ main (void)
void
foo (void)
{
- /* Break here */
+ int x = 1; /* Break here */
}
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-27 16:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-27 15:32 expand-symtabs.exp Mark Kettenis
2008-01-27 15:38 ` expand-symtabs.exp Daniel Jacobowitz
2008-01-27 16:17 ` expand-symtabs.exp Mark Kettenis
2008-01-27 16:26 ` expand-symtabs.exp Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox