[Dwarf-Discuss] how to find local variable stored in register

Michael Eager eager@eagercon.com
Wed Feb 6 06:41:34 GMT 2008

Neeraj kushwaha wrote:
> Hi,
> Continuing on this..
> How GDB finds the value of variable which are stored in register for
> each function stack frame?

I'm not sure what you are asking.  If the debugger is stopped within
a function, the current target register contains the variable. DWARF
CFI provides information about where registers are stored in a call

> As GDB uses dwarf debug info internally and is capable of finding them.

As you've seen, the DWARF location list specifies where each
variable is allocated.

Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

More information about the Dwarf-discuss mailing list