I sometimes get error when trying to attach to process:
error return
../../../BUILD/gdb-5.1.1/gdb/win32-nat.c:1352 was 5
Attaching to process 1124
../../../BUILD/gdb-5.1.1/gdb/coffread.c:472:
gdb-internal-error: sect_index_text not initialized
What does that mean?
Logged In: YES
user_id=30442
I think this error is caused when you try to debug a program
that loads a DLL that has no text section (e.g. it just has
resources). An example of such a DLL is odbcint.dll and this
program reproduces the problem:
#include <windows.h>
#include <stdio.h>
int main(void)
{
puts("1");
LoadLibrary("odbcint.dll");
puts("2");
return 0;
}
If you try to run it or step over the LoadLibrary() using GDB
5.1.1 it will give the above error message and hang. It is best
observed under cmd.exe because with MSYS the error
doesn't seem to appear, though it still hangs. AFAICT this is
fixed in GDB 5.2.1.