[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with gdb
From: |
Krishanu Debnath |
Subject: |
problem with gdb |
Date: |
Tue, 15 Feb 2005 20:38:12 +0530 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 |
Hello,
Following gdb session will help to illustrate my problem.
breakpoint 1, vrtDecompileDeclUsedinExpr(VreElabRoot*, VrlDecl*,
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> >&, eExprTrUtilToken*) (pElabRoot=0x8202118,
pDecl=0x81fc948, address@hidden,
pUtilToken=0x81f9158) at src/VrtVeraDecompileExpr.cxx:177
177 VrlEventDecl *pEventDecl = (VrlEventDecl *)pDecl;
(gdb) p *pDecl
$1 = {<VrlBase> = {<VrlMemBase> = {_vptr.VrlMemBase = 0x81a7500,
eObjType = VRL_EVENTDECL}, pScope = 0x81fc758, nLineNumber = 4},
sDeclName = 0x81fc970 "clk", pWhenScope = 0x0}
(gdb) p *(VrlEventDecl *)pDecl
A parse error in expression, near `)pDecl'.
(gdb)
VrlEventDecl is derived class of VrlDecl. VrlDecl *pDecl actually points
to a
VrlEventDecl* object. I am quite surprised to see the error in second print.
I know gdb supports this syntax because it works with a small similar
testcase.
Also i didn't understand the reason of the following behaviour.
(gdb) p pDecl->decompile()
Program received signal SIGSEGV, Segmentation fault.
sentry (this=0xbfffd47c, address@hidden)
at
/usr/src/build/146482-i386/BUILD/gcc-3.2-20020903/obj-i386-redhat-linux/i386-redhat-linux/libstdc++-v3/include/bits/basic_ios.h:99
99
/usr/src/build/146482-i386/BUILD/gcc-3.2-20020903/obj-i386-redhat-linux/i386-redhat-linux/libstdc++-v3/include/bits/basic_ios.h:
No such file or directory.
in
/usr/src/build/146482-i386/BUILD/gcc-3.2-20020903/obj-i386-redhat-linux/i386-redhat-linux/libstdc++-v3/include/bits/basic_ios.h
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function
(VrlEventDecl::decompile(std::ostream&, unsigned) const) will be abandoned.
(gdb)
decompile is declared as ..
// virtual routine
VOID decompile(ostream &buffer = cout, UINT nIndents = 0) const = 0;
I am using gdb 5.3 and gcc 3.2 . Can anyone help?
Thanks
Krishanu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- problem with gdb,
Krishanu Debnath <=