convert to_detach
[deliverable/binutils-gdb.git] / gdb / target-delegates.c
CommitLineData
1101cb7b
TT
1/* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2/* vi:set ro: */
3
4/* To regenerate this file, run:*/
5/* make-target-delegates target.h > target-delegates.c */
09da0d0a
TT
6static void
7delegate_detach (struct target_ops *self, const char *arg1, int arg2)
8{
9 self = self->beneath;
10 self->to_detach (self, arg1, arg2);
11}
12
13static void
14tdefault_detach (struct target_ops *self, const char *arg1, int arg2)
15{
16}
17
6b84065d
TT
18static void
19delegate_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
20{
21 self = self->beneath;
22 self->to_resume (self, arg1, arg2, arg3);
23}
24
25static void
26tdefault_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
27{
28 noprocess ();
29}
30
31static ptid_t
32delegate_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
33{
34 self = self->beneath;
35 return self->to_wait (self, arg1, arg2, arg3);
36}
37
38static ptid_t
39tdefault_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
40{
41 noprocess ();
42}
43
44static void
45delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
46{
47 self = self->beneath;
48 self->to_store_registers (self, arg1, arg2);
49}
50
51static void
52tdefault_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
53{
54 noprocess ();
55}
56
57static int
58delegate_insert_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
59{
60 self = self->beneath;
61 return self->to_insert_breakpoint (self, arg1, arg2);
62}
63
64static int
65delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
66{
67 self = self->beneath;
68 return self->to_remove_breakpoint (self, arg1, arg2);
69}
70
71static int
72delegate_stopped_by_watchpoint (struct target_ops *self)
73{
74 self = self->beneath;
75 return self->to_stopped_by_watchpoint (self);
76}
77
78static int
79tdefault_stopped_by_watchpoint (struct target_ops *self)
80{
81 return 0;
82}
83
84static int
85delegate_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1)
86{
87 self = self->beneath;
88 return self->to_stopped_data_address (self, arg1);
89}
90
91static int
92tdefault_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1)
93{
94 return 0;
95}
96
97static int
98delegate_can_async_p (struct target_ops *self)
99{
100 self = self->beneath;
101 return self->to_can_async_p (self);
102}
103
104static int
105delegate_is_async_p (struct target_ops *self)
106{
107 self = self->beneath;
108 return self->to_is_async_p (self);
109}
110
111static void
112delegate_async (struct target_ops *self, async_callback_ftype *arg1, void *arg2)
113{
114 self = self->beneath;
115 self->to_async (self, arg1, arg2);
116}
117
118static void
119tdefault_async (struct target_ops *self, async_callback_ftype *arg1, void *arg2)
120{
121 tcomplain ();
122}
123
124static enum target_xfer_status
125delegate_xfer_partial (struct target_ops *self, enum target_object arg1, const char *arg2, gdb_byte *arg3, const gdb_byte *arg4, ULONGEST arg5, ULONGEST arg6, ULONGEST *arg7)
126{
127 self = self->beneath;
128 return self->to_xfer_partial (self, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
129}
130
131static enum target_xfer_status
132tdefault_xfer_partial (struct target_ops *self, enum target_object arg1, const char *arg2, gdb_byte *arg3, const gdb_byte *arg4, ULONGEST arg5, ULONGEST arg6, ULONGEST *arg7)
133{
134 return TARGET_XFER_E_IO;
135}
136
46917d26
TT
137static int
138delegate_supports_btrace (struct target_ops *self)
139{
140 self = self->beneath;
141 return self->to_supports_btrace (self);
142}
143
144static int
145tdefault_supports_btrace (struct target_ops *self)
146{
147 return 0;
148}
149
1101cb7b
TT
150static void
151install_delegators (struct target_ops *ops)
152{
09da0d0a
TT
153 if (ops->to_detach == NULL)
154 ops->to_detach = delegate_detach;
6b84065d
TT
155 if (ops->to_resume == NULL)
156 ops->to_resume = delegate_resume;
157 if (ops->to_wait == NULL)
158 ops->to_wait = delegate_wait;
159 if (ops->to_store_registers == NULL)
160 ops->to_store_registers = delegate_store_registers;
161 if (ops->to_insert_breakpoint == NULL)
162 ops->to_insert_breakpoint = delegate_insert_breakpoint;
163 if (ops->to_remove_breakpoint == NULL)
164 ops->to_remove_breakpoint = delegate_remove_breakpoint;
165 if (ops->to_stopped_by_watchpoint == NULL)
166 ops->to_stopped_by_watchpoint = delegate_stopped_by_watchpoint;
167 if (ops->to_stopped_data_address == NULL)
168 ops->to_stopped_data_address = delegate_stopped_data_address;
169 if (ops->to_can_async_p == NULL)
170 ops->to_can_async_p = delegate_can_async_p;
171 if (ops->to_is_async_p == NULL)
172 ops->to_is_async_p = delegate_is_async_p;
173 if (ops->to_async == NULL)
174 ops->to_async = delegate_async;
175 if (ops->to_xfer_partial == NULL)
176 ops->to_xfer_partial = delegate_xfer_partial;
46917d26
TT
177 if (ops->to_supports_btrace == NULL)
178 ops->to_supports_btrace = delegate_supports_btrace;
1101cb7b
TT
179}
180
181static void
182install_dummy_methods (struct target_ops *ops)
183{
09da0d0a 184 ops->to_detach = tdefault_detach;
6b84065d
TT
185 ops->to_resume = tdefault_resume;
186 ops->to_wait = tdefault_wait;
187 ops->to_store_registers = tdefault_store_registers;
188 ops->to_insert_breakpoint = memory_insert_breakpoint;
189 ops->to_remove_breakpoint = memory_remove_breakpoint;
190 ops->to_stopped_by_watchpoint = tdefault_stopped_by_watchpoint;
191 ops->to_stopped_data_address = tdefault_stopped_data_address;
192 ops->to_can_async_p = find_default_can_async_p;
193 ops->to_is_async_p = find_default_is_async_p;
194 ops->to_async = tdefault_async;
195 ops->to_xfer_partial = tdefault_xfer_partial;
46917d26 196 ops->to_supports_btrace = tdefault_supports_btrace;
1101cb7b 197}
This page took 0.048952 seconds and 4 git commands to generate.