[Lldb-commits] [PATCH 4/8] Implement ProcessLinux::GetImageInfoAddress().
Greg Clayton
gclayton at apple.com
Fri Jan 14 13:35:25 PST 2011
Looks good.
On Jan 14, 2011, at 1:12 PM, Stephen Wilson wrote:
> ---
> 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
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list