gdb: resume ongoing step after handling fork or vfork
[deliverable/binutils-gdb.git] / gdb / remote.h
CommitLineData
c2c6d25f 1/* Remote target communications for serial-line targets in custom GDB protocol
88b9d363 2 Copyright (C) 1999-2022 Free Software Foundation, Inc.
c2c6d25f
JM
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
a9762ec7 8 the Free Software Foundation; either version 3 of the License, or
c2c6d25f
JM
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
a9762ec7 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c2c6d25f
JM
18
19#ifndef REMOTE_H
20#define REMOTE_H
21
722247f1
YQ
22#include "remote-notif.h"
23
29709017 24struct target_desc;
6b8edb51 25struct remote_target;
29709017 26
02349803
SM
27/* True when printing "remote" debug statements is enabled. */
28
29extern bool remote_debug;
cda09ec9 30
2189c312
SM
31/* Print a "remote" debug statement. */
32
33#define remote_debug_printf(fmt, ...) \
34 debug_prefixed_printf_cond (remote_debug, "remote", fmt, ##__VA_ARGS__)
35
36/* Same as the above, but don't include the function name. */
37
38#define remote_debug_printf_nofunc(fmt, ...) \
39 debug_prefixed_printf_cond_nofunc (remote_debug, "remote", \
40 fmt, ##__VA_ARGS__)
41
42/* Print "remote" enter/exit debug statements. */
43
44#define REMOTE_SCOPED_DEBUG_ENTER_EXIT \
45 scoped_debug_enter_exit (remote_debug, "remote")
46
c2c6d25f 47/* Read a packet from the remote machine, with error checking, and
6d820c5c
DJ
48 store it in *BUF. Resize *BUF using xrealloc if necessary to hold
49 the result, and update *SIZEOF_BUF. If FOREVER, wait forever
50 rather than timing out; this is used (in synchronous mode) to wait
51 for a target that is is executing user code to stop. */
c2c6d25f 52
6b8edb51
PA
53extern void getpkt (remote_target *remote,
54 char **buf, long *sizeof_buf, int forever);
c2c6d25f
JM
55
56/* Send a packet to the remote machine, with error checking. The data
57 of the packet is in BUF. The string in BUF can be at most PBUFSIZ
58 - 5 to account for the $, # and checksum, and for a possible /0 if
59 we are debugging (remote_debug) and want to print the sent packet
0df8b418 60 as a string. */
c2c6d25f 61
6b8edb51 62extern int putpkt (remote_target *remote, const char *buf);
c2c6d25f 63
29709017
DJ
64void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
65 const struct target_desc *tdesc);
c8d5aac9 66void register_remote_support_xml (const char *);
29709017 67
a6b151f1
DJ
68void remote_file_put (const char *local_file, const char *remote_file,
69 int from_tty);
70void remote_file_get (const char *remote_file, const char *local_file,
71 int from_tty);
72void remote_file_delete (const char *remote_file, int from_tty);
73
c21236dc
PA
74extern int remote_register_number_and_offset (struct gdbarch *gdbarch,
75 int regnum, int *pnum,
76 int *poffset);
77
6b8edb51
PA
78extern void remote_notif_get_pending_events (remote_target *remote,
79 struct notif_client *np);
c39ebbf4 80extern bool remote_target_is_non_stop_p (remote_target *t);
c2c6d25f 81#endif
This page took 2.096816 seconds and 4 git commands to generate.