home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!rutgers!micro-heart-of-gold.mit.edu!xn.ll.mit.edu!ll.mit.edu!cogen
- From: cogen@ll.mit.edu
- Newsgroups: gnu.misc.discuss
- Subject: gdb and shared libraries doesn't work
- Message-ID: <1992Aug31.185324.21189@ll.mit.edu>
- Date: 31 Aug 92 18:53:24 GMT
- Sender: cogen@ll.mit.edu
- Organization: MIT Lincoln Laboratory
- Lines: 33
-
- .
- .
- .
- ------- Start -------->
-
-
- I have gdb 4.6 And I am trying to debug C programs linked to shared libraries
- which I have built myself. The OS is SunOS 4.4.1. gdb fails in many different
- ways:
-
- 1) I say gdb <progname>. Then type "break main" and gdb crashes with
- segmentation violation. Same for any other function in my source files.
-
- 2) If instead of main I try to break in a library routine, gdb says it is not
- defined.
-
- 3) Another thing I do a lot it debug an existing process. I say gdb <progname>,
- then attach to the process, which is currently in a pause(). Setting a
- breakpoint in my function still generates seg violation. However, now I can set
- a breakpoint in a library routine. Apparently, library routine names don't get
- loaded until main executes. But unfortunately, even with the breakpoint set I
- still can't step through these library routines. The breakpoint is never
- detected by gdb.
-
- All code -- program and library -- were compiled with -g option.
-
- The release nodes for 4.6 said that gdb can debug shared libraries. So what is
- going wrong?
-
- (Apologies if this is the wrong newsgroup. Let me know if so; I will repost
- it.)
-
- Thanks for any help.
-