Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Request feature to watch non-ASCII characters in wxString during debugging

(1/2) > >>

Utensil:
Hi!

It seems some further customization on the debugging script is needed, to make it possible to watch non-ASCII characters in unicode wxString in a huamn-readable way during debugging.

First, some links of related topics:

Custom Watch Script Pluggins  http://forums.codeblocks.org/index.php/topic,2097.0.html

Can't see value of unicode strings while debugging http://forums.codeblocks.org/index.php/topic,6587.15.html

The discussion about this in wxForum(I am the Utensil in the thread) http://wxforum.shadonet.com/viewtopic.php?t=18136&highlight=

I've read the topics and tried every way mentioned in them, I can watch ASCII characters in Unicode wxString, but I just can't watch non-ASCII characters, say, Chinese characters.

Then I tried to figure out why, I learned how the script works:

The function Evaluate_wxString returns a string which includes a gdb command, and make gdb to access to the corresponding memory and retrieve the characters, and output it.

The function Parse_wxString parses the output of gdb, and change it into a human-readable way.

At the beginning, I thought it's possible to let gdb output unicode characters, and found out that it doesn't support Unicdoe so far(see the thread in wxForum for details).

Then, I tried to hack it through Squirrel, but too few wxString functions has it binded.

An ugly way to watch it, is to make Evaluate_wxString return a calling command:


--- Code: ---local msg = _T("call wxMessageBox(") + a_str + _T(",") + a_str + _T(",4,0)");

return msg;
--- End code ---

It pops out a messagebox showing the wxString.

I do have a better idea, but it needs further support from Squirrel:

1) Let Evaluate_wxString make gdb output the characters in hexical format.
2) Use something like "\uxxxx" in C, to regenerate the unicode characters in a wxString, and let Parse_wxString return it, so Code::Blocks can show them in the right way...

The typeless and pointerless Squirrel seems not suit this job......

Any idea for a permanent solution?

Regards,

Utensil

Utensil:
So there's nobody who has any comments on this? This thread is posted for a long time... :(
Any responce or idea or experience share will be greatly appreciated...

-Utensil

mandrav:

--- Quote ---Any idea for a permanent solution?
--- End quote ---

You have to be patient and wait. The debugger plugin is being mildly refactored (in my local copy) to address these as well as some other issues.

Utensil:
Hi mandrav,


--- Quote from: mandrav on April 18, 2008, 08:38:38 am ---
You have to be patient and wait. The debugger plugin is being mildly refactored (in my local copy) to address these as well as some other issues.

--- End quote ---

Thanks for the rapid reply! Just knowing that this feature is work-in-progress, I'll be very gratified :D I asked it just for other C::B users hoping this feature request is noted by the developers of C::B.

I'm just a fan of C::B, in the great suprise and adoration of the versatility and completeness of C::B. And it's my pleasure to meet you, a project leader of C::B  :P

Just two more questions, can you give me an approximate estimation of the commit time of this part of patch( months is also OK for me)? And is there any related discussions on this forum that I didn't noticed?

Regards,

Utensil

mandrav:

--- Quote from: Utensil on April 18, 2008, 09:46:28 am ---Just two more questions, can you give me an approximate estimation of the commit time of this part of patch( months is also OK for me)? And is there any related discussions on this forum that I didn't noticed?

--- End quote ---

No, I started working on it before the 8.02 release but still haven't finished due to lack of time. That's why I also can't give an estimate: it really depends on the free time I manage to find. It could be finished in few days or few months. Really can't say atm...

Navigation

[0] Message Index

[#] Next page

Go to full version