]>
Commit | Line | Data |
---|---|---|
c2c6d25f | 1 | /* Remote target communications for serial-line targets in custom GDB protocol |
0fb0cc75 | 2 | Copyright (C) 1999, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
6aba47ca | 3 | Free Software Foundation, Inc. |
c2c6d25f JM |
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 | |
a9762ec7 | 9 | the Free Software Foundation; either version 3 of the License, or |
c2c6d25f JM |
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 | |
a9762ec7 | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c2c6d25f JM |
19 | |
20 | #ifndef REMOTE_H | |
21 | #define REMOTE_H | |
22 | ||
29709017 DJ |
23 | struct target_desc; |
24 | ||
c2c6d25f JM |
25 | /* FIXME?: move this interface down to tgt vector) */ |
26 | ||
27 | /* Read a packet from the remote machine, with error checking, and | |
6d820c5c DJ |
28 | store it in *BUF. Resize *BUF using xrealloc if necessary to hold |
29 | the result, and update *SIZEOF_BUF. If FOREVER, wait forever | |
30 | rather than timing out; this is used (in synchronous mode) to wait | |
31 | for a target that is is executing user code to stop. */ | |
c2c6d25f | 32 | |
6d820c5c | 33 | extern void getpkt (char **buf, long *sizeof_buf, int forever); |
c2c6d25f JM |
34 | |
35 | /* Send a packet to the remote machine, with error checking. The data | |
36 | of the packet is in BUF. The string in BUF can be at most PBUFSIZ | |
37 | - 5 to account for the $, # and checksum, and for a possible /0 if | |
38 | we are debugging (remote_debug) and want to print the sent packet | |
39 | as a string */ | |
40 | ||
41 | extern int putpkt (char *buf); | |
42 | ||
43 | /* Send HEX encoded string to the target console. (gdb_stdtarg) */ | |
44 | ||
917317f4 | 45 | extern void remote_console_output (char *); |
c2c6d25f JM |
46 | |
47 | ||
c2c6d25f JM |
48 | /* FIXME: cagney/1999-09-20: The remote cisco stuff in remote.c needs |
49 | to be broken out into a separate file (remote-cisco.[hc]?). Before | |
50 | that can happen, a remote protocol stack framework needs to be | |
51 | implemented. */ | |
52 | ||
53 | extern void remote_cisco_objfile_relocate (bfd_signed_vma text_off, | |
54 | bfd_signed_vma data_off, | |
55 | bfd_signed_vma bss_off); | |
56 | ||
2df3850c JM |
57 | extern void async_remote_interrupt_twice (void *arg); |
58 | ||
b2182ed2 DJ |
59 | extern int remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, |
60 | int len); | |
449092f6 | 61 | |
cfd77fa1 | 62 | extern int remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len); |
449092f6 | 63 | |
9a4105ab AC |
64 | extern void (*deprecated_target_resume_hook) (void); |
65 | extern void (*deprecated_target_wait_loop_hook) (void); | |
e8933a55 | 66 | |
29709017 DJ |
67 | void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes, |
68 | const struct target_desc *tdesc); | |
69 | ||
a6b151f1 DJ |
70 | void remote_file_put (const char *local_file, const char *remote_file, |
71 | int from_tty); | |
72 | void remote_file_get (const char *remote_file, const char *local_file, | |
73 | int from_tty); | |
74 | void remote_file_delete (const char *remote_file, int from_tty); | |
75 | ||
f1838a98 UW |
76 | bfd *remote_bfd_open (const char *remote_file, const char *target); |
77 | ||
78 | int remote_filename_p (const char *filename); | |
79 | ||
c2c6d25f | 80 | #endif |