I use MinGw/GDB. I'm getting this issue while debugging:
When the GDB just execute this line of code:
wxString *psty = (wxString*) NULL;
I put the mouse over 'psty' and a SIGSEGV is prompt:
> whatis psty
type = wxString *
> output psty
(wxString *) 0x0>>>>>>cb_gdb:
> output /c psty->wx_str()@psty->length()
The program being debugged was signaled while in a function called from GDB.
GDB has restored the context to what it was before the call.
To change this behavior use "set unwindonsignal off".
Evaluation of the expression containing the function
(wxString::wx_str() const) will be abandoned.
Program received signal SIGSEGV, Segmentation fault.
0x6fc611d6 in libstdc++-6!_ZNKSbIwSt11char_traitsIwESaIwEE5c_strEv () from c:\mingw\bin\libstdc++-6.dll
I'm also using the script I posted some days ago:http://forums.codeblocks.org/index.php/topic,15050.msg101768.html#msg101768
Of course, the problems arise because psty is not pointing to a valid wxString object.
What I ask here and myself is: How can C:B be aware of this before trying to output this invalid var?