When I debug the program in Ubuntu8.04 and codeblocks8.02?
I couldn't watch the memory's data?
eg:
the code is :
int main(int argc,char *argv[])
{
char *p;
char *q;
p = (char *)malloc(16*sizeof(char));
q = p;
if(p == NULL)
{
printf("calloc P is fail \n");
}
else
{
printf("calloc P is ok \n");
p = "12345";
free(q);
}
return 0;
}
question:
I want to see the data in the address of p point?
so I open the Memory dump, input the address of P(from the watch dialog). But i see nothing.
How should to debug ? and see the data in the memory?
Thank you for your help!