Article View: gnu.gdb.bug
Article #1250problem with gdb
From: Krishanu Debnath
Date: Tue, 15 Feb 2005 15:08
Date: Tue, 15 Feb 2005 15:08
57 lines
3677 bytes
3677 bytes
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, buffer=@0xbfffd730,
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, __os=@0x4)
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
Technical Details
Message-ID:
<mailman.821.1108932483.32256.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newsfeed.stanford.edu!shelby.stanford.edu!individual.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,5d2152d935317dd3,start X-Google-Attributes: gidf5053,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newsfeed.stanford.edu!shelby.stanford.edu!individual.net!not-for-mail From: Krishanu Debnath <invalid@domian.com> Newsgroups: gnu.gdb.bug Subject: problem with gdb Date: Tue, 15 Feb 2005 20:38:12 +0530 Lines: 60 Approved: bug-gdb@gnu.org Message-ID: <mailman.821.1108932483.32256.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: 7bit X-Trace: news.Stanford.EDU 1108931641 4376 199.232.76.165 (20 Feb 2005 20:34:01 GMT) X-Complaints-To: news@news.stanford.edu To: gnu-gdb-bug@moderators.isc.org Envelope-to: bug-gdb@gnu.org X-Orig-X-Trace: individual.net dqRAEF4jKvLvkv/P6yL1Ygap3dtpE+y6VOPO21eKxSIsGnRiSP User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en X-Mailman-Approved-At: Sun, 20 Feb 2005 15:47:59 -0500 X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>