[Lldb-commits] [PATCH] D119146: [lldb/Platform] Decouple instance and plugin names
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 7 07:47:10 PST 2022
labath created this revision.
labath added reviewers: clayborg, jingham, JDevlieghere.
Herald added a subscriber: emaste.
labath requested review of this revision.
Herald added a project: LLDB.
Platform class has two methods (GetName, GetPluginName) which were
hardwired to return the same thing. This patch removes the hardwiring by
adding a m_instance_name field to the class, and plumbing it through all
the constructors. The idea is that GetPluginName should return the name
of the platform plugin (class), like it does now. OTOH, GetName() would
return a new identifier unique to a particular instance.
Since this touches a fairly large number of files, I've made the patch
NFC(ish) by ensuring that the instance name is always initialized to the
name of the plugin class.
I've also changed the GetName method to return a StringRef, and updated
all the call sites. For those cases, where calling GetName was obivously
wrong in the new world order, I've changed the call to GetPluginName
instead. However, it's certain that a lot of these call sites will need
to be updated again anyway.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119146
Files:
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/lldb-private-interfaces.h
lldb/source/API/SBPlatform.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Core/IOHandlerCursesGUI.cpp
lldb/source/Interpreter/OptionGroupPlatform.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroid.h
lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/source/Plugins/Platform/Linux/PlatformLinux.h
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h
lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp
lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.h
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/source/Plugins/Platform/Windows/PlatformWindows.h
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/TargetList.cpp
lldb/unittests/Expression/DWARFExpressionTest.cpp
lldb/unittests/Interpreter/TestCommandPaths.cpp
lldb/unittests/Platform/PlatformSiginfoTest.cpp
lldb/unittests/Process/ProcessEventDataTest.cpp
lldb/unittests/ScriptInterpreter/Lua/ScriptInterpreterTests.cpp
lldb/unittests/Target/ExecutionContextTest.cpp
lldb/unittests/Target/RemoteAwarePlatformTest.cpp
lldb/unittests/Target/StackFrameRecognizerTest.cpp
lldb/unittests/Thread/ThreadTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119146.406467.patch
Type: text/x-patch
Size: 54761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220207/b84ef3cf/attachment-0001.bin>
More information about the lldb-commits
mailing list