While you debugging your application you likely want to change behavior a bit.
With gdb you can change values of the variables with set command:
(gdb) whatis a type = intBy variable name
(gdb) p a $1 = 5 (gdb) set var a = 10 (gdb) p a $2 = 10By variable address
(gdb) p a $2 = 10 (gdb) p &a $3 = (int *) 0xbff5ada0 (gdb) set {int}0xbff5ada0 = 15 (gdb) p a $4 = 15
No comments:
Post a Comment