Finding address of a local variable in C with GDB

c, gdb

Solution

Finding address is as simple as:

p &age

Problem

Say I have some C code which goes along the lines of: ``` void fun_1(unsigned int *age) ``` [...] ``` int main() { unsigned int age[24]; } ``` In GDB, how can I find the address of age?

Original source

Related problems