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