[Lldb-commits] [PATCH] D111452: [lldb/Plugins] Replace platform-specific macro with LLVM_PRETTY_FUNCTION (NFC)
This revision was automatically updated to reflect the committed changes. Closed by commit rG88a941ba64a3: [lldb/Plugins] Replace platform-specific macro with LLVM_PRETTY_FUNCTION (NFC) (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111452/new/ https://reviews.llvm.org/D111452 Files: lldb/include/lldb/Interpreter/ScriptedInterface.h lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp lldb/source/Plugins/Process/scripted/ScriptedThread.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp === --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp @@ -60,7 +60,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_thread_id", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return LLDB_INVALID_THREAD_ID; return obj->GetIntegerValue(LLDB_INVALID_THREAD_ID); @@ -70,7 +70,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_name", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetStringValue().str(); @@ -80,7 +80,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_state", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return eStateInvalid; return static_cast(obj->GetIntegerValue(eStateInvalid)); @@ -90,7 +90,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_queue", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetStringValue().str(); @@ -101,7 +101,7 @@ StructuredData::DictionarySP dict = Dispatch("get_stop_reason", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, dict, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict, error)) return {}; return dict; @@ -116,7 +116,7 @@ StructuredData::DictionarySP dict = Dispatch("get_register_info", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, dict, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict, error)) return {}; return dict; @@ -127,7 +127,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_register_context", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetAsString()->GetValue().str(); Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h === --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h @@ -39,7 +39,7 @@ using Locker = ScriptInterpreterPythonImpl::Locker; std::string caller_signature = -llvm::Twine(__PRETTY_FUNCTION__ + llvm::Twine(" (") + +llvm::Twine(LLVM_PRETTY_FUNCTION + llvm::Twine(" (") + llvm::Twine(method_name) + llvm::Twine(")")) .str(); if (!m_object_instance_sp) Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp === --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp @@ -72,7 +72,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("is_alive", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetBooleanValue(); @@ -89,7 +89,7 @@ "get_memory_region_containing_address", error, address); if (error.Fail()) { -return ErrorWithMessage(__PRETTY_FUNCTION__, +return ErrorWithMessage(LLVM_PRETTY_FUNCTION, error.AsCString(), error); } @@ -101,7 +101,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_thread_with_id", error, tid); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if
[Lldb-commits] [PATCH] D111452: [lldb/Plugins] Replace platform-specific macro with LLVM_PRETTY_FUNCTION (NFC)
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111452/new/ https://reviews.llvm.org/D111452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D111452: [lldb/Plugins] Replace platform-specific macro with LLVM_PRETTY_FUNCTION (NFC)
mib created this revision. mib added a reviewer: JDevlieghere. mib added a project: LLDB. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch refactors Scripted Process and Scripted Thread related classes to use LLVM_PRETTY_FUNCTION instead of the compiler macro. Signed-off-by: Med Ismail Bennani Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D111452 Files: lldb/include/lldb/Interpreter/ScriptedInterface.h lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp lldb/source/Plugins/Process/scripted/ScriptedThread.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp === --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp @@ -60,7 +60,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_thread_id", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return LLDB_INVALID_THREAD_ID; return obj->GetIntegerValue(LLDB_INVALID_THREAD_ID); @@ -70,7 +70,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_name", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetStringValue().str(); @@ -80,7 +80,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_state", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return eStateInvalid; return static_cast(obj->GetIntegerValue(eStateInvalid)); @@ -90,7 +90,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_queue", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetStringValue().str(); @@ -101,7 +101,7 @@ StructuredData::DictionarySP dict = Dispatch("get_stop_reason", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, dict, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict, error)) return {}; return dict; @@ -116,7 +116,7 @@ StructuredData::DictionarySP dict = Dispatch("get_register_info", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, dict, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict, error)) return {}; return dict; @@ -127,7 +127,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_register_context", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetAsString()->GetValue().str(); Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h === --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h @@ -39,7 +39,7 @@ using Locker = ScriptInterpreterPythonImpl::Locker; std::string caller_signature = -llvm::Twine(__PRETTY_FUNCTION__ + llvm::Twine(" (") + +llvm::Twine(LLVM_PRETTY_FUNCTION + llvm::Twine(" (") + llvm::Twine(method_name) + llvm::Twine(")")) .str(); if (!m_object_instance_sp) Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp === --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp @@ -72,7 +72,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("is_alive", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetBooleanValue(); @@ -89,7 +89,7 @@ "get_memory_region_containing_address", error, address); if (error.Fail()) { -return ErrorWithMessage(__PRETTY_FUNCTION__, +return ErrorWithMessage(LLVM_PRETTY_FUNCTION, error.AsCString(), error); } @@ -101,7 +101,7 @@ Status error; StructuredData::ObjectSP obj = Dispatch("get_thread_with_id", error, tid); - if