From b786e7d099866448dac41d58e431dadf91e3371d Mon Sep 17 00:00:00 2001 From: Charles Davis Date: Tue, 21 Feb 2012 00:53:12 +0000 Subject: [PATCH] Pull side effects out of asserts. Fixes debugserver with NDEBUG defined. llvm-svn: 151013 --- lldb/tools/debugserver/source/DNB.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index 1b8632eb7179..6be22c7962f3 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -268,7 +268,8 @@ DNBProcessLaunch (const char *path, } else { - assert(AddProcessToMap(pid, processSP)); + bool res = AddProcessToMap(pid, processSP); + assert(res && "Couldn't add process to map!"); return pid; } } @@ -315,7 +316,8 @@ DNBProcessAttach (nub_process_t attach_pid, struct timespec *timeout, char *err_ if (pid != INVALID_NUB_PROCESS) { - assert(AddProcessToMap(pid, processSP)); + bool res = AddProcessToMap(pid, processSP); + assert(res && "Couldn't add process to map!"); spawn_waitpid_thread(pid); } }