This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: testsuite: FAILs in funcargs.exp


On Tue, Sep 02, 2003 at 03:11:13PM +0200, Corinna Vinschen wrote:
> Hi,
> 
> I have the following two FAILs when running funcargs.exp, which I don't
> quite understand:
> 
>   Breakpoint 37, 0x00001b42 in call6k () at testsuite/gdb.base/funcargs.c:360
>   360     {
>   (gdb) FAIL: gdb.base/funcargs.exp: continue to call6k
> 
> and
> 
>   Breakpoint 49, 0x00002628 in hitbottom () at testsuite/gdb.base/funcargs.c:605
>   605     {
>   (gdb) FAIL: gdb.base/funcargs.exp: run to hitbottom
> 
> As it turns out, gdb's reply contains in both cases an hex address plus the
> word "in" while in both cases expect doesn't expect this.  As a side note,
> the previous setting of these breakpoints confirms, that both breakpoints
> has been hit correctly:
> 
>   (gdb) break call6k
>   Breakpoint 37 at 0x1b42: file testsuite/gdb.base/funcargs.c, line 360.
> 
>   (gdb) break hitbottom
>   Breakpoint 49 at 0x2628: file testsuite/gdb.base/funcargs.c, line 605.
> 
> The first case fails since testsuite/lib/gdb.exp, the procedure gdb_continue
> doesn't expect a hex address:
> 
>   return [gdb_test "continue" ".*Breakpoint $decimal, $function .*" "continue to $function"];
> 
> The second case fails for the same reason in funcargs.exp, procedure
> recursive_structs_by_value:
> 
>     gdb_expect {
> 	 -re ".*Breakpoint $decimal, hitbottom .*$gdb_prompt $" { pass "run to hitbottom" }
> 	 -re "$gdb_prompt $" { fail "run to hitbottom" ; gdb_suppress_tests; }
> 	 timeout { fail "(timeout) run to hitbottom" ; gdb_suppress_tests; }
>     }
> 
> Is that a problem with these tests or why don't they expect that gdb
> prints the additional hex address?

The hex address means that GDB believes we are not at the beginning of
the line.  Normally when we skip the prologue we do end up at the
beginning of the line.

It could be a problem in prologue skipping, or it could be a problem
with the debug information; or it could just be that the tests should
be more lenient.  I don't remember if moving breakpoints to the middle
of a line in this case is considered acceptable or not.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]