This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
translate PC to statement
- From: "Min Xu (Hsu)" <xu at cs dot wisc dot edu>
- To: gdb at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 12:10:01 -0500
- Subject: translate PC to statement
- Organization: University of Wisconsin - Madison
- Reply-to: xu at cs dot wisc dot edu
Hi There,
Sorry if this is a stupid question, but I couldn't find answer using
either google or gdb manual.
Basically I want to know what part of a source code statement produced a
instruction in the final binary. I have used "info line *(pc)" command,
which gives me pretty good information on what line produced the PC.
However, I wanted more information than just the source line. I compiled
my program with -g. I wonder if this information is kept in the debug
information? How can I query it? It would be nice if I can obtain some
information such as why a given instruction is generated from a source
line. This is some times not obvious at all. For example, I often get a
instruction that map back to a source line that has only a "{"!
I'd really appreciate your help.
-Min
--
Rong: Life is all about running after a busy agenda! How frustrating!
Min: That's right! You can either deal with things as quickly as possible or to create less items on the agenda to begin with.