gdb/
[deliverable/binutils-gdb.git] / gdb / remote.h
1 /* Remote target communications for serial-line targets in custom GDB protocol
2 Copyright (C) 1999, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #ifndef REMOTE_H
21 #define REMOTE_H
22
23 struct target_desc;
24
25 /* Read a packet from the remote machine, with error checking, and
26 store it in *BUF. Resize *BUF using xrealloc if necessary to hold
27 the result, and update *SIZEOF_BUF. If FOREVER, wait forever
28 rather than timing out; this is used (in synchronous mode) to wait
29 for a target that is is executing user code to stop. */
30
31 extern void getpkt (char **buf, long *sizeof_buf, int forever);
32
33 /* Send a packet to the remote machine, with error checking. The data
34 of the packet is in BUF. The string in BUF can be at most PBUFSIZ
35 - 5 to account for the $, # and checksum, and for a possible /0 if
36 we are debugging (remote_debug) and want to print the sent packet
37 as a string */
38
39 extern int putpkt (char *buf);
40
41 extern char *unpack_varlen_hex (char *buff, ULONGEST *result);
42
43 extern void async_remote_interrupt_twice (void *arg);
44
45 extern int remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr,
46 int len);
47
48 extern int remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
49
50 void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
51 const struct target_desc *tdesc);
52 void register_remote_support_xml (const char *);
53
54 void remote_file_put (const char *local_file, const char *remote_file,
55 int from_tty);
56 void remote_file_get (const char *remote_file, const char *local_file,
57 int from_tty);
58 void remote_file_delete (const char *remote_file, int from_tty);
59
60 bfd *remote_bfd_open (const char *remote_file, const char *target);
61
62 int remote_filename_p (const char *filename);
63
64 #endif
This page took 0.03025 seconds and 4 git commands to generate.