This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question about '.debug_frame' section.
- From: "Tatsuhiko Matsukawa" <KFC00725 at nifty dot ne dot jp>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 20 Dec 2001 00:59:37 +0900
- Subject: Question about '.debug_frame' section.
- Disposition-notification-to: "Tatsuhiko Matsukawa" <KFC00725@nifty.ne.jp>
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)