This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/15355] Bad traceback info to debugger


------- Additional Comments From igodard at pacbell dot net  2004-05-09 20:48 -------
Created an attachment (id=6248)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6248&action=view)
debugger output

When this app is run it will throw an exception and die. In the debugger, set a
trap at "Hide::Die()" and the debugger will get control on the throw. If you
then get a backtrace ("bt" in gdb) you get:
#0  Hide::Die() () at exception.cc:16
#1  0x0804e0fe in Hide::ThrowInfoBase::Handler() () at exception.cc:44
#2  0x400bbb05 in __cxxabiv1::__terminate(void (*)()) (
    handler=0x804e080 <Hide::ThrowInfoBase::Handler()>)
    at ../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:43
#3  0x400bbb42 in std::terminate() ()
    at ../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:53
#4  0x400bbcc2 in __cxa_throw ()
    at ../../../../gcc/libstdc++-v3/libsupc++/eh_throw.cc:80
#5  0x40059a9d in std::__throw_out_of_range(char const*) (
    __s=0x804f538 "L¿\f@`¿\f@\006") at new_allocator.h:69
#6  0x08048f08 in main () at bitset:469
(gdb)

The top entries in this look fine - a bunch of internal functions in the
exception runtime - but the bottom entry is bogus:

#6  0x08048f08 in main () at bitset:469

There is no "main" in bitset; the real "main" is in powerset.cc. Line 469 in
bitset has nothing to do with any path of the exception or the inlines that
elad to it, nor does line 469 in powerset.cc (the throw occus before execution
gets to line 469).

I don't know if this is bad data from the compiler to the debugger, or if the
debugger has the bug and is mis-displaying good data from the compiler.

Ivan


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15355


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