mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
Diagnose unhandled cases in DW_OP_deref
This commit is contained in:
parent
b4993cf54d
commit
585e7a359d
@ -1100,7 +1100,9 @@ bool DWARFExpression::Evaluate(
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
if (error_ptr)
|
||||
error_ptr->SetErrorString("Unhandled value type for DW_OP_deref.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
} break;
|
||||
|
@ -276,3 +276,7 @@ TEST(DWARFExpression, DW_OP_unknown) {
|
||||
llvm::FailedWithMessage(
|
||||
"Unhandled opcode DW_OP_unknown_ff in DWARFExpression"));
|
||||
}
|
||||
|
||||
TEST(DWARFExpression, DW_OP_deref) {
|
||||
EXPECT_THAT_EXPECTED(Evaluate({DW_OP_lit0, DW_OP_deref}), llvm::Failed());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user