News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Debugging QString

Started by LordCB, September 14, 2009, 03:19:48 PM

Previous topic - Next topic

LordCB

@ jens:

Do you mean like this :

source: X:\CODEBLOCKS\CB_DebuggerScripts\qstring.script


under Debugger initialization command

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

LordCB

#17
Ok I have done it and now my question.

What changes?
What do I expect during debugging a QString or where I have to look at the content of the string, cause now I see nothing else than a adress to the string like 0x7c9291d5 this one

[attachment deleted by admin]

LordCB

This are my settings

[attachment deleted by admin]

oBFusCATed

Where you see "command:" type "printqstring strstr" and hit enter :)
Also you can add some logging commands to your Evaluate_QString and Parse_QString functions.
Unfortunately this is the only way to debug it...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

LordCB

Thanks but I get an



Undefined command: "printqstring".  Try "help".
Undefined command: "printqstring".  Try "help".

oBFusCATed

The source command has failed...
Try to execute it from the command field, try different paths. Spaces in the path may cause problems (just a suggestion)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Jenna

if you really use "source:" as posted before, that's the cause.
No colon after the post (except for the one in the drive letter).

LordCB

Ok,

now I get this.


Attempt to extract a component of a value that is not a structure.

oBFusCATed

I think this's a gdb problem cause by the use of "source stl-views-1.0.3.script".
In the wxpropgrid_debugger branch I've implemented a workaround by calling "whatis &{watched_var}" instead of "whatis {watched_var}", when the plugin wants to understand the type of the watched variable.

The same problem happens when one tries to watch "const wxString &str"...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

LordCB

I really do not want to annoy you, but what does that mean now

oBFusCATed

The only way to workaround the problem is to delete the stl-views-1.0.3.script file.
Or you could try the new wxpropgrid_debugger branch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

LordCB

Ok, I have now a rudimentary. Using gdb 6.3 it works with gdb 6.8 not.
Observed for all who try it again  :)

one more thing I enable the option "Evaluate expression under cursor".

When I go over a qstring it popups a big popmenu with this content

> output &strtrtr
(QString *) 0x22b78c>>>>>>cb_gdb:
> output strtrtr
{
  static null = {<No data fields>},
  static shared_null = {
    ref = {
      _q_value = 2148
    },
    alloc = 0,
    size = 0,
    data = 0x10203122,
    clean = 0,
    simpletext = 0,
    righttoleft = 0,
    asciiCache = 0,
    capacity = 0,
    reserved = 0,
    array = {0}
  },
  static shared_empty = {
    ref = {
      _q_value = 2
    },
    alloc = 0,
    size = 0,
    data = 0x10203136,
    clean = 0,
    simpletext = 0,
    righttoleft = 0,
    asciiCache = 0,
    capacity = 0,
    reserved = 0,
    array = {0}
  },
  d = 0x77e1da8,
  static codecForCStrings = 0x0
}>>>>>>cb_gdb:
down to the border of my screen.
Is it possible to make it scrollable or adjustable....

oBFusCATed

The scripts are not run for the "Evaluate expression under cursor"
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

LordCB

Ok but for int it is very nice. Isn“t it?

What about scrollability from those tooltips