Hi,
I am learning to use "info symbol <address>" in gdb. here is my code:
I stopped the running at B and then tried to test the using of "info symbol" with the variable tt:Code:#include <iostream> #include "functions.h" using namespace std; int main(){ int tt = 3; B =>cout << tt << endl; print_hello(); cout << endl; cout << "The factorial of 5 is " << factorial(5) << endl; return 0; }
Does someone know why it doesn't work?(gdb) info symbol &tt
No symbol matches &tt.
(gdb) p &tt
$9 = (int *) 0xbfbcbf9c
(gdb) info symbol 0xbfbcbf9c
No symbol matches 0xbfbcbf9c.
Thanks and regards!