This is the mail archive of the gcc-patches@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]

Re: [PATCH] Force DW_CFA_def_cfa after DW_CFA_def_cfa_expression if no longer indirect


On Mon, Apr 26, 2010 at 10:52:46AM -0700, Roland McGrath wrote:
> > So, all DW_CFA_def_cfa_expression expressions GCC ATM generates
> > should look like:
> > DW_OP_bregREG <base_offset> DW_OP_deref
> > DW_OP_bregx <reg> <base_offset> DW_OP_deref
> > DW_OP_bregREG <base_offset> DW_OP_deref DW_OP_plus_uconst <offset>
> > DW_OP_bregx <reg> <base_offset> DW_OP_deref DW_OP_plus_uconst <offset>
> 
> Yes, I followed that much in the code.
> 
> > If GCC generated DW_CFA_def_cfa_expression is followed by GCC generated
> > DW_CFA_def_cfa_offset{,_sf}, then the assumed register that is
> > meant to be current is the REG/<reg> from those expressions.
> > If DW_CFA_def_cfa_register follows that DW_CFA_def_cfa_expression,
> > then offset is assumed to be 0 for the first two expressions and
> > <offset> for the last two.
> 
> I'm afraid I am still not entirely clear from this explanation, sorry.

For
DW_OP_def_cfa 4 16
DW_OP_def_cfa_expression DW_OP_breg3 32 DW_OP_deref
DW_OP_def_cfa_register 5
GCC producer assumes DW_OP_def_cfa 5 0, libgcc unwinder assumes DW_OP_def_cfa 5 16.
For
DW_OP_def_cfa 4 16
DW_OP_def_cfa_expression DW_OP_breg3 32 DW_OP_deref
DW_OP_def_cfa_offset 64
GCC producer assumes DW_OP_def_cfa 3 64, libgcc unwinder assumes DW_OP_def_cfa 4 64.
For
DW_OP_def_cfa 4 16
DW_OP_def_cfa_expression DW_OP_bregx 3 32 DW_OP_deref DW_OP_plus_uconst 96
DW_OP_def_cfa_register 5
GCC producer assumes DW_OP_def_cfa 5 96, libgcc unwinder assumes DW_OP_def_cfa 5 16.
For
DW_OP_def_cfa 4 16
DW_OP_def_cfa_expression DW_OP_bregx 3 32 DW_OP_deref DW_OP_plus_uconst 96
DW_OP_def_cfa_offset 64
GCC producer assumes DW_OP_def_cfa 3 64, libgcc unwinder assumes DW_OP_def_cfa 4 64.

	Jakub


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