1 /* Debugging routines for the remote server for GDB.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 #ifndef GDBSERVER_DEBUG_H
20 #define GDBSERVER_DEBUG_H
22 #if !defined (IN_PROCESS_AGENT)
23 extern int remote_debug;
26 extern int debug_threads;
27 extern int debug_timestamp;
29 void debug_flush (void);
30 void do_debug_enter (const char *function_name);
31 void do_debug_exit (const char *function_name);
33 /* These macros are for use in major functions that produce a lot of
34 debugging output. They help identify in the mass of debugging output
35 when these functions enter and exit. debug_enter is intended to be
36 called at the start of a function, before any other debugging output.
37 debug_exit is intended to be called at the end of the same function,
38 after all debugging output. */
40 #define debug_enter() \
41 do { do_debug_enter (FUNCTION_NAME); } while (0)
42 #define debug_exit() \
43 do { do_debug_exit (FUNCTION_NAME); } while (0)
45 #define debug_enter() \
47 #define debug_exit() \
51 #endif /* GDBSERVER_DEBUG_H */