On Mon, Jun 10, 2002 at 09:03:14AM -0400, Phil Edwards wrote: > On Mon, Jun 10, 2002 at 02:15:35PM +0200, Ulrich Eckhardt wrote: > > While trying to debug a program, I encountered some weird paths that > > prevented me from taking advance of the debug-lib: > > > > LD_PRELOAD=/usr/lib/libstdc++_debug/libstdc++3.so.3 gdb ./test > > ... > > (gdb) step > > 178 in > > /home/doko/packages/gcc/3.0/gcc-3.0-3.0.4ds3/build/i386-linux/libstdc++-v3/include/bits/char_traits.h > > (gdb) > > > > This dir doesn't exist on my machine, and of course I can't step through > > the > > source then. > > > > I must admit that I don't know exactly where the path comes from. I did > > cd /usr/lib > > grep -r -i home *|grep doko > > to find out where the path was hardcoded but to no avail. > > I would imagine it's in /usr/lib/libstdc++_debug/libstdc++3.so.3. > That's what "debug information" consists of, after all: paths to the > source directories, file names, and line numbers. > > Stepping through is possible, but to actually see the source, you must have > the source avilable, and gdb needs to know where it is. If it's not in > "/home/doko/packages/..." then you can set a variable inside gdb to tell > it where to look.
The command is 'dir', for reference. Follow it by the appropriate subdirectory of the source tree on your machine. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]