gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdbserver / remote-utils.h
CommitLineData
270c6aea 1/* Remote utility routines for the remote server for GDB.
b811d2c2 2 Copyright (C) 1993-2020 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
1a5c2598
TT
19#ifndef GDBSERVER_REMOTE_UTILS_H
20#define GDBSERVER_REMOTE_UTILS_H
270c6aea 21
270c6aea
PA
22int gdb_connected (void);
23
24#define STDIO_CONNECTION_NAME "stdio"
25int remote_connection_is_stdio (void);
26
256642e8 27ptid_t read_ptid (const char *buf, const char **obuf);
270c6aea
PA
28char *write_ptid (char *buf, ptid_t ptid);
29
30int putpkt (char *buf);
31int putpkt_binary (char *buf, int len);
32int putpkt_notif (char *buf);
33int getpkt (char *buf);
fb32b4f7
PA
34void remote_prepare (const char *name);
35void remote_open (const char *name);
270c6aea
PA
36void remote_close (void);
37void write_ok (char *buf);
38void write_enn (char *buf);
39void initialize_async_io (void);
40void enable_async_io (void);
41void disable_async_io (void);
42void check_remote_input_interrupt_request (void);
270c6aea
PA
43void prepare_resume_reply (char *buf, ptid_t ptid,
44 struct target_waitstatus *status);
45
46const char *decode_address_to_semicolon (CORE_ADDR *addrp, const char *start);
47void decode_address (CORE_ADDR *addrp, const char *start, int len);
48void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
49 unsigned int *len_ptr);
50void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr,
51 unsigned int *len_ptr, unsigned char **to_p);
52int decode_X_packet (char *from, int packet_len, CORE_ADDR * mem_addr_ptr,
53 unsigned int *len_ptr, unsigned char **to_p);
54int decode_xfer_write (char *buf, int packet_len,
55 CORE_ADDR *offset, unsigned int *len,
56 unsigned char *data);
57int decode_search_memory_packet (const char *buf, int packet_len,
58 CORE_ADDR *start_addrp,
59 CORE_ADDR *search_space_lenp,
60 gdb_byte *pattern,
61 unsigned int *pattern_lenp);
62
270c6aea
PA
63void clear_symbol_cache (struct sym_cache **symcache_p);
64int look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb);
65
66int relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc);
67
68void monitor_output (const char *msg);
69
1a5c2598 70#endif /* GDBSERVER_REMOTE_UTILS_H */
This page took 0.540669 seconds and 4 git commands to generate.