This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Question about '.debug_frame' section.


I'm now developing a debugger(not GDB) for embeded controller which is 
 supported by GCC. I am troubled by the interpretation of '.debug_frame'
 section of DWARF2 debugging information. Please help me.


[Question]

When I calculate the 'current CFA' from 'DW_CFA_def_cfa' or
 'DW_CFA_def_cfa_offset' in '.debug_frame' section, Must I multiply the
 'offset' operand of 'DW_CFA_def_cfa'/'DW_CFA_def_cfa_offset' by
 'data_alignment_factor' in CIE, or must not ?


[Circumstances]

Chapter 6.4.2 'Call Frame Instructions' in 'DWARF Debugging Information
 Format Revision2.0.0' has not described this point. But there is the
 following description on page 101 in 'DWARF Debugging Information
 Format Revision2.0.0'.
--------------------------------------------------------
   fde+17 DW_CFA_def_cfa_offset(<fsize>/4) ; assuming <fsize> < 512
--------------------------------------------------------
( 4 is 'data_alignment_factor' in this example)
>From this, I thought that it is necessary to multiply 'offset' by
 'data_alignment_factor'.

But I can't unwind correctly, with using the output of GCC, if
 I multiply 'offset' by 'data_alignment_factor'. However, I can
 unwind correctly if I do NOT multiply.


Which is right? 'DWARF Debugging Information Format Revision2.0.0'
 or the output of GCC? or my misapprehension?

Thank you in advance.

     Tatsuhiko Matsukawa
     (kfc00725@nifty.ne.jp)



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