User forums > Nightly builds

The 15 August 2011 build (7386) DEBUGGER BRANCH version is out.

<< < (9/9)

ollydbg:

--- Quote from: Manolo on September 14, 2011, 10:43:53 am ---Hello
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:


--- Code: ---> whatis psty
type = wxString *
>>>>>>cb_gdb:
> output psty
(wxString *) 0x0>>>>>>cb_gdb:
> output /c psty->wx_str()[0]@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
>>>>>>cb_gdb:

--- End code ---

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?

Regards


--- End quote ---

I just test on gdb (the gdb build myself with python support, you can find download links in this forum), the log is below, it seems there is no crash.

--- Code: ---> p psty
$1 = (wxString *) 0x0
>>>>>>cb_gdb:
> whatis psty
type = wxString *
>>>>>>cb_gdb:
> output /c psty->m_pchData[0]@((wxStringData*)psty->m_pchData - 1)->nDataLength
Cannot access memory at address 0x0
>>>>>>cb_gdb:

--- End code ---

oBFusCATed:
The difference probably is that you're accessing a member, but Manalo is calling a function...

Navigation

[0] Message Index

[*] Previous page

Go to full version