User forums > Using Code::Blocks
Debugging and wxWidgets
mmccarty12:
I have been having a problem for some time when I am trying to debug my wxWidgets projects. When I attempt to view the value of a wxWidgets object, many will give a message saying it is undefined in this context, although I am in the function that uses/defines the object. And when I comes to wxStrings, regardless of what is actually in the variable, when I try to output the value in the watch window all I get is "" for the value.
Any suggestions?
wxWidgets 2.9.0 - Mono-Shared-Debug-OpenGL-Unicode-GTK
wxWidgets 2.9.0 - Mono-Static-OpenGL-Unicode-GTK
C::B SVN 6178.
CentOS 5.4
oBFusCATed:
Can you try wx2.8.x? What is your gdb, can your try a newer nightly...
Does the watch variables work for the other types (your own for example)?
mmccarty12:
--- Quote from: oBFusCATed on May 26, 2010, 07:05:22 pm ---Can you try wx2.8.x?
--- End quote ---
I have using 2.8.9 and 2.8.10 and the same situation comes up when using unicode/non-unicode, debug/release, shared/static. Or any combination of the above.
--- Quote from: oBFusCATed on May 26, 2010, 07:05:22 pm ---What is your gdb,
--- End quote ---
GNU gdb Fedora (6.8-37.el5)
--- Quote from: oBFusCATed on May 26, 2010, 07:05:22 pm ---can your try a newer nightly...
--- End quote ---
This is the umpteenth version of C::B I have run. I have another C::B running on a Suse machine that is RC8.02 and the same problems occur.
--- Quote from: oBFusCATed on May 26, 2010, 07:05:22 pm ---Does the watch variables work for the other types (your own for example)?
--- End quote ---
Yes, even wxWidgets objects like events show properly, until it gets to showing the string values.
Like I said, many, but not all, of the objects do not display properly in the watch window.
One of my concerns is why.
oBFusCATed:
Another thing you can do is to try gdb from the command line... or DDD, kdbg or something similar.
You can inspect the debuggers log for some problems ( settings -> compiler & debugger -> debugger -> show debugger's debug log)
Pecan:
I can also confirm these problems with:
Windows7
wxWidgets 2.8.10,
gcc 4.3.1 Windows/unicode
GNU gdb 6.7.50 & 7.1
On occasion, examining a local wxString will cause gdb to crash.
Navigation
[0] Message Index
[#] Next page
Go to full version