[Lldb-commits] [Bug 8188] New: DW_CFA_same_value unsupported

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 20 03:43:24 PDT 2010


           Summary: DW_CFA_same_value unsupported
           Product: lldb
           Version: unspecified
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: lldb-commits at cs.uiuc.edu
        ReportedBy: vyacheslav.p.zakharin at intel.com


There is a bug in the way you handle DW_CFA_same_value in

A compiler may save a non-volatile register into memory and then restore it
from there. In this case there will be two DWARF directives:
DW_CFA_expression <representing save of the register into memory>
DW_CFA_same_value <representing reload of the register from memory>

Now assume that the code was rearranged in the following way:
 <entry to a routine: implies CFA setup>
 if (<something>) goto call_throw;
 <save of the register: implies DW_CFA_expression>
 <return from the routine: implies restore of the register, this

Consider the case where <something> is true, so we jump to the throw point
right after CFA allocation. According to the unwinding procedure we have to
read all DWARF directives up to the point where an exception occurs. When we
come to the throw point during the unwinding procedure we think that the
register is located in memory (since DW_CFA_same_value is ignored) and try to
restore it from where. The result is a bunch of junk in the register.

There used to be the same bug in GCC, but it has been fixed since 4.0.0. Please
consider fixing it in your product.

Thank you,

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the lldb-commits mailing list