[Lldb-commits] [PATCH 4/8] Implement ProcessLinux::GetImageInfoAddress().
Stephen Wilson
wilsons at start.ca
Fri Jan 14 13:12:18 PST 2011
---
source/Plugins/Process/Linux/ProcessLinux.cpp | 13 +++++++++++++
source/Plugins/Process/Linux/ProcessLinux.h | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/source/Plugins/Process/Linux/ProcessLinux.cpp b/source/Plugins/Process/Linux/ProcessLinux.cpp
index 5e9a19d..6e9c0fb 100644
--- a/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -149,6 +149,19 @@ ProcessLinux::DoResume()
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)
{
diff --git a/source/Plugins/Process/Linux/ProcessLinux.h b/source/Plugins/Process/Linux/ProcessLinux.h
index 16c2bec..3e23a7a 100644
--- a/source/Plugins/Process/Linux/ProcessLinux.h
+++ b/source/Plugins/Process/Linux/ProcessLinux.h
@@ -128,6 +128,9 @@ public:
virtual lldb::ByteOrder
GetByteOrder() const;
+ virtual lldb::addr_t
+ GetImageInfoAddress();
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
--
1.7.3.5
More information about the lldb-commits
mailing list