-extern void push_event (ptid_t ptid, struct target_waitstatus *status);
-
-/* Functions from hostio.c. */
-extern int handle_vFile (char *, int, int *);
-
-/* Functions from hostio-errno.c. */
-extern void hostio_last_error_from_errno (char *own_buf);
-
-/* From remote-utils.c */
-
-extern int remote_debug;
-extern int noack_mode;
-extern int transport_is_reliable;
-
-int gdb_connected (void);
-
-ptid_t read_ptid (char *buf, char **obuf);
-char *write_ptid (char *buf, ptid_t ptid);
-
-int putpkt (char *buf);
-int putpkt_binary (char *buf, int len);
-int putpkt_notif (char *buf);
-int getpkt (char *buf);
-void remote_open (char *name);
-void remote_close (void);
-void write_ok (char *buf);
-void write_enn (char *buf);
-void initialize_async_io (void);
-void enable_async_io (void);
-void disable_async_io (void);
-void check_remote_input_interrupt_request (void);
-void convert_ascii_to_int (const char *from, unsigned char *to, int n);
-void convert_int_to_ascii (const unsigned char *from, char *to, int n);
-void new_thread_notify (int id);
-void dead_thread_notify (int id);
-void prepare_resume_reply (char *buf, ptid_t ptid,
- struct target_waitstatus *status);
-
-const char *decode_address_to_semicolon (CORE_ADDR *addrp, const char *start);
-void decode_address (CORE_ADDR *addrp, const char *start, int len);
-void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
- unsigned int *len_ptr);
-void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr,
- unsigned int *len_ptr, unsigned char **to_p);
-int decode_X_packet (char *from, int packet_len, CORE_ADDR * mem_addr_ptr,
- unsigned int *len_ptr, unsigned char **to_p);
-int decode_xfer_write (char *buf, int packet_len, char **annex,
- CORE_ADDR *offset, unsigned int *len,
- unsigned char *data);
-int decode_search_memory_packet (const char *buf, int packet_len,
- CORE_ADDR *start_addrp,
- CORE_ADDR *search_space_lenp,
- gdb_byte *pattern, unsigned int *pattern_lenp);
-
-int unhexify (char *bin, const char *hex, int count);
-int hexify (char *hex, const char *bin, int count);
-int remote_escape_output (const gdb_byte *buffer, int len,
- gdb_byte *out_buf, int *out_len,
- int out_maxlen);
-char *unpack_varlen_hex (char *buff, ULONGEST *result);
-
-void clear_symbol_cache (struct sym_cache **symcache_p);
-int look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb);
-
-int relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc);
-
-void monitor_output (const char *msg);
-
-char *xml_escape_text (const char *text);
-
-/* Simple growing buffer. */
-
-struct buffer
-{
- char *buffer;
- size_t buffer_size; /* allocated size */
- size_t used_size; /* actually used size */
-};
-
-/* Append DATA of size SIZE to the end of BUFFER. Grows the buffer to
- accommodate the new data. */
-void buffer_grow (struct buffer *buffer, const char *data, size_t size);
-
-/* Release any memory held by BUFFER. */
-void buffer_free (struct buffer *buffer);
-
-/* Initialize BUFFER. BUFFER holds no memory afterwards. */
-void buffer_init (struct buffer *buffer);
-
-/* Return a pointer into BUFFER data, effectivelly transfering
- ownership of the buffer memory to the caller. Calling buffer_free
- afterwards has no effect on the returned data. */
-char* buffer_finish (struct buffer *buffer);
-
-/* Simple printf to BUFFER function. Current implemented formatters:
- %s - grow an xml escaped text in OBSTACK. */
-void buffer_xml_printf (struct buffer *buffer, const char *format, ...)
- ATTR_FORMAT (printf, 2, 3);
-
-#define buffer_grow_str(BUFFER,STRING) \
- buffer_grow (BUFFER, STRING, strlen (STRING))
-#define buffer_grow_str0(BUFFER,STRING) \
- buffer_grow (BUFFER, STRING, strlen (STRING) + 1)
-
-/* Functions from utils.c */
-
-void *xmalloc (size_t) ATTR_MALLOC;
-void *xrealloc (void *, size_t);
-void *xcalloc (size_t, size_t) ATTR_MALLOC;
-char *xstrdup (const char *) ATTR_MALLOC;
-void freeargv (char **argv);
-void perror_with_name (const char *string);
-void error (const char *string,...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
-void fatal (const char *string,...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
-void internal_error (const char *file, int line, const char *, ...)
- ATTR_NORETURN ATTR_FORMAT (printf, 3, 4);
-void warning (const char *string,...) ATTR_FORMAT (printf, 1, 2);
-char *paddress (CORE_ADDR addr);
-char *pulongest (ULONGEST u);
-char *plongest (LONGEST l);
-char *phex_nz (ULONGEST l, int sizeof_l);
-char *pfildes (gdb_fildes_t fd);
-
-#define gdb_assert(expr) \
- ((void) ((expr) ? 0 : \
- (gdb_assert_fail (#expr, __FILE__, __LINE__, ASSERT_FUNCTION), 0)))
-
-/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
- which contains the name of the function currently being defined.
- This is broken in G++ before version 2.6.
- C9x has a similar variable called __func__, but prefer the GCC one since
- it demangles C++ function names. */
-#if (GCC_VERSION >= 2004)
-#define ASSERT_FUNCTION __PRETTY_FUNCTION__
-#else
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-#define ASSERT_FUNCTION __func__
-#endif
-#endif