1/* 2 * Copyright (c) 2016 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9#ifndef DEBUG_DEBUG_H_ 10#define DEBUG_DEBUG_H_ 1 11 12 13//#define DEBUG_ENABLED 1 14 15/***************************************************************** 16 * Debug printer: 17 *****************************************************************/ 18 19#if defined(DEBUG_ENABLED) 20#define DEBUG(x...) do { printf("DEBUG: %s.%d:%s:%d: ", \ 21 disp_name(), disp_get_core_id(), __func__, __LINE__); \ 22 printf(x);\ 23 } while (0) 24 25#else 26#define DEBUG(x...) ((void)0) 27#endif 28 29#endif /* DEBUG_DEBUG_H_ */ 30