summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBFunction.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-10-31 03:01:06 +0000
committerGreg Clayton <gclayton@apple.com>2010-10-31 03:01:06 +0000
commitcfd1aced7ea66eda9b23c227cdd76a2289150a13 (patch)
tree24d18ab977aac38caf781ac1f53b7bdb42a3c4d0 /lldb/source/API/SBFunction.cpp
parenta5df61a341ab35738a2788f222bd9799a060e2ea (diff)
downloadbcm5719-llvm-cfd1aced7ea66eda9b23c227cdd76a2289150a13.tar.gz
bcm5719-llvm-cfd1aced7ea66eda9b23c227cdd76a2289150a13.zip
Cleaned up the API logging a lot more to reduce redundant information and
keep the file size a bit smaller. Exposed SBValue::GetExpressionPath() so SBValue users can get an expression path for their values. llvm-svn: 117851
Diffstat (limited to 'lldb/source/API/SBFunction.cpp')
-rw-r--r--lldb/source/API/SBFunction.cpp46
1 files changed, 21 insertions, 25 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index 2efd37c31ba..34f879af709 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -30,16 +30,6 @@ SBFunction::SBFunction () :
SBFunction::SBFunction (lldb_private::Function *lldb_object_ptr) :
m_opaque_ptr (lldb_object_ptr)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
-
- if (log)
- {
- SBStream sstr;
- GetDescription (sstr);
- log->Printf ("SBFunction::SBFunction (lldb_object_ptr=%p) => this.obj = %p ('%s')", lldb_object_ptr,
- m_opaque_ptr, sstr.GetData());
-
- }
}
SBFunction::~SBFunction ()
@@ -56,30 +46,36 @@ SBFunction::IsValid () const
const char *
SBFunction::GetName() const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
-
- //if (log)
- // log->Printf ("SBFunction::GetName ()");
-
+ const char *cstr = NULL;
if (m_opaque_ptr)
- {
- if (log)
- log->Printf ("SBFunction::GetName (this.obj=%p) => '%s'", m_opaque_ptr,
- m_opaque_ptr->GetMangled().GetName().AsCString());
- return m_opaque_ptr->GetMangled().GetName().AsCString();
- }
+ cstr = m_opaque_ptr->GetMangled().GetName().AsCString();
+ Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
- log->Printf ("SBFunction::GetName (this.obj=%p) => NULL", m_opaque_ptr);
- return NULL;
+ {
+ if (cstr)
+ log->Printf ("SBFunction(%p)::GetName () => \"%s\"", m_opaque_ptr, cstr);
+ else
+ log->Printf ("SBFunction(%p)::GetName () => NULL", m_opaque_ptr);
+ }
+ return cstr;
}
const char *
SBFunction::GetMangledName () const
{
+ const char *cstr = NULL;
if (m_opaque_ptr)
- return m_opaque_ptr->GetMangled().GetMangledName().AsCString();
- return NULL;
+ cstr = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
+ Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ if (log)
+ {
+ if (cstr)
+ log->Printf ("SBFunction(%p)::GetMangledName () => \"%s\"", m_opaque_ptr, cstr);
+ else
+ log->Printf ("SBFunction(%p)::GetMangledName () => NULL", m_opaque_ptr);
+ }
+ return cstr;
}
bool
OpenPOWER on IntegriCloud