This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
header sources not found in gdb
- From: Dave Lawrence <dgl at integrinautics dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 22 May 2003 13:16:47 -0700
- Subject: header sources not found in gdb
- Organization: IntegriNautics Corporation
When compiling with gcc 3.2.1 and 3.2.2, I no longer
can see header files among my sources from gdb. When
I do "info sources", I don't see my header files.
Also, when I try "list hello.h:1", gdb says it can't
find my header file. In gcc 2.96, I was able to
see my headers from gdb. How can I get the old
results using gcc 3.*? Below is an example of
what I'm talking about. Thanks in advance!
Dave
{>:25} more hello.c
#include <stdio.h>
#include "hello.h"
main()
{
printf("%s", hellomessage);
}
{>:26} more hello.h
const char *hellomessage = "Hello world\n";
{>:27} gcc --version
2.96
{>:28} gccx --version
gccx (GCC) 3.2.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
{>:29} gcc -g -o hello2.96 hello.c
{>:30} gccx -g -o hello3.2.1 hello.c
{>:31} gdb hello2.96
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) list hello.h:1
1 const char *hellomessage = "Hello world\n";
(gdb) quit
{>:32} gdb hello3.2.1
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) list hello.h:1
No source file named hello.h.
(gdb) quit