summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBInstruction.cpp4
-rw-r--r--lldb/source/API/SBInstructionList.cpp2
-rw-r--r--lldb/source/Breakpoint/BreakpointLocation.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp4
-rw-r--r--lldb/source/Core/Address.cpp9
-rw-r--r--lldb/source/Core/Debugger.cpp16
-rw-r--r--lldb/source/Core/Disassembler.cpp51
-rw-r--r--lldb/source/Core/FormatEntity.cpp37
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp46
-rw-r--r--lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp2
-rw-r--r--lldb/source/Symbol/SymbolContext.cpp39
-rw-r--r--lldb/source/Symbol/Variable.cpp4
-rw-r--r--lldb/source/Target/StackFrame.cpp4
-rw-r--r--lldb/source/Target/ThreadPlanTracer.cpp3
14 files changed, 186 insertions, 37 deletions
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp
index 6158418d2f2..36be9480186 100644
--- a/lldb/source/API/SBInstruction.cpp
+++ b/lldb/source/API/SBInstruction.cpp
@@ -180,7 +180,7 @@ SBInstruction::GetDescription (lldb::SBStream &s)
// didn't have a stream already created, one will get created...
FormatEntity::Entry format;
FormatEntity::Parse("${addr}: ", format);
- m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL, &sc, NULL, &format);
+ m_opaque_sp->Dump (&s.ref(), 0, true, false, NULL, &sc, NULL, &format, 0);
return true;
}
return false;
@@ -202,7 +202,7 @@ SBInstruction::Print (FILE *out)
StreamFile out_stream (out, false);
FormatEntity::Entry format;
FormatEntity::Parse("${addr}: ", format);
- m_opaque_sp->Dump (&out_stream, 0, true, false, NULL, &sc, NULL, &format);
+ m_opaque_sp->Dump (&out_stream, 0, true, false, NULL, &sc, NULL, &format, 0);
}
}
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index 812824b4d2e..34b0e05079f 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -120,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, &format);
+ inst->Dump (&sref, max_opcode_byte_size, true, false, NULL, &sc, &prev_sc, &format, 0);
sref.EOL();
}
return true;
diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp
index 85233c9374c..2179193ff95 100644
--- a/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocation.cpp
@@ -590,7 +590,7 @@ BreakpointLocation::GetDescription (Stream *s, lldb::DescriptionLevel level)
s->PutCString ("re-exported target = ");
else
s->PutCString("where = ");
- sc.DumpStopContext (s, m_owner.GetTarget().GetProcessSP().get(), m_address, false, true, false, true);
+ sc.DumpStopContext (s, m_owner.GetTarget().GetProcessSP().get(), m_address, false, true, false, true, true);
}
else
{
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index a88a9b1f0ca..23fb52bc1e2 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -690,13 +690,15 @@ protected:
bool show_module = true;
bool show_inlined_frames = true;
const bool show_function_arguments = true;
+ const bool show_function_name = true;
sc.DumpStopContext(&result.GetOutputStream(),
m_exe_ctx.GetBestExecutionContextScope(),
sc.line_entry.range.GetBaseAddress(),
show_fullpaths,
show_module,
show_inlined_frames,
- show_function_arguments);
+ show_function_arguments,
+ show_function_name);
result.GetOutputStream().EOL();
if (m_options.num_lines == 0)
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp
index d449d0b2143..3cc6c8a8bbb 100644
--- a/lldb/source/Core/Address.cpp
+++ b/lldb/source/Core/Address.cpp
@@ -468,6 +468,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
case DumpStyleResolvedDescription:
case DumpStyleResolvedDescriptionNoModule:
case DumpStyleResolvedDescriptionNoFunctionArguments:
+ case DumpStyleNoFunctionName:
if (IsSectionOffset())
{
uint32_t pointer_size = 4;
@@ -553,7 +554,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
#endif
Address cstr_addr(*this);
cstr_addr.SetOffset(cstr_addr.GetOffset() + pointer_size);
- func_sc.DumpStopContext(s, exe_scope, so_addr, true, true, false, true);
+ func_sc.DumpStopContext(s, exe_scope, so_addr, true, true, false, true, true);
if (ReadAddress (exe_scope, cstr_addr, pointer_size, so_addr))
{
#if VERBOSE_OUTPUT
@@ -636,7 +637,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
if (pointer_sc.function || pointer_sc.symbol)
{
s->PutCString(": ");
- pointer_sc.DumpStopContext(s, exe_scope, so_addr, true, false, false, true);
+ pointer_sc.DumpStopContext(s, exe_scope, so_addr, true, false, false, true, true);
}
}
}
@@ -662,6 +663,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
const bool show_fullpaths = false;
const bool show_inlined_frames = true;
const bool show_function_arguments = (style != DumpStyleResolvedDescriptionNoFunctionArguments);
+ const bool show_function_name = (style != DumpStyleNoFunctionName);
if (sc.function == NULL && sc.symbol != NULL)
{
// If we have just a symbol make sure it is in the right section
@@ -684,7 +686,8 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
show_fullpaths,
show_module,
show_inlined_frames,
- show_function_arguments);
+ show_function_arguments,
+ show_function_name);
}
else
{
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index f25a3f41825..c68b89b2efd 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -126,7 +126,21 @@ g_language_enumerators[] =
FILE_AND_LINE\
"\\n"
-#define DEFAULT_DISASSEMBLY_FORMAT "${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: "
+// Three parts to this disassembly format specification:
+// 1. If this is a new function/symbol (no previous symbol/function), print
+// dylib`funcname:\n
+// 2. If this is a symbol context change (different from previous symbol/function), print
+// dylib`funcname:\n
+// 3. print
+// address <+offset>:
+#define DEFAULT_DISASSEMBLY_FORMAT "{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }${addr-file-or-load}{ <${function.concrete-only-addr-offset-no-padding}>}: "
+
+// gdb's disassembly format can be emulated with
+// ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}:
+
+// lldb's original format for disassembly would look like this format string -
+// {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}:
+
static PropertyDefinition
g_properties[] =
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 14fbee149a5..87ded9ff18d 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -421,6 +421,47 @@ Disassembler::PrintInstructions
}
const uint32_t scope = eSymbolContextLineEntry | eSymbolContextFunction | eSymbolContextSymbol;
const bool use_inline_block_range = false;
+
+ const FormatEntity::Entry *disassembly_format = NULL;
+ FormatEntity::Entry format;
+ if (exe_ctx.HasTargetScope())
+ {
+ disassembly_format = exe_ctx.GetTargetRef().GetDebugger().GetDisassemblyFormat ();
+ }
+ else
+ {
+ FormatEntity::Parse("${addr}: ", format);
+ disassembly_format = &format;
+ }
+
+ // First pass: step through the list of instructions,
+ // find how long the initial addresses strings are, insert padding
+ // in the second pass so the opcodes all line up nicely.
+ size_t address_text_size = 0;
+ for (size_t i = 0; i < num_instructions_found; ++i)
+ {
+ Instruction *inst = disasm_ptr->GetInstructionList().GetInstructionAtIndex (i).get();
+ if (inst)
+ {
+ const Address &addr = inst->GetAddress();
+ ModuleSP module_sp (addr.GetModule());
+ if (module_sp)
+ {
+ const uint32_t resolve_mask = eSymbolContextFunction | eSymbolContextSymbol;
+ uint32_t resolved_mask = module_sp->ResolveSymbolContextForAddress(addr, resolve_mask, sc);
+ if (resolved_mask)
+ {
+ StreamString strmstr;
+ Debugger::FormatDisassemblerAddress (disassembly_format, &sc, NULL, &exe_ctx, &addr, strmstr);
+ size_t cur_line = strmstr.GetSizeOfLastLine();
+ if (cur_line > address_text_size)
+ address_text_size = cur_line;
+ }
+ sc.Clear(false);
+ }
+ }
+ }
+
for (size_t i = 0; i < num_instructions_found; ++i)
{
Instruction *inst = disasm_ptr->GetInstructionList().GetInstructionAtIndex (i).get();
@@ -448,7 +489,7 @@ Disassembler::PrintInstructions
if (offset != 0)
strm.EOL();
- sc.DumpStopContext(&strm, exe_ctx.GetProcessPtr(), addr, false, true, false, false);
+ sc.DumpStopContext(&strm, exe_ctx.GetProcessPtr(), addr, false, true, false, false, true);
strm.EOL();
if (sc.comp_unit && sc.line_entry.IsValid())
@@ -471,7 +512,7 @@ Disassembler::PrintInstructions
}
const bool show_bytes = (options & eOptionShowBytes) != 0;
- inst->Dump (&strm, max_opcode_byte_size, true, show_bytes, &exe_ctx, &sc, &prev_sc, NULL);
+ inst->Dump (&strm, max_opcode_byte_size, true, show_bytes, &exe_ctx, &sc, &prev_sc, NULL, address_text_size);
strm.EOL();
}
else
@@ -561,7 +602,8 @@ Instruction::Dump (lldb_private::Stream *s,
const ExecutionContext* exe_ctx,
const SymbolContext *sym_ctx,
const SymbolContext *prev_sym_ctx,
- const FormatEntity::Entry *disassembly_addr_format)
+ const FormatEntity::Entry *disassembly_addr_format,
+ size_t max_address_text_size)
{
size_t opcode_column_width = 7;
const size_t operand_column_width = 25;
@@ -573,6 +615,7 @@ Instruction::Dump (lldb_private::Stream *s,
if (show_address)
{
Debugger::FormatDisassemblerAddress (disassembly_addr_format, sym_ctx, prev_sym_ctx, exe_ctx, &m_address, ss);
+ ss.FillLastLineToColumn (max_address_text_size, ' ');
}
if (show_bytes)
@@ -999,7 +1042,7 @@ InstructionList::Dump (Stream *s,
{
if (pos != begin)
s->EOL();
- (*pos)->Dump(s, max_opcode_byte_size, show_address, show_bytes, exe_ctx, NULL, NULL, disassembly_format);
+ (*pos)->Dump(s, max_opcode_byte_size, show_address, show_bytes, exe_ctx, NULL, NULL, disassembly_format, 0);
}
}
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index 48b2c2ddbf7..98f39982adb 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -94,7 +94,9 @@ static FormatEntity::Entry::Definition g_function_child_entries[] =
ENTRY ("addr-offset" , FunctionAddrOffset , UInt64),
ENTRY ("concrete-only-addr-offset-no-padding", FunctionAddrOffsetConcrete, UInt64),
ENTRY ("line-offset" , FunctionLineOffset , UInt64),
- ENTRY ("pc-offset" , FunctionPCOffset , UInt64)
+ ENTRY ("pc-offset" , FunctionPCOffset , UInt64),
+ ENTRY ("initial-function" , FunctionInitial , None),
+ ENTRY ("changed" , FunctionChanged , None)
};
static FormatEntity::Entry::Definition g_line_child_entries[] =
@@ -335,6 +337,8 @@ FormatEntity::Entry::TypeToCString (Type t)
ENUM_TO_CSTR(FunctionAddrOffsetConcrete);
ENUM_TO_CSTR(FunctionLineOffset);
ENUM_TO_CSTR(FunctionPCOffset);
+ ENUM_TO_CSTR(FunctionInitial);
+ ENUM_TO_CSTR(FunctionChanged);
ENUM_TO_CSTR(LineEntryFile);
ENUM_TO_CSTR(LineEntryLineNumber);
ENUM_TO_CSTR(LineEntryStartAddress);
@@ -444,7 +448,8 @@ DumpAddressOffsetFromFunction (Stream &s,
const ExecutionContext *exe_ctx,
const Address &format_addr,
bool concrete_only,
- bool no_padding)
+ bool no_padding,
+ bool print_zero_offsets)
{
if (format_addr.IsValid())
{
@@ -479,10 +484,15 @@ DumpAddressOffsetFromFunction (Stream &s,
{
addr_t func_file_addr = func_addr.GetFileAddress();
addr_t addr_file_addr = format_addr.GetFileAddress();
- if (addr_file_addr > func_file_addr)
+ if (addr_file_addr > func_file_addr
+ || (addr_file_addr == func_file_addr && print_zero_offsets))
+ {
s.Printf("%s+%s%" PRIu64, addr_offset_padding, addr_offset_padding, addr_file_addr - func_file_addr);
+ }
else if (addr_file_addr < func_file_addr)
+ {
s.Printf("%s-%s%" PRIu64, addr_offset_padding, addr_offset_padding, func_file_addr - addr_file_addr);
+ }
return true;
}
else
@@ -492,10 +502,15 @@ DumpAddressOffsetFromFunction (Stream &s,
{
addr_t func_load_addr = func_addr.GetLoadAddress (target);
addr_t addr_load_addr = format_addr.GetLoadAddress (target);
- if (addr_load_addr > func_load_addr)
+ if (addr_load_addr > func_load_addr
+ || (addr_load_addr == func_load_addr && print_zero_offsets))
+ {
s.Printf("%s+%s%" PRIu64, addr_offset_padding, addr_offset_padding, addr_load_addr - func_load_addr);
+ }
else if (addr_load_addr < func_load_addr)
+ {
s.Printf("%s-%s%" PRIu64, addr_offset_padding, addr_offset_padding, func_load_addr - addr_load_addr);
+ }
return true;
}
}
@@ -1803,7 +1818,7 @@ FormatEntity::Format (const Entry &entry,
case Entry::Type::FunctionAddrOffset:
if (addr)
{
- if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, *addr, false, false))
+ if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, *addr, false, false, false))
return true;
}
return false;
@@ -1811,13 +1826,13 @@ FormatEntity::Format (const Entry &entry,
case Entry::Type::FunctionAddrOffsetConcrete:
if (addr)
{
- if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, *addr, true, true))
+ if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, *addr, true, true, true))
return true;
}
return false;
case Entry::Type::FunctionLineOffset:
- if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, sc->line_entry.range.GetBaseAddress(), false, false))
+ if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, sc->line_entry.range.GetBaseAddress(), false, false, false))
return true;
return false;
@@ -1827,12 +1842,18 @@ FormatEntity::Format (const Entry &entry,
StackFrame *frame = exe_ctx->GetFramePtr();
if (frame)
{
- if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, frame->GetFrameCodeAddress(), false, false))
+ if (DumpAddressOffsetFromFunction (s, sc, exe_ctx, frame->GetFrameCodeAddress(), false, false, false))
return true;
}
}
return false;
+ case Entry::Type::FunctionChanged:
+ return function_changed == true;
+
+ case Entry::Type::FunctionInitial:
+ return initial_function == true;
+
case Entry::Type::LineEntryFile:
if (sc && sc->line_entry.IsValid())
{
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
index 2f9012222c0..db8d575334e 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
@@ -792,25 +792,63 @@ const char *DisassemblerLLVMC::SymbolLookup (uint64_t value,
//std::string remove_this_prior_to_checkin;
Target *target = m_exe_ctx ? m_exe_ctx->GetTargetPtr() : NULL;
Address value_so_addr;
+ Address pc_so_addr;
if (m_inst->UsingFileAddress())
{
ModuleSP module_sp(m_inst->GetAddress().GetModule());
if (module_sp)
+ {
module_sp->ResolveFileAddress(value, value_so_addr);
+ module_sp->ResolveFileAddress(pc, pc_so_addr);
+ }
}
else if (target && !target->GetSectionLoadList().IsEmpty())
{
target->GetSectionLoadList().ResolveLoadAddress(value, value_so_addr);
+ target->GetSectionLoadList().ResolveLoadAddress(pc, pc_so_addr);
+ }
+
+ SymbolContext sym_ctx;
+ const uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol;
+ if (pc_so_addr.IsValid() && pc_so_addr.GetModule())
+ {
+ pc_so_addr.GetModule()->ResolveSymbolContextForAddress (pc_so_addr, resolve_scope, sym_ctx);
}
if (value_so_addr.IsValid() && value_so_addr.GetSection())
{
StreamString ss;
- value_so_addr.Dump (&ss,
- target,
- Address::DumpStyleResolvedDescriptionNoFunctionArguments,
- Address::DumpStyleSectionNameOffset);
+ bool format_omitting_current_func_name = false;
+ if (sym_ctx.symbol || sym_ctx.function)
+ {
+ AddressRange range;
+ if (sym_ctx.GetAddressRange (resolve_scope, 0, false, range)
+ && range.GetBaseAddress().IsValid()
+ && range.ContainsLoadAddress (value_so_addr, target))
+ {
+ format_omitting_current_func_name = true;
+ }
+ }
+
+ // If the "value" address (the target address we're symbolicating)
+ // is inside the same SymbolContext as the current instruction pc
+ // (pc_so_addr), don't print the full function name - just print it
+ // with DumpStyleNoFunctionName style, e.g. "<+36>".
+ if (format_omitting_current_func_name)
+ {
+ value_so_addr.Dump (&ss,
+ target,
+ Address::DumpStyleNoFunctionName,
+ Address::DumpStyleSectionNameOffset);
+ }
+ else
+ {
+ value_so_addr.Dump (&ss,
+ target,
+ Address::DumpStyleResolvedDescriptionNoFunctionArguments,
+ Address::DumpStyleSectionNameOffset);
+ }
if (!ss.GetString().empty())
{
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 0eb0f83d5f3..4eb244230cd 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -149,7 +149,7 @@ UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly (AddressRange&
StreamString strm;
lldb_private::FormatEntity::Entry format;
FormatEntity::Parse("${frame.pc}: ", format);
- inst->Dump(&strm, inst_list.GetMaxOpcocdeByteSize (), show_address, show_bytes, NULL, NULL, NULL, &format);
+ inst->Dump(&strm, inst_list.GetMaxOpcocdeByteSize (), show_address, show_bytes, NULL, NULL, NULL, &format, 0);
log->PutCString (strm.GetData());
}
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index 62ae6ac464c..d65462be526 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -129,15 +129,15 @@ SymbolContext::Clear(bool clear_target)
}
bool
-SymbolContext::DumpStopContext
-(
+SymbolContext::DumpStopContext (
Stream *s,
ExecutionContextScope *exe_scope,
const Address &addr,
bool show_fullpaths,
bool show_module,
bool show_inlined_frames,
- bool show_function_arguments
+ bool show_function_arguments,
+ bool show_function_name
) const
{
bool dumped_something = false;
@@ -155,7 +155,12 @@ SymbolContext::DumpStopContext
{
SymbolContext inline_parent_sc;
Address inline_parent_addr;
- if (show_function_arguments == false && function->GetMangled().GetName(Mangled::ePreferDemangledWithoutArguments))
+ if (show_function_name == false)
+ {
+ s->Printf("<");
+ dumped_something = true;
+ }
+ else if (show_function_arguments == false && function->GetMangled().GetName(Mangled::ePreferDemangledWithoutArguments))
{
dumped_something = true;
function->GetMangled().GetName(Mangled::ePreferDemangledWithoutArguments).Dump(s);
@@ -169,7 +174,13 @@ SymbolContext::DumpStopContext
if (addr.IsValid())
{
const addr_t function_offset = addr.GetOffset() - function->GetAddressRange().GetBaseAddress().GetOffset();
- if (function_offset)
+ if (show_function_name == false)
+ {
+ // Print +offset even if offset is 0
+ dumped_something = true;
+ s->Printf("+%" PRIu64 ">", function_offset);
+ }
+ else if (function_offset)
{
dumped_something = true;
s->Printf(" + %" PRIu64, function_offset);
@@ -202,7 +213,8 @@ SymbolContext::DumpStopContext
{
s->EOL();
s->Indent();
- return inline_parent_sc.DumpStopContext (s, exe_scope, inline_parent_addr, show_fullpaths, show_module, show_inlined_frames, show_function_arguments);
+ const bool show_function_name = true;
+ return inline_parent_sc.DumpStopContext (s, exe_scope, inline_parent_addr, show_fullpaths, show_module, show_inlined_frames, show_function_arguments, show_function_name);
}
}
else
@@ -218,7 +230,12 @@ SymbolContext::DumpStopContext
}
else if (symbol != nullptr)
{
- if (symbol->GetMangled().GetName())
+ if (show_function_name == false)
+ {
+ s->Printf("<");
+ dumped_something = true;
+ }
+ else if (symbol->GetMangled().GetName())
{
dumped_something = true;
if (symbol->GetType() == eSymbolTypeTrampoline)
@@ -229,7 +246,13 @@ SymbolContext::DumpStopContext
if (addr.IsValid() && symbol->ValueIsAddress())
{
const addr_t symbol_offset = addr.GetOffset() - symbol->GetAddress().GetOffset();
- if (symbol_offset)
+ if (show_function_name == false)
+ {
+ // Print +offset even if offset is 0
+ dumped_something = true;
+ s->Printf("+%" PRIu64 ">", symbol_offset);
+ }
+ else if (symbol_offset)
{
dumped_something = true;
s->Printf(" + %" PRIu64, symbol_offset);
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index 4c03a307296..3a734a19e8a 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -175,6 +175,7 @@ Variable::DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module)
sc.line_entry.Clear();
bool show_inlined_frames = false;
const bool show_function_arguments = true;
+ const bool show_function_name = true;
dumped_declaration_info = sc.DumpStopContext (s,
nullptr,
@@ -182,7 +183,8 @@ Variable::DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module)
show_fullpaths,
show_module,
show_inlined_frames,
- show_function_arguments);
+ show_function_arguments,
+ show_function_name);
if (sc.function)
s->PutChar(':');
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 01a8c9ab88f..9a610a5da10 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -1406,13 +1406,15 @@ StackFrame::Dump (Stream *strm, bool show_frame_index, bool show_fullpaths)
const bool show_module = true;
const bool show_inline = true;
const bool show_function_arguments = true;
+ const bool show_function_name = true;
m_sc.DumpStopContext (strm,
exe_ctx.GetBestExecutionContextScope(),
GetFrameCodeAddress(),
show_fullpaths,
show_module,
show_inline,
- show_function_arguments);
+ show_function_arguments,
+ show_function_name);
}
void
diff --git a/lldb/source/Target/ThreadPlanTracer.cpp b/lldb/source/Target/ThreadPlanTracer.cpp
index 0629eb9981e..59978c6f8fe 100644
--- a/lldb/source/Target/ThreadPlanTracer.cpp
+++ b/lldb/source/Target/ThreadPlanTracer.cpp
@@ -220,7 +220,8 @@ ThreadPlanAssemblyTracer::Log ()
NULL,
NULL,
NULL,
- disassemble_format);
+ disassemble_format,
+ 0);
}
}
}
OpenPOWER on IntegriCloud