NO

Author Topic: debug step into/over  (Read 3661 times)

dsula

  • Guest
debug step into/over
« on: November 29, 2005, 11:09:52 PM »
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

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: debug step into/over
« Reply #1 on: December 02, 2005, 07:18:21 AM »
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

  • Guest
Re: debug step into/over
« Reply #2 on: March 27, 2007, 11:24:05 PM »

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