summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Function.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-09-10 01:30:46 +0000
committerGreg Clayton <gclayton@apple.com>2010-09-10 01:30:46 +0000
commitc9800667e406820f0633a5085220d133c1ae93d4 (patch)
treea0ba2bb9375f9f8c84329037cd3fa0360a2bbb10 /lldb/source/Symbol/Function.cpp
parentbf4070756f4acbae9a556c56003f0dd71521288e (diff)
downloadbcm5719-llvm-c9800667e406820f0633a5085220d133c1ae93d4.tar.gz
bcm5719-llvm-c9800667e406820f0633a5085220d133c1ae93d4.zip
Cleaned up the output of "image lookup --address <ADDR>" which involved
cleaning up the output of many GetDescription objects that are part of a symbol context. This fixes an issue where no ranges were being printed out for functions, blocks and symbols. llvm-svn: 113571
Diffstat (limited to 'lldb/source/Symbol/Function.cpp')
-rw-r--r--lldb/source/Symbol/Function.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 5f9adbbbe12..43a668fc35a 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -18,6 +18,7 @@
#include "clang/AST/Type.h"
#include "clang/AST/CanonicalType.h"
+using namespace lldb;
using namespace lldb_private;
//----------------------------------------------------------------------
@@ -328,9 +329,14 @@ void
Function::GetDescription(Stream *s, lldb::DescriptionLevel level, Process *process)
{
Type* func_type = GetType();
- *s << '"' << func_type->GetName() << "\", id = " << (const UserID&)*this;
- *s << ", range = ";
- GetAddressRange().Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+ *s << "id = " << (const UserID&)*this << ", name = \"" << func_type->GetName() << "\", range = ";
+
+ Address::DumpStyle fallback_style;
+ if (level == eDescriptionLevelVerbose)
+ fallback_style = Address::DumpStyleModuleWithFileAddress;
+ else
+ fallback_style = Address::DumpStyleFileAddress;
+ GetAddressRange().Dump(s, process, Address::DumpStyleLoadAddress, fallback_style);
}
void
OpenPOWER on IntegriCloud