Article View: gnu.gdb.bug
Article #846finding source files
From: jimb
Date: Wed, 21 Feb 1990 06:27
Date: Wed, 21 Feb 1990 06:27
40 lines
1856 bytes
1856 bytes
In the following sequence, gdb cannot list the source code the first
time, and can the second time. It seems to me that gdb ought to be
able to find the source code both times.
betty% cat > foo.c
main() { write(1, "hi.\n", 4); }
betty% gcc -g foo.c -o foo
betty% foo
hi.
betty% mkdir bar
betty% cd bar
betty% gdb ../foo
GDB 3.4, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /usr/users/students/blandy/honors/bar/../foo...done.
Type "help" for a list of commands.
(gdb) list main
Reading in symbols for foo.c...done.
foo.c: No such file or directory.
(gdb) quit
betty% cd ..
betty% gdb foo
GDB 3.4, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /usr/users/students/blandy/honors/foo...done.
Type "help" for a list of commands.
(gdb) list main
Reading in symbols for foo.c...done.
1 main() { write(1, "hi.\n", 4); }
(gdb) quit
betty%
Is it perhaps not searching the executable's directory for the source file?
Jim Blandy - jimb@occs.cs.oberlin.edu
Technical Details
Message-ID:
<9002210627.AA15943@occs.cs.oberlin.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!occs.cs.oberlin.edu!jimbShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!occs.cs.oberlin.edu!jimb From: jimb@occs.cs.oberlin.edu Newsgroups: gnu.gdb.bug Subject: finding source files Message-ID: <9002210627.AA15943@occs.cs.oberlin.edu> Date: 21 Feb 90 06:27:53 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 40