Commit | Line | Data |
---|---|---|
ac8c974e | 1 | /* Internal interfaces for the QNX Neutrino specific target code for gdbserver. |
b811d2c2 | 2 | Copyright (C) 2009-2020 Free Software Foundation, Inc. |
ac8c974e AR |
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_NTO_LOW_H |
20 | #define GDBSERVER_NTO_LOW_H | |
ac8c974e | 21 | |
3aee8918 PA |
22 | struct target_desc; |
23 | ||
ac8c974e AR |
24 | enum regset_type |
25 | { | |
26 | NTO_REG_GENERAL, | |
27 | NTO_REG_FLOAT, | |
28 | NTO_REG_SYSTEM, | |
29 | NTO_REG_ALT, | |
30 | NTO_REG_END | |
31 | }; | |
32 | ||
33 | struct nto_target_ops | |
34 | { | |
35 | /* Architecture specific setup. */ | |
36 | void (*arch_setup) (void); | |
37 | int num_regs; | |
38 | int (*register_offset) (int gdbregno); | |
39 | const unsigned char *breakpoint; | |
40 | int breakpoint_len; | |
41 | }; | |
42 | ||
43 | extern struct nto_target_ops the_low_target; | |
44 | ||
5ef9273d TBA |
45 | /* Target ops definitions for a QNX Neutrino target. */ |
46 | ||
47 | class nto_process_target : public process_target | |
48 | { | |
49 | public: | |
50 | ||
15295543 TBA |
51 | int create_inferior (const char *program, |
52 | const std::vector<char *> &program_args) override; | |
ef03dad8 TBA |
53 | |
54 | int attach (unsigned long pid) override; | |
c6885a57 TBA |
55 | |
56 | int kill (process_info *proc) override; | |
9061c9cf TBA |
57 | |
58 | int detach (process_info *proc) override; | |
8adb37b9 TBA |
59 | |
60 | void mourn (process_info *proc) override; | |
95a49a39 TBA |
61 | |
62 | void join (int pid) override; | |
13d3d99b TBA |
63 | |
64 | bool thread_alive (ptid_t pid) override; | |
0e4d7e35 TBA |
65 | |
66 | void resume (thread_resume *resume_info, size_t n) override; | |
6532e7e3 TBA |
67 | |
68 | ptid_t wait (ptid_t ptid, target_waitstatus *status, | |
69 | int options) override; | |
a5a4d4cd TBA |
70 | |
71 | void fetch_registers (regcache *regcache, int regno) override; | |
72 | ||
73 | void store_registers (regcache *regcache, int regno) override; | |
e2558df3 TBA |
74 | |
75 | int read_memory (CORE_ADDR memaddr, unsigned char *myaddr, | |
76 | int len) override; | |
77 | ||
78 | int write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, | |
79 | int len) override; | |
eb497a2a TBA |
80 | |
81 | void request_interrupt () override; | |
eac215cc TBA |
82 | |
83 | bool supports_read_auxv () override; | |
84 | ||
85 | int read_auxv (CORE_ADDR offset, unsigned char *myaddr, | |
86 | unsigned int len) override; | |
a2b2297a TBA |
87 | |
88 | bool supports_z_point_type (char z_type) override; | |
7e0bde70 TBA |
89 | |
90 | int insert_point (enum raw_bkpt_type type, CORE_ADDR addr, | |
91 | int size, raw_breakpoint *bp) override; | |
92 | ||
93 | int remove_point (enum raw_bkpt_type type, CORE_ADDR addr, | |
94 | int size, raw_breakpoint *bp) override; | |
22aa6223 TBA |
95 | |
96 | bool supports_hardware_single_step () override; | |
6eeb5c55 TBA |
97 | |
98 | bool stopped_by_watchpoint () override; | |
99 | ||
100 | CORE_ADDR stopped_data_address () override; | |
5ef9273d TBA |
101 | }; |
102 | ||
3aee8918 PA |
103 | /* The inferior's target description. This is a global because the |
104 | LynxOS ports support neither bi-arch nor multi-process. */ | |
105 | extern const struct target_desc *nto_tdesc; | |
106 | ||
1a5c2598 | 107 | #endif /* GDBSERVER_NTO_LOW_H */ |