[Lldb-commits] [PATCH] Reduce the number of components initialized by lldb-server to reduce static binary size.

Greg Clayton clayborg at gmail.com
Thu Feb 26 09:54:09 PST 2015


This would also be a good time to try and always initialize all plugins. There are many apple plug-ins which should be completely safe to compile into LLDB for cross debugging to MacOSX and iOS. See inlined comments above.


REPOSITORY
  rL LLVM

================
Comment at: source/lldb.cpp:227
@@ -208,2 +226,3 @@
+
 #if defined (__linux__)
         //----------------------------------------------------------------------
----------------
Note that these #defines are needed because ProcessLinux only runs natively on linux, unlike the #if defined (__APPLE__) ones that are removing code for no real reason since apple always runs through GDB remote and all other plug-ins are abstracted from the host system and should be able to be cross compiled.

================
Comment at: source/lldb.cpp:240
@@ -220,2 +239,3 @@
 #endif
-
+#if defined (__APPLE__)
+        ProcessKDP::Initialize();
----------------
Remove the #if defined (__APPLE__) and always compile these for cross debugging.

================
Comment at: source/lldb.cpp:243
@@ -222,1 +242,3 @@
+        ProcessMachCore::Initialize();
+#endif
         //----------------------------------------------------------------------
----------------
Remove the #if defined (__APPLE__) and always compile these for cross debugging.

================
Comment at: source/lldb.cpp:292
@@ -285,2 +291,3 @@
+
 #if defined (__APPLE__)
     DynamicLoaderMacOSXDYLD::Terminate();
----------------
Remove the #if defined (__APPLE__) and always compile these for cross debugging.

================
Comment at: source/lldb.cpp:305
@@ -299,3 +304,3 @@
     SystemRuntimeMacOSX::Terminate();
 #endif
 
----------------
Remove the #if defined (__APPLE__) and always compile these for cross debugging.

================
Comment at: source/lldb.cpp:333-336
@@ -304,1 +332,6 @@
+
+#if defined (__APPLE__)
+    ProcessMachCore::Terminate();
+    ProcessKDP::Terminate();
+#endif
 #if defined(_MSC_VER)
----------------
Remove the #if defined (__APPLE__) and the #endif. These plug-ins should be always compiled into LLDB binaries so that cross debugging can be done. There should be no code that relies headers from a native system in any of these.

http://reviews.llvm.org/D7880

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list