Arduino-Debug
On-target sketch debugger for Arduino
|
#include "Arduino.h"
Go to the source code of this file.
Classes | |
class | Debug |
class | Debug::Variable |
Macros | |
#define | UNUSED(x) (void) (x) |
#define | UNLIKELY(x) __builtin_expect((x), false) |
#define | DEBUG_STREAM(dev) |
#define | ASSERT(cond) |
#define | BREAKPOINT() |
#define | BREAK_IF(cond) |
#define | CHECK_STACK(room) |
#define | OBSERVE_IF(cond, expr) |
#define | OBSERVE(expr) OBSERVE_IF(true,expr) |
#define | REGISTER(var) |
Typedefs | |
typedef const class __FlashStringHelper * | str_P |
Variables | |
class Debug | debug |
Copyright (C) 2015-2016, Mikael Patel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Definition in file Debug.h.
#define ASSERT | ( | cond | ) |
Assert the given condition. Calls debug handler if the assertion fails (the condition is false). Will not return if asserted.
[in] | cond | condition. |
#define BREAK_IF | ( | cond | ) |
Mark a conditional break point in the source code. Call the debug command handler with information about the file, line number and function name if the given condition is true.
[in] | cond | condition. |
#define BREAKPOINT | ( | ) |
Mark a break point in the source code. Call the debug command handler with information about the file, line number and function name.
#define CHECK_STACK | ( | room | ) |
Check for stack error.
[in] | room | required free space (default 128). |
#define DEBUG_STREAM | ( | dev | ) |
Start the debug command handler with information about the file, line number and function name.
[in] | dev | stream device. |
#define OBSERVE | ( | expr | ) | OBSERVE_IF(true,expr) |
#define OBSERVE_IF | ( | cond, | |
expr | |||
) |
Print the given expression to the debug stream if the condition is true.
[in] | cond | condition. |
[in] | expr | expression. |
#define REGISTER | ( | var | ) |
Register the given variable in the debug handler. The debug handler commands "variables" and "?var" will print information about the registered variable(s).
[in] | var | variable. |