tdawson@shumun.weeg.uiowa.edu (Tim Dawson) (06/21/91)
Hello, 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? 2) When I copy my compiled program into a directory aside from my home project directory, menu items which are connected to the subproject do not function. It seems as if the nib files are not being loaded. I have tried this with files created with both make and make debug. I have tried make install. I have tried using strip on all of these. Nothing works. This is of vital importance as the program is useless without the functions imbedded in the subprojects. Thanks for any help. ..tim
scott@mcs-server.gac.edu (Scott Hess) (06/22/91)
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!
<I still speak for nobody>
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
dennisg@kgw1.xetron.COM (Dennis Glatting) (06/25/91)
In article <6586@ns-mx.uiowa.edu>, tdawson@shumun.weeg.uiowa.edu (Tim Dawson) writes: |> Hello, |> |> 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? |> check into the gdb "dir" command. |> 2) When I copy my compiled program into a directory aside from my home project |> directory, menu items which are connected to the subproject do not function. |> It seems as if the nib files are not being loaded. I have tried this with |> files created with both make and make debug. I have tried make install. I |> have tried using strip on all of these. Nothing works. This is of vital |> importance as the program is useless without the functions imbedded in the |> subprojects. it can't find them. they mustn't be in the app? are they in the executable? if not then where are they being loaded from? check into making your project a .app then use NXArgv[0] to find the directory. |> |> Thanks for any help. |> |> ..tim -- ..!uunet!kgw2!dennisg | Dennis P. Glatting dennisg@Xetron.COM | so?