diff options
Diffstat (limited to 'lldb/source/API')
-rw-r--r-- | lldb/source/API/SBInstruction.cpp | 10 | ||||
-rw-r--r-- | lldb/source/API/SBInstructionList.cpp | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index eccc4e29aad..6158418d2f2 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -178,8 +178,9 @@ SBInstruction::GetDescription (lldb::SBStream &s) 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... - const char *disassemble_format = "${addr-file-or-load}: "; - m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL, &sc, NULL, disassemble_format); + FormatEntity::Entry format; + FormatEntity::Parse("${addr}: ", format); + m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL, &sc, NULL, &format); return true; } return false; @@ -199,8 +200,9 @@ SBInstruction::Print (FILE *out) if (module_sp) module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything, sc); StreamFile out_stream (out, false); - const char *disassemble_format = "${addr-file-or-load}: "; - m_opaque_sp->Dump (&out_stream, 0, true, false, NULL, &sc, NULL, disassemble_format); + FormatEntity::Entry format; + FormatEntity::Parse("${addr}: ", format); + m_opaque_sp->Dump (&out_stream, 0, true, false, NULL, &sc, NULL, &format); } } diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp index 31585b3e686..812824b4d2e 100644 --- a/lldb/source/API/SBInstructionList.cpp +++ b/lldb/source/API/SBInstructionList.cpp @@ -102,7 +102,8 @@ SBInstructionList::GetDescription (lldb::SBStream &description) // exist already inside description... Stream &sref = description.ref(); const uint32_t max_opcode_byte_size = m_opaque_sp->GetInstructionList().GetMaxOpcocdeByteSize(); - const char *disassemble_format = "${addr-file-or-load}: "; + FormatEntity::Entry format; + FormatEntity::Parse("${addr}: ", format); SymbolContext sc; SymbolContext prev_sc; for (size_t i=0; i<num_instructions; ++i) @@ -119,7 +120,7 @@ SBInstructionList::GetDescription (lldb::SBStream &description) module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything, sc); } - inst->Dump (&sref, max_opcode_byte_size, true, false, NULL, &sc, &prev_sc, disassemble_format); + inst->Dump (&sref, max_opcode_byte_size, true, false, NULL, &sc, &prev_sc, &format); sref.EOL(); } return true; |