summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTrace.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/SBTrace.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/SBTrace.cpp')
-rw-r--r--lldb/source/API/SBTrace.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lldb/source/API/SBTrace.cpp b/lldb/source/API/SBTrace.cpp
index 71842fe775e..f11f68d794f 100644
--- a/lldb/source/API/SBTrace.cpp
+++ b/lldb/source/API/SBTrace.cpp
@@ -8,7 +8,6 @@
#include "SBReproducerPrivate.h"
#include "lldb/Target/Process.h"
-#include "lldb/Utility/Log.h"
#include "lldb/API/SBTrace.h"
#include "lldb/API/SBTraceOptions.h"
@@ -28,7 +27,6 @@ lldb::ProcessSP SBTrace::GetSP() const { return m_opaque_wp.lock(); }
size_t SBTrace::GetTraceData(SBError &error, void *buf, size_t size,
size_t offset, lldb::tid_t thread_id) {
ProcessSP process_sp(GetSP());
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
llvm::MutableArrayRef<uint8_t> buffer(static_cast<uint8_t *>(buf), size);
error.Clear();
@@ -37,7 +35,6 @@ size_t SBTrace::GetTraceData(SBError &error, void *buf, size_t size,
} else {
error.SetError(
process_sp->GetData(GetTraceUID(), thread_id, buffer, offset));
- LLDB_LOG(log, "SBTrace::bytes_read - {0}", buffer.size());
}
return buffer.size();
}
@@ -45,17 +42,14 @@ size_t SBTrace::GetTraceData(SBError &error, void *buf, size_t size,
size_t SBTrace::GetMetaData(SBError &error, void *buf, size_t size,
size_t offset, lldb::tid_t thread_id) {
ProcessSP process_sp(GetSP());
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
llvm::MutableArrayRef<uint8_t> buffer(static_cast<uint8_t *>(buf), size);
error.Clear();
if (!process_sp) {
error.SetErrorString("invalid process");
} else {
-
error.SetError(
process_sp->GetMetaData(GetTraceUID(), thread_id, buffer, offset));
- LLDB_LOG(log, "SBTrace::bytes_read - {0}", buffer.size());
}
return buffer.size();
}
OpenPOWER on IntegriCloud