| OLD | NEW |
| 1 /* Remote target communications for serial-line targets in custom GDB protocol | 1 /* Remote target communications for serial-line targets in custom GDB protocol |
| 2 Copyright (C) 1999, 2003-2012 Free Software Foundation, Inc. | 2 Copyright (C) 1999-2013 Free Software Foundation, Inc. |
| 3 | 3 |
| 4 This file is part of GDB. | 4 This file is part of GDB. |
| 5 | 5 |
| 6 This program is free software; you can redistribute it and/or modify | 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 | 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 | 8 the Free Software Foundation; either version 3 of the License, or |
| 9 (at your option) any later version. | 9 (at your option) any later version. |
| 10 | 10 |
| 11 This program is distributed in the hope that it will be useful, | 11 This program is distributed in the hope that it will be useful, |
| 12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
| 15 | 15 |
| 16 You should have received a copy of the GNU General Public License | 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/>. */ | 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 |
| 19 #ifndef REMOTE_H | 19 #ifndef REMOTE_H |
| 20 #define REMOTE_H | 20 #define REMOTE_H |
| 21 | 21 |
| 22 #include "remote-notif.h" |
| 23 |
| 22 struct target_desc; | 24 struct target_desc; |
| 23 | 25 |
| 24 /* Read a packet from the remote machine, with error checking, and | 26 /* Read a packet from the remote machine, with error checking, and |
| 25 store it in *BUF. Resize *BUF using xrealloc if necessary to hold | 27 store it in *BUF. Resize *BUF using xrealloc if necessary to hold |
| 26 the result, and update *SIZEOF_BUF. If FOREVER, wait forever | 28 the result, and update *SIZEOF_BUF. If FOREVER, wait forever |
| 27 rather than timing out; this is used (in synchronous mode) to wait | 29 rather than timing out; this is used (in synchronous mode) to wait |
| 28 for a target that is is executing user code to stop. */ | 30 for a target that is is executing user code to stop. */ |
| 29 | 31 |
| 30 extern void getpkt (char **buf, long *sizeof_buf, int forever); | 32 extern void getpkt (char **buf, long *sizeof_buf, int forever); |
| 31 | 33 |
| 32 /* Send a packet to the remote machine, with error checking. The data | 34 /* 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 | 35 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 | 36 - 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 | 37 we are debugging (remote_debug) and want to print the sent packet |
| 36 as a string. */ | 38 as a string. */ |
| 37 | 39 |
| 38 extern int putpkt (char *buf); | 40 extern int putpkt (char *buf); |
| 39 | 41 |
| 42 extern int hex2bin (const char *hex, gdb_byte *bin, int count); |
| 43 |
| 44 extern int bin2hex (const gdb_byte *bin, char *hex, int count); |
| 45 |
| 40 extern char *unpack_varlen_hex (char *buff, ULONGEST *result); | 46 extern char *unpack_varlen_hex (char *buff, ULONGEST *result); |
| 41 | 47 |
| 42 extern void async_remote_interrupt_twice (void *arg); | |
| 43 | |
| 44 void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes, | 48 void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes, |
| 45 const struct target_desc *tdesc); | 49 const struct target_desc *tdesc); |
| 46 void register_remote_support_xml (const char *); | 50 void register_remote_support_xml (const char *); |
| 47 | 51 |
| 48 void remote_file_put (const char *local_file, const char *remote_file, | 52 void remote_file_put (const char *local_file, const char *remote_file, |
| 49 int from_tty); | 53 int from_tty); |
| 50 void remote_file_get (const char *remote_file, const char *local_file, | 54 void remote_file_get (const char *remote_file, const char *local_file, |
| 51 int from_tty); | 55 int from_tty); |
| 52 void remote_file_delete (const char *remote_file, int from_tty); | 56 void remote_file_delete (const char *remote_file, int from_tty); |
| 53 | 57 |
| 54 bfd *remote_bfd_open (const char *remote_file, const char *target); | 58 bfd *remote_bfd_open (const char *remote_file, const char *target); |
| 55 | 59 |
| 60 /* If a path starts with this sequence, GDB will retrieve the target |
| 61 libraries from the remote system. */ |
| 62 |
| 63 #define REMOTE_SYSROOT_PREFIX "remote:" |
| 64 |
| 65 /* True if FILENAME starts with REMOTE_SYSROOT_PREFIX. */ |
| 66 |
| 56 int remote_filename_p (const char *filename); | 67 int remote_filename_p (const char *filename); |
| 57 | 68 |
| 58 extern int remote_register_number_and_offset (struct gdbarch *gdbarch, | 69 extern int remote_register_number_and_offset (struct gdbarch *gdbarch, |
| 59 int regnum, int *pnum, | 70 int regnum, int *pnum, |
| 60 int *poffset); | 71 int *poffset); |
| 61 | 72 |
| 73 extern void remote_notif_get_pending_events (struct notif_client *np); |
| 62 #endif | 74 #endif |
| OLD | NEW |