User forums > Using Code::Blocks

Debugger: GDB Parsing error

<< < (2/3) > >>

oBFusCATed:
Don't worry. The fix should be version agnostic.

oBFusCATed:
Fixed in svn.

ollydbg:
This is what I used pretty printer for wxString:

--- Code: ---class wxStringPrinter:

    def __init__(self, val):
        self.val = val

    def to_string(self):
        ret = ""
        wx29 = 0
        try:
            # wx-28 has m_pchData
            self.val['m_pchData']
        except Exception:
            wx29 = 1

        try:
            if wx29:
                # return "wx29+ string"
                dataAsCharPointer = self.val['m_impl']['_M_dataplus']['_M_p']
            else:
                dataAsCharPointer = self.val['m_pchData']
                # return "wx28 string"
            ret = dataAsCharPointer
        except Exception:
            # swallow the exception and return empty string
            pass
        return ret

    def display_hint (self):
        return 'wxString'

--- End code ---

It works fine for both wx 2.8 and wx 3.x. :)

BlueHazzard:
strangely this is not working for me....

anyway if i find time i will investigate, i think the whole python stuff does not work here (if i add a print command in the scripts it gets printed, so the interpreter is working)

oBFusCATed:
Have my fix eradicated the parsing error?
For the printers are you sure you've disabled the watch scripts in the debugger settings?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version