This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Odd behavior with souce files
- From: "Kevin R.J. Ellwood" <kellwood at ford dot com>
- To: gdb at sourceware dot cygnus dot com
- Date: Mon, 10 Dec 2001 13:46:30 -0500 (EST)
- Subject: Odd behavior with souce files
- Hop-count: 1
Hello All,
I sure hope this is not an FAQ -- I tried to check the manual and could
not find anything.
I am using gdb to debug a project and, as expected, gdb found the source
files. Unfortunately, when I step through the code, gdb complains that it
can't find souce code for libraries used by the project (including system
libraries). Below is a snippet from a gdb session.
233 else if (n == 0)
(gdb)
236 pntr = (double *) malloc((unsigned) n);
(gdb)
__libc_malloc (bytes=192) at malloc.c:2791
2791 malloc.c: No such file or directory.
in malloc.c
(gdb) s
2794 in malloc.c
(gdb)
2785 in malloc.c
(gdb)
2794 in malloc.c
(gdb)
2806 in malloc.c
Needless to say, I don't want to debug malloc. Is there an option for gdb
such that, if a source file is not found, it won't try to step into that
particular routine. I have similar problem when gdb encouters, printf,
fprintf, etc.
Thanks,
Kevin
-------------------------------
Kevin R.J. Ellwood
Materials Science Dept.
Scientific Research Lab
Dearborn, MI 48121-2153 MD3182
Phone: (313) 322-5535
Fax: (313) 323-1129