diff options
author | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
commit | 0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (patch) | |
tree | 09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/API/SBInstruction.cpp | |
parent | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff) | |
download | FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.zip FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.tar.gz |
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
This corresponds with the branchpoint for the 3.6 release.
A number of files not required for the FreeBSD build have been removed.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/API/SBInstruction.cpp')
-rw-r--r-- | source/API/SBInstruction.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/API/SBInstruction.cpp b/source/API/SBInstruction.cpp index 2334cc0..eccc4e2 100644 --- a/source/API/SBInstruction.cpp +++ b/source/API/SBInstruction.cpp @@ -20,6 +20,7 @@ #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Disassembler.h" #include "lldb/Core/EmulateInstruction.h" +#include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/StackFrame.h" @@ -170,9 +171,15 @@ SBInstruction::GetDescription (lldb::SBStream &s) { if (m_opaque_sp) { + SymbolContext sc; + const Address &addr = m_opaque_sp->GetAddress(); + ModuleSP module_sp (addr.GetModule()); + if (module_sp) + module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything, sc); // Use the "ref()" instead of the "get()" accessor in case the SBStream // didn't have a stream already created, one will get created... - m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL); + const char *disassemble_format = "${addr-file-or-load}: "; + m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL, &sc, NULL, disassemble_format); return true; } return false; @@ -186,8 +193,14 @@ SBInstruction::Print (FILE *out) if (m_opaque_sp) { + SymbolContext sc; + const Address &addr = m_opaque_sp->GetAddress(); + ModuleSP module_sp (addr.GetModule()); + if (module_sp) + module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything, sc); StreamFile out_stream (out, false); - m_opaque_sp->Dump (&out_stream, 0, true, false, NULL); + const char *disassemble_format = "${addr-file-or-load}: "; + m_opaque_sp->Dump (&out_stream, 0, true, false, NULL, &sc, NULL, disassemble_format); } } |