On 02/16/2012 10:58 AM, Richard Sandiford wrote:
>> As a workaround for 4.7, you can try this hack:
>>
>>      .cfi_startproc simple
>>      .cfi_def_cfa    29, -1          # fake cfa one byte below sp
>>      .cfi_register   29, 29          # "save" sp in itself so we don't use 
>> the fake cfa
>>      move    $18,$31
>>      .cfi_register 31, 18
>>      ...
> 
> Ooh, nice (if that's the word).  It certainly fixes the testcase,
> although I had to use -4 rather than -1 in order to defeat
> DWARF2_CIE_DATA_ALIGNMENT.  That should still be OK, since the
> stack is 8-byte aligned.
> 
> GDB doesn't seem to be able to backtrace through this, but that
> has to come second to correctness.  I'll aim to get a tested fix
> in this weekend.

Hmm.  I wonder if GDB would be happier with a val_expression,
rather than the "odd" .cfi_register:

        // DW_CFA_val_expression r29, { DW_OP_reg29 }
        .cfi_escape     0x16,29,1,0x6d


r~

Reply via email to