summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2015-02-13 23:24:21 +0000
committerJason Molenda <jmolenda@apple.com>2015-02-13 23:24:21 +0000
commitc980fa92ebac26a059e0d157362e82ae2f0c7d3a (patch)
tree0de6fab178c9e2f0ad661e8ceb1961fe60296b9c /lldb/source/Symbol
parenteff99e8ac53a83bbf9e408f6f59669132b272ae3 (diff)
downloadbcm5719-llvm-c980fa92ebac26a059e0d157362e82ae2f0c7d3a.tar.gz
bcm5719-llvm-c980fa92ebac26a059e0d157362e82ae2f0c7d3a.zip
Change the default disassembly format again. First attempt at
changing it was in r219544 - after living on that for a few months, I wanted to take another crack at this. The disassembly-format setting still exists and the old format can be user specified with a setting like ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: This patch was discussed in http://reviews.llvm.org/D7578 <rdar://problem/19726421> llvm-svn: 229186
Diffstat (limited to 'lldb/source/Symbol')
-rw-r--r--lldb/source/Symbol/SymbolContext.cpp39
-rw-r--r--lldb/source/Symbol/Variable.cpp4
2 files changed, 34 insertions, 9 deletions
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(':');
OpenPOWER on IntegriCloud