I'm trying to run down some of the crashes in the RC3 wxKeybinder code.
In the following example (at bottom) GDB refuses to "p (wxMenuItem) *m_pItem" even though it knows about the structure.
How can I dump the object of "m_pItem->".
I've read the G*#!@D#!@B documentation twice. GDB can be so frustrating
at times.
(gdb) frame 2
#2 0x0044d5c6 in wxMenuCmd::Update (this=0x1e3e798)
at src/wxKeyBinder/src/menuutils.cpp:78
78 strText = m_pItem->GetText();
Current language: auto; currently c++
(gdb) l
73 //Pecan 01
74 // CodeBlocks contains filenames in menuitems
75 // which contain "\\" that look like accelerators
76 // and hotkeys that crash GetLabel()
77 wxString strText("");
78 strText = m_pItem->GetText();
79 if (strText.Contains(_T("\\\\")))
80 return ;
81
82 wxString str = m_pItem->GetLabel();
(gdb) p this
$1 = (wxMenuCmd * const) 0x1e3e798
(gdb) p *this
$2 = {<wxCmd> = {_vptr$wxCmd = 0x4b32ac, m_keyShortcut = {{
_vptr$wxKeyBind = 0x4b3294, m_nFlags = -1, m_nKeyCode = -1}, {
_vptr$wxKeyBind = 0x4b3294, m_nFlags = -1, m_nKeyCode = -1}, {
_vptr$wxKeyBind = 0x4b3294, m_nFlags = -1, m_nKeyCode = -1}},
m_nShortcuts = 0, m_strName = {<wxStringBase> = {static npos = 4294967295,
m_pchData = 0x1e3518c "1 CodeBlocks-NewBuild.cbp"}, <No data fields>},
m_strDescription = {<wxStringBase> = {static npos = 4294967295,
m_pchData = 0x104cfbcc ""}, <No data fields>}, m_nId = 520,
static m_arrCmdType = 0x4b5d00, static m_nCmdTypes = 1},
m_pItem = 0x16eca88, static m_pMenuBar = 0x165b008}
(gdb) p m_pItem
$3 = (struct wxMenuItem *) 0x16eca88
(gdb) p *m_pItem
$4 = <incomplete type>
(gdb) p (wxMenuItem) *m_pItem
No symbol "wxMenuItem" in current context.
(gdb) p (wxMenuItem) *0x16eca88
No symbol "wxMenuItem" in current context.
(gdb)
thanks
Pecan