summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-03-08 22:40:15 +0000
committerGreg Clayton <gclayton@apple.com>2011-03-08 22:40:15 +0000
commite996fd30be59b65b0607607aa907af7178568994 (patch)
treebe26b775d619b8375f6c874826fc14ef493fe76d /lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
parent6111db9e9cde94262624891fd29d8225f4bc9de1 (diff)
downloadbcm5719-llvm-e996fd30be59b65b0607607aa907af7178568994.tar.gz
bcm5719-llvm-e996fd30be59b65b0607607aa907af7178568994.zip
LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provide
an interface to a local or remote debugging platform. By default each host OS that supports LLDB should be registering a "default" platform that will be used unless a new platform is selected. Platforms are responsible for things such as: - getting process information by name or by processs ID - finding platform files. This is useful for remote debugging where there is an SDK with files that might already or need to be cached for debug access. - getting a list of platform supported architectures in the exact order they should be selected. This helps the native x86 platform on MacOSX select the correct x86_64/i386 slice from universal binaries. - Connect to remote platforms for remote debugging - Resolving an executable including finding an executable inside platform specific bundles (macosx uses .app bundles that contain files) and also selecting the appropriate slice of universal files for a given platform. So by default there is always a local platform, but remote platforms can be connected to. I will soon be adding a new "platform" command that will support the following commands: (lldb) platform connect --name machine1 macosx connect://host:port Connected to "machine1" platform. (lldb) platform disconnect macosx This allows LLDB to be well setup to do remote debugging and also once connected process listing and finding for things like: (lldb) process attach --name x<TAB> The currently selected platform plug-in can now auto complete any available processes that start with "x". The responsibilities for the platform plug-in will soon grow and expand. llvm-svn: 127286
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h')
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
new file mode 100644
index 00000000000..037cac28e74
--- /dev/null
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
@@ -0,0 +1,89 @@
+//===-- PlatformMacOSX.h ----------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_PlatformMacOSX_h_
+#define liblldb_PlatformMacOSX_h_
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include "lldb/Target/Platform.h"
+
+namespace lldb_private {
+
+ class PlatformMacOSX : public Platform
+ {
+ public:
+
+ static void
+ Initialize ();
+
+ static void
+ Terminate ();
+
+ PlatformMacOSX ();
+
+ virtual
+ ~PlatformMacOSX();
+
+ //------------------------------------------------------------
+ // lldb_private::PluginInterface functions
+ //------------------------------------------------------------
+ virtual const char *
+ GetPluginName()
+ {
+ return "PlatformMacOSX";
+ }
+
+ virtual const char *
+ GetShortPluginName()
+ {
+ return "platform.macosx";
+ }
+
+ virtual uint32_t
+ GetPluginVersion()
+ {
+ return 1;
+ }
+
+
+ //------------------------------------------------------------
+ // lldb_private::Platform functions
+ //------------------------------------------------------------
+ virtual Error
+ ResolveExecutable (const FileSpec &exe_file,
+ const ArchSpec &arch,
+ lldb::ModuleSP &module_sp);
+
+ virtual Error
+ GetFile (const FileSpec &platform_file, FileSpec &local_file);
+
+ virtual uint32_t
+ FindProcessesByName (const char *name_match,
+ lldb::NameMatchType name_match_type,
+ ProcessInfoList &process_infos);
+
+ virtual bool
+ GetProcessInfo (lldb::pid_t pid, ProcessInfo &proc_info);
+
+ virtual bool
+ GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch);
+
+ protected:
+
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN (PlatformMacOSX);
+
+ };
+} // namespace lldb_private
+
+#endif // liblldb_Platform_h_
OpenPOWER on IntegriCloud