🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1975

Re: Symbol tables of dynamically loaded objects in gdb

#1975
From: grd Glen Diener
Date: Mon, 28 Dec 1992 17:59
24 lines
1621 bytes
In article <1hdse7INNslm@gap.caltech.edu> bchen@cco.caltech.edu (Bing-Qing Chen) writes:
>I was trying to figure out how to add symbol tables of dynamically loaded
>objects to gdb. According to the GDB document, I tried the following
>commands: "load file", "load-file file" and "add-symbol-file file addr".
>The first command returns "You can't do that when your target is `exec'"
>if the program is not running or "You can't do that when your target is
>`child'" when it is running, I wonder when I can use the "load" command?!
>The second command seems to do nothing, while the third command does not
>recognize address argument and it crashes gdb with "Segmentation fault"
>if no address is given. This is really frustrating. Any help would be
>greatly appreciated.
>
>Thanks,
>Bing Chen
>bchen@cco.caltech.edu
>

The proper incantation is add-file <filename>, where filename is
the name of an object file produced by rld_load or objc_loadmodules.
You'll probably also want to execute gdb's directory command to
tell gdb the path of the directory you're dynamically-loaded class's
source lives in.

-glen
Technical Details
Message-ID: <1992Dec28.175948.12626@walter.bellcore.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!walter!faline!grd
References: <1hdse7INNslm@gap.caltech.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!walter!faline!grd
From: grd@faline..bellcore.com (Glen Diener)
Subject: Re: Symbol tables of dynamically loaded objects in gdb
Message-ID: <1992Dec28.175948.12626@walter.bellcore.com>
Sender: news@walter.bellcore.com
Nntp-Posting-Host: faline.bellcore.com
Reply-To: grd@faline.bellcore.com (Glen Diener)
Organization: Bellcore MRE
References: <1hdse7INNslm@gap.caltech.edu>
Date: Mon, 28 Dec 92 17:59:48 GMT
Lines: 24