home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / programm / 7923 < prev    next >
Encoding:
Text File  |  1992-12-28  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!walter!faline!grd
  3. From: grd@faline..bellcore.com (Glen Diener)
  4. Subject: Re: Symbol tables of dynamically loaded objects in gdb
  5. Message-ID: <1992Dec28.175948.12626@walter.bellcore.com>
  6. Sender: news@walter.bellcore.com
  7. Nntp-Posting-Host: faline.bellcore.com
  8. Reply-To: grd@faline.bellcore.com (Glen Diener)
  9. Organization: Bellcore MRE
  10. References: <1hdse7INNslm@gap.caltech.edu>
  11. Date: Mon, 28 Dec 92 17:59:48 GMT
  12. Lines: 24
  13.  
  14. In article <1hdse7INNslm@gap.caltech.edu> bchen@cco.caltech.edu (Bing-Qing Chen) writes:
  15. >I was trying to figure out how to add symbol tables of dynamically loaded
  16. >objects to gdb. According to the GDB document, I tried the following
  17. >commands: "load file", "load-file file" and "add-symbol-file file addr".
  18. >The first command returns "You can't do that when your target is `exec'"
  19. >if the program is not running or "You can't do that when your target is
  20. >`child'" when it is running, I wonder when I can use the "load" command?!
  21. >The second command seems to do nothing, while the third command does not
  22. >recognize address argument and it crashes gdb with "Segmentation fault"
  23. >if no address is given. This is really frustrating. Any help would be
  24. >greatly appreciated.
  25. >
  26. >Thanks,
  27. >Bing Chen
  28. >bchen@cco.caltech.edu
  29. >
  30.  
  31. The proper incantation is add-file <filename>, where filename is
  32. the name of an object file produced by rld_load or objc_loadmodules.
  33. You'll probably also want to execute gdb's directory command to
  34. tell gdb the path of the directory you're dynamically-loaded class's
  35. source lives in.
  36.  
  37. -glen
  38.