Commit | Line | Data |
---|---|---|
b811d2c2 | 1 | /* Copyright (C) 2010-2020 Free Software Foundation, Inc. |
8ed54b31 JB |
2 | |
3 | This file is part of GDB. | |
4 | ||
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | ||
1a5c2598 TT |
18 | #ifndef GDBSERVER_LYNX_LOW_H |
19 | #define GDBSERVER_LYNX_LOW_H | |
20 | ||
8ed54b31 | 21 | struct regcache; |
3aee8918 | 22 | struct target_desc; |
8ed54b31 JB |
23 | |
24 | /* Some information relative to a given register set. */ | |
25 | ||
26 | struct lynx_regset_info | |
27 | { | |
28 | /* The ptrace request needed to get/set registers of this set. */ | |
29 | int get_request, set_request; | |
30 | /* The size of the register set. */ | |
31 | int size; | |
32 | /* Fill the buffer BUF from the contents of the given REGCACHE. */ | |
33 | void (*fill_function) (struct regcache *regcache, char *buf); | |
34 | /* Store the register value in BUF in the given REGCACHE. */ | |
35 | void (*store_function) (struct regcache *regcache, const char *buf); | |
36 | }; | |
37 | ||
38 | /* A list of regsets for the target being debugged, terminated by an entry | |
39 | where the size is negative. | |
40 | ||
41 | This list should be created by the target-specific code. */ | |
42 | ||
43 | extern struct lynx_regset_info lynx_target_regsets[]; | |
44 | ||
45 | /* The target-specific operations for LynxOS support. */ | |
46 | ||
47 | struct lynx_target_ops | |
48 | { | |
49 | /* Architecture-specific setup. */ | |
50 | void (*arch_setup) (void); | |
51 | }; | |
52 | ||
53 | extern struct lynx_target_ops the_low_target; | |
54 | ||
5ef9273d TBA |
55 | /* Target ops definitions for a LynxOS target. */ |
56 | ||
57 | class lynx_process_target : public process_target | |
58 | { | |
59 | public: | |
60 | ||
15295543 TBA |
61 | int create_inferior (const char *program, |
62 | const std::vector<char *> &program_args) override; | |
ef03dad8 TBA |
63 | |
64 | int attach (unsigned long pid) override; | |
c6885a57 TBA |
65 | |
66 | int kill (process_info *proc) override; | |
9061c9cf TBA |
67 | |
68 | int detach (process_info *proc) override; | |
8adb37b9 TBA |
69 | |
70 | void mourn (process_info *proc) override; | |
95a49a39 TBA |
71 | |
72 | void join (int pid) override; | |
13d3d99b TBA |
73 | |
74 | bool thread_alive (ptid_t pid) override; | |
0e4d7e35 TBA |
75 | |
76 | void resume (thread_resume *resume_info, size_t n) override; | |
6532e7e3 TBA |
77 | |
78 | ptid_t wait (ptid_t ptid, target_waitstatus *status, | |
79 | int options) override; | |
a5a4d4cd TBA |
80 | |
81 | void fetch_registers (regcache *regcache, int regno) override; | |
82 | ||
83 | void store_registers (regcache *regcache, int regno) override; | |
e2558df3 TBA |
84 | |
85 | int read_memory (CORE_ADDR memaddr, unsigned char *myaddr, | |
86 | int len) override; | |
87 | ||
88 | int write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, | |
89 | int len) override; | |
eb497a2a TBA |
90 | |
91 | void request_interrupt () override; | |
22aa6223 TBA |
92 | |
93 | bool supports_hardware_single_step () override; | |
5ef9273d TBA |
94 | }; |
95 | ||
3aee8918 PA |
96 | /* The inferior's target description. This is a global because the |
97 | LynxOS ports support neither bi-arch nor multi-process. */ | |
98 | extern const struct target_desc *lynx_tdesc; | |
1a5c2598 TT |
99 | |
100 | #endif /* GDBSERVER_LYNX_LOW_H */ |