[Lldb-commits] [lldb] r123499 - in /lldb/trunk/source/Plugins/Process/Linux: ProcessLinux.cpp ProcessLinux.h

Stephen Wilson wilsons at start.ca
Fri Jan 14 16:10:37 PST 2011


Author: wilsons
Date: Fri Jan 14 18:10:37 2011
New Revision: 123499

URL: http://llvm.org/viewvc/llvm-project?rev=123499&view=rev
Log:
Implement ProcessLinux::GetImageInfoAddress().

Modified:
    lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
    lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp?rev=123499&r1=123498&r2=123499&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp Fri Jan 14 18:10:37 2011
@@ -149,6 +149,19 @@
     return Error();
 }
 
+addr_t
+ProcessLinux::GetImageInfoAddress()
+{
+    Target *target = &GetTarget();
+    ObjectFile *obj_file = target->GetExecutableModule()->GetObjectFile();
+    Address addr = obj_file->GetImageInfoAddress();
+
+    if (addr.IsValid()) 
+        return addr.GetLoadAddress(target);
+    else
+        return LLDB_INVALID_ADDRESS;
+}
+
 Error
 ProcessLinux::DoHalt(bool &caused_stop)
 {

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h?rev=123499&r1=123498&r2=123499&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h Fri Jan 14 18:10:37 2011
@@ -128,6 +128,9 @@
     virtual lldb::ByteOrder
     GetByteOrder() const;
 
+    virtual lldb::addr_t
+    GetImageInfoAddress();
+
     //------------------------------------------------------------------
     // PluginInterface protocol
     //------------------------------------------------------------------





More information about the lldb-commits mailing list