[Lldb-commits] [lldb] r139163 - in /lldb/trunk/tools/debugserver/source: DNB.cpp DNBBreakpoint.h DNBDefs.h
Johnny Chen
johnny.chen at apple.com
Tue Sep 6 12:52:50 PDT 2011
Author: johnny
Date: Tue Sep 6 14:52:49 2011
New Revision: 139163
URL: http://llvm.org/viewvc/llvm-project?rev=139163&view=rev
Log:
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.
Modified:
lldb/trunk/tools/debugserver/source/DNB.cpp
lldb/trunk/tools/debugserver/source/DNBBreakpoint.h
lldb/trunk/tools/debugserver/source/DNBDefs.h
Modified: lldb/trunk/tools/debugserver/source/DNB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNB.cpp?rev=139163&r1=139162&r2=139163&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNB.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNB.cpp Tue Sep 6 14:52:49 2011
@@ -972,13 +972,13 @@
{
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 @@
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 @@
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 @@
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 @@
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))
Modified: lldb/trunk/tools/debugserver/source/DNBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBBreakpoint.h?rev=139163&r1=139162&r2=139163&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBBreakpoint.h (original)
+++ lldb/trunk/tools/debugserver/source/DNBBreakpoint.h Tue Sep 6 14:52:49 2011
@@ -73,7 +73,7 @@
}
return false;
}
- void SetEnabled(uint32_t enabled)
+ void SetEnabled(bool enabled)
{
if (!enabled)
SetHardwareIndex(INVALID_NUB_HW_INDEX);
Modified: lldb/trunk/tools/debugserver/source/DNBDefs.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBDefs.h?rev=139163&r1=139162&r2=139163&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBDefs.h (original)
+++ lldb/trunk/tools/debugserver/source/DNBDefs.h Tue Sep 6 14:52:49 2011
@@ -66,11 +66,13 @@
#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)
More information about the lldb-commits
mailing list