pointer address of fn arg not updated in debugger
Posted: Thu Mar 07, 2013 1:50 am
When the address of a pointer function argument is updated, this is fact not reflected in the debugger.
Code example:
When you step through this code, you'll see that the address of arg1 is not updated in the locals panel, or the debugger popup.
Code example:
Code: Select all
void test1(int *arg1)
{
arg1 = 200;
return;
}
int main(int argc, char **argv)
{
int *p_var1 = (int *)malloc(sizeof(int));
test1(p_var1);
return 0;
}