gdb/remote.h - gdb

Macros defined

Source code

  1. /* Remote target communications for serial-line targets in custom GDB protocol
  2.    Copyright (C) 1999-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef REMOTE_H
  15. #define REMOTE_H

  16. #include "remote-notif.h"

  17. struct target_desc;

  18. /* Read a packet from the remote machine, with error checking, and
  19.    store it in *BUF.  Resize *BUF using xrealloc if necessary to hold
  20.    the result, and update *SIZEOF_BUF.  If FOREVER, wait forever
  21.    rather than timing out; this is used (in synchronous mode) to wait
  22.    for a target that is is executing user code to stop.  */

  23. extern void getpkt (char **buf, long *sizeof_buf, int forever);

  24. /* Send a packet to the remote machine, with error checking.  The data
  25.    of the packet is in BUF.  The string in BUF can be at most PBUFSIZ
  26.    - 5 to account for the $, # and checksum, and for a possible /0 if
  27.    we are debugging (remote_debug) and want to print the sent packet
  28.    as a string.  */

  29. extern int putpkt (const char *buf);

  30. void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
  31.                                      const struct target_desc *tdesc);
  32. void register_remote_support_xml (const char *);

  33. void remote_file_put (const char *local_file, const char *remote_file,
  34.                       int from_tty);
  35. void remote_file_get (const char *remote_file, const char *local_file,
  36.                       int from_tty);
  37. void remote_file_delete (const char *remote_file, int from_tty);

  38. bfd *remote_bfd_open (const char *remote_file, const char *target);

  39. /* If a path starts with this sequence, GDB will retrieve the target
  40.    libraries from the remote system.  */

  41. #define REMOTE_SYSROOT_PREFIX "remote:"

  42. /* True if FILENAME starts with REMOTE_SYSROOT_PREFIX.  */

  43. int remote_filename_p (const char *filename);

  44. extern int remote_register_number_and_offset (struct gdbarch *gdbarch,
  45.                                               int regnum, int *pnum,
  46.                                               int *poffset);

  47. extern void remote_notif_get_pending_events (struct notif_client *np);
  48. #endif