[Lldb-commits] [lldb] r154726 - in /lldb/branches/lldb-platform-work: ./ source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp source/Plugins/Process/POSIX/ProcessPOSIX.cpp source/lldb.cpp

Johnny Chen johnny.chen at apple.com
Fri Apr 13 18:03:50 PDT 2012


Author: johnny
Date: Fri Apr 13 20:03:50 2012
New Revision: 154726

URL: http://llvm.org/viewvc/llvm-project?rev=154726&view=rev
Log:
Merge patch by Viktor Kutuzov <vkutuzov at accesssoftek.com> from TOT:

svn merge -r 154722:154724 https://johnny@llvm.org/svn/llvm-project/lldb/trunk .

Modified:
    lldb/branches/lldb-platform-work/   (props changed)
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
    lldb/branches/lldb-platform-work/source/lldb.cpp

Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr 13 20:03:50 2012
@@ -1 +1 @@
-/lldb/trunk:154224-154722
+/lldb/trunk:154224-154724

Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=154726&r1=154725&r2=154726&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Fri Apr 13 20:03:50 2012
@@ -120,10 +120,6 @@
 ProcessFreeBSD::ProcessFreeBSD(Target& target, Listener &listener)
     : ProcessPOSIX(target, listener)
 {
-    // FIXME: Putting this code in the ctor and saving the byte order in a
-    // member variable is a hack to avoid const qual issues in GetByteOrder.
-    ObjectFile *obj_file = GetTarget().GetExecutableModule()->GetObjectFile();
-    m_byte_order = obj_file->GetByteOrder();
 }
 
 void

Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=154726&r1=154725&r2=154726&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Fri Apr 13 20:03:50 2012
@@ -66,6 +66,7 @@
 
 ProcessPOSIX::ProcessPOSIX(Target& target, Listener &listener)
     : Process(target, listener),
+      m_byte_order(lldb::endian::InlHostByteOrder()),
       m_monitor(NULL),
       m_module(NULL),
       m_in_limbo(false),
@@ -73,8 +74,9 @@
 {
     // FIXME: Putting this code in the ctor and saving the byte order in a
     // member variable is a hack to avoid const qual issues in GetByteOrder.
-    ObjectFile *obj_file = GetTarget().GetExecutableModule()->GetObjectFile();
-    m_byte_order = obj_file->GetByteOrder();
+	lldb::ModuleSP module = GetTarget().GetExecutableModule();
+	if (module != NULL && module->GetObjectFile() != NULL)
+		m_byte_order = module->GetObjectFile()->GetByteOrder();
 }
 
 ProcessPOSIX::~ProcessPOSIX()

Modified: lldb/branches/lldb-platform-work/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/lldb.cpp?rev=154726&r1=154725&r2=154726&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/lldb.cpp (original)
+++ lldb/branches/lldb-platform-work/source/lldb.cpp Fri Apr 13 20:03:50 2012
@@ -64,6 +64,7 @@
 #endif
 
 #if defined (__FreeBSD__)
+#include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
 #include "Plugins/Process/POSIX/ProcessPOSIX.h"
 #include "Plugins/Process/FreeBSD/ProcessFreeBSD.h"
 #endif
@@ -134,6 +135,7 @@
 #endif
 #if defined (__FreeBSD__)
         ProcessFreeBSD::Initialize();
+        ProcessGDBRemote::Initialize();
 #endif
         //----------------------------------------------------------------------
         // Platform agnostic plugins
@@ -208,6 +210,7 @@
 
 #if defined (__FreeBSD__)
     ProcessFreeBSD::Terminate();
+    ProcessGDBRemote::Terminate();
 #endif
     
     DynamicLoaderStatic::Terminate();





More information about the lldb-commits mailing list