Okay, I am able to get variables in the watches window now.
(1) Complaint #1:
class dvec
{
double *data;
int size;
...
};
Is it possible to see the contents of data? I am able to see only the address. Clicking on the "raw data" button gives gives me only the address again. All choices in the context menu are grayed, both in the watches window and in the raw data window. No chance to see *data as an array of doubles. No chance, really?
Complaint #2:
Okay, dvec is not as stupid as it seems to be and it can use user supplied buffer as its data. This could provide the values, at least for now, because the array of doubles can be dereferenced. Tracing though the testing program again, something seems to be wrong. Tracing once more and more carefully:
dvec rv;
...
bool bb = rv.alloc(5);
Returns true. Strange. Okay, I know the address of rv. Tracing into alloc(),
this should be the same address
but it is not, at least in the watches window. The dvec allocates correctly, sets its size but, on return,
the size of rv is wrong in the watches window as well as the buffer address. Note: I have reloaded rv into the watches, so that it is not a problem of oudated data in the window.
Being completely desperate, I wrote a dump() routine:
void dump( const dvec& vec )
{
double *d = vec.data();
printf("%5.1f %5.1f %5.1f %5.1f %5.1f\n",d[0],d[1],d[2],d[3],d[4]);
}
I inserted dump() into the code and traced again.
The output is as expected and it is correct so that this is not a gdb problem. Aye, aye, what I am doing wrong now? Debian, Gnome, svn 7932.