[Qt-interest] Problem debugging under Eclipse
Doug Broadwell
doug at cseco.com
Mon Jan 5 21:55:24 CET 2009
gcc: 3.4.2, gdb: 6.8.mingw-3 (pre-compiled for Windows), Qt: 4.2.3, Qt
Eclipse integration: 1.4.3, Eclipse: 3.4.1
I also loaded it onto another computer, same as above except Qt is 4.4.1
I have been running Qt for a while now. After installing the Eclipse
environment for Qt I wrote Qt's simple tutorial project (Address Book) to
test. It runs fine out of Eclipse or from the command line, it runs fine
under gdb from the command line, however, when I run it in debug mode in
Eclipse gdb errors out before it gets to main(). The error seems to be an
attempt to access address 0x00000000.
The debug window is as follows (the ellipses are today's date and time):
AddressBook.exe[C/C++ Local Application]
MinGW gdb Debugger (...)(Suspended)
Thread[1](Suspended)
6 ntdll!LdrAccessResource() 0x7c90e4f4
5 ntdll!ZwMapViewOfSection() 0x7c90d50c
4 snwprintf() 0x7c91bd03
3 ntdll!RtValidateUnicodeString() 0x7c91624a
2 ntdll!LdrShutdownProcess() 0x7c9164b3
1 <symbol is not available> 0x00000000
C:\data\Qt\mingw\bin\gdb.exe (...)
C:\data\Qt\Eclipse\AddressBook\debug\AddressBook.exe (...)
On the Console:
[New thread 2568.0xbec]
Cannot access memory at address 0x0
If I understand correctly, it appears that ntdll!LdrShutdownProcess() is
attempting to access memory with a null pointer (?).
If I keep clicking the green Run arrow once the debugger suspends as below,
it keeps suspending with similar, but more, messages as shown in the initial
message. After 4 times it finally makes it to main() and halts (as it
should). In the variables window there are the following errors:
typeinfo for QObject <mi_cmd_var_create: unable to create varaible object>
typeinfo name for QObject <mi_cmd_var_create: unable to create varaible
object>
typeinfo for AddressBook <mi_cmd_var_create: unable to create varaible
object>
typeinfo name for AddressBook <mi_cmd_var_create: unable to create varaible
object>
typeinfo for QWidget <mi_cmd_var_create: unable to create varaible object>
typeinfo name for QWidget <mi_cmd_var_create: unable to create varaible
object>
typeinfo for QPaintDevice <mi_cmd_var_create: unable to create varaible
object>
typeinfo name for QPaintDevice <mi_cmd_var_create: unable to create varaible
object>
Also, I have the environment variables "Lib" and "Include" pointing to those
places in the MinGW and Qt directories.
Thanks,
Doug
More information about the Qt-interest-old
mailing list