home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: 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
-
- 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
-