[Lldb-commits] [PATCH] D90151: Fix SBError::SetErrorToGenericError
Andy Yankovsky via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 26 06:41:50 PDT 2020
werat updated this revision to Diff 300652.
werat added a comment.
Add a test case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90151/new/
https://reviews.llvm.org/D90151
Files:
lldb/source/API/SBError.cpp
lldb/test/API/python_api/sberror/TestSBError.py
Index: lldb/test/API/python_api/sberror/TestSBError.py
===================================================================
--- /dev/null
+++ lldb/test/API/python_api/sberror/TestSBError.py
@@ -0,0 +1,13 @@
+"""Test the SBError APIs."""
+
+from lldbsuite.test.lldbtest import *
+
+class TestSBError(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+ NO_DEBUG_INFO_TESTCASE = True
+
+ def test_generic_error(self):
+ error = lldb.SBError()
+ error.SetErrorToGenericError()
+ self.assertEqual(error.GetType(), lldb.eErrorTypeGeneric)
Index: lldb/source/API/SBError.cpp
===================================================================
--- lldb/source/API/SBError.cpp
+++ lldb/source/API/SBError.cpp
@@ -118,7 +118,7 @@
LLDB_RECORD_METHOD_NO_ARGS(void, SBError, SetErrorToGenericError);
CreateIfNeeded();
- m_opaque_up->SetErrorToErrno();
+ m_opaque_up->SetErrorToGenericError();
}
void SBError::SetErrorString(const char *err_str) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90151.300652.patch
Type: text/x-patch
Size: 983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201026/7d996f0d/attachment.bin>
More information about the lldb-commits
mailing list