User forums > Using Code::Blocks
Debugging wxString on Linux
(1/1)
cacb:
Apologise if this is a common question, but I have not found the answer.
I am running Code::Blocks svn 9854 built from Jens Lody's tarball. OS is Kubuntu 14.04
I am debugging a wxWidgets program with many wxString variables. In the Watches debugging window I am able to find the value of a wxString variable "name" only via
name
=> expand "m_impl"
=> expand "_M_dataplus"
the value i want is then in "_M_p"
This is cumbersome. Is there some way I can customise Code::Blocks or gdb to expand this more directly and naturally? Optimally, I want the string value to be shown in the second column, next to the variable name. I would prefer this to happen automatically.
Is there a way to do it?
oBFusCATed:
Yes, search for python pretty printers in the forum and in the internet...
Also check the repository of wxwigets for the appropriate scripts...
cacb:
--- Quote from: oBFusCATed on August 30, 2014, 01:01:43 am ---Yes, search for python pretty printers in the forum and in the internet...
Also check the repository of wxwigets for the appropriate scripts...
--- End quote ---
Thank you. Unfortunately I cannot figure it out. I sort of understand I need gdb with Python support, but I am at a loss to understand if my gdb 7.7 under Kubuntu 14.04 has what it takes. I also understand that "the appropriate script" must be put "somewhere" to make things work.
I wish it was simpler.
oBFusCATed:
--- Quote from: cacb on August 30, 2014, 05:42:37 pm ---I wish it was simpler.
--- End quote ---
It is not that complex and for wx3 it should work by default... as it should for the stl std::string for example.
The starting point is here: https://sourceware.org/gdb/current/onlinedocs/gdb/Pretty-Printing.html
cacb:
--- Quote from: oBFusCATed on August 30, 2014, 05:47:40 pm ---
--- Quote from: cacb on August 30, 2014, 05:42:37 pm ---I wish it was simpler.
--- End quote ---
It is not that complex and for wx3 it should work by default... as it should for the stl std::string for example.
The starting point is here: https://sourceware.org/gdb/current/onlinedocs/gdb/Pretty-Printing.html
--- End quote ---
Thank you again, I shall look that up! Btw. I am using wx3.0.1 and wxString debugging is NOT working by default here.
Navigation
[0] Message Index
Go to full version