🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #676

Help: using GDB to debug G++-compiled programs

#676
From: Low Chee Meng (KSL)
Date: Fri, 08 Jan 1993 14:29
25 lines
1286 bytes
Hi,

I'm using GDB for the first time to debug a C++ program (compiled with
-g flag with G++). One thing I couldn't figure out how to do is to
execute some method call inside GDB, eg:

gdb> print someObj.someMethod(someArgs....)

GDB would always return back something like "there's no component
named someMethod", even though someMethod is a valid method of
the class to which someObj belongs to.

Is there something I have to do make the above work?

I'm current using GDB 4.6 on Sun OS.

Thanks in advance for any help,

CheeMeng

-- 
---------------------------------------------------------------------
Chee-Meng Low (cmlow@iti.gov.sg) (fax: 65-777-3043)
Knowledge Systems Lab, Information Technology Institute, Singapore
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Technical Details
Message-ID: <1993Jan8.142936.24525@iti.gov.sg>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!newsserver.jvnc.net!newsserver.technet.sg!iti.gov.sg!cmlow

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.help
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!newsserver.jvnc.net!newsserver.technet.sg!iti.gov.sg!cmlow
From: cmlow@iti.gov.sg (Low Chee Meng (KSL))
Subject: Help: using GDB to debug G++-compiled programs
Message-ID: <1993Jan8.142936.24525@iti.gov.sg>
Keywords: gdb, g++
Sender: news@iti.gov.sg (News Admin)
Organization: National Computer Board, Singapore
Date: Fri, 8 Jan 1993 14:29:36 GMT
Lines: 25