Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!cs.umn.edu!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!gacvx2.gac.edu!scott From: scott@mcs-server.gac.edu (Scott Hess) Newsgroups: comp.sys.next Subject: Re: Using subprojects in IB. Message-ID: Date: 22 Jun 91 02:45:46 GMT References: <6586@ns-mx.uiowa.edu> Organization: Gustavus Adolphus College Lines: 35 Nntp-Posting-Host: mcs-server.gac.edu In-reply-to: tdawson@shumun.weeg.uiowa.edu's message of 20 Jun 91 21:58:32 GMTLines: 35 In article <6586@ns-mx.uiowa.edu> tdawson@shumun.weeg.uiowa.edu (Tim Dawson) writes: I am working on a project with a number of subprojects. I have gotten most of the kinks worked out in the system except for two questions and I was wondering if anybody could help me. 1) How do I use gdb properly? It seems that I have to copy the source files from the subproject directory to the root project directory in order to debug any objects. This is very inconvenient and detracts from the modularity that subprojects offer. Is there any way around this? [I reply to the network, since this is a seldom-known feature of gdb] The problem is that gdb doesn't know about subprojects, so doesn't know where the other files of the project are at. The secret is to tell it - use the dir or idir directives of gdb (for help, type "help idir" or "help dir"at the (gdb) prompt). To make those be added whenever you run gdb in the parent project, edit the .gdbinit file in that directory to include the lines, just as you'd type them to gdb. To see which files need to be added, type "ls -d *.subproj" to the root project's directory, and just add a bunch of lines of the form "idir subname.subproj" to .gdbinit. Later, -- scott hess scott@gac.edu Independent NeXT Developer Graduated GAC Undergrad! Note: I have moved home for a time. My email address will still be valid. Any SnailMail should be redirected, along with phone calls. At the least, my parents can tell you how to get hold of me, or forward any mail . . . Old: PO 829, GAC, St. Peter, MN 56082 (507) 933-8466 New: RR#4 Box 227 Pipestone, MN 56164 (507) 825-2788