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: Is gdb.c++/local.exp broken?


On Wed, Nov 13, 2002 at 03:56:42PM -0500, Jim Blandy wrote:
> 
> The recent change to dwarf2read.c:read_func_scope causes the following
> known failure:
> 
> ! FAIL: gdb.c++/local.exp: ptype Local (gdb/483)
> 
> to change to this unknown failure:
> 
> ! FAIL: gdb.c++/local.exp: ptype Local
> 
> The bug in the database, gdb/483, is that the type Local gets printed
> incorrectly.  But if you look at gdb/testsuite/gdb.c++/local.cc, the
> type Local isn't even in scope at that point --- on line 59, after the
> return of marker1.  I don't think it should be printed at all.  And in
> fact, with the recent change to read_func_scope, that's what GDB does,
> under Dwarf 2:
> 
> Breakpoint 2, marker1() () at /home/jimb/cygnus/src/sourceware/gdb/gdb_5_3/src/gdb/testsuite/gdb.c++/local.cc:5
> 5	}
> (gdb) up
> #1  0x08048438 in main () at /home/jimb/cygnus/src/sourceware/gdb/gdb_5_3/src/gdb/testsuite/gdb.c++/local.cc:59
> 59	   marker1();
> (gdb) PASS: gdb.c++/local.exp: up from marker1
> ptype Local
> No symbol "Local" in current context.
> (gdb) FAIL: gdb.c++/local.exp: ptype Local
> 
> I kind of think the test should actually try to print Local while
> stopped in the function `foobar', and print InnerLocal while stopped
> in main, and check that Local isn't defined.  That, however,
> introduces a new failure in the STABS side, which still isn't scoping
> Local correctly.
> 
> Is my understanding of this correct?  If I file a PR for the stabs
> side of things, can I mark the STABS failure as a kfail, and commit
> this change?

While I can't approve testsuite patches, I can certainly confirm your
reading of the testcase.  If our current frame is in main, there's no
reason Local should be considered to be in scope, and plenty of reason
we should make sure that it isn't.

-- 
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]