debug.cc (8229:78bf55f23338) | debug.cc (8231:51cf7f3cf9ac) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 21 unchanged lines hidden (view full) --- 30 31#include <sys/types.h> 32#include <unistd.h> 33 34#include <csignal> 35 36#include "base/cprintf.hh" 37 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 21 unchanged lines hidden (view full) --- 30 31#include <sys/types.h> 32#include <unistd.h> 33 34#include <csignal> 35 36#include "base/cprintf.hh" 37 |
38namespace Debug { 39 |
|
38void | 40void |
39debug_break() | 41breakpoint() |
40{ 41#ifndef NDEBUG 42 kill(getpid(), SIGTRAP); 43#else | 42{ 43#ifndef NDEBUG 44 kill(getpid(), SIGTRAP); 45#else |
44 cprintf("debug_break suppressed, compiled with NDEBUG\n"); | 46 cprintf("Debug::breakpoint suppressed, compiled with NDEBUG\n"); |
45#endif 46} | 47#endif 48} |
49 50} // namespace Debug |
|