summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-09-06 19:52:49 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-09-06 19:52:49 +0000
commit86f97a417d816faaec7ecb5e4f11bbb277a1ad84 (patch)
tree19e0da14e3c9709d1098573ce4e040d21342d3e2 /lldb
parentfed48af3def19576dee6d499126f5de80d3676e8 (diff)
downloadbcm5719-llvm-86f97a417d816faaec7ecb5e4f11bbb277a1ad84.tar.gz
bcm5719-llvm-86f97a417d816faaec7ecb5e4f11bbb277a1ad84.zip
DNBBreakpoint::SetEnabled() should take a bool, not a uint32_t, as its input argument.
Plus for watchpoint related functions, add new macros INVALID_NUB_WATCH_ID and NUB_WATCH_ID_IS_VALID and use them, instead. llvm-svn: 139163
Diffstat (limited to 'lldb')
-rw-r--r--lldb/tools/debugserver/source/DNB.cpp12
-rw-r--r--lldb/tools/debugserver/source/DNBBreakpoint.h2
-rw-r--r--lldb/tools/debugserver/source/DNBDefs.h2
3 files changed, 9 insertions, 7 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp
index a4773a573bf..8e908b76c4d 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -972,13 +972,13 @@ DNBWatchpointSet (nub_process_t pid, nub_addr_t addr, nub_size_t size, uint32_t
{
return procSP->CreateWatchpoint(addr, size, watch_flags, hardware, THREAD_NULL);
}
- return INVALID_NUB_BREAK_ID;
+ return INVALID_NUB_WATCH_ID;
}
nub_bool_t
DNBWatchpointClear (nub_process_t pid, nub_watch_t watchID)
{
- if (NUB_BREAK_ID_IS_VALID(watchID))
+ if (NUB_WATCH_ID_IS_VALID(watchID))
{
MachProcessSP procSP;
if (GetProcessSP (pid, procSP))
@@ -992,7 +992,7 @@ DNBWatchpointClear (nub_process_t pid, nub_watch_t watchID)
nub_ssize_t
DNBWatchpointGetHitCount (nub_process_t pid, nub_watch_t watchID)
{
- if (NUB_BREAK_ID_IS_VALID(watchID))
+ if (NUB_WATCH_ID_IS_VALID(watchID))
{
MachProcessSP procSP;
if (GetProcessSP (pid, procSP))
@@ -1008,7 +1008,7 @@ DNBWatchpointGetHitCount (nub_process_t pid, nub_watch_t watchID)
nub_ssize_t
DNBWatchpointGetIgnoreCount (nub_process_t pid, nub_watch_t watchID)
{
- if (NUB_BREAK_ID_IS_VALID(watchID))
+ if (NUB_WATCH_ID_IS_VALID(watchID))
{
MachProcessSP procSP;
if (GetProcessSP (pid, procSP))
@@ -1024,7 +1024,7 @@ DNBWatchpointGetIgnoreCount (nub_process_t pid, nub_watch_t watchID)
nub_bool_t
DNBWatchpointSetIgnoreCount (nub_process_t pid, nub_watch_t watchID, nub_size_t ignore_count)
{
- if (NUB_BREAK_ID_IS_VALID(watchID))
+ if (NUB_WATCH_ID_IS_VALID(watchID))
{
MachProcessSP procSP;
if (GetProcessSP (pid, procSP))
@@ -1047,7 +1047,7 @@ DNBWatchpointSetIgnoreCount (nub_process_t pid, nub_watch_t watchID, nub_size_t
nub_bool_t
DNBWatchpointSetCallback (nub_process_t pid, nub_watch_t watchID, DNBCallbackBreakpointHit callback, void *baton)
{
- if (NUB_BREAK_ID_IS_VALID(watchID))
+ if (NUB_WATCH_ID_IS_VALID(watchID))
{
MachProcessSP procSP;
if (GetProcessSP (pid, procSP))
diff --git a/lldb/tools/debugserver/source/DNBBreakpoint.h b/lldb/tools/debugserver/source/DNBBreakpoint.h
index 28c967a0525..4c2a11228b0 100644
--- a/lldb/tools/debugserver/source/DNBBreakpoint.h
+++ b/lldb/tools/debugserver/source/DNBBreakpoint.h
@@ -73,7 +73,7 @@ public:
}
return false;
}
- void SetEnabled(uint32_t enabled)
+ void SetEnabled(bool enabled)
{
if (!enabled)
SetHardwareIndex(INVALID_NUB_HW_INDEX);
diff --git a/lldb/tools/debugserver/source/DNBDefs.h b/lldb/tools/debugserver/source/DNBDefs.h
index fb259f29c7c..4b4729307d5 100644
--- a/lldb/tools/debugserver/source/DNBDefs.h
+++ b/lldb/tools/debugserver/source/DNBDefs.h
@@ -66,11 +66,13 @@ typedef uint32_t nub_bool_t;
#define INVALID_NUB_BREAK_ID ((nub_break_t)0)
#define INVALID_NUB_PROCESS ((nub_process_t)0)
#define INVALID_NUB_THREAD ((nub_thread_t)0)
+#define INVALID_NUB_WATCH_ID ((nub_watch_t)0)
#define INVALID_NUB_HW_INDEX UINT32_MAX
#define INVALID_NUB_REGNUM UINT32_MAX
#define NUB_GENERIC_ERROR UINT32_MAX
#define NUB_BREAK_ID_IS_VALID(breakID) ((breakID) != (INVALID_NUB_BREAK_ID))
+#define NUB_WATCH_ID_IS_VALID(watchID) ((watchID) != (INVALID_NUB_WATCH_ID))
// Watchpoint types
#define WATCH_TYPE_READ (1u << 0)
OpenPOWER on IntegriCloud