debug-tips

Here are my tips one debugging C++, especially on GDB.

the -femit-class-debug-always gcc option for handling incomplete type issue when debugging

See those discussions: GDB can not show the type info of wxCommandEvent and Re: [solved] Creating a gdb Pretty-Printer for wxIPV4address When this option is added to the GCC compile option, and you link to the release version of a wxWidgets library, you will see the full content of a class such as wxAuiNotebookEvent, if this option is not used, you got gdb report incomplet type if you would like to see the content of the event variable.

image