This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: translate PC to statement
Ramana,
On Thu, 26 Aug 2004 Ramana Radhakrishnan wrote :
> > I am particularly interested in known what's the variable
> > the instruction is accessing. I Imagine that information can be obtained
> > statically, without need of a live frame, since the instruction is always
> > accessing some variable encoded in some source code statements.
>
> Yes that information can certainly be obtained statically using a dwarf
> dump utility.
After some extra work, I have got gcc-3.3.2 to generate dwarf information
for my binary. However, I could not find instructions on how to statically
get the variable an instruction is accessing. Like before I could use gdb
to get a line number for a given VPC of an instruction. But I don't know what
options to use to query dwarfdump to get this information.
Am I missing something here? Again, your help is greatly appreciated.
> In any case if you are looking at only tracking a fixed number of
> variables changing maybe you could use watchpoints to do that ?
Again, I am stuck to static analysis. I can't stop the program at specific
PC and query the variable.
-Min