<rdar://problem/10507811>
Be better at detecting when DWARF changes and handle this more
gracefully than asserting and exiting.
Also fixed up a bunch of system calls that weren't properly checking
for EINTR.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147559 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/DWARFExpression.cpp b/source/Expression/DWARFExpression.cpp
index 6ce8201..3555c41 100644
--- a/source/Expression/DWARFExpression.cpp
+++ b/source/Expression/DWARFExpression.cpp
@@ -992,18 +992,15 @@
}
default:
- {
- Host::SetCrashDescriptionWithFormat ("Unhandled DW_OP_XXX opcode: %d, add support for it.", op);
- assert (!"Unhandled DW_OP_XXX opcode - look for actual value in Crash Description string.");
- }
- break;
+ break;
}
return UINT32_MAX;
}
bool
-DWARFExpression::LocationContains_DW_OP_addr (lldb::addr_t file_addr) const
+DWARFExpression::LocationContains_DW_OP_addr (lldb::addr_t file_addr, bool &error) const
{
+ error = false;
if (IsLocationList())
return false;
uint32_t offset = 0;
@@ -1023,7 +1020,10 @@
{
const uint32_t op_arg_size = GetOpcodeDataSize (m_data, offset, op);
if (op_arg_size == UINT32_MAX)
+ {
+ error = true;
break;
+ }
offset += op_arg_size;
}
}