]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/debug.h
Remove dwarf2_per_objfile::adjust
[thirdparty/binutils-gdb.git] / gdbserver / debug.h
CommitLineData
87ce2a04 1/* Debugging routines for the remote server for GDB.
1d506c26 2 Copyright (C) 2014-2024 Free Software Foundation, Inc.
87ce2a04
DE
3
4 This file is part of GDB.
5
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.
10
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.
15
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/>. */
18
1a5c2598
TT
19#ifndef GDBSERVER_DEBUG_H
20#define GDBSERVER_DEBUG_H
87ce2a04 21
c1bc0935 22#if !defined (IN_PROCESS_AGENT)
91f94053
SM
23extern bool remote_debug;
24
25/* Print a "remote" debug statement. */
26
27#define remote_debug_printf(fmt, ...) \
28 debug_prefixed_printf_cond (remote_debug, \
29 "remote", fmt, ##__VA_ARGS__)
aeb2e706
AH
30
31/* Switch all debug output to DEBUG_FILE. If DEBUG_FILE is nullptr or an
32 empty string, or if the file cannot be opened, then debug output is sent to
33 stderr. */
34void debug_set_output (const char *debug_file);
c1bc0935
AH
35#endif
36
f9d949fb
CB
37extern int using_threads;
38
39/* Enable miscellaneous debugging output. The name is historical - it
40 was originally used to debug LinuxThreads support. */
41
c68665c7 42extern bool debug_threads;
f9d949fb 43
c058728c
SM
44/* Print a "threads" debug statement. */
45
46#define threads_debug_printf(fmt, ...) \
47 debug_prefixed_printf_cond (debug_threads, \
48 "threads", fmt, ##__VA_ARGS__)
49
50/* Print "threads" enter/exit debug statements. */
51
52#define THREADS_SCOPED_DEBUG_ENTER_EXIT \
53 scoped_debug_enter_exit (debug_threads, "threads")
54
87ce2a04
DE
55extern int debug_timestamp;
56
87ce2a04 57void debug_flush (void);
87ce2a04 58
a7e559cc 59/* Async signal safe debug output function that calls write directly. */
8d6a48df 60ssize_t debug_write (const void *buf, size_t nbyte);
a7e559cc 61
1a5c2598 62#endif /* GDBSERVER_DEBUG_H */