News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

debug step into/over

Started by dsula, November 29, 2005, 11:09:52 PM

Previous topic - Next topic

dsula

Hi Pelle,

When hitting F10 (step over) on a function return statement, the program runs through. Hitting F11 (step into) on the return statement works correctly and takes me to the line following the function call.

Also pointers are never treated as pointers to arrays in the watch window.
Consider this:
int *x = malloc(10*sizeof(int));
The debugger never allows me to see the array. I understand you don't have any array size information and the debugger would need to provide some open ended scroll bars or somehting (or a dialog that lets you specify the limits)


Thanks and it's time for a beer now.
ds

Pelle

Quote from: "dsula"When hitting F10 (step over) on a function return statement, the program runs through. Hitting F11 (step into) on the return statement works correctly and takes me to the line following the function call.
Right. The current, simple, algorithm only works in the current function - it will not hunt for instructions outside it (through the stack).

Quote from: "dsula"
Also pointers are never treated as pointers to arrays in the watch window.
Consider this:
int *x = malloc(10*sizeof(int));
The debugger never allows me to see the array. I understand you don't have any array size information and the debugger would need to provide some open ended scroll bars or somehting (or a dialog that lets you specify the limits)
OK. I have to think about this...

Pelle
/Pelle

rcobb

Quote from: Pelle on December 02, 2005, 07:18:21 AM

Quote from: dsula
Also pointers are never treated as pointers to arrays in the watch window.
Consider this:
int *x = malloc(10*sizeof(int));
The debugger never allows me to see the array. I understand you don't have any array size information and the debugger would need to provide some open ended scroll bars or somehting (or a dialog that lets you specify the limits)
OK. I have to think about this...

Pelle

Howdy,

I came across this post while searching for a way to do that very thing (look at the elements of a dynamically allocated array).  I know it is far easier for me to wish for something than for you to do it, but I am another who would find this capability very useful.  I store a great deal of data in dynamic arrays, and when I have a problem it is there I often need to look.

Thanks!

Richard