]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/remote.h
gdb/
[thirdparty/binutils-gdb.git] / gdb / remote.h
CommitLineData
c2c6d25f 1/* Remote target communications for serial-line targets in custom GDB protocol
0b302171 2 Copyright (C) 1999, 2003-2012 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
29709017
DJ
22struct target_desc;
23
c2c6d25f 24/* Read a packet from the remote machine, with error checking, and
6d820c5c
DJ
25 store it in *BUF. Resize *BUF using xrealloc if necessary to hold
26 the result, and update *SIZEOF_BUF. If FOREVER, wait forever
27 rather than timing out; this is used (in synchronous mode) to wait
28 for a target that is is executing user code to stop. */
c2c6d25f 29
6d820c5c 30extern void getpkt (char **buf, long *sizeof_buf, int forever);
c2c6d25f
JM
31
32/* Send a packet to the remote machine, with error checking. The data
33 of the packet is in BUF. The string in BUF can be at most PBUFSIZ
34 - 5 to account for the $, # and checksum, and for a possible /0 if
35 we are debugging (remote_debug) and want to print the sent packet
0df8b418 36 as a string. */
c2c6d25f
JM
37
38extern int putpkt (char *buf);
39
176a6961 40extern char *unpack_varlen_hex (char *buff, ULONGEST *result);
c2c6d25f 41
2df3850c
JM
42extern void async_remote_interrupt_twice (void *arg);
43
29709017
DJ
44void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
45 const struct target_desc *tdesc);
c8d5aac9 46void register_remote_support_xml (const char *);
29709017 47
a6b151f1
DJ
48void remote_file_put (const char *local_file, const char *remote_file,
49 int from_tty);
50void remote_file_get (const char *remote_file, const char *local_file,
51 int from_tty);
52void remote_file_delete (const char *remote_file, int from_tty);
53
f1838a98
UW
54bfd *remote_bfd_open (const char *remote_file, const char *target);
55
56int remote_filename_p (const char *filename);
57
c21236dc
PA
58extern int remote_register_number_and_offset (struct gdbarch *gdbarch,
59 int regnum, int *pnum,
60 int *poffset);
61
c2c6d25f 62#endif