[Converted from Gnats 1758] gdb list or next commands, for example, cause the following warnings. warning: (Internal error: pc 0x120001120 in read in psymtab, but not in symtab.) I compiled a simple 'hello, world' program with GCC 3.3.2 and 3.4.1 and used both gdb 5.3 and 6.2. Gdb 5.3 does not produce the warning. Gdb 6.2 does produce the warning both both GCC 3.3.2 and 3.4.1 compile programs. Release: 6.2 Environment: HP Alpha Tru64 UNIX 5.1A How-To-Repeat: % cat test.c main() { printf("Hello, World!\n"); } % /usr/local/gcc_3.3.2/bin/gcc -v Reading specs from /usr/local/gcc_3.3.2/lib/gcc-lib/alphaev68-dec-osf5.1/3.3.2/specs Configured with: /usr/local/src/gcc-3.3.2/configure --prefix=/usr/local/gcc_3.3.2 Thread model: single gcc version 3.3.2 % /usr/local/gcc_3.4.1/bin/gcc -v Reading specs from /usr/local/gcc_3.4.1/lib/gcc/alphaev68-dec-osf5.1/3.4.1/specs Configured with: /usr/local/src/gcc-3.4.1/configure --prefix=/usr/local/gcc_3.4.1 Thread model: posix gcc version 3.4.1 % /usr/local/gcc_3.3.2/bin/gcc -g -o a.out.3.3.2 test.c % /usr/local/gcc_3.4.1/bin/gcc -g -o a.out.3.4.1 test.c % /usr/local/bin/gdb a.out.3.3.2 GNU gdb 5.3 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 "alphaev68-dec-osf5.1"... (gdb) list 1 main() 2 { 3 printf("Hello, World!\n"); 4 } (gdb) q % /usr/local/bin/gdb a.out.3.4.1 GNU gdb 5.3 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 "alphaev68-dec-osf5.1"... (gdb) list 1 main() 2 { 3 printf("Hello, World!\n"); 4 } (gdb) q % /usr/local/src/gdb_6.2/gdb-6.2/gdb/gdb a.out.3.3.2 GNU gdb 6.2 Copyright 2004 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 "alphaev68-dec-osf5.1"... (gdb) list warning: (Internal error: pc 0x120001120 in read in psymtab, but not in symtab.) 1 main() 2 { 3 printf("Hello, World!\n"); 4 } (gdb) q % /usr/local/src/gdb_6.2/gdb-6.2/gdb/gdb a.out.3.4.1 GNU gdb 6.2 Copyright 2004 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 "alphaev68-dec-osf5.1"... (gdb) list warning: (Internal error: pc 0x120001120 in read in psymtab, but not in symtab.) 1 main() 2 { 3 printf("Hello, World!\n"); 4 } (gdb) q
FWIW, I see the same warnings with gdb 7 on Linux/x86 and gcc 4.1. The warning seems to appear only intermittently, for different runs of the same program. (I.e., sometimes it doesn't appear at all.)
(In reply to comment #1) > FWIW, I see the same warnings with gdb 7 on Linux/x86 and gcc 4.1. The warning > seems to appear only intermittently, for different runs of the same program. > (I.e., sometimes it doesn't appear at all.) Can you try 7.1 or CVS gdb? I think a bug along these lines was fixed in the recent past, but I can't find the patch offhand. If you can reliably make it happen, the executable would be useful. This message occurs if there is a symbol table bug in gdb. If it causes actual problems for you (missing symbols) you can try -readnow as a workaround.
I still see such warnings in the GDB CVS HEAD This happens when I run "bt" command like: [debug]> bt 30 [debug]warning: (Internal error: pc 0x17 in read in psymtab, but not in symtab.) [debug]warning: (Internal error: pc 0x17 in read in psymtab, but not in symtab.) [debug]#0 0x77c2c21d in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll [debug]#1 0x00000018 in ?? () [debug]#2 0x65f17501 in wxStringData::Unlock (this=0x63fd900) at E:/code/cb/wx/wxWidgets-2.8.12/include/wx/string.h:243 [debug]#3 0x65f17429 in wxStringBase::~wxStringBase (this=0x72bfbfc, __in_chrg=<optimized out>) at E:/code/cb/wx/wxWidgets-2.8.12/include/wx/string.h:396 [debug]#4 0x65f1c6e1 in wxString::~wxString (this=0x72bfbfc, __in_chrg=<optimized out>) at E:/code/cb/wx/wxWidgets-2.8.12/include/wx/string.h:659 [debug]#5 0x65e933f3 in ParserBase::FindFileInIncludeDirs (this=0x3e01320, file="E:\\code\\cb\\cb_debugger_branch\\src\\plugins\\projectsimporter\\wx/dynarray.h", firstonly=true) at plugins\codecompletion\parser\parser.cpp:317 WindowsXP, GDB is build from MinGW+MSYS
I'm closing this on grounds that support for OSF/1 / Tru64 was removed from GDB. On GNU/Linux, I haven't seen this in a long while. Please file a new bug and attach a reproducer binary if you can still see it.
Created attachment 9331 [details] On AIX, produces Internal error: pc 0x10007f5c in read in psymtab, but not in symtab This bug is still present on AIX, I've tried AIX6 with gcc-4.8 as well as AIX7 with gcc-4.8 and gcc-6.1. The debug session looks like this on AIX7: (gdb) b main Breakpoint 1 at 0x10000644: file gdb-test.C, line 60. (gdb) run Starting program: .../gdb-test Breakpoint 1, main (argc=1, argv=0x2ff21bc4) at gdb-test.C:60 60 std::cout << "Yo, I'm a program!\n"; (gdb) n warning: (Internal error: pc 0x10007f5c in read in psymtab, but not in symtab.) warning: (Internal error: pc 0x10007f5c in read in psymtab, but not in symtab.) warning: (Internal error: pc 0x10007f5c in read in psymtab, but not in symtab.) Yo, I'm a program! 61 std::vector<Animal*> animals;