Mandrav,
Thanks very much for your useful feedback.
I did not see a remark about the dependency on wxWidgets libraries in earlier threads.
- is the wxWidgets library used relevant (I’m currently using a static debug library: libwxmsw28ud.a)?
Yes. The linker strips code you never use from static libraries. In this case, wxString::c_str() is needed which you obviously don't use directly in your code (and so is being stripped off the resulting binary).
Evaluating wxStrings works fine with dll-based wx configurations because the aforementioned stripping does not take place.
Considering your remark above, can I translate this into a "general guideline" for wxWidgets debugging (gdb) within the CodeBlocks environment?
"For debugging it is strongly advised to use a Shared Debug version of wxWidgets library"
I can't recall having seen such a "guideline" in earlier readings.
In case the "guideline" above is valid then it might be useful (for other users) to document this guideline somewhere, for instance in:
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks Ramazan Kartal,
I tried your suggestion and modified the "gdb_types.script" file.
I can confirm that changing the script-file has an influence on the behavior of wxString debugging within the CodeBlocks environment (with static wxWidgets debug library).
- It does not change the behavior of the "evaluate expression under cursor" CodeBlocks feature.
- It does change the behavior of a wxString variable added to the "Watch" window. If I select "Edit Watch" in the "right-click" pop-up menu of the Watch window and if I set the "Count" property to a non-zero value (even without the "watch as array" checkbox checked) I can recognize (part of) the actual string value during debugging.
Regards, Marlo