summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2016-04-04 21:21:49 +0000
committerAdrian McCarthy <amccarth@google.com>2016-04-04 21:21:49 +0000
commit543725c2e3d533acf82e3ae554e0dd730880ded8 (patch)
treeb972b718960abc36d352ca4ed791b279540361da /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent3c35e0999befe9d3016cf3bfd07701e94144a968 (diff)
downloadbcm5719-llvm-543725c2e3d533acf82e3ae554e0dd730880ded8.tar.gz
bcm5719-llvm-543725c2e3d533acf82e3ae554e0dd730880ded8.zip
Implement `target modules dump objfile`
Differential Revision: http://reviews.llvm.org/D18464 llvm-svn: 265349
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index e20f994576e..32cc85d01be 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -2996,6 +2996,22 @@ ObjectFileELF::IsStripped ()
void
ObjectFileELF::Dump(Stream *s)
{
+ ModuleSP module_sp(GetModule());
+ if (!module_sp)
+ {
+ return;
+ }
+
+ lldb_private::Mutex::Locker locker(module_sp->GetMutex());
+ s->Printf("%p: ", static_cast<void *>(this));
+ s->Indent();
+ s->PutCString("ObjectFileELF");
+
+ ArchSpec header_arch;
+ GetArchitecture(header_arch);
+
+ *s << ", file = '" << m_file << "', arch = " << header_arch.GetArchitectureName() << "\n";
+
DumpELFHeader(s, m_header);
s->EOL();
DumpELFProgramHeaders(s);
OpenPOWER on IntegriCloud