Reputation: 1479
I know that it is possible to output the names of all global and static variables (and their size in case of static arrays) using the command info variables
in gdb.
I also know that the address of a variable can be displayed using info address
.
Is it possible to display a list of all addresses at which variables are stored? This could be used for example to know which array is stored in memory just before a corrupted array.
Upvotes: 0
Views: 468
Reputation: 9476
For globals you don't need gdb for this.
Just to nm -n yourbinary.
Upvotes: 1