[Lldb-commits] [lldb] r145564 - /lldb/trunk/source/Expression/DWARFExpression.cpp

Greg Clayton gclayton at apple.com
Wed Nov 30 20:06:15 PST 2011


Author: gclayton
Date: Wed Nov 30 22:06:15 2011
New Revision: 145564

URL: http://llvm.org/viewvc/llvm-project?rev=145564&view=rev
Log:
<rdar://problem/10507811>

Avoid a crash for the new DW_OP_stack_value and DW_OP_implicit_value opcodes
that was due to an assertion.


Modified:
    lldb/trunk/source/Expression/DWARFExpression.cpp

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=145564&r1=145563&r2=145564&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Wed Nov 30 22:06:15 2011
@@ -905,6 +905,7 @@
         case DW_OP_push_object_address: // 0x97 DWARF3
         case DW_OP_form_tls_address:    // 0x9b DWARF3
         case DW_OP_call_frame_cfa:      // 0x9c DWARF3
+        case DW_OP_stack_value: // 0x9f DWARF4
             return 0; 
 
         // Opcodes with a single 1 byte arguments
@@ -976,12 +977,20 @@
             data.Skip_LEB128(&offset); 
             return offset - data_offset;   
             
-        // All opcodes that have a 2 ULEB (signed or unsigned) arguments
+            // All opcodes that have a 2 ULEB (signed or unsigned) arguments
         case DW_OP_bregx:       // 0x92 2 ULEB128 register followed by SLEB128 offset
         case DW_OP_bit_piece:   // 0x9d ULEB128 bit size, ULEB128 bit offset (DWARF3);
             data.Skip_LEB128(&offset); 
             data.Skip_LEB128(&offset); 
             return offset - data_offset;   
+
+        case DW_OP_implicit_value: // 0x9e ULEB128 size followed by block of that size (DWARF4)
+            {
+                uint64_t block_len = data.Skip_LEB128(&offset); 
+                offset += block_len;
+                return offset - data_offset;   
+            }
+            
         default:
         {
             Host::SetCrashDescriptionWithFormat ("Unhandled DW_OP_XXX opcode: %d, add support for it.", op);





More information about the lldb-commits mailing list