lets say I have a program resembling:
And I am trying to debug this with GDB, how could I view the variableCode:#include <stdio.h> struct blah { int id; char* user; }; int main() { struct blah mystrct; mystrct.id = 1; mystrct.user = "hi there\n"; fprintf(stdout,mystrct.user); return 0; }
mystrct.user or mystrc.id
assuming I have a breakpoint at fprintf.
when typing print mystrct or mystrct.user it says cannot view struct objects or something.
Would I have to pick apart the stack?
-LC