User forums > Using Code::Blocks

Debugger: GDB Parsing error

(1/3) > >>

BlueHazzard:
Hi, i try to debug some wxWidgets code and get a parsing error.
Debugger output:

--- Code: ---[debug]> output *str
[debug]{<wxStringBase> = {static npos = 4294967295, m_pchData = 0x75225a4 L'/' <repeats 43 times>, "\\n//\\n", '/' <repeats 43 times>}, <No data fields>}>>>>>>cb_gdb:

--- End code ---

as output in the watch window i get:

--- Code: ---*str                          | Parsing GDB output failed for '*str'!
 + <wxStringBase>   |
      npos                   | 4294967295

--- End code ---

greetings

ollydbg:
If you use the GDB pretty printer for wx, it will just print the string content.It is just an workaround of this issue.

oBFusCATed:
Thanks I'll look at it.

BlueHazzard:
minimal example to reproduce:

--- Code: ---wxString tmp = _T("///////////////////////////////\\n// \\n/////////////////////////");

--- End code ---
just watch tmp and you will get the error described above.


--- Quote from: ollydbg on January 28, 2016, 01:32:58 am ---If you use the GDB pretty printer for wx, it will just print the string content.It is just an workaround of this issue.

--- End quote ---
I don't know why, but my pretty printers are not working... I think i have messed somehow wx2.9(3.0) printers and wx2.8 printers. They are registered, but not working

--- Code: ---class wxStringPrinter:
    def __init__(self, val):
        self.val = val

    def to_string(self):
        try:
            return self.val['m_pchData']
        except:
            return self.val['m_impl']['_M_dataplus']['_M_p']

    def display_hint(self):
        return 'string'

--- End code ---

greetings

MortenMacFly:

--- Quote from: oBFusCATed on January 28, 2016, 09:24:19 am ---Thanks I'll look at it.

--- End quote ---
IMHO this is different depending on whether you are targeting wx30 or wx28... So please be careful not to break the other version.

Navigation

[0] Message Index

[#] Next page

Go to full version