This is the mail archive of the
mailing list for the GDB project.
Re: print implementation
- From: Wenbo Yang <wenbo dot yang at simplnano dot com>
- To: xu zhou <zhouxuzhu1985 at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 22 Mar 2007 17:15:32 +0800
- Subject: Re: print implementation
> Can anyone tell me how gdb find variable'value when user type the
> 'print' command? Thank you!
Simply, find the variable's address in memory via debugging information,
then visit the address. Mostly the local variable is fetched using this
method. But if you print some complex variables or variables that
located at other frames, thing will be extremely complicated as Jim
said. You'd better read the source code.
SimpLight Nanoelectronics Ltd.