summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBDeclaration.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-03-07 22:47:13 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-03-07 22:47:13 +0000
commit581af8b09da31fc304f0c297526427c6bca3de14 (patch)
tree184339f41afce1f3f515bd1e2f7f450b7ede191d /lldb/source/API/SBDeclaration.cpp
parentd672e533d5cbd37c7a5f623565ece47167dec411 (diff)
downloadbcm5719-llvm-581af8b09da31fc304f0c297526427c6bca3de14.tar.gz
bcm5719-llvm-581af8b09da31fc304f0c297526427c6bca3de14.zip
[SBAPI] Log from record macro
The current record macros already log the function being called. This patch extends the macros to also log their input arguments and removes explicit logging from the SB API. This might degrade the amount of information in some cases (because of smarter casts or efforts to log return values). However I think this is outweighed by the increased coverage and consistency. Furthermore, using the reproducer infrastructure, diagnosing bugs in the API layer should become much easier compared to relying on log messages. Differential revision: https://reviews.llvm.org/D59101 llvm-svn: 355649
Diffstat (limited to 'lldb/source/API/SBDeclaration.cpp')
-rw-r--r--lldb/source/API/SBDeclaration.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/lldb/source/API/SBDeclaration.cpp b/lldb/source/API/SBDeclaration.cpp
index 971f46e3456..9283ebe37a6 100644
--- a/lldb/source/API/SBDeclaration.cpp
+++ b/lldb/source/API/SBDeclaration.cpp
@@ -12,7 +12,6 @@
#include "lldb/API/SBStream.h"
#include "lldb/Host/PosixApi.h"
#include "lldb/Symbol/Declaration.h"
-#include "lldb/Utility/Log.h"
#include "lldb/Utility/Stream.h"
#include <limits.h>
@@ -63,19 +62,11 @@ SBFileSpec SBDeclaration::GetFileSpec() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBDeclaration,
GetFileSpec);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
if (m_opaque_up.get() && m_opaque_up->GetFile())
sb_file_spec.SetFileSpec(m_opaque_up->GetFile());
- if (log) {
- SBStream sstr;
- sb_file_spec.GetDescription(sstr);
- log->Printf("SBLineEntry(%p)::GetFileSpec () => SBFileSpec(%p): %s",
- static_cast<void *>(m_opaque_up.get()),
- static_cast<const void *>(sb_file_spec.get()), sstr.GetData());
- }
return LLDB_RECORD_RESULT(sb_file_spec);
}
@@ -83,15 +74,11 @@ SBFileSpec SBDeclaration::GetFileSpec() const {
uint32_t SBDeclaration::GetLine() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDeclaration, GetLine);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
uint32_t line = 0;
if (m_opaque_up)
line = m_opaque_up->GetLine();
- if (log)
- log->Printf("SBLineEntry(%p)::GetLine () => %u",
- static_cast<void *>(m_opaque_up.get()), line);
return line;
}
OpenPOWER on IntegriCloud