]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/remote-utils.h
Update Copyright year range in all files maintained by GDB.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / remote-utils.h
CommitLineData
270c6aea 1/* Remote utility routines for the remote server for GDB.
ecd75fc8 2 Copyright (C) 1993-2014 Free Software Foundation, Inc.
270c6aea
PA
3
4 This file is part of GDB.
5
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
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
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/>. */
18
19#ifndef REMOTE_UTILS_H
20#define REMOTE_UTILS_H
21
22extern int remote_debug;
23extern int noack_mode;
24extern int transport_is_reliable;
25
26int gdb_connected (void);
27
28#define STDIO_CONNECTION_NAME "stdio"
29int remote_connection_is_stdio (void);
30
31ptid_t read_ptid (char *buf, char **obuf);
32char *write_ptid (char *buf, ptid_t ptid);
33
34int putpkt (char *buf);
35int putpkt_binary (char *buf, int len);
36int putpkt_notif (char *buf);
37int getpkt (char *buf);
38void remote_prepare (char *name);
39void remote_open (char *name);
40void remote_close (void);
41void write_ok (char *buf);
42void write_enn (char *buf);
43void initialize_async_io (void);
44void enable_async_io (void);
45void disable_async_io (void);
46void check_remote_input_interrupt_request (void);
47void convert_ascii_to_int (const char *from, unsigned char *to, int n);
48void convert_int_to_ascii (const unsigned char *from, char *to, int n);
49void new_thread_notify (int id);
50void dead_thread_notify (int id);
51void prepare_resume_reply (char *buf, ptid_t ptid,
52 struct target_waitstatus *status);
53
54const char *decode_address_to_semicolon (CORE_ADDR *addrp, const char *start);
55void decode_address (CORE_ADDR *addrp, const char *start, int len);
56void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
57 unsigned int *len_ptr);
58void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr,
59 unsigned int *len_ptr, unsigned char **to_p);
60int decode_X_packet (char *from, int packet_len, CORE_ADDR * mem_addr_ptr,
61 unsigned int *len_ptr, unsigned char **to_p);
62int decode_xfer_write (char *buf, int packet_len,
63 CORE_ADDR *offset, unsigned int *len,
64 unsigned char *data);
65int decode_search_memory_packet (const char *buf, int packet_len,
66 CORE_ADDR *start_addrp,
67 CORE_ADDR *search_space_lenp,
68 gdb_byte *pattern,
69 unsigned int *pattern_lenp);
70
71int unhexify (char *bin, const char *hex, int count);
72int hexify (char *hex, const char *bin, int count);
73int remote_escape_output (const gdb_byte *buffer, int len,
74 gdb_byte *out_buf, int *out_len,
75 int out_maxlen);
76char *unpack_varlen_hex (char *buff, ULONGEST *result);
77
78void clear_symbol_cache (struct sym_cache **symcache_p);
79int look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb);
80
81int relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc);
82
83void monitor_output (const char *msg);
84
85#endif /* REMOTE_UTILS_H */