GDB (API)
/home/stan/gdb/src/gdb/remote.h
Go to the documentation of this file.
00001 /* Remote target communications for serial-line targets in custom GDB protocol
00002    Copyright (C) 1999-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef REMOTE_H
00020 #define REMOTE_H
00021 
00022 #include "remote-notif.h"
00023 
00024 struct target_desc;
00025 
00026 /* Read a packet from the remote machine, with error checking, and
00027    store it in *BUF.  Resize *BUF using xrealloc if necessary to hold
00028    the result, and update *SIZEOF_BUF.  If FOREVER, wait forever
00029    rather than timing out; this is used (in synchronous mode) to wait
00030    for a target that is is executing user code to stop.  */
00031 
00032 extern void getpkt (char **buf, long *sizeof_buf, int forever);
00033 
00034 /* Send a packet to the remote machine, with error checking.  The data
00035    of the packet is in BUF.  The string in BUF can be at most PBUFSIZ
00036    - 5 to account for the $, # and checksum, and for a possible /0 if
00037    we are debugging (remote_debug) and want to print the sent packet
00038    as a string.  */
00039 
00040 extern int putpkt (char *buf);
00041 
00042 extern int hex2bin (const char *hex, gdb_byte *bin, int count);
00043 
00044 extern int bin2hex (const gdb_byte *bin, char *hex, int count);
00045 
00046 extern char *unpack_varlen_hex (char *buff, ULONGEST *result);
00047 
00048 void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
00049                                      const struct target_desc *tdesc);
00050 void register_remote_support_xml (const char *);
00051 
00052 void remote_file_put (const char *local_file, const char *remote_file,
00053                       int from_tty);
00054 void remote_file_get (const char *remote_file, const char *local_file,
00055                       int from_tty);
00056 void remote_file_delete (const char *remote_file, int from_tty);
00057 
00058 bfd *remote_bfd_open (const char *remote_file, const char *target);
00059 
00060 /* If a path starts with this sequence, GDB will retrieve the target
00061    libraries from the remote system.  */
00062 
00063 #define REMOTE_SYSROOT_PREFIX "remote:"
00064 
00065 /* True if FILENAME starts with REMOTE_SYSROOT_PREFIX.  */
00066 
00067 int remote_filename_p (const char *filename);
00068 
00069 extern int remote_register_number_and_offset (struct gdbarch *gdbarch,
00070                                               int regnum, int *pnum,
00071                                               int *poffset);
00072 
00073 extern void remote_notif_get_pending_events (struct notif_client *np);
00074 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines