This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

translate PC to statement


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]