Remove the "next" field from windows_thread_info
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
... / ...
CommitLineData
12020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 * linux-low.h (struct linux_target_ops): Remove.
4 (the_low_target): Remove.
5 * linux-x86-low.cc (the_low_target): Remove.
6 * linux-aarch64-low.cc (the_low_target): Ditto.
7 * linux-arm-low.cc (the_low_target): Ditto.
8 * linux-bfin-low.cc (the_low_target): Ditto.
9 * linux-cris-low.cc (the_low_target): Ditto.
10 * linux-crisv32-low.cc (the_low_target): Ditto.
11 * linux-ia64-low.cc (the_low_target): Ditto.
12 * linux-m32r-low.cc (the_low_target): Ditto.
13 * linux-m68k-low.cc (the_low_target): Ditto.
14 * linux-mips-low.cc (the_low_target): Ditto.
15 * linux-nios2-low.cc (the_low_target): Ditto.
16 * linux-ppc-low.cc (the_low_target): Ditto.
17 * linux-riscv-low.cc (the_low_target): Ditto.
18 * linux-s390-low.cc (the_low_target): Ditto.
19 * linux-sh-low.cc (the_low_target): Ditto.
20 * linux-sparc-low.cc (the_low_target): Ditto.
21 * linux-tic6x-low.cc (the_low_target): Ditto.
22 * linux-tile-low.cc (the_low_target): Ditto.
23 * linux-xtensa-low.cc (the_low_target): Ditto.
24
252020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
26
27 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
28 linux target define the op by overriding the declaration in
29 process_stratum_target.
30
31 * linux-low.h (struct linux_target_ops): Remove the op.
32 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
33 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
34 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
35 (x86_get_ipa_tdesc_idx): Turn into...
36 (x86_target::get_ipa_tdesc_idx): ...this.
37 (the_low_target): Remove the op field.
38 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
39 (ppc_get_ipa_tdesc_idx): Turn into...
40 (ppc_target::get_ipa_tdesc_idx): ...this.
41 (the_low_target): Remove the op field.
42 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
43 (s390_get_ipa_tdesc_idx): Turn into...
44 (s390_target::get_ipa_tdesc_idx): ...this.
45 (the_low_target): Remove the op field.
46
472020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
48
49 Turn the 'get_syscall_trapinfo' linux target op into a method
50 of process_stratum_target.
51
52 * linux-low.h (struct linux_target_ops): Remove the op.
53 (class linux_process_target) <get_syscall_trapinfo>
54 <gdb_catch_this_syscall>
55 <low_supports_catch_syscall>
56 <low_get_syscall_trapinfo>: Declare.
57 * linux-low.cc (get_syscall_trapinfo): Turn into...
58 (linux_process_target::get_syscall_trapinfo): ...this.
59 (linux_process_target::low_get_syscall_trapinfo): Define.
60 (gdb_catch_this_syscall_p): Turn into...
61 (linux_process_target::gdb_catch_this_syscall): ...this.
62 (linux_process_target::low_supports_catch_syscall): Define.
63
64 Update the callers below.
65
66 (linux_process_target::wait_1)
67 (linux_process_target::supports_catch_syscall)
68
69 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
70 <low_get_syscall_trapinfo>: Declare.
71 (x86_target::low_supports_catch_syscall): Define.
72 (x86_get_syscall_trapinfo): Turn into...
73 (x86_target::low_get_syscall_trapinfo): ...this.
74 (the_low_target): Remove the op field.
75 * linux-aarch64-low.cc (class aarch64_target)
76 <low_supports_catch_syscall>
77 <low_get_syscall_trapinfo>: Declare.
78 (aarch64_target::low_supports_catch_syscall): Define.
79 (aarch64_get_syscall_trapinfo): Turn into...
80 (aarch64_target::low_get_syscall_trapinfo): ...this.
81 (the_low_target): Remove the op field.
82 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
83 <low_get_syscall_trapinfo>: Declare.
84 (arm_target::low_supports_catch_syscall): Define.
85 (arm_get_syscall_trapinfo): Turn into...
86 (arm_target::low_get_syscall_trapinfo): ...this.
87 (the_low_target): Remove the op field.
88 * linux-ppc-low.cc (the_low_target): Remove the op field.
89 * linux-s390-low.cc (the_low_target): Remove the op field.
90
912020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
92
93 Remove the 'supports_hardware_single_step' linux target op and
94 override the process_stratum_target's op definition in
95 linux_process_target to return true.
96
97 * linux-low.h (struct linux_target_ops): Remove the op.
98 (class linux_process_target) <finish_step_over>
99 <maybe_hw_step>: Declare.
100 * linux-low.cc (can_hardware_single_step): Remove.
101 (maybe_hw_step): Turn into...
102 (linux_process_target::maybe_hw_step): ...this.
103 (finish_step_over): Turn into...
104 (linux_process_target::finish_step_over): ...this.
105 (linux_process_target::supports_hardware_single_step): Update
106 to return true.
107
108 Update the callers below.
109
110 (linux_process_target::single_step)
111 (linux_process_target::resume_one_lwp_throw)
112
113 * linux-arm-low.cc (class arm_target)
114 <supports_hardware_single_step>: Declare.
115 (arm_supports_hardware_single_step): Turn into...
116 (arm_target::supports_hardware_single_step): ...this.
117 (the_low_target): Remove the op field.
118 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
119 (the_low_target): Remove the op field.
120 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
121 Remove.
122 (the_low_target): Remove the op field.
123 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
124 (the_low_target): Remove the op field.
125 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
126 (the_low_target): Remove the op field.
127 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
128 (the_low_target): Remove the op field.
129 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
130 (the_low_target): Remove the op field.
131 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
132 (the_low_target): Remove the op field.
133 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
134 (the_low_target): Remove the op field.
135 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
136 (the_low_target): Remove the op field.
137 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
138 (the_low_target): Remove the op field.
139 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
140 (the_low_target): Remove the op field.
141 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
142 Remove.
143 (the_low_target): Remove the op field.
144
1452020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
146
147 Turn the 'supports_range_stepping' linux target op into a method
148 of linux_process_target.
149
150 * linux-low.h (struct linux_target_ops): Remove the op.
151 (class linux_process_target) <low_supports_range_stepping>: Declare.
152 * linux-low.cc (linux_process_target::low_supports_range_stepping):
153 Define.
154 (linux_process_target::supports_range_stepping): Update the call
155 site.
156 * linux-x86-low.cc (class x86_target)
157 <low_supports_range_stepping>: Declare.
158 (x86_supports_range_stepping): Turn into...
159 (x86_target::low_supports_range_stepping): ...this.
160 (the_low_target): Remove the op field.
161 * linux-aarch64-low.cc (class aarch64_target)
162 <low_supports_range_stepping>: Declare.
163 (aarch64_supports_range_stepping): Turn into...
164 (aarch64_target::low_supports_range_stepping): ...this.
165 (the_low_target): Remove the op field.
166 * linux-arm-low.cc (the_low_target): Remove the op field.
167 * linux-bfin-low.cc (the_low_target): Ditto.
168 * linux-crisv32-low.cc (the_low_target): Ditto.
169 * linux-m32r-low.cc (the_low_target): Ditto.
170 * linux-m68k-low.cc (the_low_target): Ditto.
171 * linux-ppc-low.cc (the_low_target): Ditto.
172 * linux-s390-low.cc (the_low_target): Ditto.
173 * linux-sh-low.cc (the_low_target): Ditto.
174 * linux-tic6x-low.cc (the_low_target): Ditto.
175 * linux-tile-low.cc (the_low_target): Ditto.
176 * linux-xtensa-low.cc (the_low_target): Ditto.
177
1782020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
179
180 Remove the 'emit_ops' linux target ops and let the concrete
181 linux target define the op by overriding the declaration of
182 process_stratum_target.
183
184 * linux-low.h (struct linux_target_ops): Remove the op.
185 (class linux_process_target) <emit_ops>: Remove.
186 * linux-low.cc (linux_process_target::emit_ops): Remove.
187 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
188 (x86_emit_ops): Turn into...
189 (x86_target::emit_ops): ...this.
190 (the_low_target): Remove the op field.
191 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
192 (aarch64_emit_ops): Turn into...
193 (aarch64_target::emit_ops): ...this.
194 (the_low_target): Remove the op field.
195 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
196 (ppc_emit_ops): Turn into...
197 (ppc_target::emit_ops): ...this.
198 (the_low_target): Remove the op field.
199 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
200 (s390_emit_ops): Turn into...
201 (s390_target::emit_ops): ...this.
202 (the_low_target): Remove the op field.
203 * linux-arm-low.cc (the_low_target): Remove the op field.
204 * linux-bfin-low.cc (the_low_target): Ditto.
205 * linux-crisv32-low.cc (the_low_target): Ditto.
206 * linux-m32r-low.cc (the_low_target): Ditto.
207 * linux-m68k-low.cc (the_low_target): Ditto.
208 * linux-sh-low.cc (the_low_target): Ditto.
209 * linux-tic6x-low.cc (the_low_target): Ditto.
210 * linux-tile-low.cc (the_low_target): Ditto.
211 * linux-xtensa-low.cc (the_low_target): Ditto.
212
2132020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
214
215 Remove the 'install_fast_tracepoint_jump_pad' and
216 'get_min_fast_tracepoint_insn_len' linux target ops to let the
217 concrete linux target define the ops by overriding the declarations
218 of process_stratum_target.
219
220 * linux-low.h (struct linux_target_ops): Remove the ops.
221 (class linux_process_target) <supports_fast_tracepoints>
222 <install_fast_tracepoint_jump_pad>
223 <get_min_fast_tracepoint_insn_len>: Remove.
224 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
225 (linux_process_target::install_fast_tracepoint_jump_pad)
226 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
227 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
228 <install_fast_tracepoint_jump_pad>
229 <get_min_fast_tracepoint_insn_len>: Declare.
230 (x86_target::supports_fast_tracepoints): Define.
231 (x86_install_fast_tracepoint_jump_pad): Turn into...
232 (x86_target::install_fast_tracepoint_jump_pad): ...this.
233 (x86_get_min_fast_tracepoint_insn_len): Turn into...
234 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
235 (the_low_target): Remove the op fields.
236 * linux-aarch64-low.cc (class aarch64_target)
237 <supports_fast_tracepoints>
238 <install_fast_tracepoint_jump_pad>
239 <get_min_fast_tracepoint_insn_len>: Declare.
240 (aarch64_target::supports_fast_tracepoints): Define.
241 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
242 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
243 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
244 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
245 (the_low_target): Remove the op fields.
246 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
247 <install_fast_tracepoint_jump_pad>
248 <get_min_fast_tracepoint_insn_len>: Declare.
249 (ppc_target::supports_fast_tracepoints): Define.
250 (ppc_install_fast_tracepoint_jump_pad): Turn into...
251 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
252 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
253 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
254 (the_low_target): Remove the op fields.
255 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
256 <install_fast_tracepoint_jump_pad>
257 <get_min_fast_tracepoint_insn_len>: Declare.
258 (s390_target::supports_fast_tracepoints): Define.
259 (s390_install_fast_tracepoint_jump_pad): Turn into...
260 (s390_target::install_fast_tracepoint_jump_pad): ...this.
261 (s390_get_min_fast_tracepoint_insn_len): Turn into...
262 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
263 (the_low_target): Remove the op fields.
264 * linux-arm-low.cc (the_low_target): Remove the op fields.
265 * linux-bfin-low.cc (the_low_target): Ditto.
266 * linux-crisv32-low.cc (the_low_target): Ditto.
267 * linux-m32r-low.cc (the_low_target): Ditto.
268 * linux-m68k-low.cc (the_low_target): Ditto.
269 * linux-sh-low.cc (the_low_target): Ditto.
270 * linux-tic6x-low.cc (the_low_target): Ditto.
271 * linux-tile-low.cc (the_low_target): Ditto.
272 * linux-xtensa-low.cc (the_low_target): Ditto.
273
2742020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
275
276 Turn the 'get_thread_area' linux target op into a method of
277 process_stratum_target.
278
279 * linux-low.h (struct linux_target_ops): Remove the op.
280 (class linux_process_target) <stuck_in_jump_pad>
281 <linux_fast_tracepoint_collecting>
282 <low_get_thread_area>: Declare.
283 * linux-low.cc (supports_fast_tracepoints): Remove.
284 (linux_fast_tracepoint_collecting): Turn into...
285 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
286 (linux_process_target::low_get_thread_area): Define.
287 (stuck_in_jump_pad_callback): Turn into...
288 (linux_process_target::stuck_in_jump_pad): ...this.
289
290 Update the caller below.
291
292 (linux_process_target::stabilize_threads)
293
294 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
295 Declare.
296 (x86_get_thread_area): Turn into...
297 (x86_target::low_get_thread_area): ...this.
298 (the_low_target): Remove the op field.
299 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
300 Declare.
301 (aarch64_get_thread_area): Turn into...
302 (aarch64_target::low_get_thread_area): ...this.
303 (the_low_target): Remove the op field.
304 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
305 Declare.
306 (ppc_get_thread_area): Turn into...
307 (ppc_target::low_get_thread_area): ...this.
308 (the_low_target): Remove the op field.
309 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
310 Declare.
311 (s390_get_thread_area): Turn into...
312 (s390_target::low_get_thread_area): ...this.
313 (the_low_target): Remove the op field.
314 * linux-arm-low.cc (the_low_target): Remove the op field.
315 * linux-bfin-low.cc (the_low_target): Ditto.
316 * linux-crisv32-low.cc (the_low_target): Ditto.
317 * linux-m32r-low.cc (the_low_target): Ditto.
318 * linux-m68k-low.cc (the_low_target): Ditto.
319 * linux-sh-low.cc (the_low_target): Ditto.
320 * linux-tic6x-low.cc (the_low_target): Ditto.
321 * linux-tile-low.cc (the_low_target): Ditto.
322 * linux-xtensa-low.cc (the_low_target): Ditto.
323
3242020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
325
326 Remote the 'supports_tracepoints' linux target op and let the
327 concrete linux target define it by overriding the op declared in
328 process_stratum_target.
329
330 * linux-low.h (struct linux_target_ops): Remove the op.
331 (class linux_process_target) <supports_tracepoints>: Remove.
332 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
333 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
334 Declare.
335 (x86_supports_tracepoints): Turn into...
336 (x86_target::supports_tracepoints): ...this.
337 (the_low_target): Remove the op field.
338 * linux-aarch64-low.cc (class aarch64_target)
339 <supports_tracepoints>: Declare.
340 (aarch64_supports_tracepoints): Turn into...
341 (aarch64_target::supports_tracepoints): ...this.
342 (the_low_target): Remove the op field.
343 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
344 Declare.
345 (ppc_supports_tracepoints): Turn into...
346 (ppc_target::supports_tracepoints): ...this.
347 (the_low_target): Remove the op field.
348 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
349 Declare.
350 (s390_supports_tracepoints): Turn into...
351 (s390_target::supports_tracepoints): ...this.
352 (the_low_target): Remove the op field.
353 * linux-arm-low.cc (the_low_target): Remove the op field.
354 * linux-bfin-low.cc (the_low_target): Ditto.
355 * linux-crisv32-low.cc (the_low_target): Ditto.
356 * linux-m32r-low.cc (the_low_target): Ditto.
357 * linux-m68k-low.cc (the_low_target): Ditto.
358 * linux-sh-low.cc (the_low_target): Ditto.
359 * linux-tic6x-low.cc (the_low_target): Ditto.
360 * linux-tile-low.cc (the_low_target): Ditto.
361 * linux-xtensa-low.cc (the_low_target): Ditto.
362
3632020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
364
365 Remove the 'process_qsupported' linux target op and let a concrete
366 linux target define the op by overriding the op declaration in
367 process_stratum_target.
368
369 * linux-low.h (struct linux_target_ops): Remove the op.
370 (class linux_process_target) <process_qsupported>: Remove.
371 * linux-low.cc (linux_process_target::process_qsupported): Remove.
372 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
373 (x86_linux_process_qsupported): Turn into...
374 (x86_target::process_qsupported): ...this.
375 (the_low_target): Remove the op field.
376 * linux-aarch64-low.cc (the_low_target): Remove the op
377 field.
378 * linux-arm-low.cc (the_low_target): Ditto.
379 * linux-bfin-low.cc (the_low_target): Ditto.
380 * linux-crisv32-low.cc (the_low_target): Ditto.
381 * linux-m32r-low.cc (the_low_target): Ditto.
382 * linux-m68k-low.cc (the_low_target): Ditto.
383 * linux-ppc-low.cc (the_low_target): Ditto.
384 * linux-s390-low.cc (the_low_target): Ditto.
385 * linux-sh-low.cc (the_low_target): Ditto.
386 * linux-tic6x-low.cc (the_low_target): Ditto.
387 * linux-tile-low.cc (the_low_target): Ditto.
388 * linux-xtensa-low.cc (the_low_target): Ditto.
389
3902020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
391
392 Turn the 'prepare_to_resume' linux target op into a method of
393 linux_process_target.
394
395 * linux-low.h (struct linux_target_ops): Remove the op.
396 (class linux_process_target) <low_prepare_to_resume>: Declare.
397 * linux-low.cc (linux_process_target::low_prepare_to_resume):
398 Define.
399
400 Update the callers below:
401
402 (linux_process_target::resume_one_lwp_throw)
403 (linux_process_target::low_prepare_to_resume)
404
405 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
406 Declare.
407 (x86_target::low_prepare_to_resume): Define.
408 (the_low_target): Remove the op field.
409 * linux-aarch64-low.cc (class aarch64_target)
410 <low_prepare_to_resume>: Declare.
411 (aarch64_target::low_prepare_to_resume): Define.
412 (the_low_target): Remove the op field.
413 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
414 Declare.
415 (arm_prepare_to_resume): Turn into...
416 (arm_target::low_prepare_to_resume): ...this.
417 (the_low_target): Remove the op field.
418 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
419 Declare.
420 (mips_linux_prepare_to_resume): Turn into...
421 (mips_target::low_prepare_to_resume): ...this.
422 (the_low_target): Remove the op field.
423 * linux-bfin-low.cc (the_low_target): Remove the op field.
424 * linux-crisv32-low.cc (the_low_target): Ditto.
425 * linux-m32r-low.cc (the_low_target): Ditto.
426 * linux-m68k-low.cc (the_low_target): Ditto.
427 * linux-ppc-low.cc (the_low_target): Ditto.
428 * linux-s390-low.cc (the_low_target): Ditto.
429 * linux-sh-low.cc (the_low_target): Ditto.
430 * linux-tic6x-low.cc (the_low_target): Ditto.
431 * linux-tile-low.cc (the_low_target): Ditto.
432 * linux-xtensa-low.cc (the_low_target): Ditto.
433
4342020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
435
436 Turn the 'new_process', 'delete_process', 'new_thread',
437 'delete_thread', and 'new_fork' linux target ops into methods
438 of linux_process_target.
439
440 * linux-low.h (struct linux_target_ops): Remove the ops.
441 (class linux_process_target) <add_linux_process>
442 <add_lwp>
443 <delete_lwp>
444 <attach_lwp>
445 <detach_one_lwp>
446 <check_zombie_leaders>
447 <filter_exit_event>
448 <low_new_process>
449 <low_delete_process>
450 <low_new_thread>
451 <low_delete_thread>
452 <low_new_fork>: Declare.
453 * linux-low.cc (delete_lwp): Turn into...
454 (linux_process_target::delete_lwp): ...this.
455 (linux_process_target::low_delete_thread): Define.
456 (linux_add_process): Turn into...
457 (linux_process_target::add_linux_process): ...this.
458 (linux_process_target::low_new_process): Define.
459 (linux_process_target::low_delete_process): Define.
460 (linux_process_target::low_new_fork): Define.
461 (add_lwp): Turn into...
462 (linux_process_target::add_lwp): ...this.
463 (linux_process_target::low_new_thread): Define.
464 (linux_attach_lwp): Turn into...
465 (linux_process_target::attach_lwp): ...this.
466 (linux_detach_one_lwp): Turn into...
467 (linux_process_target::detach_one_lwp): ...this.
468 (linux_detach_lwp_callback): Remove and inline...
469 (linux_process_target::detach): ...here.
470 (check_zombie_leaders): Turn into...
471 (linux_process_target::check_zombie_leaders): ...this.
472 (filter_exit_event): Turn into...
473 (linux_process_target::filter_exit_event): ...this.
474
475 Update the callers below.
476
477 (linux_process_target::handle_extended_wait)
478 (linux_process_target::create_inferior)
479 (attach_proc_task_lwp_callback)
480 (linux_process_target::attach)
481 (linux_process_target::detach)
482 (linux_process_target::mourn)
483 * thread-db.cc (attach_thread)
484
485 * linux-x86-low.cc (class x86_target) <low_new_process>
486 <low_delete_process>
487 <low_new_thread>
488 <low_delete_thread>
489 <low_new_fork>: Declare.
490 (x86_linux_new_process): Turn into...
491 (x86_target::low_new_process): ...this.
492 (x86_linux_delete_process): Turn into...
493 (x86_target::low_delete_process): ...this.
494 (x86_target::low_new_thread): Define.
495 (x86_target::low_delete_thread): Define.
496 (x86_linux_new_fork): Turn into...
497 (x86_target::low_new_fork): ...this.
498 (the_low_target): Remove the op fields.
499 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
500 <low_delete_process>
501 <low_new_thread>
502 <low_delete_thread>
503 <low_new_fork>: Declare.
504 (aarch64_linux_new_process): Turn into...
505 (aarch64_target::low_new_process): ...this.
506 (aarch64_linux_delete_process): Turn into...
507 (aarch64_target::low_delete_process): ...this.
508 (aarch64_target::low_new_thread): Define.
509 (aarch64_target::low_delete_thread): Define.
510 (aarch64_linux_new_fork): Turn into...
511 (aarch64_target::low_new_fork): ...this.
512 (the_low_target): Remove the op fields.
513 * linux-arm-low.cc (class arm_target) <low_new_process>
514 <low_delete_process>
515 <low_new_thread>
516 <low_delete_thread>
517 <low_new_fork>: Declare.
518 (arm_new_process): Turn into...
519 (arm_target::low_new_process): ...this.
520 (arm_delete_process): Turn into...
521 (arm_target::low_delete_process): ...this.
522 (arm_new_thread): Turn into...
523 (arm_target::low_new_thread): ...this.
524 (arm_delete_thread): Turn into...
525 (arm_target::low_delete_thread): ...this.
526 (arm_new_fork): Turn into...
527 (arm_target::low_new_fork): ...this.
528 (the_low_target): Remove the op fields.
529 * linux-mips-low.cc (class mips_target) <low_new_process>
530 <low_delete_process>
531 <low_new_thread>
532 <low_delete_thread>
533 <low_new_fork>: Declare.
534 (mips_linux_new_process): Turn into...
535 (mips_target::low_new_process): ...this.
536 (mips_linux_delete_process): Turn into...
537 (mips_target::low_delete_process): ...this.
538 (mips_linux_new_thread): Turn into...
539 (mips_target::low_new_thread): ...this.
540 (mips_linux_delete_thread): Turn into...
541 (mips_target::low_delete_thread): ...this.
542 (mips_linux_new_fork): Turn into...
543 (mips_target::low_new_fork): ...this.
544 (the_low_target): Remove the op fields.
545 * linux-bfin-low.cc (the_low_target): Remove the op fields.
546 * linux-crisv32-low.cc (the_low_target): Ditto.
547 * linux-m32r-low.cc (the_low_target): Ditto.
548 * linux-m68k-low.cc (the_low_target): Ditto.
549 * linux-ppc-low.cc (the_low_target): Ditto.
550 * linux-s390-low.cc (the_low_target): Ditto.
551 * linux-sh-low.cc (the_low_target): Ditto.
552 * linux-tic6x-low.cc (the_low_target): Ditto.
553 * linux-tile-low.cc (the_low_target): Ditto.
554 * linux-xtensa-low.cc (the_low_target): Ditto.
555
5562020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
557
558 Turn the 'siginfo_fixup' linux target op into a method of
559 linux_process_target.
560
561 * linux-low.h (struct linux_target_ops): Remove the op.
562 (class linux_process_target) <siginfo_fixup>
563 <low_siginfo_fixup>: Declare.
564 * linux-low.cc (siginfo_fixup): Turn into...
565 (linux_process_target::siginfo_fixup): ...this.
566 (linux_process_target::low_siginfo_fixup): Define.
567 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
568 (x86_siginfo_fixup): Turn into...
569 (x86_target::low_siginfo_fixup): ...this.
570 (the_low_target): Remove the op field.
571 * linux-aarch64-low.cc (class aarch64_target):
572 <low_siginfo_fixup>: Declare.
573 (aarch64_linux_siginfo_fixup): Turn into...
574 (aarch64_target::low_siginfo_fixup): ...this.
575 (the_low_target): Remove the op field.
576 * linux-arm-low.cc (the_low_target): Remove the op field.
577 * linux-bfin-low.cc (the_low_target): Ditto.
578 * linux-crisv32-low.cc (the_low_target): Ditto.
579 * linux-m32r-low.cc (the_low_target): Ditto.
580 * linux-m68k-low.cc (the_low_target): Ditto.
581 * linux-mips-low.cc (the_low_target): Ditto.
582 * linux-ppc-low.cc (the_low_target): Ditto.
583 * linux-s390-low.cc (the_low_target): Ditto.
584 * linux-sh-low.cc (the_low_target): Ditto.
585 * linux-tic6x-low.cc (the_low_target): Ditto.
586 * linux-tile-low.cc (the_low_target): Ditto.
587 * linux-xtensa-low.cc (the_low_target): Ditto.
588
5892020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
590
591 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
592 linux target ops into methods of linux_process_target.
593
594 * linux-low.h (struct linux_target_ops): Remove the ops.
595 (class linux_process_target) <low_collect_ptrace_register>
596 <low_store_ptrace_register>: Declare.
597 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
598 (linux_process_target::low_supply_ptrace_register): Define.
599
600 Update the callers below.
601
602 (linux_process_target::fetch_register)
603 (linux_process_target::store_register)
604
605 * linux-x86-low.cc (the_low_target): Remove the op fields.
606 * linux-aarch64-low.cc (the_low_target): Ditto.
607 * linux-arm-low.cc (the_low_target): Ditto.
608 * linux-bfin-low.cc (the_low_target): Ditto.
609 * linux-crisv32-low.cc (the_low_target): Ditto.
610 * linux-m32r-low.cc (the_low_target): Ditto.
611 * linux-m68k-low.cc (the_low_target): Ditto.
612 * linux-sh-low.cc (the_low_target): Ditto.
613 * linux-sparc-low.cc (the_low_target): Ditto.
614 * linux-tic6x-low.cc (the_low_target): Ditto.
615 * linux-tile-low.cc (the_low_target): Ditto.
616 * linux-xtensa-low.cc (the_low_target): Ditto.
617 * linux-mips-low.cc (class mips_target)
618 <low_collect_ptrace_register>
619 <low_supply_ptrace_register>: Declare.
620 (mips_collect_ptrace_register): Turn into ...
621 (mips_target::low_collect_ptrace_register): ...this.
622 (mips_supply_ptrace_register): Turn into...
623 (mips_target::low_supply_ptrace_register): ...this.
624 (the_low_target): Remove the op fields.
625 * linux-ppc-low.cc (class ppc_target)
626 <low_collect_ptrace_register>
627 <low_supply_ptrace_register>: Declare.
628 (ppc_collect_ptrace_register): Turn into ...
629 (ppc_target::low_collect_ptrace_register): ...this.
630 (ppc_supply_ptrace_register): Turn into ...
631 (ppc_target::low_supply_ptrace_register): ...this.
632 (ppc_fill_gregset): Update for the calls to
633 low_collect_ptrace_register.
634 (the_low_target): Remove the op fields.
635 * linux-s390-low.cc (class s390_target)
636 <low_collect_ptrace_register>
637 <low_supply_ptrace_register>: Declare.
638 (s390_collect_ptrace_register): Turn into ...
639 (s390_target::low_collect_ptrace_register): ...this.
640 (s390_supply_ptrace_register): Turn into ...
641 (s390_target::low_supply_ptrace_register): ...this.
642 (s390_fill_gregset): Update for the calls to
643 low_collect_ptrace_register.
644 (the_low_target): Remove the op fields.
645
6462020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
647
648 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
649 target ops into methods of linux_process_target.
650
651 * linux-low.h (struct linux_target_ops): Remove the ops.
652 (class linux_process_target) <check_stopped_by_watchpoint>
653 <low_stopped_by_watchpoint>
654 <low_stopped_data_address>: Declare.
655 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
656 (linux_process_target::check_stopped_by_watchpoint): ...this.
657 (linux_process_target::low_stopped_by_watchpoint): Define.
658 (linux_process_target::low_stopped_data_address): Define.
659 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
660 <low_stopped_data_address>: Declare.
661 (x86_stopped_by_watchpoint): Turn into...
662 (x86_target::low_stopped_by_watchpoint): ...this.
663 (x86_stopped_data_address): Turn into...
664 (x86_target::low_stopped_data_address): ...this.
665 (the_low_target): Remove the op fields.
666 * linux-aarch64-low.cc (class aarch64_target)
667 <low_stopped_by_watchpoint>
668 <low_stopped_data_address>: Declare.
669 (aarch64_stopped_by_watchpoint): Turn into...
670 (aarch64_target::low_stopped_by_watchpoint): ...this.
671 (aarch64_stopped_data_address): Turn into...
672 (aarch64_target::low_stopped_data_address): ...this.
673 (the_low_target): Remove the op fields.
674 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
675 <low_stopped_data_address>: Declare.
676 (arm_stopped_by_watchpoint): Turn into...
677 (arm_target::low_stopped_by_watchpoint): ...this.
678 (arm_stopped_data_address): Turn into...
679 (arm_target::low_stopped_data_address): ...this.
680 (the_low_target): Remove the op fields.
681 * linux-crisv32-low.cc (class crisv32_target)
682 <low_stopped_by_watchpoint>
683 <low_stopped_data_address>: Declare.
684 (cris_stopped_by_watchpoint): Turn into...
685 (crisv32_target::low_stopped_by_watchpoint): ...this.
686 (cris_stopped_data_address): Turn into...
687 (crisv32_target::low_stopped_data_address): ...this.
688 (the_low_target): Remove the op fields.
689 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
690 <low_stopped_data_address>: Declare.
691 (mips_stopped_by_watchpoint): Turn into...
692 (mips_target::low_stopped_by_watchpoint): ...this.
693 (mips_stopped_data_address): Turn into...
694 (mips_target::low_stopped_data_address): ...this.
695 (the_low_target): Remove the op fields.
696 * linux-bfin-low.cc (the_low_target): Remove the op fields.
697 * linux-m32r-low.cc (the_low_target): Ditto.
698 * linux-m68k-low.cc (the_low_target): Ditto.
699 * linux-ppc-low.cc (the_low_target): Ditto.
700 * linux-s390-low.cc (the_low_target): Ditto.
701 * linux-sh-low.cc (the_low_target): Ditto.
702 * linux-sparc-low.cc (the_low_target): Ditto.
703 * linux-tic6x-low.cc (the_low_target): Ditto.
704 * linux-tile-low.cc (the_low_target): Ditto.
705 * linux-xtensa-low.cc (the_low_target): Ditto.
706
7072020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
708
709 Turn the 'insert_point' and 'remove_point' linux target ops into
710 methods of linux_process_target.
711
712 * linux-low.h (struct linux_target_ops): Remove the ops.
713 (class linux_process_target) <low_insert_point>
714 <low_remove_point>: Declare.
715 * linux-low.cc (linux_process_target::low_insert_point)
716 (linux_process_target::low_remove_point): Define.
717 (linux_process_target::insert_point)
718 (linux_process_target::remove_point): Update for calls to
719 low_insert_point and low_remove_point.
720 * linux-x86-low.cc (class x86_target) <low_insert_point>
721 <low_remove_point>: Declare.
722 (x86_insert_point): Turn into...
723 (x86_target::low_insert_point): ...this.
724 (x86_remove_point): Turn into...
725 (x86_target::low_remove_point): ...this.
726 (the_low_target): Remove the op fields.
727 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
728 <low_remove_point>: Declare.
729 (aarch64_insert_point): Turn into...
730 (aarch64_target::low_insert_point): ...this.
731 (aarch64_remove_point): Turn into...
732 (aarch64_target::low_remove_point): ...this.
733 (the_low_target): Remove the op fields.
734 * linux-arm-low.cc (class arm_target) <low_insert_point>
735 <low_remove_point>: Declare.
736 (arm_insert_point): Turn into...
737 (arm_target::low_insert_point): ...this.
738 (arm_remove_point): Turn into...
739 (arm_target::low_remove_point): ...this.
740 (the_low_target): Remove the op fields.
741 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
742 <low_remove_point>: Declare.
743 (crisv32_insert_point): Turn into...
744 (crisv32_target::low_insert_point): ...this.
745 (crisv32_remove_point): Turn into...
746 (crisv32_target::low_remove_point): ...this.
747 (the_low_target): Remove the op fields.
748 * linux-mips-low.cc (class mips_target) <low_insert_point>
749 <low_remove_point>: Declare.
750 (mips_insert_point): Turn into...
751 (mips_target::low_insert_point): ...this.
752 (mips_remove_point): Turn into...
753 (mips_target::low_remove_point): ...this.
754 (the_low_target): Remove the op fields.
755 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
756 <low_remove_point>: Declare.
757 (ppc_insert_point): Turn into...
758 (ppc_target::low_insert_point): ...this.
759 (ppc_remove_point): Turn into...
760 (ppc_target::low_remove_point): ...this.
761 (the_low_target): Remove the op fields.
762 * linux-bfin-low.cc (the_low_target): Remove the op fields.
763 * linux-m32r-low.cc (the_low_target): Ditto.
764 * linux-m68k-low.cc (the_low_target): Ditto.
765 * linux-s390-low.cc (the_low_target): Ditto.
766 * linux-sh-low.cc (the_low_target): Ditto.
767 * linux-sparc-low.cc (the_low_target): Ditto.
768 * linux-tic6x-low.cc (the_low_target): Ditto.
769 * linux-tile-low.cc (the_low_target): Ditto.
770 * linux-xtensa-low.cc (the_low_target): Ditto.
771
7722020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
773
774 Remove the 'supports_z_point_type' linux target op and let the
775 concrete linux target define it by overriding the op declared in
776 process_stratum_target.
777
778 * linux-low.cc (linux_process_target::supports_z_point_type):
779 Remove.
780 * linux-low.h (struct linux_target_ops): Remove the op.
781 (class linux_process_target) <supports_z_point_type>: Remove.
782 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
783 Declare.
784 (x86_supports_z_point_type): Turn into...
785 (x86_target::supports_z_point_type): ...this.
786 (the_low_target): Remove the op field.
787 * linux-aarch64-low.cc (class aarch64_target)
788 <supports_z_point_type>: Declare.
789 (aarch64_supports_z_point_type): Turn into...
790 (aarch64_target::supports_z_point_type): ...this.
791 (the_low_target): Remove the op field.
792 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
793 Declare.
794 (arm_supports_z_point_type): Turn into...
795 (arm_target::supports_z_point_type): ...this.
796 (the_low_target): Remove the op field.
797 * linux-crisv32-low.cc (class crisv32_target)
798 <supports_z_point_type>: Declare.
799 (cris_supports_z_point_type): Turn into...
800 (crisv32_target::supports_z_point_type): ...this.
801 (the_low_target): Remove the op field.
802 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
803 Declare.
804 (mips_supports_z_point_type): Turn into...
805 (mips_target::supports_z_point_type): ...this.
806 (the_low_target): Remove the op field.
807 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
808 Declare.
809 (ppc_supports_z_point_type): Turn into...
810 (ppc_target::supports_z_point_type): ...this.
811 (the_low_target): Remove the op field.
812 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
813 Declare.
814 (s390_supports_z_point_type): Turn into...
815 (s390_target::supports_z_point_type): ...this.
816 (the_low_target): Remove the op field.
817 * linux-bfin-low.cc (the_low_target): Remove the op field.
818 * linux-m32r-low.cc (the_low_target): Ditto.
819 * linux-m68k-low.cc (the_low_target): Ditto.
820 * linux-sh-low.cc (the_low_target): Ditto.
821 * linux-sparc-low.cc (the_low_target): Ditto.
822 * linux-tic6x-low.cc (the_low_target): Ditto.
823 * linux-tile-low.cc (the_low_target): Ditto.
824 * linux-xtensa-low.cc (the_low_target): Ditto.
825
8262020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
827
828 Turn the 'breakpoint_at' linux target op into a method of
829 linux_process_target.
830
831 * linux-low.h (struct linux_target_ops): Remove the op.
832 (class linux_process_target) <low_breakpoint_at>: Declare.
833
834 Update the callers below:
835
836 * linux-low.cc (linux_process_target::save_stop_reason)
837 (linux_process_target::thread_still_has_status_pending)
838 (linux_process_target::wait_1)
839
840 * linux-x86-low.cc (class x86_target)
841 <low_breakpoint_at>: Declare.
842 (x86_breakpoint_at): Turn into...
843 (x86_target::low_breakpoint_at): ...this.
844 (the_low_target): Remove the op field.
845 * linux-aarch64-low.cc (class aarch64_target)
846 <low_breakpoint_at>: Declare.
847 (aarch64_breakpoint_at): Turn into...
848 (aarch64_target::low_breakpoint_at): ...this.
849 (the_low_target): Remove the op field.
850 * linux-arm-low.cc (class arm_target)
851 <low_breakpoint_at>: Declare.
852 (arm_target::low_breakpoint_at): Define.
853 (the_low_target): Remove the op field.
854 * linux-bfin-low.cc (class bfin_target)
855 <low_breakpoint_at>: Declare.
856 (bfin_breakpoint_at): Turn into...
857 (bfin_target::low_breakpoint_at): ...this.
858 (the_low_target): Remove the op field.
859 * linux-cris-low.cc (class cris_target)
860 <low_breakpoint_at>: Declare.
861 (cris_breakpoint_at): Turn into...
862 (cris_target::low_breakpoint_at): ...this.
863 (the_low_target): Remove the op field.
864 * linux-crisv32-low.cc (class crisv32_target)
865 <low_breakpoint_at>: Declare.
866 (crisv32_breakpoint_at): Turn into...
867 (crisv32_target::low_breakpoint_at): ...this.
868 (the_low_target): Remove the op field.
869 * linux-ia64-low.cc (class ia64_target)
870 <low_breakpoint_at>: Declare.
871 (ia64_target::low_breakpoint_at): Define.
872 * linux-m32r-low.cc (class m32r_target)
873 <low_breakpoint_at>: Declare.
874 (m32r_breakpoint_at): Turn into...
875 (m32r_target::low_breakpoint_at): ...this.
876 (the_low_target): Remove the op field.
877 * linux-m68k-low.cc (class m68k_target)
878 <low_breakpoint_at>: Declare.
879 (m68k_breakpoint_at): Turn into...
880 (m68k_target::low_breakpoint_at): ...this.
881 (the_low_target): Remove the op field.
882 * linux-mips-low.cc (class mips_target)
883 <low_breakpoint_at>: Declare.
884 (mips_breakpoint_at): Turn into...
885 (mips_target::low_breakpoint_at): ...this.
886 (the_low_target): Remove the op field.
887 * linux-nios2-low.cc (class nios2_target)
888 <low_breakpoint_at>: Declare.
889 (nios2_breakpoint_at): Turn into...
890 (nios2_target::low_breakpoint_at): ...this.
891 (the_low_target): Remove the op field.
892 * linux-ppc-low.cc (class ppc_target)
893 <low_breakpoint_at>: Declare.
894 (ppc_breakpoint_at): Turn into...
895 (ppc_target::low_breakpoint_at): ...this.
896 (the_low_target): Remove the op field.
897 * linux-riscv-low.cc (class riscv_target)
898 <low_breakpoint_at>: Declare.
899 (riscv_breakpoint_at): Turn into...
900 (riscv_target::low_breakpoint_at): ...this.
901 (the_low_target): Remove the op field.
902 * linux-s390-low.cc (class s390_target)
903 <low_breakpoint_at>: Declare.
904 (s390_breakpoint_at): Turn into...
905 (s390_target::low_breakpoint_at): ...this.
906 (the_low_target): Remove the op field.
907 * linux-sh-low.cc (class sh_target)
908 <low_breakpoint_at>: Declare.
909 (sh_breakpoint_at): Turn into...
910 (sh_target::low_breakpoint_at): ...this.
911 (the_low_target): Remove the op field.
912 * linux-sparc-low.cc (class sparc_target)
913 <low_breakpoint_at>: Declare.
914 (sparc_breakpoint_at): Turn into...
915 (sparc_target::low_breakpoint_at): ...this.
916 (the_low_target): Remove the op field.
917 * linux-tic6x-low.cc (class tic6x_target)
918 <low_breakpoint_at>: Declare.
919 (tic6x_breakpoint_at): Turn into...
920 (tic6x_target::low_breakpoint_at): ...this.
921 (the_low_target): Remove the op field.
922 * linux-tile-low.cc (class tile_target)
923 <low_breakpoint_at>: Declare.
924 (tile_breakpoint_at): Turn into...
925 (tile_target::low_breakpoint_at): ...this.
926 (the_low_target): Remove the op field.
927 * linux-xtensa-low.cc (class xtensa_target)
928 <low_breakpoint_at>: Declare.
929 (xtensa_breakpoint_at): Turn into...
930 (xtensa_target::low_breakpoint_at): ...this.
931 (the_low_target): Remove the op field.
932
9332020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
934
935 Turn the 'decr_pc_after_break' linux_target_ops field into
936 a method of linux_process_target.
937
938 * linux-low.h (struct linux_target_ops)
939 <decr_pc_after_break>: Remove.
940 (class linux_process_target) <low_decr_pc_after_break>: New method
941 declaration.
942 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
943 New method implementation.
944
945 Update the users below.
946
947 (linux_process_target::save_stop_reason)
948 (linux_process_target::wait_1)
949 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
950 New declaration.
951 (x86_target::low_decr_pc_after_break): New method implementation.
952 (the_low_target): Remove the field.
953 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
954 New declaration.
955 (bfin_target::low_decr_pc_after_break): New method implementation.
956 (the_low_target): Remove the field.
957 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
958 New declaration.
959 (m68k_target::low_decr_pc_after_break): New method implementation.
960 (the_low_target): Remove the field.
961 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
962 New declaration.
963 (s390_target::low_decr_pc_after_break): New method implementation.
964 (the_low_target): Remove the field.
965 * linux-aarch64-low.cc (the_low_target): Remove the field.
966 * linux-arm-low.cc (the_low_target): Remove the field.
967 * linux-cris-low.cc (the_low_target): Remove the field.
968 * linux-crisv32-low.cc (the_low_target): Remove the field.
969 * linux-m32r-low.cc (the_low_target): Remove the field.
970 * linux-mips-low.cc (the_low_target): Remove the field.
971 * linux-nios2-low.cc (the_low_target): Remove the field.
972 * linux-ppc-low.cc (the_low_target): Remove the field.
973 * linux-riscv-low.cc (the_low_target): Remove the field.
974 * linux-sh-low.cc (the_low_target): Remove the field.
975 * linux-sparc-low.cc (the_low_target): Remove the field.
976 * linux-tic6x-low.cc (the_low_target): Remove the field.
977 * linux-tile-low.cc (the_low_target): Remove the field.
978 * linux-xtensa-low.cc (the_low_target): Remove the field.
979
9802020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
981
982 Remove the 'supports_software_single_step' linux target op and let
983 the concrete linux target define it by overriding the op in
984 process_stratum_target.
985 Turn the 'get_next_pcs' linux target op into a method of
986 linux_process_target.
987
988 * linux-low.h (struct linux_target_ops): Remove the ops.
989 (class linux_process_target) <supports_software_single_step>:
990 Remove.
991 <low_get_next_pcs>: Declare.
992 * linux-low.cc (can_software_single_step): Remove.
993 (linux_process_target::low_get_next_pcs): Define.
994 (linux_process_target::supports_software_single_step): Remove.
995
996 Update the callers below.
997
998 (linux_process_target::handle_extended_wait)
999 (linux_process_target::wait_1)
1000 (linux_process_target::install_software_single_step_breakpoints)
1001 (linux_process_target::single_step)
1002 (linux_process_target::thread_needs_step_over)
1003 (linux_process_target::proceed_one_lwp)
1004 (linux_process_target::supports_range_stepping)
1005
1006 * linux-x86-low.cc (the_low_target): Remove the op field.
1007 * linux-aarch64-low.cc (the_low_target): Ditto.
1008 * linux-bfin-low.cc (the_low_target): Ditto.
1009 * linux-cris-low.cc (the_low_target): Ditto.
1010 * linux-crisv32-low.cc (the_low_target): Ditto.
1011 * linux-m32r-low.cc (the_low_target): Ditto.
1012 * linux-m68k-low.cc (the_low_target): Ditto.
1013 * linux-mips-low.cc (the_low_target): Ditto.
1014 * linux-nios2-low.cc (the_low_target): Ditto.
1015 * linux-ppc-low.cc (the_low_target): Ditto.
1016 * linux-riscv-low.cc (the_low_target): Ditto.
1017 * linux-s390-low.cc (the_low_target): Ditto.
1018 * linux-sh-low.cc (the_low_target): Ditto.
1019 * linux-sparc-low.cc (the_low_target): Ditto.
1020 * linux-tic6x-low.cc (the_low_target): Ditto.
1021 * linux-tile-low.cc (the_low_target): Ditto.
1022 * linux-xtensa-low.cc (the_low_target): Ditto.
1023 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1024 <supports_software_single_step>: Declare.
1025 (arm_target::supports_software_single_step): Define.
1026 (arm_gdbserver_get_next_pcs): Turn into...
1027 (arm_target::low_get_next_pcs): ...this.
1028 (the_low_target): Remove the op field.
1029
10302020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1031
1032 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1033 the concrete linux target define it by overriding the op
1034 in process_stratum_target.
1035
1036 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1037 Remove.
1038 * linux-low.h (struct linux_target_ops): Remove the op.
1039 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1040 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1041 Declare.
1042 (x86_sw_breakpoint_from_kind): Turn into...
1043 (x86_target::sw_breakpoint_from_kind): ...this.
1044 (the_low_target): Remove the op field.
1045 * linux-aarch64-low.cc (class aarch64_target)
1046 <sw_breakpoint_from_kind>: Declare.
1047 (aarch64_sw_breakpoint_from_kind): Turn into...
1048 (aarch64_target::sw_breakpoint_from_kind): ...this.
1049 (the_low_target): Remove the op field.
1050 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1051 Declare.
1052 (arm_target::sw_breakpoint_from_kind): Define.
1053 (the_low_target): Remove the op field.
1054 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1055 Declare.
1056 (bfin_sw_breakpoint_from_kind): Turn into...
1057 (bfin_target::sw_breakpoint_from_kind): ...this.
1058 (the_low_target): Remove the op field.
1059 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1060 Declare.
1061 (cris_sw_breakpoint_from_kind): Turn into...
1062 (cris_target::sw_breakpoint_from_kind): ...this.
1063 (the_low_target): Remove the op field.
1064 * linux-crisv32-low.cc (class crisv32_target)
1065 <sw_breakpoint_from_kind>: Declare.
1066 (cris_sw_breakpoint_from_kind): Turn into...
1067 (crisv32_target::sw_breakpoint_from_kind): ...this.
1068 (the_low_target): Remove the op field.
1069 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1070 Declare.
1071 (ia64_target::sw_breakpoint_from_kind): Define.
1072 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1073 Declare.
1074 (m32r_sw_breakpoint_from_kind): Turn into...
1075 (m32r_target::sw_breakpoint_from_kind): ...this.
1076 (the_low_target): Remove the op field.
1077 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1078 Declare.
1079 (m68k_sw_breakpoint_from_kind): Turn into...
1080 (m68k_target::sw_breakpoint_from_kind): ...this.
1081 (the_low_target): Remove the op field.
1082 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1083 Declare.
1084 (mips_sw_breakpoint_from_kind): Turn into...
1085 (mips_target::sw_breakpoint_from_kind): ...this.
1086 (the_low_target): Remove the op field.
1087 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1088 Declare.
1089 (nios2_sw_breakpoint_from_kind): Turn into...
1090 (nios2_target::sw_breakpoint_from_kind): ...this.
1091 (the_low_target): Remove the op field.
1092 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1093 Declare.
1094 (ppc_sw_breakpoint_from_kind): Turn into...
1095 (ppc_target::sw_breakpoint_from_kind): ...this.
1096 (the_low_target): Remove the op field.
1097 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1098 Declare.
1099 (riscv_sw_breakpoint_from_kind): Turn into...
1100 (riscv_target::sw_breakpoint_from_kind): ...this.
1101 (the_low_target): Remove the op field.
1102 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1103 Declare.
1104 (s390_sw_breakpoint_from_kind): Turn into...
1105 (s390_target::sw_breakpoint_from_kind): ...this.
1106 (the_low_target): Remove the op field.
1107 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1108 Declare.
1109 (sh_sw_breakpoint_from_kind): Turn into...
1110 (sh_target::sw_breakpoint_from_kind): ...this.
1111 (the_low_target): Remove the op field.
1112 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1113 Declare.
1114 (sparc_sw_breakpoint_from_kind): Turn into...
1115 (sparc_target::sw_breakpoint_from_kind): ...this.
1116 (the_low_target): Remove the op field.
1117 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1118 Declare.
1119 (tic6x_sw_breakpoint_from_kind): Turn into...
1120 (tic6x_target::sw_breakpoint_from_kind): ...this.
1121 (the_low_target): Remove the op field.
1122 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1123 Declare.
1124 (tile_sw_breakpoint_from_kind): Turn into...
1125 (tile_target::sw_breakpoint_from_kind): ...this.
1126 (the_low_target): Remove the op field.
1127 * linux-xtensa-low.cc (class xtensa_target)
1128 <sw_breakpoint_from_kind>: Declare.
1129 (xtensa_sw_breakpoint_from_kind): Turn into...
1130 (xtensa_target::sw_breakpoint_from_kind): ...this.
1131 (the_low_target): Remove the op field.
1132
11332020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1134
1135 Remove the 'breakpoint_kind_from_pc' and
1136 'breakpoint_kind_from_current_state' linux target ops, and let the
1137 concrete linux target define them by overriding the ops of
1138 process_stratum_target.
1139
1140 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1141 Remove.
1142 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1143 * linux-low.h (struct linux_target_ops): Remove ops.
1144 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1145 <breakpoint_kind_from_current_state>: Remove.
1146 * linux-x86-low.cc (the_low_target): Remove the op fields.
1147 * linux-bfin-low.cc (the_low_target): Ditto.
1148 * linux-cris-low.cc (the_low_target): Ditto.
1149 * linux-crisv32-low.cc (the_low_target): Ditto.
1150 * linux-m32r-low.cc (the_low_target): Ditto.
1151 * linux-m68k-low.cc (the_low_target): Ditto.
1152 * linux-mips-low.cc (the_low_target): Ditto.
1153 * linux-nios2-low.cc (the_low_target): Ditto.
1154 * linux-ppc-low.cc (the_low_target): Ditto.
1155 * linux-s390-low.cc (the_low_target): Ditto.
1156 * linux-sh-low.cc (the_low_target): Ditto.
1157 * linux-sparc-low.cc (the_low_target): Ditto.
1158 * linux-tic6x-low.cc (the_low_target): Ditto.
1159 * linux-tile-low.cc (the_low_target): Ditto.
1160 * linux-xtensa-low.cc (the_low_target): Ditto.
1161 * linux-aarch64-low.cc (class aarch64_target)
1162 <breakpoint_kind_from_pc>
1163 <breakpoint_kind_from_current_state>: Declare.
1164 (aarch64_breakpoint_kind_from_pc): Turn into...
1165 (aarch64_target::breakpoint_kind_from_pc): ...this.
1166 (aarch64_breakpoint_kind_from_current_state): Turn into...
1167 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1168 (the_low_target): Remove the op fields.
1169 * linux-arm-low.cc (class arm_target):
1170 <breakpoint_kind_from_pc>
1171 <breakpoint_kind_from_current_state>: Declare.
1172 (arm_target::breakpoint_kind_from_pc): Define.
1173 (arm_target::breakpoint_kind_from_current_state): Define.
1174 (the_low_target): Remove the op fields.
1175 * linux-riscv-low.cc (class riscv_target):
1176 <breakpoint_kind_from_pc>: Declare.
1177 (riscv_breakpoint_kind_from_pc): Turn into...
1178 (riscv_target::breakpoint_kind_from_pc): ...this.
1179 (the_low_target): Remove the op fields.
1180
11812020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1182
1183 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1184 of linux_process_target.
1185
1186 * linux-low.h (struct linux_target_ops): Remove the ops.
1187 (class linux_process_target) <low_supports_breakpoints>
1188 <low_get_pc>
1189 <low_set_pc>: Declare.
1190 * linux-low.cc (supports_breakpoints): Turn into...
1191 (linux_process_target::low_supports_breakpoints): ...this.
1192 (linux_process_target::low_get_pc): Define.
1193 (linux_process_target::low_set_pc): Define.
1194
1195 Update the callers below.
1196
1197 (linux_process_target::get_pc)
1198 (linux_process_target::save_stop_reason)
1199 (linux_process_target::maybe_move_out_of_jump_pad)
1200 (linux_process_target::wait_1)
1201 (linux_process_target::resume_one_lwp_throw)
1202 (linux_process_target::resume)
1203 (linux_process_target::proceed_all_lwps)
1204 (linux_process_target::read_pc)
1205 (linux_process_target::write_pc)
1206
1207 * linux-x86-low.cc (class linux_process_target)
1208 <low_supports_breakpoints>
1209 <low_get_pc>
1210 <low_set_pc>: Declare.
1211 (x86_target::low_supports_breakpoints): Define.
1212 (x86_get_pc): Turn into...
1213 (x86_target::low_get_pc): ...this.
1214 (x86_set_pc): Turn into...
1215 (x86_target::low_set_pc): ...this.
1216 (the_low_target): Remove the op fields.
1217 * linux-arm-low.cc (class arm_target)
1218 <low_supports_breakpoints>
1219 <low_get_pc>
1220 <low_set_pc>: Declare.
1221 (arm_target::low_supports_breakpoints)
1222 (arm_target::low_get_pc)
1223 (arm_target::low_set_pc): Define.
1224 (the_low_target): Remove the op fields.
1225 * linux-bfin-low.cc (class bfin_target)
1226 <low_supports_breakpoints>
1227 <low_get_pc>
1228 <low_set_pc>: Declare.
1229 (bfin_target::low_supports_breakpoints)
1230 (bfin_target::low_get_pc)
1231 (bfin_target::low_set_pc): Define.
1232 (the_low_target): Remove the op fields.
1233 * linux-cris-low.cc (class cris_target)
1234 <low_supports_breakpoints>
1235 <low_get_pc>
1236 <low_set_pc>: Declare.
1237 (cris_target::low_supports_breakpoints)
1238 (cris_target::low_get_pc)
1239 (cris_target::low_set_pc): Define.
1240 (the_low_target): Remove the op fields.
1241 * linux-crisv32-low.cc (class crisv32_target)
1242 <low_supports_breakpoints>
1243 <low_get_pc>
1244 <low_set_pc>: Declare.
1245 (crisv32_target::low_supports_breakpoints)
1246 (crisv32_target::low_get_pc)
1247 (crisv32_target::low_set_pc): Define.
1248 (the_low_target): Remove the op fields.
1249 * linux-m32r-low.cc (class m32r_target)
1250 <low_supports_breakpoints>
1251 <low_get_pc>
1252 <low_set_pc>: Declare.
1253 (m32r_target::low_supports_breakpoints)
1254 (m32r_target::low_get_pc)
1255 (m32r_target::low_set_pc): Define.
1256 (the_low_target): Remove the op fields.
1257 * linux-m68k-low.cc (class m68k_target)
1258 <low_supports_breakpoints>
1259 <low_get_pc>
1260 <low_set_pc>: Declare.
1261 (m68k_target::low_supports_breakpoints)
1262 (m68k_target::low_get_pc)
1263 (m68k_target::low_set_pc): Define.
1264 (the_low_target): Remove the op fields.
1265 * linux-nios2-low.cc (class nios2_target)
1266 <low_supports_breakpoints>
1267 <low_get_pc>
1268 <low_set_pc>: Declare.
1269 (nios2_target::low_supports_breakpoints)
1270 (nios2_target::low_get_pc)
1271 (nios2_target::low_set_pc): Define.
1272 (the_low_target): Remove the op fields.
1273 * linux-sh-low.cc (class sh_target)
1274 <low_supports_breakpoints>
1275 <low_get_pc>
1276 <low_set_pc>: Declare.
1277 (sh_target::low_supports_breakpoints)
1278 (sh_target::low_get_pc)
1279 (sh_target::low_set_pc): Define.
1280 (the_low_target): Remove the op fields.
1281 * linux-xtensa-low.cc (class xtensa_target)
1282 <low_supports_breakpoints>
1283 <low_get_pc>
1284 <low_set_pc>: Declare.
1285 (xtensa_target::low_supports_breakpoints)
1286 (xtensa_target::low_get_pc)
1287 (xtensa_target::low_set_pc): Define.
1288 (the_low_target): Remove the op fields.
1289 * linux-sparc-low.cc (class sparc_target)
1290 <low_supports_breakpoints>
1291 <low_get_pc>: Declare.
1292 (sparc_target::low_supports_breakpoints)
1293 (sparc_target::low_get_pc): Define.
1294 (the_low_target): Remove the op fields.
1295 * linux-tile-low.cc (class tile_target)
1296 <low_supports_breakpoints>
1297 <low_get_pc>
1298 <low_set_pc>: Declare.
1299 (tile_target::low_supports_breakpoints)
1300 (tile_target::low_get_pc)
1301 (tile_target::low_set_pc): Define.
1302 (the_low_target): Remove the op fields.
1303 * linux-aarch64-low.cc (class aarch64_target)
1304 <low_supports_breakpoints>
1305 <low_get_pc>
1306 <low_set_pc>: Declare.
1307 (aarch64_target::low_supports_breakpoints): Define.
1308 (aarch64_get_pc): Turn into...
1309 (aarch64_target::low_get_pc): ...this.
1310 (aarch64_set_pc): Turn into...
1311 (aarch64_target::low_set_pc): ...this.
1312 (the_low_target): Remove the op fields.
1313 * linux-mips-low.cc (class mips_target)
1314 <low_supports_breakpoints>
1315 <low_get_pc>
1316 <low_set_pc>: Declare.
1317 (mips_target::low_supports_breakpoints): Define.
1318 (mips_get_pc): Turn into...
1319 (mips_target::low_get_pc): ...this.
1320 (mips_set_pc): Turn into...
1321 (mips_target::low_set_pc): ...this.
1322 (the_low_target): Remove the op fields.
1323 * linux-ppc-low.cc (class ppc_target)
1324 <low_supports_breakpoints>
1325 <low_get_pc>
1326 <low_set_pc>: Declare.
1327 (ppc_target::low_supports_breakpoints): Define.
1328 (ppc_get_pc): Turn into...
1329 (ppc_target::low_get_pc): ...this.
1330 (ppc_set_pc): Turn into...
1331 (ppc_target::low_set_pc): ...this.
1332 (the_low_target): Remove the op fields.
1333 * linux-riscv-low.cc (class riscv_target)
1334 <low_supports_breakpoints>
1335 <low_get_pc>
1336 <low_set_pc>: Declare.
1337 (riscv_target::low_supports_breakpoints): Define.
1338 (riscv_get_pc): Turn into...
1339 (riscv_target::low_get_pc): ...this.
1340 (riscv_set_pc): Turn into...
1341 (riscv_target::low_set_pc): ...this.
1342 (the_low_target): Remove the op fields.
1343 * linux-s390-low.cc (class s390_target)
1344 <low_supports_breakpoints>
1345 <low_get_pc>
1346 <low_set_pc>: Declare.
1347 (s390_target::low_supports_breakpoints): Define.
1348 (s390_get_pc): Turn into...
1349 (s390_target::low_get_pc): ...this.
1350 (s390_set_pc): Turn into...
1351 (s390_target::low_set_pc): ...this.
1352 (the_low_target): Remove the op fields.
1353 * linux-tic6x-low.cc (class tic6x_target)
1354 <low_supports_breakpoints>
1355 <low_get_pc>
1356 <low_set_pc>: Declare.
1357 (tic6x_target::low_supports_breakpoints): Define.
1358 (tic6x_get_pc): Turn into...
1359 (tic6x_target::low_get_pc): ...this.
1360 (tic6x_set_pc): Turn into...
1361 (tic6x_target::low_set_pc): ...this.
1362 (the_low_target): Remove the op fields.
1363
13642020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1365
1366 Turn some more static methods in linux-low into private methods
1367 of linux_process_target.
1368
1369 * linux-low.cc (get_pc): Turn into...
1370 (linux_process_target::get_pc): ...this.
1371 (save_stop_reason): Turn into...
1372 (linux_process_target::save_stop_reason): ...this.
1373 (thread_still_has_status_pending_p): Turn into...
1374 (linux_process_target::thread_still_has_status_pending): ...this.
1375 (status_pending_p_callback): Turn into...
1376 (linux_process_target::status_pending_p_callback): ...this.
1377 (resume_stopped_resumed_lwps): Turn into...
1378 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1379 (install_software_single_step_breakpoints): Turn into...
1380 (linux_process_target::install_software_single_step_breakpoints):
1381 ...this.
1382 (single_step): Turn into...
1383 (linux_process_target::single_step): ...this.
1384 (linux_resume_one_lwp_throw): Turn into...
1385 (linux_process_target::resume_one_lwp_throw): ...this.
1386 (linux_resume_one_lwp): Turn into...
1387 (linux_process_target::resume_one_lwp): ...this.
1388 (resume_status_pending_p): Turn into...
1389 (linux_process_target::resume_status_pending): ...this.
1390 (need_step_over_p): Turn into...
1391 (linux_process_target::thread_needs_step_over): ...this.
1392 (linux_resume_one_thread): Turn into...
1393 (linux_process_target::resume_one_thread): ...this.
1394 (proceed_one_lwp): Turn into...
1395 (linux_process_target::proceed_one_lwp): ...this.
1396 (unsuspend_and_proceed_one_lwp): Turn into...
1397 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1398
1399 Update the calls/references to the above functions below.
1400
1401 (linux_process_target::handle_extended_wait)
1402 (linux_process_target::filter_event)
1403 (linux_process_target::wait_for_event_filtered)
1404 (linux_process_target::wait_1)
1405 (linux_process_target::move_out_of_jump_pad)
1406 (linux_process_target::start_step_over)
1407 (linux_process_target::resume)
1408 (linux_process_target::proceed_all_lwps)
1409 (regsets_store_inferior_registers)
1410 (linux_process_target::store_register)
1411
1412 * linux-low.h (class linux_process_target)
1413 <get_pc>
1414 <save_stop_reason>
1415 <thread_still_has_status_pending>
1416 <status_pending_p_callback>
1417 <resume_stopped_resumed_lwps>
1418 <install_software_single_step_breakpoints>
1419 <single_step>
1420 <resume_one_lwp_throw>
1421 <resume_one_lwp>
1422 <resume_status_pending>
1423 <thread_needs_step_over>
1424 <resume_one_thread>
1425 <proceed_one_lwp>
1426 <unsuspend_and_proceed_one_lwp>: Declare.
1427
14282020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1429
1430 Turn the 'fetch_register' linux target op into a method of
1431 linux_process_target.
1432
1433 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1434 (class linux_process_target) <low_fetch_register>: Declare.
1435 * linux-x86-low.cc (the_low_target)
1436 * linux-aarch64-low.cc (the_low_target)
1437 * linux-arm-low.cc (the_low_target)
1438 * linux-bfin-low.cc (the_low_target)
1439 * linux-cris-low.cc (the_low_target)
1440 * linux-crisv32-low.cc (the_low_target)
1441 * linux-m32r-low.cc (the_low_target)
1442 * linux-m68k-low.cc (the_low_target)
1443 * linux-nios2-low.cc (the_low_target)
1444 * linux-ppc-low.cc (the_low_target)
1445 * linux-s390-low.cc (the_low_target)
1446 * linux-sh-low.cc (the_low_target)
1447 * linux-sparc-low.cc (the_low_target)
1448 * linux-tic6x-low.cc (the_low_target)
1449 * linux-tile-low.cc (the_low_target)
1450 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1451 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1452 Declare.
1453 (ia64_fetch_register): Turn into...
1454 (ia64_target::low_fetch_register): ...this.
1455 (the_low_target): Remove the op field.
1456 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1457 Declare.
1458 (mips_fetch_register): Turn into...
1459 (mips_target::low_fetch_register): ...this.
1460 (the_low_target): Remove the op field.
1461 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1462 Declare.
1463 (riscv_fetch_register): Turn into...
1464 (riscv_target::low_fetch_register): ...this.
1465 (the_low_target): Remove the op field.
1466
1467 Update the callers below.
1468
1469 * linux-low.cc (linux_process_target::fetch_registers)
1470 (linux_process_target::low_fetch_register)
1471
14722020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1473
1474 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1475 linux target ops into methods of linux_process_target.
1476
1477 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1478 (class linux_process_target) <fetch_register>
1479 <store_register>
1480 <usr_fetch_inferior_registers>
1481 <usr_store_inferior_registers>
1482 <low_cannot_fetch_register>
1483 <low_cannot_fetch_register> Declare.
1484 * linux-low.cc (fetch_register): Turn into...
1485 (linux_process_target::fetch_register): ...this.
1486 (store_register): Turn into ...
1487 (linux_process_target::store_register): ...this.
1488 (usr_fetch_inferior_registers): Turn into...
1489 (linux_process_target::usr_fetch_inferior_registers): ...this.
1490 (usr_store_inferior_registers): Turn into...
1491 (linux_process_target::usr_store_inferior_registers): ...this.
1492 * linux-x86-low.cc (class x86_target)
1493 <low_cannot_fetch_register>
1494 <low_cannot_store_register>: Declare.
1495 (x86_cannot_store_register): Turn into...
1496 (x86_target::low_cannot_store_register): ...this.
1497 (x86_cannot_fetch_register): Turn into...
1498 (x86_target::low_cannot_fetch_register): ...this.
1499 (the_low_target): Remove the target op fields.
1500 * linux-aarch64-low.cc (class aarch64_target)
1501 <low_cannot_fetch_register>
1502 <low_cannot_store_register>: Declare.
1503 (aarch64_target::low_cannot_fetch_register)
1504 (aarch64_target::low_cannot_store_register): Define.
1505 (the_low_target): Remove the op fields.
1506 * linux-arm-low.cc (class arm_target)
1507 <low_cannot_fetch_register>
1508 <low_cannot_store_register>: Declare.
1509 (arm_cannot_fetch_register): Turn into...
1510 (arm_target::low_cannot_fetch_register): ...this.
1511 (arm_cannot_store_register): Turn into...
1512 (arm_target::low_cannot_store_register): ...this.
1513 (the_low_target): Remove the op fields.
1514 * linux-bfin-low.cc (class bfin_target)
1515 <low_cannot_fetch_register>
1516 <low_cannot_store_register>: Declare.
1517 (bfin_cannot_fetch_register): Turn into...
1518 (bfin_target::low_cannot_fetch_register): ...this.
1519 (bfin_cannot_store_register): Turn into...
1520 (bfin_target::low_cannot_store_register): ...this.
1521 (the_low_target): Remove the op fields.
1522 * linux-cris-low.cc (class cris_target)
1523 <low_cannot_fetch_register>
1524 <low_cannot_store_register>: Declare.
1525 (cris_cannot_fetch_register): Turn into...
1526 (cris_target::low_cannot_fetch_register): ...this.
1527 (cris_cannot_store_register): Turn into...
1528 (cris_target::low_cannot_store_register): ...this.
1529 (the_low_target): Remove the op fields.
1530 * linux-crisv32-low.cc (class crisv32_target)
1531 <low_cannot_fetch_register>
1532 <low_cannot_store_register>: Declare.
1533 (crisv32_target::low_cannot_fetch_register)
1534 (crisv32_target::low_cannot_store_register): Define.
1535 (the_low_target): Remove the op fields.
1536 * linux-ia64-low.cc (class ia64_target)
1537 <low_cannot_fetch_register>
1538 <low_cannot_store_register>: Declare.
1539 (ia64_cannot_fetch_register): Turn into...
1540 (ia64_target::low_cannot_fetch_register): ...this.
1541 (ia64_cannot_store_register): Turn into...
1542 (ia64_target::low_cannot_store_register): ...this.
1543 (the_low_target): Remove the op fields.
1544 * linux-m32r-low.cc (class m32r_target)
1545 <low_cannot_fetch_register>
1546 <low_cannot_store_register>: Declare.
1547 (m32r_cannot_fetch_register): Turn into...
1548 (m32r_target::low_cannot_fetch_register): ...this.
1549 (m32r_cannot_store_register): Turn into...
1550 (m32r_target::low_cannot_store_register): ...this.
1551 (the_low_target): Remove the op fields.
1552 * linux-m68k-low.cc (class m68k_target)
1553 <low_cannot_fetch_register>
1554 <low_cannot_store_register>: Declare.
1555 (m68k_cannot_fetch_register): Turn into...
1556 (m68k_target::low_cannot_fetch_register): ...this.
1557 (m68k_cannot_store_register): Turn into...
1558 (m68k_target::low_cannot_store_register): ...this.
1559 (the_low_target): Remove the op fields.
1560 * linux-mips-low.cc (class mips_target)
1561 <low_cannot_fetch_register>
1562 <low_cannot_store_register>: Declare.
1563 (mips_cannot_fetch_register): Turn into...
1564 (mips_target::low_cannot_fetch_register): ...this.
1565 (mips_cannot_store_register): Turn into...
1566 (mips_target::low_cannot_store_register): ...this.
1567 (get_usrregs_info): Inline at the call sites in
1568 low_cannot_fetch_register and low_cannot_store_register,
1569 and remove.
1570 (the_low_target): Remove the op fields.
1571 * linux-nios2-low.cc (class nios2_target)
1572 <low_cannot_fetch_register>
1573 <low_cannot_store_register>: Declare.
1574 (nios2_cannot_fetch_register): Turn into...
1575 (nios2_target::low_cannot_fetch_register): ...this.
1576 (nios2_cannot_store_register): Turn into...
1577 (nios2_target::low_cannot_store_register): ...this.
1578 (the_low_target): Remove the op fields.
1579 * linux-ppc-low.cc (class ppc_target)
1580 <low_cannot_fetch_register>
1581 <low_cannot_store_register>: Declare.
1582 (ppc_cannot_fetch_register): Turn into...
1583 (ppc_target::low_cannot_fetch_register): ...this.
1584 (ppc_cannot_store_register): Turn into...
1585 (ppc_target::low_cannot_store_register): ...this.
1586 (the_low_target): Remove the op fields.
1587 * linux-riscv-low.cc (class riscv_target)
1588 <low_cannot_fetch_register>
1589 <low_cannot_store_register>: Declare.
1590 (riscv_target::low_cannot_fetch_register)
1591 (riscv_target::low_cannot_store_register): Define.
1592 (the_low_target): Remove the op fields.
1593 * linux-s390-low.cc (class s390_target)
1594 <low_cannot_fetch_register>
1595 <low_cannot_store_register>: Declare.
1596 (s390_cannot_fetch_register): Turn into...
1597 (s390_target::low_cannot_fetch_register): ...this.
1598 (s390_cannot_store_register): Turn into...
1599 (s390_target::low_cannot_store_register): ...this.
1600 (the_low_target): Remove the op fields.
1601 * linux-sh-low.cc (class sh_target)
1602 <low_cannot_fetch_register>
1603 <low_cannot_store_register>: Declare.
1604 (sh_cannot_fetch_register): Turn into...
1605 (sh_target::low_cannot_fetch_register): ...this.
1606 (sh_cannot_store_register): Turn into...
1607 (sh_target::low_cannot_store_register): ...this.
1608 (the_low_target): Remove the op fields.
1609 * linux-sparc-low.cc (class sparc_target)
1610 <low_cannot_fetch_register>
1611 <low_cannot_store_register>: Declare.
1612 (sparc_cannot_fetch_register): Turn into...
1613 (sparc_target::low_cannot_fetch_register): ...this.
1614 (sparc_cannot_store_register): Turn into...
1615 (sparc_target::low_cannot_store_register): ...this.
1616 (the_low_target): Remove the op fields.
1617 * linux-tic6x-low.cc (class tic6x_target)
1618 <low_cannot_fetch_register>
1619 <low_cannot_store_register>: Declare.
1620 (tic6x_cannot_fetch_register): Turn into...
1621 (tic6x_target::low_cannot_fetch_register): ...this.
1622 (tic6x_cannot_store_register): Turn into...
1623 (tic6x_target::low_cannot_store_register): ...this.
1624 (the_low_target): Remove the op fields.
1625 * linux-tile-low.cc (class tile_target)
1626 <low_cannot_fetch_register>
1627 <low_cannot_store_register>: Declare.
1628 (tile_cannot_fetch_register): Turn into...
1629 (tile_target::low_cannot_fetch_register): ...this.
1630 (tile_cannot_store_register): Turn into...
1631 (tile_target::low_cannot_store_register): ...this.
1632 (the_low_target): Remove the op fields.
1633 * linux-xtensa-low.cc (class xtensa_target)
1634 <low_cannot_fetch_register>
1635 <low_cannot_store_register>: Declare.
1636 (xtensa_target::low_cannot_fetch_register)
1637 (xtensa_target::low_cannot_store_register): Define.
1638 (the_low_target): Remove the op fields.
1639
16402020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1641
1642 Turn the 'regs_info' linux target op into a method of
1643 linux_process_target.
1644
1645 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1646 (class linux_process_target) <get_regs_info>: Define.
1647
1648 Update the callers below.
1649
1650 * linux-low.cc (linux_process_target::fetch_registers)
1651 (linux_process_target::store_registers)
1652 * proc-service.cc (gregset_info)
1653
1654 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1655 (x86_linux_regs_info): Turn into ...
1656 (x86_target::get_regs_info): ...this.
1657 (the_low_target): Remove the op field.
1658 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1659 Declare.
1660 (aarch64_regs_info): Turn into ...
1661 (aarch64_target::get_regs_info): ...this.
1662 (the_low_target): Remove the op field.
1663 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1664 (arm_regs_info): Turn into ...
1665 (arm_target::get_regs_info): ...this.
1666 (the_low_target): Remove the op field.
1667 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1668 (bfin_regs_info): Turn into ...
1669 (bfin_target::get_regs_info): ...this.
1670 (the_low_target): Remove the op field.
1671 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1672 (cris_regs_info): Turn into ...
1673 (cris_target::get_regs_info): ...this.
1674 (the_low_target): Remove the op field.
1675 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1676 Declare.
1677 (crisv32_regs_info): Turn into ...
1678 (crisv32_target::get_regs_info): ...this.
1679 (the_low_target): Remove the op field.
1680 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1681 (ia64_regs_info): Turn into ...
1682 (ia64_target::get_regs_info): ...this.
1683 (the_low_target): Remove the op field.
1684 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1685 (m32r_regs_info): Turn into ...
1686 (m32r_target::get_regs_info): ...this.
1687 (the_low_target): Remove the op field.
1688 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1689 (m68k_regs_info): Turn into ...
1690 (m68k_target::get_regs_info): ...this.
1691 (the_low_target): Remove the op field.
1692 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1693 (mips_regs_info): Turn into ...
1694 (mips_target::get_regs_info): ...this.
1695 (the_low_target): Remove the op field.
1696 (get_usrregs_info): Update the call to the op.
1697 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1698 (nios2_regs_info): Turn into ...
1699 (nios2_target::get_regs_info): ...this.
1700 (the_low_target): Remove the op field.
1701 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1702 (ppc_regs_info): Turn into ...
1703 (ppc_target::get_regs_info): ...this.
1704 (the_low_target): Remove the op field.
1705 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1706 (riscv_regs_info): Turn into ...
1707 (riscv_target::get_regs_info): ...this.
1708 (the_low_target): Remove the op field.
1709 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1710 (s390_regs_info): Turn into ...
1711 (s390_target::get_regs_info): ...this.
1712 (the_low_target): Remove the op field.
1713 (s390_collect_ptrace_register)
1714 (s390_supply_ptrace_register)
1715 (s390_fill_gregset): Update the call to the op.
1716 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1717 (sh_regs_info): Turn into ...
1718 (sh_target::get_regs_info): ...this.
1719 (the_low_target): Remove the op field.
1720 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1721 (sparc_regs_info): Turn into ...
1722 (sparc_target::get_regs_info): ...this.
1723 (the_low_target): Remove the op field.
1724 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1725 (tic6x_regs_info): Turn into ...
1726 (tic6x_target::get_regs_info): ...this.
1727 (the_low_target): Remove the op field.
1728 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1729 (tile_regs_info): Turn into ...
1730 (tile_target::get_regs_info): ...this.
1731 (the_low_target): Remove the op field.
1732 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1733 Declare.
1734 (xtensa_regs_info): Turn into ...
1735 (xtensa_target::get_regs_info): ...this.
1736 (the_low_target): Remove the op field.
1737
17382020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1739
1740 Turn the 'arch_setup' linux target op into a method of
1741 linux_process_target.
1742
1743 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1744 (class linux_process_target) <arch_setup_thread>
1745 <low_arch_setup>: New declarations.
1746 * linux-low.cc (linux_arch_setup): Delete.
1747 (linux_arch_setup_thread): Turn into...
1748 (linux_process_target::arch_setup_thread): ... this.
1749
1750 Update the callers below.
1751
1752 (linux_process_target::handle_extended_wait)
1753 (linux_process_target::post_create_inferior)
1754 (linux_process_target::filter_event)
1755
1756 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1757 declaration.
1758 (x86_linux_update_xmltarget): Turn into...
1759 (x86_target::update_xmltarget): ...this.
1760 (x86_linux_process_qsupported): Update the call to
1761 x86_linux_update_xmltarget.
1762 (x86_arch_setup): Turn into ...
1763 (x86_target::low_arch_setup): ...this.
1764 (the_low_target): Remove the op field.
1765 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1766 declaration.
1767 (aarch64_arch_setup): Turn into ...
1768 (aarch64_target::low_arch_setup): ...this.
1769 (the_low_target): Remove the op field.
1770 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1771 declaration.
1772 (arm_arch_setup): Turn into ...
1773 (arm_target::low_arch_setup): ...this.
1774 (the_low_target): Remove the op field.
1775 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1776 declaration.
1777 (bfin_arch_setup): Turn into ...
1778 (bfin_target::low_arch_setup): ...this.
1779 (the_low_target): Remove the op field.
1780 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1781 declaration.
1782 (cris_arch_setup): Turn into ...
1783 (cris_target::low_arch_setup): ...this.
1784 (the_low_target): Remove the op field.
1785 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1786 declaration.
1787 (crisv32_arch_setup): Turn into ...
1788 (crisv32_target::low_arch_setup): ...this.
1789 (the_low_target): Remove the op field.
1790 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1791 declaration.
1792 (ia64_arch_setup): Turn into ...
1793 (ia64_target::low_arch_setup): ...this.
1794 (the_low_target): Remove the op field.
1795 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1796 declaration.
1797 (m32r_arch_setup): Turn into ...
1798 (m32r_target::low_arch_setup): ...this.
1799 (the_low_target): Remove the op field.
1800 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1801 declaration.
1802 (m68k_arch_setup): Turn into ...
1803 (m68k_target::low_arch_setup): ...this.
1804 (the_low_target): Remove the op field.
1805 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1806 declaration.
1807 (mips_arch_setup): Turn into ...
1808 (mips_target::low_arch_setup): ...this.
1809 (the_low_target): Remove the op field.
1810 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1811 declaration.
1812 (nios2_arch_setup): Turn into ...
1813 (nios2_target::low_arch_setup): ...this.
1814 (the_low_target): Remove the op field.
1815 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1816 declaration.
1817 (ppc_arch_setup): Turn into ...
1818 (ppc_target::low_arch_setup): ...this.
1819 (the_low_target): Remove the op field.
1820 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1821 declaration.
1822 (riscv_arch_setup): Turn into ...
1823 (riscv_target::low_arch_setup): ...this.
1824 (the_low_target): Remove the op field.
1825 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1826 declaration.
1827 (s390_arch_setup): Turn into ...
1828 (s390_target::low_arch_setup): ...this.
1829 (the_low_target): Remove the op field.
1830 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1831 declaration.
1832 (sh_arch_setup): Turn into ...
1833 (sh_target::low_arch_setup): ...this.
1834 (the_low_target): Remove the op field.
1835 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1836 declaration.
1837 (sparc_arch_setup): Turn into ...
1838 (sparc_target::low_arch_setup): ...this.
1839 (the_low_target): Remove the op field.
1840 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1841 declaration.
1842 (tic6x_arch_setup): Turn into ...
1843 (tic6x_target::low_arch_setup): ...this.
1844 (the_low_target): Remove the op field.
1845 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1846 declaration.
1847 (tile_arch_setup): Turn into ...
1848 (tile_target::low_arch_setup): ...this.
1849 (the_low_target): Remove the op field.
1850 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1851 declaration.
1852 (xtensa_arch_setup): Turn into ...
1853 (xtensa_target::low_arch_setup): ...this.
1854 (the_low_target): Remove the op field.
1855
18562020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1857
1858 * linux-low.h (the_linux_target): New extern declaration.
1859 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1860 'the_target'.
1861 (the_linux_target): Remove.
1862 * linux-x86-low.cc (class x86_target): New class.
1863 (the_x86_target): New static object.
1864 (the_linux_target): Define as pointer to the_x86_target.
1865 * linux-aarch64-low.cc (class aarch64_target): New class.
1866 (the_aarch64_target): New static object.
1867 (the_linux_target): Define as pointer to the_aarch64_target.
1868 * linux-arm-low.cc (class arm_target): New class.
1869 (the_arm_target): New static object.
1870 (the_linux_target): Define as pointer to the_arm_target.
1871 * linux-bfin-low.cc (class bfin_target): New class.
1872 (the_bfin_target): New static object.
1873 (the_linux_target): Define as pointer to the_bfin_target.
1874 * linux-cris-low.cc (class cris_target): New class.
1875 (the_cris_target): New static object.
1876 (the_linux_target): Define as pointer to the_cris_target.
1877 * linux-crisv32-low.cc (class crisv32_target): New class.
1878 (the_crisv32_target): New static object.
1879 (the_linux_target): Define as pointer to the_crisv32_target.
1880 * linux-ia64-low.cc (class ia64_target): New class.
1881 (the_ia64_target): New static object.
1882 (the_linux_target): Define as pointer to the_ia64_target.
1883 * linux-m32r-low.cc (class m32r_target): New class.
1884 (the_m32r_target): New static object.
1885 (the_linux_target): Define as pointer to the_m32r_target.
1886 * linux-m68k-low.cc (class m68k_target): New class.
1887 (the_m68k_target): New static object.
1888 (the_linux_target): Define as pointer to the_m68k_target.
1889 * linux-mips-low.cc (class mips_target): New class.
1890 (the_mips_target): New static object.
1891 (the_linux_target): Define as pointer to the_mips_target.
1892 * linux-nios2-low.cc (class nios2_target): New class.
1893 (the_nios2_target): New static object.
1894 (the_linux_target): Define as pointer to the_nios2_target.
1895 * linux-ppc-low.cc (class ppc_target): New class.
1896 (the_ppc_target): New static object.
1897 (the_linux_target): Define as pointer to the_ppc_target.
1898 * linux-riscv-low.cc (class riscv_target): New class.
1899 (the_riscv_target): New static object.
1900 (the_linux_target): Define as pointer to the_riscv_target.
1901 * linux-s390-low.cc (class s390_target): New class.
1902 (the_s390_target): New static object.
1903 (the_linux_target): Define as pointer to the_s390_target.
1904 * linux-sh-low.cc (class sh_target): New class.
1905 (the_sh_target): New static object.
1906 (the_linux_target): Define as pointer to the_sh_target.
1907 * linux-sparc-low.cc (class sparc_target): New class.
1908 (the_sparc_target): New static object.
1909 (the_linux_target): Define as pointer to the_sparc_target.
1910 * linux-tic6x-low.cc (class tic6x_target): New class.
1911 (the_tic6x_target): New static object.
1912 (the_linux_target): Define as pointer to the_tic6x_target.
1913 * linux-tile-low.cc (class tile_target): New class.
1914 (the_tile_target): New static object.
1915 (the_linux_target): Define as pointer to the_tile_target.
1916 * linux-xtensa-low.cc (class xtensa_target): New class.
1917 (the_xtensa_target): New static object.
1918 (the_linux_target): Define as pointer to the_xtensa_target.
1919
19202020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1921
1922 Turn some static functions in linux-low.cc into private methods of
1923 linux_process_target.
1924
1925 * linux-low.cc (handle_extended_wait): Turn into ...
1926 (linux_process_target::handle_extended_wait): ...this. Call
1927 'mourn' on 'this' object instead of 'the_target'.
1928 (maybe_move_out_of_jump_pad): Turn into...
1929 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1930 (linux_low_filter_event): Turn into...
1931 (linux_process_target::filter_event): ...this.
1932 (linux_wait_for_event_filtered): Turn into...
1933 (linux_process_target::wait_for_event_filtered): ...this.
1934 (linux_wait_for_event): Turn into...
1935 (linux_process_target::wait_for_event): ...this.
1936 (linux_wait_1): Turn into...
1937 (linux_process_target::wait_1): ...this.
1938 (wait_for_sigstop): Turn into...
1939 (linux_process_target::wait_for_sigstop): ...this.
1940 (move_out_of_jump_pad_callback): Turn into...
1941 (linux_process_target::move_out_of_jump_pad): ...this.
1942 (stop_all_lwps): Turn into...
1943 (linux_process_target::stop_all_lwps): ...this.
1944 (start_step_over): Turn into...
1945 (linux_process_target::start_step_over): ...this.
1946 (complete_ongoing_step_over): Turn into...
1947 (linux_process_target::complete_ongoing_step_over): ...this.
1948 (proceed_all_lwps): Turn into...
1949 (linux_process_target::proceed_all_lwps): ...this.
1950 (unstop_all_lwps): Turn into...
1951 (linux_process_target::unstop_all_lwps): ...this.
1952
1953 * linux-low.h (class linux_process_target)
1954 <handle_extended_wait>
1955 <maybe_move_out_of_jump_pad>
1956 filter_event>
1957 <wait_for_event_filtered>
1958 <wait_for_event>
1959 <wait_1>
1960 <wait_for_sigstop>
1961 <move_out_of_jump_pad>
1962 <stop_all_lwps>
1963 <start_step_over>
1964 <complete_ongoing_step_over>
1965 <proceed_all_lwps>
1966 <unstop_all_lwps>: Declare.
1967
1968 Update the callers below.
1969
1970 * linux-low.cc (linux_process_target::attach): Update.
1971 (linux_process_target::stabilize_threads): Ditto.
1972 (linux_process_target::wait): Ditto.
1973
19742020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1975
1976 * linux-low.h (struct linux_target_ops): Update the comment for
1977 'cannot_store_register' to return 0 or 1.
1978 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1979 of 2.
1980
19812020-03-20 Simon Marchi <simon.marchi@efficios.com>
1982
1983 * config.in: Re-generate.
1984 * configure: Re-generate.
1985
19862020-03-17 Kamil Rytarowski <n54@gmx.com>
1987
1988 * regcache.cc (find_register_by_number): Update.
1989 * tdesc.cc (init_target_desc): Likewise.
1990 * tdesc.h (target_desc::reg_defs): Likewise.
1991
19922020-03-12 Tom Tromey <tom@tromey.com>
1993
1994 * configure: Rebuild.
1995 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1996 (WIN32APILIBS): New subst.
1997 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1998 gdbsupport files.
1999 (gdbsupport/%.o): Remove target.
2000 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2001 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2002 (WIN32APILIBS): New variable.
2003 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2004 (gdbreplay$(EXEEXT)): Likewise.
2005
20062020-03-12 Tom Tromey <tom@tromey.com>
2007
2008 * config.in, configure: Rebuild.
2009 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2010 * acinclude.m4: Include gettext-sister.m4.
2011 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2012 variables.
2013 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2014 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2015
20162020-03-12 Simon Marchi <simon.marchi@efficios.com>
2017
2018 * acinclude.m4: Update path to selftest.m4.
2019
20202020-03-12 Simon Marchi <simon.marchi@efficios.com>
2021
2022 * configure.ac: Don't source bfd/development.sh, move
2023 GDB_AC_COMMON higher.
2024 * configure: Re-generate.
2025
20262020-03-12 Simon Marchi <simon.marchi@efficios.com>
2027
2028 * configure: Re-generate.
2029
20302020-03-11 Simon Marchi <simon.marchi@efficios.com>
2031
2032 * configure: Re-generate.
2033
20342020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2035
2036 * .dir-locals.el: New file.
2037
20382020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2039
2040 * .gitattributes: New file.
2041
20422020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2043
2044 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2045 reply into an S reply.
2046 * server.cc (disable_packet_T): New global.
2047 (captured_main): Set new global when appropriate.
2048 * server.h (disable_packet_T): Declare.
2049
20502020-02-21 Tom Tromey <tom@tromey.com>
2051
2052 * Makefile.in (mostlyclean): New target.
2053
20542020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2055
2056 * target.h (struct process_stratum_target): Remove.
2057 (class process_target): Rename to ...
2058 (class process_stratum_target): ... this.
2059 * linux-low.h (class linux_process_target): Derive from
2060 'process_stratum_target'.
2061 * linux-low.cc (linux_target_ops): Remove.
2062 (initialize_low): Set the_target to the singleton instance of
2063 linux_process_target.
2064 * lynx-low.h (class lynx_process_target): Derive from
2065 'process_stratum_target'.
2066 * lynx-low.cc (lynx_target_ops): Remove.
2067 (initialize_low): Set the_target to the singleton instance of
2068 lynx_process_target.
2069 * nto-low.h (class nto_process_target): Derive from
2070 'process_stratum_target'.
2071 * nto-low.cc (nto_target_ops): Remove.
2072 (initialize_low): Set the_target to the singleton instance of
2073 nto_process_target.
2074 * win32-low.h (class win32_process_target): Derive from
2075 'process_stratum_target'.
2076 * win32-low.cc (win32_target_ops): Remove.
2077 (initialize_low): Set the_target to the singleton instance of
2078 win32_process_target.
2079
2080 Replace 'the_target->pt' with 'the_target' in the uses below.
2081
2082 * hostio.cc (hostio_error)
2083 (handle_setfs)
2084 (handle_open)
2085 (handle_unlink)
2086 (handle_readlink)
2087 * linux-aarch32-low.cc (arm_breakpoint_at)
2088 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2089 * linux-arm-low.cc (arm_sigreturn_next_pc)
2090 (arm_get_hwcap)
2091 (arm_get_syscall_trapinfo)
2092 * linux-cris-low.cc (cris_breakpoint_at)
2093 * linux-crisv32-low.cc (cris_breakpoint_at)
2094 * linux-low.cc (handle_extended_wait)
2095 (linux_wait_1)
2096 (linux_read_memory)
2097 (linux_process_target::breakpoint_kind_from_pc)
2098 (linux_get_auxv)
2099 * linux-m32r-low.cc (m32r_breakpoint_at)
2100 * linux-mips-low.cc (mips_breakpoint_at)
2101 * linux-nios2-low.cc (nios2_breakpoint_at)
2102 * linux-ppc-low.cc (ppc_breakpoint_at)
2103 * linux-s390-low.cc (s390_get_hwcap)
2104 * linux-sh-low.cc (sh_breakpoint_at)
2105 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2106 (sparc_store_gregset_from_stack)
2107 (sparc_breakpoint_at)
2108 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2109 * linux-tile-low.cc (tile_breakpoint_at)
2110 * linux-x86-low.cc (x86_breakpoint_at)
2111 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2112 * mem-break.cc (bp_size)
2113 (bp_opcode)
2114 (insert_memory_breakpoint)
2115 (set_raw_breakpoint_at)
2116 (delete_raw_breakpoint)
2117 (z_type_supported)
2118 (uninsert_raw_breakpoint)
2119 (reinsert_raw_breakpoint)
2120 (validate_inserted_breakpoint)
2121 * regcache.cc (regcache_read_pc)
2122 (regcache_write_pc)
2123 * remote-utils.cc (putpkt_binary_1)
2124 (input_interrupt)
2125 (getpkt)
2126 (prepare_resume_reply)
2127 * server.cc (handle_general_set)
2128 (handle_detach)
2129 (handle_qxfer_auxv)
2130 (handle_qxfer_exec_file)
2131 (handle_qxfer_libraries_svr4)
2132 (handle_qxfer_osdata)
2133 (handle_qxfer_siginfo)
2134 (handle_qxfer_fdpic)
2135 (handle_query)
2136 (resume)
2137 (handle_v_requests)
2138 (queue_stop_reply_callback)
2139 (captured_main)
2140 * target.cc (prepare_to_access_memory)
2141 (done_accessing_memory)
2142 (read_inferior_memory)
2143 (target_write_memory)
2144 (target_stop_and_wait)
2145 (target_wait)
2146 (target_mourn_inferior)
2147 (target_continue_no_signal)
2148 (target_continue)
2149 (target_supports_multi_process)
2150 (kill_inferior)
2151 * target.h
2152 (target_create_inferior)
2153 (target_post_create_inferior)
2154 (myattach)
2155 (target_supports_fork_events)
2156 (target_supports_vfork_events)
2157 (target_supports_exec_events)
2158 (target_handle_new_gdb_connection)
2159 (detach_inferior)
2160 (mythread_alive)
2161 (fetch_inferior_registers)
2162 (store_inferior_registers)
2163 (join_inferior)
2164 (target_supports_non_stop)
2165 (target_async)
2166 (target_process_qsupported)
2167 (target_supports_catch_syscall)
2168 (target_get_ipa_tdesc_idx)
2169 (target_supports_tracepoints)
2170 (target_supports_fast_tracepoints)
2171 (target_get_min_fast_tracepoint_insn_len)
2172 (target_thread_stopped)
2173 (target_pause_all)
2174 (target_unpause_all)
2175 (target_stabilize_threads)
2176 (target_install_fast_tracepoint_jump_pad)
2177 (target_emit_ops)
2178 (target_supports_disable_randomization)
2179 (target_supports_agent)
2180 (target_enable_btrace)
2181 (target_disable_btrace)
2182 (target_read_btrace)
2183 (target_read_btrace_conf)
2184 (target_supports_range_stepping)
2185 (target_supports_stopped_by_sw_breakpoint)
2186 (target_stopped_by_sw_breakpoint)
2187 (target_supports_stopped_by_hw_breakpoint)
2188 (target_supports_hardware_single_step)
2189 (target_stopped_by_hw_breakpoint)
2190 (target_breakpoint_kind_from_pc)
2191 (target_breakpoint_kind_from_current_state)
2192 (target_supports_software_single_step)
2193 (target_core_of_thread)
2194 (target_thread_name)
2195 (target_thread_handle)
2196 * win32-low.cc (do_initial_child_stuff)
2197
2198 Rename target op default definitions listed below.
2199
2200 * target.cc (process_target::post_create_inferior): Rename as ...
2201 (process_stratum_target::post_create_inferior): ... this.
2202 (process_target::prepare_to_access_memory): Rename as ...
2203 (process_stratum_target::prepare_to_access_memory): ... this.
2204 (process_target::done_accessing_memory): Rename as ...
2205 (process_stratum_target::done_accessing_memory): ... this.
2206 (process_target::look_up_symbols): Rename as ...
2207 (process_stratum_target::look_up_symbols): ... this.
2208 (process_target::supports_read_auxv): Rename as ...
2209 (process_stratum_target::supports_read_auxv): ... this.
2210 (process_target::read_auxv): Rename as ...
2211 (process_stratum_target::read_auxv): ... this.
2212 (process_target::supports_z_point_type): Rename as ...
2213 (process_stratum_target::supports_z_point_type): ... this.
2214 (process_target::insert_point): Rename as ...
2215 (process_stratum_target::insert_point): ... this.
2216 (process_target::remove_point): Rename as ...
2217 (process_stratum_target::remove_point): ... this.
2218 (process_target::stopped_by_sw_breakpoint): Rename as ...
2219 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2220 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2221 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2222 (process_target::stopped_by_hw_breakpoint): Rename as ...
2223 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2224 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2225 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2226 (process_target::supports_hardware_single_step): Rename as ...
2227 (process_stratum_target::supports_hardware_single_step): ... this.
2228 (process_target::stopped_by_watchpoint): Rename as ...
2229 (process_stratum_target::stopped_by_watchpoint): ... this.
2230 (process_target::stopped_data_address): Rename as ...
2231 (process_stratum_target::stopped_data_address): ... this.
2232 (process_target::supports_read_offsets): Rename as ...
2233 (process_stratum_target::supports_read_offsets): ... this.
2234 (process_target::read_offsets): Rename as ...
2235 (process_stratum_target::read_offsets): ... this.
2236 (process_target::supports_get_tls_address): Rename as ...
2237 (process_stratum_target::supports_get_tls_address): ... this.
2238 (process_target::get_tls_address): Rename as ...
2239 (process_stratum_target::get_tls_address): ... this.
2240 (process_target::hostio_last_error): Rename as ...
2241 (process_stratum_target::hostio_last_error): ... this.
2242 (process_target::supports_qxfer_osdata): Rename as ...
2243 (process_stratum_target::supports_qxfer_osdata): ... this.
2244 (process_target::qxfer_osdata): Rename as ...
2245 (process_stratum_target::qxfer_osdata): ... this.
2246 (process_target::supports_qxfer_siginfo): Rename as ...
2247 (process_stratum_target::supports_qxfer_siginfo): ... this.
2248 (process_target::qxfer_siginfo): Rename as ...
2249 (process_stratum_target::qxfer_siginfo): ... this.
2250 (process_target::supports_non_stop): Rename as ...
2251 (process_stratum_target::supports_non_stop): ... this.
2252 (process_target::async): Rename as ...
2253 (process_stratum_target::async): ... this.
2254 (process_target::start_non_stop): Rename as ...
2255 (process_stratum_target::start_non_stop): ... this.
2256 (process_target::supports_multi_process): Rename as ...
2257 (process_stratum_target::supports_multi_process): ... this.
2258 (process_target::supports_fork_events): Rename as ...
2259 (process_stratum_target::supports_fork_events): ... this.
2260 (process_target::supports_vfork_events): Rename as ...
2261 (process_stratum_target::supports_vfork_events): ... this.
2262 (process_target::supports_exec_events): Rename as ...
2263 (process_stratum_target::supports_exec_events): ... this.
2264 (process_target::handle_new_gdb_connection): Rename as ...
2265 (process_stratum_target::handle_new_gdb_connection): ... this.
2266 (process_target::handle_monitor_command): Rename as ...
2267 (process_stratum_target::handle_monitor_command): ... this.
2268 (process_target::core_of_thread): Rename as ...
2269 (process_stratum_target::core_of_thread): ... this.
2270 (process_target::supports_read_loadmap): Rename as ...
2271 (process_stratum_target::supports_read_loadmap): ... this.
2272 (process_target::read_loadmap): Rename as ...
2273 (process_stratum_target::read_loadmap): ... this.
2274 (process_target::process_qsupported): Rename as ...
2275 (process_stratum_target::process_qsupported): ... this.
2276 (process_target::supports_tracepoints): Rename as ...
2277 (process_stratum_target::supports_tracepoints): ... this.
2278 (process_target::read_pc): Rename as ...
2279 (process_stratum_target::read_pc): ... this.
2280 (process_target::write_pc): Rename as ...
2281 (process_stratum_target::write_pc): ... this.
2282 (process_target::supports_thread_stopped): Rename as ...
2283 (process_stratum_target::supports_thread_stopped): ... this.
2284 (process_target::thread_stopped): Rename as ...
2285 (process_stratum_target::thread_stopped): ... this.
2286 (process_target::supports_get_tib_address): Rename as ...
2287 (process_stratum_target::supports_get_tib_address): ... this.
2288 (process_target::get_tib_address): Rename as ...
2289 (process_stratum_target::get_tib_address): ... this.
2290 (process_target::pause_all): Rename as ...
2291 (process_stratum_target::pause_all): ... this.
2292 (process_target::unpause_all): Rename as ...
2293 (process_stratum_target::unpause_all): ... this.
2294 (process_target::stabilize_threads): Rename as ...
2295 (process_stratum_target::stabilize_threads): ... this.
2296 (process_target::supports_fast_tracepoints): Rename as ...
2297 (process_stratum_target::supports_fast_tracepoints): ... this.
2298 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2299 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2300 (process_target::emit_ops): Rename as ...
2301 (process_stratum_target::emit_ops): ... this.
2302 (process_target::supports_disable_randomization): Rename as ...
2303 (process_stratum_target::supports_disable_randomization): ... this.
2304 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2305 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2306 (process_target::qxfer_libraries_svr4): Rename as ...
2307 (process_stratum_target::qxfer_libraries_svr4): ... this.
2308 (process_target::supports_agent): Rename as ...
2309 (process_stratum_target::supports_agent): ... this.
2310 (process_target::enable_btrace): Rename as ...
2311 (process_stratum_target::enable_btrace): ... this.
2312 (process_target::disable_btrace): Rename as ...
2313 (process_stratum_target::disable_btrace): ... this.
2314 (process_target::read_btrace): Rename as ...
2315 (process_stratum_target::read_btrace): ... this.
2316 (process_target::read_btrace_conf): Rename as ...
2317 (process_stratum_target::read_btrace_conf): ... this.
2318 (process_target::supports_range_stepping): Rename as ...
2319 (process_stratum_target::supports_range_stepping): ... this.
2320 (process_target::supports_pid_to_exec_file): Rename as ...
2321 (process_stratum_target::supports_pid_to_exec_file): ... this.
2322 (process_target::pid_to_exec_file): Rename as ...
2323 (process_stratum_target::pid_to_exec_file): ... this.
2324 (process_target::supports_multifs): Rename as ...
2325 (process_stratum_target::supports_multifs): ... this.
2326 (process_target::multifs_open): Rename as ...
2327 (process_stratum_target::multifs_open): ... this.
2328 (process_target::multifs_unlink): Rename as ...
2329 (process_stratum_target::multifs_unlink): ... this.
2330 (process_target::multifs_readlink): Rename as ...
2331 (process_stratum_target::multifs_readlink): ... this.
2332 (process_target::breakpoint_kind_from_pc): Rename as ...
2333 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2334 (process_target::breakpoint_kind_from_current_state): Rename as ...
2335 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2336 (process_target::thread_name): Rename as ...
2337 (process_stratum_target::thread_name): ... this.
2338 (process_target::thread_handle): Rename as ...
2339 (process_stratum_target::thread_handle): ... this.
2340 (process_target::supports_software_single_step): Rename as ...
2341 (process_stratum_target::supports_software_single_step): ... this.
2342 (process_target::supports_catch_syscall): Rename as ...
2343 (process_stratum_target::supports_catch_syscall): ... this.
2344 (process_target::get_ipa_tdesc_idx): Rename as ...
2345 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2346
23472020-02-20 Pedro Alves <palves@redhat.com>
2348
2349 * target.cc (set_target_ops): Simply copy the given target pointer
2350 instead of creating a copy of the pointed object.
2351
23522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2353
2354 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2355 of process_target.
2356
2357 * target.h (struct process_stratum_target): Remove the target op.
2358 (class process_target): Add the target op.
2359 (target_get_ipa_tdesc_idx): Update the macro.
2360 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2361
2362 Update the derived classes and callers below.
2363
2364 * linux-low.cc (linux_target_ops): Update.
2365 (linux_get_ipa_tdesc_idx): Turn into ...
2366 (linux_process_target::get_ipa_tdesc_idx): ... this.
2367 * linux-low.h (class linux_process_target): Update.
2368 * lynx-low.cc (lynx_target_ops): Update.
2369 * nto-low.cc (nto_target_ops): Update.
2370 * win32-low.cc (win32_target_ops): Update.
2371
23722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2373
2374 Turn process_stratum_target's supports_catch_syscall op into a
2375 method of process_target.
2376
2377 * target.h (struct process_stratum_target): Remove the target op.
2378 (class process_target): Add the target op.
2379 (target_supports_catch_syscall): Update the macro.
2380 * target.cc (process_target::supports_catch_syscall): Define.
2381
2382 Update the derived classes and callers below.
2383
2384 * linux-low.cc (linux_target_ops): Update.
2385 (linux_supports_catch_syscall): Turn into ...
2386 (linux_process_target::supports_catch_syscall): ... this.
2387 * linux-low.h (class linux_process_target): Update.
2388 * lynx-low.cc (lynx_target_ops): Update.
2389 * nto-low.cc (nto_target_ops): Update.
2390 * win32-low.cc (win32_target_ops): Update.
2391
23922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2393
2394 Turn process_stratum_target's supports_software_single_step op
2395 into a method of process_target.
2396
2397 * target.h (struct process_stratum_target): Remove the target op.
2398 (class process_target): Add the target op.
2399 (target_supports_software_single_step): Update the macro.
2400 * target.cc (process_target::supports_software_single_step): Define.
2401
2402 Update the derived classes and callers below.
2403
2404 * linux-low.cc (linux_target_ops): Update.
2405 (linux_supports_software_single_step): Turn into ...
2406 (linux_process_target::supports_software_single_step): ... this.
2407 * linux-low.h (class linux_process_target): Update.
2408 * lynx-low.cc (lynx_target_ops): Update.
2409 * nto-low.cc (nto_target_ops): Update.
2410 * win32-low.cc (win32_target_ops): Update.
2411
24122020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2413
2414 Turn process_stratum_target's thread_name and thread_handle ops
2415 into methods of process_target.
2416
2417 * target.h (struct process_stratum_target): Remove the target ops.
2418 (class process_target): Add the target ops.
2419 (target_thread_name): Update the macro.
2420 (target_thread_handle): Update the macro.
2421 * target.cc (process_target::thread_name): Define.
2422 (process_target::thread_handle): Define.
2423
2424 Update the derived classes and callers below.
2425
2426 * linux-low.cc (linux_target_ops): Update.
2427 (linux_process_target::thread_name): Define.
2428 (linux_process_target::thread_handle): Define.
2429 * linux-low.h (class linux_process_target): Update.
2430 * lynx-low.cc (lynx_target_ops): Update.
2431 * nto-low.cc (nto_target_ops): Update.
2432 * win32-low.cc (win32_target_ops): Update.
2433
24342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2435
2436 Turn process_stratum_target's breakpoint_kind_from_pc,
2437 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2438 ops into methods of process_target.
2439
2440 * target.h (struct process_stratum_target): Remove the target op.
2441 (class process_target): Add the target op.
2442 (target_breakpoint_kind_from_pc): Update the macro.
2443 (target_breakpoint_kind_from_current_state): Update the macro.
2444 (default_breakpoint_kind_from_pc): Remove declaration.
2445 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2446 (process_target::breakpoint_kind_from_pc): ... this.
2447 (process_target::breakpoint_kind_from_current_state): Define.
2448
2449 Update the derived classes and callers below.
2450
2451 * mem-break.cc (bp_size): Update.
2452 (bp_opcode): Update.
2453 * linux-low.cc (linux_target_ops): Update.
2454 (linux_wait_1): Update.
2455 (linux_breakpoint_kind_from_pc): Turn into ...
2456 (linux_process_target::breakpoint_kind_from_pc): ... this.
2457 (linux_sw_breakpoint_from_kind): Turn into ...
2458 (linux_process_target::sw_breakpoint_from_kind): ... this.
2459 (linux_breakpoint_kind_from_current_state): Turn into ...
2460 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2461 * linux-low.h (class linux_process_target): Update.
2462 * lynx-low.cc (lynx_target_ops): Update.
2463 (lynx_process_target::sw_breakpoint_from_kind): Define.
2464 * lynx-low.h (class lynx_process_target): Update.
2465 * nto-low.cc (nto_target_ops): Update.
2466 (nto_sw_breakpoint_from_kind): Turn into ...
2467 (nto_process_target::sw_breakpoint_from_kind): ... this.
2468 * nto-low.h (class nto_process_target): Update.
2469 * win32-low.cc (win32_target_ops): Update.
2470 (win32_sw_breakpoint_from_kind): Turn into ...
2471 (win32_process_target::sw_breakpoint_from_kind): ... this.
2472 * win32-low.h (class win32_process_target): Update.
2473
24742020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2475
2476 Turn process_stratum_target's multifs_open, multifs_readlink,
2477 multifs_unlink ops into methods of process_target.
2478
2479 * target.h (struct process_stratum_target): Remove the target ops.
2480 (class process_target): Add the target ops. Also add
2481 'supports_multifs'.
2482 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2483 "sys/stat.h".
2484 (process_target::supports_multifs): Define.
2485 (process_target::multifs_open): Define.
2486 (process_target::multifs_readlink): Define.
2487 (process_target::multifs_unlink): Define.
2488
2489 Update the derived classes and callers below.
2490
2491 * hostio.cc (handle_setfs): Update.
2492 (handle_open): Update.
2493 (handle_unlink): Update.
2494 (handle_readlink): Update.
2495 * linux-low.cc (linux_target_ops): Update.
2496 (linux_process_target::supports_multifs): Define.
2497 (linux_process_target::multifs_open): Define.
2498 (linux_process_target::multifs_readlink): Define.
2499 (linux_process_target::multifs_unlink): Define.
2500 * linux-low.h (class linux_process_target): Update.
2501 * lynx-low.cc (lynx_target_ops): Update.
2502 * nto-low.cc (nto_target_ops): Update.
2503 * win32-low.cc (win32_target_ops): Update.
2504
25052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2506
2507 Turn process_stratum_target's pid_to_exec_file op into a method
2508 of process_target.
2509
2510 * target.h (struct process_stratum_target): Remove the target op.
2511 (class process_target): Add the target op. Also add
2512 'supports_pid_to_exec_file'.
2513 * target.cc (process_target::pid_to_exec_file): Define.
2514 (process_target::supports_pid_to_exec_file): Define.
2515
2516 Update the derived classes and callers below.
2517
2518 * server.cc (handle_qxfer_exec_file): Update.
2519 (handle_query): Update.
2520 * linux-low.cc (linux_target_ops): Update.
2521 (linux_process_target::supports_pid_to_exec_file): Define.
2522 (linux_process_target::pid_to_exec_file): Define.
2523 * linux-low.h (class linux_process_target): Update.
2524 * lynx-low.cc (lynx_target_ops): Update.
2525 * nto-low.cc (nto_target_ops): Update.
2526 * win32-low.cc (win32_target_ops): Update.
2527
25282020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2529
2530 Turn process_stratum_target's supports_range_stepping op into a
2531 method of process_target.
2532
2533 * target.h (struct process_stratum_target): Remove the target op.
2534 (class process_target): Add the target op.
2535 (target_supports_range_stepping): Update the macro.
2536 * target.cc (process_target::supports_range_stepping): Define.
2537
2538 Update the derived classes and callers below.
2539
2540 * linux-low.cc (linux_target_ops): Update.
2541 (linux_supports_range_stepping): Turn into ...
2542 (linux_process_target::supports_range_stepping): ... this.
2543 * linux-low.h (class linux_process_target): Update.
2544 * lynx-low.cc (lynx_target_ops): Update.
2545 * nto-low.cc (nto_target_ops): Update.
2546 * win32-low.cc (win32_target_ops): Update.
2547
25482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2549
2550 Turn process_stratum_target's btrace-related ops (enable_btrace,
2551 disable_btrace, read_btrace, read_btrace_conf) into methods of
2552 process_target.
2553
2554 * target.h (struct process_stratum_target): Remove the target ops.
2555 (class process_target): Add the target ops.
2556 (target_enable_btrace): Update.
2557 (target_disable_btrace): Update.
2558 (target_read_btrace): Update.
2559 (target_read_btrace_conf): Update.
2560 * target.cc (process_target::enable_btrace): Define.
2561 (process_target::disable_btrace): Define.
2562 (process_target::read_btrace): Define.
2563 (process_target::read_btrace_conf): Define.
2564
2565 Update the derived classes and callers below.
2566
2567 * linux-low.cc (linux_target_ops): Update.
2568 (linux_process_target:enable_btrace): Define as a wrapper around
2569 linux_enable_btrace.
2570 (linux_low_disable_btrace): Turn into ...
2571 (linux_process_target::disable_btrace): ... this.
2572 (linux_low_read_btrace): Turn into ...
2573 (linux_process_target::read_btrace): ... this.
2574 (linux_low_btrace_conf): Turn into ...
2575 (linux_process_target::read_btrace_conf): ... this.
2576 * linux-low.h (class linux_process_target): Update.
2577 * lynx-low.cc (lynx_target_ops): Update.
2578 * nto-low.cc (nto_target_ops): Update.
2579 * win32-low.cc (win32_target_ops): Update.
2580
25812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2582
2583 Turn process_stratum_target's supports_agent op into a method of
2584 process_target.
2585
2586 * target.h (struct process_stratum_target): Remove the target op.
2587 (class process_target): Add the target op.
2588 (target_supports_agent): Update the macro.
2589 * target.cc (process_target::supports_agent): Define.
2590
2591 Update the derived classes and callers below.
2592
2593 * linux-low.cc (linux_target_ops): Update.
2594 (linux_supports_agent): Turn into ...
2595 (linux_process_target::supports_agent): ... this.
2596 * linux-low.h (class linux_process_target): Update.
2597 * lynx-low.cc (lynx_target_ops): Update.
2598 * nto-low.cc (nto_target_ops): Update.
2599 * win32-low.cc (win32_target_ops): Update.
2600
26012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2602
2603 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2604 method of process_target.
2605
2606 * target.h (struct process_stratum_target): Remove the target op.
2607 (class process_target): Add the target op. Also add
2608 'supports_qxfer_libraries_svr4'.
2609 * target.cc (process_target::qxfer_libraries_svr4): Define.
2610 (process_target::supports_qxfer_libraries_svr4): Define.
2611
2612 Update the derived classes and callers below.
2613
2614 * server.cc (handle_qxfer_libraries_svr4): Update.
2615 (handle_query): Update.
2616 * linux-low.cc (linux_target_ops): Update.
2617 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2618 (linux_qxfer_libraries_svr4): Turn into ...
2619 (linux_process_target::qxfer_libraries_svr4): ... this.
2620 * linux-low.h (class linux_process_target): Update.
2621 * lynx-low.cc (lynx_target_ops): Update.
2622 * nto-low.cc (nto_target_ops): Update.
2623 * win32-low.cc (win32_target_ops): Update.
2624
26252020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2626
2627 Turn process_stratum_target's supports_disable_randomization op
2628 into a method of process_target.
2629
2630 * target.h (struct process_stratum_target): Remove the target op.
2631 (class process_target): Add the target op.
2632 (target_supports_disable_randomization): Update the macro.
2633 * target.cc (process_target::supports_disable_randomization): Define.
2634
2635 Update the derived classes and callers below.
2636
2637 * linux-low.cc (linux_target_ops): Update.
2638 (linux_supports_disable_randomization): Turn into ...
2639 (linux_process_target::supports_disable_randomization): ... this.
2640 * linux-low.h (class linux_process_target): Update.
2641 * lynx-low.cc (lynx_target_ops): Update.
2642 * nto-low.cc (nto_target_ops): Update.
2643 * win32-low.cc (win32_target_ops): Update.
2644
26452020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2646
2647 Turn process_stratum_target's emit_ops op into a method of
2648 process_target.
2649
2650 * target.h (struct process_stratum_target): Remove the target op.
2651 (class process_target): Add the target op.
2652 (target_emit_ops): Update the macro.
2653 * target.cc (process_target::emit_ops): Define.
2654
2655 Update the derived classes and callers below.
2656
2657 * linux-low.cc (linux_target_ops): Update.
2658 (linux_emit_ops): Turn into ...
2659 (linux_process_target::emit_ops): ... this.
2660 * linux-low.h (class linux_process_target): Update.
2661 * lynx-low.cc (lynx_target_ops): Update.
2662 * nto-low.cc (nto_target_ops): Update.
2663 * win32-low.cc (win32_target_ops): Update.
2664
26652020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2666
2667 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2668 and get_min_fast_tracepoint_insn_len ops into methods of
2669 process_target.
2670
2671 * target.h (struct process_stratum_target): Remove the target ops.
2672 (class process_target): Add the target ops. Also add
2673 'supports_fast_tracepoints'.
2674 (target_supports_fast_tracepoints): Update the macro.
2675 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2676 (install_fast_tracepoint_jump_pad): Update and rename the macro
2677 to ...
2678 (target_install_fast_tracepoint_jump_pad): ... this.
2679 * target.cc (process_target::supports_fast_tracepoints): Define.
2680 (process_target::install_fast_tracepoint_jump_pad): Define.
2681 (process_target::get_min_fast_tracepoint_insn_len): Define.
2682
2683 Update the derived classes and callers below.
2684
2685 * tracepoint.cc (install_fast_tracepoint): Update.
2686 * linux-low.cc (linux_target_ops): Update.
2687 (linux_process_target::supports_fast_tracepoints): Define.
2688 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2689 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2690 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2691 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2692 * linux-low.h (class linux_process_target): Update.
2693 * lynx-low.cc (lynx_target_ops): Update.
2694 * nto-low.cc (nto_target_ops): Update.
2695 * win32-low.cc (win32_target_ops): Update.
2696
26972020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2698
2699 Turn process_stratum_target's stabilize_threads op into a
2700 method of process_target.
2701
2702 * target.h (struct process_stratum_target): Remove the target op.
2703 (class process_target): Add the target op.
2704 (target_stabilize_threads): Update the macro.
2705 * target.cc (process_target::stabilize_threads): Define.
2706
2707 Update the derived classes and callers below.
2708
2709 * server.cc (handle_status): Update.
2710 * tracepoint.cc (cmd_qtdp): Update.
2711 (cmd_qtstart): Update.
2712 * linux-low.cc (linux_target_ops): Update.
2713 (linux_stabilize_threads): Turn into ...
2714 (linux_process_target::stabilize_threads): ... this.
2715 (linux_wait_1): Update.
2716 * linux-low.h (class linux_process_target): Update.
2717 * lynx-low.cc (lynx_target_ops): Update.
2718 * nto-low.cc (nto_target_ops): Update.
2719 * win32-low.cc (win32_target_ops): Update.
2720
27212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2722
2723 Turn process_stratum_target's pause_all and unpause_all ops
2724 into methods of process_target.
2725
2726 * target.h (struct process_stratum_target): Remove the target ops.
2727 (class process_target): Add the target ops.
2728 (pause_all): Update the macro and rename to...
2729 (target_pause_all): ... this.
2730 (unpause_all): Update the macro and rename to...
2731 (target_unpause_all): ... this.
2732 * target.cc (process_target::pause_all): Define.
2733 (process_target::unpause_all): Define.
2734
2735 Update the derived classes and callers below.
2736
2737 * server.cc (handle_status): Update.
2738 * tracepoint.cc (clear_installed_tracepoints): Update.
2739 (cmd_qtdp): Update.
2740 (cmd_qtstart): Update.
2741 (stop_tracing): Update.
2742 (cmd_qtstatus): Update.
2743 (upload_fast_traceframes): Update.
2744 (run_inferior_command): Update.
2745 * linux-low.cc (linux_target_ops): Update.
2746 (linux_pause_all): Turn into ...
2747 (linux_process_target::pause_all): ... this.
2748 (linux_unpause_all): Turn into ...
2749 (linux_process_target::unpause_all): ... this.
2750 (linux_process_target::prepare_to_access_memory): Update.
2751 (linux_process_target::done_accessing_memory): Update.
2752 * linux-low.h (class linux_process_target): Update.
2753 * lynx-low.cc (lynx_target_ops): Update.
2754 * nto-low.cc (nto_target_ops): Update.
2755 * win32-low.cc (win32_target_ops): Update.
2756
27572020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2758
2759 Turn process_stratum_target's get_tib_address op into a method of
2760 process_target.
2761
2762 * target.h (struct process_stratum_target): Remove the target op.
2763 (class process_target): Add the target op. Also add
2764 'supports_get_tib_address'.
2765 * target.cc (process_target::get_tib_address): Define.
2766 (process_target::supports_get_tib_address): Define.
2767
2768 Update the derived classes and callers below.
2769
2770 * server.cc (handle_query): Update.
2771 * linux-low.cc (win32_target_ops): Update.
2772 * lynx-low.cc (lynx_target_ops): Update.
2773 * nto-low.cc (nto_target_ops): Update.
2774 * win32-low.cc (win32_target_ops): Update.
2775 (win32_process_target::supports_get_tib_address): Define.
2776 (win32_get_tib_address): Turn into ...
2777 (win32_process_target::get_tib_address): ... this.
2778 * win32-low.h (class win32_process_target): Update.
2779
27802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2781
2782 Turn process_stratum_target's thread_stopped op into a method of
2783 process_target.
2784
2785 * target.h (struct process_stratum_target): Remove the target op.
2786 (class process_target): Add the target op. Also add
2787 'supports_thread_stopped'.
2788 (target_thread_stopped): Update the macro.
2789 * target.cc (process_target::thread_stopped): Define.
2790 (process_target::supports_thread_stopped): Define.
2791 (prepare_to_access_memory): Update.
2792
2793 Update the derived classes and callers below.
2794
2795 * server.cc (queue_stop_reply_callback): Update.
2796 * linux-low.cc (linux_target_ops): Update.
2797 (linux_process_target::supports_thread_stopped): Define.
2798 (linux_thread_stopped): Turn into ...
2799 (linux_process_target::thread_stopped): ... this.
2800 * linux-low.h (class linux_process_target): Update.
2801 * lynx-low.cc (lynx_target_ops): Update.
2802 * nto-low.cc (nto_target_ops): Update.
2803 * win32-low.cc (win32_target_ops): Update.
2804
28052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2806
2807 Turn process_stratum_target's read_pc and write_pc ops into
2808 methods of process_target.
2809
2810 * target.h (struct process_stratum_target): Remove the target ops.
2811 (class process_target): Add the target ops.
2812 * target.cc (process_target::read_pc): Define.
2813 (process_target::write_pc): Define.
2814
2815 Update the derived classes and callers below.
2816
2817 * regcache.cc (regcache_read_pc): Update.
2818 (regcache_write_pc): Update.
2819 * linux-low.cc (linux_target_ops): Update.
2820 (linux_read_pc): Turn into ...
2821 (linux_process_target::read_pc): ... this.
2822 (linux_write_pc): Turn into ...
2823 (linux_process_target::write_pc): ... this.
2824 * linux-low.h (class linux_process_target): Update.
2825 * lynx-low.cc (lynx_target_ops): Update.
2826 * nto-low.cc (nto_target_ops): Update.
2827 * win32-low.cc (win32_target_ops): Update.
2828
28292020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2830
2831 Turn process_stratum_target's supports_tracepoints op into a
2832 method of process_target.
2833
2834 * target.h (struct process_stratum_target): Remove the target op.
2835 (class process_target): Add the target op.
2836 (target_supports_tracepoints): Update the macro.
2837 * target.cc (process_target::supports_tracepoints): Define.
2838
2839 Update the derived classes and callers below.
2840
2841 * linux-low.cc (linux_target_ops): Update.
2842 (linux_supports_tracepoints): Turn into ...
2843 (linux_process_target::supports_tracepoints): ... this.
2844 * linux-low.h (class linux_process_target): Update.
2845 * lynx-low.cc (lynx_target_ops): Update.
2846 * nto-low.cc (nto_target_ops): Update.
2847 * win32-low.cc (win32_target_ops): Update.
2848
28492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2850
2851 Turn process_stratum_target's process_qsupported op into a method
2852 of process_target.
2853
2854 * target.h (struct process_stratum_target): Remove the target op.
2855 (class process_target): Add the target op.
2856 (target_process_qsupported): Update the macro.
2857 * target.cc (process_target::process_qsupported): Define.
2858
2859 Update the derived classes and callers below.
2860
2861 * linux-low.cc (linux_target_ops): Update.
2862 (linux_process_qsupported): Turn into ...
2863 (linux_process_target::process_qsupported): ... this.
2864 * linux-low.h (class linux_process_target): Update.
2865 * lynx-low.cc (lynx_target_ops): Update.
2866 * nto-low.cc (nto_target_ops): Update.
2867 * win32-low.cc (win32_target_ops): Update.
2868
28692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2870
2871 Turn process_stratum_target's read_loadmap op into a method of
2872 process_target.
2873
2874 * target.h (struct process_stratum_target): Remove the target op.
2875 (class process_target): Add the target op. Also add
2876 'supports_read_loadmap'.
2877 * target.cc (process_target::read_loadmap): Define.
2878 (process_target::supports_read_loadmap): Define.
2879
2880 Update the derived classes and callers below.
2881
2882 * server.cc (handle_qxfer_fdpic): Update.
2883 (handle_query): Update.
2884 * linux-low.cc (linux_target_ops): Update.
2885 (linux_process_target::supports_read_loadmap): Define.
2886 (linux_read_loadmap): Turn into ...
2887 (linux_process_target::read_loadmap): ... this.
2888 * linux-low.h (class linux_process_target): Update.
2889 * lynx-low.cc (lynx_target_ops): Update.
2890 * nto-low.cc (nto_target_ops): Update.
2891 * win32-low.cc (win32_target_ops): Update.
2892
28932020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2894
2895 Turn process_stratum_target's core_of_thread op into a method of
2896 process_target.
2897
2898 * target.h (struct process_stratum_target): Remove the target op.
2899 (class process_target): Add the target op.
2900 (target_core_of_thread): Update the macro.
2901 * target.cc (process_target::core_of_thread): Define.
2902
2903 Update the derived classes and callers below.
2904
2905 * linux-low.cc (linux_target_ops): Update.
2906 (linux_process_target::core_of_thread): Define.
2907 * linux-low.h (class linux_process_target): Update.
2908 * lynx-low.cc (lynx_target_ops): Update.
2909 * nto-low.cc (nto_target_ops): Update.
2910 * win32-low.cc (win32_target_ops): Update.
2911
29122020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2913
2914 Turn process_stratum_target's handle_monitor_command op into a
2915 method of process_target.
2916
2917 * target.h (struct process_stratum_target): Remove the target op.
2918 (class process_target): Add the target op.
2919 (target_handle_monitor_command): Update the macro.
2920 * target.cc (process_target::handle_monitor_command): Define.
2921
2922 Update the derived classes and callers below.
2923
2924 * server.cc (handle_query): Update.
2925 * linux-low.cc (linux_target_ops): Update.
2926 (linux_process_target::handle_monitor_command): Define.
2927 * linux-low.h (class linux_process_target): Update.
2928 * lynx-low.cc (lynx_target_ops): Update.
2929 * nto-low.cc (nto_target_ops): Update.
2930 * win32-low.cc (win32_target_ops): Update.
2931
29322020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2933
2934 Turn process_stratum_target's handle_new_gdb_connection op into a
2935 method of process_target.
2936
2937 * target.h (struct process_stratum_target): Remove the target op.
2938 (class process_target): Add the target op.
2939 (target_handle_new_gdb_connection): Update the macro.
2940 * target.cc (process_target::handle_new_gdb_connection): Define.
2941
2942 Update the derived classes and callers below.
2943
2944 * linux-low.cc (linux_target_ops): Update.
2945 (linux_handle_new_gdb_connection): Turn into ...
2946 (linux_process_target::handle_new_gdb_connection): ... this.
2947 * linux-low.h (class linux_process_target): Update.
2948 * lynx-low.cc (lynx_target_ops): Update.
2949 * nto-low.cc (nto_target_ops): Update.
2950 * win32-low.cc (win32_target_ops): Update.
2951
29522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2953
2954 Turn process_stratum_target's supports_fork_events,
2955 supports_vfork_events, and supports_exec_events ops into methods
2956 of process_target.
2957
2958 * target.h (struct process_stratum_target): Remove the target ops.
2959 (class process_target): Add the target ops.
2960 (target_supports_fork_events): Update the macro.
2961 (target_supports_vfork_events): Update the macro.
2962 (target_supports_exec_events): Update the macro.
2963 * target.cc (process_target::supports_fork_events): Define.
2964 (process_target::supports_vfork_events): Define.
2965 (process_target::supports_exec_events): Define.
2966
2967 Update the derived classes and callers below.
2968
2969 * linux-low.cc (linux_target_ops): Update.
2970 (linux_supports_fork_events): Turn into ...
2971 (linux_process_target::supports_fork_events): ... this.
2972 (linux_supports_vfork_events): Turn into ...
2973 (linux_process_target::supports_vfork_events): ... this.
2974 (linux_supports_exec_events): Turn into ...
2975 (linux_process_target::supports_exec_events): ... this.
2976 * linux-low.h (class linux_process_target): Update.
2977 * lynx-low.cc (lynx_target_ops): Update.
2978 * nto-low.cc (nto_target_ops): Update.
2979 * win32-low.cc (win32_target_ops): Update.
2980
29812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2982
2983 Turn process_stratum_target's supports_multi_process op into a
2984 method of process_target.
2985
2986 * target.h (struct process_stratum_target): Remove the target op.
2987 (class process_target): Add the target op.
2988 * target.cc (process_target::supports_multi_process): Define.
2989 (target_supports_multi_process): Update.
2990
2991 Update the derived classes and callers below.
2992
2993 * linux-low.cc (linux_target_ops): Update.
2994 (linux_supports_multi_process): Turn into ...
2995 (linux_process_target::supports_multi_process): ... this.
2996 * linux-low.h (class linux_process_target): Update.
2997 * lynx-low.cc (lynx_target_ops): Update.
2998 * nto-low.cc (nto_target_ops): Update.
2999 * win32-low.cc (win32_target_ops): Update.
3000
30012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3002
3003 Turn process_stratum_target's supports_non_stop, async, and
3004 start_non_stop ops into methods of process_target.
3005
3006 * target.h (struct process_stratum_target): Remove the target ops.
3007 (class process_target): Add the target ops.
3008 (target_supports_non_stop): Update the macro.
3009 (target_async): Update the macro.
3010 (start_non_stop): Remove declaration.
3011 * target.cc (process_target::supports_non_stop): Define.
3012 (process_target::async): Define.
3013 (process_target::start_non_stop): Define.
3014 (start_non_stop): Remove.
3015
3016 Update the derived classes and callers below.
3017
3018 * server.cc (handle_qxfer_siginfo): Update.
3019 (handle_query): Update.
3020 * linux-low.cc (linux_target_ops): Update.
3021 (linux_supports_non_stop): Turn into ...
3022 (linux_process_target::supports_non_stop): ... this.
3023 (linux_async): Turn into ...
3024 (linux_process_target::async): ... this.
3025 (linux_start_non_stop): Turn into ...
3026 (linux_process_target::start_non_stop): ... this.
3027 * linux-low.h (class linux_process_target): Update.
3028 * lynx-low.cc (lynx_target_ops): Update.
3029 * nto-low.cc (nto_target_ops): Update.
3030 (nto_supports_non_stop): Remove; rely on the default behavior
3031 instead.
3032 * win32-low.cc (win32_target_ops): Update.
3033
30342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3035
3036 Turn process_stratum_target's qxfer_siginfo op into a method of
3037 process_target.
3038
3039 * target.h (struct process_stratum_target): Remove the target op.
3040 (class process_target): Add the target op. Also add
3041 'supports_qxfer_siginfo'.
3042 * target.cc (process_target::qxfer_siginfo): Define.
3043 (process_target::supports_qxfer_siginfo): Define.
3044
3045 Update the derived classes and callers below.
3046
3047 * server.cc (handle_qxfer_siginfo): Update.
3048 (handle_query): Update.
3049 * linux-low.cc (linux_target_ops): Update.
3050 (linux_process_target::supports_qxfer_siginfo): Define.
3051 (linux_xfer_siginfo): Turn into ...
3052 (linux_process_target::qxfer_siginfo): ... this.
3053 * linux-low.h (class linux_process_target): Update.
3054 * lynx-low.cc (lynx_target_ops): Update.
3055 * nto-low.cc (nto_target_ops): Update.
3056 * win32-low.cc (win32_target_ops): Update.
3057
30582020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3059
3060 Turn process_stratum_target's qxfer_osdata op into a method of
3061 process_target.
3062
3063 * target.h (struct process_stratum_target): Remove the target op.
3064 (class process_target): Add the target op. Also add
3065 'supports_qxfer_osdata'.
3066 * target.cc (process_target::qxfer_osdata): Define.
3067 (process_target::supports_qxfer_osdata): Define.
3068
3069 Update the derived classes and callers below.
3070
3071 * server.cc (handle_qxfer_osdata): Update.
3072 (handle_query): Update.
3073 * linux-low.cc (linux_target_ops): Update.
3074 (linux_process_target::supports_qxfer_osdata): Define.
3075 (linux_qxfer_osdata): Turn into ...
3076 (linux_process_target::qxfer_osdata): ... this.
3077 * linux-low.h (class linux_process_target): Update.
3078 * lynx-low.cc (lynx_target_ops): Update.
3079 * nto-low.cc (nto_target_ops): Update.
3080 * win32-low.cc (win32_target_ops): Update.
3081
30822020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3083
3084 Turn process_stratum_target's hostio_last_error op into a
3085 method of process_target.
3086
3087 * target.h (struct process_stratum_target): Remove the target op.
3088 (class process_target): Add the target op.
3089 * target.cc: Add "hostio.h" to includes.
3090 (process_target::hostio_last_error): Define.
3091
3092 Update the derived classes and callers below.
3093
3094 * hostio.cc (hostio_error): Update.
3095 * linux-low.cc: Remove "hostio.h" from includes.
3096 (linux_target_ops): Update.
3097 * lynx-low.cc (lynx_target_ops): Update.
3098 * nto-low.cc (nto_target_ops): Update.
3099 * win32-low.h (class win32_process_target): Update.
3100 * win32-low.cc (win32_target_ops): Update.
3101 (wince_hostio_last_error): Turn into ...
3102 (win32_process_target::hostio_last_error): ... this.
3103
31042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3105
3106 Turn process_stratum_target's get_tls_address op into a method of
3107 process_target.
3108
3109 * target.h (struct process_stratum_target): Remove the target op.
3110 (class process_target): Add the target op. Also add
3111 'supports_get_tls_address'.
3112 * target.cc (process_target::get_tls_address): Define.
3113 (process_target::supports_get_tls_address): Define.
3114
3115 Update the derived classes and callers below.
3116
3117 * server.cc (handle_query): Update.
3118 * linux-low.cc (linux_target_ops): Update.
3119 (linux_process_target::supports_get_tls_address): Define.
3120 (linux_process_target::get_tls_address): Define.
3121 * linux-low.h (class linux_process_target): Update.
3122 * lynx-low.cc (lynx_target_ops): Update.
3123 * nto-low.cc (nto_target_ops): Update.
3124 * win32-low.cc (win32_target_ops): Update.
3125
31262020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3127
3128 Turn process_stratum_target's read_offsets op into a method of
3129 process_target.
3130
3131 * target.h (struct process_stratum_target): Remove the target op.
3132 (class process_target): Add the target op. Also add
3133 'supports_read_offsets'.
3134 * target.cc (process_target::read_offsets): Define.
3135 (process_target::supports_read_offsets): Define.
3136
3137 Update the derived classes and callers below.
3138
3139 * server.cc (handle_query): Update.
3140 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3141 (linux_target_ops): Update.
3142 (linux_process_target::supports_read_offsets): Define.
3143 (linux_read_offsets): Turn into ...
3144 (linux_process_target::read_offsets): ... this.
3145 * linux-low.h (class linux_process_target): Update.
3146 * lynx-low.cc (lynx_target_ops): Update.
3147 * nto-low.cc (nto_target_ops): Update.
3148 * win32-low.cc (win32_target_ops): Update.
3149
31502020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3151
3152 Turn process_stratum_target's stopped_by_watchpoint and
3153 stopped_data_address ops into methods of process_target.
3154
3155 * target.h (struct process_stratum_target): Remove the target ops.
3156 (class process_target): Add the target ops.
3157 * target.cc (process_target::stopped_by_watchpoint): Define.
3158 (process_target::stopped_data_address): Define.
3159
3160 Update the derived classes and callers below.
3161
3162 * remote-utils.cc (prepare_resume_reply): Update.
3163 * linux-low.cc (linux_target_ops): Update.
3164 (linux_stopped_by_watchpoint): Turn into ...
3165 (linux_process_target::stopped_by_watchpoint): ... this.
3166 (linux_stopped_data_address): Turn into ...
3167 (linux_process_target::stopped_data_address): ... this.
3168 * linux-low.h (class linux_process_target): Update.
3169 * lynx-low.cc (lynx_target_ops): Update.
3170 * nto-low.cc (nto_target_ops): Update.
3171 (nto_stopped_by_watchpoint): Turn into ...
3172 (nto_process_target::stopped_by_watchpoint): ... this.
3173 (nto_stopped_data_address): Turn into ...
3174 (nto_process_target::stopped_data_address): ... this.
3175 * nto-low.h (class nto_process_target): Update.
3176 * win32-low.cc (win32_target_ops): Update.
3177 (win32_stopped_by_watchpoint): Turn into ...
3178 (win32_process_target::stopped_by_watchpoint): ... this.
3179 (win32_stopped_data_address): Turn into ...
3180 (win32_process_target::stopped_data_address): ... this.
3181 * win32-low.h (class win32_process_target): Update.
3182
31832020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3184
3185 Turn process_stratum_target's supports_hardware_single_step op into
3186 a method of process_target.
3187
3188 * target.h (struct process_stratum_target): Remove the target op.
3189 (class process_target): Add the target op.
3190 (target_supports_hardware_single_step): Update the macro.
3191 (target_can_do_hardware_single_step): Remove declaration.
3192 * target.cc (process_target::supports_hardware_single_step): Define.
3193 (target_can_do_hardware_single_step): Remove.
3194
3195 Update the derived classes and callers below.
3196
3197 * linux-low.h (class linux_process_target): Update.
3198 * linux-low.cc (linux_target_ops): Update.
3199 (linux_supports_hardware_single_step): Turn into ...
3200 (linux_process_target::supports_hardware_single_step): ... this.
3201 * lynx-low.h (class lynx_process_target): Update.
3202 * lynx-low.cc (lynx_target_ops): Update.
3203 (lynx_process_target::supports_hardware_single_step): Define.
3204 * nto-low.h (class nto_process_target): Update.
3205 * nto-low.cc (nto_target_ops): Update.
3206 (nto_process_target::supports_hardware_single_step): Define.
3207 * win32-low.h (class win32_process_target): Update.
3208 * win32-low.cc (win32_target_ops): Update.
3209 (win32_process_target::supports_hardware_single_step): Define.
3210
32112020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3212
3213 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3214 ops into methods of process_target.
3215
3216 * target.h (struct process_stratum_target): Remove the target ops.
3217 (class process_target): Add the target ops.
3218 (target_stopped_by_hw_breakpoint): Update the macro.
3219 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3220 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3221 (process_target::supports_stopped_by_hw_breakpoint): Define.
3222
3223 Update the derived classes and callers below.
3224
3225 * linux-low.cc (linux_target_ops): Update.
3226 (linux_stopped_by_hw_breakpoint): Turn into ...
3227 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3228 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3229 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3230 * linux-low.h (class linux_process_target): Update.
3231 * lynx-low.cc (lynx_target_ops): Update.
3232 * nto-low.cc (nto_target_ops): Update.
3233 * win32-low.cc (win32_target_ops): Update.
3234
32352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3236
3237 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3238 ops into methods of process_target.
3239
3240 * target.h (struct process_stratum_target): Remove the target ops.
3241 (class process_target): Add the target ops.
3242 (target_stopped_by_sw_breakpoint): Update the macro.
3243 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3244 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3245 (process_target::supports_stopped_by_sw_breakpoint): Define.
3246
3247 Update the derived classes and callers below.
3248
3249 * linux-low.cc (linux_target_ops): Update.
3250 (linux_stopped_by_sw_breakpoint): Turn into ...
3251 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3252 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3253 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3254 * linux-low.h (class linux_process_target): Update.
3255 * lynx-low.cc (lynx_target_ops): Update.
3256 * nto-low.cc (nto_target_ops): Update.
3257 * win32-low.cc (win32_target_ops): Update.
3258
32592020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3260
3261 Turn process_stratum_target's insert_point and remove_point ops
3262 into methods of process_target.
3263
3264 * target.h (struct process_stratum_target): Remove the target ops.
3265 (class process_target): Add the target ops.
3266 * target.cc (process_target::insert_point): Define.
3267 (process_target::remove_point): Define.
3268
3269 Update the derived classes and callers below.
3270
3271 * mem-break.cc (set_raw_breakpoint_at): Update.
3272 (delete_raw_breakpoint): Update.
3273 (uninsert_raw_breakpoint): Update.
3274 (reinsert_raw_breakpoint): Update.
3275 * linux-low.cc (linux_target_ops): Update.
3276 (linux_insert_point): Turn into ...
3277 (linux_process_target::insert_point): ... this.
3278 (linux_remove_point): Turn into ...
3279 (linux_process_target::remove_point): ... this.
3280 * linux-low.h (class linux_process_target): Update.
3281 * lynx-low.cc (lynx_target_ops): Update.
3282 * nto-low.cc (nto_target_ops): Update.
3283 (nto_insert_point): Turn into ...
3284 (nto_process_target::insert_point): ... this.
3285 (nto_remove_point): Turn into ...
3286 (nto_process_target::remove_point): ... this.
3287 * nto-low.h (class nto_process_target): Update.
3288 * win32-low.cc (win32_target_ops): Update.
3289 (win32_insert_point): Turn into ...
3290 (win32_process_target::insert_point): ... this.
3291 (win32_remove_point): Turn into ...
3292 (win32_process_target::remove_point): ... this.
3293 * win32-low.h (class win32_process_target): Update.
3294
32952020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3296
3297 Turn process_stratum_target's supports_z_point_type op into a
3298 method of process_target.
3299
3300 * target.h (struct process_stratum_target): Remove the target op.
3301 (class process_target): Add the target op.
3302 * target.cc (process_target::supports_z_point_type): Define.
3303
3304 Update the derived classes and callers below.
3305
3306 * mem-break.cc (z_type_supported): Update.
3307 * linux-low.cc (linux_target_ops): Update.
3308 (linux_supports_z_point_type): Turn into ...
3309 (linux_process_target::supports_z_point_type): ... this.
3310 * linux-low.h (class linux_process_target): Update.
3311 * lynx-low.cc (lynx_target_ops): Update.
3312 * nto-low.cc (nto_target_ops): Update.
3313 (nto_supports_z_point_type): Turn into ...
3314 (nto_process_target::supports_z_point_type): ... this.
3315 * nto-low.h (class nto_process_target): Update.
3316 * win32-low.cc (win32_target_ops): Update.
3317 (win32_supports_z_point_type): Turn into ...
3318 (win32_process_target::supports_z_point_type): ... this.
3319 * win32-low.h (class win32_process_target): Update.
3320
33212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3322
3323 Turn process_stratum_target's read_auxv op into a method of
3324 process_target.
3325
3326 * target.h (class process_stratum_target): Remove the target op.
3327 (struct process_target): Add the target op. Also add
3328 'supports_read_auxv'.
3329 * target.cc (process_target::read_auxv): Define.
3330 (process_target::supports_read_auxv): Define.
3331
3332 Update the derived classes and callers below.
3333
3334 * server.cc (handle_qxfer_auxv): Update.
3335 (handle_query): Update.
3336 * linux-low.cc (linux_target_ops): Update.
3337 (linux_process_target::supports_read_auxv): Define.
3338 (linux_read_auxv): Turn into ...
3339 (linux_process_target::read_auxv): ... this.
3340 * linux-low.h (class linux_process_target): Update.
3341 * lynx-low.cc (lynx_target_ops): Update.
3342 * nto-low.cc (nto_target_ops): Update.
3343 (nto_process_target::supports_read_auxv): Define.
3344 (nto_read_auxv): Turn into ...
3345 (nto_process_target::read_auxv): ... this.
3346 * nto-low.h (class nto_process_target): Update.
3347 * win32-low.cc (win32_target_ops): Update.
3348
33492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3350
3351 Turn process_stratum_target's request_interrupt op into a method of
3352 process_target.
3353
3354 * target.h (struct process_stratum_target): Remove the target op.
3355 (class process_target): Add the target op.
3356
3357 Update the derived classes and callers below.
3358
3359 * remote-utils.cc (putpkt_binary_1): Update.
3360 (input_interrupt): Update.
3361 (getpkt): Update.
3362 * server.cc (handle_v_requests): Update.
3363 * linux-low.cc (linux_target_ops): Update.
3364 (linux_request_interrupt): Turn into ...
3365 (linux_process_target::request_interrupt): ... this.
3366 * linux-low.h (class linux_process_target): Update.
3367 * lynx-low.cc (lynx_target_ops): Update.
3368 (lynx_request_interrupt): Turn into ...
3369 (lynx_process_target::request_interrupt): ... this.
3370 * lynx-low.h (class lynx_process_target): Update.
3371 * nto-low.cc (nto_target_ops): Update.
3372 (nto_request_interrupt): Turn into ...
3373 (nto_process_target::request_interrupt): ... this.
3374 * nto-low.h (class nto_process_target): Update.
3375 * win32-low.cc (win32_target_ops): Update.
3376 (win32_request_interrupt): Turn into ...
3377 (win32_process_target::request_interrupt): ... this.
3378 * win32-low.h (class win32_process_target): Update.
3379
33802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3381
3382 Turn process_stratum_target's look_up_symbols op into a method of
3383 process_target.
3384
3385 * target.h (struct process_stratum_target): Remove the target op.
3386 (class process_target): Add the target op.
3387 * target.cc (process_target::look_up_symbols): Define.
3388
3389 Update the derived classes and callers below.
3390
3391 * server.cc (handle_query): Update.
3392 * linux-low.cc (linux_target_ops): Update.
3393 (linux_look_up_symbols): Turn into ...
3394 (linux_process_target::look_up_symbols): ... this.
3395 * linux-low.h (class linux_process_target): Update.
3396 * lynx-low.cc (lynx_target_ops): Update.
3397 * nto-low.cc (nto_target_ops): Update.
3398 * win32-low.cc (win32_target_ops): Update.
3399
34002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3401
3402 Turn process_stratum_target's read_memory and write_memory
3403 ops into methods of process_target.
3404
3405 * target.h (struct process_stratum_target): Remove the target ops.
3406 (class process_target): Add the target ops.
3407
3408 Update the derived classes and callers below.
3409
3410 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3411 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3412 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3413 (arm_get_syscall_trapinfo): Update.
3414 * linux-cris-low.cc (cris_breakpoint_at): Update.
3415 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3416 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3417 * linux-mips-low.cc (mips_breakpoint_at): Update.
3418 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3419 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3420 * linux-sh-low.cc (sh_breakpoint_at): Update.
3421 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3422 (sparc_store_gregset_from_stack): Update.
3423 (sparc_breakpoint_at): Update.
3424 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3425 * linux-tile-low.cc (tile_breakpoint_at): Update.
3426 * linux-x86-low.cc (x86_breakpoint_at): Update.
3427 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3428 * mem-brea.cc (insert_memory_breakpoint): Update.
3429 (validate_inserted_breakpoint): Update.
3430 * target.cc (read_inferior_memory): Update.
3431 (target_write_memory): Update.
3432 * linux-low.cc (linux_target_ops): Update.
3433 (linux_read_memory): Make a wrapper around the read_memory target
3434 op call.
3435 (linux_process_target::read_memory): Rename from linux_read_memory.
3436 (linux_write_memory): Turn into ...
3437 (linux_process_target::write_memory): ... this.
3438 * linux-low.h (class linux_process_target): Update.
3439 * lynx-low.cc (lynx_target_ops): Update.
3440 (lynx_read_memory): Turn into ...
3441 (lynx_process_target::read_memory): ... this.
3442 (lynx_write_memory): Turn into ...
3443 (lynx_process_target::write_memory): ... this.
3444 * lynx-low.h (class lynx_process_target): Update.
3445 * nto-low.cc (nto_target_ops): Update.
3446 (nto_read_memory): Turn into ...
3447 (nto_process_target::read_memory): ... this.
3448 (nto_write_memory): Turn into ...
3449 (nto_process_target::write_memory): ... this.
3450 * nto-low.h (class nto_process_target): Update.
3451 * win32-low.cc (win32_target_ops): Update.
3452 (win32_read_inferior_memory): Turn into ...
3453 (win32_process_target::read_memory): ... this.
3454 (win32_write_inferior_memory): Turn into ...
3455 (win32_process_target::write_memory): ... this.
3456 * win32-low.h (class win32_process_target): Update.
3457
34582020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3459
3460 Turn process_stratum_target's prepare_to_access_memory and
3461 done_accessing_memory ops into methods of process_target.
3462
3463 * target.h (struct process_stratum_target): Remove the target ops.
3464 (class process_target): Add the target ops.
3465 * target.cc (process_target::prepare_to_access_memory): Define.
3466 (process_target::done_accessing_memory): Define.
3467 (prepare_to_access_memory): Update.
3468 (done_accessing_memory): Update.
3469
3470 Update the derived classes and callers below.
3471
3472 * linux-low.cc (linux_target_ops): Update.
3473 (linux_prepare_to_access_memory): Turn into ...
3474 (linux_process_target::prepare_to_access_memory): ... this.
3475 (linux_done_accessing_memory): Turn into ...
3476 (linux_process_target::done_accessing_memory): ... this.
3477 * linux-low.h (class linux_process_target): Update.
3478 * lynx-low.cc (lynx_target_ops): Update.
3479 * nto-low.cc (nto_target_ops): Update.
3480 * win32-low.cc (win32_target_ops): Update.
3481
34822020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3483
3484 Turn process_stratum_target's fetch_registers and store_registers
3485 ops into methods of process_target.
3486
3487 * target.h (struct process_stratum_target): Remove the target ops.
3488 (class process_target): Add the target ops.
3489 (fetch_inferior_registers): Update the macro.
3490 (store_inferior_registers): Update the macro.
3491
3492 Update the derived classes and callers below.
3493
3494 * linux-low.cc (linux_target_ops): Update.
3495 (linux_fetch_registers): Turn into ...
3496 (linux_process_target::fetch_registers): ... this.
3497 (linux_store_registers): Turn into ...
3498 (linux_process_target::store_registers): ... this.
3499 * linux-low.h (class linux_process_target): Update.
3500 * lynx-low.cc (lynx_target_ops): Update.
3501 (lynx_fetch_registers): Turn into ...
3502 (lynx_process_target::fetch_registers): ... this.
3503 (lynx_store_registers): Turn into ...
3504 (lynx_process_target::store_registers): ... this.
3505 * lynx-low.h (class lynx_process_target): Update.
3506 * nto-low.cc (nto_target_ops): Update.
3507 (nto_fetch_registers): Turn into ...
3508 (nto_process_target::fetch_registers): ... this.
3509 (nto_store_registers): Turn into ...
3510 (nto_process_target::store_registers): ... this.
3511 * nto-low.h (class nto_process_target): Update.
3512 * win32-low.cc (win32_target_ops): Update.
3513 (win32_fetch_inferior_registers): Turn into ...
3514 (win32_process_target::fetch_registers): ... this.
3515 (win32_store_inferior_registers): Turn into ...
3516 (win32_process_target::store_registers): ... this.
3517 * win32-low.h (class win32_process_target): Update.
3518
35192020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3520
3521 Turn process_stratum_target's wait op into a method of
3522 process_target.
3523
3524 * target.h (struct process_stratum_target): Remove the target op.
3525 (class process_target): Add the target op.
3526
3527 Update the derived classes and callers below.
3528
3529 * target.cc (target_wait): Update.
3530 * linux-low.cc (linux_target_ops): Update.
3531 (linux_wait): Turn into ...
3532 (linux_process_target::wait): ... this.
3533 * linux-low.h (class linux_process_target): Update.
3534 * lynx-low.cc (lynx_target_ops): Update.
3535 (lynx_wait): Turn into ...
3536 (lynx_process_target::wait): ... this.
3537 * lynx-low.h (class lynx_process_target): Update.
3538 * nto-low.cc (nto_target_ops): Update.
3539 (nto_wait): Turn into ...
3540 (nto_process_target::wait): ... this.
3541 * nto-low.h (class nto_process_target): Update.
3542 * win32-low.cc (win32_target_ops): Update.
3543 (win32_wait): Turn into ...
3544 (win32_process_target::wait): ... this.
3545 (do_initial_child_stuff): Update.
3546 * win32-low.h (class win32_process_target): Update.
3547
35482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3549
3550 Turn process_stratum_target's resume op into a method of
3551 process_target.
3552
3553 * target.h (struct process_stratum_target): Remove the target op.
3554 (class process_target): Add the target op.
3555
3556 Update the derived classes and callers below.
3557
3558 * server.cc (resume): Update.
3559 * target.cc (target_stop_and_wait): Update.
3560 (target_continue_no_signal): Update.
3561 (target_continue): Update.
3562 * linux-low.cc (linux_target_ops): Update.
3563 (linux_resume): Turn into ...
3564 (linux_process_target::resume): ... this.
3565 * linux-low.h (class linux_process_target): Update.
3566 * lynx-low.cc (lynx_target_ops): Update.
3567 (lynx_resume): Turn into ...
3568 (lynx_process_target::resume): ... this.
3569 * lynx-low.h (class lynx_process_target): Update.
3570 * nto-low.cc (nto_target_ops): Update.
3571 (nto_resume): Turn into ...
3572 (nto_process_target::resume): ... this.
3573 * nto-low.h (class nto_process_target): Update.
3574 * win32-low.cc (win32_target_ops): Update.
3575 (win32_resume): Turn into ...
3576 (win32_process_target::resume): ... this.
3577 (win32_process_target::detach): Update.
3578 (do_initial_child_stuff): Update.
3579 * win32-low.h (class win32_process_target): Update.
3580
35812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3582
3583 Turn process_stratum_target's thread_alive op into a method of
3584 process_target.
3585
3586 * target.h (struct process_stratum_target): Remove the target op.
3587 (class process_target): Add the target op.
3588 (mythread_alive): Update the macro.
3589
3590 Update the derived classes and callers below.
3591
3592 * linux-low.cc (linux_target_ops): Update.
3593 (linux_thread_alive): Turn into ...
3594 (linux_process_target::thread_alive): ... this.
3595 (wait_for_sigstop): Update.
3596 * linux-low.h (class linux_process_target): Update.
3597 * lynx-low.cc (lynx_target_ops): Update.
3598 (lynx_thread_alive): Turn into ...
3599 (lynx_process_target::thread_alive): ... this.
3600 * lynx-low.h (class lynx_process_target): Update.
3601 * nto-low.cc (nto_target_ops): Update.
3602 (nto_thread_alive): Turn into ...
3603 (nto_process_target::thread_alive): ... this.
3604 * nto-low.h (class nto_process_target): Update.
3605 * win32-low.cc (win32_target_ops): Update.
3606 (win32_thread_alive): Turn into ...
3607 (win32_process_target::thread_alive): ... this.
3608 * win32-low.h (class win32_process_target): Update.
3609
36102020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3611
3612 Turn process_stratum_target's join op into a method of
3613 process_target.
3614
3615 * target.h (struct process_stratum_target): Remove the target op.
3616 (class process_target): Add the target op.
3617 (join_inferior): Update the macro.
3618
3619 Update the derived classes and callers below.
3620
3621 * linux-low.cc (linux_target_ops): Update.
3622 (linux_join): Turn into ...
3623 (linux_process_target::join): ... this.
3624 * linux-low.h (class linux_process_target): Update.
3625 * lynx-low.cc (lynx_target_ops): Update.
3626 (lynx_join): Turn into ...
3627 (lynx_process_target::join): ... this.
3628 * lynx-low.h (class lynx_process_target): Update.
3629 * nto-low.cc (nto_target_ops): Update.
3630 (nto_process_target::join): Define.
3631 * nto-low.h (class nto_process_target): Update.
3632 * win32-low.cc (win32_target_ops): Update.
3633 (win32_join): Turn into ...
3634 (win32_process_target::join): ... this.
3635 * win32-low.h (class win32_process_target): Update.
3636
36372020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3638
3639 Turn process_stratum_target's mourn op into a method of
3640 process_target.
3641
3642 * target.h (struct process_stratum_target): Remove the target op.
3643 (class process_target): Add the target op.
3644
3645 Update the derived classes and callers below.
3646
3647 * target.cc (target_mourn_inferior): Update.
3648 * linux-low.cc (linux_target_ops): Update.
3649 (linux_mourn): Turn into ...
3650 (linux_process_target::mourn): ... this.
3651 (handle_extended_wait): Update.
3652 (linux_process_target::kill): Update.
3653 (linux_process_target::detach): Update.
3654 * linux-low.h (class linux_process_target): Update.
3655 * lynx-low.cc (lynx_target_ops): Update.
3656 (lynx_mourn): Turn into ...
3657 (lynx_process_target::mourn): ... this.
3658 * lynx-low.h (class lynx_process_target): Update.
3659 * nto-low.cc (nto_target_ops): Update.
3660 (nto_mourn): Turn into ...
3661 (nto_process_target::mourn): ... this.
3662 * nto-low.h (class nto_process_target): Update.
3663 * win32-low.cc (win32_target_ops): Update.
3664 (win32_mourn): Turn into ...
3665 (win32_process_target::mourn): ... this.
3666 * win32-low.h (class win32_process_target): Update.
3667
36682020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3669
3670 Turn process_stratum_target's detach op into a method of
3671 process_target.
3672
3673 * target.h (struct process_stratum_target): Remove the target op.
3674 (class process_target): Add the target op.
3675 (detach_inferior): Update the macro.
3676
3677 Update the derived classes and callers below.
3678
3679 * linux-low.cc (linux_target_ops): Update.
3680 (linux_detach): Turn into ...
3681 (linux_process_target::detach): ... this.
3682 * linux-low.h (class linux_process_target): Update.
3683 * lynx-low.cc (lynx_target_ops): Update.
3684 (lynx_detach): Turn into ...
3685 (lynx_process_target::detach): ... this.
3686 * lynx-low.h (class lynx_process_target): Update.
3687 * nto-low.cc (nto_target_ops): Update.
3688 (nto_detach): Turn into ...
3689 (nto_process_target::detach): ... this.
3690 * nto-low.h (class nto_process_target): Update.
3691 * win32-low.cc (win32_target_ops): Update.
3692 (win32_detach): Turn into ...
3693 (win32_process_target::detach): ... this.
3694 * win32-low.h (class win32_process_target): Update.
3695
36962020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3697
3698 Turn process_stratum_target's kill op into a method of
3699 process_target.
3700
3701 * target.h (struct process_stratum_target): Remove the target op.
3702 (class process_target): Add the target op.
3703
3704 Update the derived classes and callers below.
3705
3706 * target.cc (kill_inferior): Update.
3707 * linux-low.cc (linux_target_ops): Update.
3708 (linux_kill): Turn into ...
3709 (linux_process_target::kill): ... this.
3710 * linux-low.h (class linux_process_target): Update.
3711 * lynx-low.cc (lynx_target_ops): Update.
3712 (lynx_kill): Turn into ...
3713 (lynx_process_target::kill): ... this.
3714 * lynx-low.h (class lynx_process_target): Update.
3715 * nto-low.cc (nto_target_ops): Update.
3716 (nto_kill): Turn into ...
3717 (nto_process_target::kill): ... this.
3718 * nto-low.h (class nto_process_target): Update.
3719 * win32-low.cc (win32_target_ops): Update.
3720 (win32_kill): Turn into ...
3721 (win32_process_target::kill): ... this.
3722 * win32-low.h (class win32_process_target): Update.
3723
37242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3725
3726 Turn process_stratum_target's attach op into a method of
3727 process_target.
3728
3729 * target.h (struct process_stratum_target): Remove the target op.
3730 (class process_target): Add the target op.
3731 (myattach): Update the macro.
3732
3733 Update the derived classes and callers below.
3734
3735 * linux-low.cc (linux_target_ops): Update.
3736 (linux_attach): Turn into ...
3737 (linux_process_target::attach): ... this.
3738 * linux-low.h (class linux_process_target): Update.
3739 * lynx-low.cc (lynx_target_ops): Update.
3740 (lynx_attach): Turn into ...
3741 (lynx_process_target::attach): ... this.
3742 * lynx-low.h (class lynx_process_target): Update.
3743 * nto-low.cc (nto_target_ops): Update.
3744 (nto_attach): Turn into ...
3745 (nto_process_target::attach): ... this.
3746 * nto-low.h (class nto_process_target): Update.
3747 * win32-low.cc (win32_target_ops): Update.
3748 (win32_attach): Turn into ...
3749 (win32_process_target::attach): ... this.
3750 * win32-low.h (class win32_process_target): Update.
3751
37522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3753
3754 Turn process_stratum_target's post_create_inferior op into a method
3755 of process_target.
3756
3757 * target.h (struct process_stratum_target): Remove the target op.
3758 (class process_target): Add the target op.
3759 (target_post_create_inferior): Update the macro.
3760 * target.cc (process_target::post_create_inferior): Define.
3761
3762 Update the derived classes and callers below.
3763
3764 * linux-low.cc (linux_target_ops): Update.
3765 (linux_post_create_inferior): Turn into ...
3766 (linux_process_target::post_create_inferior): ... this.
3767 * linux-low.h (class linux_process_target): Update.
3768 * lynx-low.cc (lynx_target_ops): Update.
3769 * nto-low.cc (nto_target_ops): Update.
3770 * win32-low.cc (win32_target_ops): Update.
3771
37722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3773
3774 Turn process_stratum_target's create_inferior op into a method of
3775 process_target.
3776
3777 * target.h (struct process_stratum_target): Remove the target op.
3778 (class process_target): Add the target op.
3779 (create_inferior): Rename the macro to ...
3780 (target_create_inferior): ... this.
3781
3782 Update the derived classes and callers below.
3783
3784 * server.cc (handle_v_run): Update.
3785 (captured_main): Update.
3786 (process_serial_event): Update.
3787 * linux-low.cc (linux_target_ops): Update.
3788 (linux_create_inferior): Turn into ...
3789 (linux_process_target::create_inferior): ... this.
3790 * linux-low.h (class linux_process_target): Update.
3791 * lynx-low.cc (lynx_target_ops): Update.
3792 (lynx_create_inferior): Turn into ...
3793 (lynx_process_target::create_inferior): ... this.
3794 * lynx-low.h (class lynx_process_target): Update.
3795 * nto-low.cc (nto_target_ops): Update.
3796 (nto_create_inferior): Turn into ...
3797 (nto_process_target::create_inferior): ... this.
3798 * nto-low.h (class nto_process_target): Update.
3799 * win32-low.cc (win32_target_ops): Update.
3800 (win32_create_inferior): Turn into ...
3801 (win32_process_target::create_inferior): ... this.
3802 * win32-low.h (class win32_process_target): Update.
3803
38042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3805
3806 * target.h (class process_target): New class definition.
3807 (struct process_stratum_target) <pt>: New field with type
3808 'process_target*'.
3809 * linux-low.h (class linux_process_target): Define as a derived
3810 class of 'process_target'.
3811 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3812 as the 'pt' field.
3813 * lynx-low.h (class lynx_process_target): Define as a derived
3814 class of 'process_target'.
3815 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3816 as the 'pt' field.
3817 * nto-low.h (class nto_process_target): Define as a derived
3818 class of 'process_target'.
3819 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3820 as the 'pt' field.
3821 * win32-low.h (class win32_process_target): Define as a derived
3822 class of 'process_target'.
3823 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3824 as the 'pt' field.
3825
38262020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3827
3828 * configure: Regenerate.
3829
38302020-02-19 Maciej W. Rozycki <macro@wdc.com>
3831 Andrew Burgess <andrew.burgess@embecosm.com>
3832
3833 * linux-riscv-low.cc: New file.
3834 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3835 and nat/riscv-linux-tdesc.c.
3836 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3837 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3838 Define.
3839
38402020-02-14 Tom Tromey <tom@tromey.com>
3841
3842 * acinclude.m4: Don't include acx_configure_dir.m4.
3843 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3844 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3845 (all, install-only, uninstall, clean-info, clean)
3846 (maintainer-clean): Don't recurse.
3847 (subdir_do, all-lib): Remove.
3848 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3849 (GNULIB_H): Remove.
3850 (generated_files): Update.
3851 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3852 * configure: Rebuild.
3853 * configure.ac: Don't configure gnulib or libiberty.
3854 (GNULIB): Update.
3855
38562020-02-14 Eli Zaretskii <eliz@gnu.org>
3857
3858 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3859 preparing the command line for CreateProcess.
3860 (win32_create_inferior): Reflect the program name in debugging
3861 output that shows the process and its command line.
3862
38632020-02-13 Simon Marchi <simon.marchi@efficios.com>
3864
3865 * Makefile.in: Rename source files from .c to .cc.
3866 * %.c: Rename to %.cc.
3867 * configure.ac: Rename server.c to server.cc.
3868 * configure: Re-generate.
3869
38702020-02-13 Simon Marchi <simon.marchi@efficios.com>
3871
3872 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3873
38742020-02-12 Hannes Domani <ssbssa@yahoo.de>
3875
3876 * win32-low.c (win32_create_inferior): Set signal_pid.
3877
38782020-02-12 Maciej W. Rozycki <macro@wdc.com>
3879 Pedro Alves <palves@redhat.com>
3880
3881 Skip building gdbserver in a cross-configuration.
3882 * configure.srv: Set $gdbserver_host depending on whether $target
3883 is $host. Use $gdbserver_host instead of $host.
3884
38852020-02-11 Simon Marchi <simon.marchi@efficios.com>
3886
3887 * configure: Re-generate.
3888
38892020-02-11 Simon Marchi <simon.marchi@efficios.com>
3890
3891 * configure: Re-generate.
3892
38932020-02-11 Simon Marchi <simon.marchi@efficios.com>
3894
3895 * acinclude.m4: Update warning.m4 path.
3896
38972020-02-09 Hannes Domani <ssbssa@yahoo.de>
3898
3899 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3900 (handle_exception): Set siginfo_er.
3901 (win32_xfer_siginfo): New function.
3902
39032020-02-07 Tom Tromey <tom@tromey.com>
3904 Pedro Alves <palves@redhat.com>
3905
3906 * README: Update build documentation.
3907 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3908 host, not target.
3909 * configure.ac: Update paths.
3910 * configure: Rebuild.
3911 * acinclude.m4: Update paths.
3912 * Makefile.in: Update include paths.
3913 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3914 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3915 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3916 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3917 (%-generated.c): Update paths.
3918 * Move entire directory from ../gdb/gdbserver.
3919
39202020-01-29 Maciej W. Rozycki <macro@wdc.com>
3921
3922 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3923
39242020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3925
3926 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3927 assignment instead of srv_linux_obj.
3928
39292020-01-28 Hannes Domani <ssbssa@yahoo.de>
3930
3931 * server.c (handle_qxfer_libraries): Write segment-address with
3932 paddress.
3933
39342020-01-24 Hannes Domani <ssbssa@yahoo.de>
3935
3936 * Makefile.in (install-strip): New target.
3937 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3938 * aclocal.m4: Regenerate.
3939 * configure: Regenerate.
3940 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3941
39422020-01-24 Maciej W. Rozycki <macro@wdc.com>
3943
3944 * Makefile.in (SFILES): Adjust paths to point to real files.
3945 (OBS): Move waitstatus.o to target/waitstatus.o.
3946 (TAGS): Transform paths appropriately.
3947 (%.o): Rename to...
3948 (nat/%.o): ... this pattern rule.
3949 (%.o): Rename to...
3950 (target/%.o): ... this pattern rule.
3951 * configure.srv: Adjust paths throughout to include nat/ prefix
3952 with the revant files.
3953 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3954 * configure: Regenerate.
3955
39562020-01-24 Maciej W. Rozycki <macro@wdc.com>
3957
3958 * Makefile.in (TAGS): Remove config files from the recipe.
3959
39602020-01-14 Tom Tromey <tom@tromey.com>
3961
3962 * configure: Rebuild.
3963 * configure.ac: Remove any checks that were added to common.m4.
3964 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3965 lib-link.m4.
3966
39672020-01-14 Tom Tromey <tom@tromey.com>
3968
3969 * server.h: Include config.h.
3970 * gdbreplay.c: Include config.h.
3971 * configure: Rebuild.
3972 * configure.ac: Don't source common.host.
3973 * acinclude.m4: Update path.
3974 * Makefile.in (INCSUPPORT): New variable.
3975 (INCLUDE_CFLAGS): Add INCSUPPORT.
3976 (SFILES): Update paths.
3977 (version-generated.c): Update path to create-version.sh.
3978 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3979
39802020-01-14 Tom Tromey <tom@tromey.com>
3981
3982 * configure.ac (LIBS): Use WIN32APILIBS.
3983 (USE_WIN32API): Don't define.
3984 * configure: Rebuild.
3985
39862020-01-14 Tom Tromey <tom@tromey.com>
3987
3988 * configure: Rebuild.
3989
39902020-01-13 Simon Marchi <simon.marchi@efficios.com>
3991
3992 * Makefile.in (%-generated.c): Remove rule for files from
3993 regformats/i386.
3994
39952020-01-13 Simon Marchi <simon.marchi@efficios.com>
3996
3997 * configure: Re-generate.
3998
39992020-01-13 Simon Marchi <simon.marchi@efficios.com>
4000
4001 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4002 Define to static.
4003 * tracepoint.c (stop_tracing, flush_trace_buffer,
4004 about_to_request_buffer_space, get_trace_state_variable_value,
4005 set_trace_state_variable_value, gdb_collect): Add declaration.
4006
40072020-01-13 Simon Marchi <simon.marchi@efficios.com>
4008
4009 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4010 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4011 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4012 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4013 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4014 static.
4015
40162020-01-13 Simon Marchi <simon.marchi@efficios.com>
4017
4018 * inferiors.c: Include gdbsupport/common-inferior.h.
4019
40202020-01-13 Simon Marchi <simon.marchi@efficios.com>
4021
4022 * hostio-errno.c: Include hostio.h.
4023
40242020-01-13 Simon Marchi <simon.marchi@efficios.com>
4025
4026 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4027 prerequisite.
4028
40292020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4030
4031 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4032 * linux-arm-tdesc.h: Include arch/arm.h.
4033
40342020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4035
4036 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4037
40382020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4039
4040 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4041 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4042
40432020-01-10 Pedro Alves <palves@redhat.com>
4044
4045 * fork-child.c (post_fork_inferior): Pass target down to
4046 startup_inferior.
4047 * inferiors.c (switch_to_thread): Add process_stratum_target
4048 parameter.
4049 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4050 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4051 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4052 * remote-utils.c (prepare_resume_reply): Pass the target to
4053 switch_to_thread.
4054 * target.c (the_target): Now a process_stratum_target.
4055 (done_accessing_memory): Pass the target to switch_to_thread.
4056 (set_target_ops): Ajust to use process_stratum_target.
4057 * target.h (struct target_ops): Rename to ...
4058 (struct process_stratum_target): ... this.
4059 (the_target, set_target_ops): Adjust.
4060 (prepare_to_access_memory): Adjust comment.
4061 * win32-low.c (child_xfer_memory): Adjust to use
4062 process_stratum_target.
4063 (win32_target_ops): Now a process_stratum_target.
4064
40652020-01-06 Eli Zaretskii <eliz@gnu.org>
4066 Pedro Alves <palves@redhat.com>
4067
4068 * win32-low.c (get_child_debug_event): Extract the fatal exception
4069 from the exit status and convert to the equivalent Posix signal
4070 number.
4071 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4072 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4073
40742020-01-01 Hannes Domani <ssbssa@yahoo.de>
4075
4076 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4077
40782020-01-01 Joel Brobecker <brobecker@adacore.com>
4079
4080 * server.c (gdbserver_version): Change copyright year to 2020.
4081 * gdbreplay.c (gdbreplay_version): Likewise.
4082
40832019-12-19 Christian Biesinger <cbiesinger@google.com>
4084
4085 * configure: Regenerate.
4086 * configure.ac: Quote variable arguments of test.
4087
40882019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4089
4090 * Makefile.in: Fix build with GNU Make 3.81
4091
40922019-12-16 Tom Tromey <tromey@adacore.com>
4093
4094 * server.c (get_exec_file): Constify result.
4095
40962019-12-10 Christian Biesinger <cbiesinger@google.com>
4097
4098 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4099 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4100 * config.in: Regenerate.
4101 * configure: Regenerate.
4102 * configure.ac: Don't check for strerror.
4103 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4104 Call safe_strerror instead of strerror.
4105 * server.h (strerror): Remove this now-unnecessary declaration.
4106 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4107 strerror.
4108 (gdb_agent_helper_thread): Likewise.
4109 * utils.c (perror_with_name): Likewise.
4110
41112019-11-26 Tom Tromey <tom@tromey.com>
4112
4113 * configure, config.in: Rebuild.
4114
41152019-11-26 Tom Tromey <tom@tromey.com>
4116
4117 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4118 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4119 gdb_sigmask.
4120 * configure, config.in: Rebuild.
4121
41222019-11-26 Tom Tromey <tom@tromey.com>
4123
4124 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4125 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4126 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4127 * acinclude.m4: Include ax_pthread.m4.
4128 * config.in, configure: Rebuild.
4129
41302019-11-26 Christian Biesinger <cbiesinger@google.com>
4131
4132 * debug.c (debug_set_output): Call safe_strerror instead of
4133 strerror.
4134 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4135 (linux_kill_one_lwp): Likewise.
4136 (linux_detach_one_lwp): Likewise.
4137 (linux_wait_for_event_filtered): Likewise.
4138 (store_register): Likewise.
4139 * lynx-low.c (lynx_attach): Likewise.
4140 * mem-break.c (insert_memory_breakpoint): Likewise.
4141 (remove_memory_breakpoint): Likewise.
4142 (delete_fast_tracepoint_jump): Likewise.
4143 (set_fast_tracepoint_jump): Likewise.
4144 (uninsert_fast_tracepoint_jumps_at): Likewise.
4145 (reinsert_fast_tracepoint_jumps_at): Likewise.
4146 * nto-low.c (nto_xfer_memory): Likewise.
4147 (nto_resume): Likewise.
4148
41492019-11-20 Luis Machado <luis.machado@linaro.org>
4150
4151 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4152 instead of register count.
4153 * tdesc.c (tdesc_contains_feature): New function.
4154 * tdesc.h (tdesc_contains_feature): New prototype.
4155
41562019-11-15 Christian Biesinger <cbiesinger@google.com>
4157
4158 * Makefile.in: Add safe-strerror.c.
4159 * configure: Regenerate.
4160 * configure.ac: Don't source common.host.
4161
41622019-11-15 Christian Biesinger <cbiesinger@google.com>
4163
4164 * config.in: Regenerate.
4165 * configure: Regenerate.
4166
41672019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4168
4169 * ax.c (ax_printf): Handle size_t_arg.
4170
41712019-11-06 Christian Biesinger <cbiesinger@google.com>
4172
4173 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4174 * mi/mi-main.c (output_cores): Likewise.
4175 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4176 (linux_xfer_osdata_modules): Likewise.
4177 * remote.c (register_remote_support_xml): Likewise.
4178 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4179 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4180
41812019-11-01 Christian Biesinger <cbiesinger@google.com>
4182
4183 * configure: Regenerate.
4184 * configure.ac: Remove check for strerror_r.
4185
41862019-10-31 Christian Biesinger <cbiesinger@google.com>
4187
4188 * config.in: Regenerate.
4189 * configure: Regenerate.
4190 * configure.ac: Also check for strerror_r.
4191
41922019-10-31 Christian Biesinger <cbiesinger@google.com>
4193
4194 * ax.h (debug_agent): Remove duplicate declaration.
4195
41962019-10-26 Tom de Vries <tdevries@suse.de>
4197
4198 * linux-aarch64-low.c: Fix typos in comments.
4199 * linux-arm-low.c: Same.
4200 * linux-low.c: Same.
4201 * linux-ppc-low.c: Same.
4202 * proc-service.c: Same.
4203 * regcache.h: Same.
4204 * server.c: Same.
4205 * tracepoint.c: Same.
4206 * win32-low.c: Same.
4207
42082019-10-25 Tom Tromey <tromey@adacore.com>
4209
4210 * utils.c (xstrdup): Remove.
4211
42122019-10-23 Tom Tromey <tom@tromey.com>
4213
4214 * configure, config.in: Rebuild.
4215
42162019-10-23 Tom Tromey <tom@tromey.com>
4217
4218 * configure: Rebuild.
4219 * acinclude.m4: Use m4_include, not sinclude.
4220
42212019-10-17 Tom Tromey <tromey@adacore.com>
4222
4223 * configure: Rebuild.
4224 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4225 in AC_CONFIG_FILES invocation.
4226 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4227 invocation.
4228
42292019-10-16 Christian Biesinger <cbiesinger@google.com>
4230
4231 * server.c: Include xml-builtin.h.
4232 (get_xml_features): Don't declare xml_builtins here.
4233
42342019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4235
4236 * Makefile.in: Remove references to vec-ipa.o.
4237
42382019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4239
4240 * Makefile.in: Remove references to vec.c.
4241
42422019-10-02 Christian Biesinger <cbiesinger@google.com>
4243
4244 * server.c (server_waiting): Change to bool.
4245 (extended_protocol): Likewise.
4246 (response_needed): Likewise.
4247 (exit_requested): Likewise.
4248 (run_once): Likewise.
4249 (report_no_resumed): Likewise.
4250 (non_stop): Likewise.
4251 (disable_packet_vCont): Likewise.
4252 (disable_packet_Tthread): Likewise.
4253 (disable_packet_qC): Likewise.
4254 (disable_packet_qfThreadInfo): Likewise.
4255 (handle_general_set): Update.
4256 (handle_detach): Update.
4257 (handle_monitor_command): Update.
4258 (handle_query): Update.
4259 (captured_main): Update.
4260 (process_serial_event): Update.
4261 * server.h (server_waiting): Change to bool.
4262 (disable_packet_vCont): Likewise.
4263 (disable_packet_Tthread): Likewise.
4264 (disable_packet_qC): Likewise.
4265 (disable_packet_qfThreadInfo): Likewise.
4266 (run_once): Likewise.
4267 (non_stop): Likewise.
4268 * target.c (target_stop_and_wait): Update.
4269
42702019-10-02 Tom Tromey <tromey@adacore.com>
4271
4272 * Makefile.in (SFILES): Add common-inferior.c.
4273 (OBS): Add common-inferior.o.
4274 * server.c (startup_with_shell): Don't define.
4275
42762019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4277
4278 * linux-low.c (linux_low_read_btrace): Update for change to
4279 std::vector.
4280
42812019-09-20 Christian Biesinger <cbiesinger@google.com>
4282
4283 * debug.c (debug_threads): Remove comment in favor of the header.
4284 * debug.h (using_threads): Add declaration.
4285 (debug_threads): Add comment.
4286 * linux-aarch64-low.c: Include debug.h and remove declaration of
4287 debug_threads.
4288 * nto-low.c: Likewise.
4289 * remote-utils.c: Likewise.
4290 * thread-db.c: Likewise.
4291
42922019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4293
4294 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4295 and powerpc-cell64l-ipa.o.
4296 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4297 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4298 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4299 (spu*-*-*): Remove.
4300
4301 * spu-low.c: Remove file.
4302
4303 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4304 (parse_spufs_run): Remove.
4305 (ppc_get_pc): Remove Cell/B.E. support.
4306 (ppc_set_pc): Likewise.
4307 (ppc_breakpoint_at): Likewise.
4308 (ppc_arch_setup): Likewise.
4309 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4310 tdesc_powerpc_cell32l.
4311 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4312 or init_registers_powerpc_cell32l.
4313 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4314 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4315 or init_registers_powerpc_cell32l.
4316 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4317 (init_registers_powerpc_cell32l): Remove prototype.
4318 (init_registers_powerpc_cell64l): Likewise.
4319
4320 * target.h (struct target_ops): Remove qxfer_spu member.
4321 * server.c (handle_qxfer_spu): Remove.
4322 (qxfer_packets): Remove entry for "spu".
4323 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4324 * linux-low.c (SPUFS_MAGIC): Remove.
4325 (spu_enumerate_spu_ids): Remove.
4326 (linux_qxfer_spu): Remove.
4327 (linux_target_ops): Remove qxfer_spu member.
4328 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4329 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4330 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4331
43322019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4333
4334 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4335 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4336 * config.in: Regenerate.
4337 * configure: Regenerate.
4338
43392019-08-15 Tom Tromey <tromey@adacore.com>
4340
4341 * target.c (target_write_memory): Use gdb::byte_vector.
4342
43432019-08-15 Tom Tromey <tromey@adacore.com>
4344
4345 * tracepoint.c (write_inferior_data_pointer)
4346 (write_inferior_integer, write_inferior_int8)
4347 (write_inferior_uinteger, m_tracepoint_action_download)
4348 (r_tracepoint_action_download, x_tracepoint_action_download)
4349 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4350 (download_agent_expr, download_tracepoint_1)
4351 (download_trace_state_variables, upload_fast_traceframes): Update.
4352 * server.c (gdb_write_memory): Update.
4353 * remote-utils.c (relocate_instruction): Update.
4354 * proc-service.c (ps_pdwrite): Update.
4355 * mem-break.c (remove_memory_breakpoint)
4356 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4357 (uninsert_fast_tracepoint_jumps_at)
4358 (reinsert_fast_tracepoint_jumps_at): Update.
4359 * linux-x86-low.c (append_insns)
4360 (i386_install_fast_tracepoint_jump_pad)
4361 (amd64_write_goto_address, i386_write_goto_address): Update.
4362 * linux-s390-low.c (append_insns, s390_write_goto_address):
4363 Update.
4364 * linux-ppc-low.c (ppc_relocate_instruction)
4365 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4366 (ppc_write_goto_address): Update.
4367 * linux-aarch64-low.c (append_insns): Update.
4368 * target.h (struct target_ops): Update.
4369 (write_inferior_memory): Don't declare.
4370 * target.c (target_write_memory): Rename from
4371 write_inferior_memory. Remove old target_write_memory.
4372
43732019-08-15 Tom Tromey <tromey@adacore.com>
4374
4375 * target.c (write_inferior_memory): Use std::vector.
4376
43772019-08-06 Frank Ch. Eigler <fche@redhat.com>
4378
4379 PR build/24886
4380 * configure.ac: Drop enable-libmcheck support.
4381 * configure, config.in: Rebuild.
4382 * acinclude.m4: Don't include it.
4383
43842019-07-19 Alan Hayward <alan.hayward@arm.com>
4385
4386 * configure.srv: Remove Arm xml files.
4387
43882019-07-19 Alan Hayward <alan.hayward@arm.com>
4389
4390 * configure.srv: Add new files. Remove xml generated files.
4391 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4392 registers.
4393 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4394 * linux-aarch32-tdesc.c: New file.
4395 * linux-aarch32-tdesc.h: New file.
4396 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4397 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4398 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4399 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4400 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4401 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4402 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4403 (arm_read_description): Call arm_linux_read_description.
4404 (initialize_low_arch): Don't init registers.
4405 * linux-arm-tdesc.c: New file.
4406 * linux-arm-tdesc.h: New file.
4407
44082019-07-10 Alan Hayward <alan.hayward@arm.com>
4409
4410 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4411 Move counter inside for.
4412 (arm_read_description): Check ptrace earlier.
4413 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4414
44152019-07-09 Tom Tromey <tom@tromey.com>
4416
4417 * configure: Rebuild.
4418 * configure.ac: Change common to gdbsupport.
4419 * acinclude.m4: Change common to gdbsupport.
4420 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4421 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4422 common to gdbsupport.
4423 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4424 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4425 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4426 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4427 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4428 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4429 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4430 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4431 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4432 common to gdbsupport.
4433
44342019-07-04 Alan Hayward <alan.hayward@arm.com>
4435
4436 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4437 defines.
4438 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4439
44402019-07-04 Alan Hayward <alan.hayward@arm.com>
4441
4442 * configure.srv: Remove legacy xml.
4443 * linux-aarch64-low.c (initialize_low_arch): Remove
4444 initialize_low_tdesc call.
4445 * linux-aarch64-tdesc-selftest.c: Remove file.
4446 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4447 * linux-x86-low.c (initialize_low_arch): Remove
4448 initialize_low_tdesc call.
4449 * linux-x86-tdesc-selftest.c: Remove file.
4450 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4451
44522019-06-20 Tom de Vries <tdevries@suse.de>
4453
4454 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4455 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4456
44572019-06-19 Tom de Vries <tdevries@suse.de>
4458
4459 * debug.h (debug_write): Change return type to ssize_t.
4460 * debug.c (debug_write): Same.
4461
44622019-06-14 Tom Tromey <tom@tromey.com>
4463
4464 * configure.ac: Use new path to gnulib.
4465 * configure: Rebuild.
4466 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4467 to gnulib.
4468
44692019-06-11 Tom Tromey <tom@tromey.com>
4470
4471 * Makefile.in (SFILES): Add alloc.c.
4472 (OBS): Add alloc.o.
4473 (IPA_OBJS): Add alloc-ipa.o.
4474 (alloc-ipa.o): New target.
4475 (%.o: ../%.c): New pattern rule.
4476
44772019-06-10 Tom Tromey <tromey@adacore.com>
4478
4479 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4480 end warning with a newline.
4481 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4482 newline.
4483 * thread-db.c (attach_thread): Don't end warning with a newline.
4484 (thread_db_notice_clone): Likewise.
4485 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4486 newline.
4487 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4488 end warning with a newline.
4489
44902019-06-04 Pedro Alves <palves@redhat.com>
4491
4492 * server.c (captured_main): Use make_unique_xstrdup.
4493
44942019-06-02 Tom Tromey <tom@tromey.com>
4495
4496 * gdbreplay.c (fromhex): Remove.
4497 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4498
44992019-05-29 Tom Tromey <tromey@adacore.com>
4500
4501 * configure: Rebuild.
4502
45032019-05-06 Kevin Buettner <kevinb@redhat.com>
4504
4505 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4506 sign extension code on 32-bit builds.
4507
45082019-05-03 Eli Zaretskii <eliz@gnu.org>
4509
4510 * remote-utils.c:
4511 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4512
45132019-04-19 Tom Tromey <tom@tromey.com>
4514
4515 * server.c (struct vstop_notif): Derive from notif_event.
4516 <base>: Remove.
4517 (queue_stop_reply): Update.
4518 (remove_all_on_match_ptid): Change type. Rewrite.
4519 (discard_queued_stop_replies): Rewrite.
4520 (in_queued_stop_replies_ptid): Change type.
4521 (in_queued_stop_replies): Rewrite.
4522 (notif_stop): Update.
4523 (queue_stop_reply_callback): Update.
4524 (captured_main): Don't call initialize_notif.
4525 (push_stop_notification): Update.
4526 * notif.c (notif_write_event, handle_notif_ack)
4527 (notif_event_enque, notif_push): Update.
4528 (notif_event_xfree, initialize_notif): Remove.
4529 * notif.h (struct notif_event): Include <list>, not
4530 "common/queue.h".
4531 (struct notif_server) <queue>: Now a std::list.
4532 (notif_event_p): Remove typedef.
4533 (initialize_notif): Don't declare.
4534 (struct notif_event): Add virtual destructor.
4535
45362019-04-17 Alan Hayward <alan.hayward@arm.com>
4537
4538 * ax.c (ax_vdebug): Call debug_printf.
4539 * debug.c (debug_write): New function.
4540 * debug.h (debug_write): New declaration.
4541 * linux-low.c (sigchld_handler): Call debug_write.
4542
45432019-04-17 Alan Hayward <alan.hayward@arm.com>
4544
4545 * debug.c (debug_set_output): New function.
4546 (debug_vprintf): Send output to debug_file.
4547 (debug_flush): Likewise.
4548 * debug.h (debug_set_output): New declaration.
4549 * server.c (handle_monitor_command): Add debug-file option.
4550 (captured_main): Likewise.
4551
45522019-04-17 Alan Hayward <alan.hayward@arm.com>
4553
4554 * debug.c (remote_debug): Add definition.
4555 * debug.h (remote_debug): Add declaration.
4556 * hostio.c (remote_debug): Remove declaration.
4557 * remote-utils.c (struct ui_file): Likewise.
4558 (remote_debug): Likewise.
4559 * remote-utils.h (remote_debug): Likewise,
4560 * server.c (remote_debug): Remove definition.
4561
45622019-04-10 Kevin Buettner <kevinb@redhat.com>
4563
4564 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4565 when using a 64-bit gdbserver.
4566
45672019-04-09 Tom Tromey <tromey@adacore.com>
4568
4569 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4570
45712019-04-08 Tom Tromey <tom@tromey.com>
4572
4573 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4574 throw.
4575 (linux_resume_one_lwp): Likewise.
4576
45772019-04-08 Tom Tromey <tom@tromey.com>
4578
4579 * gdbreplay.c: Update.
4580 * linux-low.c: Update.
4581 * server.c: Update.
4582
45832019-04-08 Tom Tromey <tom@tromey.com>
4584
4585 * server.c: Use C++ exception handling.
4586 * linux-low.c: Use C++ exception handling.
4587 * gdbreplay.c: Use C++ exception handling.
4588
45892019-04-08 Tom Tromey <tom@tromey.com>
4590
4591 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4592 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4593 (captured_main, main): Update.
4594 * gdbreplay.c (main): Update.
4595
45962019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4597
4598 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4599 value in argument pointer, return 1 if the entry is found and 0
4600 otherwise. Move comment.
4601 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4602 * linux-low.h (linux_get_auxv): Declare.
4603 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4604
46052019-04-05 Tom Tromey <tromey@adacore.com>
4606
4607 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4608 variables.
4609
46102019-03-28 Alan Hayward <alan.hayward@arm.com>
4611
4612 * linux-low.c (AT_HWCAP2): Add define if not already included.
4613
46142019-03-26 Alan Hayward <alan.hayward@arm.com>
4615
4616 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4617 (aarch64_arch_setup): Call linux_get_hwcap.
4618 * linux-arm-low.c (arm_get_hwcap): Remove function.
4619 (arm_read_description): Call linux_get_hwcap.
4620 * linux-low.c (linux_get_auxv): New function.
4621 (linux_get_hwcap): Likewise.
4622 (linux_get_hwcap2): Likewise.
4623 * linux-low.h (linux_get_hwcap): New declaration.
4624 (linux_get_hwcap2): Likewise.
4625 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4626 (ppc_arch_setup): Call linux_get_hwcap.
4627 * linux-s390-low.c (s390_get_hwcap): Remove function.
4628 (s390_arch_setup): Call linux_get_hwcap.
4629
46302019-03-22 Alan Hayward <alan.hayward@arm.com>
4631 Jiong Wang <jiong.wang@arm.com>
4632
4633 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4634 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4635 to fail.
4636 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4637
46382019-03-22 Alan Hayward <alan.hayward@arm.com>
4639 Jiong Wang <jiong.wang@arm.com>
4640
4641 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4642 (aarch64_get_hwcap): New function.
4643 (aarch64_arch_setup): Read APIA hwcap.
4644
46452019-03-22 Alan Hayward <alan.hayward@arm.com>
4646 Jiong Wang <jiong.wang@arm.com>
4647
4648 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4649 (initialize_low_tracepoint): Likewise.
4650 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4651 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4652 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4653 (aarch64_linux_read_description): Likewise.
4654 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4655
46562019-03-12 John Baldwin <jhb@FreeBSD.org>
4657
4658 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4659 i386_create_target_description for 'segments' parameter.
4660 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4661 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4662 * win32-i386-low.c (i386_arch_setup): Likewise.
4663
46642019-03-12 Tom Tromey <tromey@adacore.com>
4665
4666 * linux-low.c (iterate_over_lwps): Update.
4667
46682019-03-06 Tom Tromey <tom@tromey.com>
4669
4670 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4671 (captured_main): Use SCOPE_EXIT.
4672
46732019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4674
4675 * configure.srv: Use '$enable_unittest' instead of '$development'
4676 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4677 case.
4678
46792019-02-27 Tom Tromey <tromey@adacore.com>
4680
4681 * gdbreplay.c (logchar): Handle \r\n.
4682
46832019-02-07 Alan Hayward <alan.hayward@arm.com>
4684
4685 * linux-low.c (linux_attach): Add process before lwp.
4686 * server.c (attach_inferior): Check if already attached.
4687
46882019-02-07 Tom Tromey <tom@tromey.com>
4689
4690 * x86-tdesc.h: Rename include guard.
4691 * x86-low.h: Add include guard.
4692 * wincecompat.h: Rename include guard.
4693 * win32-low.h: Add include guard.
4694 * utils.h: Rename include guard.
4695 * tracepoint.h: Rename include guard.
4696 * tdesc.h: Rename include guard.
4697 * target.h: Rename include guard.
4698 * server.h: Rename include guard.
4699 * remote-utils.h: Rename include guard.
4700 * regcache.h: Rename include guard.
4701 * nto-low.h: Rename include guard.
4702 * notif.h: Add include guard.
4703 * mem-break.h: Rename include guard.
4704 * lynx-low.h: Add include guard.
4705 * linux-x86-tdesc.h: Add include guard.
4706 * linux-s390-tdesc.h: Add include guard.
4707 * linux-ppc-tdesc-init.h: Add include guard.
4708 * linux-low.h: Add include guard.
4709 * linux-aarch64-tdesc.h: Add include guard.
4710 * linux-aarch32-low.h: Add include guard.
4711 * inferiors.h: Rename include guard.
4712 * i387-fp.h: Rename include guard.
4713 * hostio.h: Rename include guard.
4714 * gdbthread.h: Rename include guard.
4715 * gdb_proc_service.h: Rename include guard.
4716 * event-loop.h: Rename include guard.
4717 * dll.h: Rename include guard.
4718 * debug.h: Rename include guard.
4719 * ax.h: Rename include guard.
4720
47212018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4722
4723 PR gdb/23985
4724 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4725 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4726
47272019-01-25 Tom Tromey <tom@tromey.com>
4728
4729 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4730
47312019-01-25 Tom Tromey <tom@tromey.com>
4732
4733 * win32-low.c: Fix common/ includes.
4734 * win32-i386-low.c: Fix common/ includes.
4735 * tracepoint.c: Fix common/ includes.
4736 * thread-db.c: Fix common/ includes.
4737 * target.h: Fix common/ includes.
4738 * symbol.c: Fix common/ includes.
4739 * spu-low.c: Fix common/ includes.
4740 * server.h: Fix common/ includes.
4741 * server.c: Fix common/ includes.
4742 * remote-utils.c: Fix common/ includes.
4743 * regcache.h: Fix common/ includes.
4744 * regcache.c: Fix common/ includes.
4745 * nto-x86-low.c: Fix common/ includes.
4746 * notif.h: Fix common/ includes.
4747 * mem-break.h: Fix common/ includes.
4748 * lynx-low.c: Fix common/ includes.
4749 * lynx-i386-low.c: Fix common/ includes.
4750 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4751 * linux-x86-low.c: Fix common/ includes.
4752 * linux-low.c: Fix common/ includes.
4753 * inferiors.h: Fix common/ includes.
4754 * i387-fp.c: Fix common/ includes.
4755 * hostio.c: Fix common/ includes.
4756 * hostio-errno.c: Fix common/ includes.
4757 * gdbthread.h: Fix common/ includes.
4758 * gdbreplay.c: Fix common/ includes.
4759 * fork-child.c: Fix common/ includes.
4760 * event-loop.c: Fix common/ includes.
4761 * ax.c:
4762 (enum gdb_agent_op): Fix common/ includes.
4763
47642019-01-21 Tom Tromey <tom@tromey.com>
4765
4766 * tracepoint.c: Fix includes.
4767 * remote-utils.c: Fix includes.
4768 * linux-x86-low.c: Fix includes.
4769
47702019-01-01 Joel Brobecker <brobecker@adacore.com>
4771
4772 * gdbreplay.c (gdbreplay_version): Update copyright year in
4773 version message.
4774 * server.c (gdbserver_version): Likewise.
4775
47762018-12-05 Alan Hayward <alan.hayward@arm.com>
4777
4778 * linux-low.c (add_lwp): Switch ordering.
4779
47802018-11-29 Tom Tromey <tom@tromey.com>
4781
4782 * win32-low.c (win32_join): Take pid, not process.
4783 * target.h (struct target_ops) <join>: Change argument type.
4784 (join_inferior): Change argument name.
4785 * spu-low.c (spu_join): Take pid, not process.
4786 * server.c (handle_detach): Preserve pid before destroying
4787 process.
4788 * lynx-low.c (lynx_join): Take pid, not process.
4789 * linux-low.c (linux_join): Take pid, not process.
4790
47912018-11-23 Alan Hayward <alan.hayward@arm.com>
4792
4793 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4794 (aarch64_cannot_fetch_register): Likewise.
4795 (struct linux_target_ops): Update references.
4796
47972018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4798
4799 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4800
48012018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4802
4803 * configure.srv (ipa_ppc_linux_regobj): Add
4804 powerpc-isa207-htm-vsx32l-ipa.o and
4805 powerpc-isa207-htm-vsx64l-ipa.o.
4806 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4807 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4808 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4809 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4810 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4811 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4812 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4813 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4814 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4815 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4816 (init_registers_powerpc_isa207_htm_vsx32l)
4817 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4818 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4819 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4820 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4821 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4822 (ppc_store_tm_ctarregset): New functions.
4823 (ppc_regsets): Add entries for HTM regsets.
4824 (ppc_arch_setup): Set htm in features struct when needed. Set
4825 sizes for the HTM regsets.
4826 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4827 (initialize_low_arch): Call
4828 init_registers_powerpc_isa207_htm_vsx32l and
4829 init_registers_powerpc_isa207_htm_vsx64l.
4830 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4831 PPC_TDESC_ISA207_HTM_VSX.
4832 (initialize_low_tracepoint): Call
4833 init_registers_powerpc_isa207_htm_vsx32l and
4834 init_registers_powerpc_isa207_htm_vsx64l.
4835
48362018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4837
4838 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4839 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4840 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4841 (ppc_store_pmuregset): New functions.
4842 (ppc_regsets): Add entries for ebb and pmu regsets.
4843 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4844 pmu regsets are available. Set sizes for these regsets.
4845
48462018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4847
4848 * configure.srv (ipa_ppc_linux_regobj): Add
4849 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4850 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4851 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4852 rs6000/powerpc-isa207-vsx32l.xml, and
4853 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4854 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4855 <PPC_TDESC_ISA207_VSX>: New enum value.
4856 (init_registers_powerpc_isa207_vsx32l): Declare.
4857 (init_registers_powerpc_isa207_vsx64l): Declare.
4858 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4859 (ppc_store_tarregset): New function.
4860 (ppc_regsets): Add entry for the TAR regset.
4861 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4862 size for the TAR regsets.
4863 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4864 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4865 and init_registers_powerpc_isa207_vsx64l.
4866 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4867 (initialize_low_tracepoint): Call
4868 init_registers_powerpc_isa207_vsx32l and
4869 init_registers_powerpc_isa207_vsx64l.
4870
48712018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4872 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4873
4874 * configure.srv (ipa_ppc_linux_regobj): Add
4875 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4876 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4877 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4878 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4879 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4880 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4881 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4882 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4883 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4884 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4885 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4886 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4887 (ppc_hwcap): Add comment.
4888 (ppc_hwcap2): New global.
4889 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4890 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4891 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4892 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4893 when needed. Set sizes for the the DSCR and PPR regsets.
4894 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4895 (initialize_low_arch): Call
4896 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4897 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4898 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4899 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4900 (initialize_low_tracepoint): Call
4901 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4902 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4903
49042018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4905
4906 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4907
49082018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4909 Simon Marchi <simark@simark.ca>
4910
4911 * acinclude.m4: Include "../selftest.m4".
4912 * configure: Regenerate.
4913 * configure.ac: Use "GDB_AC_SELFTEST".
4914 * configure.srv: Use "$enable_unittests" instead of
4915 "$development" when checking whether unit tests have been
4916 enabled.
4917 * server.c (captured_main): Update message informing that
4918 selftests have been disabled.
4919
49202018-10-04 Tom Tromey <tom@tromey.com>
4921
4922 * configure: Rebuild.
4923
49242018-10-04 Tom Tromey <tom@tromey.com>
4925
4926 * server.c (handle_status): Rename inner "thread".
4927 (process_serial_event): Declare "res" in 'm' case.
4928 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4929 (iterate_over_lwps): Rename inner "thread".
4930 (linux_qxfer_libraries_svr4): Rename inner "len".
4931 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4932
49332018-10-01 Gary Benson <gbenson@redhat.com>
4934
4935 * gdb_proc_service.h: Moved common code to
4936 common/gdb_proc_service.h.
4937
49382018-10-01 Gary Benson <gbenson@redhat.com>
4939
4940 * gdb_proc_service.h: Synchronize comments and whitespace with
4941 GDB's version of this file.
4942
49432018-09-25 Tom Tromey <tom@tromey.com>
4944
4945 * configure: Rebuild.
4946 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4947
49482018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4949
4950 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4951 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4952 ($(IPA_LIB)): Sort IPA_OBJS.
4953
49542018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4955
4956 * Makefile.in: Remove references to $(ADD_DEPS).
4957
49582018-09-16 Tom Tromey <tom@tromey.com>
4959
4960 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4961 variables.
4962 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4963 variables.
4964
49652018-09-05 Tom Tromey <tom@tromey.com>
4966
4967 * configure: Rebuild.
4968
49692018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4970
4971 PR build/23399
4972 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4973
49742018-08-27 Tom Tromey <tom@tromey.com>
4975
4976 PR build/23087:
4977 * configure: Rebuild.
4978
49792018-08-27 Tom Tromey <tom@tromey.com>
4980
4981 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4982 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4983 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4984 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4985 (s390x_emit_stack_adjust): Add casts to unsigned char.
4986
49872018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4988
4989 PR gdb/23374
4990 PR gdb/23375
4991 * server.h (struct client_state) <disable_randomization>:
4992 Initialize to 1.
4993
49942018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4995
4996 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4997 variable.
4998 (mips_supply_ptrace_register): Likewise.
4999
50002018-07-22 Tom Tromey <tom@tromey.com>
5001
5002 * configure: Rebuild.
5003
50042018-07-22 Tom Tromey <tom@tromey.com>
5005
5006 * win32-low.c (win32_create_inferior): Remove unused variables.
5007 * gdbreplay.c (remote_open): Remove unused variable.
5008 * remote-utils.c (remote_prepare): Remove unused variable.
5009 * x86-tdesc.h (X86_TDESC_H): Define.
5010 (amd64_expedite_regs): Define conditionally.
5011 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5012 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5013 * remote-utils.c (readchar): Remove unused variable.
5014
50152018-07-13 Pedro Alves <palves@redhat.com>
5016
5017 * linux-low.c (linux_kill): Change parameter to process_info
5018 pointer instead of pid. Adjust.
5019 * lynx-low.c (lynx_kill): Likewise.
5020 * nto-low.c (nto_kill): Likewise.
5021 * spu-low.c (spu_kill): Likewise.
5022 * win32-low.c (win32_kill): Likewise.
5023 * server.c (handle_v_kill, kill_inferior_callback)
5024 (detach_or_kill_for_exit): Adjust.
5025 * target.c (kill_inferior): Change parameter to process_info
5026 pointer instead of pid. Adjust.
5027 * target.h (struct target_ops) <kill>: Change parameter to
5028 process_info pointer instead of pid. Adjust all implementations
5029 and callers.
5030 (kill_inferior): Likewise.
5031
50322018-07-13 Pedro Alves <palves@redhat.com>
5033
5034 * linux-low.c (linux_detach, linux_join): Change parameter to
5035 process_info pointer instead of pid. Adjust.
5036 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5037 * nto-low.c (nto_detach): Likewise.
5038 * spu-low.c (spu_detach, spu_join): Likewise.
5039 * win32-low.c (win32_detach, win32_join): Likewise.
5040 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5041 * target.h (struct target_ops) <detach, join>: Change parameter to
5042 process_info pointer instead of pid. Adjust all implementations
5043 and callers.
5044 (detach_inferior, join_inferior): Rename 'pid' parameter to
5045 'proc'.
5046
50472018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5048 Jan Kratochvil <jan.kratochvil@redhat.com>
5049 Paul Fertser <fercerpav@gmail.com>
5050 Tsutomu Seki <sekiriki@gmail.com>
5051
5052 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5053 (OBS): Add 'common/netstuff.o'.
5054 (GDBREPLAY_OBS): Likewise.
5055 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5056 (remote_open): Implement support for IPv6
5057 connections.
5058 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5059 and 'wspiapi.h'.
5060 (handle_accept_event): Accept connections from IPv6 sources.
5061 (remote_prepare): Handle IPv6-style hostnames; implement
5062 support for IPv6 connections.
5063 (remote_open): Implement support for printing connections from
5064 IPv6 sources.
5065
50662018-07-11 Pedro Alves <palves@redhat.com>
5067
5068 PR gdb/23377
5069 * mem-break.c (any_persistent_commands): Add process_info
5070 parameter and use it instead of relying on the current process.
5071 Change return type to bool.
5072 * mem-break.h (any_persistent_commands): Add process_info
5073 parameter and change return type to bool.
5074 * server.c (handle_detach): Remove require_running_or_return call.
5075 Look up the process_info for the process we're about to detach.
5076 If not found, return back error to GDB. Adjust
5077 any_persistent_commands call to pass down a process pointer.
5078
50792018-07-11 Pedro Alves <palves@redhat.com>
5080
5081 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5082 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5083 instead of collect_register_by_name.
5084 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5085 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5086
50872018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5088 Pedro Alves <palves@redhat.com>
5089
5090 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5091
50922018-07-03 Tom Tromey <tom@tromey.com>
5093
5094 * linux-low.c: Update.
5095 * lynx-low.c: Update.
5096 * mem-break.c: Update.
5097 * nto-low.c: Update.
5098 * remote-utils.c: Update.
5099 * server.c: Update.
5100 * spu-low.c: Update.
5101 * target.c: Update.
5102 * win32-low.c: Update.
5103
51042018-07-03 Tom Tromey <tom@tromey.com>
5105
5106 * server.c: Update.
5107
51082018-07-03 Tom Tromey <tom@tromey.com>
5109
5110 * linux-low.c: Update.
5111
51122018-07-03 Tom Tromey <tom@tromey.com>
5113
5114 * target.c: Update.
5115
51162018-07-03 Tom Tromey <tom@tromey.com>
5117
5118 * linux-low.c: Update.
5119 * linux-mips-low.c: Update.
5120 * lynx-low.c: Update.
5121 * nto-low.c: Update.
5122 * remote-utils.c: Update.
5123 * server.c: Update.
5124 * spu-low.c: Update.
5125 * target.c: Update.
5126 * thread-db.c: Update.
5127
51282018-07-03 Tom Tromey <tom@tromey.com>
5129
5130 * linux-low.c: Update.
5131 * linux-mips-low.c: Update.
5132 * lynx-low.c: Update.
5133 * mem-break.c: Update.
5134 * nto-low.c: Update.
5135 * remote-utils.c: Update.
5136 * server.c: Update.
5137 * spu-low.c: Update.
5138 * target.c: Update.
5139 * tracepoint.c: Update.
5140
51412018-07-03 Tom Tromey <tom@tromey.com>
5142
5143 * linux-low.c: Update.
5144 * linux-ppc-low.c: Update.
5145 * linux-x86-low.c: Update.
5146 * proc-service.c: Update.
5147 * server.c: Update.
5148 * spu-low.c: Update.
5149 * thread-db.c: Update.
5150 * win32-low.c: Update.
5151
51522018-07-03 Tom Tromey <tom@tromey.com>
5153
5154 * linux-low.c: Update.
5155 * lynx-low.c: Update.
5156 * nto-low.c: Update.
5157 * remote-utils.c: Update.
5158 * spu-low.c: Update.
5159 * thread-db.c: Update.
5160 * win32-low.c: Update.
5161
51622018-06-29 Joel Brobecker <brobecker@adacore.com>
5163
5164 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5165 parameter in call to 'amd64_create_target_description'.
5166
51672018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5168
5169 * x86-tdesc.h: Remove executable permission flag.
5170
51712018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5172
5173 * configure.ac: Remove AC_PREREQ, add missing quoting.
5174 * configure: Re-generate.
5175 * config.in: Re-generate.
5176 * aclocal.m4: Re-generate.
5177
51782018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5179
5180 * tracepoint.h (current_traceframe): Remove declaration.
5181
51822018-06-18 Alan Hayward <alan.hayward@arm.com>
5183
5184 * linux-aarch64-low.c (is_sve_tdesc): New function.
5185 (aarch64_sve_regs_copy_to_regcache): Likewise.
5186 (aarch64_sve_regs_copy_from_regcache): Likewise.
5187 (aarch64_regs_info): Add SVE checks.
5188 (initialize_low_arch): Initialize SVE.
5189
51902018-06-18 Alan Hayward <alan.hayward@arm.com>
5191
5192 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5193
51942018-06-11 Alan Hayward <alan.hayward@arm.com>
5195
5196 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5197 (initialize_low_tracepoint): Likewise
5198 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5199 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5200 param.
5201 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5202 checks.
5203 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5204
52052018-06-11 Alan Hayward <alan.hayward@arm.com>
5206
5207 * server.h (PBUFSIZ): Increase size
5208
52092018-06-11 Alan Hayward <alan.hayward@arm.com>
5210
5211 * regcache.c (regcache::raw_compare): New function.
5212 * regcache.h (regcache::raw_compare): New declaration.
5213
52142018-06-11 Alan Hayward <alan.hayward@arm.com>
5215
5216 * regcache.c (new_register_cache): Use new.
5217 (free_register_cache): Use delete.
5218 (register_data): Use const.
5219 (supply_register): Move body inside regcache.
5220 (regcache::raw_supply): New override function.
5221 (collect_register): Move body inside regcache.
5222 (regcache::raw_collect): New override function.
5223 (regcache::get_register_status): New override function.
5224 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5225
52262018-06-09 Tom Tromey <tom@tromey.com>
5227
5228 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5229 declare queue.
5230 (event_queue): Use std::queue.
5231 (gdb_event_xfree): Remove.
5232 (initialize_event_loop, process_event, wait_for_event): Update.
5233
52342018-06-08 Stan Cox <scox@redhat.com>
5235
5236 * win32-low.c (win32_create_inferior): last_ptid and last_status
5237 moved to client_state.
5238
52392018-06-08 Pedro Alves <palves@redhat.com>
5240
5241 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5242 common/common-exceptions.o, common/common-utils.o,
5243 common/errors.o, common/print-utils.o and utils.o.
5244 * gdbreplay.c: Include "common-defs.h" instead of the two
5245 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5246 string.h or alloca.h.
5247 (perror_with_name): Delete.
5248 (remote_open): Use xstrdup instead of strdup.
5249 (main): Rename to ...
5250 (captured_main): ... this.
5251 (main): New.
5252
52532018-06-08 Tom Tromey <tom@tromey.com>
5254
5255 * linux-low.c (linux_low_read_btrace): Update.
5256
52572018-06-04 Stan Cox <scox@redhat.com>
5258
5259 * server.h (struct client_state): New.
5260 * server.c (cont_thread, general_thread, multi_process)
5261 (report_fork_events, report_vfork_events, report_exec_events)
5262 (report_thread_events, swbreak_feature, hwbreak_feature)
5263 (vCont_supported, disable_randomization, pass_signals)
5264 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5265 Moved to client_state.
5266 * remote-utils.c (remote_debug, noack_mode)
5267 (transport_is_reliable): Moved to client_state.
5268 * tracepoint.c (current_traceframe): Moved to client_state.
5269
5270 Update all callers.
5271 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5272 linux-low.c, remote-utils.h, target.c: Use client_state.
5273
52742018-05-31 Alan Hayward <alan.hayward@arm.com>
5275
5276 * configure.srv: Add new c/h file.
5277
52782018-05-31 Alan Hayward <alan.hayward@arm.com>
5279
5280 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5281 null VQ.
5282
52832018-05-25 Maciej W. Rozycki <macro@mips.com>
5284
5285 * gdb.arch/mips-fpregset-core.exp: New test.
5286 * gdb.arch/mips-fpregset-core.c: New test source.
5287
52882018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5289
5290 PR server/23198
5291 * hostio.c (require_int): Do not report overflow for integers
5292 between 0xfffffff and 0x7fffffff.
5293
52942018-05-22 Maciej W. Rozycki <macro@mips.com>
5295
5296 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5297 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5298 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5299 functions.
5300 (the_low_target): Wire them.
5301
53022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5303
5304 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5305 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5306 mode. Call collect_register_by_name with vscr using
5307 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5308 (ppc_store_vrregset): Add and set vscr_offset variable as in
5309 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5310 vscr_offset.
5311
53122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5313
5314 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5315 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5316 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5317
53182018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5319
5320 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5321 (ppc_store_vsxregset): Likewise.
5322 (ppc_fill_vrregset): Likewise.
5323 (ppc_store_vrregset): Likewise.
5324 (ppc_fill_evrregset): Likewise.
5325 (ppc_store_evrregset): Likewise.
5326 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5327 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5328 needed.
5329
53302018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5331
5332 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5333 wordsize of the inferior. Call ppc_linux_target_wordsize.
5334
53352018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5336
5337 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5338 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5339 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5340 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5341 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5342 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5343 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5344 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5345 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5346 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5347 (tdesc_powerpc_e500l): Remove.
5348 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5349 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5350 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5351 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5352 linux-ppc-tdesc.h.
5353 (ppc_arch_setup): Remove target description matching code. Fill a
5354 ppc_linux_features struct and call ppc_linux_match_description
5355 with it.
5356
53572018-05-22 Maciej W. Rozycki <macro@mips.com>
5358
5359 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5360 width of the requested register exceeds the width of the
5361 `ptrace' data type.
5362 (mips_cannot_store_register): Likewise.
5363
53642018-05-21 Maciej W. Rozycki <macro@mips.com>
5365
5366 * linux-mips-low.c (mips_fetch_register): New function. Update
5367 preceding comment.
5368 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5369 (the_low_target): Wire `mips_fetch_register'.
5370
53712018-05-10 Joel Brobecker <brobecker@adacore.com>
5372
5373 * lynx-i386-low.c (LYNXOS_178): New macro.
5374 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5375 the layout on LynxOS-178.
5376 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5377 handle floating point registers that are not supported by
5378 LynxOS-178.
5379
53802018-05-10 Tom Tromey <tom@tromey.com>
5381
5382 * configure: Rebuild.
5383
53842018-05-10 Joel Brobecker <brobecker@adacore.com>
5385
5386 PR server/23158:
5387 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5388 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5389 Use it to set the expedite_regs field in the given tdesc.
5390 * x86-tdesc.h: New file.
5391 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5392 Adjust following the addition of the new expedite_regs parameter
5393 to init_target_desc.
5394 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5395 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5396 (i386_linux_read_description, amd64_linux_read_description):
5397 Adjust following the addition of the new expedite_regs parameter
5398 to init_target_desc.
5399 * lynx-i386-low.c: #include "x86-tdesc.h".
5400 (lynx_i386_arch_setup): Adjust following the addition of the new
5401 expedite_regs parameter to init_target_desc.
5402 * nto-x86-low.c: #include "x86-tdesc.h".
5403 (nto_x86_arch_setup): Adjust following the addition of the new
5404 expedite_regs parameter to init_target_desc.
5405 * win32-i386-low.c: #include "x86-tdesc.h".
5406 (i386_arch_setup): Adjust following the addition of the new
5407 expedite_regs parameter to init_target_desc.
5408
54092018-05-10 Joel Brobecker <brobecker@adacore.com>
5410
5411 PR server/23158:
5412 * win32-low.c (win32_create_inferior): Add call to my_wait
5413 setting last_status global.
5414
54152018-05-10 Joel Brobecker <brobecker@adacore.com>
5416
5417 PR server/23158:
5418 * win32-low.c (create_process): Only call gdb_tilde_expand if
5419 inferior_cwd is not NULL.
5420
54212018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5422
5423 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5424 registers to the cache if their values have changed.
5425 (i387_xsave_to_cache): Provide default values for x87 control
5426 registers when these features are available, but disabled.
5427 * regcache.c (supply_register_by_name_zeroed): New function.
5428 * regcache.h (supply_register_by_name_zeroed): Declare new
5429 function.
5430
54312018-05-07 Tom Tromey <tom@tromey.com>
5432
5433 * configure: Rebuild.
5434
54352018-05-04 Tom Tromey <tom@tromey.com>
5436
5437 * configure: Rebuild.
5438
54392018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5440 Pedro Alves <palves@redhat.com>
5441
5442 * linux-aarch64-low.c (aarch64_stopped_data_address):
5443 Likewise.
5444
54452018-04-27 Tom Tromey <tom@tromey.com>
5446
5447 * configure: Rebuild.
5448
54492018-04-23 Tom Tromey <tom@tromey.com>
5450
5451 * configure: Rebuild.
5452
54532018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5454
5455 * Makefile.in (depcomp): Add "..".
5456 (all_deps_files): New and use it.
5457
54582018-04-18 Alan Hayward <alan.hayward@arm.com>
5459
5460 * configure.srv (aarch64*-*-linux*): Don't include xml.
5461 (i[34567]86-*-cygwin*): Likewise.
5462 (i[34567]86-*-linux*): Likewise.
5463 (i[34567]86-*-lynxos*): Likewise.
5464 (i[34567]86-*-mingw32ce*): Likewise.
5465 (i[34567]86-*-mingw*): Likewise.
5466 (i[34567]86-*-nto*): Likewise.
5467 (tic6x-*-uclinux): Likewise.
5468 (x86_64-*-linux*): Likewise.
5469 (x86_64-*-mingw*): Likewise.
5470 (x86_64-*-cygwin*): Likewise.
5471
54722018-04-18 Alan Hayward <alan.hayward@arm.com>
5473
5474 * tdesc.c: Remove xml parameter.
5475
54762018-04-18 Alan Hayward <alan.hayward@arm.com>
5477
5478 * server.c (get_features_xml): Remove cast.
5479 * tdesc.c (void target_desc::accept): Fill in function.
5480 (tdesc_get_features_xml): Remove old xml creation.
5481 (print_xml_feature::visit_pre): Add xml vistor.
5482 * tdesc.h (struct target_desc): Make xmltarget mutable.
5483 (tdesc_get_features_xml): Remove declaration.
5484
54852018-04-18 Alan Hayward <alan.hayward@arm.com>
5486
5487 * tdesc.c (tdesc_architecture_name): Add new function.
5488 (tdesc_osabi_name): Likewise.
5489 (tdesc_get_features_xml): Use new functions.
5490
54912018-04-18 Alan Hayward <alan.hayward@arm.com>
5492
5493 * tdesc.c (tdesc_create_flags): Remove.
5494 (tdesc_add_flag): Likewise.
5495 (tdesc_named_type): Likewise.
5496 (tdesc_create_union): Likewise.
5497 (tdesc_create_struct): Likewise.
5498 (tdesc_create_vector): Likewise.
5499 (tdesc_add_bitfield): Likewise.
5500 (tdesc_add_field): Likewise.
5501 (tdesc_set_struct_size): Likewise.
5502
55032018-04-18 Alan Hayward <alan.hayward@arm.com>
5504
5505 * tdesc.c (~target_desc): Remove implictly deleted items.
5506 (init_target_desc): Iterate all features.
5507 (tdesc_get_features_xml): Use vector.
5508 (tdesc_create_feature): Create feature.
5509 * tdesc.h (tdesc_feature) Remove
5510 (target_desc): Add features.
5511
55122018-04-18 Alan Hayward <alan.hayward@arm.com>
5513
5514 * Makefile.in: Add common/tdesc.c
5515 * tdesc.c (init_target_desc): init all reg_defs from register
5516 vector.
5517 (tdesc_create_reg): Create tdesc_reg.
5518 * tdesc.h (tdesc_feature): Add register vector.
5519
55202018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5521
5522 * tdesc.h (struct target_desc) <features>: Change type to
5523 std::vector<std::string>.
5524 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5525 changes.
5526 (tdesc_get_features_xml): Likewise.
5527 (tdesc_create_feature): Likewise.
5528
55292018-03-26 Alan Hayward <alan.hayward@arm.com>
5530
5531 * regcache.c (find_register_by_number): Return a ref.
5532 (find_regno): Use references.
5533 (register_size): Likewise.
5534 (register_data): Likewise.
5535 * tdesc.c (target_desc::~target_desc): Remove free calls.
5536 (target_desc::operator==): Use std::vector compare.
5537 (init_target_desc): Use reference.
5538 (tdesc_create_reg): Use reg constructors.
5539 * tdesc.h (struct target_desc): Replace pointer with object.
5540
55412018-03-23 Alan Hayward <alan.hayward@arm.com>
5542
5543 * regcache.c (find_register_by_number): Make static.
5544 (find_regno): Use find_register_by_number
5545 * regcache.h (struct reg): Remove declaration.
5546
55472018-03-23 Alan Hayward <alan.hayward@arm.com>
5548
5549 * tdesc.c (target_desc::~target_desc): Move to here.
5550 (target_desc::operator==): Likewise.
5551 * tdesc.h (target_desc::~target_desc): Move from here.
5552 (target_desc::operator==): Likewise.
5553
55542018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5555
5556 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5557
55582018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5559
5560 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5561 S390_TDESC_GS.
5562 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5563 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5564 and init_registers_s390_gs_linux64.
5565
55662018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5567
5568 * linux-s390-low.c (s390_fill_gs): Remove function.
5569 (s390_fill_gsbc): Remove function.
5570 (s390_regsets): Set fill functions for the guarded storage regsets
5571 to NULL.
5572
55732018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5574
5575 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5576 the word size. Add comment.
5577 (s390_get_wordsize): New function.
5578 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5579 pswm with it. Instead, use s390_get_wordsize to determine the
5580 word size first and derive the correct tdesc from that directly.
5581
55822018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5583
5584 * Makefile.in: Include silent-rules.mk.
5585 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5586 (COMPILE): Add ECHO_CXX.
5587 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5588 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5589 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5590 (version-generated.c): Add ECHO_GEN.
5591 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5592 (IPAGENT_COMPILE): Add ECHO_CXX.
5593 (%-generated.c): Add ECHO_REGDAT.
5594
55952018-03-14 Tom Tromey <tom@tromey.com>
5596
5597 PR cli/14977:
5598 * ax.c (ax_printf): Special case for NULL.
5599
56002018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5601
5602 * linux-low.c (linux_qxfer_libraries_svr4): Use
5603 xml_escape_text_append.
5604
56052018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5606
5607 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5608
56092018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5610
5611 * server.c (handle_general_set): Remove unnecessary xstrdup.
5612
56132018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5614
5615 * server.c (parse_debug_format_options): Adjust to
5616 delim_string_to_char_ptr_vec changes.
5617 * thread-db.c (thread_db_load_search): Adjust to
5618 dirnames_to_char_ptr_vec changes.
5619
56202018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5621
5622 * target.h (target_enable_btrace, target_disable_btrace)
5623 (target_read_btrace, target_read_btrace_conf): Turn macro into
5624 inline function. Throw error if target method is not defined.
5625 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5626 check for btrace target method. Be prepared to handle exceptions
5627 from btrace target methods.
5628
56292018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5630
5631 * server.c (captured_main): Change order of error message printed
5632 when the current working directory cannot be found.
5633
56342018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5635
5636 * server.c: Include "filenames.h" and "pathstuff.h".
5637 (program_name): Delete variable.
5638 (program_path): New anonymous class.
5639 (get_exec_wrapper): Use "program_path" instead of
5640 "program_name".
5641 (handle_v_run): Likewise.
5642 (captured_main): Likewise.
5643 (process_serial_event): Likewise.
5644
56452018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5646
5647 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5648 (OBJS): Add "pathstuff.o".
5649 * server.c (current_directory): New global variable.
5650 (captured_main): Initialize "current_directory".
5651
56522018-02-26 Alan Hayward <alan.hayward@arm.com>
5653
5654 * tdesc.c: Use common/tdesc.h.
5655 * tdesc.h: Likewise.
5656
56572018-02-20 Alan Hayward <alan.hayward@arm.com>
5658 Simon Marchi <simon.marchi@ericsson.com>
5659
5660 * Makefile.in: Switch order of make rules.
5661
56622018-02-19 Alan Hayward <alan.hayward@arm.com>
5663
5664 * Makefile.in: Add common directory in build.
5665 * configure.ac: Add common reference.
5666 * configure: Regenerate.
5667
56682018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5669
5670 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5671 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5672 * spu-low.c (spu_target_ops): Likewise.
5673 * win32-low.c (win32_target_ops): Likewise.
5674 * server.c (supported_btrace_packets): Report packets unconditionally.
5675 * target.h (target_ops) <supports_btrace>: Remove.
5676 (target_supports_btrace): Remove.
5677
56782018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5679
5680 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5681 (handle_btrace_disable): Change return type to void. Use exceptions
5682 to report errors.
5683 (handle_btrace_general_set): Catch exception and copy message to
5684 return message.
5685
56862018-02-08 Tom Tromey <tom@tromey.com>
5687
5688 * linux-low.c (install_software_single_step_breakpoints): Use
5689 make_scoped_restore.
5690 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5691 (do_restore_current_thread_cleanup): Remove.
5692 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5693 declare.
5694
56952018-02-08 Tom Tromey <tom@tromey.com>
5696
5697 * mem-break.c (set_raw_breakpoint_at): Use
5698 gdb::unique_xmalloc_ptr.
5699
57002018-01-30 Pedro Alves <palves@redhat.com>
5701
5702 PR gdb/13211
5703 * target.c (target_terminal::terminal_state): Rename to ...
5704 (target_terminal::m_terminal_state): ... this.
5705
57062018-01-19 James Clarke <jrtc27@jrtc27.com>
5707
5708 * linux-low.c (handle_extended_wait): Surround call to
5709 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5710
57112018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5712
5713 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5714 linux_ptrace_attach_fail_reason_string now returning an
5715 std::string.
5716 (linux_attach): Likewise.
5717 * thread-db.c (attach_thread): Likewise.
5718
57192018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5720
5721 PR gdb/21559
5722 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5723 checking for fs_base/gs_base fields in struct user_regs_struct.
5724 * configure: Regenerate.
5725
57262018-01-16 Yao Qi <yao.qi@linaro.org>
5727
5728 PR gdb/18749
5729 * linux-low.c (fetch_register): Call supply_register instead of
5730 error.
5731
57322018-01-08 Yao Qi <yao.qi@linaro.org>
5733 Simon Marchi <simon.marchi@ericsson.com>
5734
5735 * Makefile.in (OBS): Remove selftest.o.
5736 * configure.ac: Set srv_selftest_objs if $development is true.
5737 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5738 * configure: Re-generated.
5739 * server.c (captured_main): Wrap variable selftest_filter with
5740 GDB_SELF_TEST.
5741
57422018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5743
5744 * server.c (parse_debug_format_options): Return std::string.
5745 (handle_monitor_command, captured_main): Adjust.
5746
57472018-01-05 Pedro Alves <palves@redhat.com>
5748
5749 PR gdb/18653
5750 * server.c (captured_main): Pass quiet=false to
5751 save_original_signals_state.
5752
57532018-01-01 Joel Brobecker <brobecker@adacore.com>
5754
5755 * gdbreplay.c (gdbreplay_version): Update copyright year in
5756 version message.
5757 * server.c (gdbserver_version): Likewise.
5758
57592017-12-08 Tom Tromey <tom@tromey.com>
5760
5761 * ax.c (ax_printf): Update.
5762
57632017-12-07 Yao Qi <yao.qi@linaro.org>
5764
5765 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5766 aarch64_linux_read_description.
5767 * linux-amd64-ipa.c (idx2mask): New array.
5768 (get_ipa_tdesc): Move idx2mask out.
5769 (initialize_low_tracepoint): Initialize target descriptions.
5770 * linux-i386-ipa.c (idx2mask): New array.
5771 (get_ipa_tdesc): Move idx2mask out.
5772 (initialize_low_tracepoint): Initialize target descriptions.
5773
57742017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5775
5776 * tdesc.c (struct tdesc_type): Change return type.
5777 (tdesc_add_flag): Change parameter type.
5778 (tdesc_add_bitfield): Likewise.
5779 (tdesc_add_field): Likewise.
5780 (tdesc_set_struct_size): Likewise.
5781
57822017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5783
5784 * regcache.c (registers_to_string): Remove unused variable.
5785
57862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5787
5788 * inferiors.c (for_each_inferior_with_data): Remove.
5789 * inferiors.h (for_each_inferior_with_data): Remove.
5790 * server.c (handle_qxfer_threads_worker): Change parameter type.
5791 (handle_qxfer_threads_proper): Use for_each_thread.
5792
57932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5794
5795 * inferiors.c (for_each_inferior): Remove.
5796 (clear_inferiors): Use for_each_thread.
5797 * inferiors.h (for_each_inferior): Remove.
5798 * linux-low.c (linux_wait_for_event_filtered): Use
5799 for_each_thread.
5800 (linux_stabilize_threads): Likewise.
5801 * regcache.c (regcache_release): Likewise.
5802 * server.c (gdb_wants_all_threads_stopped): Likewise.
5803 (clear_pending_status_callback): Remove.
5804 (handle_status): Use for_each_thread.
5805 (captured_main): Likewise.
5806 * win32-low.c (child_init_thread_list): Likewise.
5807 (win32_clear_inferiors): Likewise.
5808 (fake_breakpoint_event): Likewise.
5809
58102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5811
5812 * inferiors.h (find_inferior): Remove.
5813 * inferiors.c (find_inferior): Remove.
5814
58152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5816
5817 * linux-low.c (resume_status_pending_p): Update comment.
5818 (need_step_over_p): Update comment.
5819
58202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5821
5822 * linux-low.c (proceed_one_lwp): Return void, change parameter
5823 type.
5824 (unsuspend_and_proceed_one_lwp): Likewise.
5825 (proceed_all_lwps): Use for_each_thread.
5826 (unstop_all_lwps): Likewise.
5827
58282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5829
5830 * linux-low.c (linux_resume_one_thread): Return void, take
5831 parameter directly.
5832 (linux_resume): Use for_each_thread.
5833
58342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5835
5836 * linux-low.c (send_sigstop_callback): Return void, change
5837 parameter type. Rename to...
5838 (send_sigstop): ... this.
5839 (suspend_and_send_sigstop_callback): Return void, change parameter
5840 type. Rename to...
5841 (suspend_and_send_sigstop): ... this.
5842 (stop_all_lwps): Use for_each_thread.
5843
58442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5845
5846 * linux-low.c (lwp_running): Return bool, remove unused
5847 argument.
5848 (linux_stabilize_threads): Use find_thread.
5849
58502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5851
5852 * linux-low.c (select_singlestep_lwp_callback): Remove.
5853 (count_events_callback): Remove.
5854 (select_event_lwp_callback): Remove.
5855 (select_event_lwp): Use find_thread/for_each_thread.
5856
58572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5858
5859 * linux-low.c (not_stopped_callback): Return bool, take filter
5860 argument directly.
5861 (linux_wait_for_event_filtered): Use find_thread.
5862 (linux_wait_1): Likewise.
5863
58642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5865
5866 * linux-low.c (same_lwp): Remove.
5867 (find_lwp_pid): Use find_thread.
5868
58692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5870
5871 * linux-low.c (delete_lwp_callback): Remove.
5872 (linux_mourn): Use for_each_thread.
5873
58742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5875
5876 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5877 args parameter, don't check for pid.
5878 (linux_detach): Use for_each_thread.
5879
58802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5881
5882 * linux-low.c (struct counter): Remove.
5883 (second_thread_of_pid_p): Remove.
5884 (last_thread_of_process_p): Use find_thread.
5885
58862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5887
5888 * inferiors.c (find_inferior_in_random): Remove.
5889 * inferiors.h (find_inferior_in_random): Remove.
5890 * linux-low.c (status_pending_p_callback): Return bool, accept
5891 parameter ptid directly.
5892 (linux_wait_for_event_filtered): Use find_thread_in_random.
5893 (linux_wait_1): Likewise.
5894
58952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5896
5897 * inferiors.c (find_inferior_id): Remove.
5898 (find_thread_ptid): Move implemention from find_inferior_id to
5899 here.
5900 * inferiors.h (find_inferior_id): Remove.
5901 * server.c (handle_status): Use find_thread_ptid.
5902 (process_serial_event): Likewise.
5903 * thread-db.c (find_one_thread): Likewise.
5904 (thread_db_thread_handle): Likewise.
5905 * win32-low.c (thread_rec): Likewise.
5906 (child_delete_thread): Likewise.
5907 (win32_thread_alive): Likewise.
5908 (get_child_debug_event): Likewise.
5909
59102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5911
5912 * linux-mips-low.c (update_watch_registers_callback): Return
5913 void, remove pid_p parameter, don't check for pid.
5914 (mips_insert_point, mips_remove_point): Use for_each_thread.
5915
59162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5917
5918 * lynx.low (lynx_delete_thread_callback): Remove.
5919 (lynx_mourn): Use for_each_thread.
5920
59212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5922
5923 * regcache.c (regcache_invalidate_one): Remove.
5924 (regcache_invalidate_pid): use for_each_thread.
5925
59262017-11-26 Tom Tromey <tom@tromey.com>
5927
5928 * linux-low.c (linux_create_inferior): Update.
5929
59302017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5931
5932 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5933
59342017-11-24 Alan Hayward <alan.hayward@arm.com>
5935
5936 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5937 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5938 * linux-aarch64-tdesc-selftest.c: New file.
5939 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5940
59412017-11-24 Alan Hayward <alan.hayward@arm.com>
5942
5943 * configure.srv: Add new file.
5944 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5945 * linux-aarch64-tdesc-selftest.c: New file.
5946 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5947
59482017-11-24 Alan Hayward <alan.hayward@arm.com>
5949
5950 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5951 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5952 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5953
59542017-11-24 Alan Hayward <alan.hayward@arm.com>
5955
5956 * configure.srv: Add new files.
5957 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5958 aarch64_linux_read_description.
5959 * linux-aarch64-low.c (aarch64_linux_read_description):
5960 Merge with aarch64_arch_setup.
5961 (aarch64_arch_setup): Call aarch64_linux_read_description.
5962 * linux-aarch64-tdesc.c: New file.
5963 * linux-aarch64-tdesc.h: New file.
5964
59652017-11-24 Yao Qi <yao.qi@linaro.org>
5966
5967 * configure.srv: Set $srv_regobj for tic6x-linux.
5968 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5969 (tic6x_read_description): Move some code to tic6x_arch_setup.
5970 (tic6x_tdesc_test): New function.
5971 (initialize_low_arch): Call selftests::register_test.
5972
59732017-11-22 Yao Qi <yao.qi@linaro.org>
5974
5975 * remote-utils.c (prepare_resume_reply): Use memcpy.
5976
59772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5978
5979 * linux-low.c (kill_one_lwp_callback): Return void, take
5980 argument directly, don't filter on pid.
5981 (linux_kill): Use for_each_thread.
5982
59832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5984
5985 * linux-low.c (need_step_over_p): Return bool, remove dummy
5986 argument.
5987 (linux_resume, proceed_all_lwps): Use find_thread.
5988
59892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5990
5991 * linux-low.c (resume_status_pending_p): Return bool, remove
5992 flag_p argument.
5993 (linux_resume): Use find_thread.
5994
59952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5996
5997 * linux-low.c (struct thread_resume_array): Remove.
5998 (linux_set_resume_request): Return void, take arguments
5999 directly.
6000 (linux_resume): Use for_each_thread.
6001
60022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6003
6004 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6005 return bool, remove data argument.
6006 (linux_stabilize_threads): Use find_thread.
6007
60082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6009
6010 * linux-low.c (unsuspend_one_lwp): Remove.
6011 (unsuspend_all_lwps): Use for_each_thread, inline code from
6012 unsuspend_one_lwp.
6013
60142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6015
6016 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6017 * linux-low.c (struct iterate_over_lwps_args): Remove.
6018 (iterate_over_lwps_filter): Remove.
6019 (iterate_over_lwps): Use find_thread.
6020
60212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6022
6023 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6024 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6025 code from reset_lwp_ptrace_options_callback.
6026
60272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6028
6029 * linux-arm-low.c (struct update_registers_data): Remove.
6030 (update_registers_callback): Return void, take arguments
6031 directly, don't check thread's pid.
6032 (arm_insert_point, arm_remove_point): Use for_each_thread.
6033
60342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6035
6036 * win32-low.c (continue_one_thread): Return void, take argument
6037 directly.
6038 (child_continue): Use for_each_thread.
6039
60402017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6041
6042 * win32-i386-low.c (update_debug_registers_callback): Rename
6043 to ...
6044 (update_debug_registers): ... this, return void, remove pid_p arg.
6045 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6046
60472017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6048
6049 * inferiors.h (struct process_info): Add constructor, initialize
6050 fields..
6051 <syscalls_to_catch>: Change type to std::vector<int>.
6052 * inferiors.c (add_process): Allocate process_info with new.
6053 (remove_process): Free process_info with delete.
6054 * linux-low.c (handle_extended_wait): Adjust.
6055 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6056 * server.c (handle_general_set): Adjust.
6057
60582017-11-16 Pedro Alves <palves@redhat.com>
6059
6060 * remote-utils.c (remote_close): Block SIGIO signals instead of
6061 uninstalling the SIGIO handler.
6062
60632017-11-16 Alan Hayward <alan.hayward@arm.com>
6064
6065 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6066
60672017-11-16 Yao Qi <yao.qi@linaro.org>
6068
6069 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6070 (tic6x_store_gregset): Likewise.
6071 (tic6x_usrregs_info): Move it up.
6072
60732017-11-15 Alan Hayward <alan.hayward@arm.com>
6074
6075 * Makefile.in: Update arch rules.
6076 * configure.srv: Explicitly mark arch/ files.
6077
60782017-11-13 Andreas Schwab <schwab@suse.de>
6079
6080 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6081 function.
6082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6083
60842017-11-06 Pedro Alves <palves@redhat.com>
6085
6086 * config.in, configure: Regenerate.
6087
60882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6089
6090 * target.c (struct thread_search): Remove.
6091 (thread_search_callback): Remove.
6092 (prepare_to_access_memory): Use for_each_thread instead of
6093 find_inferior. Inline code from thread_search_callback.
6094
60952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6096
6097 * server.c (struct visit_actioned_threads_data): Remove.
6098 (visit_actioned_threads): Change prototype to take arguments
6099 directly.
6100 (resume): Use find_thread instead of find_inferior.
6101
61022017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6103
6104 * server.c (queue_stop_reply_callback): Change prototype, return
6105 void.
6106 (find_status_pending_thread_callback): Remove.
6107 (handle_status): Replace find_inferior with find_thread and
6108 for_each_thread.
6109
61102017-10-25 Alan Hayward <alan.hayward@arm.com>
6111
6112 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6113 with REGNO.
6114 (aarch64_store_gregset): Likewise.
6115 (aarch64_fill_fpregset): Likewise.
6116 (aarch64_store_fpregset): Likewise.
6117
61182017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6119
6120 * gdbthread.h (find_thread, for_each_thread): New functions.
6121 * inferiors.c (thread_of_pid): Remove.
6122 (find_any_thread_of_pid): Use find_thread.
6123 * linux-low.c (num_lwps): Use for_each_thread.
6124
61252017-10-17 Yao Qi <yao.qi@linaro.org>
6126
6127 * Makefile.in: Remove one rule.
6128 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6129
61302017-10-17 Yao Qi <yao.qi@linaro.org>
6131
6132 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6133 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6134
61352017-10-17 Yao Qi <yao.qi@linaro.org>
6136
6137 * configure.srv: Rename arm.o with arch/arm.o.
6138
61392017-10-17 Yao Qi <yao.qi@linaro.org>
6140
6141 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6142 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6143 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6144 (arch-i386.o, arch-amd64.o): Remove rules.
6145 (arch/%.o): New rule.
6146 Update POSTCOMPILE and COMPILE.pre.
6147 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6148 * configure: Re-generated.
6149 * configure.srv: Replace arch-i386.o with arch/i386.o.
6150 Replace arch-amd64.o with arch/amd64.o.
6151
61522017-10-16 Yao Qi <yao.qi@linaro.org>
6153
6154 * configure: Regenerated.
6155
61562017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6157
6158 * inferiors.h: (struct inferior_list): Remove.
6159 (struct inferior_list_entry); Remove.
6160 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6161 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6162 get_first_inferior): Remove.
6163 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6164 find_inferior_id, find_inferior_in_random): Change signature.
6165 * inferiors.c (all_threads): Change type to
6166 std::list<thread_info *>.
6167 (get_thread): Remove macro.
6168 (find_inferior, find_inferior_id): Change signature, implement
6169 using find_thread.
6170 (find_inferior_in_random): Change signature, implement using
6171 find_thread_in_random.
6172 (for_each_inferior, for_each_inferior_with_data): Change
6173 signature, implement using for_each_thread.
6174 (add_inferior_to_list, remove_inferior): Remove.
6175 (add_thread, get_first_thread, thread_of_pid,
6176 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6177 (get_first_inferior, one_inferior_p, clear_inferior_list):
6178 Remove.
6179 (clear_inferiors, get_thread_process): Update.
6180 * gdbthread.h: Include <list>.
6181 (struct thread_info) <entry>: Remove field.
6182 <id>: New field.
6183 (all_threads): Change type to std::list<thread_info *>.
6184 (get_first_inferior): Add doc.
6185 (find_thread, for_each_thread, find_thread_in_random): New
6186 functions.
6187 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6188 * linux-arm-low.c (update_registers_callback): Update.
6189 * linux-low.c (second_thread_of_pid_p): Update.
6190 (kill_one_lwp_callback, linux_detach_lwp_callback,
6191 delete_lwp_callback, status_pending_p_callback, same_lwp,
6192 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6193 iterate_over_lwps, not_stopped_callback,
6194 resume_stopped_resumed_lwps, count_events_callback,
6195 select_singlestep_lwp_callback, select_event_lwp_callback,
6196 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6197 suspend_and_send_sigstop_callback, wait_for_sigstop,
6198 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6199 lwp_running, linux_set_resume_request, resume_status_pending_p,
6200 need_step_over_p, start_step_over, linux_resume_one_thread,
6201 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6202 reset_lwp_ptrace_options_callback): Update.
6203 * linux-mips-low.c (update_watch_registers_callback): Update.
6204 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6205 Update.
6206 (free_register_cache_thread_one): Remove.
6207 (regcache_release): Update.
6208 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6209 handle_qxfer_threads_worker): Update.
6210 (handle_query): Update, use list iterator.
6211 (visit_actioned_threads, handle_pending_status,
6212 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6213 clear_pending_status_callback, set_pending_status_callback,
6214 find_status_pending_thread_callback, handle_status,
6215 process_serial_event): Update.
6216 * target.c (thread_search_callback): Update.
6217 * thread-db.c (thread_db_get_tls_address): Update.
6218 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6219 Update.
6220 * win32-i386-low.c (update_debug_registers_callback): Update.
6221 * win32-low.c (delete_thread_info, child_delete_thread,
6222 continue_one_thread, suspend_one_thread,
6223 get_child_debug_event): Adjust.
6224
62252017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6226
6227 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6228 * inferiors.h: Include <list>.
6229 (struct process_info) <entry>: Remove field.
6230 <pid>: New field.
6231 (pid_of): Change macro to function.
6232 (ptid_of, lwpid_of): Remove macro.
6233 (all_processes): Change type to std::list<process_info *>.
6234 (ALL_PROCESSES): Remove macro.
6235 (for_each_process, find_process): New function.
6236 * inferiors.c (all_processes): Change type to
6237 std::list<process_info *>.
6238 (find_thread_process): Adjust.
6239 (add_process): Likewise.
6240 (remove_process): Likewise.
6241 (find_process_pid): Likewise.
6242 (get_first_process): Likewise.
6243 (started_inferior_callback): Remove.
6244 (have_started_inferiors_p): Adjust.
6245 (attached_inferior_callback): Remove.
6246 (have_attached_inferiors_p): Adjust.
6247 * linux-low.c (check_zombie_leaders): Likewise.
6248 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6249 (x86_linux_update_xmltarget): Adjust.
6250 * server.c (handle_query): Likewise.
6251 (gdb_reattached_process): Remove.
6252 (handle_status): Adjust.
6253 (kill_inferior_callback): Likewise.
6254 (detach_or_kill_inferior): Remove.
6255 (print_started_pid): Likewise.
6256 (print_attached_pid): Likewise.
6257 (detach_or_kill_for_exit): Update.
6258 (process_serial_event): Likewise.
6259 * linux-arm-low.c (arm_new_fork): Likewise.
6260
62612017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6262
6263 * dll.h: Include <list>.
6264 (struct dll_info): Add constructor.
6265 <entry>: Remove field.
6266 (all_dlls): Change type to std::list<dll_info>.
6267 * dll.c: Include <algorithm>.
6268 (get_dll): Remove macro.
6269 (all_dlls): Change type to std::list<dll_info *>.
6270 (free_one_dll): Remove.
6271 (match_dll): Likewise.
6272 (loaded_dll): Adjust.
6273 (unloaded_dll): Adjust to all_dlls type change, use
6274 std::find_if. Inline code from match_dll.
6275 (clear_dlls): Adjust to all_dlls type change.
6276 * server.c (emit_dll_description): Remove.
6277 (handle_qxfer_libraries): Adjust to all_dlls type change,
6278 integrate emit_dll_description's functionality.
6279
62802017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6281
6282 * linux-low.h (struct linux_target_ops) <delete_process>: New
6283 field.
6284 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6285 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6286 (struct linux_target_ops): Add delete_process callback.
6287 * linux-arm-low.c (arm_delete_process): New.
6288 (struct linux_target_ops): Add delete_process callback.
6289 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6290 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6291 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6292 * linux-mips-low.c (mips_linux_delete_process): New.
6293 (struct linux_target_ops): Add delete_process callback.
6294 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6295 * linux-s390-low.c (struct linux_target_ops): Likewise.
6296 * linux-sh-low.c (struct linux_target_ops): Likewise.
6297 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6298 * linux-tile-low.c (struct linux_target_ops): Likewise.
6299 * linux-x86-low.c (x86_linux_delete_process): New.
6300 (struct linux_target_ops): Add delete_process callback.
6301 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6302
63032017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6304
6305 * linux-aarch64-low.c (the_low_target): Add thread delete
6306 callback.
6307 * linux-arm-low.c (arm_delete_thread): New function.
6308 (the_low_target): Add thread delete callback.
6309 * linux-bfin-low.c (the_low_target): Likewise.
6310 * linux-crisv32-low.c (the_low_target): Likewise.
6311 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6312 set.
6313 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6314 field.
6315 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6316 * linux-mips-low.c (mips_linux_delete_thread): New function.
6317 (the_low_target): Add thread delete callback.
6318 * linux-ppc-low.c (the_low_target): Likewise.
6319 * linux-s390-low.c (the_low_target): Likewise.
6320 * linux-sh-low.c (the_low_target): Likewise.
6321 * linux-tic6x-low.c (the_low_target): Likewise.
6322 * linux-tile-low.c (the_low_target): Likewise.
6323 * linux-x86-low.c (the_low_target): Likewise.
6324 * linux-xtensa-low.c (the_low_target): Likewise.
6325
63262017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6327
6328 * win32-low.c: Include "common-inferior.h".
6329
63302017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6331
6332 * inferiors.c (set_inferior_cwd): New function.
6333 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6334 (handle_query): Inform that QSetWorkingDir is supported.
6335 * win32-low.c (create_process): Pass the inferior's cwd to
6336 CreateProcess.
6337
63382017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6339
6340 * inferiors.c (current_inferior_cwd): New global variable.
6341 (get_inferior_cwd): New function.
6342 * inferiors.h (struct process_info) <cwd>: New field.
6343
63442017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6345
6346 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6347 (OBS): Add gdb_tilde_expand.o.
6348
63492017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6350
6351 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6352 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6353
63542017-09-29 Pedro Alves <palves@redhat.com>
6355
6356 * ax.c (gdb_parse_agent_expr): Constify.
6357 * ax.h (gdb_parse_agent_expr): Constify.
6358 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6359 Constify.
6360 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6361 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6362 * remote-utils.h (read_ptid): Constify.
6363 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6364 (process_point_options, process_serial_event): Constify.
6365 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6366 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6367 (cmd_qtbuffer): Constify.
6368
63692017-09-29 Pedro Alves <palves@redhat.com>
6370
6371 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6372 fails.
6373
63742017-09-29 Pedro Alves <palves@redhat.com>
6375
6376 * linux-low.c (handle_extended_wait): Pass parent thread instead
6377 of process to thread_db_notice_clone.
6378 * linux-low.h (thread_db_notice_clone): Replace parent process
6379 parameter with parent thread parameter.
6380 * thread-db.c (find_one_thread): Add comment.
6381 (thread_db_notice_clone): Replace parent process parameter with
6382 parent thread parameter. Temporarily switch to the parent thread.
6383
63842017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6385
6386 * gdbthread.h: Include "common-gdbthread.h".
6387 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6388 "if" when validating the ptid.
6389 * remote-utils.c: Include "gdbthread.h".
6390 (prepare_resume_reply): Use "switch_to_thread".
6391 * target.c (done_accessing_memory): Likewise.
6392
63932017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6394
6395 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6396 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6397 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6398 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6399 s390x-gs-linux64-ipa.o to ipa_obj.
6400 * linux-s390-low.c (HWCAP_S390_GS): New define.
6401 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6402 New functions.
6403 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6404 (s390_arch_setup): Check for guarded-storage support and choose
6405 appropriate tdesc.
6406 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6407 init_registers_s390x_gs_linux64.
6408 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6409 enum value.
6410 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6411 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6412
64132017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6414
6415 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6416
64172017-09-21 Kevin Buettner <kevinb@redhat.com>
6418
6419 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6420 (thread_db_thread_handle): Declare.
6421 * linux-low.c (linux_target_ops): Initialize thread_handle.
6422 * server.c (handle_qxfer_threads_worker): Add support for
6423 "handle" attribute.
6424 * target.h (struct target_ops): Add new function pointer,
6425 thread_handle.
6426 (target_thread_handle): Define.
6427 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6428 field in lwp.
6429 (thread_db_thread_handle): New function.
6430
64312017-09-21 Kevin Buettner <kevinb@redhat.com>
6432
6433 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6434 * linux-low.h (thread_db_notice_clone): Declare.
6435 * thread-db.c (thread_db_notice_clone): New function.
6436
64372017-09-21 Pedro Alves <palves@redhat.com>
6438
6439 * server.c (gdb_read_memory, handle_status, process_serial_event)
6440 (handle_serial_event, handle_target_event): Adjust to
6441 set_desired_thread prototype change.
6442 * target.c (set_desired_thread): Remove 'use_general' parameter
6443 and adjust.
6444 * target.h (set_desired_thread): Remove 'use_general' parameter.
6445
64462017-09-20 Tom Tromey <tom@tromey.com>
6447
6448 * target.c (target_terminal::terminal_state): Define.
6449 (target_terminal::init): Rename from target_terminal_init.
6450 (target_terminal::inferior): Rename from
6451 target_terminal_inferior.
6452 (target_terminal::ours): Rename from target_terminal_ours.
6453 (target_terminal::ours_for_output, target_terminal::info): New.
6454
64552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6456
6457 * server.c (accumulate_file_name_length): Remove.
6458 (emit_dll_description): Adjust to std::string change.
6459 (handle_qxfer_libraries): Use std::string to hold document.
6460
64612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6462
6463 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6464 return type of xml_escape_text.
6465 * server.c (emit_dll_description): Likewise.
6466
64672017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6468
6469 * server.c (captured_main): Accept argument for --selftest.
6470 Update run_tests call.
6471 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6472 when registering selftests.
6473
64742017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6475
6476 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6477 instead of "VEC" for "target_desc.reg_defs".
6478 (regcache_cpy): Likewise.
6479 (registers_to_string): Likewise.
6480 (registers_from_string): Likewise.
6481 (find_regno): Likewise.
6482 (supply_regblock): Likewise.
6483 (regcache_raw_read_unsigned): Likewise.
6484 * tdesc.c (init_target_desc): Likewise.
6485 (tdesc_create_reg): Likewise.
6486 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6487 (struct target_desc) <reg_defs>: Convert to "std::vector".
6488 (target_desc): Do not initialize "reg_defs".
6489 (~target_desc): Update code to use "std::vector" instead of "VEC"
6490 for "target_desc.reg_defs".
6491 (operator==): Likewise.
6492
64932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6494
6495 * inferiors.h (thread_to_gdb_id): Remove.
6496 * inferiors.c (thread_to_gdb_id): Remove.
6497 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6498 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6499 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6500 Likewise.
6501 * nto-low.c (nto_fetch_registers, nto_store_registers,
6502 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6503
65042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6505
6506 * inferiors.h (gdb_id_to_thread_id): Remove.
6507 * inferiors.c (gdb_id_to_thread_id): Remove.
6508 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6509 removal. Move pid declaration closer to where it's used.
6510
65112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6512
6513 * server.c (handle_detach): New function.
6514 (process_serial_event): Move code out, call handle_detach.
6515
65162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6517
6518 * server.c (require_running): Rename to ...
6519 (require_running_or_return): ... this ...
6520 (require_running_or_break): ... and this.
6521 (handle_query, process_serial_event): Adjust.
6522
65232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6524
6525 * linux-low.c (linux_set_resume_request): Remove unused
6526 variables.
6527
65282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6529
6530 * server.c (first_thread_of): Remove.
6531 (process_serial_event): Replace usage of first_thread_of with
6532 find_any_thread_of_pid.
6533 * tracepoint.c (same_process_p): Remove.
6534 (gdb_agent_about_to_close): Replace usage of same_process_p with
6535 find_any_thread_of_pid.
6536 * linux-x86-low.c (same_process_callback): Remove.
6537 (x86_arch_setup_process_callback): Replace usage of
6538 same_process_callback with find_any_thread_of_pid.
6539 * thread-db.c (any_thread_of): Remove.
6540 (switch_to_process): Replace usage of any_thread_of with
6541 find_any_thread_of_pid.
6542 * inferiors.c (thread_pid_matches_callback): Remove.
6543 (find_thread_process): Adjust to use find_any_thread_of_pid.
6544
65452017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6546
6547 * regcache.c (get_thread_regcache): Guard calls to "memset"
6548 with "!VEC_empty".
6549
65502017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6551
6552 * linux-low.c (handle_extended_wait): Use
6553 "allocate_target_description" instead of "XNEW".
6554 * linux-x86-low.c (initialize_low_arch): Likewise.
6555
65562017-09-05 Yao Qi <yao.qi@linaro.org>
6557
6558 * configure.srv (srv_i386_regobj): Remove.
6559 (srv_amd64_regobj): Remove.
6560 (srv_regobj): Set it to "" for x86 non-linux targets.
6561 * linux-x86-tdesc.c (i386_linux_read_description):
6562 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6563 (init_registers_i386): Remove the declaration.
6564 (tdesc_i386): Remove the declaration.
6565 (lynx_i386_arch_setup): Call i386_create_target_description.
6566 * nto-x86-low.c: Likewise.
6567 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6568 [!__x86_64__]: include arch/i386.h.
6569 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6570
65712017-09-05 Yao Qi <yao.qi@linaro.org>
6572
6573 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6574 i386/amd64-XXX-linux from it.
6575
65762017-09-05 Yao Qi <yao.qi@linaro.org>
6577
6578 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6579 false.
6580 (ipa_amd64_linux_regobj): Remove.
6581 (ipa_x32_linux_regobj): Remove.
6582
65832017-09-05 Yao Qi <yao.qi@linaro.org>
6584
6585 * Makefile.in (arch-amd64.o): New rule.
6586 * configure.srv: Append arch-amd64.o.
6587 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6588 (get_ipa_tdesc): Call amd64_linux_read_description.
6589 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6590 and init_registers_amd64_XXX.
6591 * linux-x86-low.c (x86_linux_read_description): Call
6592 amd64_linux_read_description.
6593 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6594 (initialize_low_arch): Don't call init_registers_x32_XXX and
6595 init_registers_amd64_XXX.
6596 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6597 and tdesc_amd64_XXX.
6598 [__x86_64__] (amd64_tdesc_test): New function.
6599 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6600 and init_registers_amd64_XXX.
6601 * linux-x86-tdesc.c: Include arch/amd64.h.
6602 (xcr0_to_tdesc_idx): New function.
6603 (i386_linux_read_description): New function.
6604 (amd64_get_ipa_tdesc_idx): New function.
6605 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6606 (amd64_get_ipa_tdesc): Declare.
6607
66082017-09-05 Yao Qi <yao.qi@linaro.org>
6609
6610 * configure.srv (srv_i386_linux_xmlfiles): Remove
6611 i386/i386-XXX-linux.xml from it.
6612
66132017-09-05 Yao Qi <yao.qi@linaro.org>
6614
6615 * configure.srv: Set srv_i386_linux_regobj empty if $development
6616 is false.
6617 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6618 initialize_low_tdesc.
6619 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6620 with #if initialize_low_tdesc.
6621 * linux-x86-tdesc-selftest.c: New file.
6622 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6623
66242017-09-05 Yao Qi <yao.qi@linaro.org>
6625
6626 * Makefile.in (arch-i386.o): New rule.
6627 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6628 (x86_64-*-linux*): Likewise.
6629 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6630 include arch/i386.h.
6631 (i386_linux_read_description): Remove code and call
6632 i386_create_target_description.
6633 * tdesc.c (allocate_target_description): New function.
6634 * tdesc.h (set_tdesc_architecture): Remove declaration.
6635 (set_tdesc_osabi): Likewise.
6636
66372017-09-05 Yao Qi <yao.qi@linaro.org>
6638
6639 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6640 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6641 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6642 .xmltarget.
6643 * server.c (get_features_xml): Call tdesc_get_features_xml.
6644 * tdesc.c (set_tdesc_architecture): New function.
6645 (set_tdesc_osabi): New function.
6646 (tdesc_get_features_xml): New function.
6647 (tdesc_create_feature): Add an argument.
6648 * tdesc.h (struct target_desc) <features>: New field.
6649 <arch, osabi>: New field.
6650 (~target_desc): xfree features, arch, and osabi.
6651 (target_desc::oerator==): Don't compare .xmltarget.
6652 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6653 (set_tdesc_osabi): Likewise.
6654 (tdesc_get_features_xml): Likewise.
6655
66562017-09-05 Yao Qi <yao.qi@linaro.org>
6657
6658 * linux-x86-tdesc.c: Include selftest.h.
6659 (i386_tdesc_test): New function.
6660 (initialize_low_tdesc): Call selftests::register_test.
6661 * tdesc.h: Include regdef.h.
6662 (target_desc): Override operator == and !=.
6663
66642017-09-05 Yao Qi <yao.qi@linaro.org>
6665
6666 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6667 (ipa_obj): Likewise.
6668 * linux-i386-ipa.c: Include common/x86-xstate.h
6669 (get_ipa_tdesc): Call i386_linux_read_description.
6670 (initialize_low_tracepoint): Don't call init_registers_XXX
6671 functions, call initialize_low_tdesc instead.
6672 * linux-x86-low.c (x86_linux_read_description): Call
6673 i386_linux_read_description.
6674 (initialize_low_arch): Don't call init_registers_i386_XXX
6675 functions, call initialize_low_tdesc.
6676 * linux-x86-tdesc.c: New file.
6677 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6678 (i386_get_ipa_tdesc_idx): Declare.
6679 (i386_get_ipa_tdesc): Declare.
6680 (initialize_low_tdesc): Declare.
6681
66822017-09-05 Yao Qi <yao.qi@linaro.org>
6683
6684 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6685 instead of 0.
6686
66872017-09-05 Yao Qi <yao.qi@linaro.org>
6688
6689 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6690 * regcache.c (get_thread_regcache): Use VEC_length.
6691 (init_register_cache): Likewise.
6692 (regcache_cpy): Likewise.
6693 (registers_to_string): Iterate reg_defs via VEC_iterate.
6694 (find_regno): Likewise.
6695 (find_register_by_number): Use VEC_index.
6696 (register_size): Call find_register_by_number.
6697 (register_data): Call find_register_by_number.
6698 (supply_regblock): Use VEC_length.
6699 (regcache_raw_read_unsigned): Likewise.
6700 * tdesc.c (init_target_desc): Iterate reg_defs via
6701 VEC_iterate.
6702 (default_description): Update initializer.
6703 (copy_target_description): Don't update field num_registers.
6704 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6705 <num_registers>: Remove.
6706
67072017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6708
6709 * Makefile.in (.SECONDARY): Define target.
6710
67112017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6712
6713 * linux-low.c (linux_wait_1): Adjust.
6714 * server.c (queue_stop_reply_callback): Adjust.
6715
67162017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6717
6718 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6719 QEnvironmentUnset and QEnvironmentReset packets.
6720 (handle_query): Inform remote that QEnvironmentHexEncoded,
6721 QEnvironmentUnset and QEnvironmentReset are supported.
6722
67232017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6724
6725 * inferiors.h (inferior_target_data): Rename to ...
6726 (thread_target_data): ... this.
6727 (inferior_regcache_data): Rename to ...
6728 (thread_regcache_data): ... this.
6729 (set_inferior_regcache_data): Rename to ...
6730 (set_thread_regcache_data): ... this.
6731 * inferiors.c (inferior_target_data): Rename to ...
6732 (thread_target_data): ... this.
6733 (inferior_regcache_data): Rename to ...
6734 (thread_regcache_data): ... this.
6735 (set_inferior_regcache_data): Rename to ...
6736 (set_thread_regcache_data): ... this.
6737 (free_one_thread): Update.
6738 * linux-low.h (get_thread_lwp): Update.
6739 * regcache.c (get_thread_regcache): Update.
6740 (regcache_invalidate_thread): Update.
6741 (free_register_cache_thread): Update.
6742 * win32-i386-low.c (update_debug_registers_callback): Update.
6743 (win32_get_current_dr): Update.
6744 * win32-low.c (thread_rec): Update.
6745 (delete_thread_info): Update.
6746 (continue_one_thread): Update.
6747 (suspend_one_thread): Update.
6748
67492017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6750
6751 * inferiors.c (set_inferior_target_data): Remove.
6752 * inferiors.h (set_inferior_target_data): Remove.
6753
67542017-08-18 Yao Qi <yao.qi@linaro.org>
6755
6756 * Makefile.in (OBS): Add selftest.o.
6757 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6758 * configure, config.in: Re-generated.
6759 * server.c: Include common/sefltest.h.
6760 (captured_main): Handle option --selftest.
6761
67622017-08-09 Yao Qi <yao.qi@linaro.org>
6763
6764 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6765 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6766 i386-avx-mpx.o and i386-mmx.o.
6767 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6768 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6769 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6770 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6771 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6772 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6773 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6774 i386/amd64-avx-mpx.xml.
6775
67762017-08-09 Yao Qi <yao.qi@linaro.org>
6777
6778 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6779 and x32-avx-avx512.o.
6780 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6781 i386/x32-avx-avx512.xml.
6782
67832017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6784
6785 * tracepoint.h (enum class fast_tpoint_collect_result): New
6786 enumeration.
6787 (fast_tracepoint_collecting): Change return type to
6788 fast_tpoint_collect_result.
6789 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6790 * linux-low.h: Include tracepoint.h.
6791 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6792 fast_tpoint_collect_result.
6793 * linux-low.c (handle_tracepoints): Adjust.
6794 (linux_fast_tracepoint_collecting): Change return type to
6795 fast_tpoint_collect_result.
6796 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6797 linux_wait_1, stuck_in_jump_pad_callback,
6798 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6799 proceed_one_lwp): Adjust to type change.
6800
68012017-07-10 Yao Qi <yao.qi@linaro.org>
6802
6803 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6804
68052017-06-29 Yao Qi <yao.qi@linaro.org>
6806
6807 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6808 Remove.
6809 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6810
68112017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6812
6813 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6814
68152017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6816
6817 * linux-low.c (linux_create_inferior): Adjust code to access the
6818 environment information via 'gdb_environ' class.
6819 * lynx-low.c (lynx_create_inferior): Likewise.
6820 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6821 (get_environ): Return a pointer to 'our_environ'.
6822 (captured_main): Initialize 'our_environ'.
6823 * server.h (get_environ): Adjust prototype.
6824 * spu-low.c (spu_create_inferior): Adjust code to access the
6825 environment information via 'gdb_environ' class.
6826
68272017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6828
6829 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6830 usage of "register" keyword.
6831
68322017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6833
6834 * configure: Re-generate.
6835
68362017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6837
6838 * configure: Re-generate.
6839
68402017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6841
6842 * Makefile.in (COMPILE.pre): Add "-x c++".
6843
68442017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6845
6846 * fork-child.c: Conditionally include <signal.h>.
6847
68482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6849
6850 * server.c (handle_general_set): Handle new packet
6851 "QStartupWithShell".
6852 (handle_query): Add "QStartupWithShell" to the list of supported
6853 packets.
6854 (gdbserver_usage): Add help text explaining the
6855 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6856 options.
6857 (captured_main): Recognize and act upon the presence of the new
6858 CLI options.
6859
68602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6861 Pedro Alves <palves@redhat.com>
6862
6863 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6864 * configure: Regenerate.
6865 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6866 "fork-inferior.o".
6867 (i[34567]86-*-lynxos*): Likewise.
6868 (spu*-*-*): Likewise.
6869 * fork-child.c: New file.
6870 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6871 and "environ.h".
6872 (linux_ptrace_fun): New function.
6873 (linux_create_inferior): Adjust function prototype to reflect
6874 change on "target.h". Adjust function code to use
6875 "fork_inferior".
6876 (linux_request_interrupt): Delete "signal_pid".
6877 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6878 (lynx_ptrace_fun): New function.
6879 (lynx_create_inferior): Adjust function prototype to reflect
6880 change on "target.h". Adjust function code to use
6881 "fork_inferior".
6882 * nto-low.c (nto_create_inferior): Adjust function prototype and
6883 code to reflect change on "target.h". Update comments.
6884 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6885 "common-terminal.h" and "environ.h".
6886 (terminal_fd): Moved to fork-child.c.
6887 (old_foreground_pgrp): Likewise.
6888 (restore_old_foreground_pgrp): Likewise.
6889 (last_status): Make it global.
6890 (last_ptid): Likewise.
6891 (our_environ): New variable.
6892 (startup_with_shell): Likewise.
6893 (program_name): Likewise.
6894 (program_argv): Rename to...
6895 (program_args): ...this.
6896 (wrapper_argv): New variable.
6897 (start_inferior): Delete function.
6898 (get_exec_wrapper): New function.
6899 (get_exec_file): Likewise.
6900 (get_environ): Likewise.
6901 (prefork_hook): Likewise.
6902 (post_fork_inferior): Likewise.
6903 (postfork_hook): Likewise.
6904 (postfork_child_hook): Likewise.
6905 (handle_v_run): Update code to deal with arguments coming from the
6906 remote host. Update calls from "start_inferior" to
6907 "create_inferior".
6908 (captured_main): Likewise. Initialize environment variable. Call
6909 "have_job_control".
6910 * server.h (post_fork_inferior): New prototype.
6911 (get_environ): Likewise.
6912 (last_status): Declare.
6913 (last_ptid): Likewise.
6914 (signal_pid): Likewise.
6915 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6916 (spu_ptrace_fun): New function.
6917 (spu_create_inferior): Adjust function prototype to reflect change
6918 on "target.h". Adjust function code to use "fork_inferior".
6919 * target.c (target_terminal_init): New function.
6920 (target_terminal_inferior): Likewise.
6921 (target_terminal_ours): Likewise.
6922 * target.h: Include <vector>.
6923 (struct target_ops) <create_inferior>: Update prototype.
6924 (create_inferior): Update macro.
6925 * utils.c (gdb_flush_out_err): New function.
6926 * win32-low.c (win32_create_inferior): Adjust function prototype
6927 and code to reflect change on "target.h".
6928
69292017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6930
6931 * inferiors.c (switch_to_thread): New function.
6932
69332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6934
6935 * Makefile.in (SFILE): Add "common/job-control.c".
6936 (OBS): Add "job-control.o".
6937
69382017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6939
6940 * Makefile: Remove "@host_makefile_frag@".
6941
69422017-05-05 Pedro Alves <palves@redhat.com>
6943
6944 * configure: Regenerate.
6945
69462017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6947
6948 * configure: Regenerate.
6949
69502017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6951
6952 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6953 software_single_step change of return type to
6954 std::vector<CORE_ADDR>.
6955 * linux-low.c (install_software_single_step_breakpoints):
6956 Likewise.
6957 * linux-low.h (install_software_single_step_breakpoints):
6958 Likewise.
6959
69602017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6961
6962 * remote-utils.c: Include "gdb_termios.h" instead of
6963 "terminal.h".
6964 * terminal.h: Delete file.
6965
69662017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6967
6968 * server.c: Include <vector>.
6969 <program_argv, wrapper_argv>: Convert to std::vector.
6970 (start_inferior): Rewrite function to use C++.
6971 (handle_v_run): Likewise. Update code that calculates the argv
6972 based on the vRun packet; use C++.
6973 (captured_main): Likewise.
6974
69752017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6976
6977 * server.c (handle_v_cont): Initialize thread_resume::thread
6978 with null_ptid.
6979
69802017-04-05 Pedro Alves <palves@redhat.com>
6981
6982 * configure: Regenerate.
6983
69842017-04-05 Pedro Alves <palves@redhat.com>
6985
6986 * gdbreplay.c (sync_error): Constify.
6987 * linux-x86-low.c (push_opcode): Constify.
6988
69892017-04-05 Pedro Alves <palves@redhat.com>
6990
6991 * win32-low.c (get_child_debug_event)
6992 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6993 Report TARGET_WAITKIND_SPURIOUS instead.
6994
69952017-04-05 Pedro Alves <palves@redhat.com>
6996
6997 * remote-utils.c (remote_prepare, remote_open): Constify.
6998 * remote-utils.h (remote_prepare, remote_open): Constify.
6999 * server.c (captured_main): Constify 'port' handling.
7000
70012017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7002
7003 * Makefile.in (clean): Clear .deps.
7004
70052017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7006
7007 * .gitignore: Remove generated files, replace with wildcard.
7008 * (clean): Replace removal of generated files with wildcard.
7009 (version.c): Replace with...
7010 (version-generated.c): ...this.
7011 (xml-builtin.c): Replace with...
7012 (xml-builtin-generated.c): ...this.
7013 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7014 (%.c: *regformats*): Replace with...
7015 (%-generated.c: *regformats*): ...this.
7016
70172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7018
7019 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7020 (xtensa_fill_gregset): Call collect_register_by_name for
7021 threadptr register.
7022 (xtensa_store_gregset): Call supply_register_by_name for
7023 threadptr register.
7024
70252017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7026
7027 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7028 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7029 (xtensa_store_gregset): Call supply_register for all registers in
7030 a0_regnum..a0_regnum + C0_NREGS range.
7031
70322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7033
7034 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7035 (ax-ipa.o: ax.c): Remove.
7036 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7037 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7038 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7039 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7040 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7041
70422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7043
7044 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7045 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7046 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7047 (errors-ipa.o: ../common/errors.c): Remove.
7048 (format-ipa.o: ../common/format.c): Remove.
7049 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7050
70512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7052
7053 * Makefile.in (%-ipa.o: %.c): New rule.
7054 (tracepoint-ipa.o: tracepoint.c): Remove.
7055 (utils-ipa.o: utils.c): Remove.
7056 (remote-utils-ipa.o: remote-utils.c): Remove.
7057 (regcache-ipa.o: regcache.c): Remove.
7058 (i386-linux-ipa.o: i386-linux.c): Remove.
7059 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7060 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7061 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7062 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7063 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7064 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7065 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7066 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7067 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7068 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7069 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7070 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7071 (aarch64-ipa.o: aarch64.c): Remove.
7072 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7073 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7074 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7075 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7076 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7077 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7078 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7079 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7080 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7081 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7082 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7083 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7084 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7085 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7086 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7087 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7088 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7089 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7090 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7091 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7092 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7093 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7094 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7095 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7096 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7097 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7098 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7099 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7100 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7101 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7102 (tdesc-ipa.o: tdesc.c): Remove.
7103 (x32-linux-ipa.o: x32-linux.c): Remove.
7104 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7105 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7106
71072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7108
7109 * Makefile.in (%.o: ../arch/%.c): New rule.
7110 (arm.o: ../arch/arm.c): Remove.
7111 (arm-linux.o: ../arch/arm-linux.c): Remove.
7112 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7113 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7114
71152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7116
7117 * Makefile.in (%.o: ../nat/%.c): New rule.
7118 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7119 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7120 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7121 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7122 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7123 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7124 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7125 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7126 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7127 (linux-personality.o: ../nat/linux-personality.c): Remove.
7128 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7129 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7130 (x86-linux.o: ../nat/x86-linux.c): Remove.
7131 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7132 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7133
71342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7135
7136 * Makefile.in (%.o: ../common/%.c): New rule.
7137 (signals.o: ../common/signals.c): Remove.
7138 (print-utils.o: ../common/print-utils.c): Remove.
7139 (rsp-low.o: ../common/rsp-low.c): Remove.
7140 (common-utils.o: ../common/common-utils.c): Remove.
7141 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7142 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7143 (vec.o: ../common/vec.c): Remove.
7144 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7145 (xml-utils.o: ../common/xml-utils.c): Remove.
7146 (ptid.o: ../common/ptid.c): Remove.
7147 (buffer.o: ../common/buffer.c): Remove.
7148 (format.o: ../common/format.c): Remove.
7149 (filestuff.o: ../common/filestuff.c): Remove.
7150 (agent.o: ../common/agent.c): Remove.
7151 (errors.o: ../common/errors.c): Remove.
7152 (environ.o: ../common/environ.c): Remove.
7153 (common-debug.o: ../common/common-debug.c): Remove.
7154 (cleanups.o: ../common/cleanups.c): Remove.
7155 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7156 (fileio.o: ../common/fileio.c): Remove.
7157 (common-regcache.o: ../common/common-regcache.c): Remove.
7158 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7159 (new-op.o: ../common/new-op.c): Remove.
7160 (btrace-common.o: ../common/btrace-common.c): Remove.
7161
71622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7163
7164 * Makefile.in (%.o: ../target/%.c): New rule.
7165 (waitstatus.o: ../target/waitstatus.c): Remove.
7166
71672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7168
7169 * Makefile.in
7170 (%.c: ../regformats/%.dat,
7171 (%.c: ../regformats/arm/%.dat,
7172 (%.c: ../regformats/i386/%.dat,
7173 (%.c: ../regformats/rs6000/%.dat): New rules.
7174 (aarch64.c): Remove.
7175 (reg-arm.c): Remove.
7176 (arm-with-iwmmxt.c): Remove.
7177 (arm-with-vfpv2.c): Remove.
7178 (arm-with-vfpv3.c): Remove.
7179 (arm-with-neon.c): Remove.
7180 (reg-bfin.c): Remove.
7181 (reg-cris.c): Remove.
7182 (reg-crisv32.c): Remove.
7183 (i386.c): Remove.
7184 (i386-linux.c): Remove.
7185 (i386-avx.c): Remove.
7186 (i386-avx-linux.c): Remove.
7187 (i386-avx-avx512.c): Remove.
7188 (i386-avx-avx512-linux.c): Remove.
7189 (i386-mpx.c): Remove.
7190 (i386-mpx-linux.c): Remove.
7191 (i386-avx-mpx-avx512-pku.c): Remove.
7192 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7193 (i386-avx-mpx.c): Remove.
7194 (i386-avx-mpx-linux.c): Remove.
7195 (i386-mmx.c): Remove.
7196 (i386-mmx-linux.c): Remove.
7197 (reg-ia64.c): Remove.
7198 (reg-m32r.c): Remove.
7199 (reg-m68k.c): Remove.
7200 (reg-cf.c): Remove.
7201 (mips-linux.c): Remove.
7202 (mips-dsp-linux.c): Remove.
7203 (mips64-linux.c): Remove.
7204 (mips64-dsp-linux.c): Remove.
7205 (nios2-linux.c): Remove.
7206 (powerpc-32.c): Remove.
7207 (powerpc-32l.c): Remove.
7208 (powerpc-altivec32l.c): Remove.
7209 (powerpc-cell32l.c): Remove.
7210 (powerpc-vsx32l.c): Remove.
7211 (powerpc-isa205-32l.c): Remove.
7212 (powerpc-isa205-altivec32l.c): Remove.
7213 (powerpc-isa205-vsx32l.c): Remove.
7214 (powerpc-e500l.c): Remove.
7215 (powerpc-64l.c): Remove.
7216 (powerpc-altivec64l.c): Remove.
7217 (powerpc-cell64l.c): Remove.
7218 (powerpc-vsx64l.c): Remove.
7219 (powerpc-isa205-64l.c): Remove.
7220 (powerpc-isa205-altivec64l.c): Remove.
7221 (powerpc-isa205-vsx64l.c): Remove.
7222 (s390-linux32.c): Remove.
7223 (s390-linux32v1.c): Remove.
7224 (s390-linux32v2.c): Remove.
7225 (s390-linux64.c): Remove.
7226 (s390-linux64v1.c): Remove.
7227 (s390-linux64v2.c): Remove.
7228 (s390-te-linux64.c): Remove.
7229 (s390-vx-linux64.c): Remove.
7230 (s390-tevx-linux64.c): Remove.
7231 (s390x-linux64.c): Remove.
7232 (s390x-linux64v1.c): Remove.
7233 (s390x-linux64v2.c): Remove.
7234 (s390x-te-linux64.c): Remove.
7235 (s390x-vx-linux64.c): Remove.
7236 (s390x-tevx-linux64.c): Remove.
7237 (tic6x-c64xp-linux.c): Remove.
7238 (tic6x-c64x-linux.c): Remove.
7239 (tic6x-c62x-linux.c): Remove.
7240 (reg-sh.c): Remove.
7241 (reg-sparc64.c): Remove.
7242 (reg-spu.c): Remove.
7243 (amd64.c): Remove.
7244 (amd64-linux.c): Remove.
7245 (amd64-avx.c): Remove.
7246 (amd64-avx-linux.c): Remove.
7247 (amd64-avx-avx512.c): Remove.
7248 (amd64-avx-avx512-linux.c): Remove.
7249 (amd64-mpx.c): Remove.
7250 (amd64-mpx-linux.c): Remove.
7251 (amd64-avx-mpx-avx512-pku.c): Remove.
7252 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7253 (amd64-avx-mpx.c): Remove.
7254 (amd64-avx-mpx-linux.c): Remove.
7255 (x32.c): Remove.
7256 (x32-linux.c): Remove.
7257 (x32-avx.c): Remove.
7258 (x32-avx-linux.c): Remove.
7259 (x32-avx-avx512.c): Remove.
7260 (x32-avx-avx512-linux.c): Remove.
7261 (reg-xtensa.c): Remove.
7262 (reg-tilegx.c): Remove.
7263 (reg-tilegx32.c): Remove.
7264
72652017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7266
7267 * Makefile.in (SFILES): Add "common/environ.c".
7268 (OBJS): Add "common/environ.h".
7269
72702017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7271
7272 * configure.ac: Check if the fs_base and gs_base members of
7273 `struct user_regs_struct' exist.
7274 * config.in: Regenerated.
7275 * configure: Likewise.
7276
72772017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7278
7279 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7280 target_read_memory.
7281 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7282 (get_next_pcs_syscall_next_pc): Likewise.
7283
72842016-12-23 Luis Machado <lgustavo@codesourcery.com>
7285
7286 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7287 * nto-x86-low.c: Likewise.
7288
72892016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7290
7291 * Makefile.in: Include disable-implicit-rules.mk.
7292
72932016-11-23 Pedro Alves <palves@redhat.com>
7294
7295 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7296 (debug_vprintf): Use std::chrono::steady_clock instead of
7297 gettimeofday. Use '.' instead of ':'.
7298 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7299 (get_timestamp): Use std::chrono::steady_clock instead of
7300 gettimeofday.
7301
73022016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7303
7304 * Makefile.in: Fix whitespace formatting.
7305
73062016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7307
7308 * Makefile.in (SFILES, OBS): Flatten list and order
7309 alphabetically.
7310
73112016-11-23 Pedro Alves <palves@redhat.com>
7312
7313 * event-loop.c (handle_file_event): Use warning.
7314 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7315 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7316 Use warning.
7317
73182016-11-23 Pedro Alves <palves@redhat.com>
7319
7320 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7321 output.
7322 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7323 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7324 debug_printf and debug_flush for debug output.
7325 * server.c (handle_general_set): Likewise.
7326 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7327 output.
7328
73292016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7330
7331 * Makefile.in (.c.o): Replace rule with ...
7332 (%.o: %.c): ... this one.
7333
73342016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7335
7336 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7337 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7338 make.
7339 * configure.ac: Remove checks for the make program.
7340 * configure: Re-generate.
7341
73422016-10-28 Pedro Alves <palves@redhat.com>
7343
7344 * Makefile.in (CXX_DIALECT): Get from configure.
7345 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7346 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7347 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7348 * config.in: Regenerate.
7349 * configure: Regenerate.
7350
73512016-10-27 Yao Qi <yao.qi@linaro.org>
7352
7353 * linux-low.c (linux_supports_range_stepping): Return true if
7354 can_software_single_step return true.
7355
73562016-10-27 Yao Qi <yao.qi@linaro.org>
7357
7358 * inferiors.c (find_inferior_in_random): New function.
7359 * inferiors.h (find_inferior_in_random): Declare.
7360 * linux-low.c (linux_wait_for_event_filtered): Call
7361 find_inferior_in_random instead of find_inferior.
7362
73632016-10-27 Yao Qi <yao.qi@linaro.org>
7364
7365 * linux-low.c (linux_wait_1): If single-step breakpoints are
7366 inserted, remove them.
7367
73682016-10-26 Pedro Alves <palves@redhat.com>
7369
7370 * linux-low.c (handle_extended_wait): Link parent/child fork
7371 threads.
7372 (linux_wait_1): Unlink them.
7373 (linux_set_resume_request): Ignore resume requests for
7374 already-resumed and unhandled fork child threads.
7375 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7376 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7377 New functions.
7378 (handle_v_requests) <vCont>: Don't call require_running.
7379 * server.h (in_queued_stop_replies): New declaration.
7380
73812016-10-24 Yao Qi <yao.qi@linaro.org>
7382
7383 PR server/20733
7384 * linux-aarch64-low.c (append_insns): Cast the return value to
7385 'uint32_t *'.
7386
73872016-10-10 Yao Qi <yao.qi@linaro.org>
7388
7389 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7390
73912016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7392
7393 * target.c (target_supports_multi_process): New function, moved
7394 from...
7395 * target.h (target_supports_multi_process): ... here. Remove
7396 macro.
7397
73982016-10-05 Tom Tromey <tom@tromey.com>
7399
7400 PR remote/20655:
7401 * tracepoint.c (handle_tracepoint_bkpts): Check
7402 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7403
74042016-10-05 Yao Qi <yao.qi@linaro.org>
7405
7406 * configure.srv: Update the path of arm-*.xml files.
7407
74082016-10-05 Terry Guo <terry.guo@arm.com>
7409 Yao Qi <yao.qi@linaro.org>
7410
7411 * Makefile.in: Adjust the path of rules.
7412 * configure.srv: Update the path of xml files.
7413 * regformats/arm-with-iwmmxt.dat: Regenerated.
7414 * regformats/arm-with-neon.dat: Likewise.
7415 * regformats/arm-with-vfpv2.dat: Likewise.
7416 * regformats/arm-with-vfpv3.dat Likewise.
7417
74182016-09-30 Yao Qi <yao.qi@linaro.org>
7419
7420 PR gdbserver/20627
7421 * target.c (target_stop_and_wait): Don't call
7422 target_continue_no_signal, use resume_stop instead.
7423
74242016-09-26 Yao Qi <yao.qi@linaro.org>
7425
7426 * linux-low.c (linux_wait_1): Call debug_exit.
7427
74282016-09-23 Pedro Alves <palves@redhat.com>
7429
7430 * Makefile.in (SFILES): Add common/new-op.c.
7431 (OBS): Add common/new-op.o.
7432 (new-op.o): New rule.
7433
74342016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7435
7436 * .gitinore: Ignore more files.
7437
74382016-09-21 Yao Qi <yao.qi@linaro.org>
7439
7440 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7441 23.
7442
74432016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7444
7445 * server.c (start_inferior): Call target_mourn_inferior instead of
7446 mourn_inferior; pass ptid_t argument to it.
7447 (resume): Likewise.
7448 (handle_target_event): Likewise.
7449 * target.c (target_mourn_inferior): New function.
7450 * target.h (mourn_inferior): Delete macro.
7451
74522016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7453
7454 * linux-low.c (lwp_is_stepping): New function.
7455
74562016-09-06 Carl Love <cel@us.ibm.com>
7457
7458 * server.c (start_inferior): Fixed comment, requested comment change
7459 didn't get updated correctly. Removed reference to ptrace () call as
7460 it is only true on Linux systems.
7461
74622016-09-06 Carl Love <cel@us.ibm.com>
7463
7464 * server.c (start_inferior): Do not call
7465 function target_post_create_inferior () if the
7466 inferior process has already exited.
7467
74682016-09-05 Pedro Alves <palves@redhat.com>
7469
7470 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7471 (COMPILE.pre, CC_LD): Use CXX directly.
7472 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7473 * acinclude.m4: Don't include build-with-cxx.m4.
7474 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7475 * configure: Regenerate.
7476
74772016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7478
7479 PR gdb/19495
7480 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7481 call writing data to own_buf.
7482
74832016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7484
7485 * target.c (mywait): Call target_wait instead of
7486 the_target->wait.
7487 (target_wait): New function.
7488
74892016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7490
7491 * server.c (start_inferior): New variable 'ptid'. Replace calls
7492 to the_target->resume by target_continue{,_no_signal}, depending
7493 on the case.
7494 * target.c (target_stop_and_wait): Call target_continue_no_signal
7495 instead of the_target->resume.
7496 (target_continue): New function.
7497
74982016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7499
7500 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7501
75022016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7503
7504 PR server/20491
7505 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7506 ps_prochandle.
7507 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7508 * linux-arm-low.c (ps_get_thread_area): Likewise.
7509 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7510 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7511 * linux-mips-low.c (ps_get_thread_area): Likewise.
7512 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7513 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7514 * linux-x86-low.c (ps_get_thread_area): Likewise.
7515 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7516
75172016-08-19 Pedro Alves <palves@redhat.com>
7518
7519 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7520
75212016-08-19 Pedro Alves <palves@redhat.com>
7522
7523 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7524 comment. Use memcpy instead of casting through unsigned long.
7525
75262016-08-19 Pedro Alves <palves@redhat.com>
7527
7528 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7529 allocating around 0x80000000.
7530
75312016-08-19 Pedro Alves <palves@redhat.com>
7532
7533 PR gdb/20415
7534 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7535 (x32-avx512-linux-ipa.o): New rules.
7536 * configure.ac (x86_64-*-linux*): New x32 check.
7537 * configure.srv (ipa_x32_linux_regobj): New.
7538 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7539 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7540 descriptions.
7541 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7542 descriptions.
7543 * configure: Regenerate.
7544
75452016-08-09 Pedro Alves <palves@redhat.com>
7546
7547 PR gdb/18653
7548 * Makefile.in (OBS): Add signals-state-save-restore.o.
7549 (signals-state-save-restore.o): New rule.
7550 * config.in: Regenerate.
7551 * configure: Regenerate.
7552 * linux-low.c: Include "signals-state-save-restore.h".
7553 (linux_create_inferior): Call
7554 restore_original_signals_state.
7555 * server.c: Include "dispositions-save-restore.h".
7556 (captured_main): Call save_original_signals_state.
7557
75582016-08-05 Pedro Alves <palves@redhat.com>
7559
7560 * configure: Regenerate.
7561
75622016-08-04 Yao Qi <yao.qi@linaro.org>
7563
7564 * linux-low.c (regsets_fetch_inferior_registers): Check
7565 errno is ESRCH or not.
7566
75672016-08-02 Yao Qi <yao.qi@linaro.org>
7568
7569 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7570 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7571 (thread_db_load_search): Update.
7572 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7573 td_ta_set_event and td_ta_event_getmsg.
7574
75752016-07-26 Pedro Alves <palves@redhat.com>
7576
7577 PR server/20414
7578 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7579 of unsigned long for 64-bit registers and use uint32_t instead of
7580 unsigned int for 32-bit registers.
7581
75822016-07-26 Pedro Alves <palves@redhat.com>
7583
7584 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7585 to 'ptrace'.
7586
75872016-07-21 Tom Tromey <tom@tromey.com>
7588
7589 * configure: Rebuild.
7590
75912016-07-21 Yao Qi <yao.qi@linaro.org>
7592
7593 * mem-break.c (find_gdb_breakpoint): Cast bp to
7594 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7595
75962016-07-21 Yao Qi <yao.qi@linaro.org>
7597
7598 * server.c (handle_v_requests): Support s and S actions
7599 if target_supports_software_single_step return true.
7600
76012016-07-21 Yao Qi <yao.qi@linaro.org>
7602
7603 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7604 is resume_step, call maybe_hw_step.
7605 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7606 and unstop them.
7607 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7608 breakpoints or not.
7609 (proceed_one_lwp): If resume request is resume_step, install
7610 reinsert breakpoints and call maybe_hw_step.
7611
76122016-07-21 Yao Qi <yao.qi@linaro.org>
7613
7614 * linux-low.c (proceed_one_lwp): Declare.
7615 (linux_resume_one_thread): Remove local variable 'step'.
7616 Lift code enqueue signal. Call proceed_one_lwp instead of
7617 linux_resume_one_lwp.
7618
76192016-07-21 Yao Qi <yao.qi@linaro.org>
7620
7621 * linux-low.c (linux_resume_one_thread): Call
7622 enqueue_pending_signal.
7623
76242016-07-21 Yao Qi <yao.qi@linaro.org>
7625
7626 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7627 * inferiors.c (do_restore_current_thread_cleanup): New function.
7628 (make_cleanup_restore_current_thread): Likewise.
7629 * linux-low.c (install_software_single_step_breakpoints): Call
7630 make_cleanup_restore_current_thread. Switch current_thread to
7631 thread.
7632
76332016-07-21 Yao Qi <yao.qi@linaro.org>
7634
7635 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7636 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7637 (clone_one_breakpoint): Likewise.
7638 (delete_reinsert_breakpoints): Change parameter to thread.
7639 Callers updated.
7640 (has_reinsert_breakpoints): Likewise.
7641 (uninsert_reinsert_breakpoints): Likewise.
7642 (reinsert_reinsert_breakpoints): Likewise.
7643 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7644 (delete_reinsert_breakpoints): Likewise.
7645 (reinsert_reinsert_breakpoints): Likewise.
7646 (uninsert_reinsert_breakpoints): Likewise.
7647 (has_reinsert_breakpoints): Likewise.
7648
76492016-07-21 Yao Qi <yao.qi@linaro.org>
7650
7651 * inferiors.c (get_thread_process): Make parameter const.
7652 * inferiors.h (get_thread_process): Update declaration.
7653 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7654 Add new parameters child_thread and parent_thread. Callers
7655 updated.
7656 * mem-break.h (clone_all_breakpoints): Update declaration.
7657
76582016-07-21 Yao Qi <yao.qi@linaro.org>
7659
7660 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7661 <command_list, handler>: Remove.
7662 (struct gdb_breakpoint): New.
7663 (struct other_breakpoint): New.
7664 (struct reinsert_breakpoint): New.
7665 (is_gdb_breakpoint): New function.
7666 (any_persistent_commands): Update command_list if
7667 is_gdb_breakpoint returns true.
7668 (set_breakpoint): Create breakpoints according to their types.
7669 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7670 (set_gdb_breakpoint_1): Likewise.
7671 (set_gdb_breakpoint): Likewise.
7672 (clear_breakpoint_conditions): Change parameter type to
7673 'struct gdb_breakpoint *'.
7674 (clear_breakpoint_commands): Likewise.
7675 (clear_breakpoint_conditions_and_commands): Likewise.
7676 (add_condition_to_breakpoint): Likewise.
7677 (add_breakpoint_condition): Likewise.
7678 (add_commands_to_breakpoint): Likewise.
7679 (check_breakpoints): Check other_breakpoint.
7680 (clone_one_breakpoint): Clone breakpopint according to its type.
7681 * mem-break.h (struct gdb_breakpoint): Declare.
7682 (set_gdb_breakpoint): Update declaration.
7683 (clear_breakpoint_conditions_and_commands): Likewise.
7684 (add_breakpoint_condition): Likewise.
7685 (add_breakpoint_commands): Likewise.
7686 * server.c (process_point_options): Change parameter type to
7687 'struct gdb_breakpoint *'.
7688
76892016-07-21 Yao Qi <yao.qi@linaro.org>
7690
7691 * mem-break.c (set_breakpoint_at): Rename it to ...
7692 (set_breakpoint_type_at): ... it.
7693 (set_breakpoint_at): Call set_breakpoint_type_at.
7694 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7695 * mem-break.h (set_breakpoint_at): Update comments.
7696
76972016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7698
7699 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7700 to buf parameter.
7701 (nios2_store_gregset): Likewise.
7702
77032016-07-01 Pedro Alves <palves@redhat.com>
7704 Antoine Tremblay <antoine.tremblay@ericsson.com>
7705
7706 * linux-low.c: Change interface to take the target lwp_info
7707 pointer directly and return void. Handle detaching from a zombie
7708 thread.
7709 (linux_detach_lwp_callback): New function.
7710 (linux_detach): Detach from the leader thread after detaching from
7711 the clone threads.
7712
77132016-06-28 Yao Qi <yao.qi@linaro.org>
7714
7715 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7716 for variable new_offset.
7717 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7718 (aarch64_ftrace_insn_reloc_cb): Likewise.
7719 (aarch64_ftrace_insn_reloc_tb): Likewise.
7720 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7721 PRIx64 instead of PRIx32.
7722
77232016-06-28 Yao Qi <yao.qi@linaro.org>
7724
7725 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7726 (the_low_target): Install arm_get_syscall_trapinfo.
7727
77282016-06-28 Yao Qi <yao.qi@linaro.org>
7729
7730 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7731 function.
7732 (the_low_target): Install aarch64_get_syscall_trapinfo.
7733
77342016-06-28 Yao Qi <yao.qi@linaro.org>
7735
7736 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7737 Callers updated.
7738 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7739 Remove parameter sysno.
7740 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7741 sysret.
7742
77432016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7744
7745 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7746 (s390_emit_ne_goto): Likewise.
7747 (s390_emit_lt_goto): Likewise.
7748 (s390_emit_le_goto): Likewise.
7749 (s390_emit_gt_goto): Likewise.
7750 (s390_emit_ge_goto): Likewise.
7751 (s390x_emit_eq_goto): Likewise.
7752 (s390x_emit_ne_goto): Likewise.
7753 (s390x_emit_lt_goto): Likewise.
7754 (s390x_emit_le_goto): Likewise.
7755 (s390x_emit_gt_goto): Likewise.
7756 (s390x_emit_ge_goto): Likewise.
7757 (s390_emit_ops_impl): Mark variable static.
7758 (s390x_emit_ops): Likewise.
7759
77602016-06-17 Yao Qi <yao.qi@linaro.org>
7761
7762 * linux-low.c (handle_extended_wait): Call
7763 uninsert_reinsert_breakpoints for the parent process. Remove
7764 reinsert breakpoints from the child process. Reinsert them to
7765 the parent process when vfork is done.
7766 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7767 (reinsert_reinsert_breakpoints): New function.
7768 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7769 (reinsert_reinsert_breakpoints): Declare.
7770
77712016-06-17 Yao Qi <yao.qi@linaro.org>
7772
7773 * linux-low.c (handle_extended_wait): If the parent is doing
7774 step-over, remove the reinsert breakpoints from the forked child.
7775
77762016-06-17 Yao Qi <yao.qi@linaro.org>
7777
7778 * linux-low.c (unsuspend_all_lwps): Declare.
7779 (linux_low_filter_event): If thread exited, call finish_step_over.
7780 If step-over is finished, unsuspend other threads.
7781
77822016-06-17 Yao Qi <yao.qi@linaro.org>
7783
7784 * linux-low.c (linux_resume_one_lwp_throw): Assert
7785 has_reinsert_breakpoints returns false.
7786 * mem-break.c (delete_disabled_breakpoints): Assert
7787 bp type isn't reinsert_breakpoint.
7788
77892016-06-17 Yao Qi <yao.qi@linaro.org>
7790
7791 * linux-low.c (maybe_hw_step): New function.
7792 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7793 (finish_step_over): Switch current_thread to lwp temporarily,
7794 and assert has_reinsert_breakpoints returns true.
7795 (proceed_one_lwp): Call maybe_hw_step.
7796 * mem-break.c (has_reinsert_breakpoints): New function.
7797 * mem-break.h (has_reinsert_breakpoints): Declare.
7798
77992016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7800
7801 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7802
78032016-05-17 Yao Qi <yao.qi@linaro.org>
7804
7805 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7806 instead of find_inferior.
7807
78082016-05-05 Yao Qi <yao.qi@linaro.org>
7809
7810 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7811 Initialize res to zero.
7812
78132016-05-05 Yao Qi <yao.qi@linaro.org>
7814
7815 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7816 to uint32_t.
7817
78182016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7819
7820 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7821 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7822 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7823
78242016-04-28 Par Olsson <par.olsson@windriver.com>
7825 Simon Marchi <simon.marchi@ericsson.com>
7826
7827 * tracepoint.c (write_inferior_int8): New function.
7828 (cmd_qtenable_disable): Write enable flag using
7829 write_inferior_int8.
7830
78312016-04-25 Yao Qi <yao.qi@linaro.org>
7832
7833 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7834 (need_step_over_p): Return zero if the LWP has pending signals
7835 can be delivered on software single step target.
7836
78372016-04-25 Yao Qi <yao.qi@linaro.org>
7838
7839 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7840 return instead of error.
7841
78422016-04-22 Yao Qi <yao.qi@linaro.org>
7843
7844 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7845 to 23.
7846
78472016-04-22 Yao Qi <yao.qi@linaro.org>
7848
7849 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7850 signal when stepping over breakpoint with software single
7851 step.
7852
78532016-04-21 Pedro Alves <palves@redhat.com>
7854
7855 * linux-s390-low.c (s390_collect_ptrace_register)
7856 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7857 add casts.
7858 (s390_check_regset): Use void * instead of gdb_byte *.
7859
78602016-04-20 Pedro Alves <palves@redhat.com>
7861
7862 * configure: Renegerate.
7863
78642016-04-20 Yao Qi <yao.qi@linaro.org>
7865
7866 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7867 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7868 number 16.
7869 (arm_store_gregset): Likewise.
7870
78712016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7872
7873 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7874 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7875 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7876 (amd64-avx-mpx-linux.c): New rules.
7877 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7878 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7879 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7880 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7881 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7882 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7883 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7884 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7885 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7886 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7887 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7888 * linux-x86-low.c (x86_linux_read_description): Add case for
7889 X86_XSTATE_AVX_MPX_MASK.
7890 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7891 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7892 init_registers_i386_avx_mpx_linux.
7893 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7894 (initialize_low_tracepoint): Call
7895 init_registers_i386_avx_mpx_linux.
7896 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7897 (initialize_low_tracepoint): Call
7898 init_registers_amd64_avx_mpx_linux.
7899 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7900 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7901 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7902 declarations.
7903
79042016-04-18 Pedro Alves <palves@redhat.com>
7905
7906 * configure: Regenerate.
7907
79082016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7909
7910 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7911 (aarch64_emit_sub): Likewise.
7912
79132016-04-12 Pedro Alves <palves@redhat.com>
7914
7915 * utils.c (prepare_to_throw_exception): Delete.
7916
79172016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7918
7919 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7920
79212016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7922
7923 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7924
79252016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7926
7927 * linux-aarch64-ipa.c: Add <elf.h> include.
7928 * linux-ppc-ipa.c: Add <elf.h> include.
7929 * linux-s390-ipa.c: Add <elf.h> include.
7930
79312016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7932
7933 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7934 (get_raw_reg_ptr): Likewise.
7935 (get_trace_state_variable_value_ptr): Likewise.
7936 (set_trace_state_variable_value_ptr): Likewise.
7937 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7938 char *.
7939
79402016-03-31 Wei-cheng Wang <cole945@gmail.com>
7941 Marcin Kościelnicki <koriakin@0x04.net>
7942
7943 PR/17221
7944 * linux-ppc-low.c (emit_insns): New function.
7945 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7946 (ppc_emit_prologue): New function.
7947 (ppc_emit_epilogue): New function.
7948 (ppc_emit_add): New function.
7949 (ppc_emit_sub): New function.
7950 (ppc_emit_mul): New function.
7951 (ppc_emit_lsh): New function.
7952 (ppc_emit_rsh_signed): New function.
7953 (ppc_emit_rsh_unsigned): New function.
7954 (ppc_emit_ext): New function.
7955 (ppc_emit_zero_ext): New function.
7956 (ppc_emit_log_not): New function.
7957 (ppc_emit_bit_and): New function.
7958 (ppc_emit_bit_or): New function.
7959 (ppc_emit_bit_xor): New function.
7960 (ppc_emit_bit_not): New function.
7961 (ppc_emit_equal): New function.
7962 (ppc_emit_less_signed): New function.
7963 (ppc_emit_less_unsigned): New function.
7964 (ppc_emit_ref): New function.
7965 (ppc_emit_const): New function.
7966 (ppc_emit_reg): New function.
7967 (ppc_emit_pop): New function.
7968 (ppc_emit_stack_flush): New function.
7969 (ppc_emit_swap): New function.
7970 (ppc_emit_stack_adjust): New function.
7971 (ppc_emit_call): New function.
7972 (ppc_emit_int_call_1): New function.
7973 (ppc_emit_void_call_2): New function.
7974 (ppc_emit_if_goto): New function.
7975 (ppc_emit_goto): New function.
7976 (ppc_emit_eq_goto): New function.
7977 (ppc_emit_ne_goto): New function.
7978 (ppc_emit_lt_goto): New function.
7979 (ppc_emit_le_goto): New function.
7980 (ppc_emit_gt_goto): New function.
7981 (ppc_emit_ge_goto): New function.
7982 (ppc_write_goto_address): New function.
7983 (ppc_emit_ops_impl): New static variable.
7984 (ppc64v1_emit_prologue): New function.
7985 (ppc64v2_emit_prologue): New function.
7986 (ppc64_emit_epilogue): New function.
7987 (ppc64_emit_add): New function.
7988 (ppc64_emit_sub): New function.
7989 (ppc64_emit_mul): New function.
7990 (ppc64_emit_lsh): New function.
7991 (ppc64_emit_rsh_signed): New function.
7992 (ppc64_emit_rsh_unsigned): New function.
7993 (ppc64_emit_ext): New function.
7994 (ppc64_emit_zero_ext): New function.
7995 (ppc64_emit_log_not): New function.
7996 (ppc64_emit_bit_and): New function.
7997 (ppc64_emit_bit_or): New function.
7998 (ppc64_emit_bit_xor): New function.
7999 (ppc64_emit_bit_not): New function.
8000 (ppc64_emit_equal): New function.
8001 (ppc64_emit_less_signed): New function.
8002 (ppc64_emit_less_unsigned): New function.
8003 (ppc64_emit_ref): New function.
8004 (ppc64_emit_const): New function.
8005 (ppc64v1_emit_reg): New function.
8006 (ppc64v2_emit_reg): New function.
8007 (ppc64_emit_pop): New function.
8008 (ppc64_emit_stack_flush): New function.
8009 (ppc64_emit_swap): New function.
8010 (ppc64v1_emit_call): New function.
8011 (ppc64v2_emit_call): New function.
8012 (ppc64v1_emit_int_call_1): New function.
8013 (ppc64v2_emit_int_call_1): New function.
8014 (ppc64v1_emit_void_call_2): New function.
8015 (ppc64v2_emit_void_call_2): New function.
8016 (ppc64_emit_if_goto): New function.
8017 (ppc64_emit_eq_goto): New function.
8018 (ppc64_emit_ne_goto): New function.
8019 (ppc64_emit_lt_goto): New function.
8020 (ppc64_emit_le_goto): New function.
8021 (ppc64_emit_gt_goto): New function.
8022 (ppc64_emit_ge_goto): New function.
8023 (ppc64v1_emit_ops_impl): New static variable.
8024 (ppc64v2_emit_ops_impl): New static variable.
8025 (ppc_emit_ops): New function.
8026 (linux_low_target): Wire in ppc_emit_ops.
8027
80282016-03-31 Wei-cheng Wang <cole945@gmail.com>
8029 Marcin Kościelnicki <koriakin@0x04.net>
8030
8031 PR/17221
8032 * Makefile.in: Add powerpc-*-ipa.o
8033 * configure.srv: Add ipa_obj for powerpc*-linux.
8034 * linux-ppc-ipa.c: New file.
8035 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8036 includes.
8037 (PPC_FIELD): New macro.
8038 (PPC_SEXT): New macro.
8039 (PPC_OP6): New macro.
8040 (PPC_BO): New macro.
8041 (PPC_LI): New macro.
8042 (PPC_BD): New macro.
8043 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8044 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8045 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8046 (ppc_get_thread_area): New function.
8047 (is_elfv2_inferior): New function.
8048 (gen_ds_form): New function.
8049 (GEN_STD): New macro.
8050 (GEN_STDU): New macro.
8051 (GEN_LD): New macro.
8052 (GEN_LDU): New macro.
8053 (gen_d_form): New function.
8054 (GEN_ADDI): New macro.
8055 (GEN_ADDIS): New macro.
8056 (GEN_LI): New macro.
8057 (GEN_LIS): New macro.
8058 (GEN_ORI): New macro.
8059 (GEN_ORIS): New macro.
8060 (GEN_LWZ): New macro.
8061 (GEN_STW): New macro.
8062 (GEN_STWU): New macro.
8063 (gen_xfx_form): New function.
8064 (GEN_MFSPR): New macro.
8065 (GEN_MTSPR): New macro.
8066 (GEN_MFCR): New macro.
8067 (GEN_MTCR): New macro.
8068 (GEN_SYNC): New macro.
8069 (GEN_LWSYNC): New macro.
8070 (gen_x_form): New function.
8071 (GEN_OR): New macro.
8072 (GEN_MR): New macro.
8073 (GEN_LWARX): New macro.
8074 (GEN_STWCX): New macro.
8075 (GEN_CMPW): New macro.
8076 (gen_md_form): New function.
8077 (GEN_RLDICL): New macro.
8078 (GEN_RLDICR): New macro.
8079 (gen_i_form): New function.
8080 (GEN_B): New macro.
8081 (GEN_BL): New macro.
8082 (gen_b_form): New function.
8083 (GEN_BNE): New macro.
8084 (GEN_LOAD): New macro.
8085 (GEN_STORE): New macro.
8086 (gen_limm): New function.
8087 (gen_atomic_xchg): New function.
8088 (gen_call): New function.
8089 (ppc_relocate_instruction): New function.
8090 (ppc_install_fast_tracepoint_jump_pad): New function.
8091 (ppc_get_min_fast_tracepoint_insn_len): New function.
8092 (ppc_get_ipa_tdesc_idx): New function.
8093 (the_low_target): Wire in the new functions.
8094 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8095 tdescs.
8096 * linux-ppc-tdesc.h: New file.
8097
80982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8099
8100 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8101 (alloc_jump_pad_buffer): New function.
8102 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8103 (alloc_jump_pad_buffer): New function.
8104 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8105 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8106 (alloc_jump_pad_buffer): New function.
8107 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8108 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8109 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8110 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8111
81122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8113
8114 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8115 * linux-amd64-ipa.c: Likewise.
8116 * linux-i386-ipa.c: Likewise.
8117 * linux-s390-ipa.c: Likewise.
8118 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8119 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8120 set_trace_state_variable_value_ptr.
8121 (struct ipa_sym_addresses): Likewise.
8122 (symbol_list): Likewise.
8123 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8124 accessing gdb_collect directly.
8125 (gdb_collect_ptr_type): New typedef.
8126 (get_raw_reg_ptr_type): New typedef.
8127 (get_trace_state_variable_value_ptr_type): New typedef.
8128 (set_trace_state_variable_value_ptr_type): New typedef.
8129 (gdb_collect_ptr): New global.
8130 (get_raw_reg_ptr): New global.
8131 (get_trace_state_variable_value_ptr): New global.
8132 (set_trace_state_variable_value_ptr): New global.
8133 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8134 accessing get_raw_reg directly.
8135 (get_get_tsv_func_addr): Likewise for
8136 get_trace_state_variable_value_ptr.
8137 (get_set_tsv_func_addr): Likewise for
8138 set_trace_state_variable_value_ptr.
8139 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8140
81412016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8142
8143 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8144
81452016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8146
8147 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8148 packets.
8149 (relocate_instruction): Remove own_buf.
8150 * server.c (own_buf): Make global.
8151 (handle_v_requests): Make global.
8152 * server.h (own_buf): New declaration.
8153 (handle_v_requests): New prototype.
8154
81552016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8156
8157 PR 18377
8158 * linux-s390-low.c (add_insns): New function.
8159 (s390_emit_prologue): New function.
8160 (s390_emit_epilogue): New function.
8161 (s390_emit_add): New function.
8162 (s390_emit_sub): New function.
8163 (s390_emit_mul): New function.
8164 (s390_emit_lsh): New function.
8165 (s390_emit_rsh_signed): New function.
8166 (s390_emit_rsh_unsigned): New function.
8167 (s390_emit_ext): New function.
8168 (s390_emit_log_not): New function.
8169 (s390_emit_bit_and): New function.
8170 (s390_emit_bit_or): New function.
8171 (s390_emit_bit_xor): New function.
8172 (s390_emit_bit_not): New function.
8173 (s390_emit_equal): New function.
8174 (s390_emit_less_signed): New function.
8175 (s390_emit_less_unsigned): New function.
8176 (s390_emit_ref): New function.
8177 (s390_emit_if_goto): New function.
8178 (s390_emit_goto): New function.
8179 (s390_write_goto_address): New function.
8180 (s390_emit_litpool): New function.
8181 (s390_emit_const): New function.
8182 (s390_emit_call): New function.
8183 (s390_emit_reg): New function.
8184 (s390_emit_pop): New function.
8185 (s390_emit_stack_flush): New function.
8186 (s390_emit_zero_ext): New function.
8187 (s390_emit_swap): New function.
8188 (s390_emit_stack_adjust): New function.
8189 (s390_emit_set_r2): New function.
8190 (s390_emit_int_call_1): New function.
8191 (s390_emit_void_call_2): New function.
8192 (s390_emit_eq_goto): New function.
8193 (s390_emit_ne_goto): New function.
8194 (s390_emit_lt_goto): New function.
8195 (s390_emit_le_goto): New function.
8196 (s390_emit_gt_goto): New function.
8197 (s390_emit_ge_goto): New function.
8198 (s390x_emit_prologue): New function.
8199 (s390x_emit_epilogue): New function.
8200 (s390x_emit_add): New function.
8201 (s390x_emit_sub): New function.
8202 (s390x_emit_mul): New function.
8203 (s390x_emit_lsh): New function.
8204 (s390x_emit_rsh_signed): New function.
8205 (s390x_emit_rsh_unsigned): New function.
8206 (s390x_emit_ext): New function.
8207 (s390x_emit_log_not): New function.
8208 (s390x_emit_bit_and): New function.
8209 (s390x_emit_bit_or): New function.
8210 (s390x_emit_bit_xor): New function.
8211 (s390x_emit_bit_not): New function.
8212 (s390x_emit_equal): New function.
8213 (s390x_emit_less_signed): New function.
8214 (s390x_emit_less_unsigned): New function.
8215 (s390x_emit_ref): New function.
8216 (s390x_emit_if_goto): New function.
8217 (s390x_emit_const): New function.
8218 (s390x_emit_call): New function.
8219 (s390x_emit_reg): New function.
8220 (s390x_emit_pop): New function.
8221 (s390x_emit_stack_flush): New function.
8222 (s390x_emit_zero_ext): New function.
8223 (s390x_emit_swap): New function.
8224 (s390x_emit_stack_adjust): New function.
8225 (s390x_emit_int_call_1): New function.
8226 (s390x_emit_void_call_2): New function.
8227 (s390x_emit_eq_goto): New function.
8228 (s390x_emit_ne_goto): New function.
8229 (s390x_emit_lt_goto): New function.
8230 (s390x_emit_le_goto): New function.
8231 (s390x_emit_gt_goto): New function.
8232 (s390x_emit_ge_goto): New function.
8233 (s390_emit_ops): New function.
8234 (struct linux_target_ops): Fill in emit_ops hook.
8235
82362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8237
8238 PR 18377
8239 * Makefile.in: Add s390 IPA files.
8240 * configure.srv: Build IPA for s390.
8241 * linux-s390-ipa.c: New file.
8242 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8243 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8244 (tdesc_s390_linux32): Likewise.
8245 (init_registers_s390_linux32v1): Likewise.
8246 (tdesc_s390_linux32v1): Likewise.
8247 (init_registers_s390_linux32v2): Likewise.
8248 (tdesc_s390_linux32v2): Likewise.
8249 (init_registers_s390_linux64): Likewise.
8250 (tdesc_s390_linux64): Likewise.
8251 (init_registers_s390_linux64v1): Likewise.
8252 (tdesc_s390_linux64v1): Likewise.
8253 (init_registers_s390_linux64v2): Likewise.
8254 (tdesc_s390_linux64v2): Likewise.
8255 (init_registers_s390_te_linux64): Likewise.
8256 (tdesc_s390_te_linux64): Likewise.
8257 (init_registers_s390_vx_linux64): Likewise.
8258 (tdesc_s390_vx_linux64): Likewise.
8259 (init_registers_s390_tevx_linux64): Likewise.
8260 (tdesc_s390_tevx_linux64): Likewise.
8261 (init_registers_s390x_linux64): Likewise.
8262 (tdesc_s390x_linux64): Likewise.
8263 (init_registers_s390x_linux64v1): Likewise.
8264 (tdesc_s390x_linux64v1): Likewise.
8265 (init_registers_s390x_linux64v2): Likewise.
8266 (tdesc_s390x_linux64v2): Likewise.
8267 (init_registers_s390x_te_linux64): Likewise.
8268 (tdesc_s390x_te_linux64): Likewise.
8269 (init_registers_s390x_vx_linux64): Likewise.
8270 (tdesc_s390x_vx_linux64): Likewise.
8271 (init_registers_s390x_tevx_linux64): Likewise.
8272 (tdesc_s390x_tevx_linux64): Likewise.
8273 (have_hwcap_s390_vx): New static variable.
8274 (s390_arch_setup): Fill have_hwcap_s390_vx.
8275 (s390_get_thread_area): New function.
8276 (s390_ft_entry_gpr_esa): New const.
8277 (s390_ft_entry_gpr_zarch): New const.
8278 (s390_ft_entry_misc): New const.
8279 (s390_ft_entry_fr): New const.
8280 (s390_ft_entry_vr): New const.
8281 (s390_ft_main_31): New const.
8282 (s390_ft_main_64): New const.
8283 (s390_ft_exit_fr): New const.
8284 (s390_ft_exit_vr): New const.
8285 (s390_ft_exit_misc): New const.
8286 (s390_ft_exit_gpr_esa): New const.
8287 (s390_ft_exit_gpr_zarch): New const.
8288 (append_insns): New function.
8289 (s390_relocate_instruction): New function.
8290 (s390_install_fast_tracepoint_jump_pad): New function.
8291 (s390_get_min_fast_tracepoint_insn_len): New function.
8292 (s390_get_ipa_tdesc_idx): New function.
8293 (struct linux_target_ops): Wire in the above functions.
8294 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8295 * linux-s390-tdesc.h: New file.
8296
82972016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8298
8299 * linux-s390-low.c (s390_supports_tracepoints): New function.
8300 (struct linux_target_ops): Fill supports_tracepoints hook.
8301
83022016-03-18 Yao Qi <yao.qi@linaro.org>
8303
8304 * linux-low.c (lwp_signal_can_be_delivered): New function.
8305 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8306
83072016-03-18 Yao Qi <yao.qi@linaro.org>
8308
8309 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8310 0 if signal is enqueued. Remove 'signal' from one debugging
8311 message. Move one debugging message to some lines below.
8312 Remove code setting 'signal' to 0.
8313
83142016-03-18 Yao Qi <yao.qi@linaro.org>
8315
8316 * linux-low.c (linux_low_filter_event): Remove redundant
8317 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8318
83192016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8320
8321 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8322 (struct linux_target_ops): Wire in the above.
8323
83242016-03-03 Yao Qi <yao.qi@linaro.org>
8325
8326 * linux-low.c: Update comments to start_step_over.
8327
83282016-03-03 Yao Qi <yao.qi@linaro.org>
8329
8330 PR server/19736
8331 * linux-low.c (handle_extended_wait): Set child suspended
8332 if event_lwp->bp_reinsert isn't zero.
8333
83342016-03-02 Yao Qi <yao.qi@linaro.org>
8335
8336 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8337 enqueue_pending_signal.
8338
83392016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8340
8341 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8342 is actually loaded.
8343
83442016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8345
8346 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8347 (s390_regmap_3264) [!__s390x__]: New global.
8348 (s390_collect_ptrace_register): Skip map entries containing -1.
8349 (s390_supply_ptrace_register): Ditto.
8350 (s390_fill_gprs_high): New function.
8351 (s390_store_gprs_high): New function.
8352 (s390_regsets): Add NT_S390_HIGH_GPRS.
8353 (s390_get_hwcap): Enable on 31-bit.
8354 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8355 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8356 Detect NT_S390_HIGH_GPRS.
8357 (s390_usrregs_info_3264): Enable on 31-bit.
8358 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8359 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8360
83612016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8362
8363 PR gdb/13808
8364 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8365 * configure.srv: Ditto.
8366 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8367 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8368 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8369 (init_registers_amd64_linux): Remove prototype.
8370 (tdesc_amd64_linux): Remove declaration.
8371 (get_ipa_tdesc): New function.
8372 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8373 initialize remaining tdescs.
8374 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8375 (init_registers_i386_linux): Remove prototype.
8376 (tdesc_i386_linux): Remove declaration.
8377 (get_ipa_tdesc): New function.
8378 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8379 initialize remaining tdescs.
8380 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8381 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8382 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8383 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8384 (x86_get_ipa_tdesc_idx): New function.
8385 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8386 * linux-x86-tdesc.h: New file.
8387 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8388 (target_get_ipa_tdesc_idx): New macro.
8389 * tracepoint.c (ipa_tdesc_idx): New macro.
8390 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8391 (symbol_list): Add ipa_tdesc_idx.
8392 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8393 (ipa_tdesc): Remove.
8394 (ipa_tdesc_idx): New variable.
8395 (get_context_regcache): Use get_ipa_tdesc.
8396 (gdb_collect): Ditto.
8397 (gdb_probe): Ditto.
8398 * tracepoint.h (get_ipa_tdesc): New prototype.
8399 (ipa_tdesc): Remove.
8400
84012016-02-24 Pedro Alves <palves@redhat.com>
8402
8403 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8404 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8405 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8406 Factor out common code between the USE_SIGTRAP_SIGINFO and
8407 !USE_SIGTRAP_SIGINFO blocks.
8408 (linux_low_filter_event): Call save_stop_reason instead of
8409 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8410 Update comments.
8411 (linux_wait_1): Update comments.
8412
84132016-02-24 Wei-cheng Wang <cole945@gmail.com>
8414
8415 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8416 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8417 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8418 ppc_insert_point, ppc_remove_point.
8419
84202016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8421
8422 * linux-s390-low.c (s390_supports_z_point_type): New function.
8423 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8424
84252016-02-16 Yao Qi <yao.qi@linaro.org>
8426
8427 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8428 PC. Get pc from regcache_read_pc.
8429
84302016-02-12 Yao Qi <yao.qi@linaro.org>
8431
8432 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8433 or linux_get_pc_32bit.
8434 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8435
84362016-02-12 Yao Qi <yao.qi@linaro.org>
8437
8438 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8439 arm_linux_get_next_pcs_fixup.
8440
84412016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8442
8443 * tracepoint.c (x_tracepoint_action_download): Change
8444 write_inferior_data_ptr to write_inferior_data_pointer.
8445 (cmd_qtstart): Likewise.
8446 (write_inferior_data_ptr): Remove.
8447 (download_agent_expr): Change write_inferior_data_ptr to
8448 write_inferior_data_pointer.
8449 (download_tracepoint_1): Likewise.
8450 (download_tracepoint): Likewise.
8451 (download_trace_state_variables): Likewise.
8452
84532016-02-11 Wei-cheng Wang <cole945@gmail.com>
8454 Marcin Kościelnicki <koriakin@0x04.net>
8455
8456 * tracepoint.c (struct tracepoint_action_ops): Remove.
8457 (struct tracepoint_action): Remove ops.
8458 (m_tracepoint_action_download, r_tracepoint_action_download)
8459 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8460 size and offset accordingly.
8461 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8462 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8463 (tracepoint_action_send, tracepoint_action_download): New functions.
8464 Helpers for trace action handlers.
8465 (add_tracepoint_action): Remove setup actions ops.
8466 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8467
84682016-02-10 Yao Qi <yao.qi@linaro.org>
8469
8470 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8471
84722016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8473
8474 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8475 to AC_OUTPUT.
8476 * configure: Regenerate.
8477
84782016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8479
8480 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8481 void * to gdb_byte *.
8482 * linux-low.c (siginfo_fixup): Likewise.
8483 (linux_xfer_siginfo): Likewise.
8484 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8485 Likewise.
8486 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8487
84882016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8489
8490 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8491 to srv_tgtobj.
8492 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8493 to srv_tgtobj.
8494 * linux-x86-low.c [__x86_64__]: Include
8495 "nat/amd64-linux-siginfo.h".
8496 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8497 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8498 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8499 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8500 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8501 (cpt_si_fd, si_timerid, si_overrun): Move from
8502 nat/amd64-linux-siginfo.c.
8503 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8504
85052016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8506
8507 * server.c (skip_to_semicolon): Remove.
8508 (process_point_options): Use strchrnul instead of
8509 skip_to_semicolon.
8510
85112016-01-26 Yao Qi <yao.qi@linaro.org>
8512
8513 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8514 * linux-low.c (install_software_single_step_breakpoints): Don't
8515 call regcache_read_pc.
8516 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8517 argument pc.
8518
85192016-01-26 Yao Qi <yao.qi@linaro.org>
8520
8521 * linux-low.c (install_software_single_step_breakpoints): Call
8522 regcache_read_pc instead of get_pc.
8523
85242016-01-26 Yao Qi <yao.qi@linaro.org>
8525
8526 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8527 (unblock_async_io): Rename to ...
8528 (block_unblock_async_io): ... it. New function.
8529 (enable_async_io): Don't install SIGIO handler. Unblock it
8530 instead.
8531 (disable_async_io): Don't ignore SIGIO. Block it instead.
8532 (initialize_async_io): Install SIGIO handler. Don't call
8533 unblock_async_io.
8534
85352016-01-26 Yao Qi <yao.qi@linaro.org>
8536
8537 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8538 first character is '\003', call *the_target->request_interrupt.
8539
85402016-01-25 Yao Qi <yao.qi@linaro.org>
8541
8542 * remote-utils.c (new_thread_notify): Remove.
8543 (dead_thread_notify): Likewise.
8544 * remote-utils.h (new_thread_notify): Remove declaration.
8545 (dead_thread_notify): Likewise.
8546
85472016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8548
8549 * gdb.trace/pending.exp: Fix expected message on continue.
8550
85512016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8552
8553 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8554 it works properly on big-endian machines where sizeof (CORE_ADDR)
8555 != sizeof (void *).
8556
85572016-01-21 Pedro Alves <palves@redhat.com>
8558
8559 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8560 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8561 * configure: Regenerate.
8562
85632016-01-21 Yao Qi <yao.qi@linaro.org>
8564
8565 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8566 is_thumb and set it according to CPSR saved on the stack.
8567 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8568 arm_sigreturn_next_pc.
8569
85702016-01-18 Yao Qi <yao.qi@linaro.org>
8571
8572 * linux-low.c (linux_set_pc_64bit): New function.
8573 (linux_get_pc_64bit): New function.
8574 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8575 Declare.
8576 * linux-sparc-low.c (debug_threads): Remove declaration.
8577 (sparc_get_pc): Remove.
8578 (the_low_target): Use linux_get_pc_64bit instead of
8579 sparc_get_pc.
8580 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8581 (the_low_target): Use linux_get_pc_64bit and
8582 linux_set_pc_64bit.
8583
85842016-01-18 Yao Qi <yao.qi@linaro.org>
8585
8586 * linux-arm-low.c (debug_threads): Remove declaration.
8587 (arm_get_pc, arm_set_pc): Remove.
8588 (the_low_target): Use linux_get_pc_32bit and
8589 linux_set_pc_32bit.
8590 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8591 (the_low_target): Use linux_get_pc_32bit and
8592 linux_set_pc_32bit.
8593 * linux-cris-low.c (debug_threads): Remove declaration.
8594 (cris_get_pc, cris_set_pc,): Remove.
8595 (the_low_target): Use linux_get_pc_32bit and
8596 linux_set_pc_32bit.
8597 * linux-crisv32-low.c (debug_threads): Remove declaration.
8598 (cris_get_pc, cris_set_pc): Remove.
8599 (the_low_target): Use linux_get_pc_32bit and
8600 linux_set_pc_32bit.
8601 * linux-low.c: Include inttypes.h.
8602 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8603 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8604 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8605 (the_low_target): Use linux_get_pc_32bit and
8606 linux_set_pc_32bit.
8607 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8608 (the_low_target): Use linux_get_pc_32bit and
8609 linux_set_pc_32bit.
8610 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8611 (the_low_target): Use linux_get_pc_32bit and
8612 linux_set_pc_32bit.
8613 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8614 (the_low_target): Use linux_get_pc_32bit and
8615 linux_set_pc_32bit.
8616 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8617 (the_low_target): Use linux_get_pc_32bit and
8618 linux_set_pc_32bit.
8619
86202016-01-18 Gary Benson <gbenson@redhat.com>
8621
8622 * configure.ac (AC_FUNC_FORK): New check.
8623 * config.in: Regenerate.
8624 * configure: Likewise.
8625
86262016-01-14 Yao Qi <yao.qi@linaro.org>
8627
8628 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8629 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8630 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8631 arm_get_next_pcs_ctor.
8632
86332016-01-12 Josh Stone <jistone@redhat.com>
8634 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8635
8636 * inferiors.h: Include "gdb_vecs.h".
8637 (struct process_info): Add syscalls_to_catch.
8638 * inferiors.c (remove_process): Free syscalls_to_catch.
8639 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8640 syscall_return stops.
8641 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8642 * server.c (handle_general_set): Handle QCatchSyscalls.
8643 (handle_query): Report support for QCatchSyscalls.
8644 * target.h (struct target_ops): Add supports_catch_syscall.
8645 (target_supports_catch_syscall): New macro.
8646 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8647 (struct lwp_info): Add syscall_state.
8648 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8649 Maintain syscall_state and syscalls_to_catch across exec.
8650 (get_syscall_trapinfo): New function, proxy to the_low_target.
8651 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8652 (linux_low_filter_event): Toggle syscall_state entry/return for
8653 syscall traps, and set it ignored for all others.
8654 (gdb_catching_syscalls_p): New function.
8655 (gdb_catch_this_syscall_p): New function.
8656 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8657 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8658 (linux_supports_catch_syscall): New function.
8659 (linux_target_ops): Install it.
8660 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8661 (the_low_target): Install it.
8662
86632016-01-12 Mike Frysinger <vapier@gentoo.org>
8664
8665 * acinclude.m4: Include new ../warning.m4 file.
8666 * configure: Regenerated.
8667 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8668
86692016-01-12 Mike Frysinger <vapier@gentoo.org>
8670
8671 * ax.c (is_goto_target): Mark static.
8672 * linux-low.c (register_addr): Likewise.
8673 (linux_fetch_registers, linux_store_registers): Likewise.
8674 * mem-break.c (any_persistent_commands): Fix old prototype.
8675 (add_commands_to_breakpoint): Mark static.
8676 * regcache.c (find_register_by_name): Delete unused func.
8677 * remote-utils.c (hex_or_minus_one): Mark static.
8678 * server.c (monitor_show_help): Mark static.
8679 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8680 handle_v_requests): Likewise.
8681
86822016-01-12 Pedro Alves <palves@redhat.com>
8683
8684 Remove use of the registered trademark symbol throughout.
8685
86862016-01-08 Yao Qi <yao.qi@linaro.org>
8687
8688 * remote-utils.c (getpkt): If c is '\003', call target hook
8689 request_interrupt.
8690
86912016-01-06 Yao Qi <yao.qi@linaro.org>
8692
8693 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8694 linux-aarch32-low.c.
8695 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8696 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8697 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8698 (thumb2_breakpoint): Declare.
8699 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8700 linux-aarch32-low.h.
8701 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8702 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8704
87052016-01-01 Joel Brobecker <brobecker@adacore.com>
8706
8707 * gdbreplay.c (gdbreplay_version): Change copyright year in
8708 version message.
8709 * server.c (gdbserver_version): Likewise.
8710
87112015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8712
8713 * server.c (crc32_table): Delete.
8714 (crc32): Use libiberty's xcrc32 function.
8715
87162015-12-22 Joel Brobecker <brobecker@adacore.com>
8717
8718 * lynx-low.c (lynx_delete_thread_callback): New function.
8719 (lynx_mourn): Properly delete our process and all of its
8720 threads. Remove call to clear_inferiors.
8721
87222015-12-22 Joel Brobecker <brobecker@adacore.com>
8723
8724 * target.c (thread_search_callback): Add check that
8725 the thread_stopped target callback is not NULL before
8726 calling it.
8727
87282015-12-21 Yao Qi <yao.qi@linaro.org>
8729
8730 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8731 arm breakpoint.
8732
87332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8734
8735 * server.c (handle_query): Call target_supports_software_single_step.
8736
87372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8738
8739 * linux-low.c (single_step): New function.
8740 (linux_resume_one_lwp_throw): Call single_step.
8741 (start_step_over): Likewise.
8742
87432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8744
8745 * Makefile.in (SFILES): Append arch/arm-linux.c,
8746 arch/arm-get-next-pcs.c.
8747 (arm-linux.o): New rule.
8748 (arm-get-next-pcs.o): New rule.
8749 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8750 arm-linux.o.
8751 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8752 to linux-aarch32-low.c.
8753 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8754 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8755 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8756 (thumb2_breakpoint_len): Likewise.
8757 (arm_is_thumb_mode): Make non-static.
8758 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8759 from linux-aarch32-low.c.
8760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8761 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8762 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8763 (thumb2_breakpoint_len): Likewise.
8764 (arm_is_thumb_mode): New declaration.
8765 * linux-arm-low.c: Include arch/arm-linux.h
8766 aarch/arm-get-next-pcs.h, sys/syscall.h.
8767 (get_next_pcs_ops): New struct.
8768 (get_next_pcs_addr_bits_remove): New function.
8769 (get_next_pcs_is_thumb): New function.
8770 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8771 (arm_sigreturn_next_pc): Likewise.
8772 (get_next_pcs_syscall_next_pc): Likewise.
8773 (arm_gdbserver_get_next_pcs): Likewise.
8774 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8775 Initialize.
8776 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8777 * server.h: Include gdb_vecs.h.
8778
87792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8780
8781 * Makefile.in (SFILES): Append common/common-regcache.c.
8782 (OBS): Append common-regcache.o.
8783 (common-regcache.o): New rule.
8784 * regcache.c (init_register_cache): Initialize cache to
8785 REG_UNAVAILABLE.
8786 (regcache_raw_read_unsigned): New function.
8787 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8788 register_status enum.
8789
87902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8791
8792 * linux-aarch64-low.c (the_low_targets): Rename
8793 breakpoint_reinsert_addr to get_next_pcs.
8794 * linux-arm-low.c (the_low_targets): Likewise.
8795 * linux-bfin-low.c (the_low_targets): Likewise.
8796 * linux-cris-low.c (the_low_targets): Likewise.
8797 * linux-crisv32-low.c (the_low_targets): Likewise.
8798 * linux-low.c (can_software_single_step): Likewise.
8799 (install_software_single_step_breakpoints): New function.
8800 (start_step_over): Use install_software_single_step_breakpoints.
8801 * linux-low.h: New CORE_ADDR vector.
8802 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8803 get_next_pcs.
8804 * linux-mips-low.c (the_low_targets): Likewise.
8805 * linux-nios2-low.c (the_low_targets): Likewise.
8806 * linux-sparc-low.c (the_low_targets): Likewise.
8807
88082015-12-17 Pedro Alves <palves@redhat.com>
8809
8810 * linux-low.c (linux_kill_one_lwp): Remove references to
8811 LinuxThreads.
8812 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8813 to 'kill'.
8814 (linux_init_signals): Delete.
8815 (initialize_low): Adjust.
8816 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8817
88182015-12-16 Pedro Alves <palves@redhat.com>
8819
8820 * configure.ac (compiler warning flags): When testing a
8821 -Wno-foo option, check whether -Wfoo works instead.
8822 * configure: Regenerate.
8823
88242015-12-11 Don Breazeal <donb@codesourcery.com>
8825
8826 * server.c (process_serial_event): Don't exit from gdbserver
8827 in remote mode if there are still active inferiors.
8828
88292015-12-11 Yao Qi <yao.qi@linaro.org>
8830
8831 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8832 arm_breakpoint_at if the process is 32-bit.
8833
88342015-12-11 Yao Qi <yao.qi@linaro.org>
8835
8836 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8837 arm breakpoint.
8838
88392015-12-07 Yao Qi <yao.qi@linaro.org>
8840
8841 * configure.srv: Append arm.o to srv_tgtobj for
8842 aarch64*-*-linux* target.
8843 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8844 from linux-arm-low.c.
8845 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8846 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8847 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8848 (thumb2_breakpoint_len): Likewise.
8849 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8850 (arm_breakpoint_kinds): Likewise.
8851 (arm_breakpoint_kind_from_pc): Likewise.
8852 (arm_sw_breakpoint_from_kind): Likewise.
8853 (arm_breakpoint_kind_from_current_state): Likewise.
8854 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8855 (arm_sw_breakpoint_from_kind): Declare.
8856 (arm_breakpoint_kind_from_current_state): Declare.
8857 (arm_breakpoint_at): Declare.
8858 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8859 arm_sw_breakpoint_from_kind if process is 32-bit.
8860 (aarch64_breakpoint_kind_from_pc): New function.
8861 (aarch64_breakpoint_kind_from_current_state): New function.
8862 (the_low_target): Initialize fields breakpoint_kind_from_pc
8863 and breakpoint_kind_from_current_state.
8864 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8865 linux-aarch32-low.c.
8866 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8867 (arm_breakpoint, arm_breakpoint_len): Likewise.
8868 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8869 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8870 (arm_is_thumb_mode): Likewise.
8871 (arm_breakpoint_at): Likewise.
8872 (arm_breakpoint_kind_from_pc): Likewise.
8873 (arm_sw_breakpoint_from_kind): Likewise.
8874 (arm_breakpoint_kind_from_current_state): Likewise.
8875
8876 Revert:
8877 2015-08-04 Yao Qi <yao.qi@linaro.org>
8878
8879 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8880 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8881 * server.c (extended_protocol): Remove "static".
8882 * server.h (extended_protocol): Declare it.
8883
88842015-12-04 Josh Stone <jistone@redhat.com>
8885
8886 * target.h (struct target_ops) <arch_setup>: Rename to ...
8887 (struct target_ops) <post_create_inferior>: ... this.
8888 (target_arch_setup): Rename to ...
8889 (target_post_create_inferior): ... this, calling post_create_inferior.
8890 * server.c (start_inferior): Update target_arch_setup calls to
8891 target_post_create_inferior.
8892 * linux-low.c (linux_low_ptrace_options): Forward declare.
8893 (linux_arch_setup): Update its comment for general use.
8894 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8895 (struct linux_target_ops): Use linux_post_create_inferior.
8896 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8897 to post_create_inferior.
8898 * nto-low.c (struct nto_target_ops): Likewise.
8899 * spu-low.c (struct spu_target_ops): Likewise.
8900 * win32-low.c (struct win32_target_ops): Likewise.
8901
89022015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8903
8904 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8905
89062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8907
8908 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8909 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8910 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8911 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8912 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8913 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8914 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8915 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8916 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8917 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8918 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8919 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8920
89212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8922
8923 * linux-low.c (linux_look_up_symbols): Don't call
8924 linux_supports_traceclone.
8925 * linux-low.h (thread_db_init): Remove use_events argument.
8926 * thread-db.c (thread_db_use_event): Remove global variable.
8927 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8928 (struct thread_db) <td_create_bp>: Remove field.
8929 (thread_db_create_event): Remove function.
8930 (thread_db_enable_reporting): Likewise.
8931 (find_one_thread): Don't check for thread_db_use_events.
8932 (attach_thread): Likewise.
8933 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8934 (try_thread_db_load_1): Don't check for thread_db_use_events.
8935 (thread_db_init): Remove use_events argument and thread events
8936 handling.
8937 (remove_thread_event_breakpoints): Remove function.
8938 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8939
89402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8941
8942 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8943 New function.
8944 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8945 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8947 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8948 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8949 Initialize.
8950 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8951 New function.
8952 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8953 * linux-low.c (can_hardware_single_step): Use
8954 supports_hardware_single_step.
8955 (can_software_single_step): New function.
8956 (start_step_over): Call can_software_single_step.
8957 (linux_supports_hardware_single_step): New function.
8958 (struct target_ops) <supports_software_single_step>: Initialize.
8959 * linux-low.h (struct linux_target_ops)
8960 <supports_hardware_single_step>: Initialize.
8961 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8963 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8964 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8965 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8966 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8967 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8968 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8969 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8970 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8971 Initialize.
8972 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8973 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8974 Initialize.
8975 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8977 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8978 New function.
8979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8980 * target.h (struct target_ops): <supports_software_single_step>:
8981 New field.
8982 (target_supports_software_single_step): New macro.
8983
89842015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8985
8986 * linux-low.c (linux_wait_1): Fix pc advance condition.
8987 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8988 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8989
89902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8991
8992 * linux-arm-low.c (arm_is_thumb_mode): New function.
8993 (arm_breakpoint_at): Use arm_is_thumb_mode.
8994 (arm_breakpoint_kind_from_current_state): New function.
8995 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8996 Initialize.
8997 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8998 (linux_breakpoint_kind_from_current_state): New function.
8999 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9000 * linux-low.h (struct linux_target_ops)
9001 <breakpoint_kind_from_current_state>: New field.
9002 * target.h (struct target_ops): Likewise.
9003 (target_breakpoint_kind_from_current_state): New macro.
9004
90052015-11-30 Pedro Alves <palves@redhat.com>
9006
9007 * linux-low.c (linux_resume): Wake up the event loop before
9008 returning.
9009
90102015-11-30 Pedro Alves <palves@redhat.com>
9011
9012 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9013 check.
9014 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9015 to -1.
9016 * target.c (struct thread_search): New structure.
9017 (thread_search_callback): New function.
9018 (prev_general_thread): New global.
9019 (prepare_to_access_memory, done_accessing_memory): New functions.
9020 * target.h (prepare_to_access_memory, done_accessing_memory):
9021 Replace macros with function declarations.
9022
90232015-11-30 Pedro Alves <palves@redhat.com>
9024
9025 PR 14618
9026 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9027 report TARGET_WAITKIND_NO_RESUMED.
9028 * remote-utils.c (prepare_resume_reply): Handle
9029 TARGET_WAITKIND_NO_RESUMED.
9030 * server.c (report_no_resumed): New global.
9031 (handle_query) <qSupported>: Handle "no-resumed+". Report
9032 "no-resumed+" support.
9033 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9034 return error if the client doesn't support no-resumed events.
9035 (push_stop_notification): New function.
9036 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9037 events if the client supports them.
9038
90392015-11-30 Pedro Alves <palves@redhat.com>
9040
9041 * linux-low.c (thread_still_has_status_pending_p): Don't check
9042 vCont;t here.
9043 (lwp_resumed): New function.
9044 (status_pending_p_callback): Return early if the LWP is not
9045 supposed to be resumed.
9046
90472015-11-30 Pedro Alves <palves@redhat.com>
9048
9049 * linux-low.c (handle_extended_wait): Assert that the LWP's
9050 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9051 thread create events, leave the new child's status pending.
9052 (linux_low_filter_event): If GDB wants to hear about thread exit
9053 events, leave the LWP marked dead and don't delete it.
9054 (linux_wait_for_event_filtered): Don't check for thread exit.
9055 (filter_exit_event): New function.
9056 (linux_wait_1): Use it, when returning an exit event.
9057 (linux_resume_one_lwp_throw): Assert that the LWP's
9058 waitstatus is TARGET_WAITKIND_IGNORE.
9059 * remote-utils.c (prepare_resume_reply): Handle
9060 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9061 * server.c (report_thread_events): New global.
9062 (handle_general_set): Handle QThreadEvents.
9063 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9064 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9065 TARGET_WAITKIND_THREAD_EXITED.
9066 * server.h (report_thread_events): Declare.
9067
90682015-11-30 Pedro Alves <palves@redhat.com>
9069
9070 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9071 the thread's last_resume_kind was resume_stop.
9072
90732015-11-30 Pedro Alves <palves@redhat.com>
9074
9075 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9076 before returning.
9077
90782015-11-30 Pedro Alves <palves@redhat.com>
9079
9080 * server.c (handle_v_requests): Handle vCtrlC.
9081
90822015-11-30 Pedro Alves <palves@redhat.com>
9083
9084 * gdbthread.h (find_any_thread_of_pid): Declare.
9085 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9086 functions.
9087 * server.c (handle_query): If current_thread is NULL, look for
9088 another thread of the selected process.
9089
90902015-11-26 Daniel Colascione <dancol@dancol.org>
9091 Simon Marchi <simon.marchi@ericsson.com>
9092
9093 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9094 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9095 name in reply.
9096 * target.h (struct target_ops) <thread_name>: New field.
9097 (target_thread_name): New macro.
9098
90992015-11-23 Joel Brobecker <brobecker@adacore.com>
9100
9101 * regcache.h (regcache_invalidate_pid): Add declaration.
9102 * regcache.c (regcache_invalidate_pid): New function, extracted
9103 from regcache_invalidate.
9104 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9105 Add trivial documentation comment.
9106 * lynx-low.c: Use regcache_invalidate_pid instead of
9107 regcache_invalidate.
9108
91092015-11-23 Joel Brobecker <brobecker@adacore.com>
9110
9111 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9112 and Elf64_auxv_t if the target is Android.
9113
91142015-11-22 Doug Evans <xdje42@gmail.com>
9115
9116 * target.h: #include <sys/types.h>.
9117
91182015-11-19 Pedro Alves <palves@redhat.com>
9119
9120 * linux-low.c (linux_process_qsupported): Change prototype.
9121 Adjust.
9122 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9123 Change prototype.
9124 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9125 and adjust to loop over all features.
9126 * server.c (handle_query) <qSupported>: Adjust to call
9127 target_process_qsupported once, passing it a vector of unprocessed
9128 features.
9129 * target.h (struct target_ops) <process_qsupported>: Change
9130 prototype.
9131 (target_process_qsupported): Adjust.
9132
91332015-11-19 Pedro Alves <palves@redhat.com>
9134
9135 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9136 mode.
9137 * configure: Regenerate.
9138
91392015-11-19 Pedro Alves <palves@redhat.com>
9140
9141 * configure: Regenerate.
9142
91432015-11-19 Yao Qi <yao.qi@linaro.org>
9144
9145 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9146 type to uint32_t.
9147
91482015-11-19 Yao Qi <yao.qi@linaro.org>
9149
9150 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9151 (struct aarch64_operand): Move enum out.
9152
91532015-11-19 Yao Qi <yao.qi@linaro.org>
9154
9155 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9156 struct user_fpsimd_state *.
9157 (aarch64_store_fpregset): Likewise.
9158
91592015-11-19 Yao Qi <yao.qi@linaro.org>
9160
9161 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9162 struct user_pt_regs *.
9163 (aarch64_store_gregset): Likewise.
9164
91652015-11-18 Pedro Alves <palves@redhat.com>
9166
9167 * Makefile.in (all_object_files): Add $IPA_OBJS.
9168
91692015-11-17 Pedro Alves <palves@redhat.com>
9170
9171 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9172 GDB_SIGNAL_0 and gdb_signal_to_string.
9173
91742015-11-17 Pedro Alves <palves@redhat.com>
9175
9176 * win32-low.c (handle_output_debug_string): Remove parameter.
9177 (win32_kill): Remove our_status local and adjust call to
9178 handle_output_debug_string.
9179 (get_child_debug_event): Adjust call to
9180 handle_output_debug_string.
9181
91822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9183
9184 * linux-mips-low.c (mips_fill_gregset): Add cast.
9185 (mips_store_gregset): Likewise.
9186 (mips_fill_fpregset): Likewise.
9187 (mips_store_fpregset): Likewise.
9188
91892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9190
9191 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9192 priv.
9193
91942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9195
9196 * linux-mips-low.c (mips_linux_new_thread): Change type of
9197 watch_type to enum target_hw_bp_type.
9198
91992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9200
9201 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9202 Change return type to arm_hwbp_type.
9203
92042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9205
9206 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9207 (arm_store_gregset): Likewise.
9208 * linux-arm-low.c (arm_get_hwcap): Likewise.
9209 (arm_read_description): Likewise.
9210
92112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9212
9213 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9214
92152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9216
9217 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9218 (ppc_fill_vsxregset): Likewise.
9219 (ppc_store_vsxregset): Likewise.
9220 (ppc_fill_vrregset): Likewise.
9221 (ppc_store_vrregset): Likewise.
9222 (ppc_fill_evrregset): Likewise.
9223 (ppc_store_evrregset): Likewise.
9224
92252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9226
9227 * linux-ppc-low.c (ppc_usrregs_info): Remove
9228 forward-declaration.
9229 (ppc_arch_setup): Move lower in file.
9230
92312015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9232
9233 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9234 (ps_pdwrite): Likewise.
9235
92362015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9237
9238 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9239 to after assert checks.
9240
92412015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9242
9243 * proc-service.c (ps_pdread): Add/adjust casts.
9244 (ps_pdwrite): Add/adjust casts.
9245
92462015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9247
9248 * server.c (handle_search_memory_1): Cast return value of
9249 memmem.
9250
92512015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9252
9253 * server.c (write_qxfer_response): Change type of data to
9254 gdb_byte *.
9255
92562015-10-29 Pedro Alves <palves@redhat.com>
9257
9258 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9259
92602015-10-29 Pedro Alves <palves@redhat.com>
9261
9262 * tracepoint.c (clear_installed_tracepoints): Add casts.
9263
92642015-10-29 Pedro Alves <palves@redhat.com>
9265
9266 * server.c (handle_v_cont, process_serial_event): Add enum
9267 gdb_signal casts to signal parsing code.
9268
92692015-10-29 Pedro Alves <palves@redhat.com>
9270
9271 * linux-low.h (NULL_REGSET): Define.
9272 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9273 * linux-arm-low.c (arm_regsets): Likewise.
9274 * linux-crisv32-low.c (cris_regsets): Likewise.
9275 * linux-m68k-low.c (m68k_regsets): Likewise.
9276 * linux-mips-low.c (mips_regsets): Likewise.
9277 * linux-nios2-low.c (nios2_regsets): Likewise.
9278 * linux-ppc-low.c (ppc_regsets): Likewise.
9279 * linux-s390-low.c (s390_regsets): Likewise.
9280 * linux-sh-low.c (sh_regsets): Likewise.
9281 * linux-sparc-low.c (sparc_regsets): Likewise.
9282 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9283 * linux-tile-low.c (tile_regsets): Likewise.
9284 * linux-x86-low.c (x86_regsets): Likewise.
9285 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9286
92872015-10-29 Pedro Alves <palves@redhat.com>
9288
9289 * linux-low.h (NULL_REGSET): Define.
9290 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9291 * linux-arm-low.c (arm_regsets): Likewise.
9292 * linux-crisv32-low.c (cris_regsets): Likewise.
9293 * linux-m68k-low.c (m68k_regsets): Likewise.
9294 * linux-mips-low.c (mips_regsets): Likewise.
9295 * linux-nios2-low.c (nios2_regsets): Likewise.
9296 * linux-ppc-low.c (ppc_regsets): Likewise.
9297 * linux-s390-low.c (s390_regsets): Likewise.
9298 * linux-sh-low.c (sh_regsets): Likewise.
9299 * linux-sparc-low.c (sparc_regsets): Likewise.
9300 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9301 * linux-tile-low.c (tile_regsets): Likewise.
9302 * linux-x86-low.c (x86_regsets): Likewise.
9303 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9304
93052015-10-26 Doug Evans <dje@google.com>
9306
9307 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9308
93092015-10-26 Doug Evans <dje@google.com>
9310
9311 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9312
93132015-10-26 Doug Evans <dje@google.com>
9314
9315 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9316 for debug_printf.
9317 (attach_thread, find_new_threads_callback): Ditto.
9318
93192015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9320
9321 * mem-break.h (set_breakpoint_data): Remove.
9322
93232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9324
9325 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9326 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9327 (initialize_low): Remove set_breakpoint_data call.
9328 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9329 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9330 (initialize_low): Remove set_breakpoint_data call.
9331 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9332 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9333 (initialize_low): Remove set_breakpoint_data call.
9334
93352015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9336
9337 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9338 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9339 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9340 * target.h (target_breakpoint_kind_from_pc): New macro.
9341
93422015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9343
9344 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9345 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9346 the default breakpoint kind.
9347
93482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9349
9350 * linux-arm-low.c (arm_supports_z_point_type): Add software
9351 breakpoint support.
9352
93532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9354
9355 * linux-arm-low.c: Refactor breakpoint definitions.
9356 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9357 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9358
93592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9360
9361 * Makefile.in: Add arm.c/o.
9362 * configure.srv: Likewise.
9363 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9364 (arm_breakpoint_kind_from_pc): New function.
9365 (arm_sw_breakpoint_from_kind): Return proper kind.
9366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9367
93682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9369
9370 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9371 removal.
9372 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9373 (struct raw_breakpoint) <size>: Remove.
9374 (struct raw_breakpoint) <kind>: Add.
9375 (bp_size): New function.
9376 (bp_opcode): Likewise.
9377 (find_raw_breakpoint_at): Adjust for kind.
9378 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9379 (remove_memory_breakpoint): Adjust for kind call bp_size.
9380 (set_raw_breakpoint_at): Adjust for kind.
9381 (set_breakpoint): Likewise.
9382 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9383 (delete_raw_breakpoint): Adjust for kind.
9384 (delete_breakpoint): Likewise.
9385 (find_gdb_breakpoint): Likewise.
9386 (set_gdb_breakpoint_1): Likewise.
9387 (set_gdb_breakpoint): Likewise.
9388 (delete_gdb_breakpoint_1): Likewise.
9389 (delete_gdb_breakpoint): Likewise.
9390 (uninsert_raw_breakpoint): Likewise.
9391 (reinsert_raw_breakpoint): Likewise.
9392 (set_breakpoint_data): Remove.
9393 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9394 (check_mem_read): Adjust for kind call bp_size.
9395 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9396 (clone_one_breakpoint): Adjust for kind.
9397 * mem-break.h (set_gdb_breakpoint): Likewise.
9398 (delete_gdb_breakpoint): Likewise.
9399 * server.c (process_serial_event): Likewise.
9400
94012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9402
9403 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9404 (struct linux_target_ops) <breakpoint>: Remove.
9405 (struct linux_target_ops) <breakpoint_len>: Remove.
9406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9408 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9409 (arm_sw_breakpoint_from_kind): New function.
9410 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9411 (struct linux_target_ops) <breakpoint>: Remove.
9412 (struct linux_target_ops) <breakpoint_len>: Remove.
9413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9415 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9416 (struct linux_target_ops) <breakpoint>: Remove.
9417 (struct linux_target_ops) <breakpoint_len>: Remove.
9418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9420 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9421 (struct linux_target_ops) <breakpoint>: Remove.
9422 (struct linux_target_ops) <breakpoint_len>: Remove.
9423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9425 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9426 and sw_breakpoint_from_kind to increment the pc.
9427 (linux_breakpoint_kind_from_pc): New function.
9428 (linux_sw_breakpoint_from_kind): New function.
9429 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9430 (initialize_low): Call breakpoint_kind_from_pc and
9431 sw_breakpoint_from_kind to replace breakpoint_data/len.
9432 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9433 New field.
9434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9435 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9436 (struct linux_target_ops) <breakpoint>: Remove.
9437 (struct linux_target_ops) <breakpoint_len>: Remove.
9438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9440 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9441 (struct linux_target_ops) <breakpoint>: Remove.
9442 (struct linux_target_ops) <breakpoint_len>: Remove.
9443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9445 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9446 (struct linux_target_ops) <breakpoint>: Remove.
9447 (struct linux_target_ops) <breakpoint_len>: Remove.
9448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9450 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9451 (struct linux_target_ops) <breakpoint>: Remove.
9452 (struct linux_target_ops) <breakpoint_len>: Remove.
9453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9455 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9456 (struct linux_target_ops) <breakpoint>: Remove.
9457 (struct linux_target_ops) <breakpoint_len>: Remove.
9458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9460 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9461 (struct linux_target_ops) <breakpoint>: Remove.
9462 (struct linux_target_ops) <breakpoint_len>: Remove.
9463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9465 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9466 (struct linux_target_ops) <breakpoint>: Remove.
9467 (struct linux_target_ops) <breakpoint_len>: Remove.
9468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9470 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9471 (struct linux_target_ops) <breakpoint>: Remove.
9472 (struct linux_target_ops) <breakpoint_len>: Remove.
9473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9475 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9476 (struct linux_target_ops) <breakpoint>: Remove.
9477 (struct linux_target_ops) <breakpoint_len>: Remove.
9478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9480 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9481 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9482 (struct linux_target_ops) <breakpoint>: Remove.
9483 (struct linux_target_ops) <breakpoint_len>: Remove.
9484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9486 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9487 (struct linux_target_ops) <breakpoint>: Remove.
9488 (struct linux_target_ops) <breakpoint_len>: Remove.
9489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9491
94922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9493
9494 * linux-cris-low.c (cris_get_pc): Remove void arg.
9495
94962015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9497
9498 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9499 variable name.
9500
95012015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9502
9503 * inferiors.c (thread_pid_matches_callback): New function.
9504 (find_thread_process): New function.
9505 (remove_thread): Reset current_thread.
9506 (remove_process): Assert threads have been removed first.
9507
95082015-10-15 Yao Qi <yao.qi@linaro.org>
9509
9510 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9511 if it is 3.
9512 (aarch64_remove_point): Likewise.
9513 * regcache.c (regcache_register_size): New function.
9514
95152015-10-12 Yao Qi <yao.qi@linaro.org>
9516
9517 * linux-aarch64-low.c: Update all callers as emit_load_store
9518 is renamed to aarch64_emit_load_store.
9519
95202015-10-12 Yao Qi <yao.qi@linaro.org>
9521
9522 * linux-aarch64-low.c: Update all callers of function renaming
9523 from emit_insn to aarch64_emit_insn.
9524
95252015-10-12 Yao Qi <yao.qi@linaro.org>
9526
9527 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9528 arch/aarch64-insn.h.
9529 (struct aarch64_memory_operand): Likewise.
9530 (ENCODE): Likewise.
9531 (emit_insn): Move to arch/aarch64-insn.c.
9532 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9533 (emit_load_store): Move to arch/aarch64-insn.c.
9534 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9535 (can_encode_int32): Remove.
9536
95372015-10-12 Yao Qi <yao.qi@linaro.org>
9538
9539 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9540 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9541 (aarch64_relocate_instruction): Likewise.
9542 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9543 (struct aarch64_insn_visitor): Likewise.
9544
95452015-10-12 Yao Qi <yao.qi@linaro.org>
9546
9547 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9548 (struct aarch64_insn_visitor): New.
9549 (struct aarch64_insn_relocation_data): New.
9550 (aarch64_ftrace_insn_reloc_b): New function.
9551 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9552 (aarch64_ftrace_insn_reloc_cb): Likewise.
9553 (aarch64_ftrace_insn_reloc_tb): Likewise.
9554 (aarch64_ftrace_insn_reloc_adr): Likewise.
9555 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9556 (aarch64_ftrace_insn_reloc_others): Likewise.
9557 (visitor): New.
9558 (aarch64_relocate_instruction): Use visitor.
9559
95602015-10-12 Yao Qi <yao.qi@linaro.org>
9561
9562 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9563 int. Add argument buf.
9564 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9565 aarch64_relocate_instruction.
9566
95672015-10-12 Yao Qi <yao.qi@linaro.org>
9568
9569 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9570 argument insn. Remove local variable insn. Don't call
9571 target_read_uint32.
9572 (aarch64_install_fast_tracepoint_jump_pad): Call
9573 target_read_uint32.
9574
95752015-09-30 Yao Qi <yao.qi@linaro.org>
9576
9577 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9578 (emit_load_store_pair): Likewise.
9579
95802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9581
9582 * dll.c (match_dll): Add cast(s).
9583 (unloaded_dll): Likewise.
9584 * linux-low.c (second_thread_of_pid_p): Likewise.
9585 (delete_lwp_callback): Likewise.
9586 (count_events_callback): Likewise.
9587 (select_event_lwp_callback): Likewise.
9588 (linux_set_resume_request): Likewise.
9589 * server.c (accumulate_file_name_length): Likewise.
9590 (emit_dll_description): Likewise.
9591 (handle_qxfer_threads_worker): Likewise.
9592 (visit_actioned_threads): Likewise.
9593 * thread-db.c (any_thread_of): Likewise.
9594 * tracepoint.c (same_process_p): Likewise.
9595 (match_blocktype): Likewise.
9596 (build_traceframe_info_xml): Likewise.
9597
95982015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9599
9600 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9601 assignment.
9602 (gdb_unparse_agent_expr): Likewise.
9603 * hostio.c (require_data): Likewise.
9604 (handle_pread): Likewise.
9605 * linux-low.c (disable_regset): Likewise.
9606 (fetch_register): Likewise.
9607 (store_register): Likewise.
9608 (get_dynamic): Likewise.
9609 (linux_qxfer_libraries_svr4): Likewise.
9610 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9611 (set_fast_tracepoint_jump): Likewise.
9612 (uninsert_fast_tracepoint_jumps_at): Likewise.
9613 (reinsert_fast_tracepoint_jumps_at): Likewise.
9614 (validate_inserted_breakpoint): Likewise.
9615 (clone_agent_expr): Likewise.
9616 * regcache.c (init_register_cache): Likewise.
9617 * remote-utils.c (putpkt_binary_1): Likewise.
9618 (decode_M_packet): Likewise.
9619 (decode_X_packet): Likewise.
9620 (look_up_one_symbol): Likewise.
9621 (relocate_instruction): Likewise.
9622 (monitor_output): Likewise.
9623 * server.c (handle_search_memory): Likewise.
9624 (handle_qxfer_exec_file): Likewise.
9625 (handle_qxfer_libraries): Likewise.
9626 (handle_qxfer): Likewise.
9627 (handle_query): Likewise.
9628 (handle_v_cont): Likewise.
9629 (handle_v_run): Likewise.
9630 (captured_main): Likewise.
9631 * target.c (write_inferior_memory): Likewise.
9632 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9633 * tracepoint.c (init_trace_buffer): Likewise.
9634 (add_tracepoint_action): Likewise.
9635 (add_traceframe): Likewise.
9636 (add_traceframe_block): Likewise.
9637 (cmd_qtdpsrc): Likewise.
9638 (cmd_qtdv): Likewise.
9639 (cmd_qtstatus): Likewise.
9640 (response_source): Likewise.
9641 (response_tsv): Likewise.
9642 (cmd_qtnotes): Likewise.
9643 (gdb_collect): Likewise.
9644 (initialize_tracepoint): Likewise.
9645
96462015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9647
9648 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9649 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9650 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9651 <NOP>: New.
9652 (enum aarch64_condition_codes): New enum.
9653 (w0): New static global.
9654 (fp): Likewise.
9655 (lr): Likewise.
9656 (struct aarch64_memory_operand) <type>: New
9657 MEMORY_OPERAND_POSTINDEX type.
9658 (postindex_memory_operand): New helper function.
9659 (emit_ret): New function.
9660 (emit_load_store_pair): New function, factored out of emit_stp
9661 with support for MEMORY_OPERAND_POSTINDEX.
9662 (emit_stp): Rewrite using emit_load_store_pair.
9663 (emit_ldp): New function.
9664 (emit_load_store): Likewise.
9665 (emit_ldr): Mention post-index instruction in comment.
9666 (emit_ldrh): New function.
9667 (emit_ldrb): New function.
9668 (emit_ldrsw): Mention post-index instruction in comment.
9669 (emit_str): Likewise.
9670 (emit_subs): New function.
9671 (emit_cmp): Likewise.
9672 (emit_and): Likewise.
9673 (emit_orr): Likewise.
9674 (emit_orn): Likewise.
9675 (emit_eor): Likewise.
9676 (emit_mvn): Likewise.
9677 (emit_lslv): Likewise.
9678 (emit_lsrv): Likewise.
9679 (emit_asrv): Likewise.
9680 (emit_mul): Likewise.
9681 (emit_sbfm): Likewise.
9682 (emit_sbfx): Likewise.
9683 (emit_ubfm): Likewise.
9684 (emit_ubfx): Likewise.
9685 (emit_csinc): Likewise.
9686 (emit_cset): Likewise.
9687 (emit_nop): Likewise.
9688 (emit_ops_insns): New helper function.
9689 (emit_pop): Likewise.
9690 (emit_push): Likewise.
9691 (aarch64_emit_prologue): New function.
9692 (aarch64_emit_epilogue): Likewise.
9693 (aarch64_emit_add): Likewise.
9694 (aarch64_emit_sub): Likewise.
9695 (aarch64_emit_mul): Likewise.
9696 (aarch64_emit_lsh): Likewise.
9697 (aarch64_emit_rsh_signed): Likewise.
9698 (aarch64_emit_rsh_unsigned): Likewise.
9699 (aarch64_emit_ext): Likewise.
9700 (aarch64_emit_log_not): Likewise.
9701 (aarch64_emit_bit_and): Likewise.
9702 (aarch64_emit_bit_or): Likewise.
9703 (aarch64_emit_bit_xor): Likewise.
9704 (aarch64_emit_bit_not): Likewise.
9705 (aarch64_emit_equal): Likewise.
9706 (aarch64_emit_less_signed): Likewise.
9707 (aarch64_emit_less_unsigned): Likewise.
9708 (aarch64_emit_ref): Likewise.
9709 (aarch64_emit_if_goto): Likewise.
9710 (aarch64_emit_goto): Likewise.
9711 (aarch64_write_goto_address): Likewise.
9712 (aarch64_emit_const): Likewise.
9713 (aarch64_emit_call): Likewise.
9714 (aarch64_emit_reg): Likewise.
9715 (aarch64_emit_pop): Likewise.
9716 (aarch64_emit_stack_flush): Likewise.
9717 (aarch64_emit_zero_ext): Likewise.
9718 (aarch64_emit_swap): Likewise.
9719 (aarch64_emit_stack_adjust): Likewise.
9720 (aarch64_emit_int_call_1): Likewise.
9721 (aarch64_emit_void_call_2): Likewise.
9722 (aarch64_emit_eq_goto): Likewise.
9723 (aarch64_emit_ne_goto): Likewise.
9724 (aarch64_emit_lt_goto): Likewise.
9725 (aarch64_emit_le_goto): Likewise.
9726 (aarch64_emit_gt_goto): Likewise.
9727 (aarch64_emit_ge_got): Likewise.
9728 (aarch64_emit_ops_impl): New static global variable.
9729 (aarch64_emit_ops): New target function, return
9730 &aarch64_emit_ops_impl.
9731 (struct linux_target_ops): Install it.
9732
97332015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9734
9735 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9736 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9737 aarch64-ipa.o.
9738 * linux-aarch64-ipa.c: New file.
9739 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9740 and endian.h.
9741 (aarch64_get_thread_area): New target method.
9742 (extract_signed_bitfield): New helper function.
9743 (aarch64_decode_ldr_literal): New function.
9744 (enum aarch64_opcodes): New enum.
9745 (struct aarch64_register): New struct.
9746 (struct aarch64_operand): New struct.
9747 (x0): New static global.
9748 (x1): Likewise.
9749 (x2): Likewise.
9750 (x3): Likewise.
9751 (x4): Likewise.
9752 (w2): Likewise.
9753 (ip0): Likewise.
9754 (sp): Likewise.
9755 (xzr): Likewise.
9756 (aarch64_register): New helper function.
9757 (register_operand): Likewise.
9758 (immediate_operand): Likewise.
9759 (struct aarch64_memory_operand): New struct.
9760 (offset_memory_operand): New helper function.
9761 (preindex_memory_operand): Likewise.
9762 (enum aarch64_system_control_registers): New enum.
9763 (ENCODE): New macro.
9764 (emit_insn): New helper function.
9765 (emit_b): New function.
9766 (emit_bcond): Likewise.
9767 (emit_cb): Likewise.
9768 (emit_tb): Likewise.
9769 (emit_blr): Likewise.
9770 (emit_stp): Likewise.
9771 (emit_ldp_q_offset): Likewise.
9772 (emit_stp_q_offset): Likewise.
9773 (emit_load_store): Likewise.
9774 (emit_ldr): Likewise.
9775 (emit_ldrsw): Likewise.
9776 (emit_str): Likewise.
9777 (emit_ldaxr): Likewise.
9778 (emit_stxr): Likewise.
9779 (emit_stlr): Likewise.
9780 (emit_data_processing_reg): Likewise.
9781 (emit_data_processing): Likewise.
9782 (emit_add): Likewise.
9783 (emit_sub): Likewise.
9784 (emit_mov): Likewise.
9785 (emit_movk): Likewise.
9786 (emit_mov_addr): Likewise.
9787 (emit_mrs): Likewise.
9788 (emit_msr): Likewise.
9789 (emit_sevl): Likewise.
9790 (emit_wfe): Likewise.
9791 (append_insns): Likewise.
9792 (can_encode_int32_in): New helper function.
9793 (aarch64_relocate_instruction): New function.
9794 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9795 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9796 (struct linux_target_ops): Install aarch64_get_thread_area,
9797 aarch64_install_fast_tracepoint_jump_pad and
9798 aarch64_get_min_fast_tracepoint_insn_len.
9799
98002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9801
9802 * Makefile.in (aarch64-insn.o): New rule.
9803 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9804
98052015-09-21 Yao Qi <yao.qi@linaro.org>
9806
9807 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9808
98092015-09-21 Yao Qi <yao.qi@linaro.org>
9810
9811 * tracepoint.c (max_jump_pad_size): Remove.
9812
98132015-09-18 Yao Qi <yao.qi@linaro.org>
9814
9815 * linux-aarch64-low.c: Don't include sys/uio.h.
9816 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9817
98182015-09-16 Wei-cheng Wang <cole945@gmail.com>
9819
9820 * tracepoint.c (eval_result_type): Change prototype.
9821 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9822
98232015-09-15 Pedro Alves <palves@redhat.com>
9824
9825 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9826 Check whether to report exec events instead of checking whether
9827 multiprocess is enabled.
9828
98292015-09-15 Pedro Alves <palves@redhat.com>
9830
9831 PR remote/18965
9832 * remote-utils.c (prepare_resume_reply): Merge
9833 TARGET_WAITKIND_VFORK_DONE switch case with the
9834 TARGET_WAITKIND_FORKED case.
9835
98362015-09-15 Yao Qi <yao.qi@linaro.org>
9837
9838 * server.c (handle_query): Check string comparison using
9839 "else if" instead of "if".
9840
98412015-09-15 Yao Qi <yao.qi@linaro.org>
9842
9843 * server.c (vCont_supported): New global variable.
9844 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9845 matches. Append ";vContSupported+" to own_buf.
9846 (handle_v_requests): Append ";s;S" to own_buf if target supports
9847 hardware single step or vCont_supported is false.
9848 (capture_main): Set vCont_supported to zero.
9849
98502015-09-15 Yao Qi <yao.qi@linaro.org>
9851
9852 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9853 it to ...
9854 (linux_supports_hardware_single_step): ... New function.
9855 (linux_target_ops): Update.
9856 * lynx-low.c (lynx_target_ops): Set field
9857 supports_hardware_single_step to target_can_do_hardware_single_step.
9858 * nto-low.c (nto_target_ops): Likewise.
9859 * spu-low.c (spu_target_ops): Likewise.
9860 * win32-low.c (win32_target_ops): Likewise.
9861 * target.c (target_can_do_hardware_single_step): New function.
9862 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9863 Remove. <supports_hardware_single_step>: New field.
9864 (target_supports_conditional_breakpoints): Remove.
9865 (target_supports_hardware_single_step): New macro.
9866 (target_can_do_hardware_single_step): Declare.
9867 * server.c (handle_query): Use target_supports_hardware_single_step
9868 instead of target_supports_conditional_breakpoints.
9869
98702015-09-15 Yao Qi <yao.qi@linaro.org>
9871
9872 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9873 function.
9874 (struct linux_target_ops the_low_target): Install
9875 aarch64_linux_siginfo_fixup.
9876
98772015-09-11 Don Breazeal <donb@codesourcery.com>
9878 Luis Machado <lgustavo@codesourcery.com>
9879
9880 * linux-low.c (linux_mourn): Static declaration.
9881 (linux_arch_setup): Move in front of
9882 handle_extended_wait.
9883 (linux_arch_setup_thread): New function.
9884 (handle_extended_wait): Handle exec events. Call
9885 linux_arch_setup_thread. Make event_lwp argument a
9886 pointer-to-a-pointer.
9887 (check_zombie_leaders): Do not check stopped threads.
9888 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9889 (linux_low_filter_event): Add lwp and thread for exec'ing
9890 non-leader thread if leader thread has been deleted.
9891 Refactor code into linux_arch_setup_thread and call it.
9892 Pass child lwp pointer by reference to handle_extended_wait.
9893 (linux_wait_for_event_filtered): Update comment.
9894 (linux_wait_1): Prevent clobbering exec event status.
9895 (linux_supports_exec_events): New function.
9896 (linux_target_ops) <supports_exec_events>: Initialize new member.
9897 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9898 new member.
9899 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9900 * server.c (report_exec_events): New global variable.
9901 (handle_query): Handle qSupported query for exec-events feature.
9902 (captured_main): Initialize report_exec_events.
9903 * server.h (report_exec_events): Declare new global variable.
9904 * target.h (struct target_ops) <supports_exec_events>: New
9905 member.
9906 (target_supports_exec_events): New macro.
9907 * win32-low.c (win32_target_ops) <supports_exec_events>:
9908 Initialize new member.
9909
99102015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9911
9912 * linux-low.c (linux_low_enable_btrace): Remove.
9913 (linux_target_ops): Replace linux_low_enable_btrace with
9914 linux_enable_btrace.
9915
99162015-09-03 Yao Qi <yao.qi@linaro.org>
9917
9918 * linux-aarch64-low.c (aarch64_insert_point): Call
9919 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9920 returns true.
9921
99222015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9923
9924 * linux-low.c (check_stopped_by_breakpoint): Use
9925 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9926
99272015-08-27 Pedro Alves <palves@redhat.com>
9928
9929 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9930
99312015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9932
9933 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9934 the XNEW-family equivalent.
9935 (compile_bytecodes): Likewise.
9936 * dll.c (loaded_dll): Likewise.
9937 * event-loop.c (append_callback_event): Likewise.
9938 (create_file_handler): Likewise.
9939 (create_file_event): Likewise.
9940 * hostio.c (handle_open): Likewise.
9941 * inferiors.c (add_thread): Likewise.
9942 (add_process): Likewise.
9943 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9944 * linux-arm-low.c (arm_new_process): Likewise.
9945 (arm_new_thread): Likewise.
9946 * linux-low.c (add_to_pid_list): Likewise.
9947 (linux_add_process): Likewise.
9948 (handle_extended_wait): Likewise.
9949 (add_lwp): Likewise.
9950 (enqueue_one_deferred_signal): Likewise.
9951 (enqueue_pending_signal): Likewise.
9952 (linux_resume_one_lwp_throw): Likewise.
9953 (linux_resume_one_thread): Likewise.
9954 (linux_read_memory): Likewise.
9955 (linux_write_memory): Likewise.
9956 * linux-mips-low.c (mips_linux_new_process): Likewise.
9957 (mips_linux_new_thread): Likewise.
9958 (mips_add_watchpoint): Likewise.
9959 * linux-x86-low.c (initialize_low_arch): Likewise.
9960 * lynx-low.c (lynx_add_process): Likewise.
9961 * mem-break.c (set_raw_breakpoint_at): Likewise.
9962 (set_breakpoint): Likewise.
9963 (add_condition_to_breakpoint): Likewise.
9964 (add_commands_to_breakpoint): Likewise.
9965 (clone_agent_expr): Likewise.
9966 (clone_one_breakpoint): Likewise.
9967 * regcache.c (new_register_cache): Likewise.
9968 * remote-utils.c (look_up_one_symbol): Likewise.
9969 * server.c (queue_stop_reply): Likewise.
9970 (start_inferior): Likewise.
9971 (queue_stop_reply_callback): Likewise.
9972 (handle_target_event): Likewise.
9973 * spu-low.c (fetch_ppc_memory): Likewise.
9974 (store_ppc_memory): Likewise.
9975 * target.c (set_target_ops): Likewise.
9976 * thread-db.c (thread_db_load_search): Likewise.
9977 (try_thread_db_load_1): Likewise.
9978 * tracepoint.c (add_tracepoint): Likewise.
9979 (add_tracepoint_action): Likewise.
9980 (create_trace_state_variable): Likewise.
9981 (cmd_qtdpsrc): Likewise.
9982 (cmd_qtro): Likewise.
9983 (add_while_stepping_state): Likewise.
9984 * win32-low.c (child_add_thread): Likewise.
9985 (get_image_name): Likewise.
9986
99872015-08-25 Yao Qi <yao.qi@linaro.org>
9988
9989 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9990
99912015-08-25 Yao Qi <yao.qi@linaro.org>
9992
9993 * Makefile.in (aarch64-linux.o): New rule.
9994 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9995 srv_tgtobj.
9996 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9997 (aarch64_init_debug_reg_state): Make it extern.
9998 (aarch64_linux_prepare_to_resume): Remove.
9999
100002015-08-25 Yao Qi <yao.qi@linaro.org>
10001
10002 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10003 lwp_arch_private_info and ptid_of_lwp.
10004
100052015-08-25 Yao Qi <yao.qi@linaro.org>
10006
10007 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10008 Find proc_info by find_process_pid. All callers updated.
10009
100102015-08-25 Yao Qi <yao.qi@linaro.org>
10011
10012 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10013 Remove.
10014 (debug_reg_change_callback): Remove.
10015 (aarch64_notify_debug_reg_change): Remove.
10016
100172015-08-25 Yao Qi <yao.qi@linaro.org>
10018
10019 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10020 Call current_lwp_ptid.
10021
100222015-08-25 Yao Qi <yao.qi@linaro.org>
10023
10024 * linux-aarch64-low.c (debug_reg_change_callback): Use
10025 debug_printf.
10026
100272015-08-25 Yao Qi <yao.qi@linaro.org>
10028
10029 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10030
100312015-08-25 Yao Qi <yao.qi@linaro.org>
10032
10033 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10034
100352015-08-25 Yao Qi <yao.qi@linaro.org>
10036
10037 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10038 the code.
10039
100402015-08-25 Yao Qi <yao.qi@linaro.org>
10041
10042 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10043 Remove.
10044 (debug_reg_change_callback): Remove argument entry and add argument
10045 lwp. Remove local variable thread. Don't print thread id in the
10046 debugging output. Don't check whether pid of thread equals to pid.
10047 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10048 iterate_over_lwps instead find_inferior.
10049
100502015-08-24 Pedro Alves <palves@redhat.com>
10051
10052 * inferiors.c (get_first_process): New function.
10053 * inferiors.h (get_first_process): New declaration.
10054 * remote-utils.c (read_ptid): Default to the first process in the
10055 list, instead of to the current thread's process.
10056
100572015-08-24 Pedro Alves <palves@redhat.com>
10058
10059 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10060 * event-loop.c: Likewise.
10061 * remote-utils.c: Likewise.
10062 * tracepoint.c: Likewise.
10063
100642015-08-24 Pedro Alves <palves@redhat.com>
10065
10066 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10067 ptid_get_lwp.
10068
100692015-08-21 Pedro Alves <palves@redhat.com>
10070
10071 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10072 instead of literal 1.
10073
100742015-08-21 Pedro Alves <palves@redhat.com>
10075
10076 * tdesc.c (default_description): Explicitly zero-initialize.
10077
100782015-08-21 Pedro Alves <palves@redhat.com>
10079
10080 PR gdb/18749
10081 * inferiors.c (remove_thread): Discard any pending stop reply for
10082 this thread.
10083 * server.c (remove_all_on_match_pid): Rename to ...
10084 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10085 instead of a pid.
10086 (discard_queued_stop_replies): Change parameter to a ptid. Now
10087 extern.
10088 (handle_v_kill, kill_inferior_callback, captured_main)
10089 (process_serial_event): Adjust.
10090 * server.h (discard_queued_stop_replies): Declare.
10091
100922015-08-21 Pedro Alves <palves@redhat.com>
10093
10094 * linux-low.c (wait_for_sigstop): Always switch to no thread
10095 selected if the previously current thread dies.
10096 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10097 process instead of the current thread's.
10098 * remote-utils.c (input_interrupt): Don't check if there's no
10099 current thread.
10100 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10101 current thread to the general thread fails, error out.
10102 (handle_qxfer_auxv, handle_qxfer_libraries)
10103 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10104 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10105 (handle_query): Check if there's a thread selected instead of
10106 checking whether there's any thread in the thread list.
10107 (handle_qxfer_threads, handle_qxfer_btrace)
10108 (handle_qxfer_btrace_conf): Don't error out early if there's no
10109 thread in the thread list.
10110 (handle_v_cont, myresume): Don't set the current thread to the
10111 continue thread.
10112 (process_serial_event) <Hg handling>: Also set thread_id if the
10113 previous general thread is still alive.
10114 (process_serial_event) <g/G handling>: If setting the current
10115 thread to the general thread fails, error out.
10116 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10117 thread's lwp instead of the current thread's.
10118 * target.c (set_desired_thread): If the desired thread was not
10119 found, leave the current thread pointing to NULL. Return an int
10120 (boolean) indicating success.
10121 * target.h (set_desired_thread): Change return type to int.
10122
101232015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10124
10125 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10126 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10127 #includes.
10128 (ps_get_thread_area): New function.
10129
101302015-08-19 Gary Benson <gbenson@redhat.com>
10131
10132 * hostio.c (handle_pread): Do not attempt to read more data
10133 than hostio_reply_with_data can fit in a packet.
10134
101352015-08-18 Joel Brobecker <brobecker@adacore.com>
10136
10137 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10138
101392015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10140
10141 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10142
101432015-08-06 Pedro Alves <palves@redhat.com>
10144
10145 * tracepoint.c (expr_eval_result): Now an int.
10146
101472015-08-06 Pedro Alves <palves@redhat.com>
10148
10149 * gdbthread.h (struct regcache): Forward declare.
10150 (struct thread_info) <regcache_data>: Now a struct regcache
10151 pointer.
10152 * inferiors.c (inferior_regcache_data)
10153 (set_inferior_regcache_data): Now work with struct regcache
10154 pointers.
10155 * inferiors.h (struct regcache): Forward declare.
10156 (inferior_regcache_data, set_inferior_regcache_data): Now work
10157 with struct regcache pointers.
10158 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10159 (free_register_cache_thread): Remove struct regcache pointer
10160 casts.
10161
101622015-08-06 Pedro Alves <palves@redhat.com>
10163
10164 * server.c (captured_main): On error, print the exception message
10165 to stderr, and if run_once is set, throw a quit.
10166
101672015-08-06 Pedro Alves <palves@redhat.com>
10168
10169 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10170 the current thread.
10171
101722015-08-06 Pedro Alves <palves@redhat.com>
10173
10174 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10175 reading beyond the passed in buffer length.
10176
101772015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10178
10179 * tracepoint.c (symbol_list) <required>: Remove.
10180
101812015-08-06 Pedro Alves <palves@redhat.com>
10182
10183 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10184 count if stopping and suspending threads.
10185 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10186 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10187 (linux_detach): Complete an ongoing step-over.
10188 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10189 throughout.
10190 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10191 (linux_wait_1): If passing a signal to the inferior after
10192 finishing a step-over, unsuspend and re-resume all lwps. If we
10193 see a single-step event but the thread should be continuing, don't
10194 pass the trap to gdb.
10195 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10196 internal_error instead of gdb_assert.
10197 (enqueue_pending_signal): New function.
10198 (check_ptrace_stopped_lwp_gone): Add debug output.
10199 (start_step_over): Use internal_error instead of gdb_assert.
10200 (complete_ongoing_step_over): New function.
10201 (linux_resume_one_thread): Don't resume a suspended thread.
10202 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10203 it stepping.
10204
102052015-08-06 Pedro Alves <palves@redhat.com>
10206
10207 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10208 (linux_thread_alive): Use lwp_is_marked_dead.
10209 (extended_event_reported): Delete.
10210 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10211 instead of extended_event_reported.
10212 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10213 as well.
10214 (lwp_is_marked_dead): New function.
10215 (lwp_running): Use lwp_is_marked_dead.
10216 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10217 comment.
10218
102192015-08-06 Pedro Alves <palves@redhat.com>
10220
10221 * linux-low.c (linux_wait_1): Move fork event output out of the
10222 !report_to_gdb check. Pass event_child->waitstatus to
10223 target_waitstatus_to_string instead of ourstatus.
10224
102252015-08-04 Yao Qi <yao.qi@linaro.org>
10226
10227 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10228 if current_thread is 32 bit.
10229
102302015-08-04 Yao Qi <yao.qi@linaro.org>
10231
10232 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10233 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10234 * server.c (extended_protocol): Remove "static".
10235 * server.h (extended_protocol): Declare it.
10236
102372015-08-04 Yao Qi <yao.qi@linaro.org>
10238
10239 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10240 both aarch64 and aarch32.
10241 (aarch64_set_pc): Likewise.
10242
102432015-08-04 Yao Qi <yao.qi@linaro.org>
10244
10245 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10246 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10247 arm-with-neon.xml to srv_xmlfiles.
10248 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10249 (is_64bit_tdesc): New function.
10250 (aarch64_linux_read_description): New function.
10251 (aarch64_arch_setup): Call aarch64_linux_read_description.
10252 (regs_info): Rename to regs_info_aarch64.
10253 (aarch64_regs_info): Return right regs_info.
10254 (initialize_low_arch): Call initialize_low_arch_aarch32.
10255
102562015-08-04 Yao Qi <yao.qi@linaro.org>
10257
10258 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10259 * linux-aarch32-low.c: New file.
10260 * linux-aarch32-low.h: New file.
10261 * linux-arm-low.c (arm_fill_gregset): Move it to
10262 linux-aarch32-low.c.
10263 (arm_store_gregset): Likewise.
10264 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10265 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10266 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10267 (regs_info): Rename to regs_info_arm.
10268 (arm_regs_info): Return regs_info_aarch32 if
10269 have_ptrace_getregset is 1 and target description is
10270 arm_with_neon or arm_with_vfpv3.
10271 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10272 Call initialize_low_arch_aarch32 instead.
10273
102742015-08-04 Yao Qi <yao.qi@linaro.org>
10275
10276 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10277 * linux-low.c: ... here.
10278 * linux-low.h (have_ptrace_getregset): Declare it.
10279
102802015-08-04 Pedro Alves <palves@redhat.com>
10281
10282 * thread-db.c (struct thread_db): Use new typedefs.
10283 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10284 CHK calls.
10285 (disable_thread_event_reporting): Cast result of dlsym to
10286 destination function pointer type.
10287 (thread_db_mourn): Use td_ta_delete_ftype.
10288
102892015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10290
10291 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10292 arch variant.
10293 (CDX_BREAKPOINT): Define for R2.
10294 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10295 (the_low_target): Add comments.
10296
102972015-07-30 Yao Qi <yao.qi@linaro.org>
10298
10299 * linux-arm-low.c (arm_hwcap): Remove it.
10300 (arm_read_description): New local variable arm_hwcap. Don't
10301 set arm_hwcap to zero.
10302
103032015-07-30 Yao Qi <yao.qi@linaro.org>
10304
10305 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10306 Use regcache->tdesc instead.
10307 (arm_store_wmmxregset): Likewise.
10308 (arm_fill_vfpregset): Likewise.
10309 (arm_store_vfpregset): Likewise.
10310
103112015-07-30 Yao Qi <yao.qi@linaro.org>
10312
10313 * linux-arm-low.c: Include arch/arm.h.
10314 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10315 (arm_store_gregset): Likewise.
10316
103172015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10318
10319 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10320 ptrace's 4th parameter.
10321
103222015-07-27 Yao Qi <yao.qi@linaro.org>
10323
10324 * configure.srv (case aarch64*-*-linux*): Don't set
10325 srv_linux_usrregs.
10326
103272015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10328
10329 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10330 sys/ptrace.h.
10331 * linux-arm-low.c: Likewise.
10332 * linux-cris-low.c: Likewise.
10333 * linux-crisv32-low.c: Likewise.
10334 * linux-low.c: Likewise.
10335 * linux-m68k-low.c: Likewise.
10336 * linux-mips-low.c: Likewise.
10337 * linux-nios2-low.c: Likewise.
10338 * linux-s390-low.c: Likewise.
10339 * linux-sparc-low.c: Likewise.
10340 * linux-tic6x-low.c: Likewise.
10341 * linux-tile-low.c: Likewise.
10342 * linux-x86-low.c: Likewise.
10343
103442015-07-24 Pedro Alves <palves@redhat.com>
10345
10346 * config.in: Regenerate.
10347 * configure: Regenerate.
10348
103492015-07-24 Pedro Alves <palves@redhat.com>
10350
10351 * acinclude.m4: Include ../ptrace.m4.
10352 * configure.ac: Call GDB_AC_PTRACE.
10353 * config.in, configure: Regenerate.
10354
103552015-07-24 Yao Qi <yao.qi@linaro.org>
10356
10357 * linux-low.c (linux_create_inferior): Remove setting to
10358 proc->priv->new_inferior.
10359 (linux_attach): Likewise.
10360 (linux_low_filter_event): Likewise.
10361 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10362
103632015-07-24 Yao Qi <yao.qi@linaro.org>
10364
10365 * linux-low.c (linux_arch_setup): New function.
10366 (linux_low_filter_event): If proc->tdesc is NULL and
10367 proc->attached is true, call the_low_target.arch_setup.
10368 Otherwise, keep status pending, and return.
10369 (linux_resume_one_lwp_throw): Don't call get_pc if
10370 thread->while_stepping isn't NULL. Don't call
10371 get_thread_regcache if proc->tdesc is NULL.
10372 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10373 (linux_target_ops): Install arch_setup.
10374 * server.c (start_inferior): Call the_target->arch_setup.
10375 * target.h (struct target_ops) <arch_setup>: New field.
10376 (target_arch_setup): New marco.
10377 * lynx-low.c (lynx_target_ops): Update.
10378 * nto-low.c (nto_target_ops): Update.
10379 * spu-low.c (spu_target_ops): Update.
10380 * win32-low.c (win32_target_ops): Update.
10381
103822015-07-24 Yao Qi <yao.qi@linaro.org>
10383
10384 * linux-low.c (linux_add_process): Don't set
10385 proc->priv->new_inferior.
10386 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10387 (linux_attach): Likewise.
10388
103892015-07-24 Yao Qi <yao.qi@linaro.org>
10390
10391 * server.c (start_inferior): Code refactor.
10392
103932015-07-24 Yao Qi <yao.qi@linaro.org>
10394
10395 * server.c (process_serial_event): Set general_thread.
10396
103972015-07-21 Yao Qi <yao.qi@linaro.org>
10398
10399 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10400 aarch64_linux_get_debug_reg_capacity.
10401
104022015-07-17 Yao Qi <yao.qi@linaro.org>
10403
10404 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10405 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10406 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10407 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10408 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10409 (AARCH64_HWP_ALIGNMENT): Likewise.
10410 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10411 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10412 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10413 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10414 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10415 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10416 (struct aarch64_debug_reg_state): Likewise.
10417 (struct arch_lwp_info): Likewise.
10418 (aarch64_align_watchpoint): Likewise.
10419 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10420 (aarch64_watchpoint_length): Likewise.
10421 (aarch64_point_encode_ctrl_reg): Likewise
10422 (aarch64_point_is_aligned): Likewise.
10423 (aarch64_align_watchpoint): Likewise.
10424 (aarch64_linux_set_debug_regs):
10425 (aarch64_dr_state_insert_one_point): Likewise.
10426 (aarch64_dr_state_remove_one_point): Likewise.
10427 (aarch64_handle_breakpoint): Likewise.
10428 (aarch64_handle_aligned_watchpoint): Likewise.
10429 (aarch64_handle_unaligned_watchpoint): Likewise.
10430 (aarch64_handle_watchpoint): Likewise.
10431
104322015-07-17 Yao Qi <yao.qi@linaro.org>
10433
10434 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10435 and don't aarch64_get_debug_reg_state. All callers update.
10436 (aarch64_handle_aligned_watchpoint): Likewise.
10437 (aarch64_handle_unaligned_watchpoint): Likewise.
10438 (aarch64_handle_watchpoint): Likewise.
10439 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10440 (aarch64_remove_point): Likewise.
10441
104422015-07-17 Yao Qi <yao.qi@linaro.org>
10443
10444 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10445 debug_printf.
10446 (aarch64_handle_unaligned_watchpoint): Likewise.
10447
104482015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10449
10450 Revert the previous 3 commits:
10451 Move gdb_regex* to common/
10452 Move linux_find_memory_regions_full & co.
10453 gdbserver build-id attribute generator
10454
104552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10456 Jan Kratochvil <jan.kratochvil@redhat.com>
10457
10458 gdbserver build-id attribute generator.
10459 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10460 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10461 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10462 (find_phdr): New.
10463 (get_dynamic): Use find_pdhr to traverse program headers.
10464 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10465 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10466 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10467 (get_hex_build_id): New.
10468 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10469 to reply XML document.
10470
104712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10472 Jan Kratochvil <jan.kratochvil@redhat.com>
10473
10474 * target.c: Include target/target-utils.h and fcntl.h.
10475 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10476 (target_fileio_read_stralloc): New functions.
10477
104782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10479
10480 * Makefile.in (OBS): Add gdb_regex.o.
10481 (gdb_regex.o): New.
10482 * config.in: Rebuilt.
10483 * configure: Rebuilt.
10484
104852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10486 Jan Kratochvil <jan.kratochvil@redhat.com>
10487
10488 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10489 * Makefile.in (OBS): Add target-utils.o.
10490 (linux-maps.o, target-utils.o): New.
10491 * configure.srv (srv_linux_obj): Add linux-maps.o.
10492
104932015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10494
10495 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10496 function, return 1.
10497 (the_low_target): Install it.
10498
104992015-07-14 Pedro Alves <palves@redhat.com>
10500
10501 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10502 Instead, ignore ECHILD, and throw an error for other errnos.
10503
105042015-07-10 Pedro Alves <palves@redhat.com>
10505
10506 * event-loop.c (struct callback_event) <data>: Change type to
10507 gdb_client_data instance instead of gdb_client_data pointer.
10508 (append_callback_event): Adjust.
10509
105102015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10511
10512 * linux-aarch64-low.c: Add comments for each linux_target_ops
10513 method. Remove comments already covered in target_ops and
10514 linux_target_ops definitions.
10515 (the_low_target): Add comments for each unimplemented method.
10516
105172015-07-09 Yao Qi <yao.qi@linaro.org>
10518
10519 * linux-aarch64-low.c (aarch64_regmap): Remove.
10520 (aarch64_usrregs_info): Remove.
10521 (regs_info): Set field usrregs to NULL.
10522
105232015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10524
10525 * linux-low.c: Include "rsp-low.h"
10526 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10527 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10528 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10529 (handle_btrace_enable_pt): New.
10530 (handle_btrace_general_set): Support "pt".
10531 (handle_btrace_conf_general_set): Support "pt:size".
10532
105332015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10534
10535 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10536 Z_PACKET_SW_BP.
10537
105382015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10539
10540 * linux-aarch64-low.c: Remove comment about endianness.
10541 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10542 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10543 memcmp.
10544
105452015-06-24 Gary Benson <gbenson@redhat.com>
10546
10547 * linux-i386-ipa.c (stdint.h): Do not include.
10548 * lynx-i386-low.c (stdint.h): Likewise.
10549 * lynx-ppc-low.c (stdint.h): Likewise.
10550 * mem-break.c (stdint.h): Likewise.
10551 * thread-db.c (stdint.h): Likewise.
10552 * tracepoint.c (stdint.h): Likewise.
10553 * win32-low.c (stdint.h): Likewise.
10554
105552015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10556
10557 * server.c (write_qxfer_response): Update call to
10558 remote_escape_output.
10559
105602015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10561 Jan Kratochvil <jan.kratochvil@redhat.com>
10562
10563 Merge multiple hex conversions.
10564 * gdbreplay.c (tohex): Rename to 'fromhex'.
10565 (logchar): Use fromhex.
10566
105672015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10568
10569 * server.c (handle_qxfer_libraries): Set `version' attribute for
10570 <library-list>.
10571
105722015-06-10 Gary Benson <gbenson@redhat.com>
10573
10574 * target.h (struct target_ops) <multifs_open>: New field.
10575 <multifs_unlink>: Likewise.
10576 <multifs_readlink>: Likewise.
10577 * linux-low.c (nat/linux-namespaces.h): New include.
10578 (linux_target_ops): Initialize the_target->multifs_open,
10579 the_target->multifs_unlink and the_target->multifs_readlink.
10580 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10581 * hostio.c (hostio_fs_pid): New static variable.
10582 (hostio_handle_new_gdb_connection): New function.
10583 (handle_setfs): Likewise.
10584 (handle_open): Use the_target->multifs_open as appropriate.
10585 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10586 (handle_readlink): Use the_target->multifs_readlink as
10587 appropriate.
10588 (handle_vFile): Handle vFile:setfs packets.
10589 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10590 after target_handle_new_gdb_connection.
10591
105922015-06-10 Gary Benson <gbenson@redhat.com>
10593
10594 * configure.ac (AC_CHECK_FUNCS): Add setns.
10595 * config.in: Regenerate.
10596 * configure: Likewise.
10597 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10598 (linux-namespaces.o): New rule.
10599 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10600
106012015-06-09 Gary Benson <gbenson@redhat.com>
10602
10603 * hostio.c (handle_open): Process mode argument with
10604 fileio_to_host_mode.
10605
106062015-06-01 Yao Qi <yao.qi@linaro.org>
10607
10608 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10609 * linux-x86-low.c: Likewise.
10610
106112015-05-28 Don Breazeal <donb@codesourcery.com>
10612
10613 * linux-low.c (handle_extended_wait): Initialize
10614 thread_info.last_resume_kind for new fork children.
10615
106162015-05-15 Pedro Alves <palves@redhat.com>
10617
10618 * target.h (target_handle_new_gdb_connection): Rewrite using if
10619 wrapped in do/while.
10620
106212015-05-14 Joel Brobecker <brobecker@adacore.com>
10622
10623 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10624 * configure, config.in: Regenerate.
10625 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10626 Declare typedef.
10627
106282015-05-12 Don Breazeal <donb@codesourcery.com>
10629
10630 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10631 PTRACE_EVENT_VFORK_DONE.
10632 (linux_low_ptrace_options, extended_event_reported): Add vfork
10633 events.
10634 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10635 and "vforkdone" for RSP 'T' Stop Reply Packet.
10636 * server.h (report_vfork_events): Declare
10637 global variable.
10638
106392015-05-12 Don Breazeal <donb@codesourcery.com>
10640
10641 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10642 (the_low_target) <new_fork>: Initialize new member.
10643 * linux-arm-low.c (arm_new_fork): New function.
10644 (the_low_target) <new_fork>: Initialize new member.
10645 * linux-low.c (handle_extended_wait): Call new target function
10646 new_fork.
10647 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10648 * linux-mips-low.c (mips_add_watchpoint): New function
10649 extracted from mips_insert_point.
10650 (the_low_target) <new_fork>: Initialize new member.
10651 (mips_linux_new_fork): New function.
10652 (mips_insert_point): Call mips_add_watchpoint.
10653 * linux-x86-low.c (x86_linux_new_fork): New function.
10654 (the_low_target) <new_fork>: Initialize new member.
10655
106562015-05-12 Don Breazeal <donb@codesourcery.com>
10657
10658 * linux-low.c (handle_extended_wait): Implement return value,
10659 rename argument 'event_child' to 'event_lwp', handle
10660 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10661 (linux_low_ptrace_options): New function.
10662 (linux_low_filter_event): Call linux_low_ptrace_options,
10663 use different argument fo linux_enable_event_reporting,
10664 use return value from handle_extended_wait.
10665 (extended_event_reported): New function.
10666 (linux_wait_1): Call extended_event_reported and set
10667 status to report fork events.
10668 (linux_write_memory): Add pid to debug message.
10669 (reset_lwp_ptrace_options_callback): New function.
10670 (linux_handle_new_gdb_connection): New function.
10671 (linux_target_ops): Initialize new structure member.
10672 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10673 * lynx-low.c: Initialize new structure member.
10674 * remote-utils.c (prepare_resume_reply): Implement stop reason
10675 "fork" for "T" stop message.
10676 * server.c (handle_query): Call handle_new_gdb_connection.
10677 * server.h (report_fork_events): Declare global flag.
10678 * target.h (struct target_ops) <handle_new_gdb_connection>:
10679 New member.
10680 (target_handle_new_gdb_connection): New macro.
10681 * win32-low.c: Initialize new structure member.
10682
106832015-05-12 Don Breazeal <donb@codesourcery.com>
10684
10685 * mem-break.c (APPEND_TO_LIST): Define macro.
10686 (clone_agent_expr): New function.
10687 (clone_one_breakpoint): New function.
10688 (clone_all_breakpoints): New function.
10689 * mem-break.h: Declare new functions.
10690
106912015-05-12 Don Breazeal <donb@codesourcery.com>
10692
10693 * linux-low.c (linux_supports_fork_events): New function.
10694 (linux_supports_vfork_events): New function.
10695 (linux_target_ops): Initialize new structure members.
10696 (initialize_low): Call linux_check_ptrace_features.
10697 * lynx-low.c (lynx_target_ops): Initialize new structure
10698 members.
10699 * server.c (report_fork_events, report_vfork_events):
10700 New global flags.
10701 (handle_query): Add new features to qSupported packet and
10702 response.
10703 (captured_main): Initialize new global variables.
10704 * target.h (struct target_ops) <supports_fork_events>:
10705 New member.
10706 <supports_vfork_events>: New member.
10707 (target_supports_fork_events): New macro.
10708 (target_supports_vfork_events): New macro.
10709 * win32-low.c (win32_target_ops): Initialize new structure
10710 members.
10711
107122015-05-12 Gary Benson <gbenson@redhat.com>
10713
10714 * server.c (handle_qxfer_exec_file): Use current process
10715 if annex is empty.
10716
107172015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10718
10719 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10720 Remove HAVE_PTRACE_GETREGS conditionals.
10721 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10722 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10723
107242015-05-08 Yao Qi <yao.qi@linaro.org>
10725
10726 * linux-low.c (linux_supports_conditional_breakpoints): New
10727 function.
10728 (linux_target_ops): Install new target method.
10729 * lynx-low.c (lynx_target_ops): Install NULL hook for
10730 supports_conditional_breakpoints.
10731 * nto-low.c (nto_target_ops): Likewise.
10732 * spu-low.c (spu_target_ops): Likewise.
10733 * win32-low.c (win32_target_ops): Likewise.
10734 * server.c (handle_query): Check
10735 target_supports_conditional_breakpoints.
10736 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10737 New field.
10738 (target_supports_conditional_breakpoints): New macro.
10739
107402015-05-06 Pedro Alves <palves@redhat.com>
10741
10742 PR server/18081
10743 * server.c (start_inferior): If the process exits, mourn it.
10744
107452015-04-21 Gary Benson <gbenson@redhat.com>
10746
10747 * hostio.c (fileio_open_flags_to_host): Factored out to
10748 fileio_to_host_openflags in common/fileio.c. Single use
10749 updated.
10750
107512015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10752
10753 * linux-xtensa-low.c (xtensa_fill_gregset)
10754 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10755 XCHAL_HAVE_LOOP.
10756
107572015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10758
10759 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10760 (regs_info): Replace usrregs pointer with NULL.
10761
107622015-04-17 Gary Benson <gbenson@redhat.com>
10763
10764 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10765 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10766 * server.c (handle_qxfer_exec_file): New function.
10767 (qxfer_packets): Add exec-file entry.
10768 (handle_query): Report qXfer:exec-file:read as supported packet.
10769
107702015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10771
10772 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10773
107742015-04-09 Gary Benson <gbenson@redhat.com>
10775
10776 * hostio-errno.c (errno_to_fileio_error): Remove function.
10777 Update caller to use remote_fileio_to_fio_error.
10778
107792015-04-09 Yao Qi <yao.qi@linaro.org>
10780
10781 * linux-low.c (linux_insert_point): Call
10782 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10783 (linux_remove_point): Call remove_memory_breakpoint if type is
10784 raw_bkpt_type_sw.
10785 * linux-x86-low.c (x86_insert_point): Don't call
10786 insert_memory_breakpoint.
10787 (x86_remove_point): Don't call remove_memory_breakpoint.
10788
107892015-04-01 Pedro Alves <palves@redhat.com>
10790 Cleber Rosa <crosa@redhat.com>
10791
10792 * server.c (gdbserver_usage): Reorganize and extend the usage
10793 message.
10794
107952015-03-24 Pedro Alves <palves@redhat.com>
10796
10797 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10798 output. Also dump TRAP_TRACE.
10799 (linux_low_filter_event): In debug output, distinguish a
10800 resume_stop SIGSTOP from a delayed SIGSTOP.
10801
108022015-03-24 Gary Benson <gbenson@redhat.com>
10803
10804 * linux-x86-low.c (x86_linux_new_thread): Moved to
10805 nat/x86-linux.c.
10806 (x86_linux_prepare_to_resume): Likewise.
10807
108082015-03-24 Gary Benson <gbenson@redhat.com>
10809
10810 * Makefile.in (x86-linux-dregs.o): New rule.
10811 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10812 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10813 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10814 (x86_linux_dr_get): Likewise.
10815 (x86_linux_dr_set): Likewise.
10816 (update_debug_registers_callback): Likewise.
10817 (x86_linux_dr_set_addr): Likewise.
10818 (x86_linux_dr_get_addr): Likewise.
10819 (x86_linux_dr_set_control): Likewise.
10820 (x86_linux_dr_get_control): Likewise.
10821 (x86_linux_dr_get_status): Likewise.
10822 (x86_linux_update_debug_registers): Likewise.
10823
108242015-03-24 Gary Benson <gbenson@redhat.com>
10825
10826 * linux-x86-low.c (x86_linux_update_debug_registers):
10827 New function, factored out from...
10828 (x86_linux_prepare_to_resume): ...this.
10829
108302015-03-24 Gary Benson <gbenson@redhat.com>
10831
10832 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10833 (x86_linux_dr_set): Likewise.
10834 (update_debug_registers_callback): Likewise.
10835 (x86_linux_dr_set_addr): Likewise.
10836 (x86_linux_dr_get_addr): Likewise.
10837 (x86_linux_dr_set_control): Likewise.
10838 (x86_linux_dr_get_control): Likewise.
10839 (x86_linux_dr_get_status): Likewise.
10840 (x86_linux_prepare_to_resume): Likewise.
10841
108422015-03-24 Gary Benson <gbenson@redhat.com>
10843
10844 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10845 Use perror_with_name. Pass string through gettext.
10846 (x86_linux_dr_set): Likewise.
10847
108482015-03-24 Gary Benson <gbenson@redhat.com>
10849
10850 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10851 (x86_linux_dr_set_addr): ...this.
10852 (x86_dr_low_get_addr): Rename to...
10853 (x86_linux_dr_get_addr): ...this.
10854 (x86_dr_low_set_control): Rename to...
10855 (x86_linux_dr_set_control): ...this.
10856 (x86_dr_low_get_control): Rename to...
10857 (x86_linux_dr_get_control): ...this.
10858 (x86_dr_low_get_status): Rename to...
10859 (x86_linux_dr_get_status): ...this.
10860 (x86_dr_low): Update with new function names.
10861
108622015-03-24 Gary Benson <gbenson@redhat.com>
10863
10864 * Makefile.in (x86-linux.o): New rule.
10865 * configure.srv: Add x86-linux.o to relevant targets.
10866 * linux-low.c (lwp_set_arch_private_info): New function.
10867 (lwp_arch_private_info): Likewise.
10868 * linux-x86-low.c: Include nat/x86-linux.h.
10869 (arch_lwp_info): Removed structure.
10870 (update_debug_registers_callback):
10871 Use lwp_set_debug_registers_changed.
10872 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10873 and lwp_set_debug_registers_changed.
10874 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10875
108762015-03-24 Gary Benson <gbenson@redhat.com>
10877
10878 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10879 * linux-arm-low.c (arm_new_thread): Likewise.
10880 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10881 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10882 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10883 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10884
108852015-03-24 Gary Benson <gbenson@redhat.com>
10886
10887 * linux-low.c (ptid_of_lwp): New function.
10888 (lwp_is_stopped): Likewise.
10889 (lwp_stop_reason): Likewise.
10890 * linux-x86-low.c (update_debug_registers_callback):
10891 Use lwp_is_stopped.
10892 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10893 lwp_stop_reason.
10894
108952015-03-24 Gary Benson <gbenson@redhat.com>
10896
10897 * linux-low.h (linux_stop_lwp): Remove declaration.
10898
108992015-03-24 Gary Benson <gbenson@redhat.com>
10900
10901 * linux-low.h: Include nat/linux-nat.h.
10902 * linux-low.c (iterate_over_lwps_args): New structure.
10903 (iterate_over_lwps_filter): New function.
10904 (iterate_over_lwps): Likewise.
10905 * linux-x86-low.c (update_debug_registers_callback):
10906 Update signature to what iterate_over_lwps expects.
10907 Remove PID check that iterate_over_lwps now performs.
10908 (x86_dr_low_set_addr): Use iterate_over_lwps.
10909 (x86_dr_low_set_control): Likewise.
10910
109112015-03-24 Gary Benson <gbenson@redhat.com>
10912
10913 * linux-x86-low.c (x86_debug_reg_state): New function.
10914 (x86_linux_prepare_to_resume): Use the above.
10915
109162015-03-24 Gary Benson <gbenson@redhat.com>
10917
10918 * linux-low.c (current_lwp_ptid): New function.
10919 * linux-x86-low.c: Include nat/linux-nat.h.
10920 (x86_dr_low_get_addr): Use current_lwp_ptid.
10921 (x86_dr_low_get_control): Likewise.
10922 (x86_dr_low_get_status): Likewise.
10923
109242015-03-20 Pedro Alves <palves@redhat.com>
10925
10926 * tracepoint.c (cmd_qtstatus): Make "str" const.
10927
109282015-03-20 Pedro Alves <palves@redhat.com>
10929
10930 * server.c (handle_general_set): Make "req_str" const.
10931
109322015-03-19 Pedro Alves <palves@redhat.com>
10933
10934 * linux-low.c (linux_resume_one_lwp): Rename to ...
10935 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10936 instead call perror_with_name.
10937 (check_ptrace_stopped_lwp_gone): New function.
10938 (linux_resume_one_lwp): Reimplement as wrapper around
10939 linux_resume_one_lwp_throw that swallows errors if the LWP is
10940 gone.
10941
109422015-03-19 Pedro Alves <palves@redhat.com>
10943
10944 * linux-low.c (count_events_callback, select_event_lwp_callback):
10945 No longer check whether the thread has resume_stop as last resume
10946 kind.
10947
109482015-03-19 Pedro Alves <palves@redhat.com>
10949
10950 * linux-low.c (count_events_callback, select_event_lwp_callback):
10951 Use the lwp's status_pending_p field, not the thread's.
10952
109532015-03-19 Pedro Alves <palves@redhat.com>
10954
10955 * linux-low.c (select_event_lwp_callback): Update comments to
10956 no longer mention SIGTRAP.
10957
109582015-03-18 Gary Benson <gbenson@redhat.com>
10959
10960 * server.c (handle_query): Do not report vFile:fstat as supported.
10961
109622015-03-11 Gary Benson <gbenson@redhat.com>
10963
10964 * hostio.c (sys/types.h): New include.
10965 (sys/stat.h): Likewise.
10966 (common-remote-fileio.h): Likewise.
10967 (handle_fstat): New function.
10968 (handle_vFile): Handle vFile:fstat packets.
10969
109702015-03-11 Gary Benson <gbenson@redhat.com>
10971
10972 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10973 struct stat.st_blocks and struct stat.st_blksize.
10974 * configure: Regenerate.
10975 * config.in: Likewise.
10976 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10977 (OBS): Add common-remote-fileio.o.
10978 (common-remote-fileio.o): New rule.
10979
109802015-03-09 Pedro Alves <palves@redhat.com>
10981
10982 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10983 'struct sockaddr' pointer in 'accept' call.
10984
109852015-03-09 Pedro Alves <palves@redhat.com>
10986
10987 Revert:
10988 2015-03-07 Pedro Alves <palves@redhat.com>
10989 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10990 or <winsock2.h> here. Instead include "gdb_socket.h".
10991 (remote_open): Use union gdb_sockaddr_u.
10992 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10993 or <winsock2.h> here. Instead include "gdb_socket.h".
10994 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10995 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10996 or <sys/un.h>.
10997 (init_named_socket, gdb_agent_helper_thread): Use union
10998 gdb_sockaddr_u.
10999
110002015-03-07 Pedro Alves <palves@redhat.com>
11001
11002 * configure.ac (build_warnings): Move
11003 -Wdeclaration-after-statement to the C-specific set.
11004 * configure: Regenerate.
11005
110062015-03-07 Pedro Alves <palves@redhat.com>
11007
11008 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11009 or <winsock2.h> here. Instead include "gdb_socket.h".
11010 (remote_open): Use union gdb_sockaddr_u.
11011 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11012 or <winsock2.h> here. Instead include "gdb_socket.h".
11013 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11014 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11015 or <sys/un.h>.
11016 (init_named_socket, gdb_agent_helper_thread): Use union
11017 gdb_sockaddr_u.
11018
110192015-03-07 Pedro Alves <palves@redhat.com>
11020
11021 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11022 instead.
11023
110242015-03-06 Yao Qi <yao.qi@linaro.org>
11025
11026 * linux-aarch64-low.c (aarch64_insert_point): Use
11027 show_debug_regs as a boolean.
11028 (aarch64_remove_point): Likewise.
11029
110302015-03-05 Pedro Alves <palves@redhat.com>
11031
11032 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11033 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11034 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11035 * nto-low.c (nto_target_ops): Likewise.
11036 * spu-low.c (spu_target_ops): Likewise.
11037 * win32-low.c (win32_target_ops): Likewise.
11038
110392015-03-04 Pedro Alves <palves@redhat.com>
11040
11041 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11042 Decide whether a breakpoint triggered based on the SIGTRAP's
11043 siginfo.si_code.
11044 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11045 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11046 (linux_low_filter_event): Check for breakpoints before checking
11047 watchpoints.
11048 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11049 siginfo.si_code.
11050 (linux_stopped_by_sw_breakpoint)
11051 (linux_supports_stopped_by_sw_breakpoint)
11052 (linux_stopped_by_hw_breakpoint)
11053 (linux_supports_stopped_by_hw_breakpoint): New functions.
11054 (linux_target_ops): Install new target methods.
11055
110562015-03-04 Pedro Alves <palves@redhat.com>
11057
11058 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11059 * server.c (swbreak_feature, hwbreak_feature): New globals.
11060 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11061 (captured_main): Clear swbreak_feature and hwbreak_feature.
11062 * server.h (swbreak_feature, hwbreak_feature): Declare.
11063 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11064 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11065 supports_stopped_by_hw_breakpoint>: New fields.
11066 (target_supports_stopped_by_sw_breakpoint)
11067 (target_stopped_by_sw_breakpoint)
11068 (target_supports_stopped_by_hw_breakpoint)
11069 (target_stopped_by_hw_breakpoint): Declare.
11070
110712015-03-04 Pedro Alves <palves@redhat.com>
11072
11073 enum lwp_stop_reason -> enum target_stop_reason
11074 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11075 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11076 (linux_wait_1, stuck_in_jump_pad_callback)
11077 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11078 (linux_stopped_by_watchpoint):
11079 * linux-low.h (enum lwp_stop_reason): Delete.
11080 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11081 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11082
110832015-03-04 Yao Qi <yao.qi@linaro.org>
11084
11085 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11086
110872015-03-03 Gary Benson <gbenson@redhat.com>
11088
11089 * hostio.c (handle_vFile): Fix prefix lengths.
11090
110912015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11092
11093 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11094 ptr_bits.
11095
110962015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11097
11098 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11099 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11100 (clean): Add "rm -f" for above C files.
11101 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11102 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11103 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11104 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11105 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11106 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11107 (init_registers_s390x_vx_linux64)
11108 (init_registers_s390x_tevx_linux64)
11109 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11110 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11111 declarations.
11112 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11113 (s390_store_vxrs_high): New functions.
11114 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11115 NT_S390_VXRS_HIGH.
11116 (s390_arch_setup): Add logic for selecting one of the new target
11117 descriptions. Activate the new vector regsets if applicable.
11118 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11119 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11120 and init_registers_s390x_tevx_linux64.
11121
111222015-03-01 Pedro Alves <palves@redhat.com>
11123
11124 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11125 parameter.
11126
111272015-02-27 Pedro Alves <palves@redhat.com>
11128
11129 * linux-x86-low.c (u_debugreg_offset): New function.
11130 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11131
111322015-02-27 Pedro Alves <palves@redhat.com>
11133
11134 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11135 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11136 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11137 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11138 (ps_lsetfpregs, ps_getpid)
11139 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11140 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11141 (ps_lsetxregs, ps_plog): Declare.
11142
111432015-02-27 Pedro Alves <palves@redhat.com>
11144
11145 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11146 IP_AGENT_EXPORT_FUNC.
11147 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11148 IP_AGENT_EXPORT_FUNC.
11149 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11150 (IP_AGENT_EXPORT): Delete.
11151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11153 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11154 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11155 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11156 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11157 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11158 (traceframe_read_count, traceframe_write_count)
11159 (traceframes_created, trace_state_variables, get_raw_reg)
11160 (get_trace_state_variable_value, set_trace_state_variable_value)
11161 (ust_loaded, helper_thread_id, cmd_buf): Use
11162 IPA_SYM_EXPORTED_NAME.
11163 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11164 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11165 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11166 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11167 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11168 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11169 EXTERN_C_PUSH/EXTERN_C_POP.
11170 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11171 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11172 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11173 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11174 (traceframe_write_count, traceframe_read_count)
11175 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11176 (about_to_request_buffer_space, get_trace_state_variable_value)
11177 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11178 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11179 EXTERN_C_PUSH/EXTERN_C_POP.
11180 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11181 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11182 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11183 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11184 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11185 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11186 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11187 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11188 Define.
11189 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11190 (IP_AGENT_EXPORT_VAR_DECL): Define.
11191 (tracing): Declare.
11192 (gdb_agent_get_raw_reg): Declare.
11193
111942015-02-27 Tom Tromey <tromey@redhat.com>
11195 Pedro Alves <palves@redhat.com>
11196
11197 Rename symbols whose names are reserved C++ keywords throughout.
11198
111992015-02-27 Pedro Alves <palves@redhat.com>
11200
11201 * Makefile.in (COMPILER): New, get it from autoconf.
11202 (CXX): Get from autoconf instead.
11203 (COMPILE.pre): Use COMPILER.
11204 (CC-LD): Rename to ...
11205 (CC_LD): ... this. Use COMPILER.
11206 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11207 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11208 * acinclude.m4: Include build-with-cxx.m4.
11209 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11210 Disable -Werror by default if building in C++ mode.
11211 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11212 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11213 the C++ compiler. Save/restore CXXFLAGS too.
11214 * configure: Regenerate.
11215
112162015-02-27 Pedro Alves <palves@redhat.com>
11217
11218 * acinclude.m4: Include libiberty.m4.
11219 * configure.ac: Call libiberty_INIT.
11220 * config.in, configure: Regenerate.
11221
112222015-02-26 Pedro Alves <palves@redhat.com>
11223
11224 * linux-low.c (linux_wait_1): When incrementing the PC past a
11225 program breakpoint always use the_low_target.breakpoint_len as
11226 increment, rather than the maximum between that and
11227 the_low_target.decr_pc_after_break.
11228
112292015-02-23 Pedro Alves <palves@redhat.com>
11230
11231 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11232 thread was doing a step-over; always adjust the PC if
11233 we stepped over a permanent breakpoint.
11234 (linux_wait_1): If we stepped over breakpoint that was on top of a
11235 permanent breakpoint, manually advance the PC past it.
11236
112372015-02-23 Pedro Alves <palves@redhat.com>
11238
11239 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11240 modes.
11241 (x86_fill_gregset, x86_store_gregset): Use it when handling
11242 $orig_eax.
11243
112442015-02-20 Pedro Alves <palves@redhat.com>
11245
11246 * thread-db.c: Include "nat/linux-procfs.h".
11247 (thread_db_init): Skip listing new threads if the kernel supports
11248 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11249
112502015-02-20 Pedro Alves <palves@redhat.com>
11251
11252 * linux-low.c (status_pending_p_callback): Use ptid_match.
11253
112542015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11255
11256 PR breakpoints/16812
11257 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11258 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11259 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11260
112612015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11262
11263 PR breakpoints/15956
11264 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11265
112662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11267
11268 * linux-low.c (linux_low_btrace_conf): Print size.
11269 * server.c (handle_btrace_conf_general_set): New.
11270 (hanle_general_set): Call handle_btrace_conf_general_set.
11271 (handle_query): Report Qbtrace-conf:bts:size as supported.
11272
112732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11274
11275 * linux-low.c (linux_low_enable_btrace): Update parameters.
11276 (linux_low_btrace_conf): New.
11277 (linux_target_ops)<to_btrace_conf>: Initialize.
11278 * server.c (current_btrace_conf): New.
11279 (handle_btrace_enable): Rename to ...
11280 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11281 to target_enable_btrace. Update comment. Update users.
11282 (handle_qxfer_btrace_conf): New.
11283 (qxfer_packets): Add btrace-conf entry.
11284 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11285 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11286 (target_ops)<read_btrace_conf>: New.
11287 (target_enable_btrace): Update parameters.
11288 (target_read_btrace_conf): New.
11289
112902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11291
11292 * server.c (handle_btrace_general_set): Remove call to
11293 target_supports_btrace.
11294 (supported_btrace_packets): New.
11295 (handle_query): Call supported_btrace_packets.
11296 * target.h: include btrace-common.h.
11297 (btrace_target_info): Removed.
11298 (supports_btrace, target_supports_btrace): Update parameters.
11299
113002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11301
11302 * Makefile.in (SFILES): Add common/btrace-common.c.
11303 (OBS): Add common/btrace-common.o.
11304 (btrace-common.o): Add build rules.
11305 * linux-low: Include btrace-common.h.
11306 (linux_low_read_btrace): Use struct btrace_data. Call
11307 btrace_data_init and btrace_data_fini.
11308
113092015-02-06 Pedro Alves <palves@redhat.com>
11310
11311 * thread-db.c (find_new_threads_callback): Add debug output.
11312
113132015-02-04 Pedro Alves <palves@redhat.com>
11314
11315 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11316 (resume_stopped_resumed_lwps): New function.
11317 (linux_wait_for_event_filtered): Use it.
11318
113192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11320
11321 * Makefile.in (SFILES): Add linux-personality.c.
11322 (linux-personality.o): New rule.
11323 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11324 list of objects to be built.
11325 * linux-low.c: Include nat/linux-personality.h.
11326 (linux_create_inferior): Remove code to disable address space
11327 randomization (moved to ../nat/linux-personality.c). Create
11328 cleanup to disable address space randomization.
11329
113302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11331
11332 * Makefile.in (posix-strerror.o): New rule.
11333 (mingw-strerror.o): Likewise.
11334 * configure: Regenerated.
11335 * configure.ac: Source file ../common/common.host. Initialize new
11336 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11337
113382015-01-14 Yao Qi <yao@codesourcery.com>
11339
11340 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11341 (ppc-linux.o): New rule.
11342 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11343 * configure.ac: AC_CHECK_FUNCS(getauxval).
11344 * config.in: Re-generated.
11345 * configure: Re-generated.
11346 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11347 ppc64_64bit_inferior_p
11348
113492015-01-14 Yao Qi <yao@codesourcery.com>
11350
11351 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11352 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11353 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11354 (PT_ORIG_R3, PT_TRAP): Likewise.
11355 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11356 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11357 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11358
113592015-01-10 Joel Brobecker <brobecker@adacore.com>
11360
11361 * i387-fp.c (i387_cache_to_xsave): In look over
11362 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11363 zmmh_low_space field by use of zmmh_high_space.
11364
113652015-01-09 Pedro Alves <palves@redhat.com>
11366
11367 * linux-low.c (step_over_bkpt): Move higher up in the file.
11368 (handle_extended_wait): Don't store the stop_pc here.
11369 (get_stop_pc): Adjust comments and rename to ...
11370 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11371 stopped for a software breakpoint or hardware breakpoint.
11372 (thread_still_has_status_pending_p): New function.
11373 (status_pending_p_callback): Use
11374 thread_still_has_status_pending_p. If the event is no longer
11375 interesting, resume the LWP.
11376 (handle_tracepoints): Add assert.
11377 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11378 (wstatus_maybe_breakpoint): New function.
11379 (cancel_breakpoint): Delete function.
11380 (check_stopped_by_watchpoint): New function, factored out from
11381 linux_low_filter_event.
11382 (lp_status_maybe_breakpoint): Delete function.
11383 (linux_low_filter_event): Remove filter_ptid argument.
11384 Leave thread group exits pending here. Store the LWP's stop PC.
11385 Always leave events pending.
11386 (linux_wait_for_event_filtered): Pull all events out of the
11387 kernel, and leave them all pending.
11388 (count_events_callback, select_event_lwp_callback): Consider all
11389 events.
11390 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11391 (select_event_lwp): Only give preference to the stepping LWP in
11392 all-stop mode. Adjust comments.
11393 (ignore_event): New function.
11394 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11395 references to cancel_breakpoints. Adjust to renames. Also give
11396 equal priority to all LWPs that have had events in non-stop mode.
11397 If reporting a software breakpoint event, unadjust the LWP's PC.
11398 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11399 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11400 Adjust.
11401 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11402 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11403 (linux_stopped_by_watchpoint): Adjust.
11404 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11405 * linux-low.h (enum lwp_stop_reason): New.
11406 (struct lwp_info) <stop_pc>: Adjust comment.
11407 <stopped_by_watchpoint>: Delete field.
11408 <stop_reason>: New field.
11409 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11410 * mem-break.c (software_breakpoint_inserted_here)
11411 (hardware_breakpoint_inserted_here): New function.
11412 * mem-break.h (software_breakpoint_inserted_here)
11413 (hardware_breakpoint_inserted_here): Declare.
11414 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11415 (cancel_breakpoints): Delete.
11416 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11417 (upload_fast_traceframes): Remove references to
11418 cancel_breakpoints.
11419
114202015-01-09 Pedro Alves <palves@redhat.com>
11421
11422 * thread-db.c (find_new_threads_callback): Ignore thread if the
11423 kernel thread ID is -1.
11424
114252015-01-09 Pedro Alves <palves@redhat.com>
11426
11427 * linux-low.c (linux_attach_fail_reason_string): Move to
11428 nat/linux-ptrace.c, and rename.
11429 (linux_attach_lwp): Update comment.
11430 (attach_proc_task_lwp_callback): New function.
11431 (linux_attach): Adjust to rename and use
11432 linux_proc_attach_tgid_threads.
11433 (linux_attach_fail_reason_string): Delete declaration.
11434
114352015-01-01 Joel Brobecker <brobecker@adacore.com>
11436
11437 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11438 * server.c (gdbserver_version): Likewise.
11439
114402014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11441
11442 * remote-utils.c: Include ctype.h.
11443 (input_interrupt): Explicitly handle the case when the char
11444 received is the NUL byte. Improve the printing of non-ASCII
11445 characters.
11446
114472014-12-16 Joel Brobecker <brobecker@adacore.com>
11448
11449 * linux-low.c (linux_low_filter_event): Update call to
11450 linux_enable_event_reporting following the addition of
11451 a new parameter to that function.
11452
114532014-12-16 Catalin Udma <catalin.udma@freescale.com>
11454
11455 PR server/17457
11456 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11457 (AARCH64_FPCR_REGNO): Likewise.
11458 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11459 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11460 (aarch64_store_fpregset): Likewise.
11461
114622014-12-15 Joel Brobecker <brobecker@adacore.com>
11463
11464 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11465 Remove FIXME comment about assumption about N.
11466
114672014-12-13 Joel Brobecker <brobecker@adacore.com>
11468
11469 * configure.ac: If large-file support is disabled in GDBserver,
11470 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11471 * configure: Regenerate.
11472
114732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11474
11475 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11476 warning upon ENODATA from ptrace.
11477 * linux-s390-low.c (s390_store_tdb): New.
11478 (s390_regsets): Add regset for NT_S390_TDB.
11479
114802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11481
11482 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11483 without a fill_function.
11484 * linux-s390-low.c (s390_fill_last_break): Remove.
11485 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11486 (s390_arch_setup): Use regset's size instead of fill_function for
11487 loop end condition.
11488
114892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11490
11491 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11492 the regset's store function when ptrace returned an error.
11493 * regcache.c (get_thread_regcache): Invalidate register cache
11494 before fetching inferior's registers.
11495
114962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11497
11498 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11499 while-loop as for-loop.
11500 (regsets_store_inferior_registers): Likewise.
11501
115022014-11-28 Yao Qi <yao@codesourcery.com>
11503
11504 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11505 * config.in, configure: Re-generate.
11506 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11507 is defined.
11508
115092014-11-21 Yao Qi <yao@codesourcery.com>
11510
11511 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11512 (AC_CHECK_HEADERS): Remove malloc.h.
11513 * configure: Re-generated.
11514 * config.in: Re-generated.
11515 * server.h: Don't include alloca.h and malloc.h.
11516 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11517 Don't include malloc.h.
11518
115192014-11-17 Joel Brobecker <brobecker@adacore.com>
11520
11521 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11522 corresponding ERRNO check in same block.
11523
115242014-11-12 Pedro Alves <palves@redhat.com>
11525
11526 * server.c (cont_thread): Update comment.
11527 (start_inferior, attach_inferior): No longer clear cont_thread.
11528 (handle_v_cont): No longer set cont_thread.
11529 (captured_main): Clear cont_thread each time a GDB connects.
11530
115312014-11-12 Pedro Alves <palves@redhat.com>
11532
11533 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11534 thread, and don't resume all threads if the Hc thread has exited.
11535
115362014-11-12 Pedro Alves <palves@redhat.com>
11537
11538 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11539 the process group instead of to a specific LWP.
11540
115412014-10-15 Pedro Alves <palves@redhat.com>
11542
11543 PR server/17487
11544 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11545 parameter.
11546 (arm_set_thread_context): Delete.
11547 (the_low_target): Adjust.
11548 * win32-i386-low.c (debug_registers_changed)
11549 (debug_registers_used): Delete.
11550 (update_debug_registers_callback): New function.
11551 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11552 needing to update their debug registers.
11553 (win32_get_current_dr): New function.
11554 (x86_dr_low_get_addr, x86_dr_low_get_control)
11555 (x86_dr_low_get_status): Fetch the debug register from the thread
11556 record's context.
11557 (i386_initial_stuff): Adjust.
11558 (i386_get_thread_context): Remove current_event parameter. Don't
11559 clear debug_registers_changed nor copy DR values to
11560 debug_reg_state.
11561 (i386_set_thread_context): Delete.
11562 (i386_prepare_to_resume): New function.
11563 (i386_thread_added): Mark the thread as needing to update irs
11564 debug registers.
11565 (the_low_target): Remove i386_set_thread_context and install
11566 i386_prepare_to_resume.
11567 * win32-low.c (win32_get_thread_context): Adjust.
11568 (win32_set_thread_context): Use SetThreadContext
11569 directly.
11570 (win32_prepare_to_resume): New function.
11571 (win32_require_context): New function, factored out from ...
11572 (thread_rec): ... this.
11573 (continue_one_thread): Call win32_prepare_to_resume on each thread
11574 we're about to continue.
11575 (win32_resume): Call win32_prepare_to_resume on the event thread.
11576 * win32-low.h (struct win32_thread_info)
11577 <debug_registers_changed>: New field.
11578 (struct win32_target_ops): Change prototype of set_thread_context,
11579 delete set_thread_context and add prepare_to_resume.
11580 (win32_require_context): New declaration.
11581
115822014-10-08 Gary Benson <gbenson@redhat.com>
11583
11584 * server.h: Do not include common-exceptions.h.
11585
115862014-10-08 Gary Benson <gbenson@redhat.com>
11587
11588 * server.h: Do not include cleanups.h.
11589
115902014-09-30 James Hogan <james.hogan@imgtec.com>
11591
11592 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11593 mips64-dsp-linux.c.
11594
115952014-09-23 Yao Qi <yao@codesourcery.com>
11596
11597 * linux-low.c (lp_status_maybe_breakpoint): New function.
11598 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11599 (count_events_callback): Likewise.
11600 (select_event_lwp_callback): Likewise.
11601 (cancel_breakpoints_callback): Likewise.
11602
116032014-09-19 Don Breazeal <donb@codesourcery.com>
11604
11605 * linux-low.c (handle_extended_wait): Call
11606 linux_ptrace_get_extended_event.
11607 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11608 linux_is_extended_waitstatus.
11609
116102014-09-16 Joel Brobecker <brobecker@adacore.com>
11611
11612 * Makefile.in (CPPFLAGS): Define.
11613 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11614 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11615
116162014-09-16 Gary Benson <gbenson@redhat.com>
11617
11618 * inferiors.h (current_inferior): Renamed as...
11619 (current_thread): New variable. All uses updated.
11620 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11621 (maybe_move_out_of_jump_pad): Likewise.
11622 (cancel_breakpoint): Likewise.
11623 (linux_low_filter_event): Likewise.
11624 (wait_for_sigstop): Likewise.
11625 (linux_resume_one_lwp): Likewise.
11626 (need_step_over_p): Likewise.
11627 (start_step_over): Likewise.
11628 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11629 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11630 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11631 and save_inferior as saved_thread.
11632 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11633 saved_thread.
11634 (regcache_invalidate_thread): Likewise.
11635 * remote-utils.c (prepare_resume_reply): Likewise.
11636 * thread-db.c (thread_db_get_tls_address): Likewise.
11637 (disable_thread_event_reporting): Likewise.
11638 (remove_thread_event_breakpoints): Likewise.
11639 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11640 as saved_thread.
11641 * target.h (set_desired_inferior): Renamed as...
11642 (set_desired_thread): New declaration. All uses updated.
11643 * server.c (myresume): Updated comment to reference thread instead
11644 of inferior.
11645 (handle_serial_event): Likewise.
11646 (handle_target_event): Likewise.
11647
116482014-09-12 Tom Tromey <tromey@redhat.com>
11649 Gary Benson <gbenson@redhat.com>
11650
11651 * regcache.h: Include common-regcache.h.
11652 (regcache_read_pc): Don't declare.
11653 * regcache.c (get_thread_regcache_for_ptid): New function.
11654
116552014-09-11 Tom Tromey <tromey@redhat.com>
11656 Gary Benson <gbenson@redhat.com>
11657
11658 * symbol.c: New file.
11659 * Makefile.in (SFILES): Add symbol.c.
11660 (OBS): Add symbol.o.
11661
116622014-09-11 Gary Benson <gbenson@redhat.com>
11663
11664 * target.c (target_stop_ptid, target_continue_ptid): New
11665 functions.
11666
116672014-09-11 Tom Tromey <tromey@redhat.com>
11668 Gary Benson <gbenson@redhat.com>
11669
11670 * target.h: Include target/target.h.
11671 * target.c (target_read_memory, target_read_uint32)
11672 (target_write_memory): New functions.
11673
116742014-09-11 Gary Benson <gbenson@redhat.com>
11675
11676 * server.h (debug_hw_points): Don't declare.
11677 * server.c (debug_hw_points): Don't define. Replace all uses
11678 with show_debug_regs.
11679 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11680 all uses with show_debug_regs.
11681
116822014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11683
11684 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11685 endianness into account.
11686 (ppc_supply_ptrace_register): Likewise.
11687
116882014-09-03 James Hogan <james.hogan@imgtec.com>
11689
11690 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11691 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11692
116932014-09-03 Gary Benson <gbenson@redhat.com>
11694
11695 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11696 ALL_DEBUG_ADDRESS_REGISTERS.
11697
116982014-09-02 Gary Benson <gbenson@redhat.com>
11699
11700 * i386-low.h: Renamed as...
11701 * x86-low.h: New file. All type, function and variable name
11702 prefixes changed from "i386_" to "x86_". All references updated.
11703 * i386-low.c: Renamed as...
11704 * x86-low.c: New file. All type, function and variable name
11705 prefixes changed from "i386_" to "x86_". All references updated.
11706
117072014-09-02 Gary Benson <gbenson@redhat.com>
11708
11709 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11710 (x86_linux_new_thread): Likewise.
11711
117122014-08-29 Gary Benson <gbenson@redhat.com>
11713
11714 * server.h (setjmp.h): Do not include.
11715 (toplevel): Do not declare.
11716 (common-exceptions.h): Include.
11717 (cleanups.h): Likewise.
11718 * server.c (toplevel): Do not define.
11719 (exit_code): New static global.
11720 (detach_or_kill_for_exit_cleanup): New function.
11721 (main): New function. Original main renamed to...
11722 (captured_main): New function.
11723 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11724
117252014-08-29 Gary Benson <gbenson@redhat.com>
11726
11727 * Makefile.in (SFILES): Add common/common-exceptions.c.
11728 (OBS): Add common-exceptions.o.
11729 (common-exceptions.o): New rule.
11730 * utils.c (prepare_to_throw_exception): New function.
11731
117322014-08-29 Gary Benson <gbenson@redhat.com>
11733
11734 * config.in: Regenerate.
11735 * configure: Likewise.
11736
117372014-08-29 Gary Benson <gbenson@redhat.com>
11738
11739 * Makefile.in (SFILES): Add common/cleanups.c.
11740 (OBS): cleanups.o.
11741 (cleanups.o): New rule.
11742
117432014-08-29 Gary Benson <gbenson@redhat.com>
11744
11745 * utils.c (internal_vwarning): New function.
11746
117472014-08-28 Gary Benson <gbenson@redhat.com>
11748
11749 * utils.h (fatal): Remove declaration.
11750 * utils.c (fatal): Remove function.
11751
117522014-08-28 Gary Benson <gbenson@redhat.com>
11753
11754 * tracepoint.c (gdb_agent_init): Replace fatal with
11755 perror_with_name.
11756 (initialize_tracepoint): Likewise.
11757
117582014-08-28 Gary Benson <gbenson@redhat.com>
11759
11760 * remote-utils.c (remote_prepare): Replace fatal with error.
11761
117622014-08-28 Gary Benson <gbenson@redhat.com>
11763
11764 * linux-low.c (linux_async): Replace fatal with warning.
11765 Tidy up and return.
11766 (linux_start_non_stop): Return -1 if linux_async failed.
11767
117682014-08-28 Gary Benson <gbenson@redhat.com>
11769
11770 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11771 gdb_assert.
11772 (i386_dr_low_get_addr): Remove vague comment.
11773 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11774 gdb_assert.
11775
117762014-08-28 Gary Benson <gbenson@redhat.com>
11777
11778 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11779 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11780 internal_error.
11781 (linux_resume_one_lwp): Likewise.
11782 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11783 gdb_assert.
11784 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11785 with internal_error.
11786 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11787 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11788 (find_register_by_name): Replace fatal with internal_error.
11789 (find_regno): Likewise.
11790 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11791 * thread-db.c (thread_db_create_event): Likewise.
11792 (thread_db_load_search): Likewise.
11793 (try_thread_db_load_1): Likewise.
11794 * tracepoint.c (get_jump_space_head): Replace fatal with
11795 internal_error.
11796 (claim_trampoline_space): Likewise.
11797 (have_fast_tracepoint_trampoline_buffer): Likewise.
11798 (cmd_qtstart): Likewise.
11799 (stop_tracing): Likewise.
11800 (fast_tracepoint_collecting): Likewise.
11801 (target_malloc): Likewise.
11802 (download_tracepoint): Likewise.
11803 (download_trace_state_variables): Replace check with gdb_assert.
11804 (upload_fast_traceframes): Replace fatal with internal_error.
11805
118062014-08-19 Tom Tromey <tromey@redhat.com>
11807 Gary Benson <gbenson@redhat.com>
11808
11809 * Makefile.in (SFILES): Add common/common-debug.c.
11810 (OBS): Add common-debug.o.
11811 (common-debug.o): New rule.
11812 * debug.h (debug_printf): Don't declare.
11813 * debug.c (debug_printf): Renamed and rewritten as...
11814 (debug_vprintf): New function.
11815
118162014-08-19 Gary Benson <gbenson@redhat.com>
11817
11818 * utils.h: Do not include print-utils.h.
11819
118202014-08-19 Tom Tromey <tromey@redhat.com>
11821 Gary Benson <gbenson@redhat.com>
11822
11823 * server.h: Add static assertion.
11824 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11825
118262014-08-19 Tom Tromey <tromey@redhat.com>
11827 Gary Benson <gbenson@redhat.com>
11828
11829 * Makefile.in (SFILES): Add common/errors.c.
11830 (OBS): Add errors.o.
11831 (IPA_OBS): Add errors-ipa.o.
11832 (errors.o): New rule.
11833 (errors-ipa.o): Likewise.
11834 * utils.h (perror_with_name, error, warning): Don't declare.
11835 * utils.c (warning): Renamed and rewritten as...
11836 (vwarning): New function.
11837 (error): Renamed and rewritten as...
11838 (verror): New function.
11839 (internal_error): Renamed and rewritten as...
11840 (internal_verror): New function.
11841
118422014-08-07 Gary Benson <gbenson@redhat.com>
11843
11844 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11845 * configure: Regenerate.
11846 * config.in: Likewise.
11847 * server.h: Do not include errno.h.
11848 * event-loop.c: Likewise.
11849 * hostio-errno.c: Likewise.
11850 * linux-low.c: Likewise.
11851 * remote-utils.c: Likewise.
11852 * spu-low.c: Likewise.
11853 * utils.c: Likewise.
11854 * gdbreplay.c: Unconditionally include errno.h.
11855
118562014-08-07 Gary Benson <gbenson@redhat.com>
11857
11858 * server.h: Do not include string.h.
11859 * event-loop.c: Likewise.
11860 * linux-low.c: Likewise.
11861 * regcache.c: Likewise.
11862 * remote-utils.c: Likewise.
11863 * spu-low.c: Likewise.
11864 * utils.c: Likewise.
11865
118662014-08-07 Gary Benson <gbenson@redhat.com>
11867
11868 * server.h: Do not include gdb_assert.h.
11869
118702014-08-07 Gary Benson <gbenson@redhat.com>
11871
11872 * server.h: Do not include common-utils.h.
11873
118742014-08-07 Gary Benson <gbenson@redhat.com>
11875
11876 * server.h: Do not include ptid.h.
11877 * notif.h: Likewise.
11878
118792014-08-07 Gary Benson <gbenson@redhat.com>
11880
11881 * server.h: Do not include gdb_locale.h.
11882
118832014-08-07 Gary Benson <gbenson@redhat.com>
11884
11885 * server.h: Do not include gdb/signals.h.
11886 * win32-low.c: Likewise.
11887
118882014-08-07 Gary Benson <gbenson@redhat.com>
11889
11890 * server.h: Do not include pathmax.h.
11891
118922014-08-07 Gary Benson <gbenson@redhat.com>
11893
11894 * server.h: Do not include libiberty.h.
11895 * linux-bfin-low.c: Likewise.
11896
118972014-08-07 Gary Benson <gbenson@redhat.com>
11898
11899 * server.h: Do not include ansidecl.h.
11900
119012014-08-07 Gary Benson <gbenson@redhat.com>
11902
11903 * linux-x86-low.c: Do not include stddef.h.
11904 * lynx-ppc-low.c: Likewise.
11905 * tracepoint.c: Likewise.
11906
119072014-08-07 Gary Benson <gbenson@redhat.com>
11908
11909 * server.h: Do not include stdarg.h.
11910 * nto-low.c: Likewise.
11911
119122014-08-07 Gary Benson <gbenson@redhat.com>
11913
11914 * server.h: Do not include stdlib.h.
11915 * inferiors.c: Likewise.
11916 * linux-low.c: Likewise.
11917 * regcache.c: Likewise.
11918 * spu-low.c: Likewise.
11919 * tracepoint.c: Likewise.
11920 * utils.c: Likewise.
11921
119222014-08-07 Gary Benson <gbenson@redhat.com>
11923
11924 * server.h: Do not include stdio.h.
11925 * linux-low.c: Likewise.
11926 * remote-utils.c: Likewise.
11927 * spu-low.c: Likewise.
11928 * utils.c: Likewise.
11929 * wincecompat.c: Likewise.
11930
119312014-08-06 Gary Benson <gbenson@redhat.com>
11932
11933 * regcache.c (init_register_cache): Move conditionals inside if.
11934
119352014-08-06 Gary Benson <gbenson@redhat.com>
11936
11937 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11938
119392014-07-31 Gary Benson <gbenson@redhat.com>
11940
11941 * ax.h: Do not include server.h.
11942 * gdbthread.h: Likewise.
11943 * lynx-low.h: Likewise.
11944 * notif.h: Likewise.
11945
119462014-07-30 Gary Benson <gbenson@redhat.com>
11947
11948 * server.h: Include common-defs.h.
11949 Do not include config.h or build-gnulib-gdbserver/config.h.
11950
119512014-07-30 Gary Benson <gbenson@redhat.com>
11952
11953 * hostio-errno.c: Move server.h to top of includes list.
11954 * inferiors.c: Likewise.
11955 * linux-x86-low.c: Likewise.
11956 * notif.c: Include server.h.
11957
119582014-07-24 Tom Tromey <tromey@redhat.com>
11959 Gary Benson <gbenson@redhat.com>
11960
11961 * server.h (CORE_ADDR): Now unsigned.
11962
119632014-07-16 Pedro Alves <palves@redhat.com>
11964
11965 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11966
119672014-07-15 Pedro Alves <palves@redhat.com>
11968
11969 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11970 copy.
11971
119722014-07-11 Pedro Alves <palves@redhat.com>
11973
11974 * linux-low.c (kill_wait_lwp): New function, based on
11975 kill_one_lwp_callback, but use my_waitpid directly.
11976 (kill_one_lwp_callback, linux_kill): Use it.
11977
119782014-06-23 Pedro Alves <palves@redhat.com>
11979
11980 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11981 before setting DR0..DR3.
11982
119832014-06-20 Gary Benson <gbenson@redhat.com>
11984
11985 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11986 * configure: Regenerated.
11987 * config.in: Likewise.
11988
119892014-06-20 Gary Benson <gbenson@redhat.com>
11990
11991 * Makefile.in (SFILES): Update locations for files moved
11992 from common to nat.
11993 (object file files): Reordered.
11994
119952014-06-20 Gary Benson <gbenson@redhat.com>
11996
11997 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11998 (i386_dr_low_set_addr): Likewise.
11999 (i386_dr_low_get_addr): Likewise.
12000 (i386_dr_low_can_set_control): Likewise.
12001 (i386_dr_low_set_control): Likewise.
12002 (i386_dr_low_get_control): Likewise.
12003 (i386_dr_low_get_status): Likewise.
12004 (i386_get_debug_register_length): Likewise.
12005 * linux-x86-low.c (i386_dr_low_set_addr):
12006 Changed signature. Made static.
12007 (i386_dr_low_get_addr): Likewise.
12008 (i386_dr_low_set_control): Likewise.
12009 (i386_dr_low_get_control): Likewise.
12010 (i386_dr_low_get_status): Likewise.
12011 (i386_dr_low): New global variable.
12012 * win32-i386-low.c (i386_dr_low_set_addr):
12013 Changed signature. Made static.
12014 (i386_dr_low_get_addr): Likewise.
12015 (i386_dr_low_set_control): Likewise.
12016 (i386_dr_low_get_control): Likewise.
12017 (i386_dr_low_get_status): Likewise.
12018 (i386_dr_low): New global variable.
12019
120202014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12021
12022 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12023 * Makefile.in (AR, AR_FLAGS): Define.
12024 * configure: Regenerate.
12025
120262014-06-19 Gary Benson <gbenson@redhat.com>
12027
12028 * Makefile.in (i386-dregs.o): New rule.
12029 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12030 * i386-low.c (target.h): Remove include.
12031 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12032 (DR_CONTROL_SHIFT): Likewise.
12033 (DR_CONTROL_SIZE): Likewise.
12034 (DR_RW_EXECUTE): Likewise.
12035 (DR_RW_WRITE): Likewise.
12036 (DR_RW_READ): Likewise.
12037 (DR_RW_IORW): Likewise.
12038 (DR_LEN_1): Likewise.
12039 (DR_LEN_2): Likewise.
12040 (DR_LEN_4): Likewise.
12041 (DR_LEN_8): Likewise.
12042 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12043 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12044 (DR_ENABLE_SIZE): Likewise.
12045 (DR_LOCAL_SLOWDOWN): Likewise.
12046 (DR_GLOBAL_SLOWDOWN): Likewise.
12047 (DR_CONTROL_RESERVED): Likewise.
12048 (I386_DR_CONTROL_MASK): Likewise.
12049 (I386_DR_VACANT): Likewise.
12050 (I386_DR_LOCAL_ENABLE): Likewise.
12051 (I386_DR_GLOBAL_ENABLE): Likewise.
12052 (I386_DR_DISABLE): Likewise.
12053 (I386_DR_SET_RW_LEN): Likewise.
12054 (I386_DR_GET_RW_LEN): Likewise.
12055 (I386_DR_WATCH_HIT): Likewise.
12056 (i386_wp_op_t): Likewise.
12057 (i386_show_dr): Likewise.
12058 (i386_length_and_rw_bits): Likewise.
12059 (i386_insert_aligned_watchpoint): Likewise.
12060 (i386_remove_aligned_watchpoint): Likewise.
12061 (i386_handle_nonaligned_watchpoint): Likewise.
12062 i386_update_inferior_debug_regs(): Likewise.
12063 (i386_dr_insert_watchpoint): Likewise.
12064 (i386_dr_remove_watchpoint): Likewise.
12065 (i386_dr_region_ok_for_watchpoint): Likewise.
12066 (i386_dr_stopped_data_address): Likewise.
12067 (i386_dr_stopped_by_watchpoint): Likewise.
12068
120692014-06-19 Gary Benson <gbenson@redhat.com>
12070
12071 * i386-low.c (i386_dr_show): Renamed to
12072 i386_show_dr and made static. All uses updated.
12073 (i386_dr_length_and_rw_bits): Renamed to
12074 i386_length_and_rw_bits and made static.
12075 All uses updated.
12076 (i386_dr_insert_aligned_watchpoint): Renamed to
12077 i386_insert_aligned_watchpoint and made static.
12078 All uses updated.
12079 (i386_dr_remove_aligned_watchpoint): Renamed to
12080 i386_remove_aligned_watchpoint and made static.
12081 All uses updated.
12082 (i386_dr_update_inferior_debug_regs): Renamed to
12083 i386_update_inferior_debug_regs and made static.
12084 All uses updated.
12085
120862014-06-18 Gary Benson <gbenson@redhat.com>
12087
12088 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12089 (i386_dr_low_can_set_control): Likewise.
12090 (i386_get_debug_register_length): Likewise.
12091 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12092 (i386_dr_low_can_set_control): Likewise.
12093 (i386_get_debug_register_length): Likewise.
12094
120952014-06-17 Gary Benson <gbenson@redhat.com>
12096
12097 * i386-low.h (i386-dregs.h): New include.
12098 (DR_FIRSTADDR): Now in i386-dregs.h.
12099 (DR_LASTADDR): Likewise.
12100 (DR_NADDR): Likewise.
12101 (DR_STATUS): Likewise.
12102 (DR_CONTROL): Likewise.
12103 (i386_debug_reg_state): Likewise.
12104 (i386_dr_insert_watchpoint): Likewise.
12105 (i386_dr_remove_watchpoint): Likewise.
12106 (i386_dr_region_ok_for_watchpoint): Likewise.
12107 (i386_dr_stopped_data_address): Likewise.
12108 (i386_dr_stopped_by_watchpoint): Likewise.
12109 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12110
121112014-06-18 Gary Benson <gbenson@redhat.com>
12112
12113 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12114 i386_dr_insert_watchpoint.
12115 (i386_low_remove_watchpoint): Renamed to
12116 i386_dr_remove_watchpoint.
12117 (i386_low_region_ok_for_watchpoint): Renamed to
12118 i386_dr_region_ok_for_watchpoint.
12119 (i386_low_stopped_data_address): Renamed to
12120 i386_dr_stopped_data_address.
12121 (i386_low_stopped_by_watchpoint): Renamed to
12122 i386_dr_stopped_by_watchpoint.
12123 * i386-low.c (i386_show_dr): Renamed to
12124 i386_dr_show and made nonstatic. All uses updated.
12125 (i386_length_and_rw_bits): Renamed to
12126 i386_dr_length_and_rw_bits and made nonstatic.
12127 All uses updated.
12128 (i386_insert_aligned_watchpoint): Renamed to
12129 i386_dr_insert_aligned_watchpoint and made nonstatic.
12130 All uses updated.
12131 (i386_remove_aligned_watchpoint): Renamed to
12132 i386_dr_remove_aligned_watchpoint and made nonstatic.
12133 All uses updated.
12134 (i386_update_inferior_debug_regs): Renamed to
12135 i386_dr_update_inferior_debug_regs and made nonstatic.
12136 All uses updated.
12137 (i386_low_insert_watchpoint): Renamed to
12138 i386_dr_insert_watchpoint. All uses updated.
12139 (i386_low_remove_watchpoint): Renamed to
12140 i386_dr_remove_watchpoint. All uses updated.
12141 (i386_low_region_ok_for_watchpoint): Renamed to
12142 i386_dr_region_ok_for_watchpoint. All uses updated.
12143 (i386_low_stopped_data_address): Renamed to
12144 i386_dr_stopped_data_address. All uses updated.
12145 (i386_low_stopped_by_watchpoint): Renamed to
12146 i386_dr_stopped_by_watchpoint. All uses updated.
12147
121482014-06-18 Gary Benson <gbenson@redhat.com>
12149
12150 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12151 (i386_dr_low_can_set_control): Likewise.
12152 (i386_insert_aligned_watchpoint): New check.
12153
121542014-06-18 Gary Benson <gbenson@redhat.com>
12155
12156 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12157 Renamed to state.
12158
121592014-06-18 Gary Benson <gbenson@redhat.com>
12160
12161 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12162 instead of fatal and error.
12163 (i386_handle_nonaligned_watchpoint): Likewise.
12164
121652014-06-18 Gary Benson <gbenson@redhat.com>
12166
12167 * i386-low.c (i386_get_debug_register_length): New macro.
12168 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12169 (i386_show_dr): Use debug_printf instead of fprintf. Use
12170 phex to format values.
12171
121722014-06-18 Gary Benson <gbenson@redhat.com>
12173
12174 * i386-low.h: Comment changes.
12175 * i386-low.c: Likewise.
12176
121772014-06-18 Gary Benson <gbenson@redhat.com>
12178
12179 * i386-low.c: Whitespace changes.
12180
121812014-06-12 Tom Tromey <tromey@redhat.com>
12182
12183 * utils.c (freeargv): Remove.
12184
121852014-06-12 Tom Tromey <tromey@redhat.com>
12186
12187 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12188 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12189 (parse_debug_format_options): Likewise.
12190 (gdbserver_usage): Likewise.
12191 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12192 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12193 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12194 against libiberty.
12195 ($(LIBGNU)): Depend on libiberty.
12196 (all-lib): Recurse into all subdirs.
12197 (install-only): Invoke "install" target in subdirs.
12198 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12199 targets.
12200 * configure: Rebuild.
12201 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12202 for vasprintf, vsnprintf, or gettimeofday.
12203 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12204 srv_tgtobj.
12205
122062014-06-05 Joel Brobecker <brobecker@adacore.com>
12207
12208 * development.sh: Delete.
12209 * Makefile.in (config.status): Adjust dependency on development.sh.
12210 * configure.ac: Adjust development.sh source call.
12211 * configure: Regenerate.
12212
122132014-06-02 Pedro Alves <palves@redhat.com>
12214
12215 * ax.c (gdb_free_agent_expr): New function.
12216 * ax.h (gdb_free_agent_expr): New declaration.
12217 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12218 list.
12219 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12220 static.
12221 (clear_breakpoint_conditions_and_commands): New function.
12222 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12223 (clear_breakpoint_conditions_and_commands): New declaration.
12224
122252014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12226
12227 * linux-aarch64-low.c (asm/ptrace.h): Include.
12228
122292014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12230
12231 Fix TLS access for -static -pthread.
12232 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12233 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12234 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12235
122362014-05-20 Pedro Alves <palves@redhat.com>
12237
12238 * linux-aarch64-low.c (aarch64_insert_point)
12239 (aarch64_remove_point): No longer check whether the type is
12240 supported here. Adjust to new interface.
12241 (the_low_target): Install aarch64_supports_z_point_type as
12242 supports_z_point_type method.
12243 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12244 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12245 instead of a Z packet char. Adjust.
12246 (arm_supports_z_point_type): New function.
12247 (arm_insert_point, arm_remove_point): Adjust to new interface.
12248 (the_low_target): Install arm_supports_z_point_type.
12249 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12250 (cris_insert_point, cris_remove_point): Adjust to new interface.
12251 Don't check whether the type is supported here.
12252 (the_low_target): Install cris_supports_z_point_type.
12253 * linux-low.c (linux_supports_z_point_type): New function.
12254 (linux_insert_point, linux_remove_point): Adjust to new interface.
12255 * linux-low.h (struct linux_target_ops) <insert_point,
12256 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12257 raw_breakpoint pointer parameter.
12258 <supports_z_point_type>: New method.
12259 * linux-mips-low.c (mips_supports_z_point_type): New function.
12260 (mips_insert_point, mips_remove_point): Adjust to new interface.
12261 Use mips_supports_z_point_type.
12262 (the_low_target): Install mips_supports_z_point_type.
12263 * linux-ppc-low.c (the_low_target): Install NULL as
12264 supports_z_point_type method.
12265 * linux-s390-low.c (the_low_target): Install NULL as
12266 supports_z_point_type method.
12267 * linux-sparc-low.c (the_low_target): Install NULL as
12268 supports_z_point_type method.
12269 * linux-x86-low.c (x86_supports_z_point_type): New function.
12270 (x86_insert_point): Adjust to new insert_point interface. Use
12271 insert_memory_breakpoint. Adjust to new
12272 i386_low_insert_watchpoint interface.
12273 (x86_remove_point): Adjust to remove_point interface. Use
12274 remove_memory_breakpoint. Adjust to new
12275 i386_low_remove_watchpoint interface.
12276 (the_low_target): Install x86_supports_z_point_type.
12277 * lynx-low.c (lynx_target_ops): Install NULL as
12278 supports_z_point_type callback.
12279 * nto-low.c (nto_supports_z_point_type): New.
12280 (nto_insert_point, nto_remove_point): Adjust to new interface.
12281 (nto_target_ops): Install nto_supports_z_point_type.
12282 * mem-break.c: Adjust intro comment.
12283 (struct raw_breakpoint) <raw_type, size>: New fields.
12284 <inserted>: Update comment.
12285 <shlib_disabled>: Delete field.
12286 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12287 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12288 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12289 (raw_bkpt_type_to_target_hw_bp_type): New function.
12290 (find_enabled_raw_code_breakpoint_at): New function.
12291 (find_raw_breakpoint_at): New type and size parameters. Use them.
12292 (insert_memory_breakpoint): New function, based off
12293 set_raw_breakpoint_at.
12294 (remove_memory_breakpoint): New function.
12295 (set_raw_breakpoint_at): Reimplement.
12296 (set_breakpoint): New, based on set_breakpoint_at.
12297 (set_breakpoint_at): Reimplement.
12298 (delete_raw_breakpoint): Go through the_target->remove_point
12299 instead of assuming memory breakpoints.
12300 (find_gdb_breakpoint_at): Delete.
12301 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12302 (find_gdb_breakpoint): New function.
12303 (set_gdb_breakpoint_at): Delete.
12304 (z_type_supported): New function.
12305 (set_gdb_breakpoint_1): New function, loosely based off
12306 set_gdb_breakpoint_at.
12307 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12308 (delete_gdb_breakpoint_at): Delete.
12309 (delete_gdb_breakpoint_1): New function, loosely based off
12310 delete_gdb_breakpoint_at.
12311 (delete_gdb_breakpoint): New function.
12312 (clear_gdb_breakpoint_conditions): Rename to ...
12313 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12314 breakpoint.
12315 (add_condition_to_breakpoint): Make static.
12316 (add_breakpoint_condition): Take a struct breakpoint pointer
12317 instead of an address. Adjust.
12318 (gdb_condition_true_at_breakpoint): Rename to ...
12319 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12320 z_type parameter.
12321 (gdb_condition_true_at_breakpoint): Reimplement.
12322 (add_breakpoint_commands): Take a struct breakpoint pointer
12323 instead of an address. Adjust.
12324 (gdb_no_commands_at_breakpoint): Rename to ...
12325 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12326 parameter. Return true if no breakpoint was found. Change debug
12327 output.
12328 (gdb_no_commands_at_breakpoint): Reimplement.
12329 (run_breakpoint_commands): Rename to ...
12330 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12331 and change return type to boolean.
12332 (run_breakpoint_commands): New function.
12333 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12334 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12335 breakpoint. Go through the_target->remove_point instead of
12336 assuming memory breakpoint.
12337 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12338 software and hardware breakpoints.
12339 (reinsert_raw_breakpoint): Go through the_target->insert_point
12340 instead of assuming memory breakpoint.
12341 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12342 software and hardware breakpoints.
12343 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12344 Check both software and hardware breakpoints.
12345 (validate_inserted_breakpoint): Assert the breakpoint is a
12346 software breakpoint. Set the inserted flag to -1 instead of
12347 setting shlib_disabled.
12348 (delete_disabled_breakpoints): Adjust.
12349 (validate_breakpoints): Only validate software breakpoints.
12350 Adjust to inserted flag change.
12351 (check_mem_read, check_mem_write): Skip breakpoint types other
12352 than software breakpoints. Adjust to inserted flag change.
12353 * mem-break.h (enum raw_bkpt_type): New enum.
12354 (raw_breakpoint, struct process_info): Forward declare.
12355 (Z_packet_to_target_hw_bp_type): Delete declaration.
12356 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12357 (set_gdb_breakpoint, delete_gdb_breakpoint)
12358 (clear_breakpoint_conditions): New declarations.
12359 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12360 (breakpoint_inserted_here): Update comment.
12361 (add_breakpoint_condition, add_breakpoint_commands): Replace
12362 address parameter with a breakpoint pointer parameter.
12363 (gdb_breakpoint_here): Update comment.
12364 (delete_gdb_breakpoint_at): Delete.
12365 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12366 * server.c (process_point_options): Take a struct breakpoint
12367 pointer instead of an address. Adjust.
12368 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12369 delete_gdb_breakpoint.
12370 * spu-low.c (spu_target_ops): Install NULL as
12371 supports_z_point_type method.
12372 * target.h: Include mem-break.h.
12373 (struct target_ops) <prepare_to_access_memory>: Update comment.
12374 <supports_z_point_type>: New field.
12375 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12376 instead of a char. Also take a raw breakpoint pointer.
12377 * win32-arm-low.c (the_low_target): Install NULL as
12378 supports_z_point_type.
12379 * win32-i386-low.c (i386_supports_z_point_type): New function.
12380 (i386_insert_point, i386_remove_point): Adjust to new interface.
12381 (the_low_target): Install i386_supports_z_point_type.
12382 * win32-low.c (win32_supports_z_point_type): New function.
12383 (win32_insert_point, win32_remove_point): Adjust to new interface.
12384 (win32_target_ops): Install win32_supports_z_point_type.
12385 * win32-low.h (struct win32_target_ops):
12386 <supports_z_point_type>: New method.
12387 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12388 instead of a char. Also take a raw breakpoint pointer.
12389
123902014-05-20 Pedro Alves <palves@redhat.com>
12391
12392 * mem-break.h: Include break-common.h.
12393 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12394 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12395 (Z_packet_to_target_hw_bp_type): New declaration.
12396 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12397 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12398 (Z_PACKET_ACCESS_WP): Delete macros.
12399 (Z_packet_to_hw_type): Delete function.
12400 * i386-low.h: Don't include break-common.h here.
12401 (Z_packet_to_hw_type): Delete declaration.
12402 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12403 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12404 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12405 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12406 * linux-aarch64-low.c: Don't include break-common.h here.
12407 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12408 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12409 (Z_packet_to_target_hw_bp_type): Delete function.
12410 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12411 function.
12412 (mips_insert_point, mips_remove_point): Use
12413 Z_packet_to_target_hw_bp_type.
12414
124152014-05-20 Pedro Alves <palves@redhat.com>
12416
12417 * linux-aarch64-low.c: Include break-common.h.
12418 (enum target_point_type): Delete.
12419 (Z_packet_to_point_type): Rename to ...
12420 (Z_packet_to_target_hw_bp_type): ... this, and return a
12421 target_hw_bp_type instead.
12422 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12423 instead of an enum target_point_type.
12424 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12425 breakpoint type.
12426 (aarch64_dr_state_insert_one_point)
12427 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12428 (aarch64_handle_aligned_watchpoint)
12429 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12430 Take an enum target_hw_bp_type instead of an enum
12431 target_point_type.
12432 (aarch64_supports_z_point_type): New function.
12433 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12434 use Z_packet_to_target_hw_bp_type.
12435
124362014-05-20 Joel Brobecker <brobecker@adacore.com>
12437
12438 * configure.ac: Only use -Werror by default when DEVELOPMENT
12439 is true.
12440 * configure: Regenerate.
12441
124422014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12443
12444 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12445 * linux-x86-low.c (X86_64_USER_REGS): New.
12446 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12447
124482014-04-28 Yao Qi <yao@codesourcery.com>
12449
12450 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12451 name.
12452
124532014-04-25 Pedro Alves <palves@redhat.com>
12454
12455 PR server/16255
12456 * linux-low.c (linux_attach_fail_reason_string): New function.
12457 (linux_attach_lwp): Delete.
12458 (linux_attach_lwp_1): Rename to ...
12459 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12460 argument. Remove "initial" parameter. Return int instead of
12461 void. Don't error or warn here.
12462 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12463 failure to attach to the tgid. Call warning when failing to
12464 attach to an lwp.
12465 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12466 argument. Remove "initial" parameter. Return int instead of
12467 void. Don't error or warn here.
12468 (linux_attach_fail_reason_string): New declaration.
12469 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12470 interface change. Use linux_attach_fail_reason_string.
12471
124722014-04-24 Michael Sturm <michael.sturm@mintel.com>
12473 Walfred Tedeschi <walfred.tedeschi@intel.com>
12474
12475 * Makefile.in: Added rules to handle new files
12476 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12477 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12478 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12479 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12480 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12481 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12482 x32-avx512-linux.o.
12483 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12484 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12485 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12486 i386/x32-avx512.xml.
12487 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12488 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12489 i386/x32-avx512-linux.xml.
12490 * i387-fp.c (num_avx512_k_registers): New constant for number
12491 of K registers.
12492 (num_avx512_zmmh_low_registers): New constant for number of
12493 lower ZMM registers (0-15).
12494 (num_avx512_zmmh_high_registers): New constant for number of
12495 higher ZMM registers (16-31).
12496 (num_avx512_ymmh_registers): New contant for number of higher
12497 YMM registers (ymm16-31 added by avx521 on x86_64).
12498 (num_avx512_xmm_registers): New constant for number of higher
12499 XMM registers (xmm16-31 added by AVX512 on x86_64).
12500 (struct i387_xsave): Add space for AVX512 registers.
12501 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12502 Add code to handle AVX512 registers.
12503 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12504 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12505 prototypei from generated file.
12506 (tdesc_amd64_avx512_linux): Likewise.
12507 (init_registers_x32_avx512_linux): Likewise.
12508 (tdesc_x32_avx512_linux): Likewise.
12509 (init_registers_i386_avx512_linux): Likewise.
12510 (tdesc_i386_avx512_linux): Likewise.
12511 (x86_64_regmap): Add AVX512 registers.
12512 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12513 mask.
12514 (initialize_low_arch): Add code to initialize AVX512 registers.
12515
125162014-04-23 Pedro Alves <palves@redhat.com>
12517
12518 * mem-break.c (find_gdb_breakpoint_at): Make static.
12519 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12520
125212014-04-23 Pedro Alves <palves@redhat.com>
12522
12523 * i386-low.c: Don't include break-common.h here.
12524 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12525 prototype to take target_hw_bp_type as argument instead of a Z
12526 packet char.
12527 * i386-low.h: Include break-common.h here.
12528 (Z_packet_to_hw_type): Declare.
12529 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12530 prototypes.
12531 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12532 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12533 (x86_remove_point): Convert the packet number to a
12534 target_hw_bp_type before calling i386_low_remove_watchpoint.
12535 * win32-i386-low.c (i386_insert_point): Convert the packet number
12536 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12537 (i386_remove_point): Convert the packet number to a
12538 target_hw_bp_type before calling i386_low_remove_watchpoint.
12539
125402014-04-23 Pedro Alves <palves@redhat.com>
12541
12542 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12543
125442014-04-10 Pedro Alves <palves@redhat.com>
12545
12546 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12547 Check if the condition or command is NULL before checking if the
12548 breakpoint is known. On success, return true.
12549 * mem-break.h (add_breakpoint_condition): Document return.
12550 (add_breakpoint_commands): Add describing comment.
12551 * server.c (skip_to_semicolon): New function.
12552 (process_point_options): Use it.
12553
125542014-04-09 Pedro Alves <palves@redhat.com>
12555
12556 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12557 to lwpid_of.
12558
125592014-02-27 Pedro Alves <palves@redhat.com>
12560
12561 PR 12702
12562 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12563 macros.
12564 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12565 output.
12566 (last_thread_of_process_p): Take a PID argument instead of a
12567 thread pointer.
12568 (linux_wait_for_lwp): Delete.
12569 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12570 functions.
12571 (linux_low_filter_event): New function, party factored out from
12572 linux_wait_for_event.
12573 (linux_wait_for_event): Rename to ...
12574 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12575 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12576 sigsuspend. Check for zombie leaders.
12577 (linux_wait_for_event): Reimplement as wrapper around
12578 linux_wait_for_event_filtered.
12579 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12580 a normal or signal exit is seen, it's the whole process exiting.
12581 (wait_for_sigstop): No longer a for_each_inferior callback.
12582 Rewrite on top of linux_wait_for_event_filtered.
12583 (stop_all_lwps): Call wait_for_sigstop directly.
12584 * server.c (resume, handle_target_event): Handle
12585 TARGET_WAITKIND_NO_RESUMED.
12586
125872014-02-26 Joel Brobecker <brobecker@adacore.com>
12588
12589 * win32-low.c (psapi_get_dll_name,
12590 * win32_CreateToolhelp32Snapshot): Delete.
12591 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12592 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12593 Delete.
12594 (handle_load_dll): Add function description.
12595 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12596
125972014-02-26 Joel Brobecker <brobecker@adacore.com>
12598
12599 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12600 Add comment.
12601 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12602 base address when calling win32_add_one_solib.
12603 (handle_load_dll): Delete local variable load_addr.
12604 Remove 0x1000 offset applied to DLL base address when calling
12605 win32_add_one_solib.
12606 (handle_unload_dll): Add comment.
12607
126082014-02-26 Joel Brobecker <brobecker@adacore.com>
12609
12610 * win32-low.c (win32_add_all_dlls): Renames
12611 win32_ensure_ntdll_loaded. Rewrite function documentation.
12612 Adjust implementation to always load all DLLs.
12613 Add 0x1000 offset to DLL base address when calling
12614 win32_add_one_solib.
12615 (child_initialization_done): New static global.
12616 (do_initial_child_stuff): Set child_initialization_done to
12617 zero during child initialization, and 1 after. Replace call
12618 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12619 Add comment.
12620 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12621 (handle_unload_dll): Add function documentation.
12622 (get_child_debug_event): Ignore load and unload DLL events
12623 during child initialization.
12624
126252014-02-20 Doug Evans <dje@google.com>
12626
12627 Remove global all_lwps.
12628 * inferiors.h (ptid_of): Move here from linux-low.h.
12629 (pid_of, lwpid_of): Ditto.
12630 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12631 parameter is a struct thread_info * now.
12632 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12633 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12634 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12635 directly.
12636 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12637 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12638 * linux-arm-low.c (update_registers_callback): Update, "entry"
12639 parameter is a struct thread_info * now.
12640 Fetch lwpid from current_inferior directly.
12641 (arm_insert_point): Pass &all_threads to find_inferior instead of
12642 &all_lwps.
12643 (arm_remove_point): Ditto.
12644 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12645 (arm_prepare_to_resume): Fetch pid from thread.
12646 (arm_read_description): Fetch lwpid from current_inferior directly.
12647 * linux-low.c (all_lwps): Delete.
12648 (delete_lwp): Delete call to remove_inferior.
12649 (handle_extended_wait): Fetch lwpid from thread.
12650 (add_lwp): Don't set lwp->entry.id. Remove call to
12651 add_inferior_to_list.
12652 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12653 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12654 (kill_one_lwp_callback): Ditto.
12655 (linux_kill): Don't dereference NULL pointer.
12656 Fetch ptid,lwpid from thread.
12657 (get_detach_signal): Fetch ptid from thread.
12658 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12659 Simplify call to regcache_invalidate_thread.
12660 (delete_lwp_callback): Update, "entry" parameter is a
12661 struct thread_info * now. Fetch pid from thread.
12662 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12663 (status_pending_p_callback): Update, "entry" parameter is a
12664 struct thread_info * now. Fetch ptid from thread.
12665 (find_lwp_pid): Update, "entry" parameter is a
12666 struct thread_info * now.
12667 (linux_wait_for_lwp): Fetch pid from thread.
12668 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12669 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12670 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12671 (dequeue_one_deferred_signal): Ditto.
12672 (cancel_breakpoint): Fetch ptid from current_inferior.
12673 (linux_wait_for_event): Pass &all_threads to find_inferior,
12674 not &all_lwps. Fetch ptid, lwpid from thread.
12675 (count_events_callback): Update, "entry" parameter is a
12676 struct thread_info * now.
12677 (select_singlestep_lwp_callback): Ditto.
12678 (select_event_lwp_callback): Ditto.
12679 (cancel_breakpoints_callback): Ditto.
12680 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12681 not &all_lwps.
12682 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12683 (unsuspend_one_lwp): Update, "entry" parameter is a
12684 struct thread_info * now.
12685 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12686 not &all_lwps.
12687 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12688 Fetch lwpid from thread, not lwp.
12689 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12690 Pass &all_threads to find_inferior, not &all_lwps.
12691 (send_sigstop): Fetch lwpid from thread, not lwp.
12692 (send_sigstop_callback): Update, "entry" parameter is a
12693 struct thread_info * now.
12694 (suspend_and_send_sigstop_callback): Ditto.
12695 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12696 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12697 struct thread_info * now.
12698 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12699 from thread, lwp.
12700 (lwp_running): Update, "entry" parameter is a
12701 struct thread_info * now.
12702 (stop_all_lwps): Fetch ptid from thread.
12703 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12704 (linux_resume_one_lwp): Fetch lwpid from thread.
12705 (linux_set_resume_request): Update, "entry" parameter is a
12706 struct thread_info * now. Fetch pid, lwpid from thread.
12707 (resume_status_pending_p): Update, "entry" parameter is a
12708 struct thread_info * now.
12709 (need_step_over_p): Ditto. Fetch lwpid from thread.
12710 (start_step_over): Fetch lwpid from thread.
12711 (linux_resume_one_thread): Update, "entry" parameter is a
12712 struct thread_info * now. Fetch lwpid from thread.
12713 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12714 (proceed_one_lwp): Update, "entry" parameter is a
12715 struct thread_info * now. Fetch lwpid from thread.
12716 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12717 struct thread_info * now.
12718 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12719 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12720 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12721 directly.
12722 (regsets_store_inferior_registers): Ditto.
12723 (fetch_register, store_register): Ditto.
12724 (linux_read_memory, linux_write_memory): Ditto.
12725 (linux_request_interrupt): Ditto.
12726 (linux_read_auxv): Ditto.
12727 (linux_xfer_siginfo): Ditto.
12728 (linux_qxfer_spu): Ditto.
12729 (linux_qxfer_libraries_svr4): Ditto.
12730 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12731 moved to inferiors.h.
12732 (get_lwp): Delete.
12733 (get_thread_lwp): Update.
12734 (struct lwp_info): Delete member "entry". Simplify comment for
12735 member "thread".
12736 (all_lwps): Delete.
12737 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12738 current_inferior directly.
12739 (update_watch_registers_callback): Update, "entry" parameter is a
12740 struct thread_info * now. Fetch pid from thread.
12741 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12742 (mips_insert_point): Fetch lwpid from current_inferior.
12743 Pass &all_threads to find_inferior, not &all_lwps.
12744 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12745 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12746 directly.
12747 (mips_stopped_data_address): Ditto.
12748 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12749 directly.
12750 * linux-tile-low.c (tile_arch_setup): Ditto.
12751 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12752 (update_debug_registers_callback): Update, "entry" parameter is a
12753 struct thread_info * now. Fetch pid from thread.
12754 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12755 Pass &all_threads to find_inferior, not &all_lwps.
12756 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12757 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12758 Pass &all_threads to find_inferior, not &all_lwps.
12759 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12760 (i386_dr_low_get_status): Ditto.
12761 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12762 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12763 (x86_linux_read_description): Ditto.
12764 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12765
127662014-02-20 Doug Evans <dje@google.com>
12767
12768 * inferiors.c (get_first_inferior): Fix buglet.
12769
127702014-02-19 Doug Evans <dje@google.com>
12771
12772 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12773 * inferiors.c (add_thread): Change result type to struct thread_info *.
12774 All callers updated.
12775 (add_lwp): Call add_thread here instead of in callers.
12776 All callers updated.
12777 * linux-low.h (get_lwp_thread): Rewrite.
12778 (struct lwp_info): New member "thread".
12779
127802014-02-19 Doug Evans <dje@google.com>
12781
12782 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12783 All callers updated.
12784
127852014-02-19 Doug Evans <dje@google.com>
12786
12787 * inferiors.c (add_thread): Fix whitespace.
12788
127892014-02-19 Doug Evans <dje@google.com>
12790
12791 * dll.c (clear_dlls): Replace accessing list implemention details
12792 with API function.
12793 * gdbthread.h (get_first_thread): Declare.
12794 * inferiors.c (for_each_inferior_with_data): New function.
12795 (get_first_thread): New function.
12796 (find_thread_ptid): Simplify.
12797 (get_first_inferior): New function.
12798 (clear_list): Delete.
12799 (one_inferior_p): New function.
12800 (clear_inferior_list): New function.
12801 (clear_inferiors): Update.
12802 * inferiors.h (for_each_inferior_with_data): Declare.
12803 (clear_inferior_list): Declare.
12804 (one_inferior_p): Declare.
12805 (get_first_inferior): Declare.
12806 * linux-low.c (linux_wait_for_event): Replace accessing list
12807 implemention details with API function.
12808 * server.c (target_running): Ditto.
12809 (accumulate_file_name_length): New function.
12810 (emit_dll_description): New function.
12811 (handle_qxfer_libraries): Replace accessing list implemention
12812 details with API function.
12813 (handle_qxfer_threads_worker): New function.
12814 (handle_qxfer_threads_proper): Replace accessing list implemention
12815 details with API function.
12816 (handle_query): Ditto.
12817 (visit_actioned_threads_callback_ftype): New typedef.
12818 (visit_actioned_threads_data): New struct.
12819 (visit_actioned_threads): Rewrite to be find_inferior callback.
12820 (resume): Call find_inferior.
12821 (handle_status): Replace accessing list implemention
12822 details with API function.
12823 (process_serial_event): Replace accessing list implemention details
12824 with API function.
12825 * target.c (set_desired_inferior): Replace accessing list implemention
12826 details with API function.
12827 * tracepoint.c (same_process_p): New function.
12828 (gdb_agent_about_to_close): Replace accessing list implemention
12829 details with API function.
12830 * win32-low.c (child_delete_thread): Replace accessing list
12831 implemention details with API function.
12832 (match_dll_by_basename): New function.
12833 (dll_is_loaded_by_basename): New function.
12834 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12835 details call to dll_is_loaded_by_basename.
12836
128372014-02-19 Doug Evans <dje@google.com>
12838
12839 * dll.h (struct dll_info): Add comment.
12840 * gdbthread.h (struct thread_info): Add comment.
12841 (current_ptid): Simplify.
12842 * inferiors.c (add_process): Update.
12843 (remove_process): Update.
12844 * inferiors.h (struct process_info): Rename member "head" to "entry".
12845 * linux-low.c (delete_lwp): Update.
12846 (add_lwp): Update.
12847 (last_thread_of_process_p): Update.
12848 (kill_one_lwp_callback, linux_kill): Update.
12849 (status_pending_p_callback): Update.
12850 (wait_for_sigstop): Update. Simplify read of ptid.
12851 (start_step_over): Update.
12852 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12853 (get_lwp_thread): Update.
12854 (struct lwp_info): Rename member "head" to "entry".
12855 * regcache.h (inferior_list_entry): Delete.
12856 * server.c (kill_inferior_callback): Update.
12857 (detach_or_kill_inferior_callback): Update.
12858 (print_started_pid): Update.
12859 (print_attached_pid): Update.
12860 (process_serial_event): Simplify read of ptid.
12861 * thread-db.c (thread_db_create_event): Update.
12862 (thread_db_get_tls_address): Update.
12863 * win32-low.c (current_inferior_ptid): Simplify.
12864
128652014-02-19 Tom Tromey <tromey@redhat.com>
12866
12867 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12868 argument.
12869 (target_supports_btrace): Update.
12870
128712014-02-14 Yao Qi <yao@codesourcery.com>
12872
12873 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12874 (rsp-low-ipa.o): New target.
12875
128762014-02-12 Tom Tromey <tromey@redhat.com>
12877
12878 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12879 convert_ascii_to_int.
12880 * regcache.c (registers_to_string): Likewise.
12881 * remote-utils.c (decode_M_packet): Likewise.
12882 * server.c (process_serial_event): Likewise.
12883
128842014-02-12 Tom Tromey <tromey@redhat.com>
12885
12886 * server.c (handle_query, handle_v_run): Use hex2bin, not
12887 unhexify.
12888 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12889
128902014-02-12 Tom Tromey <tromey@redhat.com>
12891
12892 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12893 convert_int_to_ascii.
12894 * regcache.c (registers_to_string, collect_register_as_string):
12895 Likewise.
12896 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12897 Likewise.
12898 * server.c (process_serial_event): Likewise.
12899 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12900 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12901
129022014-02-12 Tom Tromey <tromey@redhat.com>
12903
12904 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12905 bin2hex, not hexify.
12906 * tracepoint.c (cmd_qtstatus): Likewise.
12907
129082014-02-12 Tom Tromey <tromey@redhat.com>
12909
12910 * remote-utils.c (monitor_output): Pass explicit length to
12911 hexify.
12912
129132014-02-12 Tom Tromey <tromey@redhat.com>
12914
12915 * tracepoint.c: Include rsp-low.h.
12916 * server.c: Include rsp-low.h.
12917 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12918 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12919 declare.
12920 * remote-utils.c: Include rsp-low.h.
12921 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12922 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12923 (convert_int_to_ascii, convert_ascii_to_int): Move to
12924 common/rsp-low.c.
12925 * regcache.c: Include rsp-low.h.
12926 * ax.c: Include rsp-low.h.
12927 * Makefile.in (SFILES): Add common/rsp-low.c.
12928 (OBS): Add rsp-low.o.
12929 (rsp-low.o): New target.
12930
129312014-02-12 Tom Tromey <tromey@redhat.com>
12932
12933 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12934 Include print-utils.h.
12935 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12936 (plongest, thirty_two, phex_nz): Remove.
12937 * Makefile.in (SFILES): Add common/print-utils.c.
12938 (OBS): Add print-utils.o.
12939 (print-utils-ipa.o): New target.
12940 (print-utils.o): New target.
12941 (IPA_OBJS): Add print-utils-ipa.o.
12942
129432014-02-06 Tom Tromey <tromey@redhat.com>
12944
12945 * Makefile.in (SFILES): Fix indentation.
12946
129472014-02-05 Doug Evans <dje@google.com>
12948
12949 * linux-low.c (linux_wait_for_event): Improve comment.
12950 (linux_wait_1): Keep current_inferior in sync with event_child.
12951
129522014-01-22 Doug Evans <dje@google.com>
12953
12954 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12955
129562014-01-22 Doug Evans <dje@google.com>
12957
12958 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12959 * configure: Regenerate.
12960 * config.in: Regenerate.
12961 * Makefile.in (SFILES): Add debug.c.
12962 (OBS): Add debug.o.
12963 * debug.c: New file.
12964 * debug.h: New file.
12965 * linux-aarch64-low.c (*): Update all debugging printfs to use
12966 debug_printf instead of fprintf.
12967 * linux-arm-low.c (*): Ditto.
12968 * linux-cris-low.c (*): Ditto.
12969 * linux-crisv32-low.c (*): Ditto.
12970 * linux-m32r-low.c (*): Ditto.
12971 * linux-sparc-low.c (*): Ditto.
12972 * linux-x86.c (*): Ditto.
12973 * linux-low.c (*): Ditto.
12974 (linux_wait_1): Add calls to debug_enter, debug_exit.
12975 (linux_wait): Remove redundant debugging printf.
12976 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12977 (linux_resume, unstop_all_lwps): Ditto.
12978 * mem-break.c (*): Update all debugging printfs to use
12979 debug_printf instead of fprintf.
12980 * remote-utils.c (*): Ditto.
12981 * thread-db.c (*): Ditto.
12982 * server.c #include <ctype.h>, "gdb_vecs.h".
12983 (debug_threads): Moved to debug.c.
12984 (*): Update all debugging printfs to use debug_printf instead of
12985 fprintf.
12986 (start_inferior): Replace call to fflush with call to debug_flush.
12987 (monitor_show_help): Mention set debug-format.
12988 (parse_debug_format_options): New function.
12989 (handle_monitor_command): Handle "monitor set debug-format".
12990 (gdbserver_usage): Mention --debug-format.
12991 (main): Parse --debug-format.
12992 * server.h (debug_threads): Declaration moved to debug.h.
12993 #include "debug.h".
12994 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12995 trace_debug_1 that uses debug_printf.
12996 (tracepoint_look_up_symbols): Update all debugging printfs to use
12997 debug_printf instead of fprintf.
12998
129992014-01-20 Baruch Siach <baruch@tkos.co.il>
13000
13001 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13002 sys/ptrace.h.
13003
130042014-01-17 Pedro Alves <palves@redhat.com>
13005
13006 PR build/16445
13007 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13008 defined after including gdb_proc_service.h.
13009
130102014-01-16 Doug Evans <dje@google.com>
13011
13012 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13013 (match_dll): Use it.
13014
130152014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13016
13017 * target.h (target_ops) <read_btrace>: Change parameters and
13018 return type to allow error reporting.
13019 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13020 trace reading errors on.
13021 * linux-low.c (linux_low_read_btrace): Pass trace reading
13022 errors on.
13023 (linux_low_disable_btrace): New.
13024
130252014-01-15 Doug Evans <dje@google.com>
13026
13027 * inferiors.c (thread_id_to_gdb_id): Delete.
13028 * inferiors.h (thread_id_to_gdb_id): Delete.
13029
130302014-01-13 Eli Zaretskii <eliz@gnu.org>
13031
13032 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13033 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13034 versions.
13035
130362014-01-08 Pedro Alves <palves@redhat.com>
13037
13038 * server.c (handle_status): Don't discard previous queued stop
13039 replies or thread's pending status here.
13040 (main) <disconnection>: Do it here instead.
13041
130422014-01-08 Pedro Alves <palves@redhat.com>
13043
13044 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13045 * server.c (visit_actioned_threads, handle_pending_status): New
13046 function.
13047 (handle_v_cont): Factor out parts to ...
13048 (resume): ... this new function. If in all-stop, and a thread
13049 being resumed has a pending status, report it without actually
13050 resuming.
13051 (myresume): Adjust to use the new 'resume' function.
13052 (clear_pending_status_callback, set_pending_status_callback)
13053 (find_status_pending_thread_callback): New functions.
13054 (handle_status): Handle the case of multiple threads having
13055 interesting statuses to report. Report threads' real last signal
13056 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13057 with an interesting thread to report the status for, instead of
13058 always reporting the status of the first thread.
13059
130602014-01-01 Joel Brobecker <brobecker@adacore.com>
13061
13062 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13063 * gdbreplay.c (gdbreplay_version): Likewise.
13064
130652013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13066
13067 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13068 iov.iov_len with the real length in use.
13069
130702013-12-13 Joel Brobecker <brobecker@adacore.com>
13071
13072 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13073 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13074 for all targets that use win32-low.c.
13075 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13076 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13077
130782013-12-13 Pedro Alves <palves@redhat.com>
13079
13080 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13081 if equal to TARGET_WAITKIND_LOADED.
13082 * win32-low.c (cached_status): New static global.
13083 (win32_wait): Add declaration.
13084 (do_initial_child_stuff): Flush all initial pending debug events
13085 up to the initial breakpoint.
13086 (win32_wait): If CACHED_STATUS was set, return that instead
13087 of doing a real wait. Remove the code resuming the execution
13088 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13089 during the initial phase. Also remove the code changing
13090 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13091 TARGET_WAITKIND_STOPPED.
13092
130932013-12-11 Yao Qi <yao@codesourcery.com>
13094
13095 * notif.c (handle_notif_ack): Return 0 if no notification
13096 matches.
13097
130982013-11-20 Doug Evans <dje@google.com>
13099
13100 * linux-low.c (linux_set_resume_request): Fix comment.
13101
131022013-11-20 Doug Evans <dje@google.com>
13103
13104 * linux-low.c (resume_status_pending_p): Tweak comment.
13105
131062013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13107
13108 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13109 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13110 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13111 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13112 (srv_amd64_regobj): Add amd64-mpx.o.
13113 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13114 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13115 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13116 * i387-fp.c (num_pl_bnd_register) Added constant.
13117 (num_pl_bnd_cfg_registers) Added constant.
13118 (struct i387_xsave) Added reserved area and MPX fields.
13119 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13120 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13121 function.
13122 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13123 (init_registers_amd64_mpx_linux): Declare new function.
13124 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13125 (x86_64_regmap): Add MPX registers.
13126 (x86_linux_read_description): Add MPX case.
13127 (initialize_low_arch): Initialize MPX targets.
13128
131292013-11-18 Tom Tromey <tromey@redhat.com>
13130
13131 * configure: Rebuild.
13132 * configure.ac: Don't check for stdlib.h.
13133 * gdbreplay.c: Unconditionally include stdlib.h.
13134
131352013-11-18 Tom Tromey <tromey@redhat.com>
13136
13137 * config.in: Rebuild.
13138 * configure: Rebuild.
13139 * configure.ac: Don't use AC_HEADER_DIRENT.
13140
131412013-11-18 Tom Tromey <tromey@redhat.com>
13142
13143 * server.h: Don't check HAVE_STRING_H.
13144 * gdbreplay.c: Don't check HAVE_STRING_H.
13145 * configure: Rebuild.
13146
131472013-11-18 Tom Tromey <tromey@redhat.com>
13148
13149 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13150 LIBGNU.
13151
131522013-11-08 Tom Tromey <tromey@redhat.com>
13153
13154 * configure, config.in: Rebuild.
13155 * configure.ac: Remove unused configury.
13156
131572013-11-08 Tom Tromey <tromey@redhat.com>
13158
13159 * acinclude.m4: Include common.m4, codeset.m4.
13160 * configure, config.in: Rebuild.
13161 * configure.ac: Use GDB_AC_COMMON.
13162
131632013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13164
13165 * linux-s390-low.c (HWCAP_S390_TE): New define.
13166 (s390_arch_setup): Consider the TE field in the HWCAP for
13167 determining 'have_regset_tdb'.
13168
131692013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13170
13171 PR gdb/16014
13172 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13173 call to sizeof.
13174
131752013-10-02 Pedro Alves <palves@redhat.com>
13176
13177 * server.c (process_serial_event): Don't output "GDBserver
13178 exiting" if GDB is connected through stdio.
13179 * target.c (mywait): Likewise, be silent if GDB is connected
13180 through stdio.
13181
131822013-10-01 Joel Brobecker <brobecker@adacore.com>
13183
13184 * lynx-low.c (lynx_add_threads_after_attach): New function.
13185 (lynx_attach): Remove call to add_thread. Add call to
13186 lynx_add_threads_after_attach instead.
13187
131882013-09-28 Mike Frysinger <vapier@gentoo.org>
13189
13190 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13191 * config.in, configure: Regenerated.
13192
131932013-09-18 Yao Qi <yao@codesourcery.com>
13194
13195 PR server/15959
13196 * server.c (start_inferior): Clear 'resume_info'.
13197
131982013-09-16 Jiong Wang <jiwang@tilera.com>
13199
13200 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13201 for each register.
13202
132032013-09-16 Jiong Wang <jiwang@tilera.com>
13204
13205 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13206 linux-tile-low.o to srv_tgtobj.
13207
132082013-09-16 Will Newton <will.newton@linaro.org>
13209
13210 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13211 out regs.
13212
132132013-09-06 Pedro Alves <palves@redhat.com>
13214
13215 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13216 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13217 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13218 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13219 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13220 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13221
132222013-09-06 Pedro Alves <palves@redhat.com>
13223
13224 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13225 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13226
132272013-09-06 Pedro Alves <palves@redhat.com>
13228
13229 * linux-amd64-ipa.c: Include tracepoint.h.
13230 * linux-i386-ipa.c: Include tracepoint.h.
13231
132322013-09-06 Ricard Wanderlof <ricardw@axis.com>
13233
13234 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13235 (ps_get_thread_area): New function.
13236
132372013-09-06 Ricard Wanderlof <ricardw@axis.com>
13238
13239 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13240 (initialize_low_arch): Call init_registers_crisv32 rather than
13241 init_register_crisv32.
13242
132432013-09-05 Pedro Alves <palves@redhat.com>
13244
13245 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13246 to ...
13247 * hostio.h: ... this new file.
13248 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13249 win32-low.c: Include hostio.h.
13250
132512013-09-05 Pedro Alves <palves@redhat.com>
13252
13253 * server.h (gdb_client_data, handler_func, callback_handler_func)
13254 (delete_file_handler, add_file_handler, append_callback_event)
13255 (delete_callback_event, start_event_loop, initialize_event_loop):
13256 Move to event-loop.h and include it.
13257 * event-loop.h: New file.
13258
132592013-09-05 Pedro Alves <palves@redhat.com>
13260
13261 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13262 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13263 (loaded_dll, unloaded_dll): Move to ...
13264 * dll.h: ... this new file.
13265 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13266
132672013-09-05 Pedro Alves <palves@redhat.com>
13268
13269 * server.h (current_process, get_thread_process, all_processes)
13270 (add_inferior_to_list, for_each_inferior, current_inferior)
13271 (remove_inferior, add_process, remove_process, find_process_pid)
13272 (have_started_inferiors_p, have_attached_inferiors_p)
13273 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13274 (clear_inferiors, find_inferior, find_inferior_id)
13275 (inferior_target_data, set_inferior_target_data)
13276 (inferior_regcache_data, set_inferior_regcache_data): Move to
13277 inferiors.h, and include it.
13278 * inferiors.h: New file.
13279
132802013-09-05 Pedro Alves <palves@redhat.com>
13281
13282 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13283 Move ...
13284 * ax.h: ... here.
13285
132862013-09-05 Pedro Alves <palves@redhat.com>
13287
13288 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13289 tracepoint.h.
13290 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13291 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13292 (handle_tracepoint_general_set, handle_tracepoint_query)
13293 (tracepoint_finished_step, tracepoint_was_hit)
13294 (release_while_stepping_state_list, current_traceframe)
13295 (in_readonly_region, traceframe_read_mem)
13296 (fetch_traceframe_registers, traceframe_read_sdata)
13297 (traceframe_read_info, struct fast_tpoint_collect_status)
13298 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13299 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13300 (supply_fast_tracepoint_registers)
13301 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13302 (ipa_tdesc, claim_trampoline_space)
13303 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13304 (agent_mem_read, agent_get_trace_state_variable_value)
13305 (agent_set_trace_state_variable_value, agent_tsv_read)
13306 (agent_mem_read_string, get_raw_reg_func_addr)
13307 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13308 * tracepoint.h: ... this new file.
13309
133102013-09-05 Pedro Alves <palves@redhat.com>
13311
13312 * server.h (perror_with_name, error, fatal, warning, paddress)
13313 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13314 include it.
13315 * utils.h: New file.
13316
133172013-09-05 Pedro Alves <palves@redhat.com>
13318
13319 * server.h (remote_debug, noack_mode, transport_is_reliable)
13320 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13321 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13322 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13323 (write_enn, initialize_async_io, enable_async_io)
13324 (disable_async_io, check_remote_input_interrupt_request)
13325 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13326 (dead_thread_notify, prepare_resume_reply)
13327 (decode_address_to_semicolon, decode_address, decode_m_packet)
13328 (decode_M_packet, decode_X_packet, decode_xfer_write)
13329 (decode_search_memory_packet, unhexify, hexify)
13330 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13331 (look_up_one_symbol, relocate_instruction)
13332 (monitor_output): Move to remote-utils.h, and include it.
13333 * remote-utils.h: New file.
13334
133352013-09-05 Pedro Alves <palves@redhat.com>
13336
13337 * server.h (_): Delete.
13338
133392013-09-02 Pedro Alves <palves@redhat.com>
13340
13341 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13342 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13343 allocated.
13344 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13345
133462013-09-02 Pierre Muller <muller@sourceware.org>
13347
13348 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13349 or WriteProcessMemory complete successfully and handle
13350 ERROR_PARTIAL_COPY error.
13351
133522013-09-02 Pedro Alves <palves@redhat.com>
13353
13354 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13355 error instead of EIO.
13356
133572013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13358
13359 PR server/15604
13360 * linux-low.c: Include filestuff.h.
13361 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13362 * lynx-low.c: Include filestuff.h.
13363 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13364 * server.c: Include filestuff.h.
13365 (main): Call notice_open_fds.
13366 * spu-low.c: Include filestuff.h.
13367 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13368
133692013-08-22 Luis Machado <lgustavo@codesourcery.com>
13370
13371 * Makefile.in: Explain why ../target and ../nat are not
13372 listed as include file search paths.
13373 (linux-waitpid.o): New object file rule.
13374 * configure.srv (srv_native_linux_obj): New variable.
13375 Replace all occurrences of linux native object files with
13376 $srv_native_linux_obj.
13377 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13378 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13379 (linux_enable_event_reporting): Remove declaration.
13380 (my_waitpid): Moved to common/linux-waitpid.c.
13381 (linux_wait_for_event): Pass ptid when calling
13382 linux_enable_event_reporting.
13383 (linux_supports_tracefork_flag): Remove.
13384 (linux_enable_event_reporting): Likewise.
13385 (linux_tracefork_grandchild): Remove.
13386 (STACK_SIZE): Moved to common/linux-ptrace.c.
13387 (linux_tracefork_child): Remove.
13388 (linux_test_for_tracefork): Remove.
13389 (linux_look_up_symbols): Call linux_supports_traceclone.
13390 (initialize_low): Remove call to linux_test_for_tracefork.
13391 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13392 common/linux-ptrace.h.
13393 (PTRACE_TYPE_ARG4): Likewise.
13394 Include linux-ptrace.h.
13395
133962013-08-21 Pedro Alves <palves@redhat.com>
13397
13398 * config.in: Renegerate.
13399
134002013-08-19 Luis Machado <lgustavo@codesourcery.com>
13401
13402 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13403 (SFILES): Remove $(srcdir)/common/target-common.c and
13404 add $(srcdir)/target/waitstatus.c.
13405 (OBS): Remove target-common.o and add waitstatus.o.
13406 (server_h): Remove $(srcdir)/../common/target-common.h and
13407 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13408 and $(srcdir)/../target/waitstatus.h.
13409 (target-common.o): Remove.
13410 (waitstatus.o): New target object file.
13411 * target.h: Do not include target-common.h and
13412 include target/resume.h, target/wait.h and
13413 target/waitstatus.h.
13414
134152013-08-13 Luis Machado <lgustavo@codesourcery.com>
13416
13417 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13418 to PTRACE_TYPE_ARG3.
13419 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13420 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13421 PTRACE_TYPE_ARG4.
13422 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13423 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13424
134252013-07-27 Jie Zhang <jie@codesourcery.com>
13426 Daniel Jacobowitz <dan@codesourcery.com>
13427 Yao Qi <yao@codesourcery.com>
13428
13429 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13430 (mips-linux-watch.o): New rule.
13431 (mips_linux_watch_h): New variable.
13432 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13433 srv_tgtobj.
13434 * linux-mips-low.c: Include mips-linux-watch.h.
13435 (struct arch_process_info, struct arch_lwp_info): New.
13436 (update_watch_registers_callback): New function.
13437 (mips_linux_new_process, mips_linux_new_thread) New functions.
13438 (mips_linux_prepare_to_resume, mips_insert_point): New
13439 functions.
13440 (mips_remove_point, mips_stopped_by_watchpoint): New
13441 functions.
13442 (rsp_bp_type_to_target_hw_bp_type): New function.
13443 (mips_stopped_data_address): New function.
13444 (the_low_target): Add watchpoint support functions.
13445
134462013-07-27 Yao Qi <yao@codesourcery.com>
13447
13448 * i386-low.c: Include break-common.h.
13449 (enum target_hw_bp_type): Remove.
13450
134512013-07-24 Luis Machado <lgustavo@codesourcery.com>
13452
13453 * Makefile.in (SFILES): /common/target-common.c.
13454 (OBS): Add target-common.o.
13455 (server_h): Add $(srcdir)/../common/target-common.h.
13456 (target-common.o): New target.
13457 * server.c (queue_stop_reply_callback): Free
13458 status string after use.
13459 * target.c (target_waitstatus_to_string): Remove.
13460 * target.h: Include target-common.h.
13461 (resume_kind): Likewise.
13462 (target_waitkind): Likewise.
13463 (target_waitstatus): Likewise.
13464 (TARGET_WNOHANG): Likewise.
13465
134662013-07-04 Yao Qi <yao@codesourcery.com>
13467
13468 * Makefile.in (host_alias): Use @host_noncanonical@.
13469 (target_alias): Use @target_noncanonical@.
13470 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13471 ACX_NONCANONICAL_HOST.
13472 * configure: Regenerated.
13473
13474 Revert:
13475 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13476
13477 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13478 * configure: Rebuild.
13479 * Makefile.in (version_host, version_target): Get from configure.
13480 (version.c): Use $(version_host) and $(version_target).
13481
134822013-07-03 Pedro Alves <palves@redhat.com>
13483
13484 * Makefile.in (config.status): Depend on development.sh.
13485 * acinclude.m4: Include libmcheck.m4.
13486 * configure: Regenerate.
13487
134882013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13489
13490 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13491 attribute inside the parentheses.
13492 (winapi_DebugSetProcessKillOnExit): Ditto.
13493 (winapi_DebugBreakProcess): Ditto.
13494 (winapi_GenerateConsoleCtrlEvent): Ditto.
13495
134962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13497
13498 * notif.h (notif_event): Add a dummy member to avoid compiler
13499 errors.
13500
135012013-07-01 Pedro Alves <palves@redhat.com>
13502
13503 * hostio.c (HOSTIO_PATH_MAX): Define.
13504 (require_filename, handle_open, handle_unlink, handle_readlink):
13505 Use it.
13506
135072013-07-01 Pedro Alves <palves@redhat.com>
13508
13509 * server.h: Include "pathmax.h".
13510 * linux-low.c: Don't include sys/param.h.
13511 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13512 MAXPATHLEN.
13513 * win32-low.c: Don't include sys/param.h.
13514 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13515
135162013-07-01 Pedro Alves <palves@redhat.com>
13517
13518 * event-loop.c: Don't check HAVE_UNISTD_H before including
13519 <unistd.h>.
13520 * gdbreplay.c: Likewise.
13521 * remote-utils.c: Likewise.
13522 * server.c: Likewise.
13523 * configure.ac: Don't check for unistd.h.
13524 * configure: Regenerate.
13525
135262013-06-28 Tom Tromey <tromey@redhat.com>
13527
13528 * Makefile.in (version.c): Use version.in, not
13529 common/version.in.
13530
135312013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13532
13533 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13534 * configure: Rebuild.
13535 * Makefile.in (version_host, version_target): Get from configure.
13536 (version.c): Use $(version_host) and $(version_target).
13537
135382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13539
13540 Fix trace-status to output user name without trailing colon.
13541 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13542
135432013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13544
13545 Fix trace-status to output proper start-time and stop-time.
13546 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13547 output start time and stop time in hex as gdb expects.
13548
135492013-06-26 Pedro Alves <pedro@codesourcery.com>
13550
13551 * tracepoint.c (build_traceframe_info_xml): Output trace state
13552 variables present in the trace buffer.
13553
135542013-06-24 Tom Tromey <tromey@redhat.com>
13555
13556 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13557 create-version.sh.
13558 (version.o): Remove.
13559 * gdbreplay.c: Include version.h.
13560 (version, host_name): Don't declare.
13561 * server.h: Include version.h.
13562 (version, host_name): Don't declare.
13563
135642013-06-12 Pedro Alves <palves@redhat.com>
13565
13566 * linux-x86-low.c (linux_is_elf64): Delete global.
13567 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13568 with local linux_pid_exe_is_elf_64_file use.
13569
135702013-06-11 Pedro Alves <palves@redhat.com>
13571
13572 * linux-low.c (regset_disabled, disable_regset): New functions.
13573 (regsets_fetch_inferior_registers)
13574 (regsets_store_inferior_registers): Use them.
13575 (initialize_regsets_info); Don't allocate the disabled_regsets
13576 array here.
13577 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13578 comment.
13579
135802013-06-11 Pedro Alves <palves@redhat.com>
13581
13582 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13583 xmalloc.
13584
135852013-06-11 Pedro Alves <palves@redhat.com>
13586
13587 * linux-x86-low.c (initialize_low_arch): Call
13588 init_registers_x32_avx_linux.
13589
135902013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13591
13592 Fix compatibility with Android Bionic.
13593 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13594 it is not empty.
13595
135962013-06-07 Pedro Alves <palves@redhat.com>
13597
13598 PR server/14823
13599 * Makefile.in (OBS): Add tdesc.o.
13600 (IPA_OBJS): Add tdesc-ipa.o.
13601 (tdesc-ipa.o): New rule.
13602 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13603 interface.
13604 * linux-low.c (new_inferior): Delete.
13605 (disabled_regsets, num_regsets): Delete.
13606 (linux_add_process): Adjust to set the new per-process
13607 new_inferior flag.
13608 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13609 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13610 was a stop. When calling arch_setup, switch the current inferior
13611 to the thread that got an event.
13612 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13613 (regsets_fetch_inferior_registers)
13614 (regsets_store_inferior_registers): New regsets_info parameter.
13615 Adjust to use it.
13616 (linux_register_in_regsets): New regs_info parameter. Adjust to
13617 use it.
13618 (register_addr, fetch_register, store_register): New usrregs_info
13619 parameter. Adjust to use it.
13620 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13621 parameter regs_info. Adjust to use it.
13622 (linux_fetch_registers): Get the current inferior's regs_info, and
13623 adjust to use it.
13624 (linux_store_registers): Ditto.
13625 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13626 (initialize_low): Don't initialize the target_regsets here. Call
13627 initialize_low_arch.
13628 * linux-low.h (target_regsets): Delete declaration.
13629 (struct regsets_info): New.
13630 (struct usrregs_info): New.
13631 (struct regs_info): New.
13632 (struct process_info_private) <new_inferior>: New field.
13633 (struct linux_target_ops): Delete the num_regs, regmap, and
13634 regset_bitmap fields. New field regs_info.
13635 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13636 * i387-fp.c (num_xmm_registers): Delete.
13637 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13638 calls to new interface.
13639 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13640 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13641 Infer the number of xmm registers from the regcache's target
13642 description.
13643 * i387-fp.h (num_xmm_registers): Delete.
13644 * inferiors.c (add_thread): Don't install the thread's regcache
13645 here.
13646 * proc-service.c (gregset_info): Fetch the current inferior's
13647 regs_info. Adjust to use it.
13648 * regcache.c: Include tdesc.h.
13649 (register_bytes, reg_defs, num_registers)
13650 (gdbserver_expedite_regs): Delete.
13651 (get_thread_regcache): If the thread doesn't have a regcache yet,
13652 create one, instead of aborting gdbserver.
13653 (regcache_invalidate_one): Rename to ...
13654 (regcache_invalidate_thread): ... this.
13655 (regcache_invalidate_one): New.
13656 (regcache_invalidate): Only invalidate registers of the current
13657 process.
13658 (init_register_cache): Add target_desc parameter, and use it.
13659 (new_register_cache): Ditto. Assert the target description has a
13660 non zero registers_size.
13661 (regcache_cpy): Add assertions. Adjust.
13662 (realloc_register_cache, set_register_cache): Delete.
13663 (registers_to_string, registers_from_string): Adjust.
13664 (find_register_by_name, find_regno, find_register_by_number)
13665 (register_cache_size): Add target_desc parameter, and use it.
13666 (free_register_cache_thread, free_register_cache_thread_one)
13667 (regcache_release, register_cache_size): New.
13668 (register_size): Add target_desc parameter, and use it.
13669 (register_data, supply_register, supply_register_zeroed)
13670 (supply_regblock, supply_register_by_name, collect_register)
13671 (collect_register_as_string, collect_register_by_name): Adjust.
13672 * regcache.h (struct target_desc): Forward declare.
13673 (struct regcache) <tdesc>: New field.
13674 (init_register_cache, new_register_cache): Add target_desc
13675 parameter.
13676 (regcache_invalidate_thread): Declare.
13677 (regcache_invalidate_one): Delete declaration.
13678 (regcache_release): Declare.
13679 (find_register_by_number, register_cache_size, register_size)
13680 (find_regno): Add target_desc parameter.
13681 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13682 declarations.
13683 * remote-utils.c: Include tdesc.h.
13684 (outreg, prepare_resume_reply): Adjust.
13685 * server.c: Include tdesc.h.
13686 (gdbserver_xmltarget): Delete declaration.
13687 (get_features_xml, process_serial_event): Adjust.
13688 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13689 declare.
13690 (struct process_info) <tdesc>: New field.
13691 (ipa_tdesc): Declare.
13692 * tdesc.c: New file.
13693 * tdesc.h: New file.
13694 * tracepoint.c: Include tdesc.h.
13695 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13696 (get_context_regcache): Adjust to pass ipa_tdesc down.
13697 (do_action_at_tracepoint): Adjust to get the register cache size
13698 from the context regcache's description.
13699 (traceframe_walk_blocks): Adjust to get the register cache size
13700 from the current trace frame's description.
13701 (traceframe_get_pc): Adjust to get current trace frame's
13702 description and pass it down.
13703 (gdb_collect): Adjust to get the register cache size from the
13704 IPA's description.
13705 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13706 (gdbserver_xmltarget): Delete.
13707 (initialize_low_tracepoint): Set the ipa's target description.
13708 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13709 (initialize_low_tracepoint): Set the ipa's target description.
13710 * linux-x86-low.c: Include tdesc.h.
13711 [__x86_64__] (is_64bit_tdesc): New.
13712 (ps_get_thread_area, x86_get_thread_area): Use it.
13713 (i386_cannot_store_register): Rename to ...
13714 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13715 (i386_cannot_fetch_register): Rename to ...
13716 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13717 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13718 to new interface.
13719 (target_regsets): Rename to ...
13720 (x86_regsets): ... this.
13721 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13722 interface.
13723 (x86_siginfo_fixup): Use is_64bit_tdesc.
13724 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13725 (tdesc_x32_avx_linux, tdesc_x32_linux)
13726 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13727 Declare.
13728 (x86_linux_update_xmltarget): Delete.
13729 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13730 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13731 (AMD64_LINUX_USER64_CS): New.
13732 (x86_linux_read_description): New, based on
13733 x86_linux_update_xmltarget.
13734 (same_process_callback): New.
13735 (x86_arch_setup_process_callback): New.
13736 (x86_linux_update_xmltarget): New.
13737 (x86_regsets_info): New.
13738 (amd64_linux_regs_info): New.
13739 (i386_linux_usrregs_info): New.
13740 (i386_linux_regs_info): New.
13741 (x86_linux_regs_info): New.
13742 (x86_arch_setup): Reimplement.
13743 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13744 (x86_emit_ops): Ditto.
13745 (the_low_target): Adjust. Install x86_linux_regs_info,
13746 x86_cannot_fetch_register, and x86_cannot_store_register.
13747 (initialize_low_arch): New.
13748 * linux-ia64-low.c (tdesc_ia64): Declare.
13749 (ia64_fetch_register): Adjust.
13750 (ia64_usrregs_info, regs_info): New globals.
13751 (ia64_regs_info): New function.
13752 (the_low_target): Adjust.
13753 (initialize_low_arch): New function.
13754 * linux-sparc-low.c (tdesc_sparc64): Declare.
13755 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13756 Adjust.
13757 (sparc_arch_setup): New function.
13758 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13759 (the_low_target): Adjust.
13760 (initialize_low_arch): New function.
13761 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13762 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13763 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13764 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13765 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13766 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13767 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13768 (tdesc_powerpc_isa205_vsx64l): Declare.
13769 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13770 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13771 (ppc_set_pc, ppc_get_hwcap): Adjust.
13772 (ppc_usrregs_info): Forward declare.
13773 (!__powerpc64__) ppc_regmap_adjusted: New global.
13774 (ppc_arch_setup): Adjust to the current process'es target
13775 description.
13776 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13777 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13778 (ppc_store_evrregset): Adjust.
13779 (target_regsets): Rename to ...
13780 (ppc_regsets): ... this, and make static.
13781 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13782 (ppc_regs_info): New function.
13783 (the_low_target): Adjust.
13784 (initialize_low_arch): New function.
13785 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13786 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13787 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13788 (tdesc_s390x_linux64v2): Declare.
13789 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13790 (s390_fill_gregset, s390_store_last_break): Adjust.
13791 (target_regsets): Rename to ...
13792 (s390_regsets): ... this, and make static.
13793 (s390_get_pc, s390_set_pc): Adjust.
13794 (s390_get_hwcap): New target_desc parameter, and use it.
13795 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13796 (s390_arch_setup): Adjust to set the current process'es target
13797 description. Don't adjust the regmap.
13798 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13799 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13800 (regs_info_3264): New globals.
13801 (s390_regs_info): New function.
13802 (the_low_target): Adjust.
13803 (initialize_low_arch): New function.
13804 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13805 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13806 [__mips64] (init_registers_mips_linux)
13807 (init_registers_mips_dsp_linux): Delete defines.
13808 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13809 (have_dsp): New global.
13810 (mips_read_description): New, based on mips_arch_setup.
13811 (mips_arch_setup): Reimplement.
13812 (get_usrregs_info): New function.
13813 (mips_cannot_fetch_register, mips_cannot_store_register)
13814 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13815 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13816 (target_regsets): Rename to ...
13817 (mips_regsets): ... this, and make static.
13818 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13819 (dsp_regs_info, regs_info): New globals.
13820 (mips_regs_info): New function.
13821 (the_low_target): Adjust.
13822 (initialize_low_arch): New function.
13823 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13824 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13825 Declare.
13826 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13827 (arm_read_description): New, with bits factored from
13828 arm_arch_setup.
13829 (arm_arch_setup): Reimplement.
13830 (target_regsets): Rename to ...
13831 (arm_regsets): ... this, and make static.
13832 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13833 (arm_regs_info): New function.
13834 (the_low_target): Adjust.
13835 (initialize_low_arch): New function.
13836 * linux-m68k-low.c (tdesc_m68k): Declare.
13837 (target_regsets): Rename to ...
13838 (m68k_regsets): ... this, and make static.
13839 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13840 (m68k_regs_info): New function.
13841 (m68k_arch_setup): New function.
13842 (the_low_target): Adjust.
13843 (initialize_low_arch): New function.
13844 * linux-sh-low.c (tdesc_sharch): Declare.
13845 (target_regsets): Rename to ...
13846 (sh_regsets): ... this, and make static.
13847 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13848 (sh_regs_info, sh_arch_setup): New functions.
13849 (the_low_target): Adjust.
13850 (initialize_low_arch): New function.
13851 * linux-bfin-low.c (tdesc_bfin): Declare.
13852 (bfin_arch_setup): New function.
13853 (bfin_usrregs_info, regs_info): New globals.
13854 (bfin_regs_info): New function.
13855 (the_low_target): Adjust.
13856 (initialize_low_arch): New function.
13857 * linux-cris-low.c (tdesc_cris): Declare.
13858 (cris_arch_setup): New function.
13859 (cris_usrregs_info, regs_info): New globals.
13860 (cris_regs_info): New function.
13861 (the_low_target): Adjust.
13862 (initialize_low_arch): New function.
13863 * linux-cris-low.c (tdesc_crisv32): Declare.
13864 (cris_arch_setup): New function.
13865 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13866 (cris_regs_info): New function.
13867 (the_low_target): Adjust.
13868 (initialize_low_arch): New function.
13869 * linux-m32r-low.c (tdesc_m32r): Declare.
13870 (m32r_arch_setup): New function.
13871 (m32r_usrregs_info, regs_info): New globals.
13872 (m32r_regs_info): Adjust.
13873 (initialize_low_arch): New function.
13874 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13875 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13876 (tic6x_usrregs_info): Forward declare.
13877 (tic6x_read_description): New function, based on ...
13878 (tic6x_arch_setup): ... this. Reimplement.
13879 (target_regsets): Rename to ...
13880 (tic6x_regsets): ... this, and make static.
13881 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13882 (tic6x_regs_info): New function.
13883 (the_low_target): Adjust.
13884 (initialize_low_arch): New function.
13885 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13886 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13887 (target_regsets): Rename to ...
13888 (xtensa_regsets): ... this, and make static.
13889 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13890 globals.
13891 (xtensa_arch_setup, xtensa_regs_info): New functions.
13892 (the_low_target): Adjust.
13893 (initialize_low_arch): New function.
13894 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13895 (nios2_arch_setup): Set the current process'es tdesc.
13896 (target_regsets): Rename to ...
13897 (nios2_regsets): ... this.
13898 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13899 (nios2_regs_info): New function.
13900 (the_low_target): Adjust.
13901 (initialize_low_arch): New function.
13902 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13903 (aarch64_arch_setup): Set the current process'es tdesc.
13904 (target_regsets): Rename to ...
13905 (aarch64_regsets): ... this.
13906 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13907 (aarch64_regs_info): New function.
13908 (the_low_target): Adjust.
13909 (initialize_low_arch): New function.
13910 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13911 globals.
13912 (target_regsets): Rename to ...
13913 (tile_regsets): ... this.
13914 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13915 (tile_regs_info): New function.
13916 (tile_arch_setup): Set the current process'es tdesc.
13917 (the_low_target): Adjust.
13918 (initialize_low_arch): New function.
13919 * spu-low.c (tdesc_spu): Declare.
13920 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13921 * win32-arm-low.c (tdesc_arm): Declare.
13922 (arm_arch_setup): New function.
13923 (the_low_target): Install arm_arch_setup instead of
13924 init_registers_arm.
13925 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13926 (init_windows_x86): Rename to ...
13927 (i386_arch_setup): ... this. Set `win32_tdesc'.
13928 (the_low_target): Adjust.
13929 * win32-low.c (win32_tdesc): New global.
13930 (child_add_thread): Don't create the thread cache here.
13931 (do_initial_child_stuff): Set the new process'es tdesc.
13932 * win32-low.h (struct target_desc): Forward declare.
13933 (win32_tdesc): Declare.
13934 * lynx-i386-low.c (tdesc_i386): Declare global.
13935 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13936 * lynx-low.c (lynx_tdesc): New global.
13937 (lynx_add_process): Set the new process'es tdesc.
13938 * lynx-low.h (struct target_desc): Forward declare.
13939 (lynx_tdesc): Declare global.
13940 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13941 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13942 * nto-low.c (nto_tdesc): New global.
13943 (do_attach): Set the new process'es tdesc.
13944 * nto-low.h (struct target_desc): Forward declare.
13945 (nto_tdesc): Declare.
13946 * nto-x86-low.c (tdesc_i386): Declare.
13947 (nto_x86_arch_setup): Set `nto_tdesc'.
13948
139492013-06-04 Gary Benson <gbenson@redhat.com>
13950
13951 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13952 to qSupported response when appropriate.
13953 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13954 with nonzero-length annex.
13955 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13956 arguments supplied in annex.
13957
139582013-05-31 Doug Evans <dje@google.com>
13959
13960 PR server/15594
13961 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13962 64 bits in 64-cross-32 environment.
13963
139642013-05-28 Pedro Alves <palves@redhat.com>
13965
13966 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13967 (aarch64-without-fpu.c): Delete rule.
13968 * configure.srv (aarch64*-*-linux*): Remove references to
13969 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13970 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13971 declaration.
13972
139732013-05-24 Pedro Alves <palves@redhat.com>
13974
13975 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13976 instead of strchr/decode_address. Error if the range isn't split
13977 with a ','. Don't assume there's be a ':' in the action.
13978
139792013-05-23 Yao Qi <yao@codesourcery.com>
13980 Pedro Alves <palves@redhat.com>
13981
13982 * linux-low.c (lwp_in_step_range): New function.
13983 (linux_wait_1): If the thread was range stepping and stopped
13984 outside the stepping range, report the stop to GDB. Otherwise,
13985 continue stepping. Add range stepping debug output.
13986 (linux_set_resume_request): Copy the step range from the resume
13987 request to the lwp.
13988 (linux_supports_range_stepping): New.
13989 (linux_target_ops) <supports_range_stepping>: Set to
13990 linux_supports_range_stepping.
13991 * linux-low.h (struct linux_target_ops)
13992 <supports_range_stepping>: New field.
13993 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13994 * linux-x86-low.c (x86_supports_range_stepping): New.
13995 (the_low_target) <supports_range_stepping>: Set to
13996 x86_supports_range_stepping.
13997 * server.c (handle_v_cont): Handle 'r' action.
13998 (handle_v_requests): Append ";r" if the target supports range
13999 stepping.
14000 * target.h (struct thread_resume) <step_range_start,
14001 step_range_end>: New fields.
14002 (struct target_ops) <supports_range_stepping>:
14003 New field.
14004 (target_supports_range_stepping): New macro.
14005
140062013-05-17 Joel Brobecker <brobecker@adacore.com>
14007
14008 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14009 confusion in comment.
14010
140112013-05-17 Joel Brobecker <brobecker@adacore.com>
14012
14013 * lynx-low.c (struct process_info_private): New type.
14014 (lynx_add_process): New function.
14015 (lynx_create_inferior, lynx_attach): Replace calls to
14016 add_process by calls to lynx_add_process.
14017 (lynx_resume): If PTID is null, then try using
14018 current_process()->private->last_wait_event_ptid.
14019 Add comments.
14020 (lynx_clear_inferiors): Delete. The contents of that function
14021 has been inlined in lynx_mourn;
14022 (lynx_wait_1): Save the ptid in the process's private data.
14023 (lynx_mourn): Free the process' private data. Replace call
14024 to lynx_clear_inferiors by call to clear_inferiors.
14025
140262013-05-17 Yao Qi <yao@codesourcery.com>
14027
14028 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14029 the right place.
14030
140312013-05-16 Luis Machado <lgustavo@codesourcery.com>
14032
14033 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14034 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14035 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14036 PT_TEXT_END_ADDR guards. Update comments.
14037 (linux_target_op) <read_offsets>: Conditionally define to
14038 linux_read_offsets if the target is UCLIBC and if it defines
14039 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14040
140412013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14042 Andrew Jenner <andrew@codesourcery.com>
14043
14044 * Makefile.in (SFILES): Add linux-nios2-low.c.
14045 (clean): Add action to delete nios2-linux.c.
14046 (nios2-linux.c): New rule.
14047 * configure.srv: Add nios2*-*-linux*.
14048 * linux-nios2-low.c: New.
14049
140502013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14051
14052 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14053
140542013-04-25 Hui Zhu <hui@codesourcery.com>
14055
14056 PR gdb/15186
14057 * ax.c (ax_printf): Add fflush.
14058
140592013-04-22 Tom Tromey <tromey@redhat.com>
14060
14061 * Makefile.in (SFILES): Add filestuff.c.
14062 (OBS): Add filestuff.o.
14063 (filestuff.o): New target.
14064 * config.in, configure: Rebuild.
14065 * configure.ac: Check for fdwalk, pipe2.
14066
140672013-04-17 Pedro Alves <palves@redhat.com>
14068
14069 * configure.ac (USE_THREAD_DB): Delete variable.
14070 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14071 Don't AC_SUBST USE_THREAD_DB.
14072 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14073 * config.in, configure: Regenerate.
14074
140752013-04-16 Pedro Alves <palves@redhat.com>
14076
14077 * linux-low.h (struct lwp_info) <thread_known>: Move under
14078 the USE_THREAD_DB #ifdef.
14079
140802013-04-16 Pedro Alves <palves@redhat.com>
14081
14082 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14083 (linux-low.o): Delete rule.
14084 * linux-low.h: Always include "gdb_thread_db.h" instead of
14085 conditionally including thread_db.h.
14086 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14087 HAVE_THREAD_DB_H.
14088
140892013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14090
14091 * Makefile.in (install-only): Fix make install regression.
14092
140932013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14094
14095 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14096 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14097 installation.
14098 * gdbserver.1: Remove.
14099
141002013-03-22 Pedro Alves <palves@redhat.com>
14101
14102 * linux-low.c (handle_extended_wait): Don't call
14103 linux_enable_event_reporting.
14104
141052013-03-15 Tony Theodore <tonyt@logyst.com>
14106
14107 PR build/9098:
14108 * Makefile.in (SHELL): Use @SHELL@.
14109
141102013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14111
14112 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14113 compiler warning.
14114
141152013-03-13 Joel Brobecker <brobecker@adacore.com>
14116
14117 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14118 Remove extraneous NULL element.
14119
141202013-03-13 Yao Qi <yao@codesourcery.com>
14121
14122 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14123 'V' block in trace frame.
14124
141252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14126
14127 * target.h (struct target_ops): Add btrace ops.
14128 (target_supports_btrace): New macro.
14129 (target_enable_btrace): New macro.
14130 (target_disable_btrace): New macro.
14131 (target_read_btrace): New macro.
14132 * gdbthread.h (struct thread_info): Add btrace field.
14133 * server.c: Include btrace-common.h.
14134 (handle_btrace_general_set): New function.
14135 (handle_btrace_enable): New function.
14136 (handle_btrace_disable): New function.
14137 (handle_general_set): Call handle_btrace_general_set.
14138 (handle_qxfer_btrace): New function.
14139 (struct qxfer qxfer_packets[]): Add btrace entry.
14140 * inferiors.c (remove_thread): Disable btrace.
14141 * linux-low: Include linux-btrace.h.
14142 (linux_low_enable_btrace): New function.
14143 (linux_low_read_btrace): New function.
14144 (linux_target_ops): Add btrace ops.
14145 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14146 Add srv_linux_btrace=yes.
14147 (x86_64-*-linux*): Add linux-btrace.o.
14148 Add srv_linux_btrace=yes.
14149 * configure.ac: Define HAVE_LINUX_BTRACE.
14150 * config.in: Regenerated.
14151 * configure: Regenerated.
14152
141532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14154
14155 * server.c (handle_qxfer): Preserve error message if -3 is
14156 returned.
14157 (qxfer): Document the -3 return value.
14158
141592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14160
14161 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14162 (linux_btrace_h): New variable.
14163 (linux-btrace.o): New rule.
14164
141652013-03-08 Stan Shebs <stan@codesourcery.com>
14166 Hafiz Abid Qadeer <abidh@codesourcery.com>
14167
14168 * tracepoint.c (trace_buffer_size): New global.
14169 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14170 (init_trace_buffer): Change to one-argument function. Allocate
14171 trace buffer memory.
14172 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14173 handle QTBuffer:size packet.
14174 (cmd_bigqtbuffer_size): New function.
14175 (initialize_tracepoint): Call init_trace_buffer with
14176 DEFAULT_TRACE_BUFFER_SIZE.
14177 * server.c (handle_query): Add QTBuffer:size in the
14178 supported packets.
14179
141802013-03-07 Yao Qi <yao@codesourcery.com>
14181
14182 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14183 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14184 of -1.
14185 (cmd_qtsp): Adjust condition. Do post increment.
14186 Set cur_action and cur_step_action back to 0.
14187
141882013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14189
14190 PR server/15236
14191 * linux-low.c (linux_write_memory): Return early success if LEN is
14192 zero.
14193
141942013-03-05 Corinna Vinschen <vinschen@redhat.de>
14195
14196 * configure.srv: Add x86_64-*-cygwin* as target.
14197
141982013-02-28 Tom Tromey <tromey@redhat.com>
14199
14200 * configure.ac: Invoke AC_SYS_LARGEFILE.
14201 * configure, config.in: Rebuild.
14202
142032013-02-28 Corinna Vinschen <vinschen@redhat.com>
14204
14205 * win32-low.c: Throughout, fix format strings and casts of
14206 printf-like functions to avoid type related warnings on all
14207 platforms.
14208 (get_child_debug_event): Print dwDebugEventCode as hex since
14209 that's how it's usually documented.
14210
142112013-02-28 Yao Qi <yao@codesourcery.com>
14212
14213 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14214 pulongest.
14215
142162013-02-27 Jiong Wang <jiwang@tilera.com>
14217
14218 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14219 (reg-tilegx32.c): New rule.
14220 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14221 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14222 different register info initializer according to elf class.
14223 (init_registers_tilgx32): New function. The tilegx32 register info
14224 initializer.
14225 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14226 (tile_store_gregset): Likewise.
14227
142282013-02-27 Yao Qi <yao@codesourcery.com>
14229
14230 * server.c (process_point_options): Print debug message when
14231 debug_threads is true.
14232
142332013-02-26 Yao Qi <yao@codesourcery.com>
14234
14235 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14236
142372013-02-19 Pedro Alves <palves@redhat.com>
14238 Kai Tietz <ktietz@redhat.com>
14239
14240 PR gdb/15161
14241
14242 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14243 instead of strtoul to extract address from packet.
14244 (process_serial_event) <'z'>: Likewise.
14245
142462013-02-18 Yao Qi <yao@codesourcery.com>
14247
14248 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14249
142502013-02-14 Pedro Alves <palves@redhat.com>
14251
14252 Plug memory leak.
14253
14254 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14255 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14256
142572013-02-14 Pedro Alves <palves@redhat.com>
14258
14259 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14260
142612013-02-14 Pedro Alves <palves@redhat.com>
14262
14263 * tracepoint.c (save_string): Delete.
14264 (add_tracepoint_action): Use savestring instead of save_string.
14265
142662013-02-12 Pedro Alves <palves@redhat.com>
14267
14268 * linux-xtensa-low.c: Ditto.
14269 * xtensa-xtregs.c: Ditto.
14270
142712013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14272
14273 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14274 thread_db.
14275
142762013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14277
14278 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14279 aarch64_num_wp_regs and aarch64_num_bp_regs to
14280 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14281
142822013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14283
14284 * linux-aarch64-low.c (ps_get_thread_area): Replace
14285 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14286
142872013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14288 Marcus Shawcroft <marcus.shawcroft@arm.com>
14289 Nigel Stephens <nigel.stephens@arm.com>
14290 Yufeng Zhang <yufeng.zhang@arm.com>
14291
14292 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14293 (aarch64.c, aarch64-without-fpu.c): New targets.
14294 * configure.srv (aarch64*-*-linux*): New.
14295 * linux-aarch64-low.c: New file.
14296
142972013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14298
14299 * linux-low.c (handle_extended_wait, linux_create_inferior)
14300 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14301 (dequeue_one_deferred_signal, linux_resume_one_thread)
14302 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14303 (linux_tracefork_grandchild, linux_test_for_tracefork)
14304 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14305 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14306 where the argument is 0.
14307
143082013-01-25 Yao Qi <yao@codesourcery.com>
14309
14310 * event-loop.c: Include "queue.h".
14311 (gdb_event_p): New typedef.
14312 (struct gdb_event) <next_event>: Remove.
14313 (event_queue): Change to QUEUE(gdb_event_p).
14314 (async_queue_event): Remove.
14315 (gdb_event_xfree): New.
14316 (initialize_event_loop): New.
14317 (process_event): Use API from QUEUE.
14318 (wait_for_event): Likewise.
14319 * server.c (main): Call initialize_event_loop.
14320 * server.h (initialize_event_loop): Declare.
14321
143222013-01-18 Yao Qi <yao@codesourcery.com>
14323
14324 * ax.h (struct eval_agent_expr_context): New.
14325 (gdb_eval_agent_expr): Update declaration.
14326 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14327 TFRAME. Add new argument CTX.
14328 * server.h (struct eval_agent_expr_context): Declare.
14329 (agent_mem_read, agent_tsv_read): Update declaration.
14330 (agent_mem_read_string): Likewise.
14331 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14332 (add_traceframe_block): Add new argument TPOINT.
14333 Increase TPOINT->traceframe_usage.
14334 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14335 eval_tracepoint_agent_expr.
14336 (condition_true_at_tracepoint): Likewise.
14337 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14338 (agent_mem_read_string, agent_tsv_read): Likewise.
14339
143402013-01-16 Yao Qi <yao@codesourcery.com>
14341
14342 * linux-low.c (linux_resume_one_lwp): Don't check
14343 'lwp->bp_reinsert != 0'.
14344
143452013-01-07 Joel Brobecker <brobecker@adacore.com>
14346 Pedro Alves <palves@redhat.com>
14347
14348 * lynx-low.c (ptrace_request_to_str): Define a temporary
14349 macro and use it to simplify this function's implementation.
14350
143512013-01-07 Joel Brobecker <brobecker@adacore.com>
14352
14353 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14354 sets errno.
14355
143562013-01-07 Joel Brobecker <brobecker@adacore.com>
14357
14358 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14359
143602013-01-07 Joel Brobecker <brobecker@adacore.com>
14361
14362 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14363
143642013-01-07 Joel Brobecker <brobecker@adacore.com>
14365
14366 * lynx-low.c (lynx_resume): Use the resume_info parameter
14367 to determine the ptid for the lynx_ptrace call, unless
14368 it is equal to minus_one_ptid, in which case we use the
14369 ptid of the current_inferior.
14370 (lynx_wait_1): After having received a thread create/exit
14371 event, resume the inferior's execution using the signaling
14372 thread's ptid, rather than the old ptid.
14373
143742013-01-07 Joel Brobecker <brobecker@adacore.com>
14375
14376 * lynx-low.c (lynx_resume): Delete variable ret.
14377
143782013-01-01 Joel Brobecker <brobecker@adacore.com>
14379
14380 * gdbreplay.c (gdbreplay_version): Update copyright year.
14381 * server.c (gdbserver_version): Likewise.
14382
143832012-12-17 Joel Brobecker <brobecker@adacore.com>
14384
14385 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14386 new thread.
14387
143882012-12-17 Joel Brobecker <brobecker@adacore.com>
14389
14390 * lynx-low.c (ptrace_request_to_str): Add handling for
14391 PTRACE_GETTRACESIG.
14392
143932012-12-17 Joel Brobecker <brobecker@adacore.com>
14394
14395 * lynx-low.c (lynx_attach): Delete variable new_process.
14396
143972012-12-17 Joel Brobecker <brobecker@adacore.com>
14398
14399 * lynx-low.c (lynx_create_inferior): Delete variable
14400 new_process.
14401
144022012-12-17 Joel Brobecker <brobecker@adacore.com>
14403
14404 * lynx-low.c (ptrace_request_to_str): Do not handle
14405 PTRACE_GETTHREADLIST if this macro does not exist.
14406
144072012-12-15 Yao Qi <yao@codesourcery.com>
14408
14409 * Makefile.in (OBS): Add notif.o.
14410 * notif.c, notif.h: New.
14411 * server.c: Include "notif.h".
14412 (struct vstop_notif) <next>: Remove.
14413 <base>: New field.
14414 (queue_stop_reply): Update.
14415 (push_event, send_next_stop_reply): Remove.
14416 (discard_queued_stop_replies): Update.
14417 (notif_stop): New variable.
14418 (handle_v_stopped): Remove.
14419 (handle_v_requests): Don't call handle_v_stopped. Call
14420 handle_ack_notif instead.
14421 (queue_stop_reply_callback): Call notif_event_enque instead
14422 of queue_stop_reply.
14423 (handle_status): Don't call send_next_stop_reply, call
14424 notif_write_event instead.
14425 (kill_inferior_callback): Likewise.
14426 (detach_or_kill_inferior_callback): Likewise.
14427 (main): Call initialize_notif.
14428 (process_serial_event): Call QUEUE_is_empty.
14429 (handle_target_event): Call notif_push instead of push event.
14430 * server.h (push_event): Remove declaration.
14431
144322012-12-10 Tom Tromey <tromey@redhat.com>
14433
14434 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14435 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14436 macros.
14437 (.c.o): Rewrite.
14438 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14439 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14440 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14441 (amd64-linux-ipa.o, ax.o): Rewrite.
14442 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14443 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14444 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14445 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14446 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14447 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14448 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14449 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14450 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14451 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14452 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14453 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14454 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14455 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14456 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14457 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14458 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14459 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14460 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14461 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14462 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14463 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14464 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14465 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14466 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14467 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14468 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14469 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14470 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14471 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14472 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14473 (reg-tilegx.o): Remove.
14474 (all_object_files): New macro.
14475 Include .deps files.
14476 * aclocal.m4, configure: Rebuild.
14477 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14478 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14479 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14480
144812012-12-05 Tom Tromey <tromey@redhat.com>
14482
14483 PR gdb/14917:
14484 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14485
144862012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14487
14488 * configure.ac: Check for linux/perf_event.h.
14489 * config.in: Regenerated.
14490 * configure: Regenerated.
14491
144922012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14493
14494 * hostio.c (handle_readlink): Decrease buffer size
14495 parameter passed to readlink by one byte.
14496
144972012-11-26 Yao Qi <yao@codesourcery.com>
14498
14499 * configure.ac (build_warnings): Append '-Wempty-body'.
14500 * configure: Regenerated.
14501 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14502 body.
14503
145042012-11-15 Pierre Muller <muller@sourceware.org>
14505
14506 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14507 * config.in: Regenerate.
14508 * configure: Regenerate.
14509 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14510 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14511 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14512 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14513 header.
14514 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14515 instead of <sys/wait.h> header.
14516 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14517
145182012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14519
14520 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14521 (various make rules): Remove -DGDBSERVER
14522
145232012-11-09 Yao Qi <yao@codesourcery.com>
14524
14525 * spu-low.c (current_ptid): Move it to ..
14526 * gdbthread.h: ... here. New.
14527 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14528 * server.c (myresume, process_serial_event): Likewise.
14529 * thread-db.c (thread_db_find_new_threads): Likewise.
14530 * tracepoint.c (run_inferior_command): Likewise.
14531
145322012-10-01 Andrew Burgess <aburgess@broadcom.com>
14533
14534 * server.c (handle_search_memory_1): Include access length in
14535 warning message.
14536
145372012-09-05 Michael Brandt <michael.brandt@axis.com>
14538
14539 * linux-crisv32-low.c: Fix compile errors.
14540
145412012-09-04 Yao Qi <yao@codesourcery.com>
14542
14543 * tracepoint.c (cmd_qtsv): Adjust debug message.
14544 Don't check CUR_TPOINT.
14545
145462012-08-28 Yao Qi <yao@codesourcery.com>
14547
14548 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14549 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14550 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14551 Remove declarations of xmalloc, xreallloc, xstrdup and
14552 freeargv.
14553 * Makefile.in (libiberty_h): New.
14554 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14555 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14556
145572012-08-23 Yao Qi <yao@codesourcery.com>
14558
14559 * server.h: Remove declaration of 'xsnprintf'.
14560
145612012-08-22 Keith Seitz <keiths@redhat.com>
14562
14563 * server.h: Include build-gnulib-gbserver/config.h.
14564 * gdbreplay.c: Likewise.
14565
145662012-08-08 Doug Evans <dje@google.com>
14567
14568 * Makefile.in (SFILES): Add gdb_vecs.c.
14569 (OBS): Add gdb_vecs.o.
14570 (gdb_vecs_h, host_defs_h): New variables.
14571 (thread-db.o): Add $(gdb_vecs_h) dependency.
14572 (gdb_vecs.o): New rule.
14573 * thread-db.c: #include "gdb_vecs.h".
14574 (thread_db_load_search): Use a vector to iterate over path elements.
14575 Handle text appearing after "$pdir".
14576
14577 * configure.ac: Add check for strstr.
14578 * config.in: Regenerate.
14579 * configure: Regenerate.
14580
145812012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14582
14583 * hostio.c (handle_pread): If pread fails, fall back to attempting
14584 lseek/read.
14585 (handle_pwrite): Likewise for pwrite.
14586
145872012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14588
14589 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14590 between unsupported TYPE and unimplementable ADDR/LEN combination.
14591 (arm_insert_point): Act on new return value.
14592
145932012-07-31 Pedro Alves <palves@redhat.com>
14594
14595 * server.c (process_point_options): Only skip tokens if we find
14596 one that is unrecognized. Don't treat 'X' specially while
14597 skipping unrecognized tokens.
14598
145992012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14600
14601 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14602 to 4-byte-align HW breakpoint addresses for Thumb.
14603
146042012-07-27 Yao Qi <yao@codesourcery.com>
14605
14606 PR remote/14161.
14607
14608 * server.h: Declare gdb_agent_about_to_close.
14609 * target.c (kill_inferior): Include "agent.h".
14610 New. Send command 'kill'.
14611 * target.h (kill_inferior): Removed macro.
14612 * tracepoint.c (gdb_agent_about_to_close): New.
14613 (gdb_agent_helper_thread): Handle command 'close'.
14614 Wait endlessly until the inferior stops.
14615 Install gdb_agent_remove_socket to atexit hook.
14616 (agent_socket_name): New static variable.
14617 (gdb_agent_socket_init): Replace local variable 'name' with
14618 'agent_socket_name'.
14619 (gdb_agent_remove_socket): New.
14620
146212012-07-27 Yao Qi <yao@codesourcery.com>
14622
14623 * server.c (process_point_options): Stop at 'X' when parsing.
14624
146252012-07-19 Michael Eager <eager@eagercon.com>
14626
14627 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14628 to hw_execute.
14629 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14630 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14631 hardware breakpoint.
14632
146332012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14634
14635 * gdbserver/linux-low.c (initialize_low): Call
14636 linux_ptrace_init_warnings.
14637
146382012-07-02 Doug Evans <dje@google.com>
14639
14640 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14641 pointer to int.
14642
146432012-07-02 Stan Shebs <stan@codesourcery.com>
14644
14645 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14646 (ax.o): Add it to build rule.
14647 (ax-ipa.o): Ditto.
14648 (OBS): Add format.o.
14649 (IPA_OBS): Add format.o.
14650 * server.c (handle_query): Claim support for breakpoint commands.
14651 (process_point_options): Add command case.
14652 (process_serial_event): Leave running if there are printfs in
14653 effect.
14654 * mem-break.h (any_persistent_commands): Declare.
14655 (add_breakpoint_commands): Declare.
14656 (gdb_no_commands_at_breakpoint): Declare.
14657 (run_breakpoint_commands): Declare.
14658 * mem-break.c (struct point_command_list): New struct.
14659 (struct breakpoint): New field command_list.
14660 (any_persistent_commands): New function.
14661 (add_commands_to_breakpoint): New function.
14662 (add_breakpoint_commands): New function.
14663 (gdb_no_commands_at_breakpoint): New function.
14664 (run_breakpoint_commands): New function.
14665 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14666 locally.
14667 * ax.c: Include format.h.
14668 (ax_printf): New function.
14669 (gdb_eval_agent_expr): Add printf opcode.
14670
146712012-06-13 Yao Qi <yao@codesourcery.com>
14672
14673 * server.c (start_inferior): Remove duplicated writes to fields
14674 'last_resume_kind' and 'last_status' of 'current_inferior'.
14675
146762012-06-12 Yao Qi <yao@codesourcery.com>
14677 Pedro Alves <palves@redhat.com>
14678
14679 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14680 comment.
14681 * server.c (handle_v_cont): Extend comment.
14682
146832012-06-11 Yao Qi <yao@codesourcery.com>
14684
14685 * linux-low.c (linux_attach): Add 'static'.
14686
146872012-06-06 Yao Qi <yao@codesourcery.com>
14688
14689 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14690
146912012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14692
14693 Fix gcc -flto compilation warning.
14694 * server.c (main): Make variable multi_mode and attach volatile.
14695
146962012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14697
14698 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14699 if the platform doesn't know about it.
14700
147012012-05-30 Jeff Kenton <jkenton@tilera.com>
14702
14703 * Makefile.in (SFILES): Add linux-tile-low.c.
14704 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14705 * configure.srv: Handle tilegx-*-linux*.
14706 * linux-tile-low.c: New file.
14707
147082012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14709
14710 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14711
147122012-05-24 Pedro Alves <palves@redhat.com>
14713
14714 PR gdb/7205
14715
14716 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14717
147182012-05-24 Pedro Alves <palves@redhat.com>
14719
14720 PR gdb/7205
14721
14722 Replace target_signal with gdb_signal throughout.
14723
147242012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14725
14726 * linux-low.c (linux_store_registers): Avoid the copying sequence
14727 when no data has been retrieved by ptrace.
14728
147292012-05-22 Will Deacon <will.deacon@arm.com>
14730
14731 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14732 Include asm/ptrace.h.
14733 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14734 already defined.
14735
147362012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14737
14738 * linux-low.c (linux_store_registers): Don't re-retrieve data
14739 with ptrace that has already been obtained from /proc. Always
14740 copy any data retrieved with ptrace to the buffer supplied.
14741
147422012-05-11 Yao Qi <yao@codesourcery.com>
14743 Pedro Alves <palves@redhat.com>
14744
14745 * linux-low.c (enum stopping_threads_kind): New.
14746 (stopping_threads): Change type to `enum stopping_threads_kind'.
14747 (handle_extended_wait): If stopping and suspending threads, leave
14748 the new_lwp suspended too.
14749 (linux_wait_for_event): Adjust.
14750 (stop_all_lwps): Set `stopping_threads' to
14751 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14752 whether we're suspending threads or just stopping them. Assert no
14753 recursion happens.
14754
147552012-04-29 Yao Qi <yao@codesourcery.com>
14756
14757 * server.h: Move some code to ...
14758 * gdbthread.h: ... here. New.
14759 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14760 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14761 (nto-low.o, win32-low.o): Likewise.
14762 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14763 * regcache.c, remote-utils.c, server.c: Likewise.
14764 * target.c, tracepoint.c, win32-low.c: Likewise.
14765
147662012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14767
14768 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14769 (PTRACE_ARG4_TYPE): Likewise.
14770 (PTRACE_XFER_TYPE): Likewise.
14771 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14772 ptrace to PTRACE_ARG3_TYPE.
14773 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14774 (PTRACE_ARG4_TYPE): Likewise.
14775 (PTRACE_XFER_TYPE): Likewise.
14776 (linux_detach_one_lwp): Cast fourth argument of
14777 ptrace to long then PTRACE_ARG4_TYPE.
14778 (regsets_fetch_inferior_registers): Cast third argument of
14779 ptrace to long then PTRACE_ARG3_TYPE.
14780 (regsets_store_inferior_registers): Likewise.
14781
147822012-04-20 Pedro Alves <palves@redhat.com>
14783
14784 * configure: Regenerate.
14785
147862012-04-19 Pedro Alves <palves@redhat.com>
14787
14788 * Makefile.in (GNULIB_BUILDDIR): New.
14789 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14790 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14791 (all, install-only, uninstall, clean-info, all-lib, clean): No
14792 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14793 (maintainer-clean realclean distclean): Use subdir_do.
14794 (subdir_do): New.
14795 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14796 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14797 * acinclude.m4: Include acx_configure_dir.m4.
14798 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14799 calls. Call AC_PROG_RANLIB. Configure gnulib using
14800 ACX_CONFIGURE_DIR.
14801 (GNULIB): New.
14802 (GNULIB_STDINT_H): Adjust.
14803 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14804 * gdbreplay.c: Include build-gnulib/config.h.
14805 * server.h: Likewise.
14806 * aclocal.m4: Regenerate.
14807 * config.in: Regenerate.
14808 * configure: Regenerate.
14809
148102012-04-19 Pedro Alves <palves@redhat.com>
14811
14812 * Makefile.in (LIBGNU, INCGNU): Adjust.
14813 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14814 (all, install-only, uninstall, clean-info, all-lib, clean)
14815 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14816 * configure.ac: Adjust AC_OUTPUT output.
14817 * aclocal.m4: Regenerate.
14818 * configure: Regenerate.
14819
148202012-04-19 Pedro Alves <palves@redhat.com>
14821
14822 * Makefile.in (generated_files): New.
14823 (server_h): Remove the explicit dependency on config.h, and depend
14824 on $generated_files.
14825
148262012-04-19 Pedro Alves <palves@redhat.com>
14827
14828 * Makefile.in (INCGNU): Add -Ignulib.
14829
148302012-04-19 Pedro Alves <palves@redhat.com>
14831
14832 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14833 (INCGNU): ... this, and spell out -I here.
14834 (GNULIB_LIB): Rename to ...
14835 (LIBGNU): ... this.
14836 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14837
148382012-04-19 Pedro Alves <palves@redhat.com>
14839
14840 * config.in: Regenerate.
14841
148422012-04-19 Pedro Alves <palves@redhat.com>
14843
14844 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14845 * server.h (memmem): Remove declaration.
14846 * config.in: Regenerate.
14847 * configure: Regenerate.
14848
148492012-04-19 Yao Qi <yao@codesourcery.com>
14850
14851 * Makefile.in (SFILES): Add common/vec.c.
14852 (OBS): Add vec.o.
14853 (vec.o): New rule.
14854
148552012-04-19 Yao Qi <yao@codesourcery.com>
14856
14857 * remote-utils.c (prepare_resume_reply): Replace with macro
14858 target_core_of_thread.
14859 * server.c (handle_qxfer_threads_proper): Likewise.
14860 * target.h (traget_core_of_thread): New macro.
14861
148622012-04-18 Pedro Alves <palves@redhat.com>
14863
14864 * aclocal.m4: Regenerate.
14865 * configure: Regenerate.
14866
148672012-04-16 Yao Qi <yao@codesourcery.com>
14868
14869 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14870 duplicated on address.
14871
148722012-04-16 Yao Qi <yao@codesourcery.com>
14873
14874 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14875 (struct tracepoint_action_ops) <send>: New field.
14876 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14877 (agent_expr_send, x_tracepoint_action_send): New.
14878 (l_tracepoint_action_send): New.
14879 (cmd_qtdp): Download and install tracepoint
14880 according to `use_agent'.
14881 (run_inferior_command): Add one more parameter `len'.
14882 Update callers.
14883 (tracepoint_send_agent): New.
14884 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14885
148862012-04-16 Yao Qi <yao@codesourcery.com>
14887
14888 * tracepoint.c (download_tracepoints): Moved to ...
14889 (cmd_qtstart): ... here.
14890
148912012-04-14 Yao Qi <yao@codesourcery.com>
14892
14893 * tracepoint.c: Include inttypes.h.
14894 (struct collect_memory_action): Use sized types.
14895 (struct tracepoint): Likewise.
14896 (cmd_qtdp, stop_tracing): Update print specifiers.
14897 (cmd_qtp, response_tracepoint): Likewise.
14898 (collect_data_at_tracepoint): Likewise.
14899 (collect_data_at_step): Likewise.
14900
149012012-04-14 Yao Qi <yao@codesourcery.com>
14902
14903 Import gnulib module inttypes.
14904 * aclocal.m4, config.in, configure: Regenerated.
14905
149062012-04-14 Yao Qi <yao@codesourcery.com>
14907
14908 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14909 Makefile and config.status at last.
14910
149112012-04-13 Yao Qi <yao@codesourcery.com>
14912
14913 * tracepoint.c: Include stdint.h unconditionally.
14914
149152012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14916
14917 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14918 on BFD_HAVE_SYS_PROCFS_TYPE.
14919 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14920 * configure: Regenerate.
14921 * config.in: Likewise.
14922
149232012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14924
14925 * Makefile.in (clean): Also remove x32.c x32-linux.c
14926 x32-avx.c x32-avx-linux.c.
14927 (x32.o): New target.
14928 (x32.c): Likewise.
14929 (x32-linux.o): Likewise.
14930 (x32-linux.c): Likewise.
14931 (x32-avx.o): Likewise.
14932 (x32-avx.c): Likewise.
14933 (x32-avx-linux.o): Likewise.
14934 (x32-avx-linux.c): Likewise.
14935
14936 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14937 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14938 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14939 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14940 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14941 i386/x32-avx-linux.xml.
14942
14943 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14944 (init_registers_x32_avx_linux): Likwise.
14945 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14946 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14947
149482012-04-13 Pedro Alves <palves@redhat.com>
14949
14950 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14951 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14952 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14953 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14954 the sub-make.
14955
149562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14957
14958 * linux-x86-low.c (compat_x32_clock_t): New.
14959 (compat_x32_siginfo_t): Likewise.
14960 (compat_x32_siginfo_from_siginfo): Likewise.
14961 (siginfo_from_compat_x32_siginfo): Likewise.
14962 (linux_is_elf64): Likewise.
14963 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14964 and siginfo_from_compat_x32_siginfo for x32.
14965 (x86_arch_setup): Set linux_is_elf64.
14966
149672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14968
14969 PR gdb/13969
14970 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14971 e_machine field.
14972 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14973 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14974 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14975 compatible with process.
14976
149772012-04-12 Yao Qi <yao@codesourcery.com>
14978
14979 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14980 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14981 (install-only, install-info, clean): Handle sub dir gnulib.
14982 (all-lib, am--refresh): New targets.
14983 (memmem.o): Remove target.
14984 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14985 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14986 (AC_REPLACE_FUNCS): Remove memmem.
14987 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14988 (AC_OUTPUT): Generate Makefile in gnulib/.
14989 * aclocal.m4, config.in, configure: Regenerated.
14990
149912012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14992
14993 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14994
149952012-04-05 Pedro Alves <palves@redhat.com>
14996
14997 -Werror=strict-aliasing
14998
14999 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15000 pointer.
15001
150022012-04-04 Pedro Alves <palves@redhat.com>
15003
15004 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15005 (sparc_store_gregset_from_stack, sparc_store_gregset)
15006 (sparc_breakpoint_at): Fix formatting.
15007
150082012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15009
15010 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15011 are available.
15012 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15013 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15014 * config.in: Regenerate.
15015 * configure: Likewise.
15016
150172012-03-29 Pedro Alves <palves@redhat.com>
15018
15019 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15020 Correct ptrace arguments.
15021
150222012-03-28 Pedro Alves <palves@redhat.com>
15023
15024 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15025 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15026 (IA64_FR1_REGNUM): New defines.
15027 (ia64_fetch_register): New.
15028 (the_low_target): Install it.
15029 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15030 field.
15031 * linux-low.c (linux_fetch_registers): Try the
15032 the_low_target.fetch_register hook first.
15033
15034 * linux-arm-low.c (the_low_target): Adjust.
15035 * linux-bfin-low.c (the_low_target): Adjust.
15036 * linux-cris-low.c (the_low_target): Adjust.
15037 * linux-crisv32-low.c (the_low_target): Adjust.
15038 * linux-m32r-low.c (the_low_target): Adjust.
15039 * linux-m68k-low.c (the_low_target): Adjust.
15040 * linux-mips-low.c (the_low_target): Adjust.
15041 * linux-ppc-low.c (the_low_target): Adjust.
15042 * linux-s390-low.c (the_low_target): Adjust.
15043 * linux-sh-low.c (the_low_target): Adjust.
15044 * linux-sparc-low.c (the_low_target): Adjust.
15045 * linux-tic6x-low.c (the_low_target): Adjust.
15046 * linux-x86-low.c (the_low_target): Adjust.
15047 * linux-xtensa-low.c (the_low_target): Adjust.
15048
150492012-03-26 Pedro Alves <palves@redhat.com>
15050
15051 * server.c (handle_qxfer_libraries): Don't bail early if
15052 the_target->qxfer_libraries_svr4 is not NULL.
15053
150542012-03-26 Pedro Alves <palves@redhat.com>
15055
15056 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15057
150582012-03-23 Pedro Alves <palves@redhat.com>
15059
15060 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15061 "library-list-svr4" element's start tag when the the DSO list is
15062 empty.
15063
150642012-03-23 Pedro Alves <palves@redhat.com>
15065
15066 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15067 a variable whose type size is the same as the inferior's pointer
15068 size.
15069
150702012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15071
15072 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15073 struct siginfo.
15074 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15075 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15076 * linux-low.h: Include <signal.h>.
15077 (struct siginfo): Remove forward declaration.
15078 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15079 struct siginfo.
15080
150812012-03-21 Mike Frysinger <vapier@gentoo.org>
15082
15083 * .gitignore: Ignore more files.
15084
150852012-03-19 Pedro Alves <palves@redhat.com>
15086 Jan Kratochvil <jan.kratochvil@redhat.com>
15087
15088 * server.c (cont_thread, general_thread): Add describing comments.
15089 (start_inferior): Clear `cont_thread'.
15090 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15091 of a process.
15092
150932012-03-15 Yao Qi <yao@codesourcery.com>
15094
15095 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15096 handling to ...
15097 (cmd_qtdp): ... here.
15098
150992012-03-15 Yao Qi <yao@codesourcery.com>
15100
15101 * tracepoint.c (struct tracepoint_action_ops): New.
15102 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15103 (m_tracepoint_action_download): New.
15104 (r_tracepoint_action_download): New.
15105 (x_tracepoint_action_download): New.
15106 (l_tracepoint_action_download): New.
15107 (add_tracepoint_action): Install `action->ops' according type.
15108 (download_tracepoint_1): Move code `download' function pointer
15109 of various tracepoint_action_ops.
15110
151112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15112
15113 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15114 linux_ptrace_attach_warnings.
15115
151162012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15117
15118 * Makefile.in (linux-ptrace.o): New.
15119 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15120 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15121 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15122 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15123 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15124 of these targets.
15125 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15126
151272012-03-08 Yao Qi <yao@codesourcery.com>
15128 Pedro Alves <palves@redhat.com>
15129
15130 Fix PR server/13392.
15131 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15132 offset of JMP insn.
15133 * tracepoint.c (remove_tracepoint): New.
15134 (cmd_qtdp): Call remove_tracepoint when failed to install.
15135
151362012-03-07 Pedro Alves <palves@redhat.com>
15137
15138 * linux-low.c (get_detach_signal): New.
15139 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15140 Pass on pending signals to PTRACE_DETACH. Check the result of the
15141 ptrace call.
15142 * server.c (program_signals, program_signals_p): New.
15143 (handle_general_set): Handle QProgramSignals.
15144 * server.h (program_signals, program_signals_p): Declare.
15145
151462012-03-05 Pedro Alves <palves@redhat.com>
15147 Jan Kratochvil <jan.kratochvil@redhat.com>
15148
15149 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15150 New comment why.
15151
151522012-03-03 Yao Qi <yao@codesourcery.com>
15153
15154 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15155 agent_look_up_symbols.
15156
151572012-03-03 Yao Qi <yao@codesourcery.com>
15158
15159 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15160 (linux-x86-low.o): Likewise.
15161 * server.h: Remove in_process_agent_loaded.
15162 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15163 common/agent.c.
15164 Update callers.
15165
151662012-03-03 Yao Qi <yao@codesourcery.com>
15167
15168 * tracepoint.c (gdb_agent_capability): New global.
15169 (in_process_agent_loaded_ust): Renamed to
15170 `in_process_agent_supports_ust'.
15171 Update callers.
15172 (in_process_agent_supports_ust): Call agent_capability_check.
15173 (clear_installed_tracepoints): Assert that agent supports
15174 agent.
15175
151762012-03-03 Yao Qi <yao@codesourcery.com>
15177
15178 * linux-low.c (linux_supports_agent): New.
15179 (linux_target_ops): Initialize field `supports_agent' with
15180 linux_supports_agent.
15181 * target.h (struct target_ops) <supports_agent>: New.
15182 (target_supports_agent): New macro.
15183 * server.c (handle_general_set): Handle packet 'QAgent'.
15184 (handle_query): Send `QAgent+'.
15185 * Makefile.in (server.o): Depends on agent.h.
15186
151872012-03-03 Yao Qi <yao@codesourcery.com>
15188
15189 * Makefile.in (OBS): Add agent.o.
15190 Add new rule for agent.o.
15191 Track dependence of tracepoint.c on agent.h.
15192 * tracepoint.c (run_inferior_command_1):
15193 (run_inferior_command): Call agent_run_command.
15194 (gdb_ust_connect_sync_socket): Deleted. Move it to
15195 common/agent.c.
15196 (resume_thread, stop_thread): Likewise.
15197 (gdb_ust_socket_init): Renamed to ...
15198 (gdb_agent_socket_init): ... New.
15199 (gdb_ust_thread): Renamed to ...
15200 (gdb_agent_helper_thread): ... New.
15201 (gdb_ust_init): Move some code to ...
15202 (gdb_agent_init): ... here. New.
15203 [HAVE_UST]: Call gdb_ust_init.
15204 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15205 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15206 * config.in, configure: Regenerated.
15207
152082012-03-02 Pedro Alves <palves@redhat.com>
15209
15210 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15211 * linux-low.c (struct simple_pid_list): New.
15212 (stopped_pids): New a struct simple_pid_list pointer.
15213 (add_to_pid_list, pull_pid_from_list): New.
15214 (handle_extended_wait): Don't assume the first signal new children
15215 report is SIGSTOP. Adjust call to pull_pid_from_list.
15216 (linux_wait_for_lwp): Adjust.
15217
152182012-03-02 Yao Qi <yao@codesourcery.com>
15219
15220 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15221 debug log.
15222
152232012-03-02 Yao Qi <yao@codesourcery.com>
15224
15225 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15226 `stop_pc' and `tpoint'. Update caller.
15227
152282012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15229
15230 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15231 * linux-low.c (use_linux_regsets): New macro.
15232 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15233 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15234 (linux_register_in_regsets): New function.
15235 (usr_fetch_inferior_registers): Skip registers covered by
15236 regsets.
15237 (usr_store_inferior_registers): Likewise.
15238 (usr_fetch_inferior_registers): New macro.
15239 (usr_store_inferior_registers): Likewise.
15240 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15241 (linux_store_registers): Likewise.
15242 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15243 prototype.
15244 (init_registers_mips64_dsp_linux): Likewise.
15245 (init_registers_mips_linux): New macro.
15246 (init_registers_mips_dsp_linux): Likewise.
15247 (mips_dsp_num_regs): Likewise.
15248 (DSP_BASE, DSP_CONTROL): New fallback macros.
15249 (mips_base_regs): New macro.
15250 (mips_regmap): Use it. Fix the size.
15251 (mips_dsp_regmap): New variable.
15252 (mips_dsp_regset_bitmap): Likewise.
15253 (mips_arch_setup): New function.
15254 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15255 than mips_regmap.
15256 (mips_cannot_store_register): Likewise.
15257 (the_low_target): Update .arch_setup, .num_regs and .regmap
15258 initializers. Add .regset_bitmap initializer.
15259 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15260 initializer.
15261 * linux-bfin-low.c (the_low_target): Likewise.
15262 * linux-cris-low.c (the_low_target): Likewise.
15263 * linux-crisv32-low.c (the_low_target): Likewise.
15264 * linux-ia64-low.c (the_low_target): Likewise.
15265 * linux-m32r-low.c (the_low_target): Likewise.
15266 * linux-m68k-low.c (the_low_target): Likewise.
15267 * linux-ppc-low.c (the_low_target): Likewise.
15268 * linux-s390-low.c (the_low_target): Likewise.
15269 * linux-sh-low.c (the_low_target): Likewise.
15270 * linux-sparc-low.c (the_low_target): Likewise.
15271 * linux-tic6x-low.c (the_low_target): Likewise.
15272 * linux-x86-low.c (the_low_target): Likewise.
15273 * linux-xtensa-low.c (the_low_target): Likewise.
15274 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15275 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15276 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15277 srv_xmlfiles.
15278 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15279 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15280
152812012-02-29 Yao Qi <yao@codesourcery.com>
15282 Pedro Alves <palves@redhat.com>
15283
15284 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15285 `step_over_finished' is true.
15286
152872012-02-27 Pedro Alves <palves@redhat.com>
15288
15289 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15290 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15291
152922012-02-27 Pedro Alves <palves@redhat.com>
15293
15294 PR server/9684
15295 * linux-low.c (pid_is_stopped): New.
15296 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15297
152982012-02-25 Luis Machado <lgustavo@codesourcery.com>
15299
15300 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15301 of conditions.
15302
153032012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15304
15305 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15306
153072012-02-24 Luis Machado <lgustavo@codesourcery>
15308
15309 * server.c (handle_query): Advertise support for target-side
15310 breakpoint condition evaluation.
15311 (process_point_options): New function.
15312 (process_serial_event): When inserting a breakpoint, check for
15313 a target-side condition that should be evaluated.
15314
15315 * mem-break.c: Include regcache.h and ax.h.
15316 (point_cond_list_t): New data structure.
15317 (breakpoint) <cond_list>: New field.
15318 (find_gdb_breakpoint_at): Make non-static.
15319 (delete_gdb_breakpoint_at): Clear any target-side
15320 conditions.
15321 (clear_gdb_breakpoint_conditions): New function.
15322 (add_condition_to_breakpoint): Likewise.
15323 (add_breakpoint_condition): Likewise.
15324 (gdb_condition_true_at_breakpoint): Likewise.
15325 (gdb_breakpoint_here): Return result directly instead
15326 of going through a local variable.
15327
15328 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15329 (clear_gdb_breakpoint_conditions): Likewise.
15330 (add_breakpoint_condition): Likewise.
15331 (gdb_condition_true_at_breakpoint): Likewise.
15332
15333 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15334 (need_step_over_p): Take target-side breakpoint condition into
15335 consideration.
15336
153372012-02-24 Luis Machado <lgustavo@codesourcery>
15338
15339 * server.h: Include tracepoint.h.
15340 (agent_mem_read, agent_get_trace_state_variable_value,
15341 agent_set_trace_state_variable_value,
15342 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15343 get_set_tsv_func_addr): New prototypes.
15344
15345 * ax.h: New include file.
15346 * ax.c: New source file.
15347
15348 * tracepoint.c: Include ax.h.
15349 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15350 agent_expr, eval_result_type): Move to ax.h.
15351 (parse_agent_expr): Rename to ...
15352 (gdb_parse_agent_expr): ... this, make it non-static and move
15353 to ax.h.
15354 (unparse_agent_expr) Rename to ...
15355 (gdb_unparse_agent_expr): ... this, make it non-static and move
15356 to ax.h.
15357 (eval_agent_expr): Rename to ...
15358 (eval_tracepoint_agent_expr): ... this.
15359 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15360 forward declarations.
15361 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15362 (agent_get_trace_state_variable_value): New function.
15363 (agent_set_trace_state_variable_value): New function.
15364 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15365 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15366 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15367 (condition_true_at_tracepoint): Likewise.
15368 (parse_agent_expr): Rename to ...
15369 (gdb_parse_agent_expr): ... this and move to ax.c.
15370 (unparse_agent_expr): Rename to ...
15371 (gdb_unparse_agent_expr): ... this and move to ax.c.
15372 (gdb_agent_op_name): Move to ax.c.
15373 (eval_agent_expr): Rename to ...
15374 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15375 and move to ax.c.
15376 (eval_tracepoint_agent_expr): New function.
15377 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15378 non-static.
15379 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15380 ax.c.
15381 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15382 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15383 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15384 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15385 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15386 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15387 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15388 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15389 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15390 (compile_bytecodes): Remove forward declaration.
15391 (is_goto_target): Move to ax.c.
15392 (compile_bytecodes): Move to ax.c and call
15393 agent_get_trace_state_variable_value (...) and
15394 agent_set_trace_state_variable_value (...).
15395
15396 * Makefile.in: Update ax.c and IPA dependencies.
15397
153982012-02-24 Pedro Alves <palves@redhat.com>
15399
15400 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15401 (cmd_bigqtbuffer_circular): ... this. Only handle
15402 'QTBuffer:circular:'.
15403 (handle_tracepoint_general_set): Adjust.
15404
154052012-02-16 Yao Qi <yao@codesourcery.com>
15406
15407 * inferiors.c: Move code to ...
15408 * dll.c: .... here. New.
15409 * server.h: Declare clear_dlls.
15410 * Makefile.in (SFILES): Add dll.c.
15411 (OBS): Add dll.o
15412 (dll.o): New rule.
15413
154142012-02-11 Yao Qi <yao@codesourcery.com>
15415
15416 * server.c: (handle_monitor_command): Add a new parameter
15417 `own_buf'.
15418 (handle_query): Update caller.
15419
154202012-02-09 Joel Brobecker <brobecker@adacore.com>
15421
15422 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15423 * configure, config.in: Regenerate.
15424 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15425 is not defined.
15426
154272012-02-02 Pedro Alves <palves@redhat.com>
15428
15429 Try SIGKILL first, then PTRACE_KILL.
15430 * linux-low.c (linux_kill_one_lwp): New.
15431 (linux_kill_one_lwp): Rename to ...
15432 (kill_one_lwp_callback): ... this. Use the new
15433 linux_kill_one_lwp.
15434
154352012-02-02 Pedro Alves <palves@redhat.com>
15436
15437 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15438 inferior.
15439
154402012-01-27 Pedro Alves <palves@redhat.com>
15441
15442 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15443 (elf_64_file_p): Make static.
15444 (linux_pid_exe_is_elf_64_file): New.
15445 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15446 Delete declarations.
15447 (linux_pid_exe_is_elf_64_file): Declare.
15448 * linux-x86-low.c (x86_arch_setup): Use
15449 linux_pid_exe_is_elf_64_file.
15450
154512012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15452
15453 * linux-low.c (linux_wait_for_event_1): Rename to ...
15454 (linux_wait_for_event): ... here and merge it with former
15455 linux_wait_for_event - new variable wait_ptid, use it.
15456 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15457
154582012-01-23 Pedro Alves <palves@redhat.com>
15459
15460 * server.c (main): Avoid yet another case of infinite loop while
15461 detaching/killing after a longjmp.
15462
154632012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15464
15465 Code cleanup.
15466 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15467
154682012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15469
15470 * hostio.c (handle_readlink): New function.
15471 (handle_vFile): Call it to handle "vFile:readlink" packets.
15472
154732012-01-20 Pedro Alves <palves@redhat.com>
15474 Ulrich Weigand <ulrich.weigand@linaro.org>
15475
15476 * server.c (handle_v_requests): Only support vAttach and vRun to
15477 start multiple processes when in extended protocol mode.
15478
154792012-01-17 Pedro Alves <palves@redhat.com>
15480
15481 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15482 memalign plus mprotect to allocate the scratch buffer.
15483
154842012-01-13 Pedro Alves <palves@redhat.com>
15485
15486 * server.c (attach_inferior): Clear `cont_thread'.
15487
154882012-01-13 Pedro Alves <palves@redhat.com>
15489
15490 * server.c (main): Avoid infinite loop while detaching/killing
15491 after a longjmp.
15492
154932012-01-09 Doug Evans <dje@google.com>
15494
15495 * server.c (start_inferior): Set last_ptid in --wrapper case.
15496
154972012-01-06 Yao Qi <yao@codesourcery.com>
15498
15499 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15500 defined.
15501 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15502
155032012-01-04 Yao Qi <yao@codesourcery.com>
15504
15505 * tracepoint.c (cmd_qtdp): Print debug message
15506 for static tracepoint.
15507
155082012-01-04 Yao Qi <yao@codesourcery.com>
15509
15510 * tracepoint.c (trace_vdebug): Differentiate debug message
15511 between gdbserver and IPA.
15512
155132012-01-03 Yao Qi <yao@codesourcery.com>
15514
15515 * tracepoint.c (tracepoint_was_hit): Don't collect for
15516 static tracepoint.
15517
155182012-01-02 Joel Brobecker <brobecker@adacore.com>
15519
15520 * terminal.h: Reformat copyright header.
15521
155222012-01-02 Joel Brobecker <brobecker@adacore.com>
15523
15524 * server.c (gdbserver_version): Update copyright year.
15525 * gdbreplay.c (gdbreplay_version): Likewise.
15526
155272011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15528
15529 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15530
15531 Revert:
15532 2011-12-18 Hui Zhu <teawater@gmail.com>
15533 * linux-low.c (linux_create_inferior): Save return value to ret.
15534
155352011-12-18 Hui Zhu <teawater@gmail.com>
15536
15537 * linux-low.c (linux_create_inferior): Save return value to ret.
15538
155392011-12-16 Doug Evans <dje@google.com>
15540
15541 * linux-low.c (linux_create_inferior): If stdio connection,
15542 redirect stdin from /dev/null, stdout to stderr.
15543 * remote-utils.c (remote_is_stdio): New static global.
15544 (remote_connection_is_stdio): New function.
15545 (remote_prepare): Handle stdio connection.
15546 (remote_open): Ditto.
15547 (remote_close): Don't close stdin for stdio connections.
15548 (read_prim,write_prim): New functions. Replace all calls to
15549 read/write to these.
15550 * server.c (main): Watch for "-" argument. Move call to
15551 remote_prepare before start_inferior.
15552 * server.h (STDIO_CONNECTION_NAME): New macro.
15553 (remote_connection_is_stdio): Declare.
15554
15555 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15556 in debugging output.
15557
155582011-12-15 Yao Qi <yao@codesourcery.com>
15559
15560 * tracepoint.c: Include sys/syscall.h.
15561 (gdb_ust_thread): Remove preprocessor conditional.
15562
155632011-12-14 Pedro Alves <pedro@codesourcery.com>
15564
15565 * linux-low.c (linux_detach_one_lwp): Call
15566 the_low_target.prepare_to_resume before detaching.
15567
155682011-12-14 Yao Qi <yao@codesourcery.com>
15569
15570 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15571 of write.
15572
155732011-12-14 Yao Qi <yao@codesourcery.com>
15574
15575 * i386-low.c (i386_low_stopped_data_address): Initialize local
15576 variable `control'.
15577
155782011-12-13 Pedro Alves <pedro@codesourcery.com>
15579
15580 PR remote/13492
15581
15582 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15583 DR_CONTROL unless necessary. Extend comments.
15584 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15585 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15586
155872011-12-13 Yao Qi <yao@codesourcery.com>
15588
15589 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15590 macros.
15591 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15592
155932011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15594
15595 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15596 Print new debug message for such case.
15597
155982011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15599
15600 Fix overlapping memcpy.
15601 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15602 the read_inferior_memory transfer.
15603 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15604 write_inferior_memory transfer.
15605 (set_fast_tracepoint_jump): New variable buf. Use it for the
15606 read_inferior_memory and write_inferior_memory transfers.
15607 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15608 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15609 Use it for the write_inferior_memory transfer.
15610 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15611 buffers.
15612
156132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15614
15615 * linux-low.c (fetch_register, store_register): Make code
15616 consistent, fix formatting.
15617
156182011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15619
15620 * linux-low.c (usr_store_inferior_registers): Factor out code
15621 to handle individual registers into...
15622 (store_register): ... this new function.
15623
156242011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15625
15626 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15627 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15628 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15629 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15630 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15631 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15632 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15633 (srv_xmlfiles): Add new XML files.
15634
15635 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15636 and <sys/uio.h>.
15637 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15638 (init_registers_s390_linux32v1): Add prototype.
15639 (init_registers_s390_linux32v2): Likewise.
15640 (init_registers_s390_linux64v1): Likewise.
15641 (init_registers_s390_linux64v2): Likewise.
15642 (init_registers_s390x_linux64v1): Likewise.
15643 (init_registers_s390x_linux64v2): Likewise.
15644 (s390_num_regs): Increment to 52.
15645 (s390_regmap): Add orig_r2 register.
15646 (s390_num_regs_3264): Increment to 68.
15647 (s390_regmap_3264): Add orig_r2 register.
15648 (s390_collect_ptrace_register): Handle orig_r2 register.
15649 (s390_supply_ptrace_register): Likewise.
15650 (s390_fill_last_break): New function.
15651 (s390_store_last_break): Likewise.
15652 (s390_fill_system_call): New function.
15653 (s390_store_system_call): Likewise.
15654 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15655 register sets.
15656 (s390_check_regset): New function.
15657 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15658 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15659 Update target_regsets for available register sets.
15660
156612011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15662 Jan Kratochvil <jan.kratochvil@redhat.com>
15663
15664 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15665 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15666 New.
15667 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15668 * linux-low.h (struct process_info_private): New member r_debug.
15669 * server.c (handle_qxfer_libraries): Call
15670 the_target->qxfer_libraries_svr4.
15671 (handle_qxfer_libraries_svr4): New function.
15672 (qxfer_packets): New entry "libraries-svr4".
15673 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15674 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15675 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15676 PACKET_qXfer_libraries_svr4.
15677
156782011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15679
15680 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15681 PSW address/mask between 8-byte and 16-byte formats.
15682 (s390_supply_ptrace_register): Likewise.
15683 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15684 basic addressing mode bit.
15685
156862011-11-24 Stan Shebs <stan@codesourcery.com>
15687
15688 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15689
156902011-11-17 Stan Shebs <stan@codesourcery.com>
15691
15692 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15693 (tracing_start_time): New global.
15694 (tracing_stop_time): New global.
15695 (tracing_user_name): New global.
15696 (tracing_notes): New global.
15697 (tracing_stop_note): New global.
15698 (cmd_qtstart): Set traceframe_usage, start_time.
15699 (stop_tracing): Set stop_time.
15700 (cmd_qtstatus): Report additional status.
15701 (cmd_qtp): New function.
15702 (handle_tracepoint_query): Call it.
15703 (cmd_qtnotes): New function.
15704 (handle_tracepoint_general_set): Call it.
15705 (get_timestamp): Rename from tsv_get_timestamp.
15706
157072011-11-14 Stan Shebs <stan@codesourcery.com>
15708 Kwok Cheung Yeung <kcy@codesourcery.com>
15709
15710 * linux-x86-low.c (small_jump_insn): New.
15711 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15712 trampoline and error message, build a trampoline and issue a small
15713 jump instruction to it.
15714 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15715 trampoline and error message.
15716 (x86_get_min_fast_tracepoint_insn_len): New.
15717 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15718 * linux-low.h (struct linux_target_ops): Add arguments to
15719 install_fast_tracepoint_jump_pad operation, add new operation.
15720 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15721 arguments.
15722 (linux_get_min_fast_tracepoint_insn_len): New function.
15723 (linux_target_op): Add new operation.
15724 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15725 (gdb_trampoline_buffer_end): Ditto.
15726 (gdb_trampoline_buffer_error): Ditto.
15727 (struct ipa_sym_addresses): Add fields for new IPA variables.
15728 (symbol_list): Add entries for new IPA variables.
15729 (struct tracepoint): Add fields to hold the address range of the
15730 trampoline used by the tracepoint.
15731 (trampoline_buffer_head): New static variable.
15732 (trampoline_buffer_tail): Ditto.
15733 (claim_trampoline_space): New function.
15734 (have_fast_tracepoint_trampoline_buffer): New function.
15735 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15736 structure.
15737 (install_fast_tracepoint): Ditto, also add error buffer argument.
15738 (cmd_qtminftpilen): New function.
15739 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15740 (fast_tracepoint_from_trampoline_address): New function.
15741 (fast_tracepoint_collecting): Handle trampoline as part of jump
15742 pad space.
15743 (set_trampoline_buffer_space): New function.
15744 (initialize_tracepoint): Initialize new IPA variables.
15745 * target.h (struct target_ops): Add arguments to
15746 install_fast_tracepoint_jump_pad operation, add new
15747 get_min_fast_tracepoint_insn_len operation.
15748 (target_get_min_fast_tracepoint_insn_len): New.
15749 (install_fast_tracepoint_jump_pad): Add arguments.
15750 * server.h (IPA_BUFSIZ): Define.
15751 * linux-i386-ipa.c: Include extra header files.
15752 (initialize_fast_tracepoint_trampoline_buffer): New function.
15753 (initialize_low_tracepoint): Call it.
15754 * server.h (set_trampoline_buffer_space): Declare.
15755 (claim_trampoline_space): Ditto.
15756 (have_fast_tracepoint_trampoline_buffer): Ditto.
15757
157582011-11-14 Yao Qi <yao@codesourcery.com>
15759
15760 * server.c (handle_query): Handle InstallInTrace for qSupported.
15761 * tracepoint.c (add_tracepoint): Sort list.
15762 (install_tracepoint, download_tracepoint): New.
15763 (cmd_qtdp): Call them to install and download tracepoints.
15764 (sort_tracepoints): Removed.
15765 (cmd_qtstart): Update.
15766
157672011-11-14 Yao Qi <yao@codesourcery.com>
15768
15769 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15770 * mem-break.h: Declare.
15771 * tracepoint.c (cmd_qtstart): Move some code to ...
15772 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15773 New.
15774 (download_tracepoints): Move some code to ...
15775 (download_tracepoint_1): ... here. New.
15776
157772011-11-08 Yao Qi <yao@codesourcery.com>
15778
15779 * remote-utils.c (relocate_instruction): A comment fix.
15780
157812011-11-07 Joel Brobecker <brobecker@adacore.com>
15782
15783 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15784 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15785 dr_status_mirror and dr_control_mirror from debug_reg_state.
15786 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15787 (i386_initial_stuff): Remove use of deleted globals.
15788 (i386_get_thread_context, i386_set_thread_context,
15789 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15790 from debug_reg_state.
15791
157922011-11-05 Yao Qi <yao@codesourcery.com>
15793
15794 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15795 address as TPOINT's.
15796
157972011-11-02 Stan Shebs <stan@codesourcery.com>
15798
15799 * tracepoint.c (agent_mem_read_string): New function.
15800 (eval_agent_expr): Call it for tracenz.
15801 * server.c (handle_query): Report support for tracenz.
15802
158032011-11-02 Yao Qi <yao@codesourcery.com>
15804
15805 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15806
158072011-11-02 Yao Qi <yao@codesourcery.com>
15808
15809 * target.h: Fix a typo in comment.
15810
158112011-10-31 Pedro Alves <pedro@codesourcery.com>
15812
15813 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15814 clobber the breakpoints' shadows with fast tracepoint jumps.
15815 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15816 * target.c (write_inferior_memory): Also pass MYADDR down to
15817 check_mem_write.
15818
158192011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15820
15821 * configure.ac: Check support for personality routine.
15822 * configure: Regenerate.
15823 * config.in: Likewise.
15824 * linux-low.c: Include <sys/personality.h>.
15825 Define ADDR_NO_RANDOMIZE if necessary.
15826 (linux_create_inferior): Disable address space randomization when
15827 forking inferior, if requested.
15828 (linux_supports_disable_randomization): New function.
15829 (linux_target_ops): Install it.
15830 * server.h (disable_randomization): Declare.
15831 * server.c (disable_randomization): New global variable.
15832 (handle_general_set): Handle QDisableRandomization.
15833 (handle_query): Likewise for qSupported.
15834 (main): Support --disable-randomization and --no-disable-randomization
15835 command line arguments.
15836 * target.h (struct target_ops): Add supports_disable_randomization.
15837 (target_supports_disable_randomization): New macro.
15838
158392011-09-29 Mike Frysinger <vapier@gentoo.org>
15840
15841 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15842 ifdef check.
15843 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15844 [!PT_GETDSBT] (target_loadmap): New definition.
15845 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15846 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15847 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15848 and PT_GETDSBT to LINUX_LOADMAP.
15849 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15850 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15851
158522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15853
15854 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15855 (arm_linux_hwbp_cap): New static variable.
15856 (arm_linux_get_hwbp_cap): Replace by ...
15857 (arm_linux_init_hwbp_cap): ... this new function.
15858 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15859 (arm_linux_get_hw_watchpoint_count): Likewise.
15860 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15861 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15862 (arm_prepare_to_resume): Use perror_with_name instead of error.
15863
158642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15865
15866 * linux-arm-low.c: Include <signal.h>.
15867 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15868 (struct arm_linux_hwbp_cap): New data type.
15869 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15870 (struct arm_linux_hw_breakpoint): New data type.
15871 (MAX_BPTS, MAX_WPTS): Define.
15872 (struct arch_process_info, struct arch_lwp_info): New data types.
15873 (arm_linux_get_hwbp_cap): New function.
15874 (arm_linux_get_hw_breakpoint_count): Likewise.
15875 (arm_linux_get_hw_watchpoint_count): Likewise.
15876 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15877 (arm_hwbp_control_initialize): Likewise.
15878 (arm_hwbp_control_is_enabled): Likewise.
15879 (arm_hwbp_control_is_initialized): Likewise.
15880 (arm_hwbp_control_disable): Likewise.
15881 (arm_linux_hw_breakpoint_equal): Likewise.
15882 (arm_linux_hw_point_initialize): Likewise.
15883 (struct update_registers_data): New data structure.
15884 (update_registers_callback: New function.
15885 (arm_insert_point): Likewise.
15886 (arm_remove_point): Likewise.
15887 (arm_stopped_by_watchpoint): Likewise.
15888 (arm_stopped_data_address): Likewise.
15889 (arm_new_process): Likewise.
15890 (arm_new_thread): Likewise.
15891 (arm_prepare_to_resume): Likewise.
15892 (the_low_target): Register arm_insert_point, arm_remove_point,
15893 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15894 arm_new_thread, and arm_prepare_to_resume.
15895
158962011-09-15 Stan Shebs <stan@codesourcery.com>
15897
15898 * server.h (struct emit_ops): Add compare-goto fields.
15899 * tracepoint.c (gdb_agent_op_sizes): New table.
15900 (emit_eq_goto): New function.
15901 (emit_ne_goto): New function.
15902 (emit_lt_goto): New function.
15903 (emit_le_goto): New function.
15904 (emit_gt_goto): New function.
15905 (emit_ge_goto): New function.
15906 (is_goto_target): New function.
15907 (compile_bytecodes): Recognize special cases of compare-goto
15908 combinations and call specialized emitters for them.
15909 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15910 (amd64_emit_ne_goto): New function.
15911 (amd64_emit_lt_goto): New function.
15912 (amd64_emit_le_goto): New function.
15913 (amd64_emit_gt_goto): New function.
15914 (amd64_emit_ge_goto): New function.
15915 (amd64_emit_ops): Add the new functions.
15916 (i386_emit_eq_goto): New function.
15917 (i386_emit_ne_goto): New function.
15918 (i386_emit_lt_goto): New function.
15919 (i386_emit_le_goto): New function.
15920 (i386_emit_gt_goto): New function.
15921 (i386_emit_ge_goto): New function.
15922 (i386_emit_ops): Add the new functions.
15923
159242011-09-08 Stan Shebs <stan@codesourcery.com>
15925
15926 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15927 (i386_emit_epilogue): Restore %ebx.
15928
159292011-08-31 Jie Zhang <jzhang918@gmail.com>
15930
15931 * server.c (step_thread): Remove definition.
15932 (process_serial_event): Don't handle Hs.
15933 * server.h (step_thread): Remove declaration.
15934 * target.c (set_desired_inferior): Remove use of step_thread.
15935
159362011-08-24 Luis Machado <lgustavo@codesourcery.com>
15937
15938 * linux-low.c: Include linux-procfs.h.
15939 (linux_attach_lwp_1): Update comments.
15940 (linux_attach): Scan for existing threads when attaching to a
15941 process that is the tgid.
15942 * Makefile.in: Update dependencies.
15943
159442011-08-24 Luis Machado <lgustavo@codesourcery.com>
15945
15946 * configure.srv: Add linux-procfs.o dependencies.
15947
159482011-08-14 Yao Qi <yao@codesourcery.com>
15949
15950 * target.h (struct target_ops): Fix indent.
15951 * win32-low.c (win32_target_ops): Fix comment.
15952
159532011-08-14 Andrew Jenner <andrew@codesourcery.com>
15954 Yao Qi <yao@codesourcery.com>
15955
15956 * Makefile.in (clean): Remove tic6x-*.c files.
15957 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15958 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15959 (tic6x-c64xp-linux.c): Likewise.
15960 * configure.srv: Add support for tic6x-*-uclinux.
15961 * linux-tic6x-low.c: New.
15962 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15963
159642011-08-14 Andrew Stubbs <ams@codesourcery.com>
15965 Yao Qi <yao@codesourcery.com>
15966
15967 * target.h (struct target_ops): Add read_loadmap.
15968 * linux-low.c (struct target_loadseg): New type.
15969 (struct target_loadmap): New type.
15970 (linux_read_loadmap): New function.
15971 (linux_target_ops): Add linux_read_loadmap.
15972 * server.c (handle_query): Support qXfer:fdpic:read packet.
15973 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15974 to NULL.
15975
159762011-08-05 Eli Zaretskii <eliz@gnu.org>
15977
15978 * win32-low.c: Include <stdint.h>.
15979
159802011-07-22 Pedro Alves <pedro@codesourcery.com>
15981
15982 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15983 to the inferior here.
15984 (i386_remove_aligned_watchpoint): Ditto.
15985 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15986 fit part of the watchpoint in the debug registers.
15987 (i386_update_inferior_debug_regs): New.
15988 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15989 registers, and only update the inferior on success.
15990 (i386_low_remove_watchpoint): Ditto.
15991
159922011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15993
15994 * linux-low.c (compare_ints, unique, list_threads, show_process,
15995 linux_core_of_thread): Delete.
15996 (linux_target_ops): Change linux_core_of_thread to
15997 linux_common_core_of_thread.
15998 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15999 * utils.c (malloc_failure): Change type of argument.
16000 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16001 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16002 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16003 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16004 (IPA_OBJS): Add common-utils-ipa.o.
16005 (ptid_h, linux_osdata_h): New macros.
16006 (server_h): Add common/common-utils.h, common/xml-utils.h,
16007 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16008 common/ptid.h.
16009 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16010 ptid.o, buffer.o): New rules.
16011 (linux-low.o): Add common/linux-osdata.h as a dependency.
16012 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16013 * configure.ac: Add AC_HEADER_DIRENT check.
16014 * config.in: Regenerate.
16015 * configure: Regenerate.
16016 * remote-utils.c (xml_escape_text): Delete.
16017 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16018 buffer_xml_printf): Move to common/buffer.c.
16019 * server.c (main): Remove call to initialize_inferiors.
16020 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16021 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16022 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16023 internal_error, gdb_assert, gdb_assert_fail): Delete.
16024 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16025 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16026 common/buffer.h.
16027 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16028 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16029 initialize_inferiors): Delete.
16030
160312011-07-20 Pedro Alves <pedro@codesourcery.com>
16032
16033 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16034 symbol error.
16035
160362011-05-31 Pedro Alves <pedro@codesourcery.com>
16037
16038 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16039 assertion.
16040 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16041
160422011-05-26 Yao Qi <yao@codesourcery.com>
16043
16044 * Makefile.in (thread-db.o): Track dependence to
16045 common/gdb_thread_db.h.
16046 * thread-db.c: include gdb_thread_db.h from right place.
16047
160482011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16049
16050 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16051 __FILE__ and __LINE__ to internal_error.
16052
160532011-05-13 Doug Evans <dje@google.com>
16054
16055 * thread-db.c (try_thread_db_load_from_sdir): New function.
16056 (try_thread_db_load_from_dir): New function.
16057 (thread_db_load_search): Handle $sdir, ignore $pdir.
16058 Remove trying of system directories if search of
16059 libthread-db-search-path fails, that is now done via $sdir.
16060
160612011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16062
16063 * server.c (handle_query): Add EnableDisableTracepoints to the list
16064 of supported features.
16065 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16066 tracepoints.
16067 (cmd_qtenable_disable): New.
16068 (cmd_qtstart): Install tracepoints even if disabled.
16069 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16070 receiving a QTEnable or QTDisable packet.
16071 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16072 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16073 tracepoints.
16074 (gdb_probe): Skip data collection if static tracepoint is disabled.
16075
160762011-05-10 Doug Evans <dje@google.com>
16077
16078 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16079
160802011-05-04 Doug Evans <dje@google.com>
16081
16082 * linux-low.c (linux_join): Skip process lookup.
16083 * spu-low.c (spu_join): Ditto.
16084 * server.c (join_inferiors_callback): Delete.
16085 (process_serial_event): For 'D' packet (detach) call join_inferior
16086 directly.
16087
160882011-05-04 Joseph Myers <joseph@codesourcery.com>
16089
16090 * README: Don't mention xscale*-*-linux*.
16091 * configure.srv (xscale*-*-linux*): Don't handle target.
16092
160932011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16094
16095 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16096 casting pointers.
16097 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16098 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16099 (i386_emit_void_call_2): Likewise.
16100
161012011-04-26 Yao Qi <yao@codesourcery.com>
16102
16103 * linux-low.c: Move common macros to linux-ptrace.h.
16104 Include linux-ptrace.h.
16105 * Makefile.in (linux_ptrace_h): New.
16106 (linux-low.o): Depends on linux-ptrace.h.
16107
161082011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16109
16110 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16111 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16112 (remote_prepare): New function with most of the TCP code from ...
16113 (remote_open): ... here. Detect PORT here unconditionally. Move also
16114 setting transport_is_reliable.
16115 * server.c (run_once): New variable.
16116 (gdbserver_usage): Document it.
16117 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16118 the first run if RUN_ONCE.
16119 * server.h (run_once, remote_prepare): New declarations.
16120
161212011-04-19 Tom Tromey <tromey@redhat.com>
16122
16123 * win32-low.c (handle_load_dll): Remove duplicate "the".
16124
161252011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16126
16127 Remove support for old Cygwin 1.5 versions.
16128 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16129 function to avoid warning.
16130 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16131 warning.
16132
161332011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16134
16135 * gdbserver/server.h (Macro _): Define it if not available.
16136
161372011-03-14 Michael Snyder <msnyder@vmware.com>
16138
16139 * hostio.c (handle_close): Remove unnecessary null test.
16140
161412011-03-10 Joel Brobecker <brobecker@adacore.com>
16142
16143 * Makefile.in (maintainer-clean realclean distclean): Remove
16144 "make ... subdir_do" command.
16145
161462011-03-10 Michael Snyder <msnyder@vmware.com>
16147
16148 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16149
16150 * server.c (handle_v_run): Free alloced buffer on early return.
16151
161522011-03-09 Yao Qi <yao@codesourcery.com>
16153
16154 Revert:
16155 2011-03-04 Yao Qi <yao@codesourcery.com>
16156
16157 * Makefile.in: Remove GNU make feature --directory.
16158
16159 2011-03-05 Yao Qi <yao@codesourcery.com>
16160
16161 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16162 (subdir_do): New make target. Copied from gdb/Makefile.
16163 (maintainer-clean, realclean, distclean, clean): Call corresponding
16164 make targets in common/Makefile.
16165
16166 2011-02-11 Yao Qi <yao@codesourcery.com>
16167
16168 * configure.ac: Call AC_PROG_RANLIB.
16169 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16170 * configure: Regenerate.
16171
161722011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16173
16174 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16175
161762011-03-06 Yao Qi <yao@codesourcery.com>
16177
16178 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16179
161802011-03-05 Yao Qi <yao@codesourcery.com>
16181
16182 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16183 (subdir_do): New make target. Copied from gdb/Makefile.
16184 (maintainer-clean, realclean, distclean, clean): Call corresponding
16185 make targets in common/Makefile.
16186
161872011-03-04 Yao Qi <yao@codesourcery.com>
16188
16189 * Makefile.in: Remove GNU make feature --directory.
16190
161912011-03-04 Michael Snyder <msnyder@vmware.com>
16192
16193 * server.c (queue_stop_reply): Call xmalloc not malloc.
16194
161952011-03-02 Michael Snyder <msnyder@vmware.com>
16196
16197 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16198
161992011-02-28 Michael Snyder <msnyder@vmware.com>
16200
16201 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16202 (cmd_qtframe): Ditto.
16203 (cmd_qtbuffer): Ditto.
16204 (cmd_bigqtbuffer): Ditto.
16205
16206 * utils.c (decimal2str): Initialize 'width' to nine, then
16207 don't mess with it.
16208
162092011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16210
16211 * hostio.c (require_data): Free *data, not data.
16212
162132011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16214
16215 * hostio.c (require_data): Use free, not xfree.
16216
162172011-02-27 Michael Snyder <msnyder@vmware.com>
16218
16219 * server.c (handle_query): Discard unused value.
16220
16221 * hostio.c (require_data): Free malloc memory before returning
16222 error.
16223
162242011-02-26 Michael Snyder <msnyder@vmware.com>
16225
16226 * linux-low.c (list_threads): Call closedir for dirent.
16227
162282011-02-27 Michael Snyder <msnyder@vmware.com>
16229
16230 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16231 a case statement falls through.
16232
16233 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16234
16235 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16236 in comparison.
16237
162382011-02-26 Michael Snyder <msnyder@vmware.com>
16239
16240 * utils.c (decimal2str): Eliminate dead code and dead param.
16241 (pulongest): Drop dead param from call to decimal2str.
16242 (plongest): Ditto.
16243
162442011-02-24 Joel Brobecker <brobecker@adacore.com>
16245
16246 Revert the following patch (not approved yet):
16247 2011-02-21 Hui Zhu <teawater@gmail.com>
16248 * tracepoint.c (tp_printf): New function.
16249 (eval_agent_expr): Handle gdb_agent_op_printf.
16250
162512011-02-21 Hui Zhu <teawater@gmail.com>
16252
16253 * tracepoint.c (tp_printf): New function.
16254 (eval_agent_expr): Handle gdb_agent_op_printf.
16255
162562011-02-18 Tom Tromey <tromey@redhat.com>
16257
16258 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16259 (tracepoint.o): Likewise.
16260 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16261 (gdb_agent_op_names): Likewise.
16262
162632011-02-18 Tom Tromey <tromey@redhat.com>
16264
16265 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16266 gdb_agent_op_rot>: New constants.
16267 (gdb_agent_op_names): Add pick and roll.
16268 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16269 cases.
16270
162712011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16272
16273 * aclocal.m4: Regenerated with aclocal-1.11.1.
16274
162752011-02-14 Pedro Alves <pedro@codesourcery.com>
16276
16277 * server.c (handle_qxfer_traceframe_info): New.
16278 (qxfer_packets): Register "traceframe-info".
16279 (handle_query): Report support for qXfer:traceframe-info:read+.
16280 * tracepoint.c (match_blocktype): New.
16281 (traceframe_find_block_type): Rename to ...
16282 (traceframe_walk_blocks): ... this. Add callback filter argument,
16283 and use it.
16284 (traceframe_find_block_type): New, reimplemented on top of
16285 traceframe_walk_blocks.
16286 (build_traceframe_info_xml): New.
16287 (traceframe_read_info): New.
16288 * server.h (traceframe_read_info): Declare.
16289
162902011-02-11 Yao Qi <yao@codesourcery.com>
16291
16292 * configure.ac: Call AC_PROG_RANLIB.
16293 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16294 * configure: Regenerate.
16295
162962011-02-07 Pedro Alves <pedro@codesourcery.com>
16297
16298 * server.c (gdb_read_memory): Change return semantics to allow
16299 partial transfers.
16300 (handle_search_memory_1): Adjust.
16301 (process_serial_event) <'m' packet>: Handle partial transfers.
16302 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16303
163042011-01-28 Pedro Alves <pedro@codesourcery.com>
16305
16306 * regcache.c (init_register_cache): Initialize
16307 regcache->register_status.
16308 (free_register_cache): Release regcache->register_status.
16309 (regcache_cpy): Copy register_status.
16310 (registers_to_string): Print 'x's for unavailable registers.
16311 (supply_register): Mark the register's status valid or
16312 unavailable, depending on whether a buffer was passed in or not.
16313 (supply_register_zeroed): New.
16314 (supply_regblock): Mark the registers' status valid or
16315 unavailable, depending on whether a buffer was passed in or not.
16316 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16317 (struct regcache): New `register_status' field.
16318 (supply_register_zeroed): Declare.
16319 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16320 supply_register_zeroed, rather than passing a NULL buffer to
16321 supply_register.
16322 * tracepoint.c (fetch_traceframe_registers): Update comment.
16323
163242011-01-28 Pedro Alves <pedro@codesourcery.com>
16325
16326 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16327 buffer explicit.
16328
163292011-01-25 Pedro Alves <pedro@codesourcery.com>
16330
16331 * server.h (decode_xfer_write): Change prototype.
16332 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16333 and don't extract the annex here.
16334 * server.c (decode_xfer_read): Remove `annex' parameter,
16335 and don't extract the annex here.
16336 (decode_xfer): New.
16337 (struct qxfer): New.
16338 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16339 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16340 (handle_qxfer_statictrace): New functions, abstracted out from
16341 handle_query, and made to use the struct qxfer interface.
16342 (handle_threads_qxfer_proper): Rename to ...
16343 (handle_qxfer_threads_proper): ... this.
16344 (handle_threads_qxfer): Rename to ...
16345 (handle_qxfer_threads): ... this. Adjust.
16346 (qxfer_packets): New array.
16347 (handle_qxfer): New function.
16348 (handle_query): Use handle_qxfer.
16349
163502011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16351
16352 * gdbreplay.c: Shorten lines of >= 80 columns.
16353 * linux-low.c: Ditto.
16354 * linux-ppc-low.c: Ditto.
16355 * linux-s390-low.c: Ditto.
16356 * linux-sparc-low.c: Ditto.
16357 * linux-x86-low.c: Ditto.
16358 * linux-xtensa-low.c: Ditto.
16359 * mem-break.c: Ditto.
16360 * nto-low.c: Ditto.
16361 * regcache.h: Ditto.
16362 * remote-utils.c: Ditto.
16363 * server.c: Ditto.
16364 * server.h: Ditto.
16365 * thread-db.c: Ditto.
16366 * tracepoint.c: Ditto.
16367 * utils.c: Ditto.
16368 * win32-low.h: Ditto.
16369
163702011-01-05 Joel Brobecker <brobecker@adacore.com>
16371
16372 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16373 update.
16374
163752011-01-01 Joel Brobecker <brobecker@adacore.com>
16376
16377 * server.c (gdbserver_version): Update copyright year in version
16378 output.
16379 * gdbreplay.c (gdbreplay_version): Ditto.
16380
163812010-12-29 Jie Zhang <jie.zhang@analog.com>
16382
16383 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16384 * linux-bfin-low.c: New file.
16385 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16386 PT_DATA_ADDR for BFIN targets.
16387 * Makefile.in (SFILES): Add linux-bfin-low.c.
16388 (clean): Remove reg-bfin.c.
16389 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16390 * README: Mention supported Blackfin targets.
16391
163922010-12-23 Mike Frysinger <vapier@gentoo.org>
16393
16394 * .gitignore: New file.
16395
163962010-11-16 Mike Frysinger <vapier@gentoo.org>
16397
16398 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16399
164002010-10-22 Jie Zhang <jie@codesourcery.com>
16401
16402 * Makefile.in: Add FLAGS_TO_PASS variable.
16403 (install): Remove dependency of install-only and recursively
16404 invoke make for install-only.
16405
164062010-10-04 Doug Evans <dje@google.com>
16407
16408 * Makefile.in (uninstall): Use $(DESTDIR).
16409
164102010-09-24 Pedro Alves <pedro@codesourcery.com>
16411
16412 PR gdb/11842
16413
16414 * linux-x86-low.c (compat_siginfo_from_siginfo)
16415 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16416 si_code is < 0. Check for si_code == SI_TIMER before checking for
16417 si_code < 0.
16418
164192010-09-13 Joel Brobecker <brobecker@adacore.com>
16420
16421 * lynx-i386-low.c: New file.
16422 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16423
164242010-09-13 Joel Brobecker <brobecker@adacore.com>
16425
16426 * lynx-low.c (ptrace_request_to_str): Remove handling for
16427 request values that have been removed in LynxOS 5.x.
16428
164292010-09-13 Joel Brobecker <brobecker@adacore.com>
16430
16431 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16432 <ptrace.h>
16433
164342010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16435
16436 * configure.ac: Add --enable-inprocess-agent option.
16437 * configure: Rebuilt.
16438
164392010-09-06 Yao Qi <yao@codesourcery.com>
16440
16441 * linux-low.c (linux_kill): Remove unused variable.
16442 (linux_stabilize_threads): Likewise.
16443 * server.c (start_inferior): Likewise.
16444 (queue_stop_reply_callback): Likewise.
16445 * tracepoint.c (do_action_at_tracepoint): Likewise.
16446
164472010-09-06 Yao Qi <yao@codesourcery.com>
16448
16449 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16450 on return.
16451
164522010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16453
16454 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16455
164562010-09-06 Pedro Alves <pedro@codesourcery.com>
16457
16458 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16459 "$(IPA_DEPFILES)".
16460
164612010-09-01 Joel Brobecker <brobecker@adacore.com>
16462
16463 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16464 gdbserver/lynx-ppc-low.c: New files.
16465 * Makefile.in (lynx_low_h): New variable.
16466 (lynx-low.o, lynx-ppc-low.o): New rules.
16467 * configure.ac: On LynxOS, link with -lnetinet.
16468 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16469 * configure: regenerate.
16470
164712010-09-01 Joel Brobecker <brobecker@adacore.com>
16472
16473 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16474 * configure.ac: Add check for vasprintf and vsnprintf.
16475 * configure, config.in: Regenerate.
16476 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16477
164782010-09-01 Joel Brobecker <brobecker@adacore.com>
16479
16480 * gdbreplay.c: Move include of alloca.h up, next to include of
16481 malloc.h.
16482 * server.h: Add include of malloc.h.
16483 * mem-break.c: Remove include of malloc.h.
16484 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16485
164862010-09-01 Joel Brobecker <brobecker@adacore.com>
16487
16488 * Makefile.in (memmem.o): Build with -Wno-error.
16489
164902010-09-01 Joel Brobecker <brobecker@adacore.com>
16491
16492 * utils.c (xsnprintf): Make non-static.
16493 * server.h: Add xsnprintf declaration.
16494 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16495 replace calls to snprintf by calls to xsnprintf throughout.
16496
164972010-09-01 Joel Brobecker <brobecker@adacore.com>
16498
16499 * configure.ac: Add configure check for alloca.
16500 * configure, config.in: Regenerate.
16501 * server.h: Include alloca.h if it exists.
16502 * gdbreplay.c: Include alloca.h if it exists.
16503
165042010-08-28 Pedro Alves <pedro@codesourcery.com>
16505
16506 * linux-low.c (__SIGRTMIN): Define if not already defined.
16507 (linux_create_inferior): Check for __ANDROID__ rather than
16508 __SIGRTMIN.
16509 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16510 are already deferred.
16511 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16512 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16513 stopped and already has a pending signal to report.
16514 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16515 a pending signal to report or is moving out of a jump pad.
16516 (linux_init_signals): Check for __ANDROID__ rather than
16517 __SIGRTMIN.
16518
165192010-08-28 Pedro Alves <pedro@codesourcery.com>
16520
16521 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16522 debug_threads check. Avoid a linear search when not doing debug
16523 output.
16524
165252010-08-27 Pedro Alves <pedro@codesourcery.com>
16526
16527 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16528 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16529 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16530 (process_event): Change local fd's type to gdb_fildes_t.
16531 (create_file_handler): Adjust prototype.
16532 (delete_file_handler): Adjust prototype.
16533 (handle_file_event): Adjust prototype. Use pfildes.
16534 (create_file_event): Adjsut prototype.
16535 * remote-utils.c (remote_desc, listen_desc): Change type to
16536 gdb_fildes_t.
16537 * server.h: New gdb_fildes_t typedef.
16538 [USE_WIN32API]: Include winsock2.h.
16539 (delete_file_handler, add_file_handler): Adjust prototypes.
16540 (pfildes): Declare.
16541 * utils.c (pfildes): New.
16542
165432010-08-27 Pedro Alves <pedro@codesourcery.com>
16544
16545 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16546 * configure: Regenerate.
16547
165482010-08-27 Pedro Alves <pedro@codesourcery.com>
16549
16550 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16551 (linux_done_accessing_memory): ... this.
16552 (linux_target_ops): Adjust.
16553 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16554 * nto-low.c (nto_target_ops): Adjust comment.
16555 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16556 * spu-low.c (spu_target_ops): Adjust comment.
16557 * target.h (target_ops): Rename unprepare_to_access_memory field
16558 to done_accessing_memory.
16559 (unprepare_to_access_memory): Rename to ...
16560 (done_accessing_memory): ... this.
16561
165622010-08-26 Pedro Alves <pedro@codesourcery.com>
16563
16564 * linux-low.c (linux_prepare_to_access_memory): New.
16565 (linux_unprepare_to_access_memory): New.
16566 (linux_target_ops): Install them.
16567 * server.c (read_memory): Rename to ...
16568 (gdb_read_memory): ... this. Use
16569 prepare_to_access_memory/prepare_to_access_memory.
16570 (write_memory): Rename to ...
16571 (gdb_write_memory): ... this. Use
16572 prepare_to_access_memory/prepare_to_access_memory.
16573 (handle_search_memory_1): Adjust.
16574 (process_serial_event): Adjust.
16575 * target.h (struct target_ops): New fields
16576 prepare_to_access_memory and unprepare_to_access_memory.
16577 (prepare_to_access_memory, unprepare_to_access_memory): New.
16578 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16579 prepare_to_access_memory/prepare_to_access_memory.
16580 * nto-low.c (nto_target_ops): Adjust.
16581 * spu-low.c (spu_target_ops): Adjust.
16582 * win32-low.c (win32_target_ops): Adjust.
16583
165842010-08-26 Pedro Alves <pedro@codesourcery.com>
16585
16586 * Makefile.in (WARN_CFLAGS): Get it from configure.
16587 (WERROR_CFLAGS): New.
16588 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16589 * configure.ac: Introduce --enable-werror, which adds -Werror to
16590 the compiler command line. Enabled by default. Disable with
16591 --disable-werror. Add -Wdeclaration-after-statement
16592 Wpointer-arith and -Wformat-nonliteral to warning flags.
16593 * configure: Regenerate.
16594
165952010-08-26 Pedro Alves <pedro@codesourcery.com>
16596
16597 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16598
165992010-08-26 Pedro Alves <pedro@codesourcery.com>
16600
16601 * gdbreplay.c (remote_error): New.
16602 (gdbchar): New.
16603 (expect): Use gdbchar. Check for error reading from GDB.
16604 Clarify sync error output.
16605 (play): Check for errors writing to GDB.
16606 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16607 * remote-utils.c (getpkt): Check for errors writing to the remote
16608 descriptor.
16609
166102010-08-25 Pedro Alves <pedro@codesourcery.com>
16611
16612 * linux-low.c (linux_wait_1): Move non-debugging code out of
16613 `debug_threads' control.
16614
166152010-08-25 Pedro Alves <pedro@codesourcery.com>
16616
16617 * linux-low.c (linux_wait_1): Don't set last_status here.
16618 * server.c (push_event, queue_stop_reply_callback): Assert we're
16619 not pushing a TARGET_WAITKIND_IGNORE event.
16620 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16621 (myresume, handle_target_event): Set the thread's last_resume_kind
16622 and last_status from the target returned status.
16623
166242010-08-25 Pedro Alves <pedro@codesourcery.com>
16625
16626 PR threads/10729
16627
16628 * linux-x86-low.c (update_debug_registers_callback): New.
16629 (i386_dr_low_set_addr): Use it.
16630 (i386_dr_low_get_addr): New.
16631 (i386_dr_low_set_control): Use update_debug_registers_callback.
16632 (i386_dr_low_get_control): New.
16633 (i386_dr_low_get_status): Adjust.
16634 * linux-low.c (linux_stop_lwp): New.
16635 * linux-low.h (linux_stop_lwp): Declare.
16636
16637 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16638 argument instead of a i386_debug_reg_state.
16639 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16640 a i386_debug_reg_state.
16641 (i386_insert_aligned_watchpoint): Adjust.
16642 (i386_remove_aligned_watchpoint): Adjust.
16643 (i386_low_stopped_data_address): Read the debug registers from the
16644 inferior instead of from the mirrors.
16645 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16646 (i386_dr_low_get_addr): Declare.
16647 (i386_dr_low_get_control): Declare.
16648 (i386_dr_low_get_status): Change prototype.
16649
16650 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16651 (i386_dr_low_get_addr): New.
16652 (i386_dr_low_get_control): New.
16653 (i386_dr_low_get_status): Adjust prototype. Return
16654 dr_status_mirror.
16655 (i386_initial_stuff): Clear dr_status_mirror and
16656 dr_control_mirror.
16657 (i386_get_thread_context): Adjust.
16658 (i386_set_thread_context): Adjust.
16659 (i386_thread_added): Adjust.
16660
166612010-08-24 Pedro Alves <pedro@codesourcery.com>
16662
16663 * linux-low.h (linux_thread_area): Delete declaration.
16664
166652010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16666
16667 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16668 after its termination.
16669
166702010-08-09 Pedro Alves <pedro@codesourcery.com>
16671
16672 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16673 (gdb_wants_all_stopped): Delete.
16674 (linux_wait_1): Don't call them.
16675 * server.c (handle_v_cont): Tag all threads as want-stopped.
16676 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16677 stopped as "client-wants-stopped".
16678
166792010-07-31 Pedro Alves <pedro@codesourcery.com>
16680
16681 * Makefile.in (signals_h): New.
16682 (server_h): Depend on it.
16683 (server.o): Don't depend on $(signals_def).
16684 (signals.o): Depend on $(signals_def).
16685
166862010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16687
16688 * Makefile.in (signals_def): New.
16689 (server_h): Append include/gdb/signals.h and signals_def.
16690 (server.o): Append signals_def.
16691
166922010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16693
16694 * server.c (handle_target_event): Use target_signal_to_host for
16695 resume_info.sig initialization.
16696 * target.h (struct thread_resume) <sig>: New comment.
16697
166982010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16699
16700 * server.c (handle_query): strcpy() the returned string from paddress()
16701 instead of sprintf().
16702 * utils.c (paddress): Return phex_nz().
16703
167042010-07-07 Joel Brobecker <brobecker@adacore.com>
16705
16706 * server.c (handle_v_cont): Call mourn_inferior if process
16707 just exited.
16708 (myresume): Likewise.
16709
167102010-07-01 Pedro Alves <pedro@codesourcery.com>
16711
16712 Static tracepoints, and integration with UST.
16713
16714 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16715 * mem-break.c (uninsert_all_breakpoints)
16716 (reinsert_all_breakpoints): New.
16717 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16718 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16719 (gdb_agent_ust_loaded, helper_thread_id)
16720 (gdb_agent_helper_thread_id): New macros.
16721 (struct ipa_sym_addresses): Add addr_ust_loaded,
16722 addr_helper_thread_id, addr_cmd_buf.
16723 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16724 (in_process_agent_loaded_ust): New.
16725 (write_e_ust_not_loaded): New.
16726 (maybe_write_ipa_ust_not_loaded): New.
16727 (struct collect_static_trace_data_action): New.
16728 (enum tracepoint_type) <static_tracepoint>: New.
16729 (struct tracepoint) <handle>: Mention static tracepoints.
16730 (struct static_tracepoint_ctx): New.
16731 (CMD_BUF_SIZE): New.
16732 (add_tracepoint_action): Handle static tracepoint actions.
16733 (unprobe_marker_at): New.
16734 (clear_installed_tracepoints): Handle static tracepoints.
16735 (cmd_qtdp): Handle static tracepoints.
16736 (probe_marker_at): New.
16737 (cmd_qtstart): Handle static tracepoints.
16738 (response_tracepoint): Handle static tracepoints.
16739 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16740 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16741 (get_context_regcache): Handle static tracepoints.
16742 (do_action_at_tracepoint): Handle static tracepoint actions.
16743 (traceframe_find_block_type): Handle static trace data blocks.
16744 (traceframe_read_sdata): New.
16745 (download_tracepoints): Download static tracepoint actions.
16746 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16747 (GDB_PROBE_NAME): New.
16748 (ust_ops): New.
16749 (GET_UST_SYM): New.
16750 (USTF): New.
16751 (dlsym_ust): New.
16752 (ust_marker_to_static_tracepoint): New.
16753 (gdb_probe): New.
16754 (collect_ust_data_at_tracepoint): New.
16755 (gdb_ust_probe): New.
16756 (UNIX_PATH_MAX, SOCK_DIR): New.
16757 (gdb_ust_connect_sync_socket): New.
16758 (resume_thread, stop_thread): New.
16759 (run_inferior_command): New.
16760 (init_named_socket): New.
16761 (gdb_ust_socket_init): New.
16762 (cstr_to_hexstr): New.
16763 (next_st): New.
16764 (first_marker, next_marker): New.
16765 (response_ust_marker): New.
16766 (cmd_qtfstm, cmd_qtsstm): New.
16767 (unprobe_marker_at, probe_marker_at): New.
16768 (cmd_qtstmat, gdb_ust_thread): New.
16769 (gdb_ust_init): New.
16770 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16771 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16772 (ST_REGENTRY): New.
16773 (x86_64_st_collect_regmap): New.
16774 (X86_64_NUM_ST_COLLECT_GREGS): New.
16775 (AMD64_RIP_REGNUM): New.
16776 (supply_static_tracepoint_registers): New.
16777 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16778 (ST_REGENTRY): New.
16779 (i386_st_collect_regmap): New.
16780 (i386_NUM_ST_COLLECT_GREGS): New.
16781 (supply_static_tracepoint_registers): New.
16782 * server.c (handle_query): Handle qXfer:statictrace:read.
16783 <qSupported>: Report support for StaticTracepoints, and
16784 qXfer:statictrace:read features.
16785 * server.h (traceframe_read_sdata)
16786 (supply_static_tracepoint_registers): Declare.
16787 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16788 (unpack_varlen_hex): Include in IPA build.
16789 * Makefile.in (ustlibs, ustinc): New.
16790 (IPA_OBJS): Add remote-utils-ipa.o.
16791 ($(IPA_LIB)): Link -ldl and -lpthread.
16792 (UST_CFLAGS): New.
16793 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16794 * config.in, configure: Regenerate.
16795
167962010-06-20 Ian Lance Taylor <iant@google.com>
16797 Pedro Alves <pedro@codesourcery.com>
16798
16799 * linux-x86-low.c (always_true): Delete.
16800 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16801 trying to fool the compiler with always_true.
16802
168032010-06-20 Pedro Alves <pedro@codesourcery.com>
16804
16805 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16806 conditions in gdbserver.
16807
168082010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16809
16810 * spu-low.c (spu_read_memory): Wrap around local store limit.
16811 (spu_write_memory): Likewise.
16812
168132010-06-15 Pedro Alves <pedro@codesourcery.com>
16814
16815 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16816 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16817 LONGEST uses.
16818 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16819 uses.
16820 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16821 uses with LONGEST uses.
16822
168232010-06-14 Stan Shebs <stan@codesourcery.com>
16824 Pedro Alves <pedro@codesourcery.com>
16825
16826 Bytecode compiler.
16827
16828 * linux-x86-low.c: Include limits.h.
16829 (add_insns): New.
16830 (always_true): New.
16831 (EMIT_ASM): New.
16832 (EMIT_ASM32): New.
16833 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16834 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16835 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16836 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16837 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16838 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16839 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16840 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16841 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16842 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16843 (amd64_emit_void_call_2): New.
16844 (amd64_emit_ops): New.
16845 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16846 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16847 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16848 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16849 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16850 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16851 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16852 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16853 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16854 (i386_emit_stack_adjust, i386_emit_int_call_1)
16855 (i386_emit_void_call_2): New.
16856 (i386_emit_ops): New.
16857 (x86_emit_ops): New.
16858 (the_low_target): Install x86_emit_ops.
16859 * server.h (struct emit_ops): New.
16860 (get_raw_reg_func_addr): Declare.
16861 (current_insn_ptr, emit_error): Declare.
16862 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16863 (set_trace_state_variable_value): New defines.
16864 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16865 addr_get_trace_state_variable_value and
16866 addr_set_trace_state_variable_value.
16867 (symbol_list): New fields for get_raw_reg,
16868 get_trace_state_variable_value and set_trace_state_variable_value.
16869 (condfn): New typedef.
16870 (struct tracepoint): New field `compiled_cond'.
16871 (do_action_at_tracepoint): Clear compiled_cond.
16872 (get_trace_state_variable_value, set_trace_state_variable_value):
16873 Export in the IPA.
16874 (condition_true_at_tracepoint): If there's a compiled condition,
16875 run that.
16876 (current_insn_ptr, emit_error): New globals.
16877 (struct bytecode_address): New.
16878 (get_raw_reg_func_addr): New.
16879 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16880 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16881 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16882 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16883 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16884 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16885 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16886 (compile_tracepoint_condition, compile_bytecodes): New.
16887 * target.h (emit_ops): Forward declare.
16888 (struct target_ops): New field emit_ops.
16889 (target_emit_ops): New.
16890 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16891 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16892 * linux-low.c (linux_emit_ops): New.
16893 (linux_target_ops): Install it.
16894 * linux-low.h (struct linux_target_ops): New field emit_ops.
16895
168962010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16897
16898 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16899 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16900
169012010-06-01 Pedro Alves <pedro@codesourcery.com>
16902 Stan Shebs <stan@codesourcery.com>
16903
16904 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16905 (all): Depend on $(extra_libraries).
16906 (install-only): Install the IPA.
16907 (IPA_OBJS, IPA_LIB): New.
16908 (clean): Remove the IPA lib.
16909 (IPAGENT_CFLAGS): New.
16910 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16911 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16912 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16913 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16914 * configure.ac: Check for atomic builtins support in the compiler.
16915 (IPA_DEPFILES, extra_libraries): Define.
16916 * configure.srv (ipa_obj): Add description.
16917 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16918 (i[34567]86-*-linux*): Set ipa_obj.
16919 (x86_64-*-linux*): Set ipa_obj.
16920 * linux-low.c (stabilizing_threads): New.
16921 (supports_fast_tracepoints): New.
16922 (linux_detach): Stabilize threads before detaching.
16923 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16924 the lwp is either not stabilizing, or is moving out of a jump pad.
16925 (linux_fast_tracepoint_collecting): New.
16926 (maybe_move_out_of_jump_pad): New.
16927 (enqueue_one_deferred_signal): New.
16928 (dequeue_one_deferred_signal): New.
16929 (linux_wait_for_event_1): If moving out of a jump pad, defer
16930 pending signals to later.
16931 (linux_stabilize_threads): New.
16932 (linux_wait_1): Check if threads need moving out of jump pads, and
16933 do it if so.
16934 (stuck_in_jump_pad_callback): New.
16935 (move_out_of_jump_pad_callback): New.
16936 (lwp_running): New.
16937 (linux_resume_one_lwp): Handle moving out of jump pads.
16938 (linux_set_resume_request): Dequeue deferred signals.
16939 (need_step_over_p): Also step over fast tracepoint jumps.
16940 (start_step_over): Also uninsert fast tracepoint jumps.
16941 (finish_step_over): Also reinsert fast tracepoint jumps.
16942 (linux_install_fast_tracepoint_jump): New.
16943 (linux_target_ops): Install linux_stabilize_threads and
16944 linux_install_fast_tracepoint_jump_pad.
16945 * linux-low.h (linux_target_ops) <get_thread_area,
16946 install_fast_tracepoint_jump_pad>: New fields.
16947 (struct lwp_info) <collecting_fast_tracepoint,
16948 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16949 (linux_get_thread_area): Declare.
16950 * linux-x86-low.c (jump_insn): New.
16951 (x86_get_thread_area): New.
16952 (append_insns): New.
16953 (push_opcode): New.
16954 (amd64_install_fast_tracepoint_jump_pad): New.
16955 (i386_install_fast_tracepoint_jump_pad): New.
16956 (x86_install_fast_tracepoint_jump_pad): New.
16957 (the_low_target): Install x86_get_thread_area and
16958 x86_install_fast_tracepoint_jump_pad.
16959 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16960 (struct fast_tracepoint_jump): New.
16961 (fast_tracepoint_jump_insn): New.
16962 (fast_tracepoint_jump_shadow): New.
16963 (find_fast_tracepoint_jump_at): New.
16964 (fast_tracepoint_jump_here): New.
16965 (delete_fast_tracepoint_jump): New.
16966 (set_fast_tracepoint_jump): New.
16967 (uninsert_fast_tracepoint_jumps_at): New.
16968 (reinsert_fast_tracepoint_jumps_at): New.
16969 (set_breakpoint_at): Use write_inferior_memory.
16970 (uninsert_raw_breakpoint): Use write_inferior_memory.
16971 (check_mem_read): Mask out fast tracepoint jumps.
16972 (check_mem_write): Mask out fast tracepoint jumps.
16973 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16974 (set_fast_tracepoint_jump): Declare.
16975 (delete_fast_tracepoint_jump)
16976 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16977 (reinsert_fast_tracepoint_jumps_at): Declare.
16978 * regcache.c: Don't compile many functions when building the
16979 in-process agent library.
16980 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16981 the register buffer in the heap.
16982 (free_register_cache): If the register buffer isn't owned by the
16983 regcache, don't free it.
16984 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16985 pre-existing register caches.
16986 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16987 type.
16988 (convert_ascii_to_int): : Constify `from' parameter type.
16989 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16990 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16991 the needed buffer in-place.
16992 (relocate_instruction): New.
16993 * server.c (handle_query) <qSymbols>: If the target supports
16994 tracepoints, give it a chance of looking up symbols. Report
16995 support for fast tracepoints.
16996 (handle_status): Stabilize threads.
16997 (process_serial_event): Adjust.
16998 * server.h (struct fast_tracepoint_jump): Forward declare.
16999 (struct process_info) <fast_tracepoint_jumps>: New field.
17000 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17001 (decode_X_packet, decode_M_packet): Adjust.
17002 (relocate_instruction): Declare.
17003 (in_process_agent_loaded): Declare.
17004 (tracepoint_look_up_symbols): Declare.
17005 (struct fast_tpoint_collect_status): Declare.
17006 (fast_tracepoint_collecting): Declare.
17007 (force_unlock_trace_buffer): Declare.
17008 (handle_tracepoint_bkpts): Declare.
17009 (initialize_low_tracepoint)
17010 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17011 * target.h (struct target_ops) <stabilize_threads,
17012 install_fast_tracepoint_jump_pad>: New fields.
17013 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17014 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17015 [HAVE_STDINT_H]: Include stdint.h.
17016 (trace_debug_1): Rename to ...
17017 (trace_vdebug): ... this.
17018 (trace_debug): Rename to ...
17019 (trace_debug_1): ... this. Add `level' parameter.
17020 (trace_debug): New.
17021 (ATTR_USED, ATTR_NOINLINE): New.
17022 (IP_AGENT_EXPORT): New.
17023 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17024 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17025 (about_to_request_buffer_space, trace_buffer_is_full)
17026 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17027 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17028 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17029 (traceframe_write_count, traceframes_created)
17030 (trace_state_variables)
17031 New renaming defines.
17032 (struct ipa_sym_addresses): New.
17033 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17034 (symbol_list): New.
17035 (ipa_sym_addrs): New.
17036 (all_tracepoint_symbols_looked_up): New.
17037 (in_process_agent_loaded): New.
17038 (write_e_ipa_not_loaded): New.
17039 (maybe_write_ipa_not_loaded): New.
17040 (tracepoint_look_up_symbols): New.
17041 (debug_threads) [IN_PROCESS_AGENT]: New.
17042 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17043 (UNKNOWN_SIDE_EFFECTS): New.
17044 (stop_tracing): New.
17045 (flush_trace_buffer): New.
17046 (stop_tracing_bkpt): New.
17047 (flush_trace_buffer_bkpt): New.
17048 (read_inferior_integer): New.
17049 (read_inferior_uinteger): New.
17050 (read_inferior_data_pointer): New.
17051 (write_inferior_data_pointer): New.
17052 (write_inferior_integer): New.
17053 (write_inferior_uinteger): New.
17054 (struct collect_static_trace_data_action): Delete.
17055 (enum tracepoint_type): New.
17056 (struct tracepoint) <type>: New field `type'.
17057 <actions_str, step_actions, step_actions_str>: Only include in
17058 GDBserver.
17059 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17060 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17061 (tracepoints): Use IP_AGENT_EXPORT.
17062 (last_tracepoint): Don't include in the IPA.
17063 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17064 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17065 (alloced_trace_state_variables): New.
17066 (trace_state_variables): Use IP_AGENT_EXPORT.
17067 (traceframe_t): Delete unused variable.
17068 (circular_trace_buffer): Don't include in the IPA.
17069 (trace_buffer_start): Delete.
17070 (struct trace_buffer_control): New.
17071 (trace_buffer_free): Delete.
17072 (struct ipa_trace_buffer_control): New.
17073 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17074 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17075 New.
17076 (trace_buffer_ctrl): New.
17077 (TRACE_BUFFER_CTRL_CURR): New.
17078 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17079 Reimplement as macros.
17080 (trace_buffer_wrap): Delete.
17081 (traceframe_write_count, traceframe_read_count)
17082 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17083 (struct tracepoint_hit_ctx) <type>: New field.
17084 (struct fast_tracepoint_ctx): New.
17085 (memory_barrier): New.
17086 (cmpxchg): New.
17087 (record_tracepoint_error): Update atomically in the IPA.
17088 (clear_inferior_trace_buffer): New.
17089 (about_to_request_buffer_space): New.
17090 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17091 updating the same buffer.
17092 (add_tracepoint): Default the tracepoint's type to trap
17093 tracepoint, and orig_size to -1.
17094 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17095 internal variables.
17096 (create_trace_state_variable): New parameter `gdb'. Handle it.
17097 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17098 (cmd_qtdp): Handle fast tracepoints.
17099 (cmd_qtdv): Adjust.
17100 (max_jump_pad_size): New.
17101 (gdb_jump_pad_head): New.
17102 (get_jump_space_head): New.
17103 (claim_jump_space): New.
17104 (sort_tracepoints): New.
17105 (MAX_JUMP_SIZE): New.
17106 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17107 IPA.
17108 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17109 support. Upload fast traceframes, and delete internal IPA
17110 breakpoints.
17111 (stop_tracing_handler): New.
17112 (flush_trace_buffer_handler): New.
17113 (cmd_qtstop): Upload fast tracepoints.
17114 (response_tracepoint): Handle fast tracepoints.
17115 (tracepoint_finished_step): Upload fast traceframes. Set the
17116 tracepoint hit context's tracepoint type.
17117 (handle_tracepoint_bkpts): New.
17118 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17119 type. Add comment about fast tracepoints.
17120 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17121 non-existing action_str field.
17122 (get_context_regcache): Handle fast tracepoints.
17123 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17124 to the regcache.
17125 (fast_tracepoint_from_jump_pad_address): New.
17126 (fast_tracepoint_from_ipa_tpoint_address): New.
17127 (collecting_t): New.
17128 (force_unlock_trace_buffer): New.
17129 (fast_tracepoint_collecting): New.
17130 (collecting): New.
17131 (gdb_collect): New.
17132 (write_inferior_data_ptr): New.
17133 (target_tp_heap): New.
17134 (target_malloc): New.
17135 (download_agent_expr): New.
17136 (UALIGN): New.
17137 (download_tracepoints): New.
17138 (download_trace_state_variables): New.
17139 (upload_fast_traceframes): New.
17140 (IPA_FIRST_TRACEFRAME): New.
17141 (IPA_NEXT_TRACEFRAME_1): New.
17142 (IPA_NEXT_TRACEFRAME): New.
17143 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17144 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17145 (gdb_jump_pad_buffer_end): New.
17146 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17147 (initialize_tracepoint): Adjust.
17148 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17149 buffer. Initialize the low module.
17150 * utils.c (PREFIX, TOOLNAME): New.
17151 (malloc_failure): Use PREFIX.
17152 (error): In the IPA, an error causes an exit.
17153 (fatal, warning): Use PREFIX.
17154 (internal_error): Use TOOLNAME.
17155 (NUMCELLS): Increase to 10.
17156 * configure, config.in: Regenerate.
17157
171582010-06-01 Pedro Alves <pedro@codesourcery.com>
17159
17160 * server.c (handle_query) <qSupported>: Do two passes over the
17161 qSupported string to avoid nesting strtok.
17162
171632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17164
17165 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17166 (CDEPS): New.
17167 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17168 -Wl,--dynamic-list.
17169 * configure: Regenerate.
17170 * proc-service.list: New.
17171
171722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17173
17174 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17175 New comment.
17176
171772010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17178
17179 * gdbreplay.c (remote_open): Check error return from socket() call by
17180 its equality to -1 not by it being negative.
17181 * remote-utils.c (remote_open): Likewise.
17182
171832010-05-23 Pedro Alves <pedro@codesourcery.com>
17184
17185 * config.h: Regenerate.
17186
171872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17188
17189 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17190 doesn't provide PTRACE_GET_THREAD_AREA.
17191
171922010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17193
17194 * linux-m68k-low.c: Include <asm/ptrace.h>
17195 (ps_get_thread_area): Implement.
17196
171972010-05-03 Doug Evans <dje@google.com>
17198
17199 * event-loop.c (struct callback_event): New struct.
17200 (callback_list): New global.
17201 (append_callback_event, delete_callback_event): New functions.
17202 (process_callback): New function.
17203 (start_event_loop): Call it.
17204 * remote-utils.c (NOT_SCHEDULED): Define.
17205 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17206 moved out of readchar.
17207 (readchar): Rewrite. Call reschedule before returning.
17208 (reset_readchar): New function.
17209 (remote_close): Call it.
17210 (process_remaining, reschedule): New functions.
17211 * server.h (callback_handler_func): New typedef.
17212 (append_callback_event, delete_callback_event): Declare.
17213
172142010-05-03 Pedro Alves <pedro@codesourcery.com>
17215
17216 * proc-service.c (ps_pglobal_lookup): Use
17217 thread_db_look_up_one_symbol.
17218 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17219 parameter. Use it instead of all_symbols_looked_up.
17220 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17221 field.
17222 (all_symbols_looked_up): Don't declare.
17223 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17224 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17225 field.
17226 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17227 Set all_symbols_looked_up here.
17228 (thread_db_look_up_one_symbol): New.
17229 (thread_db_get_tls_address): Adjust.
17230 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17231 thread_db object on the heap, and tentatively set it in the
17232 process structure.
17233 (thread_db_init): Don't set all_symbols_looked_up here.
17234 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17235
172362010-05-03 Pedro Alves <pedro@codesourcery.com>
17237
17238 * linux-low.c (linux_kill, linux_detach): Adjust.
17239 (status_pending_p_callback): Remove redundant statement. Check
17240 for !TARGET_WAITIKIND_IGNORE, instead of
17241 TARGET_WAITKIND_STOPPED.
17242 (handle_tracepoints): Make sure LWP is locked. Adjust.
17243 (linux_wait_for_event_1): Adjust.
17244 (linux_cancel_breakpoints): New.
17245 (unsuspend_one_lwp): New.
17246 (unsuspend_all_lwps): New.
17247 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17248 (send_sigstop_callback): Change return type to int, add new
17249 `except' parameter and handle it.
17250 (suspend_and_send_sigstop_callback): New.
17251 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17252 pass them down. If SUSPEND, also increment the lwp's suspend
17253 count.
17254 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17255 (need_step_over_p): Don't consider suspended LWPs.
17256 (start_step_over): Adjust.
17257 (proceed_one_lwp): Change return type to int, add new `except'
17258 parameter and handle it.
17259 (unsuspend_and_proceed_one_lwp): New.
17260 (proceed_all_lwps): Use find_inferior instead of
17261 for_each_inferior.
17262 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17263 also decrement the suspend count of LWPs. Pass `except' down,
17264 instead of hacking its suspend count.
17265 (linux_pause_all): Add `freeze' parameter. Adjust.
17266 (linux_unpause_all): New.
17267 (linux_target_ops): Install linux_unpause_all.
17268 * server.c (handle_status): Adjust.
17269 * target.h (struct target_ops): New fields `unpause_all' and
17270 `cancel_breakpoints'. Add new parameter to `pause_all'.
17271 (pause_all): Add new `freeze' parameter.
17272 (unpause_all): New.
17273 (cancel_breakpoints): New.
17274 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17275 cancel breakpoints.
17276 (cmd_qtstart): Pause threads.
17277 (stop_tracing): Pause threads, and cancel breakpoints.
17278 * win32-low.c (win32_target_ops): Adjust.
17279
172802010-05-03 Pedro Alves <pedro@codesourcery.com>
17281
17282 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17283 the inferior right away from here...
17284 (linux_wait_1): ... to here, and adjust to check the thread's
17285 last_resume_kind instead of the lwp's step or stop_expected flags.
17286
172872010-05-02 Pedro Alves <pedro@codesourcery.com>
17288
17289 * README: Use consistent `GDB' and `GDBserver' spellings.
17290
172912010-05-02 Pedro Alves <pedro@codesourcery.com>
17292
17293 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17294 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17295 (linux_detach_one_lwp): Assume the lwp is stopped.
17296 (any_thread_of): Delete.
17297 (linux_detach): Stop all lwps here. Don't blindly delete all
17298 breakpoints.
17299 (delete_lwp_callback): New.
17300 (linux_mourn): Delete all lwps of the process that is gone.
17301 (linux_wait_1): Don't delete the last lwp of the process here.
17302 * mem-break.h (mark_breakpoints_out): Declare.
17303 * mem-break.c (mark_breakpoints_out): New.
17304 (free_all_breakpoints): Use it.
17305 * server.c (handle_target_event): If the process is gone, mark
17306 breakpoints out.
17307 * thread-db.c (struct thread_db) <create_bp>: New field.
17308 (thread_db_enable_reporting): Fix prototype. Store a thread event
17309 breakpoint reference in the thread_db struct.
17310 (thread_db_load_search): Clear the thread_db object.
17311 (try_thread_db_load_1): Ditto.
17312 (switch_to_process): New.
17313 (disable_thread_event_reporting): Use it.
17314 (remove_thread_event_breakpoints): New.
17315 (thread_db_detach, thread_db_mourn): Use it.
17316
173172010-05-01 Pedro Alves <pedro@codesourcery.com>
17318
17319 * linux-low.c (linux_enable_event_reporting): New.
17320 (linux_wait_for_event_1, handle_extended_wait): Use it.
17321
173222010-04-30 Pedro Alves <pedro@codesourcery.com>
17323
17324 * linux-low.c (linux_kill_one_lwp, linux_kill)
17325 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17326 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17327 SIGSTOP even if the LWP is stopped.
17328 (send_sigstop_callback): New.
17329 (stop_all_lwps): Use send_sigstop_callback instead.
17330 (linux_resume_one_thread): Adjust.
17331 (proceed_one_lwp): Still proceed an LWP that the client has
17332 requested to stop, if we haven't reported it as stopped yet. Make
17333 sure that LWPs the client want stopped, have a pending SIGSTOP.
17334
173352010-04-26 Doug Evans <dje@google.com>
17336
17337 * server.c (handle_general_set): Make static.
17338
17339 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17340 Print received char after testing for error/eof instead of before.
17341 (input_interrupt): Tweak comment.
17342
173432010-04-23 Doug Evans <dje@google.com>
17344
17345 * server.c (start_inferior): Print inferior argv if --debug.
17346
173472010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17348
17349 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17350 * nto-x86-low.c: Include server.h
17351
173522010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17353
17354 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17355 be consistent with other sources of this directory.
17356 (init_registers_amd64): Correct name of source file of this function
17357 in the comment.
17358
173592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17360
17361 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17362 64-bit executables.
17363
173642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17365
17366 * win32-i386-low.c: Add 64-bit support.
17367 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17368 (init_registers_amd64): Declare.
17369 (mappings): Add 64-bit version of array.
17370 (init_windows_x86): New function.
17371 (the_low_target): Change init_arch field to init_windows_x86.
17372
173732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17374
17375 * win32-low.c: Adapt to support also 64-bit architecture.
17376 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17377 (get_image_name): Use SIZE_T type for local variable `done'.
17378 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17379 (toolhelp_get_dll_name): Idem.
17380 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17381 Use uintptr_t typecast to avoid warning.
17382 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17383 (handle_exception): Use phex_nz to avoid warning.
17384 (win32_wait): Remove unused local variable `process'.
17385
173862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17387
17388 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17389 `amd64-avx.o'.
17390
173912010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17392
17393 * configure.ac: Use `ws2_32' library for srv_mingw.
17394 * configure: Regenerate.
17395 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17396 * remote-utils.c: Likewise.
17397
173982010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17399
17400 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17401 if __x86_64__ is defined.
17402
174032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17404
17405 * configure: Regenerate.
17406
174072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17408
17409 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17410 * target.h (target_ops): New get_tib_address field.
17411 * win32-low.h (win32_thread_info): Add thread_local_base field.
17412 * win32-low.c (child_add_thread): Add tlb argument.
17413 Set thread_local_base field to TLB.
17414 (get_child_debug_event): Adapt to child_add_thread change.
17415 (win32_get_tib_address): New function.
17416 (win32_target_ops): Set get_tib_address field to
17417 win32_get_tib_address.
17418 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17419
174202010-04-12 Pedro Alves <pedro@codesourcery.com>
17421
17422 * linux-low.c (linux_mourn): Also remove the process.
17423 * server.c (handle_target_event): Don't remove the process here.
17424 * nto-low.c (nto_mourn): New.
17425 (nto_target_ops): Install it.
17426 * spu-low.c (spu_mourn): New.
17427 (spu_target_ops): Install it.
17428 * win32-low.c (win32_mourn): New.
17429 (win32_target_ops): Install it.
17430
174312010-04-12 Pedro Alves <pedro@codesourcery.com>
17432
17433 * server.h (buffer_xml_printf): Remove redundant `;'.
17434
174352010-04-12 Pedro Alves <pedro@codesourcery.com>
17436
17437 * regcache.c (set_register_cache): Invalidate regcaches before
17438 changing the register cache layout.
17439 (regcache_invalidate_one): Allow a NULL regcache.
17440 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17441 regcaches before changing the register cache layout or the target
17442 regsets.
17443
174442010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17445
17446 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17447 variable warning on Linux/x86-64.
17448
174492010-04-11 Pedro Alves <pedro@codesourcery.com>
17450
17451 GDBserver disconnected tracing support.
17452
17453 * linux-low.c (linux_remove_process): Delete.
17454 (add_lwp): Don't set last_resume_kind here.
17455 (linux_kill): Use `mourn'.
17456 (linux_detach): Use `thread_db_detach', and `mourn'.
17457 (linux_mourn): New.
17458 (linux_attach_lwp_1): Adjust comment.
17459 (linux_attach): last_resume_kind moved the thread_info; adjust.
17460 (status_pending_p_callback): Adjust.
17461 (linux_wait_for_event_1): Adjust.
17462 (count_events_callback, select_singlestep_lwp_callback)
17463 (select_event_lwp_callback, cancel_breakpoints_callback)
17464 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17465 (proceed_one_lwp): Adjust.
17466 (linux_async): Add debug output.
17467 (linux_thread_stopped): New.
17468 (linux_pause_all): New.
17469 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17470 linux_pause_all.
17471 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17472 (thread_db_free): Delete declaration.
17473 (thread_db_detach, thread_db_mourn): Declare.
17474 * thread-db.c (thread_db_init): Use thread_db_mourn.
17475 (thread_db_free): Delete, split in two.
17476 (disable_thread_event_reporting): New.
17477 (thread_db_detach): New.
17478 (thread_db_mourn): New.
17479
17480 * server.h (struct thread_info) <last_resume_kind>: New field.
17481 <attached>: Add comment.
17482 <gdb_detached>: New field.
17483 (handler_func): Change return type to int.
17484 (handle_serial_event, handle_target_event): Ditto.
17485 (gdb_connected): Declare.
17486 (tracing): Delete.
17487 (disconnected_tracing): Declare.
17488 (stop_tracing): Declare.
17489
17490 * server.c (handle_query) <qSupported>: Report support for
17491 disconnected tracing.
17492 (queue_stop_reply_callback): Account for running threads.
17493 (gdb_wants_thread_stopped): New.
17494 (gdb_wants_all_threads_stopped): New.
17495 (gdb_reattached_process): New.
17496 (handle_status): Clear the `gdb_detached' flag of all processes.
17497 In all-stop, stop all threads.
17498 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17499 (process_serial_event): If the remote connection breaks, or if an
17500 exit was forced with "monitor exit", force an event loop exit.
17501 Handle disconnected tracing on detach.
17502 (handle_serial_event): Adjust.
17503 (handle_target_event): If GDB isn't connected, forward events back
17504 to the inferior, unless the last process exited, in which case,
17505 exit gdbserver. Adjust interface.
17506
17507 * remote-utils.c (remote_open): Don't block in accept. Instead
17508 register an event loop source on the listen socket file
17509 descriptor. Refactor bits into ...
17510 (listen_desc): ... this new global.
17511 (gdb_connected): ... this new function.
17512 (enable_async_notification): ... this new function.
17513 (handle_accept_event): ... this new function.
17514 (remote_close): Clear remote_desc.
17515
17516 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17517
17518 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17519 New fields.
17520 (mourn_inferior): Define.
17521 (target_process_qsupported): Avoid the dangling else problem.
17522 (thread_stopped): Define.
17523 (pause_all): Define.
17524 (target_waitstatus_to_string): Declare.
17525 * target.c (target_waitstatus_to_string): New.
17526
17527 * tracepoint.c (tracing): Make extern.
17528 (disconnected_tracing): New.
17529 (stop_tracing): Make extern. Handle tracing stops due to GDB
17530 disconnecting.
17531 (cmd_qtdisconnected): New.
17532 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17533 (handle_tracepoint_general_set): Handle QTDisconnected.
17534
17535 * event-loop.c (event_handler_func): Change return type to int.
17536 (process_event): Bail out if the event handler wants the event
17537 loop to stop.
17538 (handle_file_event): Ditto.
17539 (start_event_loop): Bail out if the event handler wants the event
17540 loop to stop.
17541
17542 * nto-low.c (nto_target_ops): Adjust.
17543 * spu-low.c (spu_wait): Don't remove the process here.
17544 (spu_target_ops): Adjust.
17545 * win32-low.c (win32_wait): Don't remove the process here.
17546 (win32_target_ops): Adjust.
17547
175482010-04-11 Pedro Alves <pedro@codesourcery.com>
17549
17550 * regcache.c (realloc_register_cache): Invalidate inferior's
17551 regcache before recreating it.
17552
175532010-04-09 Pedro Alves <pedro@codesourcery.com>
17554
17555 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17556
175572010-04-09 Stan Shebs <stan@codesourcery.com>
17558 Pedro Alves <pedro@codesourcery.com>
17559
17560 * server.h (LONGEST): New.
17561 (struct thread_info) <while_stepping>: New field.
17562 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17563 Declare.
17564 (initialize_tracepoint, handle_tracepoint_general_set)
17565 (handle_tracepoint_query, tracepoint_finished_step)
17566 (tracepoint_was_hit, release_while_stepping_state_list):
17567 (current_traceframe): Declare.
17568 * server.c (handle_general_set): Handle tracepoint packets.
17569 (read_memory): New.
17570 (write_memory): New.
17571 (handle_search_memory_1): Use read_memory.
17572 (handle_query): Report support for conditional tracepoints, trace
17573 state variables, and tracepoint sources. Handle tracepoint
17574 queries.
17575 (main): Initialize the tracepoints module.
17576 (process_serial_event): Handle traceframe reads/writes.
17577
17578 * linux-low.c (handle_tracepoints): New.
17579 (linux_wait_1): Call it.
17580 (linux_resume_one_lwp): Handle while-stepping.
17581 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17582 (linux_target_ops): Install them.
17583 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17584 New field.
17585 * linux-x86-low.c (x86_supports_tracepoints): New.
17586 (the_low_target). Install it.
17587
17588 * mem-break.h (delete_breakpoint): Declare.
17589 * mem-break.c (delete_breakpoint): Make external.
17590
17591 * target.h (struct target_ops): Add `supports_tracepoints',
17592 `read_pc', and `write_pc' fields.
17593 (target_supports_tracepoints): Define.
17594 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17595 (phex_nz): New.
17596
17597 * regcache.h (struct regcache) <registers_owned>: New field.
17598 (init_register_cache, regcache_cpy): Declare.
17599 (regcache_read_pc, regcache_write_pc): Declare.
17600 (register_cache_size): Declare.
17601 (supply_regblock): Declare.
17602 * regcache.c (init_register_cache): New.
17603 (new_register_cache): Use it.
17604 (regcache_cpy): New.
17605 (register_cache_size): New.
17606 (supply_regblock): New.
17607 (regcache_read_pc, regcache_write_pc): New.
17608
17609 * tracepoint.c: New.
17610
17611 * Makefile.in (OBS): Add tracepoint.o.
17612 (tracepoint.o): New rule.
17613
176142010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17615
17616 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17617 (i386-mmx.o): New.
17618 (i386-mmx.c): Likewise.
17619 (i386-mmx-linux.o): Likewise.
17620 (i386-mmx-linux.c): Likewise.
17621
17622 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17623 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17624 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17625 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17626
17627 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17628 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17629 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17630
176312010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17632
17633 * Makefile.in (clean): Updated.
17634 (i386-avx.o): New.
17635 (i386-avx.c): Likewise.
17636 (i386-avx-linux.o): Likewise.
17637 (i386-avx-linux.c): Likewise.
17638 (amd64-avx.o): Likewise.
17639 (amd64-avx.c): Likewise.
17640 (amd64-avx-linux.o): Likewise.
17641 (amd64-avx-linux.c): Likewise.
17642
17643 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17644 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17645 (srv_amd64_regobj): Add amd64-avx.o.
17646 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17647 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17648 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17649 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17650 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17651 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17652 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17653
17654 * i387-fp.c: Include "i386-xstate.h".
17655 (i387_xsave): New.
17656 (i387_cache_to_xsave): Likewise.
17657 (i387_xsave_to_cache): Likewise.
17658 (x86_xcr0): Likewise.
17659
17660 * i387-fp.h (i387_cache_to_xsave): Likewise.
17661 (i387_xsave_to_cache): Likewise.
17662 (x86_xcr0): Likewise.
17663
17664 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17665 * linux-crisv32-low.c (target_regsets): Likewise.
17666 * linux-m68k-low.c (target_regsets): Likewise.
17667 * linux-mips-low.c (target_regsets): Likewise.
17668 * linux-ppc-low.c (target_regsets): Likewise.
17669 * linux-s390-low.c (target_regsets): Likewise.
17670 * linux-sh-low.c (target_regsets): Likewise.
17671 * linux-sparc-low.c (target_regsets): Likewise.
17672 * linux-xtensa-low.c (target_regsets): Likewise.
17673
17674 * linux-low.c: Include <sys/uio.h>.
17675 (regsets_fetch_inferior_registers): Support nt_type.
17676 (regsets_store_inferior_registers): Likewise.
17677 (linux_process_qsupported): New.
17678 (linux_target_ops): Add linux_process_qsupported.
17679
17680 * linux-low.h (regset_info): Add nt_type.
17681 (linux_target_ops): Add process_qsupported.
17682
17683 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17684 and <sys/uio.h>.
17685 (init_registers_i386_avx_linux): New.
17686 (init_registers_amd64_avx_linux): Likewise.
17687 (xmltarget_i386_linux_no_xml): Likewise.
17688 (xmltarget_amd64_linux_no_xml): Likewise.
17689 (PTRACE_GETREGSET): Likewise.
17690 (PTRACE_SETREGSET): Likewise.
17691 (x86_fill_xstateregset): Likewise.
17692 (x86_store_xstateregset): Likewise.
17693 (use_xml): Likewise.
17694 (x86_linux_update_xmltarget): Likewise.
17695 (x86_linux_process_qsupported): Likewise.
17696 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17697 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17698 init_registers_i386_linux here. Call
17699 x86_linux_update_xmltarget.
17700 (the_low_target): Add x86_linux_process_qsupported.
17701
17702 * server.c (handle_query): Call target_process_qsupported.
17703
17704 * target.h (target_ops): Add process_qsupported.
17705 (target_process_qsupported): New.
17706
177072010-04-03 Pedro Alves <pedro@codesourcery.com>
17708
17709 * inferiors.c (add_thread): Set last_status kind to
17710 TARGET_WAITKIND_IGNORE.
17711 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17712 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17713 (linux_wait_1): Move `thread' local definition to block that uses
17714 it. Don't NULL initialize `event_child'.
17715 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17716 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17717 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17718
177192010-04-01 Pedro Alves <pedro@codesourcery.com>
17720
17721 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17722 an extended waitstatus, or by a watchpoint.
17723 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17724 thread was stepping or has been stopped by a watchpoint.
17725
177262010-04-01 Pedro Alves <pedro@codesourcery.com>
17727
17728 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17729 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17730 of another, then delete the previous, and validate all
17731 breakpoints.
17732 (validate_inserted_breakpoint): New.
17733 (delete_disabled_breakpoints): New.
17734 (validate_breakpoints): New.
17735 (check_mem_read): Validate breakpoints before trusting their
17736 shadow. Delete disabled breakpoints.
17737 (check_mem_write): Validate breakpoints before trusting they
17738 should be inserted. Delete disabled breakpoints.
17739 * mem-break.h (validate_breakpoints):
17740 * server.c (handle_query): Validate breakpoints when we see a
17741 qSymbol query.
17742
177432010-04-01 Pedro Alves <pedro@codesourcery.com>
17744
17745 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17746 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17747 if we could tell there's a GDB breakpoint at stop_pc.
17748 (need_step_over_p): Don't do a step over if we find a GDB
17749 breakpoint at the resume PC.
17750
17751 * mem-break.c (struct raw_breakpoint): New.
17752 (enum bkpt_type): New type `gdb_breakpoint'.
17753 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17754 fields. New field `raw'.
17755 (find_raw_breakpoint_at): New.
17756 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17757 breakpoint instead.
17758 (set_breakpoint_at): Adjust.
17759 (delete_raw_breakpoint): New.
17760 (release_breakpoint): New.
17761 (delete_breakpoint): Rename to...
17762 (delete_breakpoint_1): ... this. Add proc parameter. Use
17763 release_breakpoint. Return ENOENT.
17764 (delete_breakpoint): Reimplement.
17765 (find_breakpoint_at): Delete.
17766 (find_gdb_breakpoint_at): New.
17767 (delete_breakpoint_at): Delete.
17768 (set_gdb_breakpoint_at): New.
17769 (delete_gdb_breakpoint_at): New.
17770 (gdb_breakpoint_here): New.
17771 (set_reinsert_breakpoint): Use release_breakpoint.
17772 (uninsert_breakpoint): Rename to ...
17773 (uninsert_raw_breakpoint): ... this.
17774 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17775 (reinsert_raw_breakpoint): Change parameter type to
17776 raw_breakpoint.
17777 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17778 instead.
17779 (check_breakpoints): Adjust. Use release_breakpoint.
17780 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17781 (breakpoint_inserted_here): Ditto.
17782 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17783 Don't trust the breakpoint's shadow if it is not inserted.
17784 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17785 (delete_all_breakpoints): Adjust.
17786 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17787 use delete_breakpoint_1.
17788
17789 * mem-break.h (breakpoints_supported): Delete declaration.
17790 (set_gdb_breakpoint_at): Declare.
17791 (gdb_breakpoint_here): Declare.
17792 (delete_breakpoint_at): Delete.
17793 (delete_gdb_breakpoint_at): Declare.
17794
17795 * server.h (struct raw_breakpoint): Forward declare.
17796 (struct process_info): New field `raw_breakpoints'.
17797
17798 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17799 breakpoints.
17800
178012010-03-24 Pedro Alves <pedro@codesourcery.com>
17802
17803 * linux-low.c (status_pending_p_callback): Fix comment.
17804 (linux_wait_for_event_1): Move most of the internal breakpoint
17805 handling from here...
17806 (linux_wait_1): ... to here.
17807 (count_events_callback): New.
17808 (select_singlestep_lwp_callback): New.
17809 (select_event_lwp_callback): New.
17810 (cancel_breakpoints_callback): New.
17811 (select_event_lwp): New.
17812 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17813 priority to all LWPs that have had events that should be reported
17814 to the client. Cancel breakpoints when about to reporting the
17815 event to the client, not while stopping lwps. No longer cancel
17816 finished single-steps here.
17817 (cancel_finished_single_step): Delete.
17818 (cancel_finished_single_steps): Delete.
17819
178202010-03-24 Pedro Alves <pedro@codesourcery.com>
17821
17822 * mem-break.c (enum bkpt_type): New.
17823 (struct breakpoint): New field `type'.
17824 (set_breakpoint_at): Change return type to struct breakpoint
17825 pointer. Set type to `other_breakpoint' by default.
17826 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17827 in the breakpoint list.
17828 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17829 (reinsert_breakpoint): Rename to ...
17830 (reinsert_raw_breakpoint): ... this.
17831 (reinsert_breakpoints_at): Adjust.
17832 * mem-break.h (struct breakpoint): Declare.
17833 (set_breakpoint_at): Change return type to struct breakpoint
17834 pointer.
17835
178362010-03-24 Pedro Alves <pedro@codesourcery.com>
17837
17838 * server.c (handle_query): Assign, not compare.
17839
178402010-03-24 Pedro Alves <pedro@codesourcery.com>
17841
17842 Teach linux gdbserver to step-over-breakpoints.
17843
17844 * linux-low.c (can_hardware_single_step): New.
17845 (supports_breakpoints): New.
17846 (handle_extended_wait): If stopping threads, read the stop pc of
17847 the new cloned LWP.
17848 (get_pc): New.
17849 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17850 low target doesn't support retrieving the PC.
17851 (add_lwp): Set last_resume_kind to resume_continue.
17852 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17853 (linux_attach): Don't clear stop_expected. Set the lwp's
17854 last_resume_kind to resume_stop.
17855 (linux_detach_one_lwp): Don't check for removed breakpoints.
17856 (check_removed_breakpoint): Delete.
17857 (status_pending_p): Rename to ...
17858 (status_pending_p_callback): ... this. Don't check for removed
17859 breakpoints. Don't consider threads that are stopped from GDB's
17860 perspective.
17861 (linux_wait_for_lwp): Always read the stop_pc here.
17862 (cancel_breakpoint): New.
17863 (step_over_bkpt): New global.
17864 (linux_wait_for_event_1): Implement stepping over breakpoints.
17865 (gdb_wants_lwp_stopped): New.
17866 (gdb_wants_all_stopped): New.
17867 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17868 single-step traps here. Store the thread's last reported target
17869 wait status.
17870 (send_sigstop): Don't clear stop_expected. Always set it,
17871 instead.
17872 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17873 (cancel_finished_single_step): New.
17874 (cancel_finished_single_steps): New.
17875 (wait_for_sigstop): Don't cancel finished single-step traps here.
17876 (linux_resume_one_lwp): Don't check for removed breakpoints.
17877 Don't set `step' on non-hardware step archs.
17878 (linux_set_resume_request): Ignore resume_stop requests if already
17879 stopping or stopped. Set the lwp's last_resume_kind.
17880 (resume_status_pending_p): Don't check for removed breakpoints.
17881 (need_step_over_p): New.
17882 (start_step_over): New.
17883 (finish_step_over): New.
17884 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17885 requests. Clear the thread's last reported target waitstatus.
17886 Don't use the `suspended' flag. Don't consider pending breakpoints.
17887 (linux_resume): Start a step-over if necessary.
17888 (proceed_one_lwp): New.
17889 (proceed_all_lwps): New.
17890 (unstop_all_lwps): New.
17891 * linux-low.h (struct lwp_info): Rewrite comment for the
17892 `suspended' flag. Add the `stop_pc' field. Delete the
17893 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17894 Add `'last_resume_kind' and `need_step_over' fields.
17895 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17896 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17897 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17898 (set_raw_breakpoint_at): New.
17899 (set_breakpoint_at): Rewrite to use it.
17900 (reinsert_breakpoint_handler): Delete.
17901 (set_reinsert_breakpoint): New.
17902 (reinsert_breakpoint_by_bp): Delete.
17903 (delete_reinsert_breakpoints): New.
17904 (uninsert_breakpoint): Rewrite.
17905 (uninsert_breakpoints_at): New.
17906 (reinsert_breakpoint): Rewrite.
17907 (reinsert_breakpoints_at): New.
17908 (check_breakpoints): Rewrite.
17909 (breakpoint_here): New.
17910 (breakpoint_inserted_here): New.
17911 (check_mem_read): Adjust.
17912 * mem-break.h (breakpoints_supported, breakpoint_here)
17913 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17914 (reinsert_breakpoint_by_bp): Delete declaration.
17915 (delete_reinsert_breakpoints): Declare.
17916 (reinsert_breakpoint): Delete declaration.
17917 (reinsert_breakpoints_at): Declare.
17918 (uninsert_breakpoint): Delete declaration.
17919 (uninsert_breakpoints_at): Declare.
17920 (check_breakpoints): Adjust prototype.
17921 * server.h: Adjust include order.
17922 (struct thread_info): Declare here. Add a `last_status' field.
17923
179242010-03-23 Michael Snyder <msnyder@vmware.com>
17925
17926 * server.c (crc32): New function.
17927 (handle_query): Add handling for 'qCRC:' request.
17928
179292010-03-23 Pedro Alves <pedro@codesourcery.com>
17930
17931 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17932 lwp had been stopped by a watchpoint.
17933
179342010-03-16 Pedro Alves <pedro@codesourcery.com>
17935
17936 * server.h (internal_error): Declare.
17937 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17938 * utils.c (internal_error): New function.
17939
179402010-03-15 Andreas Schwab <schwab@redhat.com>
17941
17942 * configure.srv: Fix typo setting srv_regobj.
17943
179442010-03-15 Pedro Alves <pedro@codesourcery.com>
17945
17946 * linux-low.c (fetch_register): Avoid passing a non string literal
17947 format to `error'.
17948 (usr_store_inferior_registers): Ditto.
17949
179502010-03-14 Pedro Alves <pedro@codesourcery.com>
17951
17952 * linux-low.c (linux_write_memory): Bail out early if peeking
17953 memory failed.
17954
179552010-03-14 Pedro Alves <pedro@codesourcery.com>
17956
17957 * linux-low.h (struct lwp_info): New fields
17958 `stopped_by_watchpoint' and `stopped_data_address'.
17959 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17960 here, and cache them in the lwp object.
17961 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17962 directly.
17963 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17964 field.
17965 (linux_stopped_by_watchpoint): Rewrite.
17966 (linux_stopped_data_address): Rewrite.
17967
179682010-03-06 Simo Melenius <simo.melenius@iki.fi>
17969
17970 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17971 switching the current inferior, not before.
17972
179732010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17974
17975 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17976 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17977 i386-linux.c and amd64-linux.c.
17978 (reg-i386.o): Removed.
17979 (reg-i386.c): Likewise.
17980 (reg-i386-linux.o): Likewise.
17981 (reg-i386-linux.c): Likewise.
17982 (reg-x86-64.o): Likewise.
17983 (reg-x86-64.c): Likewise.
17984 (reg-x86-64-linux.o): Likewise.
17985 (reg-x86-64-linux.c): Likewise.
17986 (i386.o): New.
17987 (i386.c): Likewise.
17988 (i386-linux.o): Likewise.
17989 (i386-linux.c): Likewise.
17990 (amd64.o): Likewise.
17991 (amd64.c): Likewise.
17992 (amd64-linux.o): Likewise.
17993 (amd64-linux.c): Likewise.
17994
17995 * configure.srv (srv_i386_regobj): New.
17996 (srv_i386_linux_regobj): Likewise.
17997 (srv_amd64_regobj): Likewise.
17998 (srv_amd64_linux_regobj): Likewise.
17999 (srv_i386_32bit_xmlfiles): Likewise.
18000 (srv_i386_64bit_xmlfiles): Likewise.
18001 (srv_i386_xmlfiles): Likewise.
18002 (srv_amd64_xmlfiles): Likewise.
18003 (srv_i386_linux_xmlfiles): Likewise.
18004 (srv_amd64_linux_xmlfiles): Likewise.
18005 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18006 srv_xmlfiles to $srv_i386_xmlfiles.
18007 (i[34567]86-*-mingw32ce*): Likewise.
18008 (i[34567]86-*-mingw*): Likewise.
18009 (i[34567]86-*-nto*): Likewise.
18010 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18011 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18012 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18013 (x86_64-*-linux*): Likewise.
18014
18015 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18016 (init_registers_amd64_linux): New.
18017 (x86_arch_setup): Replace init_registers_x86_64_linux with
18018 init_registers_amd64_linux.
18019
180202010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18021
18022 * configure.ac: Check for libdl. If it is not available link against
18023 static libthread_db.
18024 * configure: Regenerate.
18025
180262010-02-22 Pedro Alves <pedro@codesourcery.com>
18027
18028 PR9605
18029
18030 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18031 handing a read watchpoint.
18032 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18033
180342010-02-12 Doug Evans <dje@google.com>
18035
18036 * linux-low.c (linux_supports_tracefork_flag): Document.
18037 (linux_look_up_symbols): Add comment.
18038
180392010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18040
18041 * regcache.c (supply_register): Clear regcache if buf is NULL.
18042
180432010-02-02 Nicolas Roche <roche@sourceware.org>
18044 Joel Brobecker <brobecker@adacore.com>
18045
18046 * inferiors.c (find_inferior): Add function documentation.
18047 (unloaded_dll): Handle the case where the unloaded dll has not
18048 been previously registered in the dll list.
18049
180502010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18051
18052 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18053 (thumb2_breakpoint): New.
18054 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18055
180562010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18057
18058 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18059 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18060 breakpoints.
18061
180622010-01-21 Pedro Alves <pedro@codesourcery.com>
18063
18064 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18065
180662010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18067
18068 * linux-s390-low.c (s390_collect_ptrace_register)
18069 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18070
180712010-01-21 Doug Evans <dje@google.com>
18072
18073 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18074 (PTRACE_ARG4_TYPE): New macro.
18075 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18076 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18077 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18078 (usr_store_inferior_registers): Ditto.
18079 (linux_read_memory, linux_write_memory): Ditto.
18080 (linux_test_for_tracefork): Ditto.
18081
18082 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18083 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18084
180852010-01-21 Pedro Alves <pedro@codesourcery.com>
18086
18087 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18088 target.
18089
180902010-01-21 Pedro Alves <pedro@codesourcery.com>
18091
18092 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18093 prototype to take a regcache. Adjust.
18094
180952010-01-20 Pedro Alves <pedro@codesourcery.com>
18096
18097 * regcache.h (struct thread_info): Forward declare.
18098 (struct regcache): New.
18099 (new_register_cache): Adjust prototype.
18100 (get_thread_regcache): Declare.
18101 (free_register_cache): Adjust prototype.
18102 (registers_to_string, registers_from_string): Ditto.
18103 (supply_register, supply_register_by_name, collect_register)
18104 (collect_register_as_string, collect_register_by_name): Ditto.
18105 * regcache.c (struct inferior_regcache_data): Delete.
18106 (get_regcache): Rename to ...
18107 (get_thread_regcache): ... this. Adjust. Switch inferior before
18108 fetching registers.
18109 (regcache_invalidate_one): Adjust.
18110 (regcache_invalidate): Fix prototype.
18111 (new_register_cache): Return the new register cache.
18112 (free_register_cache): Change prototype.
18113 (realloc_register_cache): Adjust.
18114 (registers_to_string): Change prototype to take a regcache. Adjust.
18115 (registers_from_string): Ditto.
18116 (register_data): Ditto.
18117 (supply_register): Ditto.
18118 (supply_register_by_name): Ditto.
18119 (collect_register): Ditto.
18120 (collect_register_as_string): Ditto.
18121 (collect_register_by_name): Ditto.
18122 * server.c (process_serial_event): Adjust.
18123 * linux-low.h (regset_fill_func, regset_store_func): Change
18124 prototype.
18125 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18126 Change prototype.
18127 * linux-low.c (get_stop_pc): Adjust.
18128 (check_removed_breakpoint): Adjust.
18129 (linux_wait_for_event): Adjust.
18130 (linux_resume_one_lwp): Adjust.
18131 (fetch_register): Add regcache parameter. Adjust.
18132 (usr_store_inferior_registers): Ditto.
18133 (regsets_fetch_inferior_registers): Ditto.
18134 (regsets_store_inferior_registers): Ditto.
18135 (linux_fetch_registers, linux_store_registers): Ditto.
18136 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18137 regcache. Adjust.
18138 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18139 Ditto.
18140 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18141 prototype to take a regcache.
18142 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18143 * remote-utils.c (convert_ascii_to_int, outreg)
18144 (prepare_resume_reply): Change prototype to take a regcache.
18145 Adjust.
18146 * target.h (struct target_ops) <fetch_registers, store_registers>:
18147 Change prototype to take a regcache.
18148 (fetch_inferior_registers, store_inferior_registers): Change
18149 prototype to take a regcache. Adjust.
18150 * proc-service.c (ps_lgetregs): Adjust.
18151 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18152 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18153 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18154 take a regcache. Adjust.
18155 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18156 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18157 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18158 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18159 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18160 (cris_cannot_fetch_register):
18161 (cris_breakpoint_at): Change prototype to take a regcache.
18162 Adjust.
18163 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18164 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18165 to take a regcache. Adjust.
18166 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18167 Adjust.
18168 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18169 take a regcache. Adjust.
18170 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18171 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18172 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18173 * linux-mips-low.c (mips_get_pc):
18174 (mips_set_pc): Change prototype to take a regcache. Adjust.
18175 (mips_reinsert_addr): Adjust.
18176 (mips_collect_register): Change prototype to take a regcache.
18177 Adjust.
18178 (mips_supply_register):
18179 (mips_collect_register_32bit, mips_supply_register_32bit)
18180 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18181 (mips_store_fpregset): Ditto.
18182 * linux-ppc-low.c (ppc_supply_ptrace_register)
18183 (ppc_supply_ptrace_register): Ditto.
18184 (parse_spufs_run): Adjust.
18185 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18186 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18187 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18188 take a regcache. Adjust.
18189 * linux-s390-low.c (s390_collect_ptrace_register)
18190 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18191 (s390_set_pc): Change prototype to take a regcache. Adjust.
18192 (s390_arch_setup): Adjust.
18193 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18194 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18195 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18196 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18197 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18198 regcache. Adjust.
18199 (sparc_breakpoint_at): Adjust.
18200 * linux-xtensa-low.c (xtensa_fill_gregset):
18201 (xtensa_store_gregset):
18202 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18203 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18204 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18205 prototype to take a regcache. Adjust.
18206 * win32-arm-low.c (arm_fetch_inferior_register)
18207 (arm_store_inferior_register): Change prototype to take a
18208 regcache. Adjust.
18209 * win32-i386-low.c (i386_fetch_inferior_register)
18210 (i386_store_inferior_register): Change prototype to take a
18211 regcache. Adjust.
18212 * win32-low.c (child_fetch_inferior_registers)
18213 (child_store_inferior_registers): Change prototype to take a
18214 regcache. Adjust.
18215 (win32_wait): Adjust.
18216 (win32_fetch_inferior_registers): Change prototype to take a
18217 regcache. Adjust.
18218 (win32_store_inferior_registers): Adjust.
18219 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18220 store_inferior_register>: Change prototype to take a regcache.
18221
182222010-01-20 Doug Evans <dje@google.com>
18223
18224 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18225 #ifdef.
18226 (linux_wait_for_event1, linux_init_signals): Ditto.
18227 (W_STOPCODE): Provide definition if missing.
18228
182292010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18230
18231 * linux-low.c (linux_core_of_thread): New.
18232 (compare_ints, show_process, list_threads): New.
18233 (linux_qxfer_osdata): Report threads and cores.
18234 (linux_target_op): Register linux_core_of_thread.
18235 * remote-utils.c (prepare_resume_reply): Report the core.
18236 (buffer_xml_printf): Support %d specifier.
18237 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18238 New.
18239 (handle_query): Handle qXfer:threads. Announce availability
18240 thereof.
18241 * target.h (struct target_ops): New field core_of_thread.
18242
182432010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18244
18245 * Makefile.in (clean): Remove new generated files.
18246 (reg-s390.o, reg-s390.c): Remove rules.
18247 (reg-s390x.o, reg-s390x.c): Likewise.
18248 (s390-linux32.o, s390-linux32.c): Add rules.
18249 (s390-linux64.o, s390-linux64.c): Likewise.
18250 (s390x-linux64.o, s390x-linux64.c): Likewise.
18251 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18252 * linux-s390-low.c: Include <elf.h>.
18253 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18254 (init_registers_s390): Remove prototype.
18255 (init_registers_s390x): Likewise.
18256 (init_registers_s390_linux32): Add prototype.
18257 (init_registers_s390_linux64): Likewise.
18258 (init_registers_s390x_linux64): Likewise.
18259 (s390_num_regs_3264): New define.
18260 (s390_regmap_3264): New global variable.
18261 (s390_cannot_fetch_register): Remove obsolete check.
18262 (s390_cannot_store_register): Likewise.
18263 (s390_collect_ptrace_register): Handle upper/lower register halves.
18264 (s390_supply_ptrace_register): Likewise.
18265 (s390_fill_gregset): Update to register number changes.
18266 (s390_get_hwcap): New routine.
18267 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18268 Install appropriate regmap and register set.
18269
182702010-01-01 Joel Brobecker <brobecker@adacore.com>
18271
18272 * server.c (gdbserver_version): Update copyright year to 2010.
18273 * gdbreplay.c (gdbreplay_version): Likewise.
18274
182752009-12-28 Doug Evans <dje@google.com>
18276
18277 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18278 elf/external.h. Include <elf.h> instead but only if necessary.
18279
182802009-12-28 Pedro Alves <pedro@codesourcery.com>
18281
18282 * linux-low.c (linux_remove_process): Remove `detaching'
18283 parameter. Don't release/detach from thread_db here.
18284 (linux_kill): Release/detach from thread_db here, ...
18285 (linux_detach): ... and here, before actually detaching.
18286 (linux_wait_1): ... and here, when a process exits.
18287 * thread-db.c (any_thread_of): New.
18288 (thread_db_free): Switch the current inferior to a thread of the
18289 passed in process.
18290
182912009-12-21 Doug Evans <dje@google.com>
18292
18293 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18294
18295 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18296 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18297 warning ifndef __NR_tkill. Move setting of errno there too.
18298 Delete unnecessary resetting of errno after syscall.
18299 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18300
18301 * configure.ac: Check for dladdr.
18302 * config.in: Regenerate.
18303 * configure: Regenerate.
18304 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18305 (try_thread_db_load): Update.
18306
18307 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18308
183092009-12-18 Doug Evans <dje@google.com>
18310
18311 * event-loop.c: Include unistd.h if it exists.
18312
18313 * linux-low.c (my_waitpid): Move definition away from being in
18314 between linux_tracefork_child/linux_test_for_tracefork.
18315
18316 * gdb_proc_service.h (psaddr_t): Fix type.
18317 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18318 signature to match glibc.
18319
183202009-12-16 Doug Evans <dje@google.com>
18321
18322 * linux-low.c (linux_read_memory): Fix argument to read.
18323
183242009-11-26 Pedro Alves <pedro@codesourcery.com>
18325
18326 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18327 events, don't leave current_inferior pointing at null.
18328
183292009-11-26 Pedro Alves <pedro@codesourcery.com>
18330
18331 * win32-low.c (LOG): Delete.
18332 (OUTMSG): Output to stderr.
18333 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18334 on compile time LOG macro.
18335 (win32_wait): Fix debug output.
18336
183372009-11-26 Pedro Alves <pedro@codesourcery.com>
18338
18339 * win32-low.c (win32_add_one_solib): If the dll name is
18340 "ntdll.dll", prepend the system directory to the dll path.
18341
183422009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18343
18344 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18345
183462009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18347 Vladimir Prus <vladimir@codesourcery.com>
18348
18349 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18350 * configure.ac: Check for __mcoldfire__ and set
18351 gdb_cv_m68k_is_coldfire.
18352 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18353 reg-cf.o and reg-m68k.o.
18354 * configure: Regenerated.
18355
183562009-11-16 Pedro Alves <pedro@codesourcery.com>
18357
18358 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18359 Pass it to thread_db_free.
18360 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18361 proper `detaching' argument to linux_remove_process.
18362 * linux-low.h (thread_db_free): Add `detaching' parameter.
18363 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18364 to thread_db_free.
18365 (thread_db_free): Add `detaching' parameter. Only
18366 call td_ta_clear_event if detaching from process.
18367
183682009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18369
18370 * thread-db.c (thread_db_free): Fix typo.
18371
183722009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18373
18374 PR gdb/10838
18375 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18376
183772009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18378
18379 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18380 with an i686 compiler.
18381 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18382 needed.
18383 * configure: Rebuilt.
18384
183852009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18386
18387 PR gdb/10783
18388
18389 * server.c (handle_search_memory_1): Correct read_addr initialization
18390 in loop for searching subsequent chunks.
18391
183922009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18393
18394 * configure.ac: New --with-libthread-db option.
18395 * thread-db.c: Allow direct dependence on libthread_db.
18396 (thread_db_free): Adjust.
18397 * config.in: Regenerate.
18398 * configure: Likewise.
18399
184002009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18401
18402 PR gdb/10757
18403 * thread-db.c (attach_thread): New function.
18404 (maybe_attach_thread): Return success/failure.
18405 (find_new_threads_callback): Adjust.
18406 (thread_db_find_new_threads): Loop until no new threads.
18407
184082009-10-13 Pedro Alves <pedro@codesourcery.com>
18409
18410 * proc-service.c (ps_lgetregs): Formatting.
18411
184122009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18413
18414 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18415 * configure.ac: Adjust.
18416 * linux-low.h (struct process_info_private): Move members to struct
18417 thread_db.
18418 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18419 * linux-low.c (linux_remove_process): Adjust.
18420 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18421 * server.c (handle_query): Move code ...
18422 (handle_monitor_command): ... here. New function.
18423 * target.h (struct target_ops): New member.
18424 * thread-db.c (struct thread_db): New.
18425 (libthread_db_search_path): New variable.
18426 (thread_db_create_event, thread_db_enable_reporting)
18427 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18428 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18429 (try_thread_db_load_1, dladdr_to_soname): New functions.
18430 (try_thread_db_load, thread_db_load_search): New functions.
18431 (thread_db_init): Search for libthread_db.
18432 (thread_db_free): New function.
18433 (thread_db_handle_monitor_command): Likewise.
18434 * config.in: Regenerate.
18435 * configure: Regenerate.
18436
184372009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18438
18439 * spu-low.c (spu_kill): Wait for inferior to terminate.
18440 Call clear_inferiors.
18441 (spu_detach): Call clear_inferiors.
18442
184432009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18444
18445 * aclocal.m4: Regenerate.
18446 * config.in: Likewise.
18447 * configure: Likewise.
18448
184492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18450
18451 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18452 (parse_spufs_run): New function.
18453 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18454 (ppc_breakpoint_at): Handle SPU breakpoints.
18455
184562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18457
18458 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18459 (SPUFS_MAGIC): Define.
18460 (spu_enumerate_spu_ids): New function.
18461 (linux_qxfer_spu): New function.
18462 (linux_target_ops): Install linux_qxfer_spu.
18463
184642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18465
18466 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18467 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18468 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18469 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18470 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18471 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18472 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18473 (init_registers_powerpc_cell32l): Add prototype.
18474 (init_registers_powerpc_cell64l): Likewise.
18475 (ppc_arch_setup): Detect Cell/B.E. architecture.
18476
184772009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18478
18479 * Makefile.in (datarootdir): New variable.
18480
184812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18482
18483 * linux-low.c (linux_write_memory): Update debugging output.
18484 * Makefile.in (clean): Add new descriptions.
18485 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18486 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18487 * configure.srv: Add new files for arm*-*-linux*.
18488 * linux-arm-low.c: Add new declarations.
18489 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18490 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18491 (HWCAP_VFPv3D16): New.
18492 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18493 instead of __IWMMXT__.
18494 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18495 (arm_arch_setup): New.
18496 (target_regsets): Remove #ifdef. Add VFP regset.
18497 (the_low_target): Use arm_arch_setup.
18498
184992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18500
18501 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18502 the main thread again.
18503
185042009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18505
18506 Adding Neutrino gdbserver.
18507 * configure: Regenerated.
18508 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18509 * configure.srv (i[34567]86-*-nto*): New target.
18510 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18511 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18512 (nto_comctrl) [__QNX__]: New function.
18513 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18514
185152009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18516
18517 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18518 srv_tgtobj.
18519
185202009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18521 Pedro Alves <pedro@codesourcery.com>
18522
18523 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18524 don't support CONTEXT_EXTENDED_REGISTERS.
18525 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18526 (the_low_target): Install them.
18527 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18528 failing with ERROR_PIPE_NOT_CONNECTED.
18529
185302009-06-30 Doug Evans <dje@google.com>
18531 Pierre Muller <muller@ics.u-strasbg.fr>
18532
18533 Add h/w watchpoint support to x86-linux, win32-i386.
18534 * Makefile.in (SFILES): Add i386-low.c
18535 (i386_low_h): Define.
18536 (i386-low.o): Add dependencies.
18537 (linux-x86-low.o): Add i386-low.h dependency.
18538 (win32-i386-low.o): Ditto.
18539 * i386-low.c: New file.
18540 * i386-low.h: New file.
18541 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18542 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18543 * linux-low.c (linux_add_process): Initialize arch_private.
18544 (linux_remove_process): Free arch_private.
18545 (add_lwp): Initialize arch_private.
18546 (delete_lwp): Free arch_private.
18547 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18548 provided.
18549 * linux-low.h (process_info_private): New member arch_private.
18550 (lwp_info): New member arch_private.
18551 (linux_target_ops): New members new_process, new_thread,
18552 prepare_to_resume.
18553 (ptid_of): New macro.
18554 * linux-x86-low.c: Include stddef.h, i386-low.h.
18555 (arch_process_info): New struct.
18556 (arch_lwp_info): New struct.
18557 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18558 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18559 (i386_dr_low_get_status): New function.
18560 (x86_insert_point, x86_remove_point): New functions.
18561 (x86_stopped_by_watchpoint): New function.
18562 (x86_stopped_data_address): New function.
18563 (x86_linux_new_process, x86_linux_new_thread): New functions.
18564 (x86_linux_prepare_to_resume): New function.
18565 (the_low_target): Add entries for insert_point, remove_point,
18566 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18567 prepare_to_resume.
18568 * server.c (debug_hw_points): New global.
18569 (monitor_show_help): Document set debug-hw-points.
18570 (handle_query): Process "set debug-hw-points".
18571 * server.h (debug_hw_points): Declare.
18572 (paddress): Declare.
18573 * utils.c (NUMCELLS, CELLSIZE): New macros.
18574 (get_sell, xsnprintf, paddress): New functions.
18575 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18576 remove_point, stopped_by_watchpoint, stopped_data_address.
18577 * win32-i386-low.c: Include i386-low.h.
18578 (debug_reg_state): Replaces dr.
18579 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18580 (i386_dr_low_get_status): New function.
18581 (i386_insert_point, i386_remove_point): New functions.
18582 (i386_stopped_by_watchpoint): New function.
18583 (i386_stopped_data_address): New function.
18584 (i386_initial_stuff): Update.
18585 (get_thread_context,set_thread_context,i386_thread_added): Update.
18586 (the_low_target): Add entries for insert_point,
18587 remove_point, stopped_by_watchpoint, stopped_data_address.
18588 * win32-low.c (win32_insert_watchpoint): New function.
18589 (win32_remove_watchpoint): New function.
18590 (win32_stopped_by_watchpoint): New function.
18591 (win32_stopped_data_address): New function.
18592 (win32_target_ops): Add entries for insert_watchpoint,
18593 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18594 * win32-low.h (win32_target_ops): New members insert_point,
18595 remove_point, stopped_by_watchpoint, stopped_data_address.
18596
185972009-06-25 Pedro Alves <pedro@codesourcery.com>
18598
18599 * server.c (process_serial_event): Re-return unsupported, not
18600 error, if the type isn't recognized. Re-allow supporting only
18601 insert or remove packets. Also call require_running for
18602 breakpoints. Add missing break statement to default case. Tidy.
18603 * target.h (struct target_ops): Rename insert_watchpoint to
18604 insert_point, and remove_watchpoint to remove_point.
18605
18606 * linux-low.h (struct linux_target_ops): Likewise.
18607 * linux-low.c (linux_insert_watchpoint): Rename to ...
18608 (linux_insert_point): ... this. Adjust.
18609 (linux_remove_watchpoint): Rename to ...
18610 (linux_remove_point): ... this. Adjust.
18611 (linux_target_ops): Adjust.
18612 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18613 (cris_insert_point): ... this.
18614 (cris_remove_watchpoint): Rename to ...
18615 (cris_remove_point): ... this.
18616 (the_low_target): Adjust.
18617
186182009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18619
18620 * server.c (handle_v_kill): Pass signal_pid to
18621 kill_inferior if multi_process is zero.
18622
186232009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18624
18625 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18626 * target.h (target_ops): Comment for *_watchpoint to make it clear
18627 the functions can get types '0' and '1'.
18628
186292009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18630
18631 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18632 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18633 * regcache.c (get_regcache): Likewise.
18634 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18635 * win32-low.c (child_fetch_inferior_registers): Remove check for
18636 regno 0.
18637
186382009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18639 Pedro Alves <pedro@codesourcery.com>
18640
18641 * target.h (struct target_ops) <supports_multi_process>: New
18642 callback.
18643 (target_supports_multi_process): New.
18644 * server.c (handle_query): Even if GDB reports support, only
18645 enable multi-process if the target also supports it. Report
18646 multi-process support only if the target backend supports it.
18647 * linux-low.c (linux_supports_multi_process): New function.
18648 (linux_target_ops): Install it as target_supports_multi_process
18649 callback.
18650
186512009-05-24 Doug Evans <dje@google.com>
18652
18653 Global renaming of find_thread_pid to find_thread_ptid.
18654 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18655 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18656 All callers updated.
18657
18658 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18659 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18660 directly.
18661
18662 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18663 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18664 (linux_resume_one_lwp): Ditto.
18665
186662009-05-23 Doug Evans <dje@google.com>
18667
18668 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18669 from struct inferior_list_entry * to struct lwp_info *.
18670 All callers updated.
18671
186722009-05-13 Doug Evans <dje@google.com>
18673
18674 * linux-x86-low.c: Don't include assert.h.
18675 (x86_siginfo_fixup): Use fatal, not assert.
18676 (x86_arch_setup): Fix comment.
18677
186782009-05-12 Doug Evans <dje@google.com>
18679
18680 Biarch support for i386/amd64 gdbserver.
18681 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18682 Add linux-x86-low.c.
18683 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18684 (linux-x86-low.o): Add.
18685 * linux-x86-64-low.c: Delete.
18686 * linux-i386-low.c: Delete.
18687 * linux-x86-low.c: New file.
18688 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18689 linux-x86-low.o.
18690 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18691 linux-x86-low.o.
18692 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18693 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18694 (linux_child_pid_to_exec_file): New function.
18695 (elf_64_header_p, elf_64_file_p): New functions.
18696 (siginfo_fixup): New function.
18697 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18698 give target a chance to convert layout.
18699 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18700 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18701
187022009-05-07 Doug Evans <dje@google.com>
18703
18704 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18705 (regsets_store_inferior_registers): Ditto.
18706
187072009-05-06 Pedro Alves <pedro@codesourcery.com>
18708
18709 PR server/10048
18710
18711 * linux-low.c (must_set_ptrace_flags): Delete.
18712 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18713 of the global.
18714 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18715 `lwp->must_set_ptrace_flags' instead.
18716 (linux_wait_for_event_1): Set ptrace options here.
18717 (linux_wait_1): ... not here.
18718
187192009-04-30 Doug Evans <dje@google.com>
18720
18721 * inferiors.c (started_inferior_callback): New function.
18722 (attached_inferior_callback): New function.
18723 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18724 * server.c (print_started_pid, print_attached_pid): New functions.
18725 (detach_or_kill_for_exit): New function.
18726 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18727 * server.h (have_started_inferiors_p): Declare.
18728 (have_attached_inferiors_p): Declare.
18729
18730 * inferiors.c (remove_process): Fix memory leak, free process.
18731 * linux-low.c (linux_remove_process): New function.
18732 (linux_kill): Call it instead of remove_process.
18733 (linux_detach, linux_wait_1): Ditto.
18734
187352009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18736
18737 * configure.srv: Add x86 Windows CE target.
18738
187392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18740
18741 * inferiors.c (get_thread_process): Make global.
18742 * server.h (get_thread_process): Add prototype.
18743 * thread-db.c (find_one_thread): Use get_thread_process
18744 instead of current_process.
18745 (thread_db_get_tls_address): Do not crash if called when
18746 thread layer is not yet initialized.
18747
187482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18749
18750 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18751 * spu-low.c (current_tid): Rename to ...
18752 (current_ptid): ... this.
18753 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18754 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18755 ptid_get_lwp (current_ptid) instead of current_tid.
18756 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18757 instead of current_tid. Use find_process_pid to verify pid
18758 argument is valid. Pass proper argument to remove_process.
18759 (spu_thread_alive): Compare current_ptid instead of current_tid.
18760 (spu_resume): Likewise.
18761
187622009-04-02 Pedro Alves <pedro@codesourcery.com>
18763
18764 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18765 variable.
18766
187672009-04-01 Pedro Alves <pedro@codesourcery.com>
18768
18769 Implement the multiprocess extensions, and add linux multiprocess
18770 support.
18771
18772 * server.h (ULONGEST): Declare.
18773 (struct ptid, ptid_t): New.
18774 (minus_one_ptid, null_ptid): Declare.
18775 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18776 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18777 (struct inferior_list_entry): Change `id' type from unsigned from
18778 to ptid_t.
18779 (struct sym_cache, struct breakpoint, struct
18780 process_info_private): Forward declare.
18781 (struct process_info): Declare.
18782 (current_process): Declare.
18783 (all_processes): Declare.
18784 (initialize_inferiors): Declare.
18785 (add_thread): Adjust to use ptid_t.
18786 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18787 (add_process, remove_process, find_thread_pid): Declare.
18788 (find_inferior_id): Adjust to use ptid_t.
18789 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18790 (multi_process): Declare.
18791 (push_event): Adjust to use ptid_t.
18792 (read_ptid, write_ptid): Declare.
18793 (prepare_resume_reply): Adjust to use ptid_t.
18794 (clear_symbol_cache): Declare.
18795 * inferiors.c (all_processes): New.
18796 (null_ptid, minus_one_ptid): New.
18797 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18798 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18799 (add_thread): Change unsigned long to ptid. Remove gdb_id
18800 parameter. Adjust.
18801 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18802 (gdb_id_to_thread): Rename to ...
18803 (find_thread_pid): ... this. Change unsigned long to ptid.
18804 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18805 (loaded_dll, pull_pid_from_list): Adjust.
18806 (add_process, remove_process, find_process_pid)
18807 (get_thread_process, current_process, initialize_inferiors): New.
18808 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18809 (struct target_waitstatus) <related_pid>: Ditto.
18810 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18811 return type to int.
18812 (struct target_ops) <join>: Add `pid' argument.
18813 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18814 (struct target_ops) <wait>: Add `ptid' field. Change return type
18815 to ptid.
18816 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18817 (mywait): Add `ptid' argument. Change return type to ptid_t.
18818 (target_pid_to_str): Declare.
18819 * target.c (set_desired_inferior): Adjust to use ptids.
18820 (mywait): Add new `ptid' argument. Adjust.
18821 (target_pid_to_str): New.
18822 * mem-break.h (free_all_breakpoints): Declare.
18823 * mem-break.c (breakpoints): Delelete.
18824 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18825 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18826 to use per-process breakpoint list.
18827 (free_all_breakpoints): New.
18828 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18829 (symbol_cache, all_symbols_looked_up): Delete.
18830 (hexchars): New.
18831 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18832 read_ptid): New.
18833 (prepare_resume_reply): Change ptid argument's type from unsigned
18834 long to ptid_t. Adjust. Implement W;process and X;process.
18835 (free_sym_cache, clear_symbol_cache): New.
18836 (look_up_one_symbol): Adjust to per-process symbol cache. *
18837 * server.c (cont_thread, general_thread, step_thread): Change type
18838 to ptid_t.
18839 (attached): Delete.
18840 (multi_process): New.
18841 (last_ptid): Change type to ptid_t.
18842 (struct vstop_notif) <ptid>: Change type to ptid_t.
18843 (queue_stop_reply, push_event): Change `ptid' argument's type to
18844 ptid_t.
18845 (discard_queued_stop_replies): Add `pid' argument.
18846 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18847 changes. Don't reference the `attached' global.
18848 (attach_inferior): Adjust to mywait interface changes.
18849 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18850 features. Handle and report "multiprocess+". Handle
18851 "qAttached:PID".
18852 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18853 changes.
18854 (handle_v_kill): New.
18855 (handle_v_stopped): Adjust to use target_pid_to_str.
18856 (handle_v_requests): Allow multiple attaches and runs when
18857 multiprocess extensions are in effect. Handle "vKill".
18858 (myresume): Adjust to use ptids.
18859 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18860 (handle_status): Adjust to discard_queued_stop_replies interface
18861 change.
18862 (first_thread_of, kill_inferior_callback)
18863 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18864 (main): Call initialize_inferiors. Adjust to use ptids, killing
18865 and detaching from all inferiors. Handle multiprocess packet
18866 variants.
18867 * linux-low.h: Include gdb_proc_service.h.
18868 (struct process_info_private): New.
18869 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18870 <lwpid_of>: Use ptid_get_lwp.
18871 (get_lwp_thread): Adjust.
18872 (struct lwp_info): Add `dead' member.
18873 (find_lwp_pid): Declare.
18874 * linux-low.c (thread_db_active): Delete.
18875 (new_inferior): Adjust comment.
18876 (inferior_pid): Delete.
18877 (linux_add_process): New.
18878 (handle_extended_wait): Adjust.
18879 (add_lwp): Change unsigned long to ptid.
18880 (linux_create_inferior): Add process to processes table. Adjust
18881 to use ptids. Don't set new_inferior here.
18882 (linux_attach_lwp): Rename to ...
18883 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18884 it. Adjust to use ptids.
18885 (linux_attach_lwp): New.
18886 (linux_attach): Add process to processes table. Don't set
18887 new_inferior here.
18888 (struct counter): New.
18889 (second_thread_of_pid_p, last_thread_of_process_p): New.
18890 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18891 multiple processes.
18892 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18893 processes. Remove process from process table.
18894 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18895 to multiple processes.
18896 (any_thread_of): New.
18897 (linux_detach): Add `pid' argument, and handle it. Remove process
18898 from processes table.
18899 (linux_join): Add `pid' argument. Handle it.
18900 (linux_thread_alive): Change unsighed long argument to ptid_t.
18901 Consider dead lwps as not being alive.
18902 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18903 threads we're not interested in.
18904 (same_lwp, find_lwp_pid): New.
18905 (linux_wait_for_lwp): Change `pid' argument's type from int to
18906 ptid_t. Adjust.
18907 (linux_wait_for_event): Rename to ...
18908 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18909 from int to ptid_t. Adjust.
18910 (linux_wait_for_event): New.
18911 (linux_wait_1): Add `ptid' argument. Change return type to
18912 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18913 that exit from the process table.
18914 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18915 Adjust.
18916 (mark_lwp_dead): New.
18917 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18918 stopping all threads, mark its main lwp as dead.
18919 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18920 ptids.
18921 (fetch_register, usr_store_inferior_registers)
18922 (regsets_fetch_inferior_registers)
18923 (regsets_store_inferior_registers, linux_read_memory)
18924 (linux_write_memory): Inline `inferior_pid'.
18925 (linux_look_up_symbols): Adjust to use per-process
18926 `thread_db_active'.
18927 (linux_request_interrupt): Adjust to use ptids.
18928 (linux_read_auxv): Inline `inferior_pid'.
18929 (initialize_low): Don't reference thread_db_active.
18930 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18931 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18932 (ps_getpid): Return the pid of the current inferior.
18933 * thread-db.c (proc_handle, thread_agent): Delete.
18934 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18935 per-process data.
18936 (find_one_thread): Change argument type to ptid_t. Adjust to
18937 per-process data.
18938 (maybe_attach_thread): Adjust to per-process data and ptids.
18939 (thread_db_find_new_threads): Ditto.
18940 (thread_db_init): Ditto.
18941 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18942 processes table. Adjust to use ptids.
18943 (spu_kill, spu_detach): Adjust interface. Remove process from
18944 processes table.
18945 (spu_join, spu_thread_alive): Adjust interface.
18946 (spu_wait): Adjust interface. Remove process from processes
18947 table. Adjust to use ptids.
18948 * win32-low.c (current_inferior_tid): Delete.
18949 (current_inferior_ptid): New.
18950 (debug_event_ptid): New.
18951 (thread_rec): Take a ptid. Adjust.
18952 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18953 (child_delete_thread): Ditto.
18954 (do_initial_child_stuff): Add `attached' argument. Add process to
18955 processes table.
18956 (child_fetch_inferior_registers, child_store_inferior_registers):
18957 Adjust.
18958 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18959 (win32_attach): Pass 1 to do_initial_child_stuff.
18960 (win32_kill): Adjust interface. Remove process from processes
18961 table.
18962 (win32_detach): Ditto.
18963 (win32_join): Adjust interface.
18964 (win32_thread_alive): Take a ptid.
18965 (win32_resume): Adjust to use ptids.
18966 (get_child_debug_event): Ditto.
18967 (win32_wait): Adjust interface. Remove exiting process from
18968 processes table.
18969
189702009-04-01 Pedro Alves <pedro@codesourcery.com>
18971
18972 Non-stop mode support.
18973
18974 * server.h (non_stop): Declare.
18975 (gdb_client_data, handler_func): Declare.
18976 (delete_file_handler, add_file_handler, start_event_loop):
18977 Declare.
18978 (handle_serial_event, handle_target_event, push_event)
18979 (putpkt_notif): Declare.
18980 * target.h (enum resume_kind): New.
18981 (struct thread_resume): Replace `step' field by `kind' field.
18982 (TARGET_WNOHANG): Define.
18983 (struct target_ops) <wait>: Add `options' argument.
18984 <supports_non_stop, async, start_non_stop>: New fields.
18985 (target_supports_non_stop, target_async): New.
18986 (start_non_stop): Declare.
18987 (mywait): Add `options' argument.
18988 * target.c (mywait): Add `options' argument. Print child exit
18989 notifications here.
18990 (start_non_stop): New.
18991 * server.c (non_stop, own_buf, mem_buf): New globals.
18992 (struct vstop_notif): New.
18993 (notif_queue): New global.
18994 (queue_stop_reply, push_event, discard_queued_stop_replies)
18995 (send_next_stop_reply): New.
18996 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18997 interface changes.
18998 (attach_inferior): In non-stop mode, don't wait for the target
18999 here.
19000 (handle_general_set): Handle QNonStop.
19001 (handle_query): When handling qC, return the current general
19002 thread, instead of the first thread of the list.
19003 (handle_query): If the backend supports non-stop mode, include
19004 QNonStop+ in the qSupported query response.
19005 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19006 and non-stop mode.
19007 (handle_v_attach, handle_v_run): Handle non-stop mode.
19008 (handle_v_stopped): New.
19009 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19010 (myresume): Adjust to use resume_kind. Handle non-stop.
19011 (queue_stop_reply_callback): New.
19012 (handle_status): Handle non-stop mode.
19013 (main): Clear non_stop flag on reconnection. Use the event-loop.
19014 Refactor serial protocol handling from here ...
19015 (process_serial_event): ... to this new function. When GDB
19016 selects any thread, select one here. In non-stop mode, wait until
19017 GDB acks all pending events before exiting.
19018 (handle_serial_event, handle_target_event): New.
19019 * remote-utils.c (remote_open): Install remote_desc in the event
19020 loop.
19021 (remote_close): Remove remote_desc from the event loop.
19022 (putpkt_binary): Rename to...
19023 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19024 (putpkt_binary): New as wrapper around putpkt_binary_1.
19025 (putpkt_notif): New.
19026 (prepare_resume_reply): In non-stop mode, don't change the
19027 general_thread.
19028 * event-loop.c: New.
19029 * Makefile.in (OBJ): Add event-loop.o.
19030 (event-loop.o): New rule.
19031
19032 * linux-low.h (pid_of): Moved here.
19033 (lwpid_of): New.
19034 (get_lwp_thread): Use lwpid_of.
19035 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19036 * linux-low.c (pid_of): Delete.
19037 (inferior_pid): Use lwpid_of.
19038 (linux_event_pipe): New.
19039 (target_is_async_p): New.
19040 (delete_lwp): New.
19041 (handle_extended_wait): Use lwpid_of.
19042 (add_lwp): Don't set lwpid field.
19043 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19044 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19045 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19046 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19047 first. Adjust to linux_wait_for_event interface changes. Use
19048 lwpid_of.
19049 (linux_detach): Don't delete the main lwp here.
19050 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19051 (status_pending_p): Don't consider explicitly suspended lwps.
19052 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19053 pointer. Add OPTIONS argument. Change return type to int. Use
19054 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19055 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19056 pointer. Add status pointer argument. Return a pid instead of a
19057 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19058 changes. In non-stop mode, don't switch to a random thread.
19059 (linux_wait): Rename to...
19060 (linux_wait_1): ... this. Add target_options argument, and handle
19061 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19062 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19063 clean exit and signal exit code. Don't stop all threads in
19064 non-stop mode. In all-stop mode, only stop all threads when
19065 reporting a stop to GDB. Handle explicit thread stop requests.
19066 (async_file_flush, async_file_mark): New.
19067 (linux_wait): New.
19068 (send_sigstop): Use lwpid_of.
19069 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19070 interface changes. In non-stop mode, don't switch to a random
19071 thread.
19072 (linux_resume_one_lwp): Use lwpid_of.
19073 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19074 (linux_resume_one_thread): ... this. Handle resume_stop. In
19075 non-stop mode, don't look for pending flag in all threads.
19076 (resume_status_pending_p): Don't consider explicitly suspended
19077 threads.
19078 (my_waitpid): Reimplement. Emulate __WALL.
19079 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19080 Use lwpid_of.
19081 (sigchld_handler, linux_supports_non_stop, linux_async)
19082 (linux_start_non_stop): New.
19083 (linux_target_ops): Register linux_supports_non_stop, linux_async
19084 and linux_start_non_stop.
19085 (initialize_low): Install SIGCHLD handler.
19086 * thread-db.c (thread_db_create_event, find_one_thread)
19087 (thread_db_get_tls_address): Use lwpid_of.
19088 * win32-low.c (win32_detach): Adjust to use resume_kind.
19089 (win32_wait): Add `options' argument.
19090 * spu-low.c (spu_resume): Adjust to use resume_kind.
19091 (spu_wait): Add `options' argument.
19092
190932009-04-01 Pedro Alves <pedro@codesourcery.com>
19094
19095 Decouple target code from remote protocol.
19096
19097 * target.h (enum target_waitkind): New.
19098 (struct target_waitstatus): New.
19099 (struct target_ops) <wait>: Return an unsigned long. Take a
19100 target_waitstatus pointer instead of a char pointer.
19101 (mywait): Likewise.
19102 * target.c (mywait): Change prototype to return an unsigned long.
19103 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19104 * server.h (thread_from_wait, old_thread_from_wait): Delete
19105 declarations.
19106 (prepare_resume_reply): Change prototype to take a
19107 target_waitstatus.
19108 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19109 (last_status, last_ptid): New.
19110 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19111 pid instead of a signal.
19112 (attach_inferior): Remove "status" and "signal" parameters.
19113 Adjust.
19114 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19115 not as an address.
19116 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19117 (handle_v_requests, myresume): Remove "status" and "signal"
19118 parameters. Adjust.
19119 (handle_status): New.
19120 (main): Delete local `status'. Adjust.
19121 * remote-utils.c: Include target.h.
19122 (prepare_resume_reply): Change prototype to take a
19123 target_waitstatus. Adjust.
19124
19125 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19126 interface.
19127 * spu-low.c (spu_wait): Adjust.
19128 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19129 Delete.
19130 (win32_wait): Adjust.
19131
191322009-04-01 Pedro Alves <pedro@codesourcery.com>
19133
19134 * target.h (struct thread_resume): Delete leave_stopped member.
19135 (struct target_ops): Add a `n' argument to the `resume' callback.
19136 * server.c (start_inferior): Adjust.
19137 (handle_v_cont, myresume): Adjust.
19138 * linux-low.c (check_removed_breakpoint): Adjust to resume
19139 interface change, and to removed leave_stopped field.
19140 (resume_ptr): Delete.
19141 (struct thread_resume_array): New.
19142 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19143 resume interface change.
19144 (linux_continue_one_thread, linux_queue_one_thread)
19145 (resume_status_pending_p): Check if the resume field is NULL
19146 instead of checking the leave_stopped member.
19147 (linux_resume): Adjust to the target resume interface change.
19148 * spu-low.c (spu_resume): Adjust to the target resume interface
19149 change.
19150 * win32-low.c (win32_detach, win32_resume): Ditto.
19151
191522009-04-01 Pedro Alves <pedro@codesourcery.com>
19153
19154 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19155 flag.
19156 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19157 pending.
19158 (linux_continue_one_thread): Only preserve the stepping flag if
19159 there's a pending breakpoint.
19160
191612009-03-31 Pedro Alves <pedro@codesourcery.com>
19162
19163 * server.c (main): After the inferior having exited, call
19164 remote_close before exiting gdbserver.
19165
191662009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19167
19168 Fix size of FPSCR in Power 7 processors.
19169 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19170 (PPC_FEATURE_HAS_DFP): New #define.
19171 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19172 size of the FPSCR.
19173
191742009-03-23 Pedro Alves <pedro@codesourcery.com>
19175
19176 * server.c (handle_query) Whitespace and formatting.
19177
191782009-03-22 Pedro Alves <pedro@codesourcery.com>
19179
19180 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19181 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19182 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19183 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19184 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19185 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19186 Makefile.in, configure.ac: Fix whitespace throughout.
19187 * configure: Regenerate.
19188
191892009-03-22 Pedro Alves <pedro@codesourcery.com>
19190
19191 * inferiors.c (find_inferior): Make it safe for the callback
19192 function to delete the currently iterated inferior.
19193
191942009-03-22 Pedro Alves <pedro@codesourcery.com>
19195
19196 * Makefile.in (linuw_low_h): Move higher.
19197 (thread-db.o): Depend on $(linux_low_h).
19198
191992009-03-17 Pedro Alves <pedro@codesourcery.com>
19200
19201 Rename "process" to "lwp" throughout.
19202
19203 * linux-low.c (all_processes): Rename to...
19204 (all_lwps): ... this.
19205 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19206 (add_process): Rename to ...
19207 (add_lwp): ... this. Adjust.
19208 (linux_create_inferior): Adjust.
19209 (linux_attach_lwp): Adjust.
19210 (linux_attach): Adjust.
19211 (linux_kill_one_process): Rename to ...
19212 (linux_kill_one_lwp): ... this. Adjust.
19213 (linux_kill): Adjust.
19214 (linux_detach_one_process): Rename to ...
19215 (linux_detach_one_lwp): ... this. Adjust.
19216 (linux_detach): Adjust.
19217 (check_removed_breakpoint): Adjust.
19218 (status_pending_p): Adjust.
19219 (linux_wait_for_process): Rename to ...
19220 (linux_wait_for_lwp): ... this. Adjust.
19221 (linux_wait_for_event): Adjust.
19222 (send_sigstop): Adjust.
19223 (wait_for_sigstop): Adjust.
19224 (stop_all_processes): Rename to ...
19225 (stop_all_lwps): ... this.
19226 (linux_resume_one_process): Rename to ...
19227 (linux_resume_one_lwp): ... this. Adjust.
19228 (linux_set_resume_request, linux_continue_one_thread)
19229 (linux_queue_one_thread, resume_status_pending_p)
19230 (usr_store_inferior_registers, regsets_store_inferior_registers)
19231 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19232 Adjust.
19233 * linux-low.h (get_process): Rename to ...
19234 (get_lwp): ... this. Adjust.
19235 (get_thread_process): Rename to ...
19236 (get_thread_lwp): ... this. Adjust.
19237 (get_process_thread): Rename to ...
19238 (get_lwp_thread): ... this. Adjust.
19239 (struct process_info): Rename to ...
19240 (struct lwp_info): ... this.
19241 (all_processes): Rename to ...
19242 (all_lwps): ... this.
19243 * proc-service.c (ps_lgetregs): Adjust.
19244 * thread-db.c (thread_db_create_event, find_one_thread)
19245 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19246
192472009-03-14 Pedro Alves <pedro@codesourcery.com>
19248
19249 * server.c (handle_query): Handle "qAttached".
19250
192512009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19252
19253 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19254 GPLv3, update license URL.
19255
192562009-03-01 Doug Evans <dje@google.com>
19257
19258 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19259 (server_h): Add gdb_signals.h.
19260 (signals.o): Update.
19261 * server.h (target_signal_from_host,target_signal_to_host_p)
19262 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19263
192642009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19265
19266 * remote-utils.c (getpkt): Also generate remote-debug
19267 information if noack_mode is set.
19268
192692009-02-06 Pedro Alves <pedro@codesourcery.com>
19270
19271 * server.c (handle_query): Report qXfer:siginfo:read and
19272 qXfer:siginfo:write as supported and handle them.
19273 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19274 * linux-low.c (linux_xfer_siginfo): New.
19275 (linux_target_ops): Set it.
19276
192772009-01-26 Pedro Alves <pedro@codesourcery.com>
19278
19279 * server.c (gdbserver_usage): Mention --remote-debug.
19280 (main): Accept '--remote-debug' switch.
19281
192822009-01-18 Doug Evans <dje@google.com>
19283
19284 * regcache.c (new_register_cache): No need to check result of xcalloc.
19285 * server.c (handle_search_memory): Back out calls to xmalloc,
19286 result is checked and error is returned to user upon failure.
19287 (handle_query): Ditto. Add more checks for result of malloc.
19288 (handle_v_cont): Check result of malloc, report error back to
19289 user upon failure.
19290 (handle_v_run): Ditto. Call freeargv.
19291 * server.h (freeargv): Declare.
19292 * utils.c (freeargv): New fn.
19293
192942009-01-15 Doug Evans <dje@google.com>
19295
19296 * gdbreplay.c (perror_with_name): Make arg const char *.
19297 * server.h (target_signal_to_name): Make return type const char *.
19298 * thread-db.c (thread_db_err_str): Make return type const char *.
19299 * utils.c (perror_with_name): Make arg const char *.
19300
193012009-01-14 Pedro Alves <pedro@codesourcery.com>
19302
19303 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19304 when handling a EXIT_PROCESS_DEBUG_EVENT.
19305
193062009-01-06 Joel Brobecker <brobecker@adacore.com>
19307
19308 * gdbreplay.c (gdbreplay_version): Update copyright year.
19309 * server.c (gdbserver_version): Likewise.
19310
193112009-01-05 Doug Evans <dje@google.com>
19312
19313 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19314 (handle_extended_wait): Improve comment.
19315
193162008-12-13 Doug Evans <dje@google.com>
19317
19318 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19319 * server.h (ATTR_MALLOC): New macro.
19320 (xmalloc,xcalloc,xstrdup): Declare.
19321 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19322 * inferiors.c: Ditto.
19323 * linux-low.c: Ditto.
19324 * mem-break.c: Ditto.
19325 * regcache.c: Ditto.
19326 * remote-utils.c: Ditto.
19327 * server.c: Ditto.
19328 * target.c: Ditto.
19329 * win32-low.c: Ditto.
19330
193312008-12-12 Doug Evans <dje@google.com>
19332
19333 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19334 in debugging printf.
19335
19336 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19337
193382008-12-09 Doug Evans <dje@google.com>
19339
19340 * linux-low.h (struct process_info): Delete member tid, unused.
19341 * thread-db.c (find_one_thread): Update.
19342 (maybe_attach_thread): Update.
19343
193442008-12-02 Pedro Alves <pedro@codesourcery.com>
19345
19346 * target.h (struct target_ops): Add qxfer_osdata member.
19347 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19348 and dirent.h.
19349 (linux_qxfer_osdata): New functions.
19350 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19351 callback.
19352 * server.c (handle_query): Handle "qXfer:osdata:read:".
19353 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19354 (buffer_xml_printf): New functions.
19355 * server.h (struct buffer): New.
19356 (buffer_grow_str, buffer_grow_str0): New macros.
19357 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19358 (buffer_xml_printf): Declare.
19359
193602008-11-24 Doug Evans <dje@google.com>
19361
19362 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19363
193642008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19365
19366 * server.c (handle_v_run): Always use the supplied argument list.
19367
193682008-11-19 Bob Wilson <bob.wilson@acm.org>
19369
19370 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19371 (xtensa_regmap_table): Add entry for scompare1.
19372
193732008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19374
19375 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19376 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19377 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19378 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19379 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19380 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19381 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19382 XML target descriptions.
19383 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19384 when inferior is running on an ISA 2.05 or later processor. Add
19385 special case to return offset for full 64-bit slot of FPSCR when
19386 in 32-bits.
19387
193882008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19389
19390 * Makefile.in (SFILES, clean): Added sparc64 files.
19391 (reg-sparc64.o, reg-sparc64.c): New.
19392 * configure.srv (sparc*-*-linux*): New configuration.
19393 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19394 syscall arguments for SPARC.
19395 (regsets_store_inferior_registers): Likewise.
19396 * linux-sparc-low.c: New file.
19397
193982008-10-21 Doug Evans <dje@google.com>
19399
19400 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19401 (READLINE_DIR,READLINE_DEP): Delete.
19402 (INTERNAL_CFLAGS): Update.
19403 (LINTFLAGS): Update.
19404
194052008-10-10 Pedro Alves <pedro@codesourcery.com>
19406
19407 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19408 whole argv from the last run, not just argv[0].
19409
194102008-09-08 Pedro Alves <pedro@codesourcery.com>
19411
19412 * regcache.c (new_register_cache): Return NULL if the register
19413 cache size isn't known yet.
19414 (free_register_cache): Avoid dereferencing a NULL regcache.
19415
194162008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19417
19418 * configure.srv: Merge MIPS and MIPS64.
19419
194202008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19421
19422 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19423
194242008-08-18 Luis Machado <luisgpm@br.ibm.com>
19425
19426 * Makefile.in: Add required vsx dependencies.
19427
19428 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19429 Declare init_registers_powerpc_vsx32l.
19430 Declare init_registers_powerpc_vsx64l.
19431 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19432 (ppc_arch_setup): Check for VSX in hwcap.
19433 (ppc_fill_vsxregset): New function.
19434 (ppc_store_vsxregset): New function.
19435 Add new VSX entry in regset_info target_regsets.
19436
19437 * configure.srv: Add new VSX dependencies.
19438
194392008-08-12 Pedro Alves <pedro@codesourcery.com>
19440
19441 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19442 (remote_open): Set or clear transport_is_reliable.
19443 (putpkt_binary): Don't expect acks in noack mode.
19444 (getpkt): Don't send ack/nac in noack mode.
19445 * server.c (handle_general_set): Handle QStartNoAckMode.
19446 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19447 qSupported.
19448 (main): Reset noack_mode on every connection.
19449 * server.h (noack_mode): Declare.
19450
194512008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19452
19453 * Makefile.in (GDBREPLAY_OBS): New variable.
19454 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19455
194562008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19457 Daniel Jacobowitz <dan@codesourcery.com>
19458
19459 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19460 (usr_store_inferior_registers): Likewise.
19461 (regsets_store_inferior_registers): Likewise.
19462
194632008-07-31 Rolf Jansen <rj@surtec.com>
19464 Pedro Alves <pedro@codesourcery.com>
19465
19466 * configure.ac: Check for memmem declaration.
19467 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19468 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19469 (disable_packet_qfThreadInfo): Unconditionally compile.
19470 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19471 * configure, config.in: Regenerate.
19472
194732008-07-28 Doug Kwan <dougkwan@google.com>
19474
19475 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19476 (linux_write_memory): Remove declaration of errno.
19477
194782008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19479
19480 * linux-low.c (handle_extended_wait): Do not use "status"
19481 variable uninitialized.
19482
194832008-07-07 Pedro Alves <pedro@codesourcery.com>
19484
19485 * server.c (handle_v_attach): Inhibit reporting dll changes.
19486
194872008-06-27 Pedro Alves <pedro@codesourcery.com>
19488
19489 * remote-utils.c (prepare_resume_reply): If requested, don't
19490 output "thread:TID" in the T stop reply.
19491
19492 * server.c (disable_packet_vCont, disable_packet_Tthread)
19493 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19494 (handle_query): If requested, disable support for qC, qfThreadInfo
19495 and qsThreadInfo.
19496 (handle_v_requests): If requested, disable support for vCont.
19497 (gdbserver_show_disableable): New.
19498 (main): Handle --disable-packet and --disable-packet=LIST.
19499
19500 * server.h (disable_packet_vCont, disable_packet_Tthread)
19501 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19502
195032008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19504
19505 * server.c (gdbserver_usage): Mention --version.
19506
195072008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19508
19509 * Makefile.in (gdbreplay.o): New rule.
19510
195112008-06-06 Joseph Myers <joseph@codesourcery.com>
19512
19513 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19514 message, not gdbserver.
19515
195162008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19517 Nathan Sidwell <nathan@codesourcery.com>
19518 Joseph Myers <joseph@codesourcery.com>
19519
19520 * acinclude.m4: Include ../../config/acx.m4.
19521 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19522 * configure, config.in: Regenerate.
19523 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19524 * server.c (gdbserver_version): Print PKGVERSION.
19525 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19526 (main): Adjust gdbserver_usage calls.
19527 * gdbreplay.c (version, host_name): Add declarations.
19528 (gdbreplay_version, gdbreplay_usage): New.
19529 (main): Accept --version and --help options.
19530
195312008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19532
19533 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19534 (arm_breakpoint_at): Handle Thumb.
19535 (the_low_target): Add comment.
19536
195372008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19538
19539 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19540
195412008-05-09 Doug Evans <dje@google.com>
19542
19543 * server.h (decode_search_memory_packet): Declare.
19544 * remote-utils.c (decode_search_memory_packet): New fn.
19545 * server.c (handle_search_memory_1): New fn.
19546 (handle_search_memory): New fn.
19547 (handle_query): Process qSearch:memory packets.
19548
195492008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19550
19551 * regcache.c (registers_length): Remove.
19552 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19553 full register packet.
19554 * regcache.h (registers_length): Remove prototype.
19555 * server.h (PBUFSIZ): Define to 16384.
19556
195572008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19558
19559 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19560 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19561 powerpc-64l.o, and powerpc-altivec64l.o.
19562 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19563 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19564 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19565 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19566 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19567 to srv_xmlfiles.
19568
19569 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19570 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19571 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19572 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19573 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19574 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19575 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19576 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19577 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19578 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19579 (clean): Update.
19580
19581 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19582 (init_registers_powerpc_32l): ... this new prototype.
19583 (init_registers_powerpc_32): Remove, replace by ...
19584 (init_registers_powerpc_altivec32l): ... this new prototype.
19585 (init_registers_powerpc_e500): Remove, replace by ...
19586 (init_registers_powerpc_e500l): ... this new prototype.
19587 (init_registers_ppc64): Remove, replace by ...
19588 (init_registers_powerpc_64l): ... this new prototype.
19589 (init_registers_powerpc_64): Remove, replace by ...
19590 (init_registers_powerpc_altivec64l): ... this new prototype.
19591 (ppc_num_regs): Set to 73.
19592 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19593 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19594 (ppc_cannot_store_register): Handle orig_r3 and trap.
19595 (ppc_arch_setup): Update init_registers_... calls.
19596 (ppc_fill_gregset): Handle orig_r3 and trap.
19597
19598 * inferiors.c (clear_inferiors): Reset current_inferior.
19599
196002008-04-23 Paolo Bonzini <bonzini@gnu.org>
19601
19602 * acinclude.m4: Add override.m4.
19603 * configure: Regenerate.
19604
196052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19606
19607 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19608 initial call to init_register_ppc64.
19609
196102008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19611
19612 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19613 single powerpc*-*-linux* case.
19614 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19615
196162008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19617
19618 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19619 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19620 from reg_xmlfiles.
19621 * linux-ppc-low.c: Include <elf.h>.
19622 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19623 (ppc_hwcap): New global variable.
19624 (ppc_regmap): Remove __SPE__ #ifdef sections.
19625 (ppc_regmap_e500): New global variable.
19626 (ppc_cannot_store_register): Update __SPE__ special case.
19627 (ppc_get_hwcap): New function.
19628 (ppc_arch_setup): Use it to determine whether inferior supports
19629 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19630 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19631 Do not access registers if target does not support AltiVec.
19632 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19633 Do not access registers if target does not support SPE.
19634 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19635
196362008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19637
19638 * linux-low.c (disabled_regsets, num_regsets): New.
19639 (use_regsets_p): Delete.
19640 (linux_wait_for_process): Clear disabled_regsets.
19641 (regsets_fetch_inferior_registers): Check and set it.
19642 (regsets_store_inferior_registers): Likewise.
19643 (linux_fetch_registers, linux_store_registers): Do not use
19644 use_regsets_p.
19645 (initialize_low): Allocate disabled_regsets.
19646
196472008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19648
19649 * Makefile.in (LIBOBJS): New.
19650 (OBS): Use LIBOBJS.
19651 (memmem.o): New rule.
19652 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19653 * configure: Regenerated.
19654
196552008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19656
19657 * server.c (handle_query): Never return "unsupported" for
19658 qXfer:features:read queries.
19659
196602008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19661
19662 * server.c (get_features_xml): Fix inverted condition.
19663 (handle_query): Always support qXfer:feature:read.
19664
196652008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19666
19667 * server.c (wrapper_argv): New.
19668 (start_inferior): Handle wrapper_argv. If set, expect an extra
19669 trap.
19670 (gdbserver_usage): Document --wrapper.
19671 (main): Parse --wrapper.
19672
196732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19674
19675 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19676 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19677 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19678 (ppc_set_pc): Likewise.
19679 (ppc_arch_setup): New function.
19680 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19681 of collect_register.
19682 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19683
196842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19685
19686 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19687 instead of linux-ppc64-low.o.
19688 * linux-ppc64-low.c: Remove file.
19689 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19690 (linux-ppc64-low.o): Remove rule.
19691
19692 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19693 (init_registers_powerpc_64): Likewise.
19694 (ppc_regmap): Conditionally define depending on __powerpc64__.
19695 (ppc_cannot_store_register): Do not special-case "fpscr" when
19696 compiled on __powerpc64__.
19697 (ppc_collect_ptrace_register): New function.
19698 (ppc_supply_ptrace_register): New function.
19699 (ppc_breakpoint): Change type to "unsigned int".
19700 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19701 (the_low_target): Conditionally provide initializers for the
19702 arch_setup member depending on __powerpc64__. Install
19703 collect_ptrace_register and supply_ptrace_register members.
19704
197052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19706
19707 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19708 * server.c (gdbserver_xmltarget): Define.
19709 (get_features_xml): Use it to replace "target.xml" and arch_string.
19710
19711 * configure.srv: Remove srv_xmltarget. Add XML files that were
19712 mentioned there to srv_xmlfiles instead. Remove conditional tests
19713 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19714 srv_xmlfiles and srv_regobj to include all possible choices.
19715 * configure.ac (srv_xmltarget): Remove.
19716 (srv_xmlfiles): Do not add "target.xml".
19717 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19718 checks for supplementary target information.
19719 * configure: Regenerate.
19720 * Makefile.in (XML_TARGET): Remove.
19721 (target.xml): Remove rule.
19722 (clean): Do not clean up target.xml.
19723 (.PRECIOUS): Do not mention target.xml.
19724
19725 * target.h (struct target_ops): Remove arch_string member.
19726 * linux-low.c (linux_arch_string): Remove.
19727 (linux_target_ops): Remove arch_string initializer.
19728 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19729 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19730 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19731 * spu-low.c (spu_arch_string): Remove.
19732 (spu_target_ops): Remove arch_string initializer.
19733 * win32-low.c (win32_arch_string): Remove.
19734 (win32_target_ops): Remove arch_string initializer.
19735 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19736 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19737 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19738
197392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19740
19741 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19742 by collect_ptrace_register and supply_ptrace_register hooks.
19743 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19744 instead of checking for the_low_target.left_pad_xfer.
19745 (usr_store_inferior_registers): Use collect_ptrace_register callback
19746 instead of checking for the_low_target.left_pad_xfer.
19747
19748 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19749 (s390_supply_ptrace_register): Likewise.
19750 (s390_fill_gregset): Call s390_collect_ptrace_register.
19751 (the_low_target): Update.
19752
19753 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19754 (ppc_supply_ptrace_register): Likewise.
19755 (the_low_target): Update.
19756
19757 * linux-i386-low.c (the_low_target): Update.
19758 * linux-x86-64-low.c (the_low_target): Update.
19759
197602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19761
19762 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19763 reg-s390.o and reg-s390x.o.
19764
19765 * linux-low.c (new_inferior): New global variable.
19766 (linux_create_inferior, linux_attach): Set it.
19767 (linux_wait_for_process): Call the_low_target.arch_setup after the
19768 target has stopped for the first time.
19769 (initialize_low): Do not call the_low_target.arch_setup.
19770
19771 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19772 (s390_set_pc): Likewise.
19773 (s390_arch_setup): New function.
19774 (the_low_target): Use s390_arch_setup as arch_setup routine.
19775
19776 * regcache.c (realloc_register_cache): New function.
19777 (set_register_cache): Call it for each existing regcache.
19778
197792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19780
19781 * server.h (init_registers): Remove prototype.
19782
19783 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19784 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19785 instead of init_registers ().
19786 * linux-arm-low.c (init_registers_arm): Add prototype.
19787 (init_registers_arm_with_iwmmxt): Likewise.
19788 (the_low_target): Add initializer for arch_setup field.
19789 * linux-cris-low.c (init_registers_cris): Add prototype.
19790 (the_low_target): Add initializer for arch_setup field.
19791 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19792 (the_low_target): Add initializer for arch_setup field.
19793 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19794 (the_low_target): Add initializer for arch_setup field.
19795 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19796 (the_low_target): Add initializer for arch_setup field.
19797 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19798 (the_low_target): Add initializer for arch_setup field.
19799 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19800 (the_low_target): Add initializer for arch_setup field.
19801 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19802 (init_registers_mips64_linux): Likewise.
19803 (the_low_target): Add initializer for arch_setup field.
19804 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19805 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19806 (the_low_target): Add initializer for arch_setup field.
19807 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19808 (init_registers_powerpc_64): Likewise.
19809 (the_low_target): Add initializer for arch_setup field.
19810 * linux-s390-low.c (init_registers_s390): Add prototype.
19811 (init_registers_s390x): Likewise.
19812 (the_low_target): Add initializer for arch_setup field.
19813 * linux-sh-low.c (init_registers_sh): Add prototype.
19814 (the_low_target): Add initializer for arch_setup field.
19815 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19816 (the_low_target): Add initializer for arch_setup field.
19817 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19818 (the_low_target): Add initializer for arch_setup field.
19819
19820 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19821 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19822 instead of init_registers ().
19823 * win32-arm-low.c (init_registers_arm): Add prototype.
19824 (the_low_target): Add initializer for arch_setup field.
19825 * win32-i386-low.c (init_registers_i386): Add prototype.
19826 (the_low_target): Add initializer for arch_setup field.
19827
19828 * spu-low.c (init_registers_spu): Add prototype.
19829 (initialize_low): Call initialie_registers_spu () instead of
19830 initialize_registers ().
19831
198322008-02-19 Pedro Alves <pedro@codesourcery.com>
19833
19834 * server.c (handle_v_requests): When handling the vRun and vAttach
19835 packets, if already debugging a process, don't kill it. Return an
19836 error instead.
19837
198382008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19839
19840 * server.c (handle_query): Correct length check.
19841
198422008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19843
19844 * win32-low.c (do_initial_child_stuff): Add process handle
19845 parameter. Set current_process_handle and current_process_id from the
19846 parameters. Clear globals.
19847 (win32_create_inferior): Don't set current_process_handle and
19848 current_process_id here. Instead pass them on the call to
19849 do_initial_child_stuff.
19850 (win32_attach): Likewise.
19851 (win32_clear_inferiors): New.
19852 (win32_kill): Don't close the current process handle or the
19853 current thread handle here. Instead call win32_clear_inferiors.
19854 (win32_detach): Don't open a new handle to the process. Call
19855 win32_clear_inferiors.
19856 (win32_join): Don't rely on current_process_handle; open a new
19857 handle using the process id.
19858 (win32_wait): Call win32_clear_inferiors when the inferior process
19859 has exited.
19860
198612008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19862
19863 * server.c (monitor_show_help): Add "exit".
19864
198652008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19866
19867 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19868 (clean): Add reg-xtensa.c.
19869 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19870 * configure.srv (xtensa*-*-linux*) New target.
19871 * linux-xtensa-low.c: New.
19872 * xtensa-xtregs.c: New.
19873
198742008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19875
19876 * hostio.c: Don't include errno.h.
19877 (errno_to_fileio_errno): Move to hostio-errno.
19878 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19879 error number outputting to the target->hostio_last_error callback.
19880 (hostio_packet_error): Use FILEIO_EINVAL directly.
19881 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19882 calls to hostio_error.
19883 * hostio-errno.c: New.
19884 * server.h (hostio_last_error_from_errno): Declare.
19885 * target.h (target_ops): Add hostio_last_error member.
19886 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19887 as hostio_last_error handler.
19888 * spu-low.c (spu_target_ops): Likewise.
19889 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19890 (wince_hostio_last_error): New functions.
19891 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19892 as hostio_last_error handler.
19893 (win32_target_ops) [!_WIN32_WCE]: Register
19894 hostio_last_error_from_errno as hostio_last_error handler.
19895 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19896 (hostio-errno.o): New rule.
19897 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19898 * configure.srv (srv_hostio_err_objs): New variable. Default to
19899 hostio-errno.o.
19900 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19901 * configure: Regenerate.
19902
199032008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19904
19905 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19906 (linux_kill, linux_detach): Clean up the process list.
19907 * remote-utils.c (remote_open): Improve port number parsing.
19908 (putpkt_binary, input_interrupt): Only send interrupts if the target
19909 is running.
19910 * server.c (extended_protocol): Make static.
19911 (attached): Define earlier.
19912 (exit_requested, response_needed, program_argv): New variables.
19913 (target_running): New.
19914 (start_inferior): Clear attached here.
19915 (attach_inferior): Set attached here.
19916 (require_running): Define.
19917 (handle_query): Use require_running and target_running. Implement
19918 "monitor exit".
19919 (handle_v_attach, handle_v_run): New.
19920 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19921 (gdbserver_usage): Update.
19922 (main): Redo argument parsing. Handle --debug and --multi. Handle
19923 --attach along with other options or after the port. Save
19924 program_argv. Support no initial program. Resynchronize
19925 communication with GDB after an error. Handle "monitor exit".
19926 Use require_running and target_running. Always allow the extended
19927 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19928 restart in extended mode.
19929 * README: Refer to the GDB manual. Update --attach usage.
19930
199312007-12-20 Andreas Schwab <schwab@suse.de>
19932
19933 * linux-low.c (STACK_SIZE): Define.
19934 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19935 (linux_test_for_tracefork): Likewise.
19936
199372007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19938
19939 * linux-low.c (linux_wait_for_event): Update messages. Do not
19940 reinsert auto-delete breakpoints.
19941 * mem-break.c (struct breakpoint): Change return type of handler to
19942 int.
19943 (set_breakpoint_at): Update handler type.
19944 (reinsert_breakpoint_handler): Return 1 instead of calling
19945 delete_breakpoint.
19946 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19947 setting a new one.
19948 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19949 * mem-break.h (set_breakpoint_at): Update handler type.
19950 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19951 * win32-low.c (auto_delete_breakpoint): New.
19952 (get_child_debug_event): Use it.
19953
199542007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19955
19956 * configure.ac: Check for pread and pwrite.
19957 * hostio.c (handle_pread): Fall back to lseek and read.
19958 (handle_pwrite): Fall back to lseek and write.
19959 * config.in, configure: Regenerated.
19960
199612007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19962
19963 * server.c (myresume): Add own_buf argument.
19964 (main): Update calls.
19965
199662007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19967
19968 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19969 * remote-utils.c (remote_open): Do not call disable_async_io.
19970 (block_async_io): Delete.
19971 (unblock_async_io): Make static.
19972 (initialize_async_io): New.
19973 * server.c (handle_v_cont): Handle async I/O here.
19974 (myresume): Likewise. Move other common resume tasks here...
19975 (main): ... from here. Call initialize_async_io. Disable async
19976 I/O before the main loop.
19977 * server.h (initialize_async_io): Declare.
19978 (block_async_io, unblock_async_io): Delete prototypes.
19979 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19980
199812007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19982
19983 * remote-utils.c (readchar): Allow binary data in received messages.
19984
199852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19986
19987 * win32-low.c (attaching): New global.
19988 (win32_create_inferior): Clear the `attaching' global.
19989 (win32_attach): Set the `attaching' global.
19990 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19991 attaching. Only set a breakpoint at the entry point if not
19992 attaching.
19993
199942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19995
19996 * server.c (main): Don't report dll events on the initial
19997 connection on attaches.
19998
199992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20000
20001 * server.c (main): Relax numerical bases supported for the pid of
20002 the --attach command line argument.
20003
200042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20005
20006 * win32-low.c (win32_attach): Call OpenProcess before
20007 DebugActiveProcess, not after. Add last error output to error
20008 call.
20009
200102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20011
20012 * win32-low.c (win32_get_thread_context)
20013 (win32_set_thread_context): New functions.
20014 (thread_rec): Use win32_get_thread_context.
20015 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20016 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20017 field.
20018
200192007-12-03 Leo Zayas
20020 Pedro Alves <pedro_alves@portugalmail.pt>
20021
20022 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20023 global variables.
20024 (child_add_thread): Minor cleanup.
20025 (child_continue): Resume artificially suspended threads before
20026 calling ContinueDebugEvent.
20027 (suspend_one_thread): New.
20028 (fake_breakpoint_event): New.
20029 (get_child_debug_event): Change return type to int. Check here if
20030 gdb sent an interrupt request. If a soft interrupt was requested,
20031 fake a breakpoint event. Return 0 if there is no event to handle,
20032 and 1 otherwise.
20033 (win32_wait): Don't check here if gdb sent an interrupt request.
20034 Ensure there is a valid event to handle.
20035 (win32_request_interrupt): Add soft interruption method as last
20036 resort.
20037
200382007-12-03 Leo Zayas
20039 Pedro Alves <pedro_alves@portugalmail.pt>
20040
20041 * win32-low.h (win32_thread_info): Add descriptions to the
20042 structure members. Replace `suspend_count' counter by a
20043 `suspended' flag.
20044 * win32-low.c (thread_rec): Update condition of when to get the
20045 context from the inferior. Rely on ContextFlags being set if it
20046 has already been retrieved. Only suspend the inferior thread if
20047 we haven't already. Warn if that fails.
20048 (continue_one_thread): s/suspend_count/suspended/. Only call
20049 ResumeThread once. Warn if that fails.
20050
200512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20052
20053 * win32-low.c (win32_wait): Don't read from the inferior when it
20054 has already exited.
20055
200562007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20057
20058 * Makefile.in (win32_low_h): New variable.
20059 (win32-low.o): Add dependency on $(win32_low_h).
20060 (win32-arm-low.o, win32-i386-low.o): New rules.
20061
200622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20063
20064 * hostio.c: Correct copyright year.
20065
200662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20067
20068 * Makefile.in (OBS): Add hostio.o.
20069 (hostio.o): New rule.
20070 * server.h (handle_vFile): Declare.
20071 * hostio.c: New file.
20072 * server.c (handle_v_requests): Take packet_len and new_packet_len
20073 for binary packets. Call handle_vFile.
20074 (main): Update call to handle_v_requests.
20075
200762007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20077
20078 * linux-low.c: Include <sched.h>.
20079
200802007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20081
20082 * linux-low.c (linux_tracefork_grandchild): New.
20083 (linux_tracefork_child): Use clone.
20084 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20085
200862007-10-31 Joel Brobecker <brobecker@adacore.com>
20087
20088 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20089
200902007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20091
20092 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20093
200942007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20095
20096 * inferiors.c (change_inferior_id): Delete.
20097 (add_pid_to_list, pull_pid_from_list): New.
20098 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20099 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20100 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20101 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20102 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20103 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20104 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20105 (using_threads): Always set to 1.
20106 (handle_extended_wait): New.
20107 (add_process): Do not set TID.
20108 (linux_create_inferior): Set must_set_ptrace_flags.
20109 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20110 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20111 (linux_thread_alive): Rename TID argument to LWPID.
20112 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20113 (linux_wait_for_event): Do not use TID or check using_threads. Update
20114 call to dead_thread_notify. Call handle_extended_wait.
20115 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20116 (send_sigstop): Delete sigstop_sent.
20117 (wait_for_sigstop): Avoid TID.
20118 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20119 (linux_test_for_tracefork): New.
20120 (linux_lookup_signals): Use thread_db_active and
20121 linux_supports_tracefork_flag.
20122 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20123 * linux-low.h (get_process_thread): Avoid TID.
20124 (struct process_ifo): Move thread_known and tid to the end. Remove
20125 sigstop_sent.
20126 (linux_attach_lwp, thread_db_init): Update prototypes.
20127 * server.h (change_inferior_id): Delete prototype.
20128 (add_pid_to_list, pull_pid_from_list): New prototypes.
20129 * thread-db.c (thread_db_use_events): New.
20130 (find_first_thread): Rename to...
20131 (find_one_thread): ...this. Update callers and messages. Do not
20132 call fatal. Check thread_db_use_events. Do not call
20133 change_inferior_id or new_thread_notify.
20134 (maybe_attach_thread): Update. Do not call new_thread_notify.
20135 (thread_db_init): Set thread_db_use_events. Check use_events.
20136 * utils.c (fatal, warning): Correct message prefix.
20137
201382007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20139
20140 * Makefile.in (clean): Remove new files.
20141 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20142 (powerpc-64.o, powerpc-64.c): New rules.
20143 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20144 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20145 with SPE.
20146 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20147 SPE targets.
20148 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20149 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20150 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20151 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20152 (target_regsets): Add AltiVec and SPE register sets.
20153 * configure.ac: Check for AltiVec and SPE.
20154 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20155 (ppc_fill_vrregset, ppc_store_vrregset): New.
20156 (target_regsets): Add AltiVec register set.
20157 * configure: Regenerated.
20158
201592007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20160
20161 * linux-low.c (O_LARGEFILE): Define.
20162 (linux_read_memory): Use /proc/PID/mem.
20163 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20164 * configure, config.in: Regenerated.
20165
201662007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20167
20168 * linux-low.c (linux_wait_for_event): Do not pass signals while
20169 single-stepping.
20170
201712007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20172
20173 * win32-low.c (create_process): New.
20174 (win32_create_inferior): Use create_process instead of
20175 CreateProcess. If create_process failed retry appending an ".exe"
20176 suffix. Store the GetLastError result immediatelly after
20177 create_process calls and use it on the call to error.
20178
201792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20180
20181 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20182
201832007-08-23 Joel Brobecker <brobecker@adacore.com>
20184
20185 * configure.ac: Switch license to GPLv3.
20186
201872007-08-01 Michael Snyder <msnyder@access-company.com>
20188
20189 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20190
201912007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20192
20193 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20194 typedef.
20195 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20196 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20197 CloseToolhelp32Snapshot.
20198 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20199 CloseToolhelp32Snapshot.
20200
202012007-07-27 Michael Snyder <michael.snyder@access-company.com>
20202
20203 * server.c (main): Check for inferior exit before main loop.
20204
202052007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20206
20207 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20208 instead of on tmp_desc.
20209
202102007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20211 Daniel Jacobowitz <dan@codesourcery.com>
20212
20213 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20214 (add_thread): Minor cleanups.
20215 (clear_inferiors): Move lower in the file. Clear the DLL
20216 list.
20217 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20218 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20219 (xml_escape_text): New.
20220 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20221 for qSupported.
20222 (handle_v_cont): Report errors.
20223 (gdbserver_version): Update.
20224 (main): Correct size of own_buf. Do not report initial DLL events.
20225 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20226 (unloaded_dll, xml_escape_text): New.
20227 * win32-low.c (enum target_waitkind): Update comments.
20228 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20229 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20230 (win32_EnumProcessModules, win32_GetModuleInformation)
20231 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20232 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20233 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20234 (win32_Module32First, win32_Module32Next, load_toolhelp)
20235 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20236 (get_child_debug_event): Handle DLL events.
20237 (win32_wait): Likewise.
20238
202392007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20240
20241 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20242 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20243
202442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20245
20246 * win32-low.c (handle_output_debug_string): Ignore event if not
20247 waiting.
20248
202492007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20250
20251 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20252
202532007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20254
20255 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20256
202572007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20258
20259 * inferiors.c (change_inferior_id): Add comment.
20260 * linux-low.c (check_removed_breakpoint): Add an early
20261 prototype. Improve debug output.
20262 (linux_attach): Doc update.
20263 (linux_detach_one_process, linux_detach): Clean up before releasing
20264 each process.
20265 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20266 * linux-low.h (struct process_info): Doc improvement.
20267 * mem-break.c (delete_all_breakpoints): New.
20268 * mem-break.h (delete_all_breakpoints): New prototype.
20269 * thread-db.c (find_first_thread): New.
20270 (thread_db_create_event): Call it instead of
20271 thread_db_find_new_threads. Clean up unused variables.
20272 (maybe_attach_thread): Remove first thread handling.
20273 (thread_db_find_new_threads): Use find_first_thread.
20274 (thread_db_get_tls_address): Likewise.
20275
202762007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20277
20278 * thread-db.c (thread_db_find_new_threads): Add prototype.
20279 (thread_db_create_event): Check for the main thread before adding
20280 a new thread.
20281 (maybe_attach_thread): Only enable event reporting if TID == 0.
20282 (thread_db_get_tls_address): Check for new threads.
20283
202842007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20285
20286 * linux-low.c (linux_create_inferior): Try execv before execvp.
20287 * spu-low.c (spu_create_inferior): Likewise.
20288
202892007-06-13 Mike Frysinger <vapier@gentoo.org>
20290
20291 * linux-low.c (linux_create_inferior): Change execv to execvp.
20292 * spu-low.c (spu_create_inferior): Likewies.
20293
202942007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20295
20296 * Makefile.in (clean): Clean new files instead of deleted ones.
20297 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20298 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20299 rules.
20300 * configure.srv: Specify XML files and new regformats for MIPS and
20301 MIPS64 GNU/Linux.
20302 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20303 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20304 an entry for the restart register.
20305 (mips_cannot_fetch_register, mips_cannot_store_register)
20306 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20307 register names to match the XML descriptions.
20308 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20309 restart register instead of $0.
20310
203112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20312 Markus Deuling <deuling@de.ibm.com>
20313
20314 * remote-utils.c (decode_xfer_write): New function.
20315 * server.h (decode_xfer_write): Add prototype.
20316 * server.c (handle_query): Add PACKET_LEN argument. Support
20317 qXfer:spu:read and qXfer:spu:write packets.
20318 (main): Pass packet_len to handle_query.
20319 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20320 * target.h (target_ops): Add qxfer_spu.
20321
203222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20323
20324 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20325 accessing non-seekable spufs files.
20326
203272007-05-16 Markus Deuling <deuling@de.ibm.com>
20328
20329 * server.c (handle_query): Add reply for qC packet.
20330
203312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20332 Leo Zayas <lerele@champenstudios@com>
20333
20334 * server.h (check_remote_input_interrupt_request): New function.
20335 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20336 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20337 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20338 (check_remote_input_interrupt_request): New function.
20339 * server.h (check_remote_input_interrupt_request): Declare.
20340 * win32-low.c (winapi_DebugBreakProcess,
20341 winapi_GenerateConsoleCtrlEvent): New typedefs.
20342 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20343 to 250 ms.
20344 (win32_wait): Check for remote interrupt request
20345 with check_remote_input_interrupt_request.
20346 (win32_request_interrupt): New function.
20347 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20348
203492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20350
20351 * win32-low.c (debug_registers_changed,
20352 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20353 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20354 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20355 (thread_rec): Get context using the low target.
20356 (child_add_thread): Call thread_added on the low target,
20357 which does the same thing.
20358 (regptr): Delete.
20359 (do_initial_child_stuff): Remove debug registers references.
20360 Set context using the low target. Resume threads after
20361 setting the contexts.
20362 (child_continue): Remove dead variable. Remove debug
20363 registers references.
20364 (child_fetch_inferior_registers): Go through the low target.
20365 (do_child_store_inferior_registers): Remove.
20366 (child_store_inferior_registers): Go through the low target.
20367 (win32_resume): Remove debug registers references.
20368 Set context using the low target.
20369 (handle_exception): Change return type to void. Don't record
20370 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20371 first chance exception.
20372 (get_child_debug_event): Change return type to void. Remove
20373 goto loop. Always return after waiting for debug event.
20374 (win32_wait): Convert to switch statement. Handle spurious
20375 events.
20376
20377 * win32-i386-low.c (debug_registers_changed,
20378 debug_registers_used): New.
20379 (initial_stuff): Rename to ...
20380 (i386_initial_stuff): ... this. Clear debug registers
20381 state variables.
20382 (store_debug_registers): Delete.
20383 (i386_get_thread_context): New.
20384 (load_debug_registers): Delete.
20385 (i386_set_thread_context): New.
20386 (i386_thread_added): New.
20387 (single_step): Rename to ...
20388 (i386_single_step): ... this.
20389 (do_fetch_inferior_registers): Rename to ...
20390 (i386_fetch_inferior_register): ... this.
20391 (i386_store_inferior_register): New.
20392 (the_low_target): Adapt to new interface.
20393
20394 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20395 (arm_get_thread_context): New.
20396 (arm_set_thread_context): New.
20397 (regptr): New.
20398 (do_fetch_inferior_registers): Rename to ...
20399 (arm_fetch_inferior_register): ... this.
20400 (arm_store_inferior_register): New.
20401 (arm_wince_breakpoint): Reimplement as unsigned long.
20402 (arm_wince_breakpoint_len): Define.
20403 (the_low_target): Adapt to new interface.
20404
20405 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20406 load_debug_registers. Add get_thread_context, set_thread_context,
20407 thread_added and store_inferior_register. Rename
20408 fetch_inferior_registers to fetch_inferior_register.
20409 (regptr): Remove declaration.
20410
204112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20412
20413 * linux-low.c (linux_detach): Change return type to int. Return 0.
20414 * spu-low.c (spu_detach): Likewise.
20415
204162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20417
20418 * target.h (target_ops): Change return type of detach to int.
20419 Add join.
20420 (join_inferior): New.
20421 * server.c (main): Don't skip detach support on mingw32.
20422 If the inferior doesn't support detaching return error.
20423 Call join_inferior instead of using waitpid.
20424 * linux-low.c (linux_join): New.
20425 (linux_target_op): Add linux_join.
20426 * spu-low.c (spu_join): New.
20427 (spu_target_ops): Add spu_join.
20428 * win32-low.c (win32_detach): Adapt to new interface.
20429 Reopen current_process_handle before detaching. Issue a child
20430 resume before detaching.
20431 (win32_join): New.
20432 (win32_target_op): Add win32_join.
20433
204342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20435
20436 * win32-low.c (win32-attach): Fix return value.
20437 * target.h (target_ops): Describe ATTACH return values.
20438
204392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20440
20441 * win32-low.c (GETPROCADDRESS): Define.
20442 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20443 (winapi_DebugSetProcessKillOnExit): Likewise.
20444 (win32_create_inferior): Force usage of ansi CreateProcessA.
20445 (win32_attach): Use GETPROCADDRESS.
20446 (win32_detach): Likewise.
20447
204482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20449
20450 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20451
204522007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20453
20454 * win32-low.c: Commit leftover changes from 2007-03-29.
20455
204562007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20457
20458 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20459 fields short instead of int. Add explicit padding.
20460 (i387_cache_to_fsave): Remove unnecessary casts.
20461 (i387_fsave_to_cache): Doc fix.
20462 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20463
204642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20465
20466 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20467 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20468
204692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20470
20471 * configure.srv (arm*-*-mingw32ce*): Move near the other
20472 arm targets.
20473
204742007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20475
20476 * configure.ac: Add errno checking.
20477 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20478 sys/file.h and malloc.h.
20479 (AC_CHECK_DECLS): Add perror.
20480 (srv_mingwce): Handle.
20481 * configure.srv (i[34567]86-*-cygwin*): Add
20482 win32-i386-low.o to srv_tgtobj.
20483 (i[34567]86-*-mingw*): Likewise.
20484 (arm*-*-mingw32ce*): Add case.
20485 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20486 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20487 [__MINGW32CE__] (strerror): New function.
20488 [__MINGW32CE__] (errno): Define to GetLastError.
20489 [__MINGW32CE__] (COUNTOF): New macro.
20490 (remote_open): Remove extra close call.
20491 * mem-break.c (delete_breakpoint_at): New function.
20492 * mem-break.h (delete_breakpoint_at): Declare.
20493 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20494 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20495 [USE_WIN32API] (read, write): Add char* casts.
20496 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20497 * server.h: Include wincecompat.h on Windows CE.
20498 [HAVE_ERRNO_H]: Check.
20499 (perror): Declare if not declared.
20500 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20501 (perror_with_name): Remove errno declaration.
20502 * wincecompat.h: New.
20503 * wincecompat.c: New.
20504 * win32-low.h: New.
20505 * win32-arm-low.c: New.
20506 * win32-i386-low.c: New.
20507 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20508 (OUTMSG2): Make it safe.
20509 (_T): New macro.
20510 (COUNTOF): New macro.
20511 (NUM_REGS): Get it from the low target.
20512 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20513 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20514 (thread_rec): Let low target handle debug registers.
20515 (child_add_thread): Likewise.
20516 (child_init_thread_list): Likewise.
20517 (continue_one_thread): Likewise.
20518 (regptr): New.
20519 (do_child_fetch_inferior_registers): Move to ...
20520 * win32-i386-low.c: ... here, and rename to ...
20521 (do_fetch_inferior_registers): ... this.
20522 * win32-low.c (child_fetch_inferior_registers):
20523 Go through the low target.
20524 (do_child_store_inferior_registers): Use regptr.
20525 (strwinerror): New function.
20526 (win32_create_inferior): Handle Windows CE.
20527 Use strwinerror instead of strerror on Windows error
20528 codes. Add program to the error output.
20529 Don't close the main thread handle on Windows CE.
20530 (win32_attach): Use coredll.dll on Windows CE.
20531 (win32_kill): Close current process and current
20532 thread handles.
20533 (win32_detach): Use coredll.dll on Windows CE.
20534 (win32_resume): Let low target handle debug registers, and
20535 step request.
20536 (handle_exception): Add/Remove initial breakpoint. Avoid
20537 non-existant WSTOPSIG on Windows CE.
20538 (win32_read_inferior_memory): Cast to remove warning.
20539 (win32_arch_string): Go through the low target.
20540 (initialize_low): Call set_breakpoint_data with the low
20541 target's breakpoint.
20542 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20543 FOP_REGNUM, mappings): Move to ...
20544 * win32-i386-low.c: ... here.
20545 * win32-low.c (win32_thread_info): Move to ...
20546 * win32-low.h: ... here.
20547 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20548 win32-arm-low.c and wincecompat.c.
20549 (all:): Add $EXEEXT.
20550 (install-only:): Likewise.
20551 (gdbserver:): Likewise.
20552 (gdbreplay:): Likewise.
20553 * config.in: Regenerate.
20554 * configure: Regenerate.
20555
205562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20557
20558 * win32-low.c: Rename typedef thread_info to
20559 win32_thread_info throughout.
20560
205612007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20562
20563 * win32-i386-low.c: Rename to ...
20564 * win32-low.c: ... this.
20565 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20566 * Makefile.in: Likewise.
20567
205682007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20569
20570 * remote-utils.c (monitor_output): Constify msg parameter.
20571 * server.h (monitor_output): Likewise.
20572 * win32-i386-low.c (handle_output_debug_string): New.
20573 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20574 handle_output_debug_string.
20575 (get_child_debug_event): Likewise.
20576
205772007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20578
20579 * server.c (main): Correct strtoul check.
20580
205812007-03-27 Jon Ringle <jon@ringle.org>
20582
20583 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20584
205852007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20586
20587 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20588
205892007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20590
20591 * terminal.h: Check HAVE_SGTTY_H.
20592
205932007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20594
20595 * remote-utils.c (remote_open): Print out the assigned port number.
20596
205972007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20598
20599 * remote-utils.c (monitor_output): New function.
20600 * server.c (debug_threads): Define here.
20601 (monitor_show_help): New function.
20602 (handle_query): Handle qRcmd.
20603 (main): Do not handle 'd' packet.
20604 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20605 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20606 of debug_threads.
20607
206082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20609
20610 * Makefile.in (EXEEXT): New.
20611 (clean): Use $(EXEEXT).
20612
206132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20614
20615 * target.h (target_ops): Rename send_signal to request_interrupt,
20616 and remove enum target_signal parameter.
20617 * linux-low.c (linux_request_interrupt): Rename from
20618 linux_send_signal, and always send SIGINT.
20619 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20620 and always send SIGINT.
20621 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20622 of send_signal.
20623 (input_interrupt): Likewise.
20624
206252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20626
20627 * server.c (get_features_xml): Check if target implemented
20628 arch_string.
20629 * win32-i386-low.c (win32_arch_string): New.
20630 (win32_target_ops): Add win32_arch_string as arch_string member.
20631
206322007-02-22 Markus Deuling <deuling@de.ibm.com>
20633
20634 * spu-low.c (spu_arch_string): New.
20635 (spu_target_ops): Add spu_arch_string.
20636
206372007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20638
20639 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20640 * configure.ac: Do not check for terminal.h.
20641 * configure, config.in: Regenerated.
20642
206432007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20644
20645 * Makefile.in (OBS): Add $(XML_BUILTIN).
20646 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20647 (clean): Update.
20648 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20649 (arm-with-iwmmxt.c): New.
20650 * config.in, configure: Regenerate.
20651 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20652 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20653 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20654 (arm*-*-linux*): Add iWMMXt and regset support.
20655 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20656 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20657 (arm_store_wmmxregset, target_regsets): New.
20658 * server.c (get_features_xml): Take annex argument. Check builtin
20659 XML documents.
20660 (handle_query): Handle multiple annexes.
20661
206622007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20663
20664 * remote-utils.c [USE_WIN32API] (read, write): Define.
20665 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20666 write.
20667
206682007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20669
20670 * linux-i386-low.c (the_low_target): Set arch_string.
20671 * linux-x86-64-low.c (the_low_target): Likewise.
20672 * linux-low.c (linux_arch_string): New.
20673 (linux_target_ops): Add it.
20674 * linux-low.h (struct linux_target_ops): Add arch_string.
20675 * server.c (write_qxfer_response): Use const void * for DATA.
20676 (get_features_xml): New.
20677 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20678 * target.h (struct target_ops): Add arch_string method.
20679
206802007-01-03 Denis Pilat <denis.pilat@st.com>
20681 Daniel Jacobowitz <dan@codesourcery.com>
20682
20683 * linux-low.c (linux_kill): Handle being called with no threads.
20684 * win32-i386-low.c (win32_kill): Likewise.
20685 (get_child_debug_event): Clear current_process_handle.
20686
206872006-12-30 Denis PILAT <denis.pilat@st.com>
20688 Daniel Jacobowitz <dan@codesourcery.com>
20689
20690 * remote-utils.c (remote_open): Check the type of specified
20691 serial port devices before opening them.
20692 * server.c (main): Kill the inferior if an error occurs during
20693 the first remote_open.
20694
206952006-12-05 Markus Deuling <deuling@de.ibm.com>
20696
20697 * README: Update supported targets.
20698
206992006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20700
20701 * Makefile.in (clean): Remove reg-mips64.c.
20702 (reg-mips64.c, reg-mips64.o): New rules.
20703 * configure.srv: Handle mips64. Include regset support for mips.
20704 * linux-mips-low.c (union mips_register): New.
20705 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20706 (mips_breakpoint, mips_breakpoint_at): Use int.
20707 (mips_collect_register, mips_supply_register)
20708 (mips_collect_register_32bit, mips_supply_register_32bit)
20709 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20710 (mips_store_fpregset, target_regsets): New.
20711 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20712
207132006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20714
20715 * configure.srv: Add target "spu*-*-*".
20716 * Makefile.in (clean): Remove reg-spu.c.
20717 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20718 * spu-low.c: New file.
20719
207202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20721
20722 * configure.ac: Correct td_thr_tls_get_addr test.
20723 * configure: Regenerated.
20724
207252006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20726
20727 * linux-low.c (linux_wait_for_event): Reformat. Use the
20728 pass_signals array.
20729 * remote-utils.c (decode_address_to_semicolon): New.
20730 * server.c (pass_signals, handle_general_set): New.
20731 (handle_query): Mention QPassSignals for qSupported.
20732 (main): Call handle_general_set.
20733 * server.h (pass_signals, decode_address_to_semicolon): New.
20734
207352006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20736
20737 * server.c (handle_query): Correct error handling for read_auxv.
20738
207392005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20740
20741 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20742 and srv_linux_thread_db to yes.
20743 * linux-s390-low.c (s390_fill_gregset): New function.
20744 (target_regsets): Define data structure.
20745
207462006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20747
20748 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20749 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20750 * config.in, configure: Regenerated.
20751 * inferiors.c (gdb_id_to_thread): New function.
20752 (gdb_id_to_thread_id): Use it.
20753 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20754 * linux-low.h (struct process_info): Add th member.
20755 (thread_db_get_tls_address): New prototype.
20756 * remote-utils.c (decode_address): Make non-static.
20757 * server.c (handle_query): Handle qGetTLSAddr.
20758 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20759 * target.h (struct target_ops): Add get_tls_address.
20760 * thread-db.c (maybe_attach_thread): Save the thread handle.
20761 (thread_db_get_tls_address): New.
20762
207632006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20764
20765 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20766 (linux_resume_one_process): Take a siginfo_t *. Update all
20767 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20768 (struct pending_signals): Add a siginfo_t.
20769 (linux_wait_for_process): Always set last_status.
20770 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20771 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20772 * linux-low.h (struct process_info): Add last_status.
20773
207742006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20775
20776 * remote-utils.c (try_rle): New function.
20777 (putpkt_binary): Use it.
20778
207792006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20780
20781 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20782 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20783 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20784 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20785 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20786 point registers.
20787
207882006-08-08 Richard Sandiford <richard@codesourcery.com>
20789
20790 * server.c (terminal_fd): New variable.
20791 (old_foreground_pgrp): Likewise.
20792 (restore_old_foreground_pgrp): New function.
20793 (start_inferior): Record the terminal file descriptor in terminal_fd
20794 and its original foreground group in old_foreground_pgrp. Register
20795 restore_old_foreground_pgrp with atexit().
20796
207972006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20798
20799 * server.c (handle_query): Correct qPart to qXfer.
20800
208012006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20802
20803 * configure.ac: Check for more headers which are missing on
20804 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20805 * configure.srv: Add Cygwin and mingw32.
20806 * remote-utils.c: Don't include headers unconditionally which
20807 are missing on mingw32. Include <winsock.h> for mingw32.
20808 (remote_open): Adjust for mingw32 support. Flush
20809 standard error after writing to it.
20810 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20811 (unblock_async_io, enable_async_io, disable_async_io)
20812 (readchar, getpkt): Update for Winsock support.
20813 (prepare_resume_reply): Expect a protocol signal number.
20814 * server.c: Disable <sys/wait.h> on mingw32.
20815 (start_inferior): Adjust for mingw32 support. Flush
20816 standard error after writing to it.
20817 (attach_inferior): Likewise. Use protocol signal
20818 numbers.
20819 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20820 and names.
20821 * win32-i386-low.c: New file.
20822 * Makefile.in (XM_CLIBS): Set.
20823 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20824 (win32-i386-low.o): New dependency rule.
20825 * linux-low.c (linux_wait): Use target signal numbers.
20826 * target.h (struct target_ops): Doc fix.
20827 * server.h (target_signal_to_name): New prototype.
20828 * gdbreplay.c: Don't include headers unconditionally which
20829 are missing on mingw32. Include <winsock.h> for mingw32.
20830 (remote_close, remote_open): Adjust for Winsock support.
20831 * configure, config.in: Regenerated.
20832
208332006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20834
20835 * server.c (decode_xfer_read, write_qxfer_response): New.
20836 (handle_query): Take a packet length argument. Handle
20837 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20838 the qSupported response.
20839 (main): Update call to handle_query.
20840
208412006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20842
20843 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20844 (putpkt_binary): Renamed from putpkt and adjusted for binary
20845 data.
20846 (putpkt): New wrapper for putpkt_binary.
20847 (readchar): Don't mask off the high bit.
20848 (decode_X_packet): New function.
20849 * server.c (main): Call putpkt_binary if a handler sets the packet
20850 length. Save the length of the incoming packet. Handle 'X'.
20851 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20852
208532006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20854
20855 * server.c (handle_query): Handle qSupported.
20856
208572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20858
20859 * remote-utils.c (all_symbols_looked_up): New variable.
20860 (look_up_one_symbol): Check it.
20861 * server.h (look_up_one_symbol): New declaration.
20862 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20863
208642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20865
20866 * Makefile.in (linux-arm-low.o): Update dependencies.
20867 * linux-arm-low.c: Include "gdb_proc_service.h".
20868 (PTRACE_GET_THREAD_AREA): Define.
20869 (ps_get_thread_area): New function.
20870
208712006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20872
20873 * configure.srv (m68k*-*-uclinux*): New target.
20874 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20875 (linux_resume_one_process): Remove extraneous cast.
20876 (linux_read_offsets): New.
20877 (linux_target_op): Add linux_read_offsets on mmuless systems.
20878 * server.c (handle_query): Add qOffsets logic.
20879 * target.h (struct target_ops): Add read_offsets.
20880
208812006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20882
20883 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20884 (PTRACE_GET_THREAD_AREA): Define.
20885 (ps_get_thread_area): New function.
20886 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20887 (linux-x86-64-low.o): Update.
20888
208892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20890
20891 * configure.ac: Remove checks for prfpregset_t.
20892 * gdb_proc_service.h: New file.
20893 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20894 new "gdb_proc_service.h".
20895 * proc-service.c: Likewise.
20896 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20897 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20898 * Makefile.in (gdb_proc_service_h): Updated.
20899 * configure, config.in: Regenerated.
20900
209012006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20902
20903 * remote-utils.c (prepare_resume_reply): Move declaration
20904 of gdb_id_from_wait to the top of the block.
20905
209062006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20907
20908 * linux-low.c (regsets_store_inferior_registers): Read the regset
20909 from the target before filling it.
20910
209112006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20912
20913 * server.c (attach_inferior): Return SIGTRAP for a successful
20914 attach.
20915
209162006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20917
20918 * Makefile.in (OBS): Add version.o.
20919 (STAGESTUFF): Delete.
20920 (version.o): Add dependencies.
20921 (version.c): Replace rule.
20922 (clean): Remove version.c.
20923 * server.c (gdbserver_version): New.
20924 (gdbserver_usage): Use printf.
20925 (main): Handle --version and --help.
20926 * server.h (version, host_name): Add declarations.
20927
209282005-12-23 Eli Zaretskii <eliz@gnu.org>
20929
20930 * linux-arm-low.c:
20931 * linux-arm-low.c:
20932 * inferiors.c:
20933 * i387-fp.h:
20934 * i387-fp.c:
20935 * gdbreplay.c:
20936 * regcache.c:
20937 * proc-service.c:
20938 * mem-break.h:
20939 * mem-break.c:
20940 * linux-x86-64-low.c:
20941 * linux-sh-low.c:
20942 * linux-s390-low.c:
20943 * linux-ppc64-low.c:
20944 * linux-ppc-low.c:
20945 * linux-mips-low.c:
20946 * linux-m68k-low.c:
20947 * linux-m32r-low.c:
20948 * linux-low.h:
20949 * linux-low.c:
20950 * linux-ia64-low.c:
20951 * linux-i386-low.c:
20952 * linux-crisv32-low.c:
20953 * thread-db.c:
20954 * terminal.h:
20955 * target.h:
20956 * target.c:
20957 * server.h:
20958 * server.c:
20959 * remote-utils.c:
20960 * regcache.h:
20961 * utils.c:
20962 * Makefile.in:
20963 * configure.ac:
20964 * gdbserver.1: Add (C) after Copyright. Update the FSF
20965 address.
20966
209672005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20968
20969 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20970 (arm_breakpoint_at): Recognize both breakpoints.
20971 (the_low_target): Use the correct breakpoint instruction.
20972
209732005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20974
20975 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20976 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20977 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20978 (the_low_target): Update.
20979
209802005-10-25 Andreas Schwab <schwab@suse.de>
20981
20982 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20983
20984 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20985 (ia64_num_regs): Reduce to 462.
20986
209872005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20988
20989 * acinclude.m4: Correct quoting.
20990 * aclocal.m4: Regenerated.
20991
20992 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20993 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20994 (thread_db_init): Call thread_db_err_str.
20995 * configure.ac: Check for TD_VERSION.
20996 * config.in, configure: Regenerated.
20997
209982005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20999
21000 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21001
210022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21003
21004 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21005 is not available. Define HAVE_PTRACE_GETREGS if it is.
21006 * config.in, configure: Regenerated.
21007 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21008 * linux-i386-low.c, linux-m68k-low.c: Update to use
21009 HAVE_PTRACE_GETREGS.
21010 * linux-low.c (regsets_fetch_inferior_registers)
21011 (regsets_store_inferior_registers): Only return 0 if we processed
21012 GENERAL_REGS.
21013 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21014 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21015
210162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21017
21018 * inferiors.c (struct thread_info): Add gdb_id.
21019 (add_thread): Add gdb_id argument.
21020 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21021 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21022 calls to add_thread.
21023 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21024 * server.c (handle_query): Use thread_to_gdb_id.
21025 (handle_v_cont, main): Use gdb_id_to_thread_id.
21026 * server.h (add_thread): Update prototype.
21027 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21028 prototypes.
21029
210302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21031
21032 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21033 left-padded registers.
21034 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21035 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21036
210372005-07-01 Steve Ellcey <sje@cup.hp.com>
21038
21039 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21040 * configure: Regenerate.
21041 * config.in: Regenerate.
21042 * server.h (NEED_DECLARATION_STRERROR):
21043 Replace with !HAVE_DECL_STRERROR.
21044
210452005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21046
21047 * linux-low.c (linux_wait, linux_send_signal): Don't test
21048 an unsigned long variable for > 0 if it could be MAX_ULONG.
21049 * server.c (myresume): Likewise.
21050 * target.c (set_desired_inferior): Likewise.
21051
210522005-06-13 Mark Kettenis <kettenis@gnu.org>
21053
21054 * configure.ac: Simplify and improve check for socklen_t.
21055 * configure, config.in: Regenerate.
21056
210572005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21058
21059 * acconfig.h: Remove.
21060 * configure.ac: Add a test for socklen_t. Use three-argument
21061 AC_DEFINE throughout.
21062 * config.in: Regenerated using autoheader 2.59.
21063 * configure: Regenerated.
21064
21065 * gdbreplay.c (socklen_t): Provide a default.
21066 (remote_open): Use socklen_t.
21067 * remote-utils.c (socklen_t): Provide a default.
21068 (remote_open): Use socklen_t.
21069 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21070 unsigned char.
21071
21072 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21073 char for buffers.
21074 * linux-low.c (linux_read_memory, linux_write_memory)
21075 (linux_read_auxv): Likewise.
21076 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21077 (check_mem_write): Likewise.
21078 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21079 Likewise.
21080 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21081 (registers_from_string, register_data): Likewise.
21082 * server.c (handle_query, main): Likewise.
21083 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21084 (decode_M_packet): Likewise.
21085 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21086 * target.h (struct target_ops): Update read_memory, write_memory,
21087 and read_auxv.
21088 (read_inferior_memory, write_inferior_memory): Update.
21089 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21090 to unsigned char *.
21091 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21092 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21093 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21094 linux-s390-low.c, linux-sh-low.c: Update for changes in
21095 read_inferior_memory and the_low_target->breakpoint.
21096
210972005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21098
21099 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21100 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21101 * configure.srv: Add powerpc64-*-linux*.
21102 * linux-ppc64-low.c: New file.
21103
211042005-05-23 Orjan Friberg <orjanf@axis.com>
21105
21106 * linux-cris-low.c: New file with support for CRIS.
21107 * linux-crisv32-low.c: Ditto for CRISv32.
21108 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21109 (clean): Add reg-cris.c and reg-crisv32.c.
21110 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21111 reg-crisv32.o, and reg-crisv32.c to make rules.
21112 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21113 recognized targets.
21114
211152005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21116
21117 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21118 of sizeof (PTRACE_XFER_TYPE).
21119 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21120
211212005-05-12 Orjan Friberg <orjanf@axis.com>
21122
21123 * target.h (struct target_ops): Add insert_watchpoint,
21124 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21125 pointers for hardware watchpoint support.
21126 * linux-low.h (struct linux_target_ops): Ditto.
21127 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21128 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21129 to linux_target_ops.
21130 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21131 reply packet.
21132 * server.c (main): Recognize 'Z' and 'z' packets.
21133
211342005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21135
21136 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21137 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21138 (the_low_target): Add new members.
21139
211402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21141
21142 * proc-service.c (ps_lgetregs): Search all_processes instead of
21143 all_threads.
21144
211452005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21146
21147 * server.c (start_inferior): Change return type to int.
21148 (attach_inferior): Change sigptr to int *.
21149 (handle_v_cont, handle_v_requests): Change signal to int *.
21150 (main): Change signal to int.
21151
211522005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21153
21154 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21155 * configure.srv: Add m32r*-*-linux*.
21156 * linux-m32r-low.c: New file.
21157
211582005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21159
21160 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21161
211622005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21163
21164 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21165 Take unsigned long arguments for PIDs.
21166 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21167 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21168 (wait_for_sigstop, linux_resume_one_process)
21169 (regsets_fetch_inferior_registers, linux_send_signal)
21170 (linux_read_auxv): Likewise. Update the types of variables holding
21171 PIDs. Update format string specifiers.
21172 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21173 * remote-utils.c (prepare_resume_reply): Likewise.
21174 * server.c (cont_thread, general_thread, step_thread)
21175 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21176 unsigned long.
21177 (handle_query): Update format specifiers.
21178 (handle_v_cont, main): Use strtoul for thread IDs.
21179 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21180 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21181 (general_thread, step_thread, thread_from_wait)
21182 (old_thread_from_wait): Update.
21183 * target.h (struct thread_resume): Use unsigned long for THREAD.
21184 (struct target_ops): Use unsigned long for arguments to attach and
21185 thread_alive.
21186
211872005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21188
21189 * acinclude.m4: Include bfd/bfd.m4 directly.
21190 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21191 <agriffis@toolchain.org>.
21192 * aclocal.m4, configure: Regenerated.
21193
211942005-01-07 Andrew Cagney <cagney@gnu.org>
21195
21196 * configure.ac: Rename configure.in, require autoconf 2.59.
21197 * configure: Re-generate.
21198
211992004-12-08 Daniel Jacobowitz <dan@debian.org>
21200
21201 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21202 LIBS when finished.
21203 * aclocal.m4: Regenerated.
21204 * configure: Regenerated.
21205
212062004-11-21 Andreas Schwab <schwab@suse.de>
21207
21208 * linux-m68k-low.c (m68k_num_gregs): Define.
21209 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21210 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21211 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21212 (m68k_breakpoint_at): New. Add to the_low_target.
21213
21214 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21215 srv_linux_thread_db to yes.
21216
212172004-10-20 Joel Brobecker <brobecker@gnat.com>
21218
21219 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21220 (ARCH_SET_FS): Likewise.
21221 (ARCH_GET_FS): Likewise.
21222 (ARCH_GET_GS): Likewise.
21223
212242004-10-16 Daniel Jacobowitz <dan@debian.org>
21225
21226 * linux-i386-low.c (ps_get_thread_area): New.
21227 * linux-x86-64-low.c (ps_get_thread_area): New.
21228 * linux-low.c: Include <sys/syscall.h>.
21229 (linux_kill_one_process): Don't kill the first thread here.
21230 (linux_kill): Kill the first thread here.
21231 (kill_lwp): New function.
21232 (send_sigstop, linux_send_signal): Use it.
21233 * proc-service.c: Clean up #ifdefs.
21234 (fpregset_info): Delete.
21235 (ps_lgetregs): Update and enable implementation.
21236 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21237 implementations.
21238 * remote-utils.c (struct sym_cache, symbol_cache): New.
21239 (input_interrupt): Print a clearer message.
21240 (async_io_enabled): New variable.
21241 (enable_async_io, disable_async_io): Use it. Update comments.
21242 (look_up_one_symbol): Use the symbol cache.
21243 * thread-db.c (thread_db_look_up_symbols): New function.
21244 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21245
212462004-10-16 Daniel Jacobowitz <dan@debian.org>
21247
21248 * configure.in: Test for -rdynamic.
21249 * configure: Regenerated.
21250 * Makefile (INTERNAL_LDFLAGS): New.
21251 (gdbserver, gdbreplay): Use it.
21252
212532004-09-02 Andrew Cagney <cagney@gnu.org>
21254
21255 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21256
212572004-03-23 Daniel Jacobowitz <drow@mvista.com>
21258
21259 * linux-low.c (linux_wait): Clear all_processes list also.
21260
212612004-03-12 Daniel Jacobowitz <drow@mvista.com>
21262
21263 * linux-low.c: Include <errno.h>. Remove extern declaration of
21264 errno.
21265
212662004-03-12 Daniel Jacobowitz <drow@mvista.com>
21267
21268 * gdbreplay.c, server.h, utils.c: Update copyright years.
21269
212702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21271
21272 * server.c (main): Print child status or termination signal from
21273 variable 'signal', not 'sig'.
21274
212752004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21276
21277 * linux-low.c (linux_read_memory): Change return type to
21278 int. Check for and return error from ptrace().
21279 * target.c (read_inferior_memory): Change return type to int. Pass
21280 back return status from the_target->read_memory().
21281 * target.h (struct target_ops): Adapt *read_memory() prototype.
21282 Update comment.
21283 (read_inferior_memory): Adapt prototype.
21284 * server.c (main): Return an error packet if
21285 read_inferior_memory() returns an error.
21286
212872004-03-04 Daniel Jacobowitz <drow@mvista.com>
21288
21289 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21290 Unify with other clean targets.
21291
212922004-02-29 Daniel Jacobowitz <drow@mvista.com>
21293
21294 * server.c (handle_v_cont): Call set_desired_inferior.
21295
212962004-02-29 Daniel Jacobowitz <drow@mvista.com>
21297
21298 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21299
213002004-02-29 Daniel Jacobowitz <drow@mvista.com>
21301
21302 * linux-low.c (linux_wait): Unblock async I/O.
21303 (linux_resume): Block and enable async I/O.
21304 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21305 * server.h (block_async_io, unblock_async_io): Add prototypes.
21306
213072004-02-29 Daniel Jacobowitz <drow@mvista.com>
21308
21309 * remote-utils.c (remote_open): Print a status notice after
21310 opening a TCP port.
21311 * server.c (attach_inferior): Print a status notice after
21312 attaching.
21313
213142004-02-29 Daniel Jacobowitz <drow@mvista.com>
21315
21316 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21317
213182004-02-26 Daniel Jacobowitz <drow@mvista.com>
21319
21320 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21321 error packet.
21322 * server.c, target.h: Update copyright years.
21323
213242004-02-25 Roland McGrath <roland@redhat.com>
21325
21326 * target.h (struct target_ops): New member `read_auxv'.
21327 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21328 * linux-low.c (linux_read_auxv): New function.
21329 (linux_target_ops): Initialize `read_auxv' member to that.
21330
213312004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21332
21333 Committed by Jim Blandy <jimb@redhat.com>.
21334
21335 * linux-s390-low.c (s390_num_regs): Update.
21336 (s390_regmap): Remove control registers. Use __s390x__ predefine
21337 instead of GPR_SIZE to distiguish s390 and s390x targets.
21338
213392004-01-31 Daniel Jacobowitz <drow@mvista.com>
21340
21341 * linux-low.c: Update copyright year.
21342 (check_removed_breakpoint): Clear pending_is_breakpoint.
21343 (linux_set_resume_request, linux_queue_one_thread)
21344 (resume_status_pending_p): New functions.
21345 (linux_continue_one_thread): Use process->resume.
21346 (linux_resume): Only resume threads if there are no pending events.
21347 * linux-low.h (struct process_info): Add resume request
21348 pointer.
21349
213502004-01-30 Daniel Jacobowitz <drow@mvista.com>
21351
21352 * regcache.c (new_register_cache): Clear the allocated register
21353 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21354
213552003-10-13 Daniel Jacobowitz <drow@mvista.com>
21356
21357 * linux-low.c (linux_resume): Take a struct thread_resume *
21358 argument.
21359 (linux_wait): Update call.
21360 (resume_ptr): New static variable.
21361 (linux_continue_one_thread): Renamed from
21362 linux_continue_one_process. Use resume_ptr.
21363 (linux_resume): Use linux_continue_one_thread.
21364 * server.c (handle_v_cont, handle_v_requests): New functions.
21365 (myresume): New function.
21366 (main): Handle 'v' case.
21367 * target.h (struct thread_resume): New type.
21368 (struct target_ops): Change argument of "resume" to struct
21369 thread_resume *.
21370 (myresume): Delete macro.
21371
213722003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21373
21374 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21375 (uninstall): Support DESTDIR.
21376
21377Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21378
21379 * configure.srv: Add xscale*linux copy of arm*linux entry.
21380
213812003-07-24 Daniel Jacobowitz <drow@mvista.com>
21382
21383 * linux-arm-low.c (arm_reinsert_addr): New function.
21384 (the_low_target): Add arm_reinsert_addr.
21385
213862003-07-08 Mark Kettenis <kettenis@gnu.org>
21387
21388 * mem-break.c: Remove whitespace at end of file.
21389
213902003-06-28 Daniel Jacobowitz <drow@mvista.com>
21391
21392 * configure.in: Check whether we need to prototype strerror.
21393 * server.h: Optionally prototype strerror.
21394 * gdbreplay.c (perror_with_name): Use strerror.
21395 * linux-low.c (linux_attach_lwp): Use strerror.
21396 * utils.c (perror_with_name): Use strerror.
21397 * config.in, configure: Regenerated.
21398
213992003-06-28 Daniel Jacobowitz <drow@mvista.com>
21400
21401 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21402 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21403
214042003-06-20 Daniel Jacobowitz <drow@mvista.com>
21405
21406 * Makefile.in (SFILES): Update.
21407 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21408 low-sun3.c: Remove files.
21409
214102003-06-17 Daniel Jacobowitz <drow@mvista.com>
21411
21412 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21413 (linux_detach_one_process, linux_detach): New functions.
21414 (linux_target_ops): Add linux_detach.
21415 * server.c (main): Handle 'D' packet.
21416 * target.h (struct target_ops): Add "detach" member.
21417 (detach_inferior): Define.
21418
214192003-06-13 Mark Kettenis <kettenis@gnu.org>
21420
21421 From Kelley Cook <kelleycook@wideopenwest.com>:
21422 * configure.srv: Accept i[34567]86 variants.
21423
214242003-06-05 Daniel Jacobowitz <drow@mvista.com>
21425
21426 * linux-low.c (linux_wait_for_event): Correct comment typos.
21427 (linux_resume_one_process): Call check_removed_breakpoint.
21428 (linux_send_signal): New function.
21429 (linux_target_ops): Add linux_send_signal.
21430 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21431 of kill.
21432 * target.h (struct target_ops): Add send_signal.
21433
214342003-05-29 Jim Blandy <jimb@redhat.com>
21435
21436 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21437 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21438 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21439 away part of the register's value.
21440
214412003-03-26 Daniel Jacobowitz <drow@mvista.com>
21442
21443 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21444 (linux_wait_for_event, linux_init_signals): Likewise.
21445
214462003-03-17 Daniel Jacobowitz <drow@mvista.com>
21447
21448 * configure.in: Check for stdlib.h.
21449 * configure: Regenerated.
21450 * config.in: Regenerated.
21451
214522003-01-04 Andreas Schwab <schwab@suse.de>
21453
21454 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21455
214562003-01-02 Andrew Cagney <ac131313@redhat.com>
21457
21458 * Makefile.in: Remove obsolete code.
21459
214602002-11-20 Daniel Jacobowitz <drow@mvista.com>
21461
21462 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21463 defined(PT_FPR0_HI).
21464
214652002-11-17 Stuart Hughes <seh@zee2.com>
21466
21467 * linux-arm-low.c (arm_num_regs): Increase.
21468 (arm_regmap): Include status register.
21469
214702002-11-17 Daniel Jacobowitz <drow@mvista.com>
21471
21472 * linux-low.c (register_addr): Remove incorrect -1 check.
21473
214742002-08-29 Daniel Jacobowitz <drow@mvista.com>
21475
21476 * linux-low.c (linux_create_inferior): Call setpgid. Return
21477 the new PID.
21478 (unstopped_p, linux_signal_pid): Remove.
21479 (linux_target_ops): Remove linux_signal_pid.
21480 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21481 global instead of target method.
21482 * target.h (struct target_ops): Remove signal_pid. Update comment
21483 for create_inferior.
21484 * server.c (signal_pid): New variable.
21485 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21486 gdbserver. Set the child to be the foreground process group.
21487 (attach_inferior): Set signal_pid.
21488
214892002-08-23 Daniel Jacobowitz <drow@mvista.com>
21490
21491 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21492
214932002-08-20 Jim Blandy <jimb@redhat.com>
21494
21495 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21496 default for this.
21497
214982002-08-01 Andrew Cagney <cagney@redhat.com>
21499
21500 * Makefile.in: Make chill references obsolete.
21501
215022002-07-24 Kevin Buettner <kevinb@redhat.com>
21503
21504 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21505 * configure: Regenerate.
21506 * config.in: Regenerate.
21507
215082002-07-09 David O'Brien <obrien@FreeBSD.org>
21509
21510 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21511 (perror_with_name, remote_close, remote_open, expect, play): Static.
21512
215132002-07-04 Michal Ludvig <mludvig@suse.cz>
21514
21515 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21516 byte offsets instead of an array of indexes.
21517 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21518
215192002-06-13 Daniel Jacobowitz <drow@mvista.com>
21520
21521 * regcache.c: Add comment.
21522
215232002-06-11 Daniel Jacobowitz <drow@mvista.com>
21524
21525 * thread-db.c: New file.
21526 * proc-service.c: New file.
21527 * acinclude.m4: New file.
21528 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21529 proc-service.o, and thread-db.o.
21530 (linux-low.o): Add USE_THREAD_DB.
21531 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21532 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21533 * aclocal.m4: Regenerated.
21534 * config.in: Regenerated.
21535 * configure: Regenerated.
21536 * configure.in: Check for proc_service.h, sys/procfs.h,
21537 thread_db.h, and linux/elf.h headrs.
21538 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21539 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21540 Check for -lthread_db and thread support.
21541 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21542 PowerPC, and SuperH.
21543 * i387-fp.c: Constify arguments.
21544 * i387-fp.h: Likewise.
21545 * inferiors.c: (struct thread_info): Renamed from
21546 `struct inferior_info'. Remove PID member. Use generic inferior
21547 list header. All uses updated.
21548 (inferiors, signal_pid): Removed.
21549 (all_threads): New variable.
21550 (get_thread): Define.
21551 (add_inferior_to_list): New function.
21552 (for_each_inferior): New function.
21553 (change_inferior_id): New function.
21554 (add_inferior): Removed.
21555 (remove_inferior): New function.
21556 (add_thread): New function.
21557 (free_one_thread): New function.
21558 (remove_thread): New function.
21559 (clear_inferiors): Use for_each_inferior and free_one_thread.
21560 (find_inferior): New function.
21561 (find_inferior_id): New function.
21562 (inferior_target_data): Update argument type.
21563 (set_inferior_target_data): Likewise.
21564 (inferior_regcache_data): Likewise.
21565 (set_inferior_regcache_data): Likewise.
21566 * linux-low.c (linux_bp_reinsert): Remove.
21567 (all_processes, stopping_threads, using_thrads)
21568 (struct pending_signals, debug_threads, pid_of): New.
21569 (inferior_pid): Replace with macro.
21570 (struct inferior_linux_data): Remove.
21571 (get_stop_pc, add_process): New functions.
21572 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21573 Use add_process and add_thread.
21574 (linux_attach_lwp): New function, based on old linux_attach. Use
21575 add_process and add_thread. Set stop_expected for new threads.
21576 (linux_attach): New function.
21577 (linux_kill_one_process): New function.
21578 (linux_kill): Kill all LWPs.
21579 (linux_thread_alive): Use find_inferior_id.
21580 (check_removed_breakpoints, status_pending_p): New functions.
21581 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21582 Update. Use WNOHANG. Wait for cloned processes also. Update process
21583 struct for the found process.
21584 (linux_wait_for_event): New function.
21585 (linux_wait): Use it. Support LWPs.
21586 (send_sigstop, wait_for_sigstop, stop_all_processes)
21587 (linux_resume_one_process, linux_continue_one_process): New functions.
21588 (linux_resume): Support LWPs.
21589 (REGISTER_RAW_SIZE): Remove.
21590 (fetch_register): Use register_size instead. Call supply_register.
21591 (usr_store_inferior_registers): Likewise. Call collect_register.
21592 Fix recursive case.
21593 (regsets_fetch_inferior_registers): Improve error message.
21594 (regsets_store_inferior_registers): Add debugging.
21595 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21596 (unstopped_p, linux_signal_pid): New functions.
21597 (linux_target_ops): Add linux_signal_pid.
21598 (linux_init_signals): New function.
21599 (initialize_low): Call it. Initialize using_threads.
21600 * regcache.c (inferior_regcache_data): Add valid
21601 flag.
21602 (get_regcache): Fetch registers lazily. Add fetch argument
21603 and update all callers.
21604 (regcache_invalidate_one, regcache_invalidate): New
21605 functions.
21606 (new_register_cache): Renamed from create_register_cache.
21607 Return the new regcache.
21608 (free_register_cache): Change argument to a void *.
21609 (registers_to_string, registers_from_string): Call get_regcache
21610 with fetch flag set.
21611 (register_data): Make static. Pass fetch flag to get_regcache.
21612 (supply_register): Call get_regcache with fetch flag clear.
21613 (collect_register): Call get_regcache with fetch flag set.
21614 (collect_register_as_string): New function.
21615 * regcache.h: Update.
21616 * remote-utils.c (putpkt): Flush after debug output and use
21617 stderr.
21618 Handle input interrupts while waiting for an ACK.
21619 (input_interrupt): Use signal_pid method.
21620 (getpkt): Flush after debug output and use stderr.
21621 (outreg): Use collect_register_as_string.
21622 (new_thread_notify, dead_thread_notify): New functions.
21623 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21624 and general_thread.
21625 (look_up_one_symbol): Flush after debug output.
21626 * server.c (step_thread, server_waiting): New variables.
21627 (start_inferior): Don't use signal_pid. Update call to mywait.
21628 (attach_inferior): Update call to mywait.
21629 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21630 (main): Don't fetch/store registers explicitly. Use
21631 set_desired_inferior. Support proposed ``Hs'' packet. Update
21632 calls to mywait.
21633 * server.h: Update.
21634 (struct inferior_list, struct_inferior_list_entry): New.
21635 * target.c (set_desired_inferior): New.
21636 (write_inferior_memory): Constify.
21637 (mywait): New function.
21638 * target.h: Update.
21639 (struct target_ops): New signal_pid method.
21640 (mywait): Removed macro, added prototype.
21641
21642 * linux-low.h (regset_func): Removed.
21643 (regset_fill_func, regset_store_func): New.
21644 (enum regset_type): New.
21645 (struct regset_info): Add type field. Use new operation types.
21646 (struct linux_target_ops): stop_pc renamed to get_pc.
21647 Add decr_pc_after_break and breakpoint_at.
21648 (get_process, get_thread_proess, get_process_thread)
21649 (strut process_info, all_processes, linux_attach_lwp)
21650 (thread_db_init): New.
21651
21652 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21653 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21654 (the_low_target): Add new members.
21655 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21656 (i386_store_fpxregset): Constify.
21657 (target_regsets): Add new kind identifier.
21658 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21659 (i386_set_pc): Add debugging.
21660 (i386_breakpoint_at): New function.
21661 (the_low_target): Add new members.
21662 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21663 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21664 (mips_breakpoint_at): New.
21665 (the_low_target): Add new members.
21666 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21667 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21668 (the_low_target): Add new members.
21669 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21670 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21671 (the_low_target): Add new members.
21672 * linux-x86-64-low.c (target_regsets): Add new kind
21673 identifier.
21674
216752002-05-15 Daniel Jacobowitz <drow@mvista.com>
21676
21677 From Martin Pool <mbp@samba.org>:
21678 * server.c (gdbserver_usage): New function.
21679 (main): Call it.
21680
216812002-05-14 Daniel Jacobowitz <drow@mvista.com>
21682
21683 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21684 stop_at -> stop_pc.
21685
216862002-05-04 Andrew Cagney <ac131313@redhat.com>
21687
21688 * Makefile.in: Remove obsolete code.
21689
216902002-04-24 Michal Ludvig <mludvig@suse.cz>
21691
21692 * linux-low.c (regsets_fetch_inferior_registers),
21693 (regsets_store_inferior_registers): Removed cast to int from
21694 ptrace() calls.
21695 * regcache.h: Added declaration of struct inferior_info.
21696
216972002-04-20 Daniel Jacobowitz <drow@mvista.com>
21698
21699 * inferiors.c (struct inferior_info): Add regcache_data.
21700 (add_inferior): Call create_register_cache.
21701 (clear_inferiors): Call free_register_cache.
21702 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21703 * regcache.c (struct inferior_regcache_data): New.
21704 (registers): Remove.
21705 (get_regcache): New function.
21706 (create_register_cache, free_register_cache): New functions.
21707 (set_register_cache): Don't initialize the register cache here.
21708 (registers_to_string, registers_from_string, register_data): Call
21709 get_regcache.
21710 * regcache.h: Add prototypes.
21711 * server.h: Likewise.
21712
217132002-04-20 Daniel Jacobowitz <drow@mvista.com>
21714
21715 * mem-break.c: New file.
21716 * mem-break.h: New file.
21717 * Makefile.in: Add mem-break.o rule; update server.h
21718 dependencies.
21719 * inferiors.c (struct inferior_info): Add target_data
21720 member.
21721 (clear_inferiors): Free target_data member if set.
21722 (inferior_target_data, set_inferior_target_data): New functions.
21723 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21724 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21725 * linux-low.c (linux_bp_reinsert): New variable.
21726 (struct inferior_linux_data): New.
21727 (linux_create_inferior): Use set_inferior_target_data.
21728 (linux_attach): Likewise. Call add_inferior.
21729 (linux_wait_for_one_inferior): New function.
21730 (linux_wait): Call it.
21731 (linux_write_memory): Add const.
21732 (initialize_low): Call set_breakpoint_data.
21733 * linux-low.h (struct linux_target_ops): Add breakpoint
21734 handling members.
21735 * server.c (attach_inferior): Remove extra add_inferior
21736 call.
21737 * server.h: Include mem-break.h. Update inferior.c
21738 prototypes.
21739 * target.c (read_inferior_memory)
21740 (write_inferior_memory): New functions.
21741 * target.h (read_inferior_memory)
21742 (write_inferior_memory): Change macros to prototypes.
21743 (struct target_ops): Update comments. Add const to write_memory
21744 definition.
21745
217462002-04-11 Daniel Jacobowitz <drow@mvista.com>
21747
21748 * linux-low.c (usr_store_inferior_registers): Support
21749 registers which are allowed to fail to store.
21750 * linux-low.h (linux_target_ops): Likewise.
21751 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21752 (ppc_cannot_store_register): FPSCR may not be storable.
21753
217542002-04-09 Daniel Jacobowitz <drow@mvista.com>
21755
21756 * server.h: Include <string.h> if HAVE_STRING_H.
21757 * ChangeLog: Correct paths in last ChangeLog entry.
21758
217592002-04-09 Daniel Jacobowitz <drow@mvista.com>
21760
21761 * linux-low.h: Remove obsolete prototypes.
21762 (struct linux_target_ops): New.
21763 (extern the_low_target): New.
21764 * linux-low.c (num_regs, regmap): Remove declarations.
21765 (register_addr): Use the_low_target explicitly.
21766 (fetch_register): Likewise.
21767 (usr_fetch_inferior_registers): Likewise.
21768 (usr_store_inferior_registers): Likewise.
21769 * linux-arm-low.c (num_regs): Remove.
21770 (arm_num_regs): Define.
21771 (arm_regmap): Renamed from regmap, made static.
21772 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21773 made static.
21774 (arm_cannot_store_register): Renamed from cannot_store_register,
21775 made static.
21776 (the_low_target): New.
21777 * linux-i386-low.c (num_regs): Remove.
21778 (i386_num_regs): Define.
21779 (i386_regmap): Renamed from regmap, made static.
21780 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21781 made static.
21782 (i386_cannot_store_register): Renamed from cannot_store_register,
21783 made static.
21784 (the_low_target): New.
21785 * linux-ia64-low.c (num_regs): Remove.
21786 (ia64_num_regs): Define.
21787 (ia64_regmap): Renamed from regmap, made static.
21788 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21789 made static.
21790 (ia64_cannot_store_register): Renamed from cannot_store_register,
21791 made static.
21792 (the_low_target): New.
21793 * linux-m68k-low.c (num_regs): Remove.
21794 (m68k_num_regs): Define.
21795 (m68k_regmap): Renamed from regmap, made static.
21796 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21797 made static.
21798 (m68k_cannot_store_register): Renamed from cannot_store_register,
21799 made static.
21800 (the_low_target): New.
21801 * linux-mips-low.c (num_regs): Remove.
21802 (mips_num_regs): Define.
21803 (mips_regmap): Renamed from regmap, made static.
21804 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21805 made static.
21806 (mips_cannot_store_register): Renamed from cannot_store_register,
21807 made static.
21808 (the_low_target): New.
21809 * linux-ppc-low.c (num_regs): Remove.
21810 (ppc_num_regs): Define.
21811 (ppc_regmap): Renamed from regmap, made static.
21812 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21813 made static.
21814 (ppc_cannot_store_register): Renamed from cannot_store_register,
21815 made static.
21816 (the_low_target): New.
21817 * linux-s390-low.c (num_regs): Remove.
21818 (s390_num_regs): Define.
21819 (s390_regmap): Renamed from regmap, made static.
21820 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21821 made static.
21822 (s390_cannot_store_register): Renamed from cannot_store_register,
21823 made static.
21824 (the_low_target): New.
21825 * linux-sh-low.c (num_regs): Remove.
21826 (sh_num_regs): Define.
21827 (sh_regmap): Renamed from regmap, made static.
21828 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21829 made static.
21830 (sh_cannot_store_register): Renamed from cannot_store_register,
21831 made static.
21832 (the_low_target): New.
21833 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21834 (the_low_target): New.
21835
218362002-04-09 Daniel Jacobowitz <drow@mvista.com>
21837
21838 * Makefile.in: Add stamp-h target.
21839 * configure.in: Create stamp-h.
21840 * configure: Regenerated.
21841
218422002-04-09 Daniel Jacobowitz <drow@mvista.com>
21843
21844 * inferiors.c: New file.
21845 * target.c: New file.
21846 * target.h: New file.
21847 * Makefile.in: Add target.o and inferiors.o. Update
21848 dependencies.
21849 * linux-low.c (inferior_pid): New static variable,
21850 moved from server.c.
21851 (linux_create_inferior): Renamed from create_inferior.
21852 Call add_inferior. Return 0 on success instead of a PID.
21853 (linux_attach): Renamed from myattach.
21854 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21855 (linux_thread_alive): Renamed from mythread_alive.
21856 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21857 child dies.
21858 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21859 (regsets_store_inferior_registers): Correct error message.
21860 Add missing ``return 0''.
21861 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21862 (linux_store_registers): Renamed from store_inferior_registers.
21863 (linux_read_memory): Renamed from read_inferior_memory.
21864 (linux_write_memory): Renamed from write_inferior_memory.
21865 (linux_target_ops): New structure.
21866 (initialize_low): Call set_target_ops ().
21867 * remote-utils.c (unhexify): New function.
21868 (hexify): New function.
21869 (input_interrupt): Send signals to ``signal_pid''.
21870 * server.c (inferior_pid): Remove.
21871 (start_inferior): Update create_inferior call.
21872 (attach_inferior): Call add_inferior.
21873 (handle_query): New function.
21874 (main): Call handle_query for `q' packets.
21875 * server.h: Include "target.h". Remove obsolete prototypes.
21876 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21877
218782002-04-09 Daniel Jacobowitz <drow@mvista.com>
21879
21880 * Makefile.in: Add WARN_CFLAGS. Update configury
21881 dependencies.
21882 * configure.in: Check for <string.h>
21883 * configure: Regenerate.
21884 * config.in: Regenerate.
21885 * gdbreplay.c: Include needed system headers.
21886 (remote_open): Remove strchr prototype.
21887 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21888 * regcache.c (supply_register): Change buf argument to const void *.
21889 (supply_register_by_name): Likewise.
21890 (collect_register): Change buf argument to void *.
21891 (collect_register_by_name): Likewise.
21892 * regcache.h: Add missing prototypes.
21893 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21894 * server.c (handle_query): New function.
21895 (attached): New static variable, moved out of main.
21896 (main): Quiet longjmp clobber warnings.
21897 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21898 * utils.c (error): Remove NORETURN.
21899 (fatal): Likewise.
This page took 0.104563 seconds and 4 git commands to generate.