gdb/gdbserver/remote-utils.h - gdb

Macros defined

Source code

  1. /* Remote utility routines for the remote server for GDB.
  2.    Copyright (C) 1993-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_UTILS_H
  15. #define REMOTE_UTILS_H

  16. extern int remote_debug;
  17. extern int noack_mode;
  18. extern int transport_is_reliable;

  19. int gdb_connected (void);

  20. #define STDIO_CONNECTION_NAME "stdio"
  21. int remote_connection_is_stdio (void);

  22. ptid_t read_ptid (char *buf, char **obuf);
  23. char *write_ptid (char *buf, ptid_t ptid);

  24. int putpkt (char *buf);
  25. int putpkt_binary (char *buf, int len);
  26. int putpkt_notif (char *buf);
  27. int getpkt (char *buf);
  28. void remote_prepare (char *name);
  29. void remote_open (char *name);
  30. void remote_close (void);
  31. void write_ok (char *buf);
  32. void write_enn (char *buf);
  33. void initialize_async_io (void);
  34. void enable_async_io (void);
  35. void disable_async_io (void);
  36. void check_remote_input_interrupt_request (void);
  37. void new_thread_notify (int id);
  38. void dead_thread_notify (int id);
  39. void prepare_resume_reply (char *buf, ptid_t ptid,
  40.                            struct target_waitstatus *status);

  41. const char *decode_address_to_semicolon (CORE_ADDR *addrp, const char *start);
  42. void decode_address (CORE_ADDR *addrp, const char *start, int len);
  43. void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
  44.                       unsigned int *len_ptr);
  45. void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr,
  46.                       unsigned int *len_ptr, unsigned char **to_p);
  47. int decode_X_packet (char *from, int packet_len, CORE_ADDR * mem_addr_ptr,
  48.                      unsigned int *len_ptr, unsigned char **to_p);
  49. int decode_xfer_write (char *buf, int packet_len,
  50.                        CORE_ADDR *offset, unsigned int *len,
  51.                        unsigned char *data);
  52. int decode_search_memory_packet (const char *buf, int packet_len,
  53.                                  CORE_ADDR *start_addrp,
  54.                                  CORE_ADDR *search_space_lenp,
  55.                                  gdb_byte *pattern,
  56.                                  unsigned int *pattern_lenp);

  57. void clear_symbol_cache (struct sym_cache **symcache_p);
  58. int look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb);

  59. int relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc);

  60. void monitor_output (const char *msg);

  61. #endif /* REMOTE_UTILS_H */