Author Topic: watching wxString  (Read 7657 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5496
watching wxString
« on: January 10, 2006, 08:49:55 pm »
In older svn builds I was able to see the value of wxString variables in the debugger/watches, I could see the content of the m_pchData, but now nothing is visible anymore ? Might this be a unicode effect ??

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: watching wxString
« Reply #1 on: January 10, 2006, 08:53:43 pm »
Might this be a unicode effect ??

Exactly.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5496
Re: watching wxString
« Reply #2 on: January 10, 2006, 09:07:25 pm »
any solution in the pipeline ?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: watching wxString
« Reply #3 on: January 10, 2006, 09:17:48 pm »
any solution in the pipeline ?

Not yet but I 'm looking for one...
Be patient!
This bug will be fixed soon...

grv575

  • Guest
Re: watching wxString
« Reply #4 on: January 11, 2006, 01:50:11 am »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: watching wxString
« Reply #5 on: January 11, 2006, 09:13:42 am »
x /nhc displays only a character. I 'm searching for a solution for strings...
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: watching wxString
« Reply #6 on: January 11, 2006, 11:06:20 am »
x /nhc displays only a character. I 'm searching for a solution for strings...
This could help?

Michael

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: watching wxString
« Reply #7 on: January 11, 2006, 11:17:19 am »
Thanks for the link Michael, but it assumes that you have in *your* executable a couple of convenient functions. We want C::B to handle this automatically though.

But I 've found a workaround already. Testing its last bits now and committing soon :)
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: watching wxString
« Reply #8 on: January 11, 2006, 11:27:04 am »
We want C::B to handle this automatically though.

Yes, I agree. Automatically would be preferably.

But I 've found a workaround already. Testing its last bits now and committing soon :)

Great :D.

Afer this document:

Quote
More work inside GDB is needed to support multi-byte or variable-width character encodings, like the UTF-8 and UCS-2 encodings of Unicode.

I can just hope that this work will be done in a not-so-far future :).

Michael

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: watching wxString
« Reply #9 on: January 11, 2006, 12:15:13 pm »
Quote
Yes, I agree. Automatically would be preferably.

Hehe, we 're only aiming for the best ;)

OK committed.
Notes:
  • New watch format defined: wxString
  • Automatically recognizes watched variable's type and sets its format to wxString if appropriate. This means the user is required to do nothing. Just watch his wxString variable ;)
  • Haven't tested with ANSI wxString. Could someone using the ANSI C::B test it?
  • It doesn't work inside "Local variables" and "Function arguments" automatic watches. Only in user-added watches (no big deal, is it?).

:lol:

[attachment deleted by admin]
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5496
Re: watching wxString
« Reply #10 on: January 11, 2006, 03:12:25 pm »
Quote
It doesn't work inside "Local variables" and "Function arguments" automatic watches. Only in

Is it a big job to get it also working in those cases ?
Well for the moment we'll just add them manually (manual automatically ;-) )

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: watching wxString
« Reply #11 on: January 11, 2006, 03:48:47 pm »
Is it a big job to get it also working in those cases ?

If it was easy I would have done it already.
On the other hand, I implemented it for tooltip evaluation too :)
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: watching wxString
« Reply #12 on: January 17, 2006, 05:12:23 pm »
Yeah but what happens to wxStrings in the locals? I need to add the watch AGAIN, even if the variable (now useless) remains in the locals.