summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBBreakpointLocation.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/SBBreakpointLocation.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/SBBreakpointLocation.cpp')
-rw-r--r--lldb/source/API/SBBreakpointLocation.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp
index 66b2d02de39..290d95d4b55 100644
--- a/lldb/source/API/SBBreakpointLocation.cpp
+++ b/lldb/source/API/SBBreakpointLocation.cpp
@@ -22,7 +22,6 @@
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/ThreadSpec.h"
-#include "lldb/Utility/Log.h"
#include "lldb/Utility/Stream.h"
#include "lldb/lldb-defines.h"
#include "lldb/lldb-types.h"
@@ -39,14 +38,6 @@ SBBreakpointLocation::SBBreakpointLocation(
: m_opaque_wp(break_loc_sp) {
LLDB_RECORD_CONSTRUCTOR(SBBreakpointLocation,
(const lldb::BreakpointLocationSP &), break_loc_sp);
-
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
- if (log) {
- SBStream sstr;
- GetDescription(sstr, lldb::eDescriptionLevelBrief);
- LLDB_LOG(log, "location = {0} ({1})", break_loc_sp.get(), sstr.GetData());
- }
}
SBBreakpointLocation::SBBreakpointLocation(const SBBreakpointLocation &rhs)
@@ -216,10 +207,7 @@ void SBBreakpointLocation::SetScriptCallbackFunction(
LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction,
(const char *), callback_function_name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointLocationSP loc_sp = GetSP();
- LLDB_LOG(log, "location = {0}, callback = {1}", loc_sp.get(),
- callback_function_name);
if (loc_sp) {
std::lock_guard<std::recursive_mutex> guard(
@@ -240,10 +228,7 @@ SBBreakpointLocation::SetScriptCallbackBody(const char *callback_body_text) {
LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointLocation, SetScriptCallbackBody,
(const char *), callback_body_text);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointLocationSP loc_sp = GetSP();
- LLDB_LOG(log, "location = {0}: callback body:\n{1}", loc_sp.get(),
- callback_body_text);
SBError sb_error;
if (loc_sp) {
@@ -452,7 +437,6 @@ SBBreakpoint SBBreakpointLocation::GetBreakpoint() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBreakpoint, SBBreakpointLocation,
GetBreakpoint);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointLocationSP loc_sp = GetSP();
SBBreakpoint sb_bp;
@@ -462,11 +446,5 @@ SBBreakpoint SBBreakpointLocation::GetBreakpoint() {
sb_bp = loc_sp->GetBreakpoint().shared_from_this();
}
- if (log) {
- SBStream sstr;
- sb_bp.GetDescription(sstr);
- LLDB_LOG(log, "location = {0}, breakpoint = {1} ({2})", loc_sp.get(),
- sb_bp.GetSP().get(), sstr.GetData());
- }
return LLDB_RECORD_RESULT(sb_bp);
}
OpenPOWER on IntegriCloud