summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/debug.cc8
-rw-r--r--src/base/debug.hh6
-rw-r--r--src/base/statistics.cc2
3 files changed, 12 insertions, 4 deletions
diff --git a/src/base/debug.cc b/src/base/debug.cc
index 1d7be5a9a..6f01b3fc0 100644
--- a/src/base/debug.cc
+++ b/src/base/debug.cc
@@ -35,12 +35,16 @@
#include "base/cprintf.hh"
+namespace Debug {
+
void
-debug_break()
+breakpoint()
{
#ifndef NDEBUG
kill(getpid(), SIGTRAP);
#else
- cprintf("debug_break suppressed, compiled with NDEBUG\n");
+ cprintf("Debug::breakpoint suppressed, compiled with NDEBUG\n");
#endif
}
+
+} // namespace Debug
diff --git a/src/base/debug.hh b/src/base/debug.hh
index b1577f782..ee7402912 100644
--- a/src/base/debug.hh
+++ b/src/base/debug.hh
@@ -31,6 +31,10 @@
#ifndef __BASE_DEBUG_HH__
#define __BASE_DEBUG_HH__
-void debug_break();
+namespace Debug {
+
+void breakpoint();
+
+} // namespace Debug
#endif // __BASE_DEBUG_HH__
diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index 5ee018b1c..fa3a4a0c9 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -130,7 +130,7 @@ Info::Info()
{
id = id_count++;
if (debug_break_id >= 0 and debug_break_id == id)
- debug_break();
+ Debug::breakpoint();
}
Info::~Info()