@@ -2341,9 +2198,7 @@ bool DWARFExpression::Evaluate(
// the stack by the called expression may be used as return values by prior
// agreement between the calling and called expressions.
case DW_OP_call2:
- if (error_ptr)
-
@@ -1350,10 +1300,8 @@ bool DWARFExpression::Evaluate(
if (pick_idx < stack.size())
stack.push_back(stack[stack.size() - 1 - pick_idx]);
else {
-if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
- "Index %u out of range for
https://github.com/JDevlieghere closed
https://github.com/llvm/llvm-project/pull/94420
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/JDevlieghere updated
https://github.com/llvm/llvm-project/pull/94420
>From 22bb28a5e3fc84c75e1013c3b0c15654e7b786da Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere
Date: Tue, 4 Jun 2024 17:04:15 -0700
Subject: [PATCH 1/6] [Support] Add variadic createStringError overload
@@ -52,9 +52,10 @@ __attribute__((noinline)) void func4_amb(int , int x) {
//% expect_cmd_failure=True)
//% self.filecheck("expr sink", "main.cpp","-check-prefix=FUNC4-EXPR",
//% expect_cmd_failure=True)
- // FUNC4-EXPR-FAIL: couldn't get the value of variable
@@ -1350,10 +1300,8 @@ bool DWARFExpression::Evaluate(
if (pick_idx < stack.size())
stack.push_back(stack[stack.size() - 1 - pick_idx]);
else {
-if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
- "Index %u out of range for
https://github.com/adrian-prantl approved this pull request.
This is going to be great! Thanks.
Minor nitpicks inside.
https://github.com/llvm/llvm-project/pull/94420
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
@@ -2341,9 +2198,7 @@ bool DWARFExpression::Evaluate(
// the stack by the called expression may be used as return values by prior
// agreement between the calling and called expressions.
case DW_OP_call2:
- if (error_ptr)
-
@@ -1350,10 +1300,8 @@ bool DWARFExpression::Evaluate(
if (pick_idx < stack.size())
stack.push_back(stack[stack.size() - 1 - pick_idx]);
else {
-if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
- "Index %u out of range for
@@ -52,9 +52,10 @@ __attribute__((noinline)) void func4_amb(int , int x) {
//% expect_cmd_failure=True)
//% self.filecheck("expr sink", "main.cpp","-check-prefix=FUNC4-EXPR",
//% expect_cmd_failure=True)
- // FUNC4-EXPR-FAIL: couldn't get the value of variable
https://github.com/adrian-prantl edited
https://github.com/llvm/llvm-project/pull/94420
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/JDevlieghere updated
https://github.com/llvm/llvm-project/pull/94420
>From 22bb28a5e3fc84c75e1013c3b0c15654e7b786da Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere
Date: Tue, 4 Jun 2024 17:04:15 -0700
Subject: [PATCH 1/5] [Support] Add variadic createStringError overload
@@ -2042,7 +2043,7 @@ bool RegisterContextUnwind::ReadFrameAddress(
return true;
}
UnwindLogMsg("Failed to set CFA value via DWARF expression: %s",
- error.AsCString());
+ llvm::toString(result.takeError()).c_str());
@@ -2244,30 +2108,26 @@ bool DWARFExpression::Evaluate(
const uint64_t piece_bit_offset = opcodes.GetULEB128();
switch (stack.back().GetValueType()) {
case Value::ValueType::Invalid:
- return false;
+ return llvm::createStringError(
+
@@ -1277,6 +1277,11 @@ inline Error createStringError(const Twine ) {
return createStringError(llvm::inconvertibleErrorCode(), S);
}
+template
+inline Error createStringError(char const *Fmt, const Ts &...Vals) {
+ return createStringError(llvm::inconvertibleErrorCode(),
@@ -572,28 +572,32 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const
SymbolContext ,
static std::optional
ExtractDataMemberLocation(DWARFDIE const , DWARFFormValue const
_value,
ModuleSP module_sp) {
+ Log *log =
@@ -2244,30 +2108,26 @@ bool DWARFExpression::Evaluate(
const uint64_t piece_bit_offset = opcodes.GetULEB128();
switch (stack.back().GetValueType()) {
case Value::ValueType::Invalid:
- return false;
+ return llvm::createStringError(
+
@@ -2042,7 +2043,7 @@ bool RegisterContextUnwind::ReadFrameAddress(
return true;
}
UnwindLogMsg("Failed to set CFA value via DWARF expression: %s",
- error.AsCString());
+ llvm::toString(result.takeError()).c_str());
https://github.com/JDevlieghere updated
https://github.com/llvm/llvm-project/pull/94420
>From 22bb28a5e3fc84c75e1013c3b0c15654e7b786da Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere
Date: Tue, 4 Jun 2024 17:04:15 -0700
Subject: [PATCH 1/4] [Support] Add variadic createStringError overload
https://github.com/JDevlieghere updated
https://github.com/llvm/llvm-project/pull/94420
>From 22bb28a5e3fc84c75e1013c3b0c15654e7b786da Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere
Date: Tue, 4 Jun 2024 17:04:15 -0700
Subject: [PATCH 1/3] [Support] Add variadic createStringError overload
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Jonas Devlieghere (JDevlieghere)
Changes
Change the interface of DWARFExpression::Evaluate and
DWARFExpressionList::Evaluate to return an llvm::Expected instead of a
boolean. This eliminates the Status output parameter and improves error
https://github.com/JDevlieghere created
https://github.com/llvm/llvm-project/pull/94420
Change the interface of DWARFExpression::Evaluate and
DWARFExpressionList::Evaluate to return an llvm::Expected instead of a
boolean. This eliminates the Status output parameter and improves error
handling.
22 matches
Mail list logo