summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBBreakpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBBreakpoint.cpp')
-rw-r--r--lldb/source/API/SBBreakpoint.cpp67
1 files changed, 2 insertions, 65 deletions
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 7ea68e28461..d21a375d0e2 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -32,7 +32,6 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadSpec.h"
-#include "lldb/Utility/Log.h"
#include "lldb/Utility/Stream.h"
#include "SBBreakpointOptionCommon.h"
@@ -83,14 +82,11 @@ bool SBBreakpoint::operator!=(const lldb::SBBreakpoint &rhs) {
break_id_t SBBreakpoint::GetID() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::break_id_t, SBBreakpoint, GetID);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
break_id_t break_id = LLDB_INVALID_BREAK_ID;
BreakpointSP bkpt_sp = GetSP();
if (bkpt_sp)
break_id = bkpt_sp->GetID();
- LLDB_LOG(log, "breakpoint = {0}, id = {1}", bkpt_sp.get(), break_id);
return break_id;
}
@@ -195,11 +191,8 @@ SBBreakpointLocation SBBreakpoint::GetLocationAtIndex(uint32_t index) {
void SBBreakpoint::SetEnabled(bool enable) {
LLDB_RECORD_METHOD(void, SBBreakpoint, SetEnabled, (bool), enable);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, enable = {1}", bkpt_sp.get(), enable);
-
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
bkpt_sp->GetTarget().GetAPIMutex());
@@ -222,11 +215,8 @@ bool SBBreakpoint::IsEnabled() {
void SBBreakpoint::SetOneShot(bool one_shot) {
LLDB_RECORD_METHOD(void, SBBreakpoint, SetOneShot, (bool), one_shot);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, one_shot = {1}", bkpt_sp.get(), one_shot);
-
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
bkpt_sp->GetTarget().GetAPIMutex());
@@ -261,11 +251,8 @@ bool SBBreakpoint::IsInternal() {
void SBBreakpoint::SetIgnoreCount(uint32_t count) {
LLDB_RECORD_METHOD(void, SBBreakpoint, SetIgnoreCount, (uint32_t), count);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, count = {1}", bkpt_sp.get(), count);
-
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
bkpt_sp->GetTarget().GetAPIMutex());
@@ -332,9 +319,6 @@ uint32_t SBBreakpoint::GetHitCount() const {
count = bkpt_sp->GetHitCount();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, count = {1}", bkpt_sp.get(), count);
-
return count;
}
@@ -349,9 +333,6 @@ uint32_t SBBreakpoint::GetIgnoreCount() const {
count = bkpt_sp->GetIgnoreCount();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, count = {1}", bkpt_sp.get(), count);
-
return count;
}
@@ -364,8 +345,6 @@ void SBBreakpoint::SetThreadID(tid_t tid) {
bkpt_sp->GetTarget().GetAPIMutex());
bkpt_sp->SetThreadID(tid);
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, tid = {1:x}", bkpt_sp.get(), tid);
}
tid_t SBBreakpoint::GetThreadID() {
@@ -379,17 +358,13 @@ tid_t SBBreakpoint::GetThreadID() {
tid = bkpt_sp->GetThreadID();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, tid = {1:x}", bkpt_sp.get(), tid);
return tid;
}
void SBBreakpoint::SetThreadIndex(uint32_t index) {
LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadIndex, (uint32_t), index);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, index = {1}", bkpt_sp.get(), index);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
bkpt_sp->GetTarget().GetAPIMutex());
@@ -410,8 +385,6 @@ uint32_t SBBreakpoint::GetThreadIndex() const {
if (thread_spec != nullptr)
thread_idx = thread_spec->GetIndex();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, index = {1}", bkpt_sp.get(), thread_idx);
return thread_idx;
}
@@ -420,9 +393,7 @@ void SBBreakpoint::SetThreadName(const char *thread_name) {
LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadName, (const char *),
thread_name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), thread_name);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
@@ -444,8 +415,6 @@ const char *SBBreakpoint::GetThreadName() const {
if (thread_spec != nullptr)
name = thread_spec->GetName();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name);
return name;
}
@@ -454,10 +423,7 @@ void SBBreakpoint::SetQueueName(const char *queue_name) {
LLDB_RECORD_METHOD(void, SBBreakpoint, SetQueueName, (const char *),
queue_name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, queue_name = {1}", bkpt_sp.get(),
- queue_name);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
bkpt_sp->GetTarget().GetAPIMutex());
@@ -478,8 +444,6 @@ const char *SBBreakpoint::GetQueueName() const {
if (thread_spec)
name = thread_spec->GetQueueName();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name);
return name;
}
@@ -495,9 +459,6 @@ size_t SBBreakpoint::GetNumResolvedLocations() const {
bkpt_sp->GetTarget().GetAPIMutex());
num_resolved = bkpt_sp->GetNumResolvedLocations();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, num_resolved = {1}", bkpt_sp.get(),
- num_resolved);
return num_resolved;
}
@@ -511,8 +472,6 @@ size_t SBBreakpoint::GetNumLocations() const {
bkpt_sp->GetTarget().GetAPIMutex());
num_locs = bkpt_sp->GetNumLocations();
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- LLDB_LOG(log, "breakpoint = {0}, num_locs = {1}", bkpt_sp.get(), num_locs);
return num_locs;
}
@@ -613,10 +572,7 @@ SBError SBBreakpoint::AddLocation(SBAddress &address) {
void SBBreakpoint
::SetCallback(SBBreakpointHitCallback callback,
void *baton) {
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, callback = {1}, baton = {2}", bkpt_sp.get(),
- callback, baton);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
@@ -633,10 +589,7 @@ void SBBreakpoint::SetScriptCallbackFunction(
LLDB_RECORD_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
(const char *), callback_function_name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, callback = {1}", bkpt_sp.get(),
- callback_function_name);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
@@ -655,10 +608,7 @@ SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) {
LLDB_RECORD_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody,
(const char *), callback_body_text);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, callback body:\n{1}", bkpt_sp.get(),
- callback_body_text);
SBError sb_error;
if (bkpt_sp) {
@@ -681,9 +631,7 @@ SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) {
bool SBBreakpoint::AddName(const char *new_name) {
LLDB_RECORD_METHOD(bool, SBBreakpoint, AddName, (const char *), new_name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), new_name);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
@@ -692,12 +640,7 @@ bool SBBreakpoint::AddName(const char *new_name) {
// probably more annoying to have to provide it.
bkpt_sp->GetTarget().AddNameToBreakpoint(bkpt_sp, new_name, error);
if (error.Fail())
- {
- if (log)
- log->Printf("Failed to add name: '%s' to breakpoint: %s",
- new_name, error.AsCString());
return false;
- }
}
return true;
@@ -707,24 +650,20 @@ void SBBreakpoint::RemoveName(const char *name_to_remove) {
LLDB_RECORD_METHOD(void, SBBreakpoint, RemoveName, (const char *),
name_to_remove);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name_to_remove);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
bkpt_sp->GetTarget().GetAPIMutex());
- bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp,
- ConstString(name_to_remove));
+ bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp,
+ ConstString(name_to_remove));
}
}
bool SBBreakpoint::MatchesName(const char *name) {
LLDB_RECORD_METHOD(bool, SBBreakpoint, MatchesName, (const char *), name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name);
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
@@ -739,9 +678,7 @@ void SBBreakpoint::GetNames(SBStringList &names) {
LLDB_RECORD_METHOD(void, SBBreakpoint, GetNames, (lldb::SBStringList &),
names);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
BreakpointSP bkpt_sp = GetSP();
- LLDB_LOG(log, "breakpoint = {0}", bkpt_sp.get());
if (bkpt_sp) {
std::lock_guard<std::recursive_mutex> guard(
OpenPOWER on IntegriCloud