[Lldb-commits] [lldb] r187449 - Add a default case to the LLVM expression opcode switch statement

Daniel Malea daniel.malea at intel.com
Tue Jul 30 14:26:24 PDT 2013


Author: dmalea
Date: Tue Jul 30 16:26:24 2013
New Revision: 187449

URL: http://llvm.org/viewvc/llvm-project?rev=187449&view=rev
Log:
Add a default case to the LLVM expression opcode switch statement
- better than failing silently next time the DWARF standard introduces new opcodes!


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=187449&r1=187448&r2=187449&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Tue Jul 30 16:26:24 2013
@@ -11,6 +11,8 @@
 
 #include <vector>
 
+#include "llvm/Support/ErrorHandling.h"
+
 #include "lldb/Core/DataEncoder.h"
 #include "lldb/Core/dwarf.h"
 #include "lldb/Core/Log.h"
@@ -2659,6 +2661,8 @@ DWARFExpression::Evaluate
                 return false;
             }
             break;
+        default:
+            llvm::report_fatal_error("Unhandled DWARF expression opcode! Please file a bug at llvm.org/bugs and attach the binary you were debugging.");
         }
     }
 





More information about the lldb-commits mailing list