This is the mail archive of the
mailing list for the GDB project.
Re: GDB errors when debugging xfree86
At 02:12 07/11/2001 , Christopher Faylor a écrit:
>On Wed, Nov 07, 2001 at 12:23:19AM +0100, email@example.com wrote:
> >At 22:07 06/11/01 +0000, you wrote:
> >>Wonder if someone can help. I've been talking to Chris Faylot about some
> >>GDB problems and he's forwarded me to you guys.
> >>(I'm not on this list so if you could CC me any info posted).
> >>With the current CVS of gdb built around an hour ago I'm getting this
> >>when trying to debug some new code in Cygwin/XFree86.
> >>"/cygdrive/c/WINNT/system32/KERNEL32.DLL": error reading line numbers
> >>"/cygdrive/c/WINNT/system32/ADVAPI32.DLL": error reading line numbers
> >>"/cygdrive/c/WINNT/system32/RPCRT4.DLL": error reading line numbers
> >>"/cygdrive/c/WINNT/System32/winmm.dll": error reading line numbers
> >>"/cygdrive/c/WINNT/system32/version.dll": error reading line numbers
> >>"/cygdrive/c/WINNT/system32/SHELL32.DLL": error reading line numbers
> >>"/cygdrive/c/WINNT/system32/lz32.dll": error reading line numbers
> >>warning: Lowest section in /cygdrive/c/WINNT/System32/sbeng32.dll is .rsrc
> >at 10001000
> >>coffread.c:472: gdb-internal-error: sect_index_text not initialized
> >>I have to also hit CTRL+C twice, as the program seems to completely hang,
> >>so I can get a prompt back at GDB.
> >>Anyone ideas on where the problems lie ?
> >No, but I can confirm that this is not Xfree specific,
> >with the latest cygwin CVS build, I got the same error
> >when trying to debug a program without any debug
> >info in it.
>Well, this was also a problem with an older gdb.
>I don't know if it was a problem with older cygwin's or not, though.
I recompile the 5.1 branch GDB, and I could debug GDB with itself for
(while I got an internal_error in the GDB(top) debugging GDB(child)
itself running the program that caused the internal_error
about sect_index_text not being initialized,
with a breakpoint set at internal_error in GDB(top))
Now the breakpoint in internal_error works (with 5.1 branch GDB)
and I could get a better understanding of the reason of the failure,
at least for my case :
I was debugging a commercial program (Origin from Microcal)
because one function that used to work didn't anymore, and I was suspecting
that this was
due to some update in a system DLL
exposing some hidden error !)
The internal error comes from the loading of dl35wd32.dll
Here is the begin of thze info I got from pedump executable:
PEDUMP of File: dl35wd32.dll
Code Offset = 00000400, Code Size = 00025200
Data Offset = 00025600, Data Size = 00002A00
Number of Objects = 0007 (dec), Imagebase = 00400000h
Object01: BEGTEXT RVA: 00001000 Offset: 00000400 Size: 00025200 Flags:
Object02: DGROUP RVA: 00027000 Offset: 00025600 Size: 00002A00 Flags:
Object03: .bss RVA: 0002A000 Offset: 00000000 Size: 00000C00 Flags:
Object04: .idata RVA: 0002B000 Offset: 00028000 Size: 00000800 Flags:
Object05: .edata RVA: 0002C000 Offset: 00028800 Size: 00000C00 Flags:
Object06: .reloc RVA: 0002D000 Offset: 00029400 Size: 00001600 Flags:
Object07: .rsrc RVA: 0002F000 Offset: 0002AA00 Size: 00001800 Flags:
It clearly shows that sect_index_text is not initialized because the text
section is not named .text
Nevertheless the code offset is clearly the offset of this section, thus
we should be able to recognize this as
the text section, no ?
But I don't see where this could be added easily in gdb sources ...
Institut Charles Sadron
F 67083 STRASBOURG CEDEX (France)
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99