1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn the 'decr_pc_after_break' linux_target_ops field into
4 a method of linux_process_target.
6 * linux-low.h (struct linux_target_ops)
7 <decr_pc_after_break>: Remove.
8 (class linux_process_target) <low_decr_pc_after_break>: New method
10 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
11 New method implementation.
13 Update the users below.
15 (linux_process_target::save_stop_reason)
16 (linux_process_target::wait_1)
17 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
19 (x86_target::low_decr_pc_after_break): New method implementation.
20 (the_low_target): Remove the field.
21 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
23 (bfin_target::low_decr_pc_after_break): New method implementation.
24 (the_low_target): Remove the field.
25 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
27 (m68k_target::low_decr_pc_after_break): New method implementation.
28 (the_low_target): Remove the field.
29 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
31 (s390_target::low_decr_pc_after_break): New method implementation.
32 (the_low_target): Remove the field.
33 * linux-aarch64-low.cc (the_low_target): Remove the field.
34 * linux-arm-low.cc (the_low_target): Remove the field.
35 * linux-cris-low.cc (the_low_target): Remove the field.
36 * linux-crisv32-low.cc (the_low_target): Remove the field.
37 * linux-m32r-low.cc (the_low_target): Remove the field.
38 * linux-mips-low.cc (the_low_target): Remove the field.
39 * linux-nios2-low.cc (the_low_target): Remove the field.
40 * linux-ppc-low.cc (the_low_target): Remove the field.
41 * linux-riscv-low.cc (the_low_target): Remove the field.
42 * linux-sh-low.cc (the_low_target): Remove the field.
43 * linux-sparc-low.cc (the_low_target): Remove the field.
44 * linux-tic6x-low.cc (the_low_target): Remove the field.
45 * linux-tile-low.cc (the_low_target): Remove the field.
46 * linux-xtensa-low.cc (the_low_target): Remove the field.
48 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
50 Remove the 'supports_software_single_step' linux target op and let
51 the concrete linux target define it by overriding the op in
52 process_stratum_target.
53 Turn the 'get_next_pcs' linux target op into a method of
56 * linux-low.h (struct linux_target_ops): Remove the ops.
57 (class linux_process_target) <supports_software_single_step>:
59 <low_get_next_pcs>: Declare.
60 * linux-low.cc (can_software_single_step): Remove.
61 (linux_process_target::low_get_next_pcs): Define.
62 (linux_process_target::supports_software_single_step): Remove.
64 Update the callers below.
66 (linux_process_target::handle_extended_wait)
67 (linux_process_target::wait_1)
68 (linux_process_target::install_software_single_step_breakpoints)
69 (linux_process_target::single_step)
70 (linux_process_target::thread_needs_step_over)
71 (linux_process_target::proceed_one_lwp)
72 (linux_process_target::supports_range_stepping)
74 * linux-x86-low.cc (the_low_target): Remove the op field.
75 * linux-aarch64-low.cc (the_low_target): Ditto.
76 * linux-bfin-low.cc (the_low_target): Ditto.
77 * linux-cris-low.cc (the_low_target): Ditto.
78 * linux-crisv32-low.cc (the_low_target): Ditto.
79 * linux-m32r-low.cc (the_low_target): Ditto.
80 * linux-m68k-low.cc (the_low_target): Ditto.
81 * linux-mips-low.cc (the_low_target): Ditto.
82 * linux-nios2-low.cc (the_low_target): Ditto.
83 * linux-ppc-low.cc (the_low_target): Ditto.
84 * linux-riscv-low.cc (the_low_target): Ditto.
85 * linux-s390-low.cc (the_low_target): Ditto.
86 * linux-sh-low.cc (the_low_target): Ditto.
87 * linux-sparc-low.cc (the_low_target): Ditto.
88 * linux-tic6x-low.cc (the_low_target): Ditto.
89 * linux-tile-low.cc (the_low_target): Ditto.
90 * linux-xtensa-low.cc (the_low_target): Ditto.
91 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
92 <supports_software_single_step>: Declare.
93 (arm_target::supports_software_single_step): Define.
94 (arm_gdbserver_get_next_pcs): Turn into...
95 (arm_target::low_get_next_pcs): ...this.
96 (the_low_target): Remove the op field.
98 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
100 Remove the 'sw_breakpoint_from_kind' linux target op, and let
101 the concrete linux target define it by overriding the op
102 in process_stratum_target.
104 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
106 * linux-low.h (struct linux_target_ops): Remove the op.
107 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
108 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
110 (x86_sw_breakpoint_from_kind): Turn into...
111 (x86_target::sw_breakpoint_from_kind): ...this.
112 (the_low_target): Remove the op field.
113 * linux-aarch64-low.cc (class aarch64_target)
114 <sw_breakpoint_from_kind>: Declare.
115 (aarch64_sw_breakpoint_from_kind): Turn into...
116 (aarch64_target::sw_breakpoint_from_kind): ...this.
117 (the_low_target): Remove the op field.
118 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
120 (arm_target::sw_breakpoint_from_kind): Define.
121 (the_low_target): Remove the op field.
122 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
124 (bfin_sw_breakpoint_from_kind): Turn into...
125 (bfin_target::sw_breakpoint_from_kind): ...this.
126 (the_low_target): Remove the op field.
127 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
129 (cris_sw_breakpoint_from_kind): Turn into...
130 (cris_target::sw_breakpoint_from_kind): ...this.
131 (the_low_target): Remove the op field.
132 * linux-crisv32-low.cc (class crisv32_target)
133 <sw_breakpoint_from_kind>: Declare.
134 (cris_sw_breakpoint_from_kind): Turn into...
135 (crisv32_target::sw_breakpoint_from_kind): ...this.
136 (the_low_target): Remove the op field.
137 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
139 (ia64_target::sw_breakpoint_from_kind): Define.
140 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
142 (m32r_sw_breakpoint_from_kind): Turn into...
143 (m32r_target::sw_breakpoint_from_kind): ...this.
144 (the_low_target): Remove the op field.
145 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
147 (m68k_sw_breakpoint_from_kind): Turn into...
148 (m68k_target::sw_breakpoint_from_kind): ...this.
149 (the_low_target): Remove the op field.
150 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
152 (mips_sw_breakpoint_from_kind): Turn into...
153 (mips_target::sw_breakpoint_from_kind): ...this.
154 (the_low_target): Remove the op field.
155 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
157 (nios2_sw_breakpoint_from_kind): Turn into...
158 (nios2_target::sw_breakpoint_from_kind): ...this.
159 (the_low_target): Remove the op field.
160 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
162 (ppc_sw_breakpoint_from_kind): Turn into...
163 (ppc_target::sw_breakpoint_from_kind): ...this.
164 (the_low_target): Remove the op field.
165 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
167 (riscv_sw_breakpoint_from_kind): Turn into...
168 (riscv_target::sw_breakpoint_from_kind): ...this.
169 (the_low_target): Remove the op field.
170 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
172 (s390_sw_breakpoint_from_kind): Turn into...
173 (s390_target::sw_breakpoint_from_kind): ...this.
174 (the_low_target): Remove the op field.
175 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
177 (sh_sw_breakpoint_from_kind): Turn into...
178 (sh_target::sw_breakpoint_from_kind): ...this.
179 (the_low_target): Remove the op field.
180 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
182 (sparc_sw_breakpoint_from_kind): Turn into...
183 (sparc_target::sw_breakpoint_from_kind): ...this.
184 (the_low_target): Remove the op field.
185 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
187 (tic6x_sw_breakpoint_from_kind): Turn into...
188 (tic6x_target::sw_breakpoint_from_kind): ...this.
189 (the_low_target): Remove the op field.
190 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
192 (tile_sw_breakpoint_from_kind): Turn into...
193 (tile_target::sw_breakpoint_from_kind): ...this.
194 (the_low_target): Remove the op field.
195 * linux-xtensa-low.cc (class xtensa_target)
196 <sw_breakpoint_from_kind>: Declare.
197 (xtensa_sw_breakpoint_from_kind): Turn into...
198 (xtensa_target::sw_breakpoint_from_kind): ...this.
199 (the_low_target): Remove the op field.
201 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
203 Remove the 'breakpoint_kind_from_pc' and
204 'breakpoint_kind_from_current_state' linux target ops, and let the
205 concrete linux target define them by overriding the ops of
206 process_stratum_target.
208 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
210 (linux_process_target::breakpoint_kind_from_current_state): Remove.
211 * linux-low.h (struct linux_target_ops): Remove ops.
212 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
213 <breakpoint_kind_from_current_state>: Remove.
214 * linux-x86-low.cc (the_low_target): Remove the op fields.
215 * linux-bfin-low.cc (the_low_target): Ditto.
216 * linux-cris-low.cc (the_low_target): Ditto.
217 * linux-crisv32-low.cc (the_low_target): Ditto.
218 * linux-m32r-low.cc (the_low_target): Ditto.
219 * linux-m68k-low.cc (the_low_target): Ditto.
220 * linux-mips-low.cc (the_low_target): Ditto.
221 * linux-nios2-low.cc (the_low_target): Ditto.
222 * linux-ppc-low.cc (the_low_target): Ditto.
223 * linux-s390-low.cc (the_low_target): Ditto.
224 * linux-sh-low.cc (the_low_target): Ditto.
225 * linux-sparc-low.cc (the_low_target): Ditto.
226 * linux-tic6x-low.cc (the_low_target): Ditto.
227 * linux-tile-low.cc (the_low_target): Ditto.
228 * linux-xtensa-low.cc (the_low_target): Ditto.
229 * linux-aarch64-low.cc (class aarch64_target)
230 <breakpoint_kind_from_pc>
231 <breakpoint_kind_from_current_state>: Declare.
232 (aarch64_breakpoint_kind_from_pc): Turn into...
233 (aarch64_target::breakpoint_kind_from_pc): ...this.
234 (aarch64_breakpoint_kind_from_current_state): Turn into...
235 (aarch64_target::breakpoint_kind_from_current_state): ...this.
236 (the_low_target): Remove the op fields.
237 * linux-arm-low.cc (class arm_target):
238 <breakpoint_kind_from_pc>
239 <breakpoint_kind_from_current_state>: Declare.
240 (arm_target::breakpoint_kind_from_pc): Define.
241 (arm_target::breakpoint_kind_from_current_state): Define.
242 (the_low_target): Remove the op fields.
243 * linux-riscv-low.cc (class riscv_target):
244 <breakpoint_kind_from_pc>: Declare.
245 (riscv_breakpoint_kind_from_pc): Turn into...
246 (riscv_target::breakpoint_kind_from_pc): ...this.
247 (the_low_target): Remove the op fields.
249 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
251 Turn the 'get_pc' and 'set_pc' linux target ops into methods
252 of linux_process_target.
254 * linux-low.h (struct linux_target_ops): Remove the ops.
255 (class linux_process_target) <low_supports_breakpoints>
257 <low_set_pc>: Declare.
258 * linux-low.cc (supports_breakpoints): Turn into...
259 (linux_process_target::low_supports_breakpoints): ...this.
260 (linux_process_target::low_get_pc): Define.
261 (linux_process_target::low_set_pc): Define.
263 Update the callers below.
265 (linux_process_target::get_pc)
266 (linux_process_target::save_stop_reason)
267 (linux_process_target::maybe_move_out_of_jump_pad)
268 (linux_process_target::wait_1)
269 (linux_process_target::resume_one_lwp_throw)
270 (linux_process_target::resume)
271 (linux_process_target::proceed_all_lwps)
272 (linux_process_target::read_pc)
273 (linux_process_target::write_pc)
275 * linux-x86-low.cc (class linux_process_target)
276 <low_supports_breakpoints>
278 <low_set_pc>: Declare.
279 (x86_target::low_supports_breakpoints): Define.
280 (x86_get_pc): Turn into...
281 (x86_target::low_get_pc): ...this.
282 (x86_set_pc): Turn into...
283 (x86_target::low_set_pc): ...this.
284 (the_low_target): Remove the op fields.
285 * linux-arm-low.cc (class arm_target)
286 <low_supports_breakpoints>
288 <low_set_pc>: Declare.
289 (arm_target::low_supports_breakpoints)
290 (arm_target::low_get_pc)
291 (arm_target::low_set_pc): Define.
292 (the_low_target): Remove the op fields.
293 * linux-bfin-low.cc (class bfin_target)
294 <low_supports_breakpoints>
296 <low_set_pc>: Declare.
297 (bfin_target::low_supports_breakpoints)
298 (bfin_target::low_get_pc)
299 (bfin_target::low_set_pc): Define.
300 (the_low_target): Remove the op fields.
301 * linux-cris-low.cc (class cris_target)
302 <low_supports_breakpoints>
304 <low_set_pc>: Declare.
305 (cris_target::low_supports_breakpoints)
306 (cris_target::low_get_pc)
307 (cris_target::low_set_pc): Define.
308 (the_low_target): Remove the op fields.
309 * linux-crisv32-low.cc (class crisv32_target)
310 <low_supports_breakpoints>
312 <low_set_pc>: Declare.
313 (crisv32_target::low_supports_breakpoints)
314 (crisv32_target::low_get_pc)
315 (crisv32_target::low_set_pc): Define.
316 (the_low_target): Remove the op fields.
317 * linux-m32r-low.cc (class m32r_target)
318 <low_supports_breakpoints>
320 <low_set_pc>: Declare.
321 (m32r_target::low_supports_breakpoints)
322 (m32r_target::low_get_pc)
323 (m32r_target::low_set_pc): Define.
324 (the_low_target): Remove the op fields.
325 * linux-m68k-low.cc (class m68k_target)
326 <low_supports_breakpoints>
328 <low_set_pc>: Declare.
329 (m68k_target::low_supports_breakpoints)
330 (m68k_target::low_get_pc)
331 (m68k_target::low_set_pc): Define.
332 (the_low_target): Remove the op fields.
333 * linux-nios2-low.cc (class nios2_target)
334 <low_supports_breakpoints>
336 <low_set_pc>: Declare.
337 (nios2_target::low_supports_breakpoints)
338 (nios2_target::low_get_pc)
339 (nios2_target::low_set_pc): Define.
340 (the_low_target): Remove the op fields.
341 * linux-sh-low.cc (class sh_target)
342 <low_supports_breakpoints>
344 <low_set_pc>: Declare.
345 (sh_target::low_supports_breakpoints)
346 (sh_target::low_get_pc)
347 (sh_target::low_set_pc): Define.
348 (the_low_target): Remove the op fields.
349 * linux-xtensa-low.cc (class xtensa_target)
350 <low_supports_breakpoints>
352 <low_set_pc>: Declare.
353 (xtensa_target::low_supports_breakpoints)
354 (xtensa_target::low_get_pc)
355 (xtensa_target::low_set_pc): Define.
356 (the_low_target): Remove the op fields.
357 * linux-sparc-low.cc (class sparc_target)
358 <low_supports_breakpoints>
359 <low_get_pc>: Declare.
360 (sparc_target::low_supports_breakpoints)
361 (sparc_target::low_get_pc): Define.
362 (the_low_target): Remove the op fields.
363 * linux-tile-low.cc (class tile_target)
364 <low_supports_breakpoints>
366 <low_set_pc>: Declare.
367 (tile_target::low_supports_breakpoints)
368 (tile_target::low_get_pc)
369 (tile_target::low_set_pc): Define.
370 (the_low_target): Remove the op fields.
371 * linux-aarch64-low.cc (class aarch64_target)
372 <low_supports_breakpoints>
374 <low_set_pc>: Declare.
375 (aarch64_target::low_supports_breakpoints): Define.
376 (aarch64_get_pc): Turn into...
377 (aarch64_target::low_get_pc): ...this.
378 (aarch64_set_pc): Turn into...
379 (aarch64_target::low_set_pc): ...this.
380 (the_low_target): Remove the op fields.
381 * linux-mips-low.cc (class mips_target)
382 <low_supports_breakpoints>
384 <low_set_pc>: Declare.
385 (mips_target::low_supports_breakpoints): Define.
386 (mips_get_pc): Turn into...
387 (mips_target::low_get_pc): ...this.
388 (mips_set_pc): Turn into...
389 (mips_target::low_set_pc): ...this.
390 (the_low_target): Remove the op fields.
391 * linux-ppc-low.cc (class ppc_target)
392 <low_supports_breakpoints>
394 <low_set_pc>: Declare.
395 (ppc_target::low_supports_breakpoints): Define.
396 (ppc_get_pc): Turn into...
397 (ppc_target::low_get_pc): ...this.
398 (ppc_set_pc): Turn into...
399 (ppc_target::low_set_pc): ...this.
400 (the_low_target): Remove the op fields.
401 * linux-riscv-low.cc (class riscv_target)
402 <low_supports_breakpoints>
404 <low_set_pc>: Declare.
405 (riscv_target::low_supports_breakpoints): Define.
406 (riscv_get_pc): Turn into...
407 (riscv_target::low_get_pc): ...this.
408 (riscv_set_pc): Turn into...
409 (riscv_target::low_set_pc): ...this.
410 (the_low_target): Remove the op fields.
411 * linux-s390-low.cc (class s390_target)
412 <low_supports_breakpoints>
414 <low_set_pc>: Declare.
415 (s390_target::low_supports_breakpoints): Define.
416 (s390_get_pc): Turn into...
417 (s390_target::low_get_pc): ...this.
418 (s390_set_pc): Turn into...
419 (s390_target::low_set_pc): ...this.
420 (the_low_target): Remove the op fields.
421 * linux-tic6x-low.cc (class tic6x_target)
422 <low_supports_breakpoints>
424 <low_set_pc>: Declare.
425 (tic6x_target::low_supports_breakpoints): Define.
426 (tic6x_get_pc): Turn into...
427 (tic6x_target::low_get_pc): ...this.
428 (tic6x_set_pc): Turn into...
429 (tic6x_target::low_set_pc): ...this.
430 (the_low_target): Remove the op fields.
432 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
434 Turn some more static methods in linux-low into private methods
435 of linux_process_target.
437 * linux-low.cc (get_pc): Turn into...
438 (linux_process_target::get_pc): ...this.
439 (save_stop_reason): Turn into...
440 (linux_process_target::save_stop_reason): ...this.
441 (thread_still_has_status_pending_p): Turn into...
442 (linux_process_target::thread_still_has_status_pending): ...this.
443 (status_pending_p_callback): Turn into...
444 (linux_process_target::status_pending_p_callback): ...this.
445 (resume_stopped_resumed_lwps): Turn into...
446 (linux_process_target::resume_stopped_resumed_lwps): ...this.
447 (install_software_single_step_breakpoints): Turn into...
448 (linux_process_target::install_software_single_step_breakpoints):
450 (single_step): Turn into...
451 (linux_process_target::single_step): ...this.
452 (linux_resume_one_lwp_throw): Turn into...
453 (linux_process_target::resume_one_lwp_throw): ...this.
454 (linux_resume_one_lwp): Turn into...
455 (linux_process_target::resume_one_lwp): ...this.
456 (resume_status_pending_p): Turn into...
457 (linux_process_target::resume_status_pending): ...this.
458 (need_step_over_p): Turn into...
459 (linux_process_target::thread_needs_step_over): ...this.
460 (linux_resume_one_thread): Turn into...
461 (linux_process_target::resume_one_thread): ...this.
462 (proceed_one_lwp): Turn into...
463 (linux_process_target::proceed_one_lwp): ...this.
464 (unsuspend_and_proceed_one_lwp): Turn into...
465 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
467 Update the calls/references to the above functions below.
469 (linux_process_target::handle_extended_wait)
470 (linux_process_target::filter_event)
471 (linux_process_target::wait_for_event_filtered)
472 (linux_process_target::wait_1)
473 (linux_process_target::move_out_of_jump_pad)
474 (linux_process_target::start_step_over)
475 (linux_process_target::resume)
476 (linux_process_target::proceed_all_lwps)
477 (regsets_store_inferior_registers)
478 (linux_process_target::store_register)
480 * linux-low.h (class linux_process_target)
483 <thread_still_has_status_pending>
484 <status_pending_p_callback>
485 <resume_stopped_resumed_lwps>
486 <install_software_single_step_breakpoints>
488 <resume_one_lwp_throw>
490 <resume_status_pending>
491 <thread_needs_step_over>
494 <unsuspend_and_proceed_one_lwp>: Declare.
496 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
498 Turn the 'fetch_register' linux target op into a method of
499 linux_process_target.
501 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
502 (class linux_process_target) <low_fetch_register>: Declare.
503 * linux-x86-low.cc (the_low_target)
504 * linux-aarch64-low.cc (the_low_target)
505 * linux-arm-low.cc (the_low_target)
506 * linux-bfin-low.cc (the_low_target)
507 * linux-cris-low.cc (the_low_target)
508 * linux-crisv32-low.cc (the_low_target)
509 * linux-m32r-low.cc (the_low_target)
510 * linux-m68k-low.cc (the_low_target)
511 * linux-nios2-low.cc (the_low_target)
512 * linux-ppc-low.cc (the_low_target)
513 * linux-s390-low.cc (the_low_target)
514 * linux-sh-low.cc (the_low_target)
515 * linux-sparc-low.cc (the_low_target)
516 * linux-tic6x-low.cc (the_low_target)
517 * linux-tile-low.cc (the_low_target)
518 * linux-xtensa-low.cc (the_low_target): Remove the op field.
519 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
521 (ia64_fetch_register): Turn into...
522 (ia64_target::low_fetch_register): ...this.
523 (the_low_target): Remove the op field.
524 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
526 (mips_fetch_register): Turn into...
527 (mips_target::low_fetch_register): ...this.
528 (the_low_target): Remove the op field.
529 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
531 (riscv_fetch_register): Turn into...
532 (riscv_target::low_fetch_register): ...this.
533 (the_low_target): Remove the op field.
535 Update the callers below.
537 * linux-low.cc (linux_process_target::fetch_registers)
538 (linux_process_target::low_fetch_register)
540 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
542 Turn the 'cannot_fetch_register' and 'cannot_store_register'
543 linux target ops into methods of linux_process_target.
545 * linux-low.h (struct linux_target_ops): Remove the low target ops.
546 (class linux_process_target) <fetch_register>
548 <usr_fetch_inferior_registers>
549 <usr_store_inferior_registers>
550 <low_cannot_fetch_register>
551 <low_cannot_fetch_register> Declare.
552 * linux-low.cc (fetch_register): Turn into...
553 (linux_process_target::fetch_register): ...this.
554 (store_register): Turn into ...
555 (linux_process_target::store_register): ...this.
556 (usr_fetch_inferior_registers): Turn into...
557 (linux_process_target::usr_fetch_inferior_registers): ...this.
558 (usr_store_inferior_registers): Turn into...
559 (linux_process_target::usr_store_inferior_registers): ...this.
560 * linux-x86-low.cc (class x86_target)
561 <low_cannot_fetch_register>
562 <low_cannot_store_register>: Declare.
563 (x86_cannot_store_register): Turn into...
564 (x86_target::low_cannot_store_register): ...this.
565 (x86_cannot_fetch_register): Turn into...
566 (x86_target::low_cannot_fetch_register): ...this.
567 (the_low_target): Remove the target op fields.
568 * linux-aarch64-low.cc (class aarch64_target)
569 <low_cannot_fetch_register>
570 <low_cannot_store_register>: Declare.
571 (aarch64_target::low_cannot_fetch_register)
572 (aarch64_target::low_cannot_store_register): Define.
573 (the_low_target): Remove the op fields.
574 * linux-arm-low.cc (class arm_target)
575 <low_cannot_fetch_register>
576 <low_cannot_store_register>: Declare.
577 (arm_cannot_fetch_register): Turn into...
578 (arm_target::low_cannot_fetch_register): ...this.
579 (arm_cannot_store_register): Turn into...
580 (arm_target::low_cannot_store_register): ...this.
581 (the_low_target): Remove the op fields.
582 * linux-bfin-low.cc (class bfin_target)
583 <low_cannot_fetch_register>
584 <low_cannot_store_register>: Declare.
585 (bfin_cannot_fetch_register): Turn into...
586 (bfin_target::low_cannot_fetch_register): ...this.
587 (bfin_cannot_store_register): Turn into...
588 (bfin_target::low_cannot_store_register): ...this.
589 (the_low_target): Remove the op fields.
590 * linux-cris-low.cc (class cris_target)
591 <low_cannot_fetch_register>
592 <low_cannot_store_register>: Declare.
593 (cris_cannot_fetch_register): Turn into...
594 (cris_target::low_cannot_fetch_register): ...this.
595 (cris_cannot_store_register): Turn into...
596 (cris_target::low_cannot_store_register): ...this.
597 (the_low_target): Remove the op fields.
598 * linux-crisv32-low.cc (class crisv32_target)
599 <low_cannot_fetch_register>
600 <low_cannot_store_register>: Declare.
601 (crisv32_target::low_cannot_fetch_register)
602 (crisv32_target::low_cannot_store_register): Define.
603 (the_low_target): Remove the op fields.
604 * linux-ia64-low.cc (class ia64_target)
605 <low_cannot_fetch_register>
606 <low_cannot_store_register>: Declare.
607 (ia64_cannot_fetch_register): Turn into...
608 (ia64_target::low_cannot_fetch_register): ...this.
609 (ia64_cannot_store_register): Turn into...
610 (ia64_target::low_cannot_store_register): ...this.
611 (the_low_target): Remove the op fields.
612 * linux-m32r-low.cc (class m32r_target)
613 <low_cannot_fetch_register>
614 <low_cannot_store_register>: Declare.
615 (m32r_cannot_fetch_register): Turn into...
616 (m32r_target::low_cannot_fetch_register): ...this.
617 (m32r_cannot_store_register): Turn into...
618 (m32r_target::low_cannot_store_register): ...this.
619 (the_low_target): Remove the op fields.
620 * linux-m68k-low.cc (class m68k_target)
621 <low_cannot_fetch_register>
622 <low_cannot_store_register>: Declare.
623 (m68k_cannot_fetch_register): Turn into...
624 (m68k_target::low_cannot_fetch_register): ...this.
625 (m68k_cannot_store_register): Turn into...
626 (m68k_target::low_cannot_store_register): ...this.
627 (the_low_target): Remove the op fields.
628 * linux-mips-low.cc (class mips_target)
629 <low_cannot_fetch_register>
630 <low_cannot_store_register>: Declare.
631 (mips_cannot_fetch_register): Turn into...
632 (mips_target::low_cannot_fetch_register): ...this.
633 (mips_cannot_store_register): Turn into...
634 (mips_target::low_cannot_store_register): ...this.
635 (get_usrregs_info): Inline at the call sites in
636 low_cannot_fetch_register and low_cannot_store_register,
638 (the_low_target): Remove the op fields.
639 * linux-nios2-low.cc (class nios2_target)
640 <low_cannot_fetch_register>
641 <low_cannot_store_register>: Declare.
642 (nios2_cannot_fetch_register): Turn into...
643 (nios2_target::low_cannot_fetch_register): ...this.
644 (nios2_cannot_store_register): Turn into...
645 (nios2_target::low_cannot_store_register): ...this.
646 (the_low_target): Remove the op fields.
647 * linux-ppc-low.cc (class ppc_target)
648 <low_cannot_fetch_register>
649 <low_cannot_store_register>: Declare.
650 (ppc_cannot_fetch_register): Turn into...
651 (ppc_target::low_cannot_fetch_register): ...this.
652 (ppc_cannot_store_register): Turn into...
653 (ppc_target::low_cannot_store_register): ...this.
654 (the_low_target): Remove the op fields.
655 * linux-riscv-low.cc (class riscv_target)
656 <low_cannot_fetch_register>
657 <low_cannot_store_register>: Declare.
658 (riscv_target::low_cannot_fetch_register)
659 (riscv_target::low_cannot_store_register): Define.
660 (the_low_target): Remove the op fields.
661 * linux-s390-low.cc (class s390_target)
662 <low_cannot_fetch_register>
663 <low_cannot_store_register>: Declare.
664 (s390_cannot_fetch_register): Turn into...
665 (s390_target::low_cannot_fetch_register): ...this.
666 (s390_cannot_store_register): Turn into...
667 (s390_target::low_cannot_store_register): ...this.
668 (the_low_target): Remove the op fields.
669 * linux-sh-low.cc (class sh_target)
670 <low_cannot_fetch_register>
671 <low_cannot_store_register>: Declare.
672 (sh_cannot_fetch_register): Turn into...
673 (sh_target::low_cannot_fetch_register): ...this.
674 (sh_cannot_store_register): Turn into...
675 (sh_target::low_cannot_store_register): ...this.
676 (the_low_target): Remove the op fields.
677 * linux-sparc-low.cc (class sparc_target)
678 <low_cannot_fetch_register>
679 <low_cannot_store_register>: Declare.
680 (sparc_cannot_fetch_register): Turn into...
681 (sparc_target::low_cannot_fetch_register): ...this.
682 (sparc_cannot_store_register): Turn into...
683 (sparc_target::low_cannot_store_register): ...this.
684 (the_low_target): Remove the op fields.
685 * linux-tic6x-low.cc (class tic6x_target)
686 <low_cannot_fetch_register>
687 <low_cannot_store_register>: Declare.
688 (tic6x_cannot_fetch_register): Turn into...
689 (tic6x_target::low_cannot_fetch_register): ...this.
690 (tic6x_cannot_store_register): Turn into...
691 (tic6x_target::low_cannot_store_register): ...this.
692 (the_low_target): Remove the op fields.
693 * linux-tile-low.cc (class tile_target)
694 <low_cannot_fetch_register>
695 <low_cannot_store_register>: Declare.
696 (tile_cannot_fetch_register): Turn into...
697 (tile_target::low_cannot_fetch_register): ...this.
698 (tile_cannot_store_register): Turn into...
699 (tile_target::low_cannot_store_register): ...this.
700 (the_low_target): Remove the op fields.
701 * linux-xtensa-low.cc (class xtensa_target)
702 <low_cannot_fetch_register>
703 <low_cannot_store_register>: Declare.
704 (xtensa_target::low_cannot_fetch_register)
705 (xtensa_target::low_cannot_store_register): Define.
706 (the_low_target): Remove the op fields.
708 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
710 Turn the 'regs_info' linux target op into a method of
711 linux_process_target.
713 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
714 (class linux_process_target) <get_regs_info>: Define.
716 Update the callers below.
718 * linux-low.cc (linux_process_target::fetch_registers)
719 (linux_process_target::store_registers)
720 * proc-service.cc (gregset_info)
722 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
723 (x86_linux_regs_info): Turn into ...
724 (x86_target::get_regs_info): ...this.
725 (the_low_target): Remove the op field.
726 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
728 (aarch64_regs_info): Turn into ...
729 (aarch64_target::get_regs_info): ...this.
730 (the_low_target): Remove the op field.
731 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
732 (arm_regs_info): Turn into ...
733 (arm_target::get_regs_info): ...this.
734 (the_low_target): Remove the op field.
735 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
736 (bfin_regs_info): Turn into ...
737 (bfin_target::get_regs_info): ...this.
738 (the_low_target): Remove the op field.
739 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
740 (cris_regs_info): Turn into ...
741 (cris_target::get_regs_info): ...this.
742 (the_low_target): Remove the op field.
743 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
745 (crisv32_regs_info): Turn into ...
746 (crisv32_target::get_regs_info): ...this.
747 (the_low_target): Remove the op field.
748 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
749 (ia64_regs_info): Turn into ...
750 (ia64_target::get_regs_info): ...this.
751 (the_low_target): Remove the op field.
752 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
753 (m32r_regs_info): Turn into ...
754 (m32r_target::get_regs_info): ...this.
755 (the_low_target): Remove the op field.
756 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
757 (m68k_regs_info): Turn into ...
758 (m68k_target::get_regs_info): ...this.
759 (the_low_target): Remove the op field.
760 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
761 (mips_regs_info): Turn into ...
762 (mips_target::get_regs_info): ...this.
763 (the_low_target): Remove the op field.
764 (get_usrregs_info): Update the call to the op.
765 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
766 (nios2_regs_info): Turn into ...
767 (nios2_target::get_regs_info): ...this.
768 (the_low_target): Remove the op field.
769 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
770 (ppc_regs_info): Turn into ...
771 (ppc_target::get_regs_info): ...this.
772 (the_low_target): Remove the op field.
773 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
774 (riscv_regs_info): Turn into ...
775 (riscv_target::get_regs_info): ...this.
776 (the_low_target): Remove the op field.
777 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
778 (s390_regs_info): Turn into ...
779 (s390_target::get_regs_info): ...this.
780 (the_low_target): Remove the op field.
781 (s390_collect_ptrace_register)
782 (s390_supply_ptrace_register)
783 (s390_fill_gregset): Update the call to the op.
784 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
785 (sh_regs_info): Turn into ...
786 (sh_target::get_regs_info): ...this.
787 (the_low_target): Remove the op field.
788 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
789 (sparc_regs_info): Turn into ...
790 (sparc_target::get_regs_info): ...this.
791 (the_low_target): Remove the op field.
792 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
793 (tic6x_regs_info): Turn into ...
794 (tic6x_target::get_regs_info): ...this.
795 (the_low_target): Remove the op field.
796 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
797 (tile_regs_info): Turn into ...
798 (tile_target::get_regs_info): ...this.
799 (the_low_target): Remove the op field.
800 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
802 (xtensa_regs_info): Turn into ...
803 (xtensa_target::get_regs_info): ...this.
804 (the_low_target): Remove the op field.
806 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
808 Turn the 'arch_setup' linux target op into a method of
809 linux_process_target.
811 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
812 (class linux_process_target) <arch_setup_thread>
813 <low_arch_setup>: New declarations.
814 * linux-low.cc (linux_arch_setup): Delete.
815 (linux_arch_setup_thread): Turn into...
816 (linux_process_target::arch_setup_thread): ... this.
818 Update the callers below.
820 (linux_process_target::handle_extended_wait)
821 (linux_process_target::post_create_inferior)
822 (linux_process_target::filter_event)
824 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
826 (x86_linux_update_xmltarget): Turn into...
827 (x86_target::update_xmltarget): ...this.
828 (x86_linux_process_qsupported): Update the call to
829 x86_linux_update_xmltarget.
830 (x86_arch_setup): Turn into ...
831 (x86_target::low_arch_setup): ...this.
832 (the_low_target): Remove the op field.
833 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
835 (aarch64_arch_setup): Turn into ...
836 (aarch64_target::low_arch_setup): ...this.
837 (the_low_target): Remove the op field.
838 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
840 (arm_arch_setup): Turn into ...
841 (arm_target::low_arch_setup): ...this.
842 (the_low_target): Remove the op field.
843 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
845 (bfin_arch_setup): Turn into ...
846 (bfin_target::low_arch_setup): ...this.
847 (the_low_target): Remove the op field.
848 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
850 (cris_arch_setup): Turn into ...
851 (cris_target::low_arch_setup): ...this.
852 (the_low_target): Remove the op field.
853 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
855 (crisv32_arch_setup): Turn into ...
856 (crisv32_target::low_arch_setup): ...this.
857 (the_low_target): Remove the op field.
858 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
860 (ia64_arch_setup): Turn into ...
861 (ia64_target::low_arch_setup): ...this.
862 (the_low_target): Remove the op field.
863 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
865 (m32r_arch_setup): Turn into ...
866 (m32r_target::low_arch_setup): ...this.
867 (the_low_target): Remove the op field.
868 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
870 (m68k_arch_setup): Turn into ...
871 (m68k_target::low_arch_setup): ...this.
872 (the_low_target): Remove the op field.
873 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
875 (mips_arch_setup): Turn into ...
876 (mips_target::low_arch_setup): ...this.
877 (the_low_target): Remove the op field.
878 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
880 (nios2_arch_setup): Turn into ...
881 (nios2_target::low_arch_setup): ...this.
882 (the_low_target): Remove the op field.
883 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
885 (ppc_arch_setup): Turn into ...
886 (ppc_target::low_arch_setup): ...this.
887 (the_low_target): Remove the op field.
888 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
890 (riscv_arch_setup): Turn into ...
891 (riscv_target::low_arch_setup): ...this.
892 (the_low_target): Remove the op field.
893 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
895 (s390_arch_setup): Turn into ...
896 (s390_target::low_arch_setup): ...this.
897 (the_low_target): Remove the op field.
898 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
900 (sh_arch_setup): Turn into ...
901 (sh_target::low_arch_setup): ...this.
902 (the_low_target): Remove the op field.
903 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
905 (sparc_arch_setup): Turn into ...
906 (sparc_target::low_arch_setup): ...this.
907 (the_low_target): Remove the op field.
908 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
910 (tic6x_arch_setup): Turn into ...
911 (tic6x_target::low_arch_setup): ...this.
912 (the_low_target): Remove the op field.
913 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
915 (tile_arch_setup): Turn into ...
916 (tile_target::low_arch_setup): ...this.
917 (the_low_target): Remove the op field.
918 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
920 (xtensa_arch_setup): Turn into ...
921 (xtensa_target::low_arch_setup): ...this.
922 (the_low_target): Remove the op field.
924 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
926 * linux-low.h (the_linux_target): New extern declaration.
927 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
929 (the_linux_target): Remove.
930 * linux-x86-low.cc (class x86_target): New class.
931 (the_x86_target): New static object.
932 (the_linux_target): Define as pointer to the_x86_target.
933 * linux-aarch64-low.cc (class aarch64_target): New class.
934 (the_aarch64_target): New static object.
935 (the_linux_target): Define as pointer to the_aarch64_target.
936 * linux-arm-low.cc (class arm_target): New class.
937 (the_arm_target): New static object.
938 (the_linux_target): Define as pointer to the_arm_target.
939 * linux-bfin-low.cc (class bfin_target): New class.
940 (the_bfin_target): New static object.
941 (the_linux_target): Define as pointer to the_bfin_target.
942 * linux-cris-low.cc (class cris_target): New class.
943 (the_cris_target): New static object.
944 (the_linux_target): Define as pointer to the_cris_target.
945 * linux-crisv32-low.cc (class crisv32_target): New class.
946 (the_crisv32_target): New static object.
947 (the_linux_target): Define as pointer to the_crisv32_target.
948 * linux-ia64-low.cc (class ia64_target): New class.
949 (the_ia64_target): New static object.
950 (the_linux_target): Define as pointer to the_ia64_target.
951 * linux-m32r-low.cc (class m32r_target): New class.
952 (the_m32r_target): New static object.
953 (the_linux_target): Define as pointer to the_m32r_target.
954 * linux-m68k-low.cc (class m68k_target): New class.
955 (the_m68k_target): New static object.
956 (the_linux_target): Define as pointer to the_m68k_target.
957 * linux-mips-low.cc (class mips_target): New class.
958 (the_mips_target): New static object.
959 (the_linux_target): Define as pointer to the_mips_target.
960 * linux-nios2-low.cc (class nios2_target): New class.
961 (the_nios2_target): New static object.
962 (the_linux_target): Define as pointer to the_nios2_target.
963 * linux-ppc-low.cc (class ppc_target): New class.
964 (the_ppc_target): New static object.
965 (the_linux_target): Define as pointer to the_ppc_target.
966 * linux-riscv-low.cc (class riscv_target): New class.
967 (the_riscv_target): New static object.
968 (the_linux_target): Define as pointer to the_riscv_target.
969 * linux-s390-low.cc (class s390_target): New class.
970 (the_s390_target): New static object.
971 (the_linux_target): Define as pointer to the_s390_target.
972 * linux-sh-low.cc (class sh_target): New class.
973 (the_sh_target): New static object.
974 (the_linux_target): Define as pointer to the_sh_target.
975 * linux-sparc-low.cc (class sparc_target): New class.
976 (the_sparc_target): New static object.
977 (the_linux_target): Define as pointer to the_sparc_target.
978 * linux-tic6x-low.cc (class tic6x_target): New class.
979 (the_tic6x_target): New static object.
980 (the_linux_target): Define as pointer to the_tic6x_target.
981 * linux-tile-low.cc (class tile_target): New class.
982 (the_tile_target): New static object.
983 (the_linux_target): Define as pointer to the_tile_target.
984 * linux-xtensa-low.cc (class xtensa_target): New class.
985 (the_xtensa_target): New static object.
986 (the_linux_target): Define as pointer to the_xtensa_target.
988 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
990 Turn some static functions in linux-low.cc into private methods of
991 linux_process_target.
993 * linux-low.cc (handle_extended_wait): Turn into ...
994 (linux_process_target::handle_extended_wait): ...this. Call
995 'mourn' on 'this' object instead of 'the_target'.
996 (maybe_move_out_of_jump_pad): Turn into...
997 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
998 (linux_low_filter_event): Turn into...
999 (linux_process_target::filter_event): ...this.
1000 (linux_wait_for_event_filtered): Turn into...
1001 (linux_process_target::wait_for_event_filtered): ...this.
1002 (linux_wait_for_event): Turn into...
1003 (linux_process_target::wait_for_event): ...this.
1004 (linux_wait_1): Turn into...
1005 (linux_process_target::wait_1): ...this.
1006 (wait_for_sigstop): Turn into...
1007 (linux_process_target::wait_for_sigstop): ...this.
1008 (move_out_of_jump_pad_callback): Turn into...
1009 (linux_process_target::move_out_of_jump_pad): ...this.
1010 (stop_all_lwps): Turn into...
1011 (linux_process_target::stop_all_lwps): ...this.
1012 (start_step_over): Turn into...
1013 (linux_process_target::start_step_over): ...this.
1014 (complete_ongoing_step_over): Turn into...
1015 (linux_process_target::complete_ongoing_step_over): ...this.
1016 (proceed_all_lwps): Turn into...
1017 (linux_process_target::proceed_all_lwps): ...this.
1018 (unstop_all_lwps): Turn into...
1019 (linux_process_target::unstop_all_lwps): ...this.
1021 * linux-low.h (class linux_process_target)
1022 <handle_extended_wait>
1023 <maybe_move_out_of_jump_pad>
1025 <wait_for_event_filtered>
1029 <move_out_of_jump_pad>
1032 <complete_ongoing_step_over>
1034 <unstop_all_lwps>: Declare.
1036 Update the callers below.
1038 * linux-low.cc (linux_process_target::attach): Update.
1039 (linux_process_target::stabilize_threads): Ditto.
1040 (linux_process_target::wait): Ditto.
1042 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1044 * linux-low.h (struct linux_target_ops): Update the comment for
1045 'cannot_store_register' to return 0 or 1.
1046 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1049 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1051 * config.in: Re-generate.
1052 * configure: Re-generate.
1054 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1056 * regcache.cc (find_register_by_number): Update.
1057 * tdesc.cc (init_target_desc): Likewise.
1058 * tdesc.h (target_desc::reg_defs): Likewise.
1060 2020-03-12 Tom Tromey <tom@tromey.com>
1062 * configure: Rebuild.
1063 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1064 (WIN32APILIBS): New subst.
1065 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1067 (gdbsupport/%.o): Remove target.
1068 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1069 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1070 (WIN32APILIBS): New variable.
1071 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1072 (gdbreplay$(EXEEXT)): Likewise.
1074 2020-03-12 Tom Tromey <tom@tromey.com>
1076 * config.in, configure: Rebuild.
1077 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1078 * acinclude.m4: Include gettext-sister.m4.
1079 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1081 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1082 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1084 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1086 * acinclude.m4: Update path to selftest.m4.
1088 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1090 * configure.ac: Don't source bfd/development.sh, move
1091 GDB_AC_COMMON higher.
1092 * configure: Re-generate.
1094 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1096 * configure: Re-generate.
1098 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1100 * configure: Re-generate.
1102 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1104 * .dir-locals.el: New file.
1106 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1108 * .gitattributes: New file.
1110 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1112 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1113 reply into an S reply.
1114 * server.cc (disable_packet_T): New global.
1115 (captured_main): Set new global when appropriate.
1116 * server.h (disable_packet_T): Declare.
1118 2020-02-21 Tom Tromey <tom@tromey.com>
1120 * Makefile.in (mostlyclean): New target.
1122 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1124 * target.h (struct process_stratum_target): Remove.
1125 (class process_target): Rename to ...
1126 (class process_stratum_target): ... this.
1127 * linux-low.h (class linux_process_target): Derive from
1128 'process_stratum_target'.
1129 * linux-low.cc (linux_target_ops): Remove.
1130 (initialize_low): Set the_target to the singleton instance of
1131 linux_process_target.
1132 * lynx-low.h (class lynx_process_target): Derive from
1133 'process_stratum_target'.
1134 * lynx-low.cc (lynx_target_ops): Remove.
1135 (initialize_low): Set the_target to the singleton instance of
1136 lynx_process_target.
1137 * nto-low.h (class nto_process_target): Derive from
1138 'process_stratum_target'.
1139 * nto-low.cc (nto_target_ops): Remove.
1140 (initialize_low): Set the_target to the singleton instance of
1142 * win32-low.h (class win32_process_target): Derive from
1143 'process_stratum_target'.
1144 * win32-low.cc (win32_target_ops): Remove.
1145 (initialize_low): Set the_target to the singleton instance of
1146 win32_process_target.
1148 Replace 'the_target->pt' with 'the_target' in the uses below.
1150 * hostio.cc (hostio_error)
1155 * linux-aarch32-low.cc (arm_breakpoint_at)
1156 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1157 * linux-arm-low.cc (arm_sigreturn_next_pc)
1159 (arm_get_syscall_trapinfo)
1160 * linux-cris-low.cc (cris_breakpoint_at)
1161 * linux-crisv32-low.cc (cris_breakpoint_at)
1162 * linux-low.cc (handle_extended_wait)
1165 (linux_process_target::breakpoint_kind_from_pc)
1167 * linux-m32r-low.cc (m32r_breakpoint_at)
1168 * linux-mips-low.cc (mips_breakpoint_at)
1169 * linux-nios2-low.cc (nios2_breakpoint_at)
1170 * linux-ppc-low.cc (ppc_breakpoint_at)
1171 * linux-s390-low.cc (s390_get_hwcap)
1172 * linux-sh-low.cc (sh_breakpoint_at)
1173 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1174 (sparc_store_gregset_from_stack)
1175 (sparc_breakpoint_at)
1176 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1177 * linux-tile-low.cc (tile_breakpoint_at)
1178 * linux-x86-low.cc (x86_breakpoint_at)
1179 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1180 * mem-break.cc (bp_size)
1182 (insert_memory_breakpoint)
1183 (set_raw_breakpoint_at)
1184 (delete_raw_breakpoint)
1186 (uninsert_raw_breakpoint)
1187 (reinsert_raw_breakpoint)
1188 (validate_inserted_breakpoint)
1189 * regcache.cc (regcache_read_pc)
1191 * remote-utils.cc (putpkt_binary_1)
1194 (prepare_resume_reply)
1195 * server.cc (handle_general_set)
1198 (handle_qxfer_exec_file)
1199 (handle_qxfer_libraries_svr4)
1200 (handle_qxfer_osdata)
1201 (handle_qxfer_siginfo)
1202 (handle_qxfer_fdpic)
1206 (queue_stop_reply_callback)
1208 * target.cc (prepare_to_access_memory)
1209 (done_accessing_memory)
1210 (read_inferior_memory)
1211 (target_write_memory)
1212 (target_stop_and_wait)
1214 (target_mourn_inferior)
1215 (target_continue_no_signal)
1217 (target_supports_multi_process)
1220 (target_create_inferior)
1221 (target_post_create_inferior)
1223 (target_supports_fork_events)
1224 (target_supports_vfork_events)
1225 (target_supports_exec_events)
1226 (target_handle_new_gdb_connection)
1229 (fetch_inferior_registers)
1230 (store_inferior_registers)
1232 (target_supports_non_stop)
1234 (target_process_qsupported)
1235 (target_supports_catch_syscall)
1236 (target_get_ipa_tdesc_idx)
1237 (target_supports_tracepoints)
1238 (target_supports_fast_tracepoints)
1239 (target_get_min_fast_tracepoint_insn_len)
1240 (target_thread_stopped)
1242 (target_unpause_all)
1243 (target_stabilize_threads)
1244 (target_install_fast_tracepoint_jump_pad)
1246 (target_supports_disable_randomization)
1247 (target_supports_agent)
1248 (target_enable_btrace)
1249 (target_disable_btrace)
1250 (target_read_btrace)
1251 (target_read_btrace_conf)
1252 (target_supports_range_stepping)
1253 (target_supports_stopped_by_sw_breakpoint)
1254 (target_stopped_by_sw_breakpoint)
1255 (target_supports_stopped_by_hw_breakpoint)
1256 (target_supports_hardware_single_step)
1257 (target_stopped_by_hw_breakpoint)
1258 (target_breakpoint_kind_from_pc)
1259 (target_breakpoint_kind_from_current_state)
1260 (target_supports_software_single_step)
1261 (target_core_of_thread)
1262 (target_thread_name)
1263 (target_thread_handle)
1264 * win32-low.cc (do_initial_child_stuff)
1266 Rename target op default definitions listed below.
1268 * target.cc (process_target::post_create_inferior): Rename as ...
1269 (process_stratum_target::post_create_inferior): ... this.
1270 (process_target::prepare_to_access_memory): Rename as ...
1271 (process_stratum_target::prepare_to_access_memory): ... this.
1272 (process_target::done_accessing_memory): Rename as ...
1273 (process_stratum_target::done_accessing_memory): ... this.
1274 (process_target::look_up_symbols): Rename as ...
1275 (process_stratum_target::look_up_symbols): ... this.
1276 (process_target::supports_read_auxv): Rename as ...
1277 (process_stratum_target::supports_read_auxv): ... this.
1278 (process_target::read_auxv): Rename as ...
1279 (process_stratum_target::read_auxv): ... this.
1280 (process_target::supports_z_point_type): Rename as ...
1281 (process_stratum_target::supports_z_point_type): ... this.
1282 (process_target::insert_point): Rename as ...
1283 (process_stratum_target::insert_point): ... this.
1284 (process_target::remove_point): Rename as ...
1285 (process_stratum_target::remove_point): ... this.
1286 (process_target::stopped_by_sw_breakpoint): Rename as ...
1287 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1288 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1289 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1290 (process_target::stopped_by_hw_breakpoint): Rename as ...
1291 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1292 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1293 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1294 (process_target::supports_hardware_single_step): Rename as ...
1295 (process_stratum_target::supports_hardware_single_step): ... this.
1296 (process_target::stopped_by_watchpoint): Rename as ...
1297 (process_stratum_target::stopped_by_watchpoint): ... this.
1298 (process_target::stopped_data_address): Rename as ...
1299 (process_stratum_target::stopped_data_address): ... this.
1300 (process_target::supports_read_offsets): Rename as ...
1301 (process_stratum_target::supports_read_offsets): ... this.
1302 (process_target::read_offsets): Rename as ...
1303 (process_stratum_target::read_offsets): ... this.
1304 (process_target::supports_get_tls_address): Rename as ...
1305 (process_stratum_target::supports_get_tls_address): ... this.
1306 (process_target::get_tls_address): Rename as ...
1307 (process_stratum_target::get_tls_address): ... this.
1308 (process_target::hostio_last_error): Rename as ...
1309 (process_stratum_target::hostio_last_error): ... this.
1310 (process_target::supports_qxfer_osdata): Rename as ...
1311 (process_stratum_target::supports_qxfer_osdata): ... this.
1312 (process_target::qxfer_osdata): Rename as ...
1313 (process_stratum_target::qxfer_osdata): ... this.
1314 (process_target::supports_qxfer_siginfo): Rename as ...
1315 (process_stratum_target::supports_qxfer_siginfo): ... this.
1316 (process_target::qxfer_siginfo): Rename as ...
1317 (process_stratum_target::qxfer_siginfo): ... this.
1318 (process_target::supports_non_stop): Rename as ...
1319 (process_stratum_target::supports_non_stop): ... this.
1320 (process_target::async): Rename as ...
1321 (process_stratum_target::async): ... this.
1322 (process_target::start_non_stop): Rename as ...
1323 (process_stratum_target::start_non_stop): ... this.
1324 (process_target::supports_multi_process): Rename as ...
1325 (process_stratum_target::supports_multi_process): ... this.
1326 (process_target::supports_fork_events): Rename as ...
1327 (process_stratum_target::supports_fork_events): ... this.
1328 (process_target::supports_vfork_events): Rename as ...
1329 (process_stratum_target::supports_vfork_events): ... this.
1330 (process_target::supports_exec_events): Rename as ...
1331 (process_stratum_target::supports_exec_events): ... this.
1332 (process_target::handle_new_gdb_connection): Rename as ...
1333 (process_stratum_target::handle_new_gdb_connection): ... this.
1334 (process_target::handle_monitor_command): Rename as ...
1335 (process_stratum_target::handle_monitor_command): ... this.
1336 (process_target::core_of_thread): Rename as ...
1337 (process_stratum_target::core_of_thread): ... this.
1338 (process_target::supports_read_loadmap): Rename as ...
1339 (process_stratum_target::supports_read_loadmap): ... this.
1340 (process_target::read_loadmap): Rename as ...
1341 (process_stratum_target::read_loadmap): ... this.
1342 (process_target::process_qsupported): Rename as ...
1343 (process_stratum_target::process_qsupported): ... this.
1344 (process_target::supports_tracepoints): Rename as ...
1345 (process_stratum_target::supports_tracepoints): ... this.
1346 (process_target::read_pc): Rename as ...
1347 (process_stratum_target::read_pc): ... this.
1348 (process_target::write_pc): Rename as ...
1349 (process_stratum_target::write_pc): ... this.
1350 (process_target::supports_thread_stopped): Rename as ...
1351 (process_stratum_target::supports_thread_stopped): ... this.
1352 (process_target::thread_stopped): Rename as ...
1353 (process_stratum_target::thread_stopped): ... this.
1354 (process_target::supports_get_tib_address): Rename as ...
1355 (process_stratum_target::supports_get_tib_address): ... this.
1356 (process_target::get_tib_address): Rename as ...
1357 (process_stratum_target::get_tib_address): ... this.
1358 (process_target::pause_all): Rename as ...
1359 (process_stratum_target::pause_all): ... this.
1360 (process_target::unpause_all): Rename as ...
1361 (process_stratum_target::unpause_all): ... this.
1362 (process_target::stabilize_threads): Rename as ...
1363 (process_stratum_target::stabilize_threads): ... this.
1364 (process_target::supports_fast_tracepoints): Rename as ...
1365 (process_stratum_target::supports_fast_tracepoints): ... this.
1366 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1367 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1368 (process_target::emit_ops): Rename as ...
1369 (process_stratum_target::emit_ops): ... this.
1370 (process_target::supports_disable_randomization): Rename as ...
1371 (process_stratum_target::supports_disable_randomization): ... this.
1372 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1373 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1374 (process_target::qxfer_libraries_svr4): Rename as ...
1375 (process_stratum_target::qxfer_libraries_svr4): ... this.
1376 (process_target::supports_agent): Rename as ...
1377 (process_stratum_target::supports_agent): ... this.
1378 (process_target::enable_btrace): Rename as ...
1379 (process_stratum_target::enable_btrace): ... this.
1380 (process_target::disable_btrace): Rename as ...
1381 (process_stratum_target::disable_btrace): ... this.
1382 (process_target::read_btrace): Rename as ...
1383 (process_stratum_target::read_btrace): ... this.
1384 (process_target::read_btrace_conf): Rename as ...
1385 (process_stratum_target::read_btrace_conf): ... this.
1386 (process_target::supports_range_stepping): Rename as ...
1387 (process_stratum_target::supports_range_stepping): ... this.
1388 (process_target::supports_pid_to_exec_file): Rename as ...
1389 (process_stratum_target::supports_pid_to_exec_file): ... this.
1390 (process_target::pid_to_exec_file): Rename as ...
1391 (process_stratum_target::pid_to_exec_file): ... this.
1392 (process_target::supports_multifs): Rename as ...
1393 (process_stratum_target::supports_multifs): ... this.
1394 (process_target::multifs_open): Rename as ...
1395 (process_stratum_target::multifs_open): ... this.
1396 (process_target::multifs_unlink): Rename as ...
1397 (process_stratum_target::multifs_unlink): ... this.
1398 (process_target::multifs_readlink): Rename as ...
1399 (process_stratum_target::multifs_readlink): ... this.
1400 (process_target::breakpoint_kind_from_pc): Rename as ...
1401 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1402 (process_target::breakpoint_kind_from_current_state): Rename as ...
1403 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1404 (process_target::thread_name): Rename as ...
1405 (process_stratum_target::thread_name): ... this.
1406 (process_target::thread_handle): Rename as ...
1407 (process_stratum_target::thread_handle): ... this.
1408 (process_target::supports_software_single_step): Rename as ...
1409 (process_stratum_target::supports_software_single_step): ... this.
1410 (process_target::supports_catch_syscall): Rename as ...
1411 (process_stratum_target::supports_catch_syscall): ... this.
1412 (process_target::get_ipa_tdesc_idx): Rename as ...
1413 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1415 2020-02-20 Pedro Alves <palves@redhat.com>
1417 * target.cc (set_target_ops): Simply copy the given target pointer
1418 instead of creating a copy of the pointed object.
1420 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1422 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1425 * target.h (struct process_stratum_target): Remove the target op.
1426 (class process_target): Add the target op.
1427 (target_get_ipa_tdesc_idx): Update the macro.
1428 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1430 Update the derived classes and callers below.
1432 * linux-low.cc (linux_target_ops): Update.
1433 (linux_get_ipa_tdesc_idx): Turn into ...
1434 (linux_process_target::get_ipa_tdesc_idx): ... this.
1435 * linux-low.h (class linux_process_target): Update.
1436 * lynx-low.cc (lynx_target_ops): Update.
1437 * nto-low.cc (nto_target_ops): Update.
1438 * win32-low.cc (win32_target_ops): Update.
1440 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1442 Turn process_stratum_target's supports_catch_syscall op into a
1443 method of process_target.
1445 * target.h (struct process_stratum_target): Remove the target op.
1446 (class process_target): Add the target op.
1447 (target_supports_catch_syscall): Update the macro.
1448 * target.cc (process_target::supports_catch_syscall): Define.
1450 Update the derived classes and callers below.
1452 * linux-low.cc (linux_target_ops): Update.
1453 (linux_supports_catch_syscall): Turn into ...
1454 (linux_process_target::supports_catch_syscall): ... this.
1455 * linux-low.h (class linux_process_target): Update.
1456 * lynx-low.cc (lynx_target_ops): Update.
1457 * nto-low.cc (nto_target_ops): Update.
1458 * win32-low.cc (win32_target_ops): Update.
1460 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1462 Turn process_stratum_target's supports_software_single_step op
1463 into a method of process_target.
1465 * target.h (struct process_stratum_target): Remove the target op.
1466 (class process_target): Add the target op.
1467 (target_supports_software_single_step): Update the macro.
1468 * target.cc (process_target::supports_software_single_step): Define.
1470 Update the derived classes and callers below.
1472 * linux-low.cc (linux_target_ops): Update.
1473 (linux_supports_software_single_step): Turn into ...
1474 (linux_process_target::supports_software_single_step): ... this.
1475 * linux-low.h (class linux_process_target): Update.
1476 * lynx-low.cc (lynx_target_ops): Update.
1477 * nto-low.cc (nto_target_ops): Update.
1478 * win32-low.cc (win32_target_ops): Update.
1480 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1482 Turn process_stratum_target's thread_name and thread_handle ops
1483 into methods of process_target.
1485 * target.h (struct process_stratum_target): Remove the target ops.
1486 (class process_target): Add the target ops.
1487 (target_thread_name): Update the macro.
1488 (target_thread_handle): Update the macro.
1489 * target.cc (process_target::thread_name): Define.
1490 (process_target::thread_handle): Define.
1492 Update the derived classes and callers below.
1494 * linux-low.cc (linux_target_ops): Update.
1495 (linux_process_target::thread_name): Define.
1496 (linux_process_target::thread_handle): Define.
1497 * linux-low.h (class linux_process_target): Update.
1498 * lynx-low.cc (lynx_target_ops): Update.
1499 * nto-low.cc (nto_target_ops): Update.
1500 * win32-low.cc (win32_target_ops): Update.
1502 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1504 Turn process_stratum_target's breakpoint_kind_from_pc,
1505 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1506 ops into methods of process_target.
1508 * target.h (struct process_stratum_target): Remove the target op.
1509 (class process_target): Add the target op.
1510 (target_breakpoint_kind_from_pc): Update the macro.
1511 (target_breakpoint_kind_from_current_state): Update the macro.
1512 (default_breakpoint_kind_from_pc): Remove declaration.
1513 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1514 (process_target::breakpoint_kind_from_pc): ... this.
1515 (process_target::breakpoint_kind_from_current_state): Define.
1517 Update the derived classes and callers below.
1519 * mem-break.cc (bp_size): Update.
1520 (bp_opcode): Update.
1521 * linux-low.cc (linux_target_ops): Update.
1522 (linux_wait_1): Update.
1523 (linux_breakpoint_kind_from_pc): Turn into ...
1524 (linux_process_target::breakpoint_kind_from_pc): ... this.
1525 (linux_sw_breakpoint_from_kind): Turn into ...
1526 (linux_process_target::sw_breakpoint_from_kind): ... this.
1527 (linux_breakpoint_kind_from_current_state): Turn into ...
1528 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1529 * linux-low.h (class linux_process_target): Update.
1530 * lynx-low.cc (lynx_target_ops): Update.
1531 (lynx_process_target::sw_breakpoint_from_kind): Define.
1532 * lynx-low.h (class lynx_process_target): Update.
1533 * nto-low.cc (nto_target_ops): Update.
1534 (nto_sw_breakpoint_from_kind): Turn into ...
1535 (nto_process_target::sw_breakpoint_from_kind): ... this.
1536 * nto-low.h (class nto_process_target): Update.
1537 * win32-low.cc (win32_target_ops): Update.
1538 (win32_sw_breakpoint_from_kind): Turn into ...
1539 (win32_process_target::sw_breakpoint_from_kind): ... this.
1540 * win32-low.h (class win32_process_target): Update.
1542 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1544 Turn process_stratum_target's multifs_open, multifs_readlink,
1545 multifs_unlink ops into methods of process_target.
1547 * target.h (struct process_stratum_target): Remove the target ops.
1548 (class process_target): Add the target ops. Also add
1550 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1552 (process_target::supports_multifs): Define.
1553 (process_target::multifs_open): Define.
1554 (process_target::multifs_readlink): Define.
1555 (process_target::multifs_unlink): Define.
1557 Update the derived classes and callers below.
1559 * hostio.cc (handle_setfs): Update.
1560 (handle_open): Update.
1561 (handle_unlink): Update.
1562 (handle_readlink): Update.
1563 * linux-low.cc (linux_target_ops): Update.
1564 (linux_process_target::supports_multifs): Define.
1565 (linux_process_target::multifs_open): Define.
1566 (linux_process_target::multifs_readlink): Define.
1567 (linux_process_target::multifs_unlink): Define.
1568 * linux-low.h (class linux_process_target): Update.
1569 * lynx-low.cc (lynx_target_ops): Update.
1570 * nto-low.cc (nto_target_ops): Update.
1571 * win32-low.cc (win32_target_ops): Update.
1573 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1575 Turn process_stratum_target's pid_to_exec_file op into a method
1578 * target.h (struct process_stratum_target): Remove the target op.
1579 (class process_target): Add the target op. Also add
1580 'supports_pid_to_exec_file'.
1581 * target.cc (process_target::pid_to_exec_file): Define.
1582 (process_target::supports_pid_to_exec_file): Define.
1584 Update the derived classes and callers below.
1586 * server.cc (handle_qxfer_exec_file): Update.
1587 (handle_query): Update.
1588 * linux-low.cc (linux_target_ops): Update.
1589 (linux_process_target::supports_pid_to_exec_file): Define.
1590 (linux_process_target::pid_to_exec_file): Define.
1591 * linux-low.h (class linux_process_target): Update.
1592 * lynx-low.cc (lynx_target_ops): Update.
1593 * nto-low.cc (nto_target_ops): Update.
1594 * win32-low.cc (win32_target_ops): Update.
1596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1598 Turn process_stratum_target's supports_range_stepping op into a
1599 method of process_target.
1601 * target.h (struct process_stratum_target): Remove the target op.
1602 (class process_target): Add the target op.
1603 (target_supports_range_stepping): Update the macro.
1604 * target.cc (process_target::supports_range_stepping): Define.
1606 Update the derived classes and callers below.
1608 * linux-low.cc (linux_target_ops): Update.
1609 (linux_supports_range_stepping): Turn into ...
1610 (linux_process_target::supports_range_stepping): ... this.
1611 * linux-low.h (class linux_process_target): Update.
1612 * lynx-low.cc (lynx_target_ops): Update.
1613 * nto-low.cc (nto_target_ops): Update.
1614 * win32-low.cc (win32_target_ops): Update.
1616 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1618 Turn process_stratum_target's btrace-related ops (enable_btrace,
1619 disable_btrace, read_btrace, read_btrace_conf) into methods of
1622 * target.h (struct process_stratum_target): Remove the target ops.
1623 (class process_target): Add the target ops.
1624 (target_enable_btrace): Update.
1625 (target_disable_btrace): Update.
1626 (target_read_btrace): Update.
1627 (target_read_btrace_conf): Update.
1628 * target.cc (process_target::enable_btrace): Define.
1629 (process_target::disable_btrace): Define.
1630 (process_target::read_btrace): Define.
1631 (process_target::read_btrace_conf): Define.
1633 Update the derived classes and callers below.
1635 * linux-low.cc (linux_target_ops): Update.
1636 (linux_process_target:enable_btrace): Define as a wrapper around
1637 linux_enable_btrace.
1638 (linux_low_disable_btrace): Turn into ...
1639 (linux_process_target::disable_btrace): ... this.
1640 (linux_low_read_btrace): Turn into ...
1641 (linux_process_target::read_btrace): ... this.
1642 (linux_low_btrace_conf): Turn into ...
1643 (linux_process_target::read_btrace_conf): ... this.
1644 * linux-low.h (class linux_process_target): Update.
1645 * lynx-low.cc (lynx_target_ops): Update.
1646 * nto-low.cc (nto_target_ops): Update.
1647 * win32-low.cc (win32_target_ops): Update.
1649 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1651 Turn process_stratum_target's supports_agent op into a method of
1654 * target.h (struct process_stratum_target): Remove the target op.
1655 (class process_target): Add the target op.
1656 (target_supports_agent): Update the macro.
1657 * target.cc (process_target::supports_agent): Define.
1659 Update the derived classes and callers below.
1661 * linux-low.cc (linux_target_ops): Update.
1662 (linux_supports_agent): Turn into ...
1663 (linux_process_target::supports_agent): ... this.
1664 * linux-low.h (class linux_process_target): Update.
1665 * lynx-low.cc (lynx_target_ops): Update.
1666 * nto-low.cc (nto_target_ops): Update.
1667 * win32-low.cc (win32_target_ops): Update.
1669 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1671 Turn process_stratum_target's qxfer_libraries_svr4 op into a
1672 method of process_target.
1674 * target.h (struct process_stratum_target): Remove the target op.
1675 (class process_target): Add the target op. Also add
1676 'supports_qxfer_libraries_svr4'.
1677 * target.cc (process_target::qxfer_libraries_svr4): Define.
1678 (process_target::supports_qxfer_libraries_svr4): Define.
1680 Update the derived classes and callers below.
1682 * server.cc (handle_qxfer_libraries_svr4): Update.
1683 (handle_query): Update.
1684 * linux-low.cc (linux_target_ops): Update.
1685 (linux_process_target::supports_qxfer_libraries_svr4): Define.
1686 (linux_qxfer_libraries_svr4): Turn into ...
1687 (linux_process_target::qxfer_libraries_svr4): ... this.
1688 * linux-low.h (class linux_process_target): Update.
1689 * lynx-low.cc (lynx_target_ops): Update.
1690 * nto-low.cc (nto_target_ops): Update.
1691 * win32-low.cc (win32_target_ops): Update.
1693 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1695 Turn process_stratum_target's supports_disable_randomization op
1696 into a method of process_target.
1698 * target.h (struct process_stratum_target): Remove the target op.
1699 (class process_target): Add the target op.
1700 (target_supports_disable_randomization): Update the macro.
1701 * target.cc (process_target::supports_disable_randomization): Define.
1703 Update the derived classes and callers below.
1705 * linux-low.cc (linux_target_ops): Update.
1706 (linux_supports_disable_randomization): Turn into ...
1707 (linux_process_target::supports_disable_randomization): ... this.
1708 * linux-low.h (class linux_process_target): Update.
1709 * lynx-low.cc (lynx_target_ops): Update.
1710 * nto-low.cc (nto_target_ops): Update.
1711 * win32-low.cc (win32_target_ops): Update.
1713 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1715 Turn process_stratum_target's emit_ops op into a method of
1718 * target.h (struct process_stratum_target): Remove the target op.
1719 (class process_target): Add the target op.
1720 (target_emit_ops): Update the macro.
1721 * target.cc (process_target::emit_ops): Define.
1723 Update the derived classes and callers below.
1725 * linux-low.cc (linux_target_ops): Update.
1726 (linux_emit_ops): Turn into ...
1727 (linux_process_target::emit_ops): ... this.
1728 * linux-low.h (class linux_process_target): Update.
1729 * lynx-low.cc (lynx_target_ops): Update.
1730 * nto-low.cc (nto_target_ops): Update.
1731 * win32-low.cc (win32_target_ops): Update.
1733 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1735 Turn process_stratum_target's install_fast_tracepoint_jump_pad
1736 and get_min_fast_tracepoint_insn_len ops into methods of
1739 * target.h (struct process_stratum_target): Remove the target ops.
1740 (class process_target): Add the target ops. Also add
1741 'supports_fast_tracepoints'.
1742 (target_supports_fast_tracepoints): Update the macro.
1743 (target_get_min_fast_tracepoint_insn_len): Update the macro.
1744 (install_fast_tracepoint_jump_pad): Update and rename the macro
1746 (target_install_fast_tracepoint_jump_pad): ... this.
1747 * target.cc (process_target::supports_fast_tracepoints): Define.
1748 (process_target::install_fast_tracepoint_jump_pad): Define.
1749 (process_target::get_min_fast_tracepoint_insn_len): Define.
1751 Update the derived classes and callers below.
1753 * tracepoint.cc (install_fast_tracepoint): Update.
1754 * linux-low.cc (linux_target_ops): Update.
1755 (linux_process_target::supports_fast_tracepoints): Define.
1756 (linux_install_fast_tracepoint_jump_pad): Turn into ...
1757 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
1758 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
1759 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
1760 * linux-low.h (class linux_process_target): Update.
1761 * lynx-low.cc (lynx_target_ops): Update.
1762 * nto-low.cc (nto_target_ops): Update.
1763 * win32-low.cc (win32_target_ops): Update.
1765 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1767 Turn process_stratum_target's stabilize_threads op into a
1768 method of process_target.
1770 * target.h (struct process_stratum_target): Remove the target op.
1771 (class process_target): Add the target op.
1772 (target_stabilize_threads): Update the macro.
1773 * target.cc (process_target::stabilize_threads): Define.
1775 Update the derived classes and callers below.
1777 * server.cc (handle_status): Update.
1778 * tracepoint.cc (cmd_qtdp): Update.
1779 (cmd_qtstart): Update.
1780 * linux-low.cc (linux_target_ops): Update.
1781 (linux_stabilize_threads): Turn into ...
1782 (linux_process_target::stabilize_threads): ... this.
1783 (linux_wait_1): Update.
1784 * linux-low.h (class linux_process_target): Update.
1785 * lynx-low.cc (lynx_target_ops): Update.
1786 * nto-low.cc (nto_target_ops): Update.
1787 * win32-low.cc (win32_target_ops): Update.
1789 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1791 Turn process_stratum_target's pause_all and unpause_all ops
1792 into methods of process_target.
1794 * target.h (struct process_stratum_target): Remove the target ops.
1795 (class process_target): Add the target ops.
1796 (pause_all): Update the macro and rename to...
1797 (target_pause_all): ... this.
1798 (unpause_all): Update the macro and rename to...
1799 (target_unpause_all): ... this.
1800 * target.cc (process_target::pause_all): Define.
1801 (process_target::unpause_all): Define.
1803 Update the derived classes and callers below.
1805 * server.cc (handle_status): Update.
1806 * tracepoint.cc (clear_installed_tracepoints): Update.
1808 (cmd_qtstart): Update.
1809 (stop_tracing): Update.
1810 (cmd_qtstatus): Update.
1811 (upload_fast_traceframes): Update.
1812 (run_inferior_command): Update.
1813 * linux-low.cc (linux_target_ops): Update.
1814 (linux_pause_all): Turn into ...
1815 (linux_process_target::pause_all): ... this.
1816 (linux_unpause_all): Turn into ...
1817 (linux_process_target::unpause_all): ... this.
1818 (linux_process_target::prepare_to_access_memory): Update.
1819 (linux_process_target::done_accessing_memory): Update.
1820 * linux-low.h (class linux_process_target): Update.
1821 * lynx-low.cc (lynx_target_ops): Update.
1822 * nto-low.cc (nto_target_ops): Update.
1823 * win32-low.cc (win32_target_ops): Update.
1825 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1827 Turn process_stratum_target's get_tib_address op into a method of
1830 * target.h (struct process_stratum_target): Remove the target op.
1831 (class process_target): Add the target op. Also add
1832 'supports_get_tib_address'.
1833 * target.cc (process_target::get_tib_address): Define.
1834 (process_target::supports_get_tib_address): Define.
1836 Update the derived classes and callers below.
1838 * server.cc (handle_query): Update.
1839 * linux-low.cc (win32_target_ops): Update.
1840 * lynx-low.cc (lynx_target_ops): Update.
1841 * nto-low.cc (nto_target_ops): Update.
1842 * win32-low.cc (win32_target_ops): Update.
1843 (win32_process_target::supports_get_tib_address): Define.
1844 (win32_get_tib_address): Turn into ...
1845 (win32_process_target::get_tib_address): ... this.
1846 * win32-low.h (class win32_process_target): Update.
1848 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1850 Turn process_stratum_target's thread_stopped op into a method of
1853 * target.h (struct process_stratum_target): Remove the target op.
1854 (class process_target): Add the target op. Also add
1855 'supports_thread_stopped'.
1856 (target_thread_stopped): Update the macro.
1857 * target.cc (process_target::thread_stopped): Define.
1858 (process_target::supports_thread_stopped): Define.
1859 (prepare_to_access_memory): Update.
1861 Update the derived classes and callers below.
1863 * server.cc (queue_stop_reply_callback): Update.
1864 * linux-low.cc (linux_target_ops): Update.
1865 (linux_process_target::supports_thread_stopped): Define.
1866 (linux_thread_stopped): Turn into ...
1867 (linux_process_target::thread_stopped): ... this.
1868 * linux-low.h (class linux_process_target): Update.
1869 * lynx-low.cc (lynx_target_ops): Update.
1870 * nto-low.cc (nto_target_ops): Update.
1871 * win32-low.cc (win32_target_ops): Update.
1873 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1875 Turn process_stratum_target's read_pc and write_pc ops into
1876 methods of process_target.
1878 * target.h (struct process_stratum_target): Remove the target ops.
1879 (class process_target): Add the target ops.
1880 * target.cc (process_target::read_pc): Define.
1881 (process_target::write_pc): Define.
1883 Update the derived classes and callers below.
1885 * regcache.cc (regcache_read_pc): Update.
1886 (regcache_write_pc): Update.
1887 * linux-low.cc (linux_target_ops): Update.
1888 (linux_read_pc): Turn into ...
1889 (linux_process_target::read_pc): ... this.
1890 (linux_write_pc): Turn into ...
1891 (linux_process_target::write_pc): ... this.
1892 * linux-low.h (class linux_process_target): Update.
1893 * lynx-low.cc (lynx_target_ops): Update.
1894 * nto-low.cc (nto_target_ops): Update.
1895 * win32-low.cc (win32_target_ops): Update.
1897 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1899 Turn process_stratum_target's supports_tracepoints op into a
1900 method of process_target.
1902 * target.h (struct process_stratum_target): Remove the target op.
1903 (class process_target): Add the target op.
1904 (target_supports_tracepoints): Update the macro.
1905 * target.cc (process_target::supports_tracepoints): Define.
1907 Update the derived classes and callers below.
1909 * linux-low.cc (linux_target_ops): Update.
1910 (linux_supports_tracepoints): Turn into ...
1911 (linux_process_target::supports_tracepoints): ... this.
1912 * linux-low.h (class linux_process_target): Update.
1913 * lynx-low.cc (lynx_target_ops): Update.
1914 * nto-low.cc (nto_target_ops): Update.
1915 * win32-low.cc (win32_target_ops): Update.
1917 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1919 Turn process_stratum_target's process_qsupported op into a method
1922 * target.h (struct process_stratum_target): Remove the target op.
1923 (class process_target): Add the target op.
1924 (target_process_qsupported): Update the macro.
1925 * target.cc (process_target::process_qsupported): Define.
1927 Update the derived classes and callers below.
1929 * linux-low.cc (linux_target_ops): Update.
1930 (linux_process_qsupported): Turn into ...
1931 (linux_process_target::process_qsupported): ... this.
1932 * linux-low.h (class linux_process_target): Update.
1933 * lynx-low.cc (lynx_target_ops): Update.
1934 * nto-low.cc (nto_target_ops): Update.
1935 * win32-low.cc (win32_target_ops): Update.
1937 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1939 Turn process_stratum_target's read_loadmap op into a method of
1942 * target.h (struct process_stratum_target): Remove the target op.
1943 (class process_target): Add the target op. Also add
1944 'supports_read_loadmap'.
1945 * target.cc (process_target::read_loadmap): Define.
1946 (process_target::supports_read_loadmap): Define.
1948 Update the derived classes and callers below.
1950 * server.cc (handle_qxfer_fdpic): Update.
1951 (handle_query): Update.
1952 * linux-low.cc (linux_target_ops): Update.
1953 (linux_process_target::supports_read_loadmap): Define.
1954 (linux_read_loadmap): Turn into ...
1955 (linux_process_target::read_loadmap): ... this.
1956 * linux-low.h (class linux_process_target): Update.
1957 * lynx-low.cc (lynx_target_ops): Update.
1958 * nto-low.cc (nto_target_ops): Update.
1959 * win32-low.cc (win32_target_ops): Update.
1961 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1963 Turn process_stratum_target's core_of_thread op into a method of
1966 * target.h (struct process_stratum_target): Remove the target op.
1967 (class process_target): Add the target op.
1968 (target_core_of_thread): Update the macro.
1969 * target.cc (process_target::core_of_thread): Define.
1971 Update the derived classes and callers below.
1973 * linux-low.cc (linux_target_ops): Update.
1974 (linux_process_target::core_of_thread): Define.
1975 * linux-low.h (class linux_process_target): Update.
1976 * lynx-low.cc (lynx_target_ops): Update.
1977 * nto-low.cc (nto_target_ops): Update.
1978 * win32-low.cc (win32_target_ops): Update.
1980 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1982 Turn process_stratum_target's handle_monitor_command op into a
1983 method of process_target.
1985 * target.h (struct process_stratum_target): Remove the target op.
1986 (class process_target): Add the target op.
1987 (target_handle_monitor_command): Update the macro.
1988 * target.cc (process_target::handle_monitor_command): Define.
1990 Update the derived classes and callers below.
1992 * server.cc (handle_query): Update.
1993 * linux-low.cc (linux_target_ops): Update.
1994 (linux_process_target::handle_monitor_command): Define.
1995 * linux-low.h (class linux_process_target): Update.
1996 * lynx-low.cc (lynx_target_ops): Update.
1997 * nto-low.cc (nto_target_ops): Update.
1998 * win32-low.cc (win32_target_ops): Update.
2000 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2002 Turn process_stratum_target's handle_new_gdb_connection op into a
2003 method of process_target.
2005 * target.h (struct process_stratum_target): Remove the target op.
2006 (class process_target): Add the target op.
2007 (target_handle_new_gdb_connection): Update the macro.
2008 * target.cc (process_target::handle_new_gdb_connection): Define.
2010 Update the derived classes and callers below.
2012 * linux-low.cc (linux_target_ops): Update.
2013 (linux_handle_new_gdb_connection): Turn into ...
2014 (linux_process_target::handle_new_gdb_connection): ... this.
2015 * linux-low.h (class linux_process_target): Update.
2016 * lynx-low.cc (lynx_target_ops): Update.
2017 * nto-low.cc (nto_target_ops): Update.
2018 * win32-low.cc (win32_target_ops): Update.
2020 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2022 Turn process_stratum_target's supports_fork_events,
2023 supports_vfork_events, and supports_exec_events ops into methods
2026 * target.h (struct process_stratum_target): Remove the target ops.
2027 (class process_target): Add the target ops.
2028 (target_supports_fork_events): Update the macro.
2029 (target_supports_vfork_events): Update the macro.
2030 (target_supports_exec_events): Update the macro.
2031 * target.cc (process_target::supports_fork_events): Define.
2032 (process_target::supports_vfork_events): Define.
2033 (process_target::supports_exec_events): Define.
2035 Update the derived classes and callers below.
2037 * linux-low.cc (linux_target_ops): Update.
2038 (linux_supports_fork_events): Turn into ...
2039 (linux_process_target::supports_fork_events): ... this.
2040 (linux_supports_vfork_events): Turn into ...
2041 (linux_process_target::supports_vfork_events): ... this.
2042 (linux_supports_exec_events): Turn into ...
2043 (linux_process_target::supports_exec_events): ... this.
2044 * linux-low.h (class linux_process_target): Update.
2045 * lynx-low.cc (lynx_target_ops): Update.
2046 * nto-low.cc (nto_target_ops): Update.
2047 * win32-low.cc (win32_target_ops): Update.
2049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2051 Turn process_stratum_target's supports_multi_process op into a
2052 method of process_target.
2054 * target.h (struct process_stratum_target): Remove the target op.
2055 (class process_target): Add the target op.
2056 * target.cc (process_target::supports_multi_process): Define.
2057 (target_supports_multi_process): Update.
2059 Update the derived classes and callers below.
2061 * linux-low.cc (linux_target_ops): Update.
2062 (linux_supports_multi_process): Turn into ...
2063 (linux_process_target::supports_multi_process): ... this.
2064 * linux-low.h (class linux_process_target): Update.
2065 * lynx-low.cc (lynx_target_ops): Update.
2066 * nto-low.cc (nto_target_ops): Update.
2067 * win32-low.cc (win32_target_ops): Update.
2069 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2071 Turn process_stratum_target's supports_non_stop, async, and
2072 start_non_stop ops into methods of process_target.
2074 * target.h (struct process_stratum_target): Remove the target ops.
2075 (class process_target): Add the target ops.
2076 (target_supports_non_stop): Update the macro.
2077 (target_async): Update the macro.
2078 (start_non_stop): Remove declaration.
2079 * target.cc (process_target::supports_non_stop): Define.
2080 (process_target::async): Define.
2081 (process_target::start_non_stop): Define.
2082 (start_non_stop): Remove.
2084 Update the derived classes and callers below.
2086 * server.cc (handle_qxfer_siginfo): Update.
2087 (handle_query): Update.
2088 * linux-low.cc (linux_target_ops): Update.
2089 (linux_supports_non_stop): Turn into ...
2090 (linux_process_target::supports_non_stop): ... this.
2091 (linux_async): Turn into ...
2092 (linux_process_target::async): ... this.
2093 (linux_start_non_stop): Turn into ...
2094 (linux_process_target::start_non_stop): ... this.
2095 * linux-low.h (class linux_process_target): Update.
2096 * lynx-low.cc (lynx_target_ops): Update.
2097 * nto-low.cc (nto_target_ops): Update.
2098 (nto_supports_non_stop): Remove; rely on the default behavior
2100 * win32-low.cc (win32_target_ops): Update.
2102 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2104 Turn process_stratum_target's qxfer_siginfo op into a method of
2107 * target.h (struct process_stratum_target): Remove the target op.
2108 (class process_target): Add the target op. Also add
2109 'supports_qxfer_siginfo'.
2110 * target.cc (process_target::qxfer_siginfo): Define.
2111 (process_target::supports_qxfer_siginfo): Define.
2113 Update the derived classes and callers below.
2115 * server.cc (handle_qxfer_siginfo): Update.
2116 (handle_query): Update.
2117 * linux-low.cc (linux_target_ops): Update.
2118 (linux_process_target::supports_qxfer_siginfo): Define.
2119 (linux_xfer_siginfo): Turn into ...
2120 (linux_process_target::qxfer_siginfo): ... this.
2121 * linux-low.h (class linux_process_target): Update.
2122 * lynx-low.cc (lynx_target_ops): Update.
2123 * nto-low.cc (nto_target_ops): Update.
2124 * win32-low.cc (win32_target_ops): Update.
2126 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2128 Turn process_stratum_target's qxfer_osdata op into a method of
2131 * target.h (struct process_stratum_target): Remove the target op.
2132 (class process_target): Add the target op. Also add
2133 'supports_qxfer_osdata'.
2134 * target.cc (process_target::qxfer_osdata): Define.
2135 (process_target::supports_qxfer_osdata): Define.
2137 Update the derived classes and callers below.
2139 * server.cc (handle_qxfer_osdata): Update.
2140 (handle_query): Update.
2141 * linux-low.cc (linux_target_ops): Update.
2142 (linux_process_target::supports_qxfer_osdata): Define.
2143 (linux_qxfer_osdata): Turn into ...
2144 (linux_process_target::qxfer_osdata): ... this.
2145 * linux-low.h (class linux_process_target): Update.
2146 * lynx-low.cc (lynx_target_ops): Update.
2147 * nto-low.cc (nto_target_ops): Update.
2148 * win32-low.cc (win32_target_ops): Update.
2150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2152 Turn process_stratum_target's hostio_last_error op into a
2153 method of process_target.
2155 * target.h (struct process_stratum_target): Remove the target op.
2156 (class process_target): Add the target op.
2157 * target.cc: Add "hostio.h" to includes.
2158 (process_target::hostio_last_error): Define.
2160 Update the derived classes and callers below.
2162 * hostio.cc (hostio_error): Update.
2163 * linux-low.cc: Remove "hostio.h" from includes.
2164 (linux_target_ops): Update.
2165 * lynx-low.cc (lynx_target_ops): Update.
2166 * nto-low.cc (nto_target_ops): Update.
2167 * win32-low.h (class win32_process_target): Update.
2168 * win32-low.cc (win32_target_ops): Update.
2169 (wince_hostio_last_error): Turn into ...
2170 (win32_process_target::hostio_last_error): ... this.
2172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2174 Turn process_stratum_target's get_tls_address op into a method of
2177 * target.h (struct process_stratum_target): Remove the target op.
2178 (class process_target): Add the target op. Also add
2179 'supports_get_tls_address'.
2180 * target.cc (process_target::get_tls_address): Define.
2181 (process_target::supports_get_tls_address): Define.
2183 Update the derived classes and callers below.
2185 * server.cc (handle_query): Update.
2186 * linux-low.cc (linux_target_ops): Update.
2187 (linux_process_target::supports_get_tls_address): Define.
2188 (linux_process_target::get_tls_address): Define.
2189 * linux-low.h (class linux_process_target): Update.
2190 * lynx-low.cc (lynx_target_ops): Update.
2191 * nto-low.cc (nto_target_ops): Update.
2192 * win32-low.cc (win32_target_ops): Update.
2194 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2196 Turn process_stratum_target's read_offsets op into a method of
2199 * target.h (struct process_stratum_target): Remove the target op.
2200 (class process_target): Add the target op. Also add
2201 'supports_read_offsets'.
2202 * target.cc (process_target::read_offsets): Define.
2203 (process_target::supports_read_offsets): Define.
2205 Update the derived classes and callers below.
2207 * server.cc (handle_query): Update.
2208 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2209 (linux_target_ops): Update.
2210 (linux_process_target::supports_read_offsets): Define.
2211 (linux_read_offsets): Turn into ...
2212 (linux_process_target::read_offsets): ... this.
2213 * linux-low.h (class linux_process_target): Update.
2214 * lynx-low.cc (lynx_target_ops): Update.
2215 * nto-low.cc (nto_target_ops): Update.
2216 * win32-low.cc (win32_target_ops): Update.
2218 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2220 Turn process_stratum_target's stopped_by_watchpoint and
2221 stopped_data_address ops into methods of process_target.
2223 * target.h (struct process_stratum_target): Remove the target ops.
2224 (class process_target): Add the target ops.
2225 * target.cc (process_target::stopped_by_watchpoint): Define.
2226 (process_target::stopped_data_address): Define.
2228 Update the derived classes and callers below.
2230 * remote-utils.cc (prepare_resume_reply): Update.
2231 * linux-low.cc (linux_target_ops): Update.
2232 (linux_stopped_by_watchpoint): Turn into ...
2233 (linux_process_target::stopped_by_watchpoint): ... this.
2234 (linux_stopped_data_address): Turn into ...
2235 (linux_process_target::stopped_data_address): ... this.
2236 * linux-low.h (class linux_process_target): Update.
2237 * lynx-low.cc (lynx_target_ops): Update.
2238 * nto-low.cc (nto_target_ops): Update.
2239 (nto_stopped_by_watchpoint): Turn into ...
2240 (nto_process_target::stopped_by_watchpoint): ... this.
2241 (nto_stopped_data_address): Turn into ...
2242 (nto_process_target::stopped_data_address): ... this.
2243 * nto-low.h (class nto_process_target): Update.
2244 * win32-low.cc (win32_target_ops): Update.
2245 (win32_stopped_by_watchpoint): Turn into ...
2246 (win32_process_target::stopped_by_watchpoint): ... this.
2247 (win32_stopped_data_address): Turn into ...
2248 (win32_process_target::stopped_data_address): ... this.
2249 * win32-low.h (class win32_process_target): Update.
2251 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2253 Turn process_stratum_target's supports_hardware_single_step op into
2254 a method of process_target.
2256 * target.h (struct process_stratum_target): Remove the target op.
2257 (class process_target): Add the target op.
2258 (target_supports_hardware_single_step): Update the macro.
2259 (target_can_do_hardware_single_step): Remove declaration.
2260 * target.cc (process_target::supports_hardware_single_step): Define.
2261 (target_can_do_hardware_single_step): Remove.
2263 Update the derived classes and callers below.
2265 * linux-low.h (class linux_process_target): Update.
2266 * linux-low.cc (linux_target_ops): Update.
2267 (linux_supports_hardware_single_step): Turn into ...
2268 (linux_process_target::supports_hardware_single_step): ... this.
2269 * lynx-low.h (class lynx_process_target): Update.
2270 * lynx-low.cc (lynx_target_ops): Update.
2271 (lynx_process_target::supports_hardware_single_step): Define.
2272 * nto-low.h (class nto_process_target): Update.
2273 * nto-low.cc (nto_target_ops): Update.
2274 (nto_process_target::supports_hardware_single_step): Define.
2275 * win32-low.h (class win32_process_target): Update.
2276 * win32-low.cc (win32_target_ops): Update.
2277 (win32_process_target::supports_hardware_single_step): Define.
2279 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2281 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2282 ops into methods of process_target.
2284 * target.h (struct process_stratum_target): Remove the target ops.
2285 (class process_target): Add the target ops.
2286 (target_stopped_by_hw_breakpoint): Update the macro.
2287 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2288 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2289 (process_target::supports_stopped_by_hw_breakpoint): Define.
2291 Update the derived classes and callers below.
2293 * linux-low.cc (linux_target_ops): Update.
2294 (linux_stopped_by_hw_breakpoint): Turn into ...
2295 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2296 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2297 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2298 * linux-low.h (class linux_process_target): Update.
2299 * lynx-low.cc (lynx_target_ops): Update.
2300 * nto-low.cc (nto_target_ops): Update.
2301 * win32-low.cc (win32_target_ops): Update.
2303 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2305 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2306 ops into methods of process_target.
2308 * target.h (struct process_stratum_target): Remove the target ops.
2309 (class process_target): Add the target ops.
2310 (target_stopped_by_sw_breakpoint): Update the macro.
2311 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2312 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2313 (process_target::supports_stopped_by_sw_breakpoint): Define.
2315 Update the derived classes and callers below.
2317 * linux-low.cc (linux_target_ops): Update.
2318 (linux_stopped_by_sw_breakpoint): Turn into ...
2319 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2320 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2321 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2322 * linux-low.h (class linux_process_target): Update.
2323 * lynx-low.cc (lynx_target_ops): Update.
2324 * nto-low.cc (nto_target_ops): Update.
2325 * win32-low.cc (win32_target_ops): Update.
2327 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2329 Turn process_stratum_target's insert_point and remove_point ops
2330 into methods of process_target.
2332 * target.h (struct process_stratum_target): Remove the target ops.
2333 (class process_target): Add the target ops.
2334 * target.cc (process_target::insert_point): Define.
2335 (process_target::remove_point): Define.
2337 Update the derived classes and callers below.
2339 * mem-break.cc (set_raw_breakpoint_at): Update.
2340 (delete_raw_breakpoint): Update.
2341 (uninsert_raw_breakpoint): Update.
2342 (reinsert_raw_breakpoint): Update.
2343 * linux-low.cc (linux_target_ops): Update.
2344 (linux_insert_point): Turn into ...
2345 (linux_process_target::insert_point): ... this.
2346 (linux_remove_point): Turn into ...
2347 (linux_process_target::remove_point): ... this.
2348 * linux-low.h (class linux_process_target): Update.
2349 * lynx-low.cc (lynx_target_ops): Update.
2350 * nto-low.cc (nto_target_ops): Update.
2351 (nto_insert_point): Turn into ...
2352 (nto_process_target::insert_point): ... this.
2353 (nto_remove_point): Turn into ...
2354 (nto_process_target::remove_point): ... this.
2355 * nto-low.h (class nto_process_target): Update.
2356 * win32-low.cc (win32_target_ops): Update.
2357 (win32_insert_point): Turn into ...
2358 (win32_process_target::insert_point): ... this.
2359 (win32_remove_point): Turn into ...
2360 (win32_process_target::remove_point): ... this.
2361 * win32-low.h (class win32_process_target): Update.
2363 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2365 Turn process_stratum_target's supports_z_point_type op into a
2366 method of process_target.
2368 * target.h (struct process_stratum_target): Remove the target op.
2369 (class process_target): Add the target op.
2370 * target.cc (process_target::supports_z_point_type): Define.
2372 Update the derived classes and callers below.
2374 * mem-break.cc (z_type_supported): Update.
2375 * linux-low.cc (linux_target_ops): Update.
2376 (linux_supports_z_point_type): Turn into ...
2377 (linux_process_target::supports_z_point_type): ... this.
2378 * linux-low.h (class linux_process_target): Update.
2379 * lynx-low.cc (lynx_target_ops): Update.
2380 * nto-low.cc (nto_target_ops): Update.
2381 (nto_supports_z_point_type): Turn into ...
2382 (nto_process_target::supports_z_point_type): ... this.
2383 * nto-low.h (class nto_process_target): Update.
2384 * win32-low.cc (win32_target_ops): Update.
2385 (win32_supports_z_point_type): Turn into ...
2386 (win32_process_target::supports_z_point_type): ... this.
2387 * win32-low.h (class win32_process_target): Update.
2389 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2391 Turn process_stratum_target's read_auxv op into a method of
2394 * target.h (class process_stratum_target): Remove the target op.
2395 (struct process_target): Add the target op. Also add
2396 'supports_read_auxv'.
2397 * target.cc (process_target::read_auxv): Define.
2398 (process_target::supports_read_auxv): Define.
2400 Update the derived classes and callers below.
2402 * server.cc (handle_qxfer_auxv): Update.
2403 (handle_query): Update.
2404 * linux-low.cc (linux_target_ops): Update.
2405 (linux_process_target::supports_read_auxv): Define.
2406 (linux_read_auxv): Turn into ...
2407 (linux_process_target::read_auxv): ... this.
2408 * linux-low.h (class linux_process_target): Update.
2409 * lynx-low.cc (lynx_target_ops): Update.
2410 * nto-low.cc (nto_target_ops): Update.
2411 (nto_process_target::supports_read_auxv): Define.
2412 (nto_read_auxv): Turn into ...
2413 (nto_process_target::read_auxv): ... this.
2414 * nto-low.h (class nto_process_target): Update.
2415 * win32-low.cc (win32_target_ops): Update.
2417 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2419 Turn process_stratum_target's request_interrupt op into a method of
2422 * target.h (struct process_stratum_target): Remove the target op.
2423 (class process_target): Add the target op.
2425 Update the derived classes and callers below.
2427 * remote-utils.cc (putpkt_binary_1): Update.
2428 (input_interrupt): Update.
2430 * server.cc (handle_v_requests): Update.
2431 * linux-low.cc (linux_target_ops): Update.
2432 (linux_request_interrupt): Turn into ...
2433 (linux_process_target::request_interrupt): ... this.
2434 * linux-low.h (class linux_process_target): Update.
2435 * lynx-low.cc (lynx_target_ops): Update.
2436 (lynx_request_interrupt): Turn into ...
2437 (lynx_process_target::request_interrupt): ... this.
2438 * lynx-low.h (class lynx_process_target): Update.
2439 * nto-low.cc (nto_target_ops): Update.
2440 (nto_request_interrupt): Turn into ...
2441 (nto_process_target::request_interrupt): ... this.
2442 * nto-low.h (class nto_process_target): Update.
2443 * win32-low.cc (win32_target_ops): Update.
2444 (win32_request_interrupt): Turn into ...
2445 (win32_process_target::request_interrupt): ... this.
2446 * win32-low.h (class win32_process_target): Update.
2448 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2450 Turn process_stratum_target's look_up_symbols op into a method of
2453 * target.h (struct process_stratum_target): Remove the target op.
2454 (class process_target): Add the target op.
2455 * target.cc (process_target::look_up_symbols): Define.
2457 Update the derived classes and callers below.
2459 * server.cc (handle_query): Update.
2460 * linux-low.cc (linux_target_ops): Update.
2461 (linux_look_up_symbols): Turn into ...
2462 (linux_process_target::look_up_symbols): ... this.
2463 * linux-low.h (class linux_process_target): Update.
2464 * lynx-low.cc (lynx_target_ops): Update.
2465 * nto-low.cc (nto_target_ops): Update.
2466 * win32-low.cc (win32_target_ops): Update.
2468 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2470 Turn process_stratum_target's read_memory and write_memory
2471 ops into methods of process_target.
2473 * target.h (struct process_stratum_target): Remove the target ops.
2474 (class process_target): Add the target ops.
2476 Update the derived classes and callers below.
2478 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2479 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2480 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2481 (arm_get_syscall_trapinfo): Update.
2482 * linux-cris-low.cc (cris_breakpoint_at): Update.
2483 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2484 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2485 * linux-mips-low.cc (mips_breakpoint_at): Update.
2486 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2487 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2488 * linux-sh-low.cc (sh_breakpoint_at): Update.
2489 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2490 (sparc_store_gregset_from_stack): Update.
2491 (sparc_breakpoint_at): Update.
2492 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2493 * linux-tile-low.cc (tile_breakpoint_at): Update.
2494 * linux-x86-low.cc (x86_breakpoint_at): Update.
2495 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2496 * mem-brea.cc (insert_memory_breakpoint): Update.
2497 (validate_inserted_breakpoint): Update.
2498 * target.cc (read_inferior_memory): Update.
2499 (target_write_memory): Update.
2500 * linux-low.cc (linux_target_ops): Update.
2501 (linux_read_memory): Make a wrapper around the read_memory target
2503 (linux_process_target::read_memory): Rename from linux_read_memory.
2504 (linux_write_memory): Turn into ...
2505 (linux_process_target::write_memory): ... this.
2506 * linux-low.h (class linux_process_target): Update.
2507 * lynx-low.cc (lynx_target_ops): Update.
2508 (lynx_read_memory): Turn into ...
2509 (lynx_process_target::read_memory): ... this.
2510 (lynx_write_memory): Turn into ...
2511 (lynx_process_target::write_memory): ... this.
2512 * lynx-low.h (class lynx_process_target): Update.
2513 * nto-low.cc (nto_target_ops): Update.
2514 (nto_read_memory): Turn into ...
2515 (nto_process_target::read_memory): ... this.
2516 (nto_write_memory): Turn into ...
2517 (nto_process_target::write_memory): ... this.
2518 * nto-low.h (class nto_process_target): Update.
2519 * win32-low.cc (win32_target_ops): Update.
2520 (win32_read_inferior_memory): Turn into ...
2521 (win32_process_target::read_memory): ... this.
2522 (win32_write_inferior_memory): Turn into ...
2523 (win32_process_target::write_memory): ... this.
2524 * win32-low.h (class win32_process_target): Update.
2526 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2528 Turn process_stratum_target's prepare_to_access_memory and
2529 done_accessing_memory ops into methods of process_target.
2531 * target.h (struct process_stratum_target): Remove the target ops.
2532 (class process_target): Add the target ops.
2533 * target.cc (process_target::prepare_to_access_memory): Define.
2534 (process_target::done_accessing_memory): Define.
2535 (prepare_to_access_memory): Update.
2536 (done_accessing_memory): Update.
2538 Update the derived classes and callers below.
2540 * linux-low.cc (linux_target_ops): Update.
2541 (linux_prepare_to_access_memory): Turn into ...
2542 (linux_process_target::prepare_to_access_memory): ... this.
2543 (linux_done_accessing_memory): Turn into ...
2544 (linux_process_target::done_accessing_memory): ... this.
2545 * linux-low.h (class linux_process_target): Update.
2546 * lynx-low.cc (lynx_target_ops): Update.
2547 * nto-low.cc (nto_target_ops): Update.
2548 * win32-low.cc (win32_target_ops): Update.
2550 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2552 Turn process_stratum_target's fetch_registers and store_registers
2553 ops into methods of process_target.
2555 * target.h (struct process_stratum_target): Remove the target ops.
2556 (class process_target): Add the target ops.
2557 (fetch_inferior_registers): Update the macro.
2558 (store_inferior_registers): Update the macro.
2560 Update the derived classes and callers below.
2562 * linux-low.cc (linux_target_ops): Update.
2563 (linux_fetch_registers): Turn into ...
2564 (linux_process_target::fetch_registers): ... this.
2565 (linux_store_registers): Turn into ...
2566 (linux_process_target::store_registers): ... this.
2567 * linux-low.h (class linux_process_target): Update.
2568 * lynx-low.cc (lynx_target_ops): Update.
2569 (lynx_fetch_registers): Turn into ...
2570 (lynx_process_target::fetch_registers): ... this.
2571 (lynx_store_registers): Turn into ...
2572 (lynx_process_target::store_registers): ... this.
2573 * lynx-low.h (class lynx_process_target): Update.
2574 * nto-low.cc (nto_target_ops): Update.
2575 (nto_fetch_registers): Turn into ...
2576 (nto_process_target::fetch_registers): ... this.
2577 (nto_store_registers): Turn into ...
2578 (nto_process_target::store_registers): ... this.
2579 * nto-low.h (class nto_process_target): Update.
2580 * win32-low.cc (win32_target_ops): Update.
2581 (win32_fetch_inferior_registers): Turn into ...
2582 (win32_process_target::fetch_registers): ... this.
2583 (win32_store_inferior_registers): Turn into ...
2584 (win32_process_target::store_registers): ... this.
2585 * win32-low.h (class win32_process_target): Update.
2587 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2589 Turn process_stratum_target's wait op into a method of
2592 * target.h (struct process_stratum_target): Remove the target op.
2593 (class process_target): Add the target op.
2595 Update the derived classes and callers below.
2597 * target.cc (target_wait): Update.
2598 * linux-low.cc (linux_target_ops): Update.
2599 (linux_wait): Turn into ...
2600 (linux_process_target::wait): ... this.
2601 * linux-low.h (class linux_process_target): Update.
2602 * lynx-low.cc (lynx_target_ops): Update.
2603 (lynx_wait): Turn into ...
2604 (lynx_process_target::wait): ... this.
2605 * lynx-low.h (class lynx_process_target): Update.
2606 * nto-low.cc (nto_target_ops): Update.
2607 (nto_wait): Turn into ...
2608 (nto_process_target::wait): ... this.
2609 * nto-low.h (class nto_process_target): Update.
2610 * win32-low.cc (win32_target_ops): Update.
2611 (win32_wait): Turn into ...
2612 (win32_process_target::wait): ... this.
2613 (do_initial_child_stuff): Update.
2614 * win32-low.h (class win32_process_target): Update.
2616 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2618 Turn process_stratum_target's resume op into a method of
2621 * target.h (struct process_stratum_target): Remove the target op.
2622 (class process_target): Add the target op.
2624 Update the derived classes and callers below.
2626 * server.cc (resume): Update.
2627 * target.cc (target_stop_and_wait): Update.
2628 (target_continue_no_signal): Update.
2629 (target_continue): Update.
2630 * linux-low.cc (linux_target_ops): Update.
2631 (linux_resume): Turn into ...
2632 (linux_process_target::resume): ... this.
2633 * linux-low.h (class linux_process_target): Update.
2634 * lynx-low.cc (lynx_target_ops): Update.
2635 (lynx_resume): Turn into ...
2636 (lynx_process_target::resume): ... this.
2637 * lynx-low.h (class lynx_process_target): Update.
2638 * nto-low.cc (nto_target_ops): Update.
2639 (nto_resume): Turn into ...
2640 (nto_process_target::resume): ... this.
2641 * nto-low.h (class nto_process_target): Update.
2642 * win32-low.cc (win32_target_ops): Update.
2643 (win32_resume): Turn into ...
2644 (win32_process_target::resume): ... this.
2645 (win32_process_target::detach): Update.
2646 (do_initial_child_stuff): Update.
2647 * win32-low.h (class win32_process_target): Update.
2649 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2651 Turn process_stratum_target's thread_alive op into a method of
2654 * target.h (struct process_stratum_target): Remove the target op.
2655 (class process_target): Add the target op.
2656 (mythread_alive): Update the macro.
2658 Update the derived classes and callers below.
2660 * linux-low.cc (linux_target_ops): Update.
2661 (linux_thread_alive): Turn into ...
2662 (linux_process_target::thread_alive): ... this.
2663 (wait_for_sigstop): Update.
2664 * linux-low.h (class linux_process_target): Update.
2665 * lynx-low.cc (lynx_target_ops): Update.
2666 (lynx_thread_alive): Turn into ...
2667 (lynx_process_target::thread_alive): ... this.
2668 * lynx-low.h (class lynx_process_target): Update.
2669 * nto-low.cc (nto_target_ops): Update.
2670 (nto_thread_alive): Turn into ...
2671 (nto_process_target::thread_alive): ... this.
2672 * nto-low.h (class nto_process_target): Update.
2673 * win32-low.cc (win32_target_ops): Update.
2674 (win32_thread_alive): Turn into ...
2675 (win32_process_target::thread_alive): ... this.
2676 * win32-low.h (class win32_process_target): Update.
2678 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2680 Turn process_stratum_target's join op into a method of
2683 * target.h (struct process_stratum_target): Remove the target op.
2684 (class process_target): Add the target op.
2685 (join_inferior): Update the macro.
2687 Update the derived classes and callers below.
2689 * linux-low.cc (linux_target_ops): Update.
2690 (linux_join): Turn into ...
2691 (linux_process_target::join): ... this.
2692 * linux-low.h (class linux_process_target): Update.
2693 * lynx-low.cc (lynx_target_ops): Update.
2694 (lynx_join): Turn into ...
2695 (lynx_process_target::join): ... this.
2696 * lynx-low.h (class lynx_process_target): Update.
2697 * nto-low.cc (nto_target_ops): Update.
2698 (nto_process_target::join): Define.
2699 * nto-low.h (class nto_process_target): Update.
2700 * win32-low.cc (win32_target_ops): Update.
2701 (win32_join): Turn into ...
2702 (win32_process_target::join): ... this.
2703 * win32-low.h (class win32_process_target): Update.
2705 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2707 Turn process_stratum_target's mourn op into a method of
2710 * target.h (struct process_stratum_target): Remove the target op.
2711 (class process_target): Add the target op.
2713 Update the derived classes and callers below.
2715 * target.cc (target_mourn_inferior): Update.
2716 * linux-low.cc (linux_target_ops): Update.
2717 (linux_mourn): Turn into ...
2718 (linux_process_target::mourn): ... this.
2719 (handle_extended_wait): Update.
2720 (linux_process_target::kill): Update.
2721 (linux_process_target::detach): Update.
2722 * linux-low.h (class linux_process_target): Update.
2723 * lynx-low.cc (lynx_target_ops): Update.
2724 (lynx_mourn): Turn into ...
2725 (lynx_process_target::mourn): ... this.
2726 * lynx-low.h (class lynx_process_target): Update.
2727 * nto-low.cc (nto_target_ops): Update.
2728 (nto_mourn): Turn into ...
2729 (nto_process_target::mourn): ... this.
2730 * nto-low.h (class nto_process_target): Update.
2731 * win32-low.cc (win32_target_ops): Update.
2732 (win32_mourn): Turn into ...
2733 (win32_process_target::mourn): ... this.
2734 * win32-low.h (class win32_process_target): Update.
2736 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2738 Turn process_stratum_target's detach op into a method of
2741 * target.h (struct process_stratum_target): Remove the target op.
2742 (class process_target): Add the target op.
2743 (detach_inferior): Update the macro.
2745 Update the derived classes and callers below.
2747 * linux-low.cc (linux_target_ops): Update.
2748 (linux_detach): Turn into ...
2749 (linux_process_target::detach): ... this.
2750 * linux-low.h (class linux_process_target): Update.
2751 * lynx-low.cc (lynx_target_ops): Update.
2752 (lynx_detach): Turn into ...
2753 (lynx_process_target::detach): ... this.
2754 * lynx-low.h (class lynx_process_target): Update.
2755 * nto-low.cc (nto_target_ops): Update.
2756 (nto_detach): Turn into ...
2757 (nto_process_target::detach): ... this.
2758 * nto-low.h (class nto_process_target): Update.
2759 * win32-low.cc (win32_target_ops): Update.
2760 (win32_detach): Turn into ...
2761 (win32_process_target::detach): ... this.
2762 * win32-low.h (class win32_process_target): Update.
2764 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2766 Turn process_stratum_target's kill op into a method of
2769 * target.h (struct process_stratum_target): Remove the target op.
2770 (class process_target): Add the target op.
2772 Update the derived classes and callers below.
2774 * target.cc (kill_inferior): Update.
2775 * linux-low.cc (linux_target_ops): Update.
2776 (linux_kill): Turn into ...
2777 (linux_process_target::kill): ... this.
2778 * linux-low.h (class linux_process_target): Update.
2779 * lynx-low.cc (lynx_target_ops): Update.
2780 (lynx_kill): Turn into ...
2781 (lynx_process_target::kill): ... this.
2782 * lynx-low.h (class lynx_process_target): Update.
2783 * nto-low.cc (nto_target_ops): Update.
2784 (nto_kill): Turn into ...
2785 (nto_process_target::kill): ... this.
2786 * nto-low.h (class nto_process_target): Update.
2787 * win32-low.cc (win32_target_ops): Update.
2788 (win32_kill): Turn into ...
2789 (win32_process_target::kill): ... this.
2790 * win32-low.h (class win32_process_target): Update.
2792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2794 Turn process_stratum_target's attach op into a method of
2797 * target.h (struct process_stratum_target): Remove the target op.
2798 (class process_target): Add the target op.
2799 (myattach): Update the macro.
2801 Update the derived classes and callers below.
2803 * linux-low.cc (linux_target_ops): Update.
2804 (linux_attach): Turn into ...
2805 (linux_process_target::attach): ... this.
2806 * linux-low.h (class linux_process_target): Update.
2807 * lynx-low.cc (lynx_target_ops): Update.
2808 (lynx_attach): Turn into ...
2809 (lynx_process_target::attach): ... this.
2810 * lynx-low.h (class lynx_process_target): Update.
2811 * nto-low.cc (nto_target_ops): Update.
2812 (nto_attach): Turn into ...
2813 (nto_process_target::attach): ... this.
2814 * nto-low.h (class nto_process_target): Update.
2815 * win32-low.cc (win32_target_ops): Update.
2816 (win32_attach): Turn into ...
2817 (win32_process_target::attach): ... this.
2818 * win32-low.h (class win32_process_target): Update.
2820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2822 Turn process_stratum_target's post_create_inferior op into a method
2825 * target.h (struct process_stratum_target): Remove the target op.
2826 (class process_target): Add the target op.
2827 (target_post_create_inferior): Update the macro.
2828 * target.cc (process_target::post_create_inferior): Define.
2830 Update the derived classes and callers below.
2832 * linux-low.cc (linux_target_ops): Update.
2833 (linux_post_create_inferior): Turn into ...
2834 (linux_process_target::post_create_inferior): ... this.
2835 * linux-low.h (class linux_process_target): Update.
2836 * lynx-low.cc (lynx_target_ops): Update.
2837 * nto-low.cc (nto_target_ops): Update.
2838 * win32-low.cc (win32_target_ops): Update.
2840 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2842 Turn process_stratum_target's create_inferior op into a method of
2845 * target.h (struct process_stratum_target): Remove the target op.
2846 (class process_target): Add the target op.
2847 (create_inferior): Rename the macro to ...
2848 (target_create_inferior): ... this.
2850 Update the derived classes and callers below.
2852 * server.cc (handle_v_run): Update.
2853 (captured_main): Update.
2854 (process_serial_event): Update.
2855 * linux-low.cc (linux_target_ops): Update.
2856 (linux_create_inferior): Turn into ...
2857 (linux_process_target::create_inferior): ... this.
2858 * linux-low.h (class linux_process_target): Update.
2859 * lynx-low.cc (lynx_target_ops): Update.
2860 (lynx_create_inferior): Turn into ...
2861 (lynx_process_target::create_inferior): ... this.
2862 * lynx-low.h (class lynx_process_target): Update.
2863 * nto-low.cc (nto_target_ops): Update.
2864 (nto_create_inferior): Turn into ...
2865 (nto_process_target::create_inferior): ... this.
2866 * nto-low.h (class nto_process_target): Update.
2867 * win32-low.cc (win32_target_ops): Update.
2868 (win32_create_inferior): Turn into ...
2869 (win32_process_target::create_inferior): ... this.
2870 * win32-low.h (class win32_process_target): Update.
2872 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2874 * target.h (class process_target): New class definition.
2875 (struct process_stratum_target) <pt>: New field with type
2877 * linux-low.h (class linux_process_target): Define as a derived
2878 class of 'process_target'.
2879 * linux-low.cc (linux_target_ops): Add a linux_process_target*
2881 * lynx-low.h (class lynx_process_target): Define as a derived
2882 class of 'process_target'.
2883 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
2885 * nto-low.h (class nto_process_target): Define as a derived
2886 class of 'process_target'.
2887 * nto-low.cc (nto_target_ops): Add an nto_process_target*
2889 * win32-low.h (class win32_process_target): Define as a derived
2890 class of 'process_target'.
2891 * win32-low.cc (win32_target_ops): Add a win32_process_target*
2894 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
2896 * configure: Regenerate.
2898 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
2899 Andrew Burgess <andrew.burgess@embecosm.com>
2901 * linux-riscv-low.cc: New file.
2902 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
2903 and nat/riscv-linux-tdesc.c.
2904 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
2905 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
2908 2020-02-14 Tom Tromey <tom@tromey.com>
2910 * acinclude.m4: Don't include acx_configure_dir.m4.
2911 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
2912 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
2913 (all, install-only, uninstall, clean-info, clean)
2914 (maintainer-clean): Don't recurse.
2915 (subdir_do, all-lib): Remove.
2916 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
2918 (generated_files): Update.
2919 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
2920 * configure: Rebuild.
2921 * configure.ac: Don't configure gnulib or libiberty.
2924 2020-02-14 Eli Zaretskii <eliz@gnu.org>
2926 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
2927 preparing the command line for CreateProcess.
2928 (win32_create_inferior): Reflect the program name in debugging
2929 output that shows the process and its command line.
2931 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
2933 * Makefile.in: Rename source files from .c to .cc.
2934 * %.c: Rename to %.cc.
2935 * configure.ac: Rename server.c to server.cc.
2936 * configure: Re-generate.
2938 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
2940 * Makefile.in: Rename gdbsupport source files from .c to .cc.
2942 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
2944 * win32-low.c (win32_create_inferior): Set signal_pid.
2946 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
2947 Pedro Alves <palves@redhat.com>
2949 Skip building gdbserver in a cross-configuration.
2950 * configure.srv: Set $gdbserver_host depending on whether $target
2951 is $host. Use $gdbserver_host instead of $host.
2953 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2955 * configure: Re-generate.
2957 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2959 * configure: Re-generate.
2961 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2963 * acinclude.m4: Update warning.m4 path.
2965 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
2967 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
2968 (handle_exception): Set siginfo_er.
2969 (win32_xfer_siginfo): New function.
2971 2020-02-07 Tom Tromey <tom@tromey.com>
2972 Pedro Alves <palves@redhat.com>
2974 * README: Update build documentation.
2975 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
2977 * configure.ac: Update paths.
2978 * configure: Rebuild.
2979 * acinclude.m4: Update paths.
2980 * Makefile.in: Update include paths.
2981 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
2982 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
2983 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
2984 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
2985 (%-generated.c): Update paths.
2986 * Move entire directory from ../gdb/gdbserver.
2988 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
2990 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
2992 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2994 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
2995 assignment instead of srv_linux_obj.
2997 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
2999 * server.c (handle_qxfer_libraries): Write segment-address with
3002 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3004 * Makefile.in (install-strip): New target.
3005 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3006 * aclocal.m4: Regenerate.
3007 * configure: Regenerate.
3008 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3010 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3012 * Makefile.in (SFILES): Adjust paths to point to real files.
3013 (OBS): Move waitstatus.o to target/waitstatus.o.
3014 (TAGS): Transform paths appropriately.
3016 (nat/%.o): ... this pattern rule.
3018 (target/%.o): ... this pattern rule.
3019 * configure.srv: Adjust paths throughout to include nat/ prefix
3020 with the revant files.
3021 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3022 * configure: Regenerate.
3024 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3026 * Makefile.in (TAGS): Remove config files from the recipe.
3028 2020-01-14 Tom Tromey <tom@tromey.com>
3030 * configure: Rebuild.
3031 * configure.ac: Remove any checks that were added to common.m4.
3032 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3035 2020-01-14 Tom Tromey <tom@tromey.com>
3037 * server.h: Include config.h.
3038 * gdbreplay.c: Include config.h.
3039 * configure: Rebuild.
3040 * configure.ac: Don't source common.host.
3041 * acinclude.m4: Update path.
3042 * Makefile.in (INCSUPPORT): New variable.
3043 (INCLUDE_CFLAGS): Add INCSUPPORT.
3044 (SFILES): Update paths.
3045 (version-generated.c): Update path to create-version.sh.
3046 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3048 2020-01-14 Tom Tromey <tom@tromey.com>
3050 * configure.ac (LIBS): Use WIN32APILIBS.
3051 (USE_WIN32API): Don't define.
3052 * configure: Rebuild.
3054 2020-01-14 Tom Tromey <tom@tromey.com>
3056 * configure: Rebuild.
3058 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3060 * Makefile.in (%-generated.c): Remove rule for files from
3063 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3065 * configure: Re-generate.
3067 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3069 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3071 * tracepoint.c (stop_tracing, flush_trace_buffer,
3072 about_to_request_buffer_space, get_trace_state_variable_value,
3073 set_trace_state_variable_value, gdb_collect): Add declaration.
3075 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3077 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3078 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3079 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3080 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3081 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3084 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3086 * inferiors.c: Include gdbsupport/common-inferior.h.
3088 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3090 * hostio-errno.c: Include hostio.h.
3092 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3094 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3097 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3099 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3100 * linux-arm-tdesc.h: Include arch/arm.h.
3102 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3104 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3106 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3108 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3109 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3111 2020-01-10 Pedro Alves <palves@redhat.com>
3113 * fork-child.c (post_fork_inferior): Pass target down to
3115 * inferiors.c (switch_to_thread): Add process_stratum_target
3117 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3118 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3119 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3120 * remote-utils.c (prepare_resume_reply): Pass the target to
3122 * target.c (the_target): Now a process_stratum_target.
3123 (done_accessing_memory): Pass the target to switch_to_thread.
3124 (set_target_ops): Ajust to use process_stratum_target.
3125 * target.h (struct target_ops): Rename to ...
3126 (struct process_stratum_target): ... this.
3127 (the_target, set_target_ops): Adjust.
3128 (prepare_to_access_memory): Adjust comment.
3129 * win32-low.c (child_xfer_memory): Adjust to use
3130 process_stratum_target.
3131 (win32_target_ops): Now a process_stratum_target.
3133 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3134 Pedro Alves <palves@redhat.com>
3136 * win32-low.c (get_child_debug_event): Extract the fatal exception
3137 from the exit status and convert to the equivalent Posix signal
3139 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3140 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3142 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3144 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3146 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3148 * server.c (gdbserver_version): Change copyright year to 2020.
3149 * gdbreplay.c (gdbreplay_version): Likewise.
3151 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3153 * configure: Regenerate.
3154 * configure.ac: Quote variable arguments of test.
3156 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3158 * Makefile.in: Fix build with GNU Make 3.81
3160 2019-12-16 Tom Tromey <tromey@adacore.com>
3162 * server.c (get_exec_file): Constify result.
3164 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3166 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3167 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3168 * config.in: Regenerate.
3169 * configure: Regenerate.
3170 * configure.ac: Don't check for strerror.
3171 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3172 Call safe_strerror instead of strerror.
3173 * server.h (strerror): Remove this now-unnecessary declaration.
3174 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3176 (gdb_agent_helper_thread): Likewise.
3177 * utils.c (perror_with_name): Likewise.
3179 2019-11-26 Tom Tromey <tom@tromey.com>
3181 * configure, config.in: Rebuild.
3183 2019-11-26 Tom Tromey <tom@tromey.com>
3185 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3186 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3188 * configure, config.in: Rebuild.
3190 2019-11-26 Tom Tromey <tom@tromey.com>
3192 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3193 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3194 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3195 * acinclude.m4: Include ax_pthread.m4.
3196 * config.in, configure: Rebuild.
3198 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3200 * debug.c (debug_set_output): Call safe_strerror instead of
3202 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3203 (linux_kill_one_lwp): Likewise.
3204 (linux_detach_one_lwp): Likewise.
3205 (linux_wait_for_event_filtered): Likewise.
3206 (store_register): Likewise.
3207 * lynx-low.c (lynx_attach): Likewise.
3208 * mem-break.c (insert_memory_breakpoint): Likewise.
3209 (remove_memory_breakpoint): Likewise.
3210 (delete_fast_tracepoint_jump): Likewise.
3211 (set_fast_tracepoint_jump): Likewise.
3212 (uninsert_fast_tracepoint_jumps_at): Likewise.
3213 (reinsert_fast_tracepoint_jumps_at): Likewise.
3214 * nto-low.c (nto_xfer_memory): Likewise.
3215 (nto_resume): Likewise.
3217 2019-11-20 Luis Machado <luis.machado@linaro.org>
3219 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3220 instead of register count.
3221 * tdesc.c (tdesc_contains_feature): New function.
3222 * tdesc.h (tdesc_contains_feature): New prototype.
3224 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3226 * Makefile.in: Add safe-strerror.c.
3227 * configure: Regenerate.
3228 * configure.ac: Don't source common.host.
3230 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3232 * config.in: Regenerate.
3233 * configure: Regenerate.
3235 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3237 * ax.c (ax_printf): Handle size_t_arg.
3239 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3241 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3242 * mi/mi-main.c (output_cores): Likewise.
3243 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3244 (linux_xfer_osdata_modules): Likewise.
3245 * remote.c (register_remote_support_xml): Likewise.
3246 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3247 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3249 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3251 * configure: Regenerate.
3252 * configure.ac: Remove check for strerror_r.
3254 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3256 * config.in: Regenerate.
3257 * configure: Regenerate.
3258 * configure.ac: Also check for strerror_r.
3260 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3262 * ax.h (debug_agent): Remove duplicate declaration.
3264 2019-10-26 Tom de Vries <tdevries@suse.de>
3266 * linux-aarch64-low.c: Fix typos in comments.
3267 * linux-arm-low.c: Same.
3268 * linux-low.c: Same.
3269 * linux-ppc-low.c: Same.
3270 * proc-service.c: Same.
3273 * tracepoint.c: Same.
3274 * win32-low.c: Same.
3276 2019-10-25 Tom Tromey <tromey@adacore.com>
3278 * utils.c (xstrdup): Remove.
3280 2019-10-23 Tom Tromey <tom@tromey.com>
3282 * configure, config.in: Rebuild.
3284 2019-10-23 Tom Tromey <tom@tromey.com>
3286 * configure: Rebuild.
3287 * acinclude.m4: Use m4_include, not sinclude.
3289 2019-10-17 Tom Tromey <tromey@adacore.com>
3291 * configure: Rebuild.
3292 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3293 in AC_CONFIG_FILES invocation.
3294 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3297 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3299 * server.c: Include xml-builtin.h.
3300 (get_xml_features): Don't declare xml_builtins here.
3302 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3304 * Makefile.in: Remove references to vec-ipa.o.
3306 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3308 * Makefile.in: Remove references to vec.c.
3310 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3312 * server.c (server_waiting): Change to bool.
3313 (extended_protocol): Likewise.
3314 (response_needed): Likewise.
3315 (exit_requested): Likewise.
3316 (run_once): Likewise.
3317 (report_no_resumed): Likewise.
3318 (non_stop): Likewise.
3319 (disable_packet_vCont): Likewise.
3320 (disable_packet_Tthread): Likewise.
3321 (disable_packet_qC): Likewise.
3322 (disable_packet_qfThreadInfo): Likewise.
3323 (handle_general_set): Update.
3324 (handle_detach): Update.
3325 (handle_monitor_command): Update.
3326 (handle_query): Update.
3327 (captured_main): Update.
3328 (process_serial_event): Update.
3329 * server.h (server_waiting): Change to bool.
3330 (disable_packet_vCont): Likewise.
3331 (disable_packet_Tthread): Likewise.
3332 (disable_packet_qC): Likewise.
3333 (disable_packet_qfThreadInfo): Likewise.
3334 (run_once): Likewise.
3335 (non_stop): Likewise.
3336 * target.c (target_stop_and_wait): Update.
3338 2019-10-02 Tom Tromey <tromey@adacore.com>
3340 * Makefile.in (SFILES): Add common-inferior.c.
3341 (OBS): Add common-inferior.o.
3342 * server.c (startup_with_shell): Don't define.
3344 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3346 * linux-low.c (linux_low_read_btrace): Update for change to
3349 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3351 * debug.c (debug_threads): Remove comment in favor of the header.
3352 * debug.h (using_threads): Add declaration.
3353 (debug_threads): Add comment.
3354 * linux-aarch64-low.c: Include debug.h and remove declaration of
3356 * nto-low.c: Likewise.
3357 * remote-utils.c: Likewise.
3358 * thread-db.c: Likewise.
3360 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3362 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3363 and powerpc-cell64l-ipa.o.
3364 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3365 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3366 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3369 * spu-low.c: Remove file.
3371 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3372 (parse_spufs_run): Remove.
3373 (ppc_get_pc): Remove Cell/B.E. support.
3374 (ppc_set_pc): Likewise.
3375 (ppc_breakpoint_at): Likewise.
3376 (ppc_arch_setup): Likewise.
3377 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3378 tdesc_powerpc_cell32l.
3379 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3380 or init_registers_powerpc_cell32l.
3381 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3382 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3383 or init_registers_powerpc_cell32l.
3384 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3385 (init_registers_powerpc_cell32l): Remove prototype.
3386 (init_registers_powerpc_cell64l): Likewise.
3388 * target.h (struct target_ops): Remove qxfer_spu member.
3389 * server.c (handle_qxfer_spu): Remove.
3390 (qxfer_packets): Remove entry for "spu".
3391 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3392 * linux-low.c (SPUFS_MAGIC): Remove.
3393 (spu_enumerate_spu_ids): Remove.
3394 (linux_qxfer_spu): Remove.
3395 (linux_target_ops): Remove qxfer_spu member.
3396 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3397 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3398 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3400 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3402 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3403 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3404 * config.in: Regenerate.
3405 * configure: Regenerate.
3407 2019-08-15 Tom Tromey <tromey@adacore.com>
3409 * target.c (target_write_memory): Use gdb::byte_vector.
3411 2019-08-15 Tom Tromey <tromey@adacore.com>
3413 * tracepoint.c (write_inferior_data_pointer)
3414 (write_inferior_integer, write_inferior_int8)
3415 (write_inferior_uinteger, m_tracepoint_action_download)
3416 (r_tracepoint_action_download, x_tracepoint_action_download)
3417 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3418 (download_agent_expr, download_tracepoint_1)
3419 (download_trace_state_variables, upload_fast_traceframes): Update.
3420 * server.c (gdb_write_memory): Update.
3421 * remote-utils.c (relocate_instruction): Update.
3422 * proc-service.c (ps_pdwrite): Update.
3423 * mem-break.c (remove_memory_breakpoint)
3424 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3425 (uninsert_fast_tracepoint_jumps_at)
3426 (reinsert_fast_tracepoint_jumps_at): Update.
3427 * linux-x86-low.c (append_insns)
3428 (i386_install_fast_tracepoint_jump_pad)
3429 (amd64_write_goto_address, i386_write_goto_address): Update.
3430 * linux-s390-low.c (append_insns, s390_write_goto_address):
3432 * linux-ppc-low.c (ppc_relocate_instruction)
3433 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3434 (ppc_write_goto_address): Update.
3435 * linux-aarch64-low.c (append_insns): Update.
3436 * target.h (struct target_ops): Update.
3437 (write_inferior_memory): Don't declare.
3438 * target.c (target_write_memory): Rename from
3439 write_inferior_memory. Remove old target_write_memory.
3441 2019-08-15 Tom Tromey <tromey@adacore.com>
3443 * target.c (write_inferior_memory): Use std::vector.
3445 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3448 * configure.ac: Drop enable-libmcheck support.
3449 * configure, config.in: Rebuild.
3450 * acinclude.m4: Don't include it.
3452 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3454 * configure.srv: Remove Arm xml files.
3456 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3458 * configure.srv: Add new files. Remove xml generated files.
3459 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3461 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3462 * linux-aarch32-tdesc.c: New file.
3463 * linux-aarch32-tdesc.h: New file.
3464 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3465 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3466 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3467 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3468 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3469 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3470 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3471 (arm_read_description): Call arm_linux_read_description.
3472 (initialize_low_arch): Don't init registers.
3473 * linux-arm-tdesc.c: New file.
3474 * linux-arm-tdesc.h: New file.
3476 2019-07-10 Alan Hayward <alan.hayward@arm.com>
3478 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3479 Move counter inside for.
3480 (arm_read_description): Check ptrace earlier.
3481 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3483 2019-07-09 Tom Tromey <tom@tromey.com>
3485 * configure: Rebuild.
3486 * configure.ac: Change common to gdbsupport.
3487 * acinclude.m4: Change common to gdbsupport.
3488 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3489 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3490 common to gdbsupport.
3491 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3492 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3493 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3494 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3495 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3496 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3497 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3498 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3499 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3500 common to gdbsupport.
3502 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3504 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3506 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3508 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3510 * configure.srv: Remove legacy xml.
3511 * linux-aarch64-low.c (initialize_low_arch): Remove
3512 initialize_low_tdesc call.
3513 * linux-aarch64-tdesc-selftest.c: Remove file.
3514 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3515 * linux-x86-low.c (initialize_low_arch): Remove
3516 initialize_low_tdesc call.
3517 * linux-x86-tdesc-selftest.c: Remove file.
3518 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3520 2019-06-20 Tom de Vries <tdevries@suse.de>
3522 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3523 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3525 2019-06-19 Tom de Vries <tdevries@suse.de>
3527 * debug.h (debug_write): Change return type to ssize_t.
3528 * debug.c (debug_write): Same.
3530 2019-06-14 Tom Tromey <tom@tromey.com>
3532 * configure.ac: Use new path to gnulib.
3533 * configure: Rebuild.
3534 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3537 2019-06-11 Tom Tromey <tom@tromey.com>
3539 * Makefile.in (SFILES): Add alloc.c.
3541 (IPA_OBJS): Add alloc-ipa.o.
3542 (alloc-ipa.o): New target.
3543 (%.o: ../%.c): New pattern rule.
3545 2019-06-10 Tom Tromey <tromey@adacore.com>
3547 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3548 end warning with a newline.
3549 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3551 * thread-db.c (attach_thread): Don't end warning with a newline.
3552 (thread_db_notice_clone): Likewise.
3553 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3555 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3556 end warning with a newline.
3558 2019-06-04 Pedro Alves <palves@redhat.com>
3560 * server.c (captured_main): Use make_unique_xstrdup.
3562 2019-06-02 Tom Tromey <tom@tromey.com>
3564 * gdbreplay.c (fromhex): Remove.
3565 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3567 2019-05-29 Tom Tromey <tromey@adacore.com>
3569 * configure: Rebuild.
3571 2019-05-06 Kevin Buettner <kevinb@redhat.com>
3573 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3574 sign extension code on 32-bit builds.
3576 2019-05-03 Eli Zaretskii <eliz@gnu.org>
3579 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3581 2019-04-19 Tom Tromey <tom@tromey.com>
3583 * server.c (struct vstop_notif): Derive from notif_event.
3585 (queue_stop_reply): Update.
3586 (remove_all_on_match_ptid): Change type. Rewrite.
3587 (discard_queued_stop_replies): Rewrite.
3588 (in_queued_stop_replies_ptid): Change type.
3589 (in_queued_stop_replies): Rewrite.
3590 (notif_stop): Update.
3591 (queue_stop_reply_callback): Update.
3592 (captured_main): Don't call initialize_notif.
3593 (push_stop_notification): Update.
3594 * notif.c (notif_write_event, handle_notif_ack)
3595 (notif_event_enque, notif_push): Update.
3596 (notif_event_xfree, initialize_notif): Remove.
3597 * notif.h (struct notif_event): Include <list>, not
3599 (struct notif_server) <queue>: Now a std::list.
3600 (notif_event_p): Remove typedef.
3601 (initialize_notif): Don't declare.
3602 (struct notif_event): Add virtual destructor.
3604 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3606 * ax.c (ax_vdebug): Call debug_printf.
3607 * debug.c (debug_write): New function.
3608 * debug.h (debug_write): New declaration.
3609 * linux-low.c (sigchld_handler): Call debug_write.
3611 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3613 * debug.c (debug_set_output): New function.
3614 (debug_vprintf): Send output to debug_file.
3615 (debug_flush): Likewise.
3616 * debug.h (debug_set_output): New declaration.
3617 * server.c (handle_monitor_command): Add debug-file option.
3618 (captured_main): Likewise.
3620 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3622 * debug.c (remote_debug): Add definition.
3623 * debug.h (remote_debug): Add declaration.
3624 * hostio.c (remote_debug): Remove declaration.
3625 * remote-utils.c (struct ui_file): Likewise.
3626 (remote_debug): Likewise.
3627 * remote-utils.h (remote_debug): Likewise,
3628 * server.c (remote_debug): Remove definition.
3630 2019-04-10 Kevin Buettner <kevinb@redhat.com>
3632 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3633 when using a 64-bit gdbserver.
3635 2019-04-09 Tom Tromey <tromey@adacore.com>
3637 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3639 2019-04-08 Tom Tromey <tom@tromey.com>
3641 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3643 (linux_resume_one_lwp): Likewise.
3645 2019-04-08 Tom Tromey <tom@tromey.com>
3647 * gdbreplay.c: Update.
3648 * linux-low.c: Update.
3651 2019-04-08 Tom Tromey <tom@tromey.com>
3653 * server.c: Use C++ exception handling.
3654 * linux-low.c: Use C++ exception handling.
3655 * gdbreplay.c: Use C++ exception handling.
3657 2019-04-08 Tom Tromey <tom@tromey.com>
3659 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
3660 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
3661 (captured_main, main): Update.
3662 * gdbreplay.c (main): Update.
3664 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3666 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
3667 value in argument pointer, return 1 if the entry is found and 0
3668 otherwise. Move comment.
3669 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
3670 * linux-low.h (linux_get_auxv): Declare.
3671 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
3673 2019-04-05 Tom Tromey <tromey@adacore.com>
3675 * server.c (gdbserver_usage): Use upper-case for metasyntactic
3678 2019-03-28 Alan Hayward <alan.hayward@arm.com>
3680 * linux-low.c (AT_HWCAP2): Add define if not already included.
3682 2019-03-26 Alan Hayward <alan.hayward@arm.com>
3684 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
3685 (aarch64_arch_setup): Call linux_get_hwcap.
3686 * linux-arm-low.c (arm_get_hwcap): Remove function.
3687 (arm_read_description): Call linux_get_hwcap.
3688 * linux-low.c (linux_get_auxv): New function.
3689 (linux_get_hwcap): Likewise.
3690 (linux_get_hwcap2): Likewise.
3691 * linux-low.h (linux_get_hwcap): New declaration.
3692 (linux_get_hwcap2): Likewise.
3693 * linux-ppc-low.c (ppc_get_auxv): Remove function.
3694 (ppc_arch_setup): Call linux_get_hwcap.
3695 * linux-s390-low.c (s390_get_hwcap): Remove function.
3696 (s390_arch_setup): Call linux_get_hwcap.
3698 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3699 Jiong Wang <jiong.wang@arm.com>
3701 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
3702 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
3704 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
3706 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3707 Jiong Wang <jiong.wang@arm.com>
3709 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
3710 (aarch64_get_hwcap): New function.
3711 (aarch64_arch_setup): Read APIA hwcap.
3713 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3714 Jiong Wang <jiong.wang@arm.com>
3716 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
3717 (initialize_low_tracepoint): Likewise.
3718 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
3719 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
3720 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
3721 (aarch64_linux_read_description): Likewise.
3722 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
3724 2019-03-12 John Baldwin <jhb@FreeBSD.org>
3726 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
3727 i386_create_target_description for 'segments' parameter.
3728 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
3729 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3730 * win32-i386-low.c (i386_arch_setup): Likewise.
3732 2019-03-12 Tom Tromey <tromey@adacore.com>
3734 * linux-low.c (iterate_over_lwps): Update.
3736 2019-03-06 Tom Tromey <tom@tromey.com>
3738 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
3739 (captured_main): Use SCOPE_EXIT.
3741 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
3743 * configure.srv: Use '$enable_unittest' instead of '$development'
3744 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
3747 2019-02-27 Tom Tromey <tromey@adacore.com>
3749 * gdbreplay.c (logchar): Handle \r\n.
3751 2019-02-07 Alan Hayward <alan.hayward@arm.com>
3753 * linux-low.c (linux_attach): Add process before lwp.
3754 * server.c (attach_inferior): Check if already attached.
3756 2019-02-07 Tom Tromey <tom@tromey.com>
3758 * x86-tdesc.h: Rename include guard.
3759 * x86-low.h: Add include guard.
3760 * wincecompat.h: Rename include guard.
3761 * win32-low.h: Add include guard.
3762 * utils.h: Rename include guard.
3763 * tracepoint.h: Rename include guard.
3764 * tdesc.h: Rename include guard.
3765 * target.h: Rename include guard.
3766 * server.h: Rename include guard.
3767 * remote-utils.h: Rename include guard.
3768 * regcache.h: Rename include guard.
3769 * nto-low.h: Rename include guard.
3770 * notif.h: Add include guard.
3771 * mem-break.h: Rename include guard.
3772 * lynx-low.h: Add include guard.
3773 * linux-x86-tdesc.h: Add include guard.
3774 * linux-s390-tdesc.h: Add include guard.
3775 * linux-ppc-tdesc-init.h: Add include guard.
3776 * linux-low.h: Add include guard.
3777 * linux-aarch64-tdesc.h: Add include guard.
3778 * linux-aarch32-low.h: Add include guard.
3779 * inferiors.h: Rename include guard.
3780 * i387-fp.h: Rename include guard.
3781 * hostio.h: Rename include guard.
3782 * gdbthread.h: Rename include guard.
3783 * gdb_proc_service.h: Rename include guard.
3784 * event-loop.h: Rename include guard.
3785 * dll.h: Rename include guard.
3786 * debug.h: Rename include guard.
3787 * ax.h: Rename include guard.
3789 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
3792 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
3793 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
3795 2019-01-25 Tom Tromey <tom@tromey.com>
3797 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
3799 2019-01-25 Tom Tromey <tom@tromey.com>
3801 * win32-low.c: Fix common/ includes.
3802 * win32-i386-low.c: Fix common/ includes.
3803 * tracepoint.c: Fix common/ includes.
3804 * thread-db.c: Fix common/ includes.
3805 * target.h: Fix common/ includes.
3806 * symbol.c: Fix common/ includes.
3807 * spu-low.c: Fix common/ includes.
3808 * server.h: Fix common/ includes.
3809 * server.c: Fix common/ includes.
3810 * remote-utils.c: Fix common/ includes.
3811 * regcache.h: Fix common/ includes.
3812 * regcache.c: Fix common/ includes.
3813 * nto-x86-low.c: Fix common/ includes.
3814 * notif.h: Fix common/ includes.
3815 * mem-break.h: Fix common/ includes.
3816 * lynx-low.c: Fix common/ includes.
3817 * lynx-i386-low.c: Fix common/ includes.
3818 * linux-x86-tdesc-selftest.c: Fix common/ includes.
3819 * linux-x86-low.c: Fix common/ includes.
3820 * linux-low.c: Fix common/ includes.
3821 * inferiors.h: Fix common/ includes.
3822 * i387-fp.c: Fix common/ includes.
3823 * hostio.c: Fix common/ includes.
3824 * hostio-errno.c: Fix common/ includes.
3825 * gdbthread.h: Fix common/ includes.
3826 * gdbreplay.c: Fix common/ includes.
3827 * fork-child.c: Fix common/ includes.
3828 * event-loop.c: Fix common/ includes.
3830 (enum gdb_agent_op): Fix common/ includes.
3832 2019-01-21 Tom Tromey <tom@tromey.com>
3834 * tracepoint.c: Fix includes.
3835 * remote-utils.c: Fix includes.
3836 * linux-x86-low.c: Fix includes.
3838 2019-01-01 Joel Brobecker <brobecker@adacore.com>
3840 * gdbreplay.c (gdbreplay_version): Update copyright year in
3842 * server.c (gdbserver_version): Likewise.
3844 2018-12-05 Alan Hayward <alan.hayward@arm.com>
3846 * linux-low.c (add_lwp): Switch ordering.
3848 2018-11-29 Tom Tromey <tom@tromey.com>
3850 * win32-low.c (win32_join): Take pid, not process.
3851 * target.h (struct target_ops) <join>: Change argument type.
3852 (join_inferior): Change argument name.
3853 * spu-low.c (spu_join): Take pid, not process.
3854 * server.c (handle_detach): Preserve pid before destroying
3856 * lynx-low.c (lynx_join): Take pid, not process.
3857 * linux-low.c (linux_join): Take pid, not process.
3859 2018-11-23 Alan Hayward <alan.hayward@arm.com>
3861 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
3862 (aarch64_cannot_fetch_register): Likewise.
3863 (struct linux_target_ops): Update references.
3865 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3867 * linux-ppc-low.c: Include nat/linux-ptrace.h.
3869 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3871 * configure.srv (ipa_ppc_linux_regobj): Add
3872 powerpc-isa207-htm-vsx32l-ipa.o and
3873 powerpc-isa207-htm-vsx64l-ipa.o.
3874 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
3875 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
3876 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
3877 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
3878 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
3879 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
3880 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
3881 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
3882 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3883 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
3884 (init_registers_powerpc_isa207_htm_vsx32l)
3885 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
3886 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
3887 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
3888 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
3889 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
3890 (ppc_store_tm_ctarregset): New functions.
3891 (ppc_regsets): Add entries for HTM regsets.
3892 (ppc_arch_setup): Set htm in features struct when needed. Set
3893 sizes for the HTM regsets.
3894 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
3895 (initialize_low_arch): Call
3896 init_registers_powerpc_isa207_htm_vsx32l and
3897 init_registers_powerpc_isa207_htm_vsx64l.
3898 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3899 PPC_TDESC_ISA207_HTM_VSX.
3900 (initialize_low_tracepoint): Call
3901 init_registers_powerpc_isa207_htm_vsx32l and
3902 init_registers_powerpc_isa207_htm_vsx64l.
3904 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3906 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
3907 rs6000/power-linux-pmu.xml to srv_xmlfiles.
3908 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
3909 (ppc_store_pmuregset): New functions.
3910 (ppc_regsets): Add entries for ebb and pmu regsets.
3911 (ppc_arch_setup): Set isa207 in features struct if the ebb and
3912 pmu regsets are available. Set sizes for these regsets.
3914 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3916 * configure.srv (ipa_ppc_linux_regobj): Add
3917 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
3918 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
3919 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
3920 rs6000/powerpc-isa207-vsx32l.xml, and
3921 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
3922 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3923 <PPC_TDESC_ISA207_VSX>: New enum value.
3924 (init_registers_powerpc_isa207_vsx32l): Declare.
3925 (init_registers_powerpc_isa207_vsx64l): Declare.
3926 * linux-ppc-low.c (ppc_fill_tarregset): New function.
3927 (ppc_store_tarregset): New function.
3928 (ppc_regsets): Add entry for the TAR regset.
3929 (ppc_arch_setup): Set isa207 in features struct when needed. Set
3930 size for the TAR regsets.
3931 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
3932 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
3933 and init_registers_powerpc_isa207_vsx64l.
3934 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
3935 (initialize_low_tracepoint): Call
3936 init_registers_powerpc_isa207_vsx32l and
3937 init_registers_powerpc_isa207_vsx64l.
3939 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3940 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3942 * configure.srv (ipa_ppc_linux_regobj): Add
3943 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
3944 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
3945 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
3946 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
3947 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
3948 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
3949 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
3950 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3951 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
3952 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
3953 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
3954 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
3955 (ppc_hwcap): Add comment.
3956 (ppc_hwcap2): New global.
3957 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
3958 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
3959 (ppc_regsets): Add entries for the DSCR and PPR regsets.
3960 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
3961 when needed. Set sizes for the the DSCR and PPR regsets.
3962 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
3963 (initialize_low_arch): Call
3964 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3965 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3966 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3967 PPC_TDESC_ISA205_PPR_DSCR_VSX.
3968 (initialize_low_tracepoint): Call
3969 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3970 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3972 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3974 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
3976 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
3977 Simon Marchi <simark@simark.ca>
3979 * acinclude.m4: Include "../selftest.m4".
3980 * configure: Regenerate.
3981 * configure.ac: Use "GDB_AC_SELFTEST".
3982 * configure.srv: Use "$enable_unittests" instead of
3983 "$development" when checking whether unit tests have been
3985 * server.c (captured_main): Update message informing that
3986 selftests have been disabled.
3988 2018-10-04 Tom Tromey <tom@tromey.com>
3990 * configure: Rebuild.
3992 2018-10-04 Tom Tromey <tom@tromey.com>
3994 * server.c (handle_status): Rename inner "thread".
3995 (process_serial_event): Declare "res" in 'm' case.
3996 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
3997 (iterate_over_lwps): Rename inner "thread".
3998 (linux_qxfer_libraries_svr4): Rename inner "len".
3999 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4001 2018-10-01 Gary Benson <gbenson@redhat.com>
4003 * gdb_proc_service.h: Moved common code to
4004 common/gdb_proc_service.h.
4006 2018-10-01 Gary Benson <gbenson@redhat.com>
4008 * gdb_proc_service.h: Synchronize comments and whitespace with
4009 GDB's version of this file.
4011 2018-09-25 Tom Tromey <tom@tromey.com>
4013 * configure: Rebuild.
4014 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4016 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4018 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4019 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4020 ($(IPA_LIB)): Sort IPA_OBJS.
4022 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4024 * Makefile.in: Remove references to $(ADD_DEPS).
4026 2018-09-16 Tom Tromey <tom@tromey.com>
4028 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4030 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4033 2018-09-05 Tom Tromey <tom@tromey.com>
4035 * configure: Rebuild.
4037 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4040 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4042 2018-08-27 Tom Tromey <tom@tromey.com>
4045 * configure: Rebuild.
4047 2018-08-27 Tom Tromey <tom@tromey.com>
4049 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4050 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4051 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4052 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4053 (s390x_emit_stack_adjust): Add casts to unsigned char.
4055 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4059 * server.h (struct client_state) <disable_randomization>:
4062 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4064 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4066 (mips_supply_ptrace_register): Likewise.
4068 2018-07-22 Tom Tromey <tom@tromey.com>
4070 * configure: Rebuild.
4072 2018-07-22 Tom Tromey <tom@tromey.com>
4074 * win32-low.c (win32_create_inferior): Remove unused variables.
4075 * gdbreplay.c (remote_open): Remove unused variable.
4076 * remote-utils.c (remote_prepare): Remove unused variable.
4077 * x86-tdesc.h (X86_TDESC_H): Define.
4078 (amd64_expedite_regs): Define conditionally.
4079 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4080 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4081 * remote-utils.c (readchar): Remove unused variable.
4083 2018-07-13 Pedro Alves <palves@redhat.com>
4085 * linux-low.c (linux_kill): Change parameter to process_info
4086 pointer instead of pid. Adjust.
4087 * lynx-low.c (lynx_kill): Likewise.
4088 * nto-low.c (nto_kill): Likewise.
4089 * spu-low.c (spu_kill): Likewise.
4090 * win32-low.c (win32_kill): Likewise.
4091 * server.c (handle_v_kill, kill_inferior_callback)
4092 (detach_or_kill_for_exit): Adjust.
4093 * target.c (kill_inferior): Change parameter to process_info
4094 pointer instead of pid. Adjust.
4095 * target.h (struct target_ops) <kill>: Change parameter to
4096 process_info pointer instead of pid. Adjust all implementations
4098 (kill_inferior): Likewise.
4100 2018-07-13 Pedro Alves <palves@redhat.com>
4102 * linux-low.c (linux_detach, linux_join): Change parameter to
4103 process_info pointer instead of pid. Adjust.
4104 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4105 * nto-low.c (nto_detach): Likewise.
4106 * spu-low.c (spu_detach, spu_join): Likewise.
4107 * win32-low.c (win32_detach, win32_join): Likewise.
4108 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4109 * target.h (struct target_ops) <detach, join>: Change parameter to
4110 process_info pointer instead of pid. Adjust all implementations
4112 (detach_inferior, join_inferior): Rename 'pid' parameter to
4115 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4116 Jan Kratochvil <jan.kratochvil@redhat.com>
4117 Paul Fertser <fercerpav@gmail.com>
4118 Tsutomu Seki <sekiriki@gmail.com>
4120 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4121 (OBS): Add 'common/netstuff.o'.
4122 (GDBREPLAY_OBS): Likewise.
4123 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4124 (remote_open): Implement support for IPv6
4126 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4128 (handle_accept_event): Accept connections from IPv6 sources.
4129 (remote_prepare): Handle IPv6-style hostnames; implement
4130 support for IPv6 connections.
4131 (remote_open): Implement support for printing connections from
4134 2018-07-11 Pedro Alves <palves@redhat.com>
4137 * mem-break.c (any_persistent_commands): Add process_info
4138 parameter and use it instead of relying on the current process.
4139 Change return type to bool.
4140 * mem-break.h (any_persistent_commands): Add process_info
4141 parameter and change return type to bool.
4142 * server.c (handle_detach): Remove require_running_or_return call.
4143 Look up the process_info for the process we're about to detach.
4144 If not found, return back error to GDB. Adjust
4145 any_persistent_commands call to pass down a process pointer.
4147 2018-07-11 Pedro Alves <palves@redhat.com>
4149 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4150 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4151 instead of collect_register_by_name.
4152 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4153 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4155 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4156 Pedro Alves <palves@redhat.com>
4158 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4160 2018-07-03 Tom Tromey <tom@tromey.com>
4162 * linux-low.c: Update.
4163 * lynx-low.c: Update.
4164 * mem-break.c: Update.
4165 * nto-low.c: Update.
4166 * remote-utils.c: Update.
4168 * spu-low.c: Update.
4170 * win32-low.c: Update.
4172 2018-07-03 Tom Tromey <tom@tromey.com>
4176 2018-07-03 Tom Tromey <tom@tromey.com>
4178 * linux-low.c: Update.
4180 2018-07-03 Tom Tromey <tom@tromey.com>
4184 2018-07-03 Tom Tromey <tom@tromey.com>
4186 * linux-low.c: Update.
4187 * linux-mips-low.c: Update.
4188 * lynx-low.c: Update.
4189 * nto-low.c: Update.
4190 * remote-utils.c: Update.
4192 * spu-low.c: Update.
4194 * thread-db.c: Update.
4196 2018-07-03 Tom Tromey <tom@tromey.com>
4198 * linux-low.c: Update.
4199 * linux-mips-low.c: Update.
4200 * lynx-low.c: Update.
4201 * mem-break.c: Update.
4202 * nto-low.c: Update.
4203 * remote-utils.c: Update.
4205 * spu-low.c: Update.
4207 * tracepoint.c: Update.
4209 2018-07-03 Tom Tromey <tom@tromey.com>
4211 * linux-low.c: Update.
4212 * linux-ppc-low.c: Update.
4213 * linux-x86-low.c: Update.
4214 * proc-service.c: Update.
4216 * spu-low.c: Update.
4217 * thread-db.c: Update.
4218 * win32-low.c: Update.
4220 2018-07-03 Tom Tromey <tom@tromey.com>
4222 * linux-low.c: Update.
4223 * lynx-low.c: Update.
4224 * nto-low.c: Update.
4225 * remote-utils.c: Update.
4226 * spu-low.c: Update.
4227 * thread-db.c: Update.
4228 * win32-low.c: Update.
4230 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4232 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4233 parameter in call to 'amd64_create_target_description'.
4235 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4237 * x86-tdesc.h: Remove executable permission flag.
4239 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4241 * configure.ac: Remove AC_PREREQ, add missing quoting.
4242 * configure: Re-generate.
4243 * config.in: Re-generate.
4244 * aclocal.m4: Re-generate.
4246 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4248 * tracepoint.h (current_traceframe): Remove declaration.
4250 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4252 * linux-aarch64-low.c (is_sve_tdesc): New function.
4253 (aarch64_sve_regs_copy_to_regcache): Likewise.
4254 (aarch64_sve_regs_copy_from_regcache): Likewise.
4255 (aarch64_regs_info): Add SVE checks.
4256 (initialize_low_arch): Initialize SVE.
4258 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4260 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4262 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4264 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4265 (initialize_low_tracepoint): Likewise
4266 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4267 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4269 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4271 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4273 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4275 * server.h (PBUFSIZ): Increase size
4277 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4279 * regcache.c (regcache::raw_compare): New function.
4280 * regcache.h (regcache::raw_compare): New declaration.
4282 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4284 * regcache.c (new_register_cache): Use new.
4285 (free_register_cache): Use delete.
4286 (register_data): Use const.
4287 (supply_register): Move body inside regcache.
4288 (regcache::raw_supply): New override function.
4289 (collect_register): Move body inside regcache.
4290 (regcache::raw_collect): New override function.
4291 (regcache::get_register_status): New override function.
4292 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4294 2018-06-09 Tom Tromey <tom@tromey.com>
4296 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4298 (event_queue): Use std::queue.
4299 (gdb_event_xfree): Remove.
4300 (initialize_event_loop, process_event, wait_for_event): Update.
4302 2018-06-08 Stan Cox <scox@redhat.com>
4304 * win32-low.c (win32_create_inferior): last_ptid and last_status
4305 moved to client_state.
4307 2018-06-08 Pedro Alves <palves@redhat.com>
4309 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4310 common/common-exceptions.o, common/common-utils.o,
4311 common/errors.o, common/print-utils.o and utils.o.
4312 * gdbreplay.c: Include "common-defs.h" instead of the two
4313 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4314 string.h or alloca.h.
4315 (perror_with_name): Delete.
4316 (remote_open): Use xstrdup instead of strdup.
4317 (main): Rename to ...
4318 (captured_main): ... this.
4321 2018-06-08 Tom Tromey <tom@tromey.com>
4323 * linux-low.c (linux_low_read_btrace): Update.
4325 2018-06-04 Stan Cox <scox@redhat.com>
4327 * server.h (struct client_state): New.
4328 * server.c (cont_thread, general_thread, multi_process)
4329 (report_fork_events, report_vfork_events, report_exec_events)
4330 (report_thread_events, swbreak_feature, hwbreak_feature)
4331 (vCont_supported, disable_randomization, pass_signals)
4332 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4333 Moved to client_state.
4334 * remote-utils.c (remote_debug, noack_mode)
4335 (transport_is_reliable): Moved to client_state.
4336 * tracepoint.c (current_traceframe): Moved to client_state.
4339 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4340 linux-low.c, remote-utils.h, target.c: Use client_state.
4342 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4344 * configure.srv: Add new c/h file.
4346 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4348 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4351 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4353 * gdb.arch/mips-fpregset-core.exp: New test.
4354 * gdb.arch/mips-fpregset-core.c: New test source.
4356 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4359 * hostio.c (require_int): Do not report overflow for integers
4360 between 0xfffffff and 0x7fffffff.
4362 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4364 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4365 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4366 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4368 (the_low_target): Wire them.
4370 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4372 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4373 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4374 mode. Call collect_register_by_name with vscr using
4375 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4376 (ppc_store_vrregset): Add and set vscr_offset variable as in
4377 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4380 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4382 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4383 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4384 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4386 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4388 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4389 (ppc_store_vsxregset): Likewise.
4390 (ppc_fill_vrregset): Likewise.
4391 (ppc_store_vrregset): Likewise.
4392 (ppc_fill_evrregset): Likewise.
4393 (ppc_store_evrregset): Likewise.
4394 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4395 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4398 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4400 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4401 wordsize of the inferior. Call ppc_linux_target_wordsize.
4403 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4405 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4406 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4407 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4408 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4409 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4410 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4411 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4412 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4413 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4414 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4415 (tdesc_powerpc_e500l): Remove.
4416 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4417 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4418 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4419 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4421 (ppc_arch_setup): Remove target description matching code. Fill a
4422 ppc_linux_features struct and call ppc_linux_match_description
4425 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4427 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4428 width of the requested register exceeds the width of the
4430 (mips_cannot_store_register): Likewise.
4432 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4434 * linux-mips-low.c (mips_fetch_register): New function. Update
4436 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4437 (the_low_target): Wire `mips_fetch_register'.
4439 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4441 * lynx-i386-low.c (LYNXOS_178): New macro.
4442 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4443 the layout on LynxOS-178.
4444 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4445 handle floating point registers that are not supported by
4448 2018-05-10 Tom Tromey <tom@tromey.com>
4450 * configure: Rebuild.
4452 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4455 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4456 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4457 Use it to set the expedite_regs field in the given tdesc.
4458 * x86-tdesc.h: New file.
4459 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4460 Adjust following the addition of the new expedite_regs parameter
4461 to init_target_desc.
4462 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4463 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4464 (i386_linux_read_description, amd64_linux_read_description):
4465 Adjust following the addition of the new expedite_regs parameter
4466 to init_target_desc.
4467 * lynx-i386-low.c: #include "x86-tdesc.h".
4468 (lynx_i386_arch_setup): Adjust following the addition of the new
4469 expedite_regs parameter to init_target_desc.
4470 * nto-x86-low.c: #include "x86-tdesc.h".
4471 (nto_x86_arch_setup): Adjust following the addition of the new
4472 expedite_regs parameter to init_target_desc.
4473 * win32-i386-low.c: #include "x86-tdesc.h".
4474 (i386_arch_setup): Adjust following the addition of the new
4475 expedite_regs parameter to init_target_desc.
4477 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4480 * win32-low.c (win32_create_inferior): Add call to my_wait
4481 setting last_status global.
4483 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4486 * win32-low.c (create_process): Only call gdb_tilde_expand if
4487 inferior_cwd is not NULL.
4489 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4491 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4492 registers to the cache if their values have changed.
4493 (i387_xsave_to_cache): Provide default values for x87 control
4494 registers when these features are available, but disabled.
4495 * regcache.c (supply_register_by_name_zeroed): New function.
4496 * regcache.h (supply_register_by_name_zeroed): Declare new
4499 2018-05-07 Tom Tromey <tom@tromey.com>
4501 * configure: Rebuild.
4503 2018-05-04 Tom Tromey <tom@tromey.com>
4505 * configure: Rebuild.
4507 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4508 Pedro Alves <palves@redhat.com>
4510 * linux-aarch64-low.c (aarch64_stopped_data_address):
4513 2018-04-27 Tom Tromey <tom@tromey.com>
4515 * configure: Rebuild.
4517 2018-04-23 Tom Tromey <tom@tromey.com>
4519 * configure: Rebuild.
4521 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4523 * Makefile.in (depcomp): Add "..".
4524 (all_deps_files): New and use it.
4526 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4528 * configure.srv (aarch64*-*-linux*): Don't include xml.
4529 (i[34567]86-*-cygwin*): Likewise.
4530 (i[34567]86-*-linux*): Likewise.
4531 (i[34567]86-*-lynxos*): Likewise.
4532 (i[34567]86-*-mingw32ce*): Likewise.
4533 (i[34567]86-*-mingw*): Likewise.
4534 (i[34567]86-*-nto*): Likewise.
4535 (tic6x-*-uclinux): Likewise.
4536 (x86_64-*-linux*): Likewise.
4537 (x86_64-*-mingw*): Likewise.
4538 (x86_64-*-cygwin*): Likewise.
4540 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4542 * tdesc.c: Remove xml parameter.
4544 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4546 * server.c (get_features_xml): Remove cast.
4547 * tdesc.c (void target_desc::accept): Fill in function.
4548 (tdesc_get_features_xml): Remove old xml creation.
4549 (print_xml_feature::visit_pre): Add xml vistor.
4550 * tdesc.h (struct target_desc): Make xmltarget mutable.
4551 (tdesc_get_features_xml): Remove declaration.
4553 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4555 * tdesc.c (tdesc_architecture_name): Add new function.
4556 (tdesc_osabi_name): Likewise.
4557 (tdesc_get_features_xml): Use new functions.
4559 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4561 * tdesc.c (tdesc_create_flags): Remove.
4562 (tdesc_add_flag): Likewise.
4563 (tdesc_named_type): Likewise.
4564 (tdesc_create_union): Likewise.
4565 (tdesc_create_struct): Likewise.
4566 (tdesc_create_vector): Likewise.
4567 (tdesc_add_bitfield): Likewise.
4568 (tdesc_add_field): Likewise.
4569 (tdesc_set_struct_size): Likewise.
4571 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4573 * tdesc.c (~target_desc): Remove implictly deleted items.
4574 (init_target_desc): Iterate all features.
4575 (tdesc_get_features_xml): Use vector.
4576 (tdesc_create_feature): Create feature.
4577 * tdesc.h (tdesc_feature) Remove
4578 (target_desc): Add features.
4580 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4582 * Makefile.in: Add common/tdesc.c
4583 * tdesc.c (init_target_desc): init all reg_defs from register
4585 (tdesc_create_reg): Create tdesc_reg.
4586 * tdesc.h (tdesc_feature): Add register vector.
4588 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4590 * tdesc.h (struct target_desc) <features>: Change type to
4591 std::vector<std::string>.
4592 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4594 (tdesc_get_features_xml): Likewise.
4595 (tdesc_create_feature): Likewise.
4597 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4599 * regcache.c (find_register_by_number): Return a ref.
4600 (find_regno): Use references.
4601 (register_size): Likewise.
4602 (register_data): Likewise.
4603 * tdesc.c (target_desc::~target_desc): Remove free calls.
4604 (target_desc::operator==): Use std::vector compare.
4605 (init_target_desc): Use reference.
4606 (tdesc_create_reg): Use reg constructors.
4607 * tdesc.h (struct target_desc): Replace pointer with object.
4609 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4611 * regcache.c (find_register_by_number): Make static.
4612 (find_regno): Use find_register_by_number
4613 * regcache.h (struct reg): Remove declaration.
4615 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4617 * tdesc.c (target_desc::~target_desc): Move to here.
4618 (target_desc::operator==): Likewise.
4619 * tdesc.h (target_desc::~target_desc): Move from here.
4620 (target_desc::operator==): Likewise.
4622 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4624 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4626 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4628 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4630 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4631 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4632 and init_registers_s390_gs_linux64.
4634 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4636 * linux-s390-low.c (s390_fill_gs): Remove function.
4637 (s390_fill_gsbc): Remove function.
4638 (s390_regsets): Set fill functions for the guarded storage regsets
4641 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4643 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4644 the word size. Add comment.
4645 (s390_get_wordsize): New function.
4646 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4647 pswm with it. Instead, use s390_get_wordsize to determine the
4648 word size first and derive the correct tdesc from that directly.
4650 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4652 * Makefile.in: Include silent-rules.mk.
4653 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4654 (COMPILE): Add ECHO_CXX.
4655 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4656 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4657 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
4658 (version-generated.c): Add ECHO_GEN.
4659 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
4660 (IPAGENT_COMPILE): Add ECHO_CXX.
4661 (%-generated.c): Add ECHO_REGDAT.
4663 2018-03-14 Tom Tromey <tom@tromey.com>
4666 * ax.c (ax_printf): Special case for NULL.
4668 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4670 * linux-low.c (linux_qxfer_libraries_svr4): Use
4671 xml_escape_text_append.
4673 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4675 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
4677 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4679 * server.c (handle_general_set): Remove unnecessary xstrdup.
4681 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4683 * server.c (parse_debug_format_options): Adjust to
4684 delim_string_to_char_ptr_vec changes.
4685 * thread-db.c (thread_db_load_search): Adjust to
4686 dirnames_to_char_ptr_vec changes.
4688 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
4690 * target.h (target_enable_btrace, target_disable_btrace)
4691 (target_read_btrace, target_read_btrace_conf): Turn macro into
4692 inline function. Throw error if target method is not defined.
4693 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
4694 check for btrace target method. Be prepared to handle exceptions
4695 from btrace target methods.
4697 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4699 * server.c (captured_main): Change order of error message printed
4700 when the current working directory cannot be found.
4702 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4704 * server.c: Include "filenames.h" and "pathstuff.h".
4705 (program_name): Delete variable.
4706 (program_path): New anonymous class.
4707 (get_exec_wrapper): Use "program_path" instead of
4709 (handle_v_run): Likewise.
4710 (captured_main): Likewise.
4711 (process_serial_event): Likewise.
4713 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4715 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
4716 (OBJS): Add "pathstuff.o".
4717 * server.c (current_directory): New global variable.
4718 (captured_main): Initialize "current_directory".
4720 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4722 * tdesc.c: Use common/tdesc.h.
4723 * tdesc.h: Likewise.
4725 2018-02-20 Alan Hayward <alan.hayward@arm.com>
4726 Simon Marchi <simon.marchi@ericsson.com>
4728 * Makefile.in: Switch order of make rules.
4730 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4732 * Makefile.in: Add common directory in build.
4733 * configure.ac: Add common reference.
4734 * configure: Regenerate.
4736 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4738 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
4739 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
4740 * spu-low.c (spu_target_ops): Likewise.
4741 * win32-low.c (win32_target_ops): Likewise.
4742 * server.c (supported_btrace_packets): Report packets unconditionally.
4743 * target.h (target_ops) <supports_btrace>: Remove.
4744 (target_supports_btrace): Remove.
4746 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4748 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
4749 (handle_btrace_disable): Change return type to void. Use exceptions
4751 (handle_btrace_general_set): Catch exception and copy message to
4754 2018-02-08 Tom Tromey <tom@tromey.com>
4756 * linux-low.c (install_software_single_step_breakpoints): Use
4757 make_scoped_restore.
4758 * inferiors.c (make_cleanup_restore_current_thread): Remove.
4759 (do_restore_current_thread_cleanup): Remove.
4760 * gdbthread.h (make_cleanup_restore_current_thread): Don't
4763 2018-02-08 Tom Tromey <tom@tromey.com>
4765 * mem-break.c (set_raw_breakpoint_at): Use
4766 gdb::unique_xmalloc_ptr.
4768 2018-01-30 Pedro Alves <palves@redhat.com>
4771 * target.c (target_terminal::terminal_state): Rename to ...
4772 (target_terminal::m_terminal_state): ... this.
4774 2018-01-19 James Clarke <jrtc27@jrtc27.com>
4776 * linux-low.c (handle_extended_wait): Surround call to
4777 thread_db_notice_clone with #ifdef USE_THREAD_DB.
4779 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
4781 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
4782 linux_ptrace_attach_fail_reason_string now returning an
4784 (linux_attach): Likewise.
4785 * thread-db.c (attach_thread): Likewise.
4787 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
4790 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
4791 checking for fs_base/gs_base fields in struct user_regs_struct.
4792 * configure: Regenerate.
4794 2018-01-16 Yao Qi <yao.qi@linaro.org>
4797 * linux-low.c (fetch_register): Call supply_register instead of
4800 2018-01-08 Yao Qi <yao.qi@linaro.org>
4801 Simon Marchi <simon.marchi@ericsson.com>
4803 * Makefile.in (OBS): Remove selftest.o.
4804 * configure.ac: Set srv_selftest_objs if $development is true.
4805 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
4806 * configure: Re-generated.
4807 * server.c (captured_main): Wrap variable selftest_filter with
4810 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4812 * server.c (parse_debug_format_options): Return std::string.
4813 (handle_monitor_command, captured_main): Adjust.
4815 2018-01-05 Pedro Alves <palves@redhat.com>
4818 * server.c (captured_main): Pass quiet=false to
4819 save_original_signals_state.
4821 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4823 * gdbreplay.c (gdbreplay_version): Update copyright year in
4825 * server.c (gdbserver_version): Likewise.
4827 2017-12-08 Tom Tromey <tom@tromey.com>
4829 * ax.c (ax_printf): Update.
4831 2017-12-07 Yao Qi <yao.qi@linaro.org>
4833 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
4834 aarch64_linux_read_description.
4835 * linux-amd64-ipa.c (idx2mask): New array.
4836 (get_ipa_tdesc): Move idx2mask out.
4837 (initialize_low_tracepoint): Initialize target descriptions.
4838 * linux-i386-ipa.c (idx2mask): New array.
4839 (get_ipa_tdesc): Move idx2mask out.
4840 (initialize_low_tracepoint): Initialize target descriptions.
4842 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
4844 * tdesc.c (struct tdesc_type): Change return type.
4845 (tdesc_add_flag): Change parameter type.
4846 (tdesc_add_bitfield): Likewise.
4847 (tdesc_add_field): Likewise.
4848 (tdesc_set_struct_size): Likewise.
4850 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
4852 * regcache.c (registers_to_string): Remove unused variable.
4854 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4856 * inferiors.c (for_each_inferior_with_data): Remove.
4857 * inferiors.h (for_each_inferior_with_data): Remove.
4858 * server.c (handle_qxfer_threads_worker): Change parameter type.
4859 (handle_qxfer_threads_proper): Use for_each_thread.
4861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4863 * inferiors.c (for_each_inferior): Remove.
4864 (clear_inferiors): Use for_each_thread.
4865 * inferiors.h (for_each_inferior): Remove.
4866 * linux-low.c (linux_wait_for_event_filtered): Use
4868 (linux_stabilize_threads): Likewise.
4869 * regcache.c (regcache_release): Likewise.
4870 * server.c (gdb_wants_all_threads_stopped): Likewise.
4871 (clear_pending_status_callback): Remove.
4872 (handle_status): Use for_each_thread.
4873 (captured_main): Likewise.
4874 * win32-low.c (child_init_thread_list): Likewise.
4875 (win32_clear_inferiors): Likewise.
4876 (fake_breakpoint_event): Likewise.
4878 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4880 * inferiors.h (find_inferior): Remove.
4881 * inferiors.c (find_inferior): Remove.
4883 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4885 * linux-low.c (resume_status_pending_p): Update comment.
4886 (need_step_over_p): Update comment.
4888 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4890 * linux-low.c (proceed_one_lwp): Return void, change parameter
4892 (unsuspend_and_proceed_one_lwp): Likewise.
4893 (proceed_all_lwps): Use for_each_thread.
4894 (unstop_all_lwps): Likewise.
4896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4898 * linux-low.c (linux_resume_one_thread): Return void, take
4900 (linux_resume): Use for_each_thread.
4902 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4904 * linux-low.c (send_sigstop_callback): Return void, change
4905 parameter type. Rename to...
4906 (send_sigstop): ... this.
4907 (suspend_and_send_sigstop_callback): Return void, change parameter
4909 (suspend_and_send_sigstop): ... this.
4910 (stop_all_lwps): Use for_each_thread.
4912 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4914 * linux-low.c (lwp_running): Return bool, remove unused
4916 (linux_stabilize_threads): Use find_thread.
4918 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4920 * linux-low.c (select_singlestep_lwp_callback): Remove.
4921 (count_events_callback): Remove.
4922 (select_event_lwp_callback): Remove.
4923 (select_event_lwp): Use find_thread/for_each_thread.
4925 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4927 * linux-low.c (not_stopped_callback): Return bool, take filter
4929 (linux_wait_for_event_filtered): Use find_thread.
4930 (linux_wait_1): Likewise.
4932 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4934 * linux-low.c (same_lwp): Remove.
4935 (find_lwp_pid): Use find_thread.
4937 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4939 * linux-low.c (delete_lwp_callback): Remove.
4940 (linux_mourn): Use for_each_thread.
4942 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4944 * linux-low.c (linux_detach_lwp_callback): Return void, remove
4945 args parameter, don't check for pid.
4946 (linux_detach): Use for_each_thread.
4948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4950 * linux-low.c (struct counter): Remove.
4951 (second_thread_of_pid_p): Remove.
4952 (last_thread_of_process_p): Use find_thread.
4954 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4956 * inferiors.c (find_inferior_in_random): Remove.
4957 * inferiors.h (find_inferior_in_random): Remove.
4958 * linux-low.c (status_pending_p_callback): Return bool, accept
4959 parameter ptid directly.
4960 (linux_wait_for_event_filtered): Use find_thread_in_random.
4961 (linux_wait_1): Likewise.
4963 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4965 * inferiors.c (find_inferior_id): Remove.
4966 (find_thread_ptid): Move implemention from find_inferior_id to
4968 * inferiors.h (find_inferior_id): Remove.
4969 * server.c (handle_status): Use find_thread_ptid.
4970 (process_serial_event): Likewise.
4971 * thread-db.c (find_one_thread): Likewise.
4972 (thread_db_thread_handle): Likewise.
4973 * win32-low.c (thread_rec): Likewise.
4974 (child_delete_thread): Likewise.
4975 (win32_thread_alive): Likewise.
4976 (get_child_debug_event): Likewise.
4978 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4980 * linux-mips-low.c (update_watch_registers_callback): Return
4981 void, remove pid_p parameter, don't check for pid.
4982 (mips_insert_point, mips_remove_point): Use for_each_thread.
4984 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4986 * lynx.low (lynx_delete_thread_callback): Remove.
4987 (lynx_mourn): Use for_each_thread.
4989 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4991 * regcache.c (regcache_invalidate_one): Remove.
4992 (regcache_invalidate_pid): use for_each_thread.
4994 2017-11-26 Tom Tromey <tom@tromey.com>
4996 * linux-low.c (linux_create_inferior): Update.
4998 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5000 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5002 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5004 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5005 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5006 * linux-aarch64-tdesc-selftest.c: New file.
5007 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5009 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5011 * configure.srv: Add new file.
5012 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5013 * linux-aarch64-tdesc-selftest.c: New file.
5014 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5016 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5018 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5019 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5020 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5022 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5024 * configure.srv: Add new files.
5025 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5026 aarch64_linux_read_description.
5027 * linux-aarch64-low.c (aarch64_linux_read_description):
5028 Merge with aarch64_arch_setup.
5029 (aarch64_arch_setup): Call aarch64_linux_read_description.
5030 * linux-aarch64-tdesc.c: New file.
5031 * linux-aarch64-tdesc.h: New file.
5033 2017-11-24 Yao Qi <yao.qi@linaro.org>
5035 * configure.srv: Set $srv_regobj for tic6x-linux.
5036 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5037 (tic6x_read_description): Move some code to tic6x_arch_setup.
5038 (tic6x_tdesc_test): New function.
5039 (initialize_low_arch): Call selftests::register_test.
5041 2017-11-22 Yao Qi <yao.qi@linaro.org>
5043 * remote-utils.c (prepare_resume_reply): Use memcpy.
5045 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5047 * linux-low.c (kill_one_lwp_callback): Return void, take
5048 argument directly, don't filter on pid.
5049 (linux_kill): Use for_each_thread.
5051 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5053 * linux-low.c (need_step_over_p): Return bool, remove dummy
5055 (linux_resume, proceed_all_lwps): Use find_thread.
5057 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5059 * linux-low.c (resume_status_pending_p): Return bool, remove
5061 (linux_resume): Use find_thread.
5063 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5065 * linux-low.c (struct thread_resume_array): Remove.
5066 (linux_set_resume_request): Return void, take arguments
5068 (linux_resume): Use for_each_thread.
5070 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5072 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5073 return bool, remove data argument.
5074 (linux_stabilize_threads): Use find_thread.
5076 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5078 * linux-low.c (unsuspend_one_lwp): Remove.
5079 (unsuspend_all_lwps): Use for_each_thread, inline code from
5082 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5084 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5085 * linux-low.c (struct iterate_over_lwps_args): Remove.
5086 (iterate_over_lwps_filter): Remove.
5087 (iterate_over_lwps): Use find_thread.
5089 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5091 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5092 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5093 code from reset_lwp_ptrace_options_callback.
5095 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5097 * linux-arm-low.c (struct update_registers_data): Remove.
5098 (update_registers_callback): Return void, take arguments
5099 directly, don't check thread's pid.
5100 (arm_insert_point, arm_remove_point): Use for_each_thread.
5102 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5104 * win32-low.c (continue_one_thread): Return void, take argument
5106 (child_continue): Use for_each_thread.
5108 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5110 * win32-i386-low.c (update_debug_registers_callback): Rename
5112 (update_debug_registers): ... this, return void, remove pid_p arg.
5113 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5115 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5117 * inferiors.h (struct process_info): Add constructor, initialize
5119 <syscalls_to_catch>: Change type to std::vector<int>.
5120 * inferiors.c (add_process): Allocate process_info with new.
5121 (remove_process): Free process_info with delete.
5122 * linux-low.c (handle_extended_wait): Adjust.
5123 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5124 * server.c (handle_general_set): Adjust.
5126 2017-11-16 Pedro Alves <palves@redhat.com>
5128 * remote-utils.c (remote_close): Block SIGIO signals instead of
5129 uninstalling the SIGIO handler.
5131 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5133 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5135 2017-11-16 Yao Qi <yao.qi@linaro.org>
5137 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5138 (tic6x_store_gregset): Likewise.
5139 (tic6x_usrregs_info): Move it up.
5141 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5143 * Makefile.in: Update arch rules.
5144 * configure.srv: Explicitly mark arch/ files.
5146 2017-11-13 Andreas Schwab <schwab@suse.de>
5148 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5152 2017-11-06 Pedro Alves <palves@redhat.com>
5154 * config.in, configure: Regenerate.
5156 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5158 * target.c (struct thread_search): Remove.
5159 (thread_search_callback): Remove.
5160 (prepare_to_access_memory): Use for_each_thread instead of
5161 find_inferior. Inline code from thread_search_callback.
5163 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5165 * server.c (struct visit_actioned_threads_data): Remove.
5166 (visit_actioned_threads): Change prototype to take arguments
5168 (resume): Use find_thread instead of find_inferior.
5170 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5172 * server.c (queue_stop_reply_callback): Change prototype, return
5174 (find_status_pending_thread_callback): Remove.
5175 (handle_status): Replace find_inferior with find_thread and
5178 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5180 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5182 (aarch64_store_gregset): Likewise.
5183 (aarch64_fill_fpregset): Likewise.
5184 (aarch64_store_fpregset): Likewise.
5186 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5188 * gdbthread.h (find_thread, for_each_thread): New functions.
5189 * inferiors.c (thread_of_pid): Remove.
5190 (find_any_thread_of_pid): Use find_thread.
5191 * linux-low.c (num_lwps): Use for_each_thread.
5193 2017-10-17 Yao Qi <yao.qi@linaro.org>
5195 * Makefile.in: Remove one rule.
5196 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5198 2017-10-17 Yao Qi <yao.qi@linaro.org>
5200 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5201 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5203 2017-10-17 Yao Qi <yao.qi@linaro.org>
5205 * configure.srv: Rename arm.o with arch/arm.o.
5207 2017-10-17 Yao Qi <yao.qi@linaro.org>
5209 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5210 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5211 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5212 (arch-i386.o, arch-amd64.o): Remove rules.
5213 (arch/%.o): New rule.
5214 Update POSTCOMPILE and COMPILE.pre.
5215 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5216 * configure: Re-generated.
5217 * configure.srv: Replace arch-i386.o with arch/i386.o.
5218 Replace arch-amd64.o with arch/amd64.o.
5220 2017-10-16 Yao Qi <yao.qi@linaro.org>
5222 * configure: Regenerated.
5224 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5226 * inferiors.h: (struct inferior_list): Remove.
5227 (struct inferior_list_entry); Remove.
5228 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5229 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5230 get_first_inferior): Remove.
5231 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5232 find_inferior_id, find_inferior_in_random): Change signature.
5233 * inferiors.c (all_threads): Change type to
5234 std::list<thread_info *>.
5235 (get_thread): Remove macro.
5236 (find_inferior, find_inferior_id): Change signature, implement
5238 (find_inferior_in_random): Change signature, implement using
5239 find_thread_in_random.
5240 (for_each_inferior, for_each_inferior_with_data): Change
5241 signature, implement using for_each_thread.
5242 (add_inferior_to_list, remove_inferior): Remove.
5243 (add_thread, get_first_thread, thread_of_pid,
5244 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5245 (get_first_inferior, one_inferior_p, clear_inferior_list):
5247 (clear_inferiors, get_thread_process): Update.
5248 * gdbthread.h: Include <list>.
5249 (struct thread_info) <entry>: Remove field.
5251 (all_threads): Change type to std::list<thread_info *>.
5252 (get_first_inferior): Add doc.
5253 (find_thread, for_each_thread, find_thread_in_random): New
5255 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5256 * linux-arm-low.c (update_registers_callback): Update.
5257 * linux-low.c (second_thread_of_pid_p): Update.
5258 (kill_one_lwp_callback, linux_detach_lwp_callback,
5259 delete_lwp_callback, status_pending_p_callback, same_lwp,
5260 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5261 iterate_over_lwps, not_stopped_callback,
5262 resume_stopped_resumed_lwps, count_events_callback,
5263 select_singlestep_lwp_callback, select_event_lwp_callback,
5264 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5265 suspend_and_send_sigstop_callback, wait_for_sigstop,
5266 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5267 lwp_running, linux_set_resume_request, resume_status_pending_p,
5268 need_step_over_p, start_step_over, linux_resume_one_thread,
5269 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5270 reset_lwp_ptrace_options_callback): Update.
5271 * linux-mips-low.c (update_watch_registers_callback): Update.
5272 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5274 (free_register_cache_thread_one): Remove.
5275 (regcache_release): Update.
5276 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5277 handle_qxfer_threads_worker): Update.
5278 (handle_query): Update, use list iterator.
5279 (visit_actioned_threads, handle_pending_status,
5280 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5281 clear_pending_status_callback, set_pending_status_callback,
5282 find_status_pending_thread_callback, handle_status,
5283 process_serial_event): Update.
5284 * target.c (thread_search_callback): Update.
5285 * thread-db.c (thread_db_get_tls_address): Update.
5286 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5288 * win32-i386-low.c (update_debug_registers_callback): Update.
5289 * win32-low.c (delete_thread_info, child_delete_thread,
5290 continue_one_thread, suspend_one_thread,
5291 get_child_debug_event): Adjust.
5293 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5295 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5296 * inferiors.h: Include <list>.
5297 (struct process_info) <entry>: Remove field.
5299 (pid_of): Change macro to function.
5300 (ptid_of, lwpid_of): Remove macro.
5301 (all_processes): Change type to std::list<process_info *>.
5302 (ALL_PROCESSES): Remove macro.
5303 (for_each_process, find_process): New function.
5304 * inferiors.c (all_processes): Change type to
5305 std::list<process_info *>.
5306 (find_thread_process): Adjust.
5307 (add_process): Likewise.
5308 (remove_process): Likewise.
5309 (find_process_pid): Likewise.
5310 (get_first_process): Likewise.
5311 (started_inferior_callback): Remove.
5312 (have_started_inferiors_p): Adjust.
5313 (attached_inferior_callback): Remove.
5314 (have_attached_inferiors_p): Adjust.
5315 * linux-low.c (check_zombie_leaders): Likewise.
5316 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5317 (x86_linux_update_xmltarget): Adjust.
5318 * server.c (handle_query): Likewise.
5319 (gdb_reattached_process): Remove.
5320 (handle_status): Adjust.
5321 (kill_inferior_callback): Likewise.
5322 (detach_or_kill_inferior): Remove.
5323 (print_started_pid): Likewise.
5324 (print_attached_pid): Likewise.
5325 (detach_or_kill_for_exit): Update.
5326 (process_serial_event): Likewise.
5327 * linux-arm-low.c (arm_new_fork): Likewise.
5329 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5331 * dll.h: Include <list>.
5332 (struct dll_info): Add constructor.
5333 <entry>: Remove field.
5334 (all_dlls): Change type to std::list<dll_info>.
5335 * dll.c: Include <algorithm>.
5336 (get_dll): Remove macro.
5337 (all_dlls): Change type to std::list<dll_info *>.
5338 (free_one_dll): Remove.
5339 (match_dll): Likewise.
5340 (loaded_dll): Adjust.
5341 (unloaded_dll): Adjust to all_dlls type change, use
5342 std::find_if. Inline code from match_dll.
5343 (clear_dlls): Adjust to all_dlls type change.
5344 * server.c (emit_dll_description): Remove.
5345 (handle_qxfer_libraries): Adjust to all_dlls type change,
5346 integrate emit_dll_description's functionality.
5348 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5350 * linux-low.h (struct linux_target_ops) <delete_process>: New
5352 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5353 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5354 (struct linux_target_ops): Add delete_process callback.
5355 * linux-arm-low.c (arm_delete_process): New.
5356 (struct linux_target_ops): Add delete_process callback.
5357 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5358 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5359 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5360 * linux-mips-low.c (mips_linux_delete_process): New.
5361 (struct linux_target_ops): Add delete_process callback.
5362 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5363 * linux-s390-low.c (struct linux_target_ops): Likewise.
5364 * linux-sh-low.c (struct linux_target_ops): Likewise.
5365 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5366 * linux-tile-low.c (struct linux_target_ops): Likewise.
5367 * linux-x86-low.c (x86_linux_delete_process): New.
5368 (struct linux_target_ops): Add delete_process callback.
5369 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5371 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5373 * linux-aarch64-low.c (the_low_target): Add thread delete
5375 * linux-arm-low.c (arm_delete_thread): New function.
5376 (the_low_target): Add thread delete callback.
5377 * linux-bfin-low.c (the_low_target): Likewise.
5378 * linux-crisv32-low.c (the_low_target): Likewise.
5379 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5381 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5383 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5384 * linux-mips-low.c (mips_linux_delete_thread): New function.
5385 (the_low_target): Add thread delete callback.
5386 * linux-ppc-low.c (the_low_target): Likewise.
5387 * linux-s390-low.c (the_low_target): Likewise.
5388 * linux-sh-low.c (the_low_target): Likewise.
5389 * linux-tic6x-low.c (the_low_target): Likewise.
5390 * linux-tile-low.c (the_low_target): Likewise.
5391 * linux-x86-low.c (the_low_target): Likewise.
5392 * linux-xtensa-low.c (the_low_target): Likewise.
5394 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5396 * win32-low.c: Include "common-inferior.h".
5398 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5400 * inferiors.c (set_inferior_cwd): New function.
5401 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5402 (handle_query): Inform that QSetWorkingDir is supported.
5403 * win32-low.c (create_process): Pass the inferior's cwd to
5406 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5408 * inferiors.c (current_inferior_cwd): New global variable.
5409 (get_inferior_cwd): New function.
5410 * inferiors.h (struct process_info) <cwd>: New field.
5412 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5414 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5415 (OBS): Add gdb_tilde_expand.o.
5417 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5419 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5420 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5422 2017-09-29 Pedro Alves <palves@redhat.com>
5424 * ax.c (gdb_parse_agent_expr): Constify.
5425 * ax.h (gdb_parse_agent_expr): Constify.
5426 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5428 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5429 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5430 * remote-utils.h (read_ptid): Constify.
5431 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5432 (process_point_options, process_serial_event): Constify.
5433 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5434 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5435 (cmd_qtbuffer): Constify.
5437 2017-09-29 Pedro Alves <palves@redhat.com>
5439 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5442 2017-09-29 Pedro Alves <palves@redhat.com>
5444 * linux-low.c (handle_extended_wait): Pass parent thread instead
5445 of process to thread_db_notice_clone.
5446 * linux-low.h (thread_db_notice_clone): Replace parent process
5447 parameter with parent thread parameter.
5448 * thread-db.c (find_one_thread): Add comment.
5449 (thread_db_notice_clone): Replace parent process parameter with
5450 parent thread parameter. Temporarily switch to the parent thread.
5452 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5454 * gdbthread.h: Include "common-gdbthread.h".
5455 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5456 "if" when validating the ptid.
5457 * remote-utils.c: Include "gdbthread.h".
5458 (prepare_resume_reply): Use "switch_to_thread".
5459 * target.c (done_accessing_memory): Likewise.
5461 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5463 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5464 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5465 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5466 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5467 s390x-gs-linux64-ipa.o to ipa_obj.
5468 * linux-s390-low.c (HWCAP_S390_GS): New define.
5469 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5471 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5472 (s390_arch_setup): Check for guarded-storage support and choose
5474 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5475 init_registers_s390x_gs_linux64.
5476 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5478 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5479 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5481 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5483 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5485 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5487 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5488 (thread_db_thread_handle): Declare.
5489 * linux-low.c (linux_target_ops): Initialize thread_handle.
5490 * server.c (handle_qxfer_threads_worker): Add support for
5492 * target.h (struct target_ops): Add new function pointer,
5494 (target_thread_handle): Define.
5495 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5497 (thread_db_thread_handle): New function.
5499 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5501 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5502 * linux-low.h (thread_db_notice_clone): Declare.
5503 * thread-db.c (thread_db_notice_clone): New function.
5505 2017-09-21 Pedro Alves <palves@redhat.com>
5507 * server.c (gdb_read_memory, handle_status, process_serial_event)
5508 (handle_serial_event, handle_target_event): Adjust to
5509 set_desired_thread prototype change.
5510 * target.c (set_desired_thread): Remove 'use_general' parameter
5512 * target.h (set_desired_thread): Remove 'use_general' parameter.
5514 2017-09-20 Tom Tromey <tom@tromey.com>
5516 * target.c (target_terminal::terminal_state): Define.
5517 (target_terminal::init): Rename from target_terminal_init.
5518 (target_terminal::inferior): Rename from
5519 target_terminal_inferior.
5520 (target_terminal::ours): Rename from target_terminal_ours.
5521 (target_terminal::ours_for_output, target_terminal::info): New.
5523 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5525 * server.c (accumulate_file_name_length): Remove.
5526 (emit_dll_description): Adjust to std::string change.
5527 (handle_qxfer_libraries): Use std::string to hold document.
5529 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5531 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5532 return type of xml_escape_text.
5533 * server.c (emit_dll_description): Likewise.
5535 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5537 * server.c (captured_main): Accept argument for --selftest.
5538 Update run_tests call.
5539 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5540 when registering selftests.
5542 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5544 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5545 instead of "VEC" for "target_desc.reg_defs".
5546 (regcache_cpy): Likewise.
5547 (registers_to_string): Likewise.
5548 (registers_from_string): Likewise.
5549 (find_regno): Likewise.
5550 (supply_regblock): Likewise.
5551 (regcache_raw_read_unsigned): Likewise.
5552 * tdesc.c (init_target_desc): Likewise.
5553 (tdesc_create_reg): Likewise.
5554 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5555 (struct target_desc) <reg_defs>: Convert to "std::vector".
5556 (target_desc): Do not initialize "reg_defs".
5557 (~target_desc): Update code to use "std::vector" instead of "VEC"
5558 for "target_desc.reg_defs".
5559 (operator==): Likewise.
5561 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5563 * inferiors.h (thread_to_gdb_id): Remove.
5564 * inferiors.c (thread_to_gdb_id): Remove.
5565 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5566 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5567 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5569 * nto-low.c (nto_fetch_registers, nto_store_registers,
5570 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5572 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5574 * inferiors.h (gdb_id_to_thread_id): Remove.
5575 * inferiors.c (gdb_id_to_thread_id): Remove.
5576 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5577 removal. Move pid declaration closer to where it's used.
5579 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5581 * server.c (handle_detach): New function.
5582 (process_serial_event): Move code out, call handle_detach.
5584 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5586 * server.c (require_running): Rename to ...
5587 (require_running_or_return): ... this ...
5588 (require_running_or_break): ... and this.
5589 (handle_query, process_serial_event): Adjust.
5591 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5593 * linux-low.c (linux_set_resume_request): Remove unused
5596 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5598 * server.c (first_thread_of): Remove.
5599 (process_serial_event): Replace usage of first_thread_of with
5600 find_any_thread_of_pid.
5601 * tracepoint.c (same_process_p): Remove.
5602 (gdb_agent_about_to_close): Replace usage of same_process_p with
5603 find_any_thread_of_pid.
5604 * linux-x86-low.c (same_process_callback): Remove.
5605 (x86_arch_setup_process_callback): Replace usage of
5606 same_process_callback with find_any_thread_of_pid.
5607 * thread-db.c (any_thread_of): Remove.
5608 (switch_to_process): Replace usage of any_thread_of with
5609 find_any_thread_of_pid.
5610 * inferiors.c (thread_pid_matches_callback): Remove.
5611 (find_thread_process): Adjust to use find_any_thread_of_pid.
5613 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5615 * regcache.c (get_thread_regcache): Guard calls to "memset"
5618 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5620 * linux-low.c (handle_extended_wait): Use
5621 "allocate_target_description" instead of "XNEW".
5622 * linux-x86-low.c (initialize_low_arch): Likewise.
5624 2017-09-05 Yao Qi <yao.qi@linaro.org>
5626 * configure.srv (srv_i386_regobj): Remove.
5627 (srv_amd64_regobj): Remove.
5628 (srv_regobj): Set it to "" for x86 non-linux targets.
5629 * linux-x86-tdesc.c (i386_linux_read_description):
5630 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5631 (init_registers_i386): Remove the declaration.
5632 (tdesc_i386): Remove the declaration.
5633 (lynx_i386_arch_setup): Call i386_create_target_description.
5634 * nto-x86-low.c: Likewise.
5635 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5636 [!__x86_64__]: include arch/i386.h.
5637 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5639 2017-09-05 Yao Qi <yao.qi@linaro.org>
5641 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5642 i386/amd64-XXX-linux from it.
5644 2017-09-05 Yao Qi <yao.qi@linaro.org>
5646 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5648 (ipa_amd64_linux_regobj): Remove.
5649 (ipa_x32_linux_regobj): Remove.
5651 2017-09-05 Yao Qi <yao.qi@linaro.org>
5653 * Makefile.in (arch-amd64.o): New rule.
5654 * configure.srv: Append arch-amd64.o.
5655 * linux-amd64-ipa.c: Include common/x86-xstate.h.
5656 (get_ipa_tdesc): Call amd64_linux_read_description.
5657 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
5658 and init_registers_amd64_XXX.
5659 * linux-x86-low.c (x86_linux_read_description): Call
5660 amd64_linux_read_description.
5661 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
5662 (initialize_low_arch): Don't call init_registers_x32_XXX and
5663 init_registers_amd64_XXX.
5664 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
5665 and tdesc_amd64_XXX.
5666 [__x86_64__] (amd64_tdesc_test): New function.
5667 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
5668 and init_registers_amd64_XXX.
5669 * linux-x86-tdesc.c: Include arch/amd64.h.
5670 (xcr0_to_tdesc_idx): New function.
5671 (i386_linux_read_description): New function.
5672 (amd64_get_ipa_tdesc_idx): New function.
5673 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
5674 (amd64_get_ipa_tdesc): Declare.
5676 2017-09-05 Yao Qi <yao.qi@linaro.org>
5678 * configure.srv (srv_i386_linux_xmlfiles): Remove
5679 i386/i386-XXX-linux.xml from it.
5681 2017-09-05 Yao Qi <yao.qi@linaro.org>
5683 * configure.srv: Set srv_i386_linux_regobj empty if $development
5685 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
5686 initialize_low_tdesc.
5687 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
5688 with #if initialize_low_tdesc.
5689 * linux-x86-tdesc-selftest.c: New file.
5690 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
5692 2017-09-05 Yao Qi <yao.qi@linaro.org>
5694 * Makefile.in (arch-i386.o): New rule.
5695 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
5696 (x86_64-*-linux*): Likewise.
5697 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
5698 include arch/i386.h.
5699 (i386_linux_read_description): Remove code and call
5700 i386_create_target_description.
5701 * tdesc.c (allocate_target_description): New function.
5702 * tdesc.h (set_tdesc_architecture): Remove declaration.
5703 (set_tdesc_osabi): Likewise.
5705 2017-09-05 Yao Qi <yao.qi@linaro.org>
5707 * linux-x86-tdesc.c: Don't include <inttypes.h>.
5708 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5709 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
5711 * server.c (get_features_xml): Call tdesc_get_features_xml.
5712 * tdesc.c (set_tdesc_architecture): New function.
5713 (set_tdesc_osabi): New function.
5714 (tdesc_get_features_xml): New function.
5715 (tdesc_create_feature): Add an argument.
5716 * tdesc.h (struct target_desc) <features>: New field.
5717 <arch, osabi>: New field.
5718 (~target_desc): xfree features, arch, and osabi.
5719 (target_desc::oerator==): Don't compare .xmltarget.
5720 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
5721 (set_tdesc_osabi): Likewise.
5722 (tdesc_get_features_xml): Likewise.
5724 2017-09-05 Yao Qi <yao.qi@linaro.org>
5726 * linux-x86-tdesc.c: Include selftest.h.
5727 (i386_tdesc_test): New function.
5728 (initialize_low_tdesc): Call selftests::register_test.
5729 * tdesc.h: Include regdef.h.
5730 (target_desc): Override operator == and !=.
5732 2017-09-05 Yao Qi <yao.qi@linaro.org>
5734 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
5735 (ipa_obj): Likewise.
5736 * linux-i386-ipa.c: Include common/x86-xstate.h
5737 (get_ipa_tdesc): Call i386_linux_read_description.
5738 (initialize_low_tracepoint): Don't call init_registers_XXX
5739 functions, call initialize_low_tdesc instead.
5740 * linux-x86-low.c (x86_linux_read_description): Call
5741 i386_linux_read_description.
5742 (initialize_low_arch): Don't call init_registers_i386_XXX
5743 functions, call initialize_low_tdesc.
5744 * linux-x86-tdesc.c: New file.
5745 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
5746 (i386_get_ipa_tdesc_idx): Declare.
5747 (i386_get_ipa_tdesc): Declare.
5748 (initialize_low_tdesc): Declare.
5750 2017-09-05 Yao Qi <yao.qi@linaro.org>
5752 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
5755 2017-09-05 Yao Qi <yao.qi@linaro.org>
5757 * Makefile.in (IPA_OBJS): Add vec-ipa.o
5758 * regcache.c (get_thread_regcache): Use VEC_length.
5759 (init_register_cache): Likewise.
5760 (regcache_cpy): Likewise.
5761 (registers_to_string): Iterate reg_defs via VEC_iterate.
5762 (find_regno): Likewise.
5763 (find_register_by_number): Use VEC_index.
5764 (register_size): Call find_register_by_number.
5765 (register_data): Call find_register_by_number.
5766 (supply_regblock): Use VEC_length.
5767 (regcache_raw_read_unsigned): Likewise.
5768 * tdesc.c (init_target_desc): Iterate reg_defs via
5770 (default_description): Update initializer.
5771 (copy_target_description): Don't update field num_registers.
5772 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
5773 <num_registers>: Remove.
5775 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5777 * Makefile.in (.SECONDARY): Define target.
5779 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5781 * linux-low.c (linux_wait_1): Adjust.
5782 * server.c (queue_stop_reply_callback): Adjust.
5784 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5786 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
5787 QEnvironmentUnset and QEnvironmentReset packets.
5788 (handle_query): Inform remote that QEnvironmentHexEncoded,
5789 QEnvironmentUnset and QEnvironmentReset are supported.
5791 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
5793 * inferiors.h (inferior_target_data): Rename to ...
5794 (thread_target_data): ... this.
5795 (inferior_regcache_data): Rename to ...
5796 (thread_regcache_data): ... this.
5797 (set_inferior_regcache_data): Rename to ...
5798 (set_thread_regcache_data): ... this.
5799 * inferiors.c (inferior_target_data): Rename to ...
5800 (thread_target_data): ... this.
5801 (inferior_regcache_data): Rename to ...
5802 (thread_regcache_data): ... this.
5803 (set_inferior_regcache_data): Rename to ...
5804 (set_thread_regcache_data): ... this.
5805 (free_one_thread): Update.
5806 * linux-low.h (get_thread_lwp): Update.
5807 * regcache.c (get_thread_regcache): Update.
5808 (regcache_invalidate_thread): Update.
5809 (free_register_cache_thread): Update.
5810 * win32-i386-low.c (update_debug_registers_callback): Update.
5811 (win32_get_current_dr): Update.
5812 * win32-low.c (thread_rec): Update.
5813 (delete_thread_info): Update.
5814 (continue_one_thread): Update.
5815 (suspend_one_thread): Update.
5817 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
5819 * inferiors.c (set_inferior_target_data): Remove.
5820 * inferiors.h (set_inferior_target_data): Remove.
5822 2017-08-18 Yao Qi <yao.qi@linaro.org>
5824 * Makefile.in (OBS): Add selftest.o.
5825 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
5826 * configure, config.in: Re-generated.
5827 * server.c: Include common/sefltest.h.
5828 (captured_main): Handle option --selftest.
5830 2017-08-09 Yao Qi <yao.qi@linaro.org>
5832 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
5833 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
5834 i386-avx-mpx.o and i386-mmx.o.
5835 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
5836 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
5837 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
5838 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
5839 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
5840 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
5841 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
5842 i386/amd64-avx-mpx.xml.
5844 2017-08-09 Yao Qi <yao.qi@linaro.org>
5846 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
5847 and x32-avx-avx512.o.
5848 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
5849 i386/x32-avx-avx512.xml.
5851 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
5853 * tracepoint.h (enum class fast_tpoint_collect_result): New
5855 (fast_tracepoint_collecting): Change return type to
5856 fast_tpoint_collect_result.
5857 * tracepoint.c (fast_tracepoint_collecting): Likewise.
5858 * linux-low.h: Include tracepoint.h.
5859 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
5860 fast_tpoint_collect_result.
5861 * linux-low.c (handle_tracepoints): Adjust.
5862 (linux_fast_tracepoint_collecting): Change return type to
5863 fast_tpoint_collect_result.
5864 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
5865 linux_wait_1, stuck_in_jump_pad_callback,
5866 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
5867 proceed_one_lwp): Adjust to type change.
5869 2017-07-10 Yao Qi <yao.qi@linaro.org>
5871 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
5873 2017-06-29 Yao Qi <yao.qi@linaro.org>
5875 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
5877 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
5879 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
5881 * Makefile.in (IPA_OBJS): Sort and format one item per line.
5883 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5885 * linux-low.c (linux_create_inferior): Adjust code to access the
5886 environment information via 'gdb_environ' class.
5887 * lynx-low.c (lynx_create_inferior): Likewise.
5888 * server.c (our_environ): Make it an instance of 'gdb_environ'.
5889 (get_environ): Return a pointer to 'our_environ'.
5890 (captured_main): Initialize 'our_environ'.
5891 * server.h (get_environ): Adjust prototype.
5892 * spu-low.c (spu_create_inferior): Adjust code to access the
5893 environment information via 'gdb_environ' class.
5895 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5897 * linux-low.c (linux_read_memory, linux_write_memory): Remove
5898 usage of "register" keyword.
5900 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5902 * configure: Re-generate.
5904 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5906 * configure: Re-generate.
5908 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5910 * Makefile.in (COMPILE.pre): Add "-x c++".
5912 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
5914 * fork-child.c: Conditionally include <signal.h>.
5916 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5918 * server.c (handle_general_set): Handle new packet
5919 "QStartupWithShell".
5920 (handle_query): Add "QStartupWithShell" to the list of supported
5922 (gdbserver_usage): Add help text explaining the
5923 new "--startup-with-shell" and "--no-startup-with-shell" CLI
5925 (captured_main): Recognize and act upon the presence of the new
5928 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5929 Pedro Alves <palves@redhat.com>
5931 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
5932 * configure: Regenerate.
5933 * configure.srv (srv_linux_obj): Add "fork-child.o" and
5935 (i[34567]86-*-lynxos*): Likewise.
5936 (spu*-*-*): Likewise.
5937 * fork-child.c: New file.
5938 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
5940 (linux_ptrace_fun): New function.
5941 (linux_create_inferior): Adjust function prototype to reflect
5942 change on "target.h". Adjust function code to use
5944 (linux_request_interrupt): Delete "signal_pid".
5945 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5946 (lynx_ptrace_fun): New function.
5947 (lynx_create_inferior): Adjust function prototype to reflect
5948 change on "target.h". Adjust function code to use
5950 * nto-low.c (nto_create_inferior): Adjust function prototype and
5951 code to reflect change on "target.h". Update comments.
5952 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
5953 "common-terminal.h" and "environ.h".
5954 (terminal_fd): Moved to fork-child.c.
5955 (old_foreground_pgrp): Likewise.
5956 (restore_old_foreground_pgrp): Likewise.
5957 (last_status): Make it global.
5958 (last_ptid): Likewise.
5959 (our_environ): New variable.
5960 (startup_with_shell): Likewise.
5961 (program_name): Likewise.
5962 (program_argv): Rename to...
5963 (program_args): ...this.
5964 (wrapper_argv): New variable.
5965 (start_inferior): Delete function.
5966 (get_exec_wrapper): New function.
5967 (get_exec_file): Likewise.
5968 (get_environ): Likewise.
5969 (prefork_hook): Likewise.
5970 (post_fork_inferior): Likewise.
5971 (postfork_hook): Likewise.
5972 (postfork_child_hook): Likewise.
5973 (handle_v_run): Update code to deal with arguments coming from the
5974 remote host. Update calls from "start_inferior" to
5976 (captured_main): Likewise. Initialize environment variable. Call
5978 * server.h (post_fork_inferior): New prototype.
5979 (get_environ): Likewise.
5980 (last_status): Declare.
5981 (last_ptid): Likewise.
5982 (signal_pid): Likewise.
5983 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5984 (spu_ptrace_fun): New function.
5985 (spu_create_inferior): Adjust function prototype to reflect change
5986 on "target.h". Adjust function code to use "fork_inferior".
5987 * target.c (target_terminal_init): New function.
5988 (target_terminal_inferior): Likewise.
5989 (target_terminal_ours): Likewise.
5990 * target.h: Include <vector>.
5991 (struct target_ops) <create_inferior>: Update prototype.
5992 (create_inferior): Update macro.
5993 * utils.c (gdb_flush_out_err): New function.
5994 * win32-low.c (win32_create_inferior): Adjust function prototype
5995 and code to reflect change on "target.h".
5997 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5999 * inferiors.c (switch_to_thread): New function.
6001 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6003 * Makefile.in (SFILE): Add "common/job-control.c".
6004 (OBS): Add "job-control.o".
6006 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6008 * Makefile: Remove "@host_makefile_frag@".
6010 2017-05-05 Pedro Alves <palves@redhat.com>
6012 * configure: Regenerate.
6014 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6016 * configure: Regenerate.
6018 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6020 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6021 software_single_step change of return type to
6022 std::vector<CORE_ADDR>.
6023 * linux-low.c (install_software_single_step_breakpoints):
6025 * linux-low.h (install_software_single_step_breakpoints):
6028 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6030 * remote-utils.c: Include "gdb_termios.h" instead of
6032 * terminal.h: Delete file.
6034 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6036 * server.c: Include <vector>.
6037 <program_argv, wrapper_argv>: Convert to std::vector.
6038 (start_inferior): Rewrite function to use C++.
6039 (handle_v_run): Likewise. Update code that calculates the argv
6040 based on the vRun packet; use C++.
6041 (captured_main): Likewise.
6043 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6045 * server.c (handle_v_cont): Initialize thread_resume::thread
6048 2017-04-05 Pedro Alves <palves@redhat.com>
6050 * configure: Regenerate.
6052 2017-04-05 Pedro Alves <palves@redhat.com>
6054 * gdbreplay.c (sync_error): Constify.
6055 * linux-x86-low.c (push_opcode): Constify.
6057 2017-04-05 Pedro Alves <palves@redhat.com>
6059 * win32-low.c (get_child_debug_event)
6060 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6061 Report TARGET_WAITKIND_SPURIOUS instead.
6063 2017-04-05 Pedro Alves <palves@redhat.com>
6065 * remote-utils.c (remote_prepare, remote_open): Constify.
6066 * remote-utils.h (remote_prepare, remote_open): Constify.
6067 * server.c (captured_main): Constify 'port' handling.
6069 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6071 * Makefile.in (clean): Clear .deps.
6073 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6075 * .gitignore: Remove generated files, replace with wildcard.
6076 * (clean): Replace removal of generated files with wildcard.
6077 (version.c): Replace with...
6078 (version-generated.c): ...this.
6079 (xml-builtin.c): Replace with...
6080 (xml-builtin-generated.c): ...this.
6081 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6082 (%.c: *regformats*): Replace with...
6083 (%-generated.c: *regformats*): ...this.
6085 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6087 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6088 (xtensa_fill_gregset): Call collect_register_by_name for
6090 (xtensa_store_gregset): Call supply_register_by_name for
6093 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6095 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6096 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6097 (xtensa_store_gregset): Call supply_register for all registers in
6098 a0_regnum..a0_regnum + C0_NREGS range.
6100 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6102 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6103 (ax-ipa.o: ax.c): Remove.
6104 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6105 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6106 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6107 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6108 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6110 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6112 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6113 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6114 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6115 (errors-ipa.o: ../common/errors.c): Remove.
6116 (format-ipa.o: ../common/format.c): Remove.
6117 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6119 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6121 * Makefile.in (%-ipa.o: %.c): New rule.
6122 (tracepoint-ipa.o: tracepoint.c): Remove.
6123 (utils-ipa.o: utils.c): Remove.
6124 (remote-utils-ipa.o: remote-utils.c): Remove.
6125 (regcache-ipa.o: regcache.c): Remove.
6126 (i386-linux-ipa.o: i386-linux.c): Remove.
6127 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6128 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6129 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6130 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6131 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6132 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6133 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6134 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6135 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6136 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6137 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6138 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6139 (aarch64-ipa.o: aarch64.c): Remove.
6140 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6141 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6142 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6143 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6144 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6145 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6146 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6147 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6148 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6149 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6150 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6151 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6152 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6153 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6154 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6155 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6156 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6157 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6158 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6159 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6160 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6161 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6162 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6163 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6164 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6165 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6166 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6167 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6168 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6169 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6170 (tdesc-ipa.o: tdesc.c): Remove.
6171 (x32-linux-ipa.o: x32-linux.c): Remove.
6172 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6173 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6175 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6177 * Makefile.in (%.o: ../arch/%.c): New rule.
6178 (arm.o: ../arch/arm.c): Remove.
6179 (arm-linux.o: ../arch/arm-linux.c): Remove.
6180 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6181 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6183 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6185 * Makefile.in (%.o: ../nat/%.c): New rule.
6186 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6187 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6188 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6189 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6190 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6191 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6192 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6193 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6194 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6195 (linux-personality.o: ../nat/linux-personality.c): Remove.
6196 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6197 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6198 (x86-linux.o: ../nat/x86-linux.c): Remove.
6199 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6200 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6202 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6204 * Makefile.in (%.o: ../common/%.c): New rule.
6205 (signals.o: ../common/signals.c): Remove.
6206 (print-utils.o: ../common/print-utils.c): Remove.
6207 (rsp-low.o: ../common/rsp-low.c): Remove.
6208 (common-utils.o: ../common/common-utils.c): Remove.
6209 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6210 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6211 (vec.o: ../common/vec.c): Remove.
6212 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6213 (xml-utils.o: ../common/xml-utils.c): Remove.
6214 (ptid.o: ../common/ptid.c): Remove.
6215 (buffer.o: ../common/buffer.c): Remove.
6216 (format.o: ../common/format.c): Remove.
6217 (filestuff.o: ../common/filestuff.c): Remove.
6218 (agent.o: ../common/agent.c): Remove.
6219 (errors.o: ../common/errors.c): Remove.
6220 (environ.o: ../common/environ.c): Remove.
6221 (common-debug.o: ../common/common-debug.c): Remove.
6222 (cleanups.o: ../common/cleanups.c): Remove.
6223 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6224 (fileio.o: ../common/fileio.c): Remove.
6225 (common-regcache.o: ../common/common-regcache.c): Remove.
6226 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6227 (new-op.o: ../common/new-op.c): Remove.
6228 (btrace-common.o: ../common/btrace-common.c): Remove.
6230 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6232 * Makefile.in (%.o: ../target/%.c): New rule.
6233 (waitstatus.o: ../target/waitstatus.c): Remove.
6235 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6238 (%.c: ../regformats/%.dat,
6239 (%.c: ../regformats/arm/%.dat,
6240 (%.c: ../regformats/i386/%.dat,
6241 (%.c: ../regformats/rs6000/%.dat): New rules.
6242 (aarch64.c): Remove.
6243 (reg-arm.c): Remove.
6244 (arm-with-iwmmxt.c): Remove.
6245 (arm-with-vfpv2.c): Remove.
6246 (arm-with-vfpv3.c): Remove.
6247 (arm-with-neon.c): Remove.
6248 (reg-bfin.c): Remove.
6249 (reg-cris.c): Remove.
6250 (reg-crisv32.c): Remove.
6252 (i386-linux.c): Remove.
6253 (i386-avx.c): Remove.
6254 (i386-avx-linux.c): Remove.
6255 (i386-avx-avx512.c): Remove.
6256 (i386-avx-avx512-linux.c): Remove.
6257 (i386-mpx.c): Remove.
6258 (i386-mpx-linux.c): Remove.
6259 (i386-avx-mpx-avx512-pku.c): Remove.
6260 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6261 (i386-avx-mpx.c): Remove.
6262 (i386-avx-mpx-linux.c): Remove.
6263 (i386-mmx.c): Remove.
6264 (i386-mmx-linux.c): Remove.
6265 (reg-ia64.c): Remove.
6266 (reg-m32r.c): Remove.
6267 (reg-m68k.c): Remove.
6269 (mips-linux.c): Remove.
6270 (mips-dsp-linux.c): Remove.
6271 (mips64-linux.c): Remove.
6272 (mips64-dsp-linux.c): Remove.
6273 (nios2-linux.c): Remove.
6274 (powerpc-32.c): Remove.
6275 (powerpc-32l.c): Remove.
6276 (powerpc-altivec32l.c): Remove.
6277 (powerpc-cell32l.c): Remove.
6278 (powerpc-vsx32l.c): Remove.
6279 (powerpc-isa205-32l.c): Remove.
6280 (powerpc-isa205-altivec32l.c): Remove.
6281 (powerpc-isa205-vsx32l.c): Remove.
6282 (powerpc-e500l.c): Remove.
6283 (powerpc-64l.c): Remove.
6284 (powerpc-altivec64l.c): Remove.
6285 (powerpc-cell64l.c): Remove.
6286 (powerpc-vsx64l.c): Remove.
6287 (powerpc-isa205-64l.c): Remove.
6288 (powerpc-isa205-altivec64l.c): Remove.
6289 (powerpc-isa205-vsx64l.c): Remove.
6290 (s390-linux32.c): Remove.
6291 (s390-linux32v1.c): Remove.
6292 (s390-linux32v2.c): Remove.
6293 (s390-linux64.c): Remove.
6294 (s390-linux64v1.c): Remove.
6295 (s390-linux64v2.c): Remove.
6296 (s390-te-linux64.c): Remove.
6297 (s390-vx-linux64.c): Remove.
6298 (s390-tevx-linux64.c): Remove.
6299 (s390x-linux64.c): Remove.
6300 (s390x-linux64v1.c): Remove.
6301 (s390x-linux64v2.c): Remove.
6302 (s390x-te-linux64.c): Remove.
6303 (s390x-vx-linux64.c): Remove.
6304 (s390x-tevx-linux64.c): Remove.
6305 (tic6x-c64xp-linux.c): Remove.
6306 (tic6x-c64x-linux.c): Remove.
6307 (tic6x-c62x-linux.c): Remove.
6309 (reg-sparc64.c): Remove.
6310 (reg-spu.c): Remove.
6312 (amd64-linux.c): Remove.
6313 (amd64-avx.c): Remove.
6314 (amd64-avx-linux.c): Remove.
6315 (amd64-avx-avx512.c): Remove.
6316 (amd64-avx-avx512-linux.c): Remove.
6317 (amd64-mpx.c): Remove.
6318 (amd64-mpx-linux.c): Remove.
6319 (amd64-avx-mpx-avx512-pku.c): Remove.
6320 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6321 (amd64-avx-mpx.c): Remove.
6322 (amd64-avx-mpx-linux.c): Remove.
6324 (x32-linux.c): Remove.
6325 (x32-avx.c): Remove.
6326 (x32-avx-linux.c): Remove.
6327 (x32-avx-avx512.c): Remove.
6328 (x32-avx-avx512-linux.c): Remove.
6329 (reg-xtensa.c): Remove.
6330 (reg-tilegx.c): Remove.
6331 (reg-tilegx32.c): Remove.
6333 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6335 * Makefile.in (SFILES): Add "common/environ.c".
6336 (OBJS): Add "common/environ.h".
6338 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6340 * configure.ac: Check if the fs_base and gs_base members of
6341 `struct user_regs_struct' exist.
6342 * config.in: Regenerated.
6343 * configure: Likewise.
6345 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6347 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6349 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6350 (get_next_pcs_syscall_next_pc): Likewise.
6352 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6354 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6355 * nto-x86-low.c: Likewise.
6357 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6359 * Makefile.in: Include disable-implicit-rules.mk.
6361 2016-11-23 Pedro Alves <palves@redhat.com>
6363 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6364 (debug_vprintf): Use std::chrono::steady_clock instead of
6365 gettimeofday. Use '.' instead of ':'.
6366 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6367 (get_timestamp): Use std::chrono::steady_clock instead of
6370 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6372 * Makefile.in: Fix whitespace formatting.
6374 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6376 * Makefile.in (SFILES, OBS): Flatten list and order
6379 2016-11-23 Pedro Alves <palves@redhat.com>
6381 * event-loop.c (handle_file_event): Use warning.
6382 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6383 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6386 2016-11-23 Pedro Alves <palves@redhat.com>
6388 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6390 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6391 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6392 debug_printf and debug_flush for debug output.
6393 * server.c (handle_general_set): Likewise.
6394 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6397 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6399 * Makefile.in (.c.o): Replace rule with ...
6400 (%.o: %.c): ... this one.
6402 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6404 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6405 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6407 * configure.ac: Remove checks for the make program.
6408 * configure: Re-generate.
6410 2016-10-28 Pedro Alves <palves@redhat.com>
6412 * Makefile.in (CXX_DIALECT): Get from configure.
6413 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6414 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6415 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6416 * config.in: Regenerate.
6417 * configure: Regenerate.
6419 2016-10-27 Yao Qi <yao.qi@linaro.org>
6421 * linux-low.c (linux_supports_range_stepping): Return true if
6422 can_software_single_step return true.
6424 2016-10-27 Yao Qi <yao.qi@linaro.org>
6426 * inferiors.c (find_inferior_in_random): New function.
6427 * inferiors.h (find_inferior_in_random): Declare.
6428 * linux-low.c (linux_wait_for_event_filtered): Call
6429 find_inferior_in_random instead of find_inferior.
6431 2016-10-27 Yao Qi <yao.qi@linaro.org>
6433 * linux-low.c (linux_wait_1): If single-step breakpoints are
6434 inserted, remove them.
6436 2016-10-26 Pedro Alves <palves@redhat.com>
6438 * linux-low.c (handle_extended_wait): Link parent/child fork
6440 (linux_wait_1): Unlink them.
6441 (linux_set_resume_request): Ignore resume requests for
6442 already-resumed and unhandled fork child threads.
6443 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6444 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6446 (handle_v_requests) <vCont>: Don't call require_running.
6447 * server.h (in_queued_stop_replies): New declaration.
6449 2016-10-24 Yao Qi <yao.qi@linaro.org>
6452 * linux-aarch64-low.c (append_insns): Cast the return value to
6455 2016-10-10 Yao Qi <yao.qi@linaro.org>
6457 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6459 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6461 * target.c (target_supports_multi_process): New function, moved
6463 * target.h (target_supports_multi_process): ... here. Remove
6466 2016-10-05 Tom Tromey <tom@tromey.com>
6469 * tracepoint.c (handle_tracepoint_bkpts): Check
6470 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6472 2016-10-05 Yao Qi <yao.qi@linaro.org>
6474 * configure.srv: Update the path of arm-*.xml files.
6476 2016-10-05 Terry Guo <terry.guo@arm.com>
6477 Yao Qi <yao.qi@linaro.org>
6479 * Makefile.in: Adjust the path of rules.
6480 * configure.srv: Update the path of xml files.
6481 * regformats/arm-with-iwmmxt.dat: Regenerated.
6482 * regformats/arm-with-neon.dat: Likewise.
6483 * regformats/arm-with-vfpv2.dat: Likewise.
6484 * regformats/arm-with-vfpv3.dat Likewise.
6486 2016-09-30 Yao Qi <yao.qi@linaro.org>
6489 * target.c (target_stop_and_wait): Don't call
6490 target_continue_no_signal, use resume_stop instead.
6492 2016-09-26 Yao Qi <yao.qi@linaro.org>
6494 * linux-low.c (linux_wait_1): Call debug_exit.
6496 2016-09-23 Pedro Alves <palves@redhat.com>
6498 * Makefile.in (SFILES): Add common/new-op.c.
6499 (OBS): Add common/new-op.o.
6500 (new-op.o): New rule.
6502 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6504 * .gitinore: Ignore more files.
6506 2016-09-21 Yao Qi <yao.qi@linaro.org>
6508 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6511 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6513 * server.c (start_inferior): Call target_mourn_inferior instead of
6514 mourn_inferior; pass ptid_t argument to it.
6516 (handle_target_event): Likewise.
6517 * target.c (target_mourn_inferior): New function.
6518 * target.h (mourn_inferior): Delete macro.
6520 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6522 * linux-low.c (lwp_is_stepping): New function.
6524 2016-09-06 Carl Love <cel@us.ibm.com>
6526 * server.c (start_inferior): Fixed comment, requested comment change
6527 didn't get updated correctly. Removed reference to ptrace () call as
6528 it is only true on Linux systems.
6530 2016-09-06 Carl Love <cel@us.ibm.com>
6532 * server.c (start_inferior): Do not call
6533 function target_post_create_inferior () if the
6534 inferior process has already exited.
6536 2016-09-05 Pedro Alves <palves@redhat.com>
6538 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6539 (COMPILE.pre, CC_LD): Use CXX directly.
6540 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6541 * acinclude.m4: Don't include build-with-cxx.m4.
6542 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6543 * configure: Regenerate.
6545 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6548 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6549 call writing data to own_buf.
6551 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6553 * target.c (mywait): Call target_wait instead of
6555 (target_wait): New function.
6557 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6559 * server.c (start_inferior): New variable 'ptid'. Replace calls
6560 to the_target->resume by target_continue{,_no_signal}, depending
6562 * target.c (target_stop_and_wait): Call target_continue_no_signal
6563 instead of the_target->resume.
6564 (target_continue): New function.
6566 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6568 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6570 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6573 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6575 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6576 * linux-arm-low.c (ps_get_thread_area): Likewise.
6577 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6578 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6579 * linux-mips-low.c (ps_get_thread_area): Likewise.
6580 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6581 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6582 * linux-x86-low.c (ps_get_thread_area): Likewise.
6583 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6585 2016-08-19 Pedro Alves <palves@redhat.com>
6587 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6589 2016-08-19 Pedro Alves <palves@redhat.com>
6591 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6592 comment. Use memcpy instead of casting through unsigned long.
6594 2016-08-19 Pedro Alves <palves@redhat.com>
6596 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6597 allocating around 0x80000000.
6599 2016-08-19 Pedro Alves <palves@redhat.com>
6602 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6603 (x32-avx512-linux-ipa.o): New rules.
6604 * configure.ac (x86_64-*-linux*): New x32 check.
6605 * configure.srv (ipa_x32_linux_regobj): New.
6606 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6607 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6609 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6611 * configure: Regenerate.
6613 2016-08-09 Pedro Alves <palves@redhat.com>
6616 * Makefile.in (OBS): Add signals-state-save-restore.o.
6617 (signals-state-save-restore.o): New rule.
6618 * config.in: Regenerate.
6619 * configure: Regenerate.
6620 * linux-low.c: Include "signals-state-save-restore.h".
6621 (linux_create_inferior): Call
6622 restore_original_signals_state.
6623 * server.c: Include "dispositions-save-restore.h".
6624 (captured_main): Call save_original_signals_state.
6626 2016-08-05 Pedro Alves <palves@redhat.com>
6628 * configure: Regenerate.
6630 2016-08-04 Yao Qi <yao.qi@linaro.org>
6632 * linux-low.c (regsets_fetch_inferior_registers): Check
6633 errno is ESRCH or not.
6635 2016-08-02 Yao Qi <yao.qi@linaro.org>
6637 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6638 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6639 (thread_db_load_search): Update.
6640 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6641 td_ta_set_event and td_ta_event_getmsg.
6643 2016-07-26 Pedro Alves <palves@redhat.com>
6646 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6647 of unsigned long for 64-bit registers and use uint32_t instead of
6648 unsigned int for 32-bit registers.
6650 2016-07-26 Pedro Alves <palves@redhat.com>
6652 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6655 2016-07-21 Tom Tromey <tom@tromey.com>
6657 * configure: Rebuild.
6659 2016-07-21 Yao Qi <yao.qi@linaro.org>
6661 * mem-break.c (find_gdb_breakpoint): Cast bp to
6662 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
6664 2016-07-21 Yao Qi <yao.qi@linaro.org>
6666 * server.c (handle_v_requests): Support s and S actions
6667 if target_supports_software_single_step return true.
6669 2016-07-21 Yao Qi <yao.qi@linaro.org>
6671 * linux-low.c (resume_stopped_resumed_lwps): If resume request
6672 is resume_step, call maybe_hw_step.
6673 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6675 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
6677 (proceed_one_lwp): If resume request is resume_step, install
6678 reinsert breakpoints and call maybe_hw_step.
6680 2016-07-21 Yao Qi <yao.qi@linaro.org>
6682 * linux-low.c (proceed_one_lwp): Declare.
6683 (linux_resume_one_thread): Remove local variable 'step'.
6684 Lift code enqueue signal. Call proceed_one_lwp instead of
6685 linux_resume_one_lwp.
6687 2016-07-21 Yao Qi <yao.qi@linaro.org>
6689 * linux-low.c (linux_resume_one_thread): Call
6690 enqueue_pending_signal.
6692 2016-07-21 Yao Qi <yao.qi@linaro.org>
6694 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
6695 * inferiors.c (do_restore_current_thread_cleanup): New function.
6696 (make_cleanup_restore_current_thread): Likewise.
6697 * linux-low.c (install_software_single_step_breakpoints): Call
6698 make_cleanup_restore_current_thread. Switch current_thread to
6701 2016-07-21 Yao Qi <yao.qi@linaro.org>
6703 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
6704 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
6705 (clone_one_breakpoint): Likewise.
6706 (delete_reinsert_breakpoints): Change parameter to thread.
6708 (has_reinsert_breakpoints): Likewise.
6709 (uninsert_reinsert_breakpoints): Likewise.
6710 (reinsert_reinsert_breakpoints): Likewise.
6711 * mem-break.h (set_reinsert_breakpoint): Update declaration.
6712 (delete_reinsert_breakpoints): Likewise.
6713 (reinsert_reinsert_breakpoints): Likewise.
6714 (uninsert_reinsert_breakpoints): Likewise.
6715 (has_reinsert_breakpoints): Likewise.
6717 2016-07-21 Yao Qi <yao.qi@linaro.org>
6719 * inferiors.c (get_thread_process): Make parameter const.
6720 * inferiors.h (get_thread_process): Update declaration.
6721 * mem-break.c (clone_all_breakpoints): Remove all parameters.
6722 Add new parameters child_thread and parent_thread. Callers
6724 * mem-break.h (clone_all_breakpoints): Update declaration.
6726 2016-07-21 Yao Qi <yao.qi@linaro.org>
6728 * mem-break.c (struct breakpoint) <cond_list>: Remove.
6729 <command_list, handler>: Remove.
6730 (struct gdb_breakpoint): New.
6731 (struct other_breakpoint): New.
6732 (struct reinsert_breakpoint): New.
6733 (is_gdb_breakpoint): New function.
6734 (any_persistent_commands): Update command_list if
6735 is_gdb_breakpoint returns true.
6736 (set_breakpoint): Create breakpoints according to their types.
6737 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
6738 (set_gdb_breakpoint_1): Likewise.
6739 (set_gdb_breakpoint): Likewise.
6740 (clear_breakpoint_conditions): Change parameter type to
6741 'struct gdb_breakpoint *'.
6742 (clear_breakpoint_commands): Likewise.
6743 (clear_breakpoint_conditions_and_commands): Likewise.
6744 (add_condition_to_breakpoint): Likewise.
6745 (add_breakpoint_condition): Likewise.
6746 (add_commands_to_breakpoint): Likewise.
6747 (check_breakpoints): Check other_breakpoint.
6748 (clone_one_breakpoint): Clone breakpopint according to its type.
6749 * mem-break.h (struct gdb_breakpoint): Declare.
6750 (set_gdb_breakpoint): Update declaration.
6751 (clear_breakpoint_conditions_and_commands): Likewise.
6752 (add_breakpoint_condition): Likewise.
6753 (add_breakpoint_commands): Likewise.
6754 * server.c (process_point_options): Change parameter type to
6755 'struct gdb_breakpoint *'.
6757 2016-07-21 Yao Qi <yao.qi@linaro.org>
6759 * mem-break.c (set_breakpoint_at): Rename it to ...
6760 (set_breakpoint_type_at): ... it.
6761 (set_breakpoint_at): Call set_breakpoint_type_at.
6762 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
6763 * mem-break.h (set_breakpoint_at): Update comments.
6765 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
6767 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
6769 (nios2_store_gregset): Likewise.
6771 2016-07-01 Pedro Alves <palves@redhat.com>
6772 Antoine Tremblay <antoine.tremblay@ericsson.com>
6774 * linux-low.c: Change interface to take the target lwp_info
6775 pointer directly and return void. Handle detaching from a zombie
6777 (linux_detach_lwp_callback): New function.
6778 (linux_detach): Detach from the leader thread after detaching from
6781 2016-06-28 Yao Qi <yao.qi@linaro.org>
6783 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
6784 for variable new_offset.
6785 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6786 (aarch64_ftrace_insn_reloc_cb): Likewise.
6787 (aarch64_ftrace_insn_reloc_tb): Likewise.
6788 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
6789 PRIx64 instead of PRIx32.
6791 2016-06-28 Yao Qi <yao.qi@linaro.org>
6793 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
6794 (the_low_target): Install arm_get_syscall_trapinfo.
6796 2016-06-28 Yao Qi <yao.qi@linaro.org>
6798 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
6800 (the_low_target): Install aarch64_get_syscall_trapinfo.
6802 2016-06-28 Yao Qi <yao.qi@linaro.org>
6804 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
6806 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
6807 Remove parameter sysno.
6808 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
6811 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6813 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
6814 (s390_emit_ne_goto): Likewise.
6815 (s390_emit_lt_goto): Likewise.
6816 (s390_emit_le_goto): Likewise.
6817 (s390_emit_gt_goto): Likewise.
6818 (s390_emit_ge_goto): Likewise.
6819 (s390x_emit_eq_goto): Likewise.
6820 (s390x_emit_ne_goto): Likewise.
6821 (s390x_emit_lt_goto): Likewise.
6822 (s390x_emit_le_goto): Likewise.
6823 (s390x_emit_gt_goto): Likewise.
6824 (s390x_emit_ge_goto): Likewise.
6825 (s390_emit_ops_impl): Mark variable static.
6826 (s390x_emit_ops): Likewise.
6828 2016-06-17 Yao Qi <yao.qi@linaro.org>
6830 * linux-low.c (handle_extended_wait): Call
6831 uninsert_reinsert_breakpoints for the parent process. Remove
6832 reinsert breakpoints from the child process. Reinsert them to
6833 the parent process when vfork is done.
6834 * mem-break.c (uninsert_reinsert_breakpoints): New function.
6835 (reinsert_reinsert_breakpoints): New function.
6836 * mem-break.h (uninsert_reinsert_breakpoints): Declare
6837 (reinsert_reinsert_breakpoints): Declare.
6839 2016-06-17 Yao Qi <yao.qi@linaro.org>
6841 * linux-low.c (handle_extended_wait): If the parent is doing
6842 step-over, remove the reinsert breakpoints from the forked child.
6844 2016-06-17 Yao Qi <yao.qi@linaro.org>
6846 * linux-low.c (unsuspend_all_lwps): Declare.
6847 (linux_low_filter_event): If thread exited, call finish_step_over.
6848 If step-over is finished, unsuspend other threads.
6850 2016-06-17 Yao Qi <yao.qi@linaro.org>
6852 * linux-low.c (linux_resume_one_lwp_throw): Assert
6853 has_reinsert_breakpoints returns false.
6854 * mem-break.c (delete_disabled_breakpoints): Assert
6855 bp type isn't reinsert_breakpoint.
6857 2016-06-17 Yao Qi <yao.qi@linaro.org>
6859 * linux-low.c (maybe_hw_step): New function.
6860 (linux_resume_one_lwp_throw): Call maybe_hw_step.
6861 (finish_step_over): Switch current_thread to lwp temporarily,
6862 and assert has_reinsert_breakpoints returns true.
6863 (proceed_one_lwp): Call maybe_hw_step.
6864 * mem-break.c (has_reinsert_breakpoints): New function.
6865 * mem-break.h (has_reinsert_breakpoints): Declare.
6867 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
6869 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
6871 2016-05-17 Yao Qi <yao.qi@linaro.org>
6873 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
6874 instead of find_inferior.
6876 2016-05-05 Yao Qi <yao.qi@linaro.org>
6878 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
6879 Initialize res to zero.
6881 2016-05-05 Yao Qi <yao.qi@linaro.org>
6883 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
6886 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6888 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
6889 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
6890 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
6892 2016-04-28 Par Olsson <par.olsson@windriver.com>
6893 Simon Marchi <simon.marchi@ericsson.com>
6895 * tracepoint.c (write_inferior_int8): New function.
6896 (cmd_qtenable_disable): Write enable flag using
6897 write_inferior_int8.
6899 2016-04-25 Yao Qi <yao.qi@linaro.org>
6901 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
6902 (need_step_over_p): Return zero if the LWP has pending signals
6903 can be delivered on software single step target.
6905 2016-04-25 Yao Qi <yao.qi@linaro.org>
6907 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
6908 return instead of error.
6910 2016-04-22 Yao Qi <yao.qi@linaro.org>
6912 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
6915 2016-04-22 Yao Qi <yao.qi@linaro.org>
6917 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
6918 signal when stepping over breakpoint with software single
6921 2016-04-21 Pedro Alves <palves@redhat.com>
6923 * linux-s390-low.c (s390_collect_ptrace_register)
6924 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
6926 (s390_check_regset): Use void * instead of gdb_byte *.
6928 2016-04-20 Pedro Alves <palves@redhat.com>
6930 * configure: Renegerate.
6932 2016-04-20 Yao Qi <yao.qi@linaro.org>
6934 * linux-aarch32-low.c: Include "arch/arm-linux.h".
6935 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
6937 (arm_store_gregset): Likewise.
6939 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
6941 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
6942 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
6943 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
6944 (amd64-avx-mpx-linux.c): New rules.
6945 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
6946 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
6947 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
6948 (srv_amd64_regobj): Add amd64-avx-mpx.o.
6949 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
6950 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
6951 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
6952 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
6953 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
6954 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
6955 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
6956 * linux-x86-low.c (x86_linux_read_description): Add case for
6957 X86_XSTATE_AVX_MPX_MASK.
6958 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
6959 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
6960 init_registers_i386_avx_mpx_linux.
6961 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6962 (initialize_low_tracepoint): Call
6963 init_registers_i386_avx_mpx_linux.
6964 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6965 (initialize_low_tracepoint): Call
6966 init_registers_amd64_avx_mpx_linux.
6967 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
6968 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
6969 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
6972 2016-04-18 Pedro Alves <palves@redhat.com>
6974 * configure: Regenerate.
6976 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
6978 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
6979 (aarch64_emit_sub): Likewise.
6981 2016-04-12 Pedro Alves <palves@redhat.com>
6983 * utils.c (prepare_to_throw_exception): Delete.
6985 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
6987 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
6989 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
6991 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
6993 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
6995 * linux-aarch64-ipa.c: Add <elf.h> include.
6996 * linux-ppc-ipa.c: Add <elf.h> include.
6997 * linux-s390-ipa.c: Add <elf.h> include.
6999 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7001 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7002 (get_raw_reg_ptr): Likewise.
7003 (get_trace_state_variable_value_ptr): Likewise.
7004 (set_trace_state_variable_value_ptr): Likewise.
7005 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7008 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7009 Marcin Kościelnicki <koriakin@0x04.net>
7012 * linux-ppc-low.c (emit_insns): New function.
7013 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7014 (ppc_emit_prologue): New function.
7015 (ppc_emit_epilogue): New function.
7016 (ppc_emit_add): New function.
7017 (ppc_emit_sub): New function.
7018 (ppc_emit_mul): New function.
7019 (ppc_emit_lsh): New function.
7020 (ppc_emit_rsh_signed): New function.
7021 (ppc_emit_rsh_unsigned): New function.
7022 (ppc_emit_ext): New function.
7023 (ppc_emit_zero_ext): New function.
7024 (ppc_emit_log_not): New function.
7025 (ppc_emit_bit_and): New function.
7026 (ppc_emit_bit_or): New function.
7027 (ppc_emit_bit_xor): New function.
7028 (ppc_emit_bit_not): New function.
7029 (ppc_emit_equal): New function.
7030 (ppc_emit_less_signed): New function.
7031 (ppc_emit_less_unsigned): New function.
7032 (ppc_emit_ref): New function.
7033 (ppc_emit_const): New function.
7034 (ppc_emit_reg): New function.
7035 (ppc_emit_pop): New function.
7036 (ppc_emit_stack_flush): New function.
7037 (ppc_emit_swap): New function.
7038 (ppc_emit_stack_adjust): New function.
7039 (ppc_emit_call): New function.
7040 (ppc_emit_int_call_1): New function.
7041 (ppc_emit_void_call_2): New function.
7042 (ppc_emit_if_goto): New function.
7043 (ppc_emit_goto): New function.
7044 (ppc_emit_eq_goto): New function.
7045 (ppc_emit_ne_goto): New function.
7046 (ppc_emit_lt_goto): New function.
7047 (ppc_emit_le_goto): New function.
7048 (ppc_emit_gt_goto): New function.
7049 (ppc_emit_ge_goto): New function.
7050 (ppc_write_goto_address): New function.
7051 (ppc_emit_ops_impl): New static variable.
7052 (ppc64v1_emit_prologue): New function.
7053 (ppc64v2_emit_prologue): New function.
7054 (ppc64_emit_epilogue): New function.
7055 (ppc64_emit_add): New function.
7056 (ppc64_emit_sub): New function.
7057 (ppc64_emit_mul): New function.
7058 (ppc64_emit_lsh): New function.
7059 (ppc64_emit_rsh_signed): New function.
7060 (ppc64_emit_rsh_unsigned): New function.
7061 (ppc64_emit_ext): New function.
7062 (ppc64_emit_zero_ext): New function.
7063 (ppc64_emit_log_not): New function.
7064 (ppc64_emit_bit_and): New function.
7065 (ppc64_emit_bit_or): New function.
7066 (ppc64_emit_bit_xor): New function.
7067 (ppc64_emit_bit_not): New function.
7068 (ppc64_emit_equal): New function.
7069 (ppc64_emit_less_signed): New function.
7070 (ppc64_emit_less_unsigned): New function.
7071 (ppc64_emit_ref): New function.
7072 (ppc64_emit_const): New function.
7073 (ppc64v1_emit_reg): New function.
7074 (ppc64v2_emit_reg): New function.
7075 (ppc64_emit_pop): New function.
7076 (ppc64_emit_stack_flush): New function.
7077 (ppc64_emit_swap): New function.
7078 (ppc64v1_emit_call): New function.
7079 (ppc64v2_emit_call): New function.
7080 (ppc64v1_emit_int_call_1): New function.
7081 (ppc64v2_emit_int_call_1): New function.
7082 (ppc64v1_emit_void_call_2): New function.
7083 (ppc64v2_emit_void_call_2): New function.
7084 (ppc64_emit_if_goto): New function.
7085 (ppc64_emit_eq_goto): New function.
7086 (ppc64_emit_ne_goto): New function.
7087 (ppc64_emit_lt_goto): New function.
7088 (ppc64_emit_le_goto): New function.
7089 (ppc64_emit_gt_goto): New function.
7090 (ppc64_emit_ge_goto): New function.
7091 (ppc64v1_emit_ops_impl): New static variable.
7092 (ppc64v2_emit_ops_impl): New static variable.
7093 (ppc_emit_ops): New function.
7094 (linux_low_target): Wire in ppc_emit_ops.
7096 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7097 Marcin Kościelnicki <koriakin@0x04.net>
7100 * Makefile.in: Add powerpc-*-ipa.o
7101 * configure.srv: Add ipa_obj for powerpc*-linux.
7102 * linux-ppc-ipa.c: New file.
7103 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7105 (PPC_FIELD): New macro.
7106 (PPC_SEXT): New macro.
7107 (PPC_OP6): New macro.
7108 (PPC_BO): New macro.
7109 (PPC_LI): New macro.
7110 (PPC_BD): New macro.
7111 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7112 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7113 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7114 (ppc_get_thread_area): New function.
7115 (is_elfv2_inferior): New function.
7116 (gen_ds_form): New function.
7117 (GEN_STD): New macro.
7118 (GEN_STDU): New macro.
7119 (GEN_LD): New macro.
7120 (GEN_LDU): New macro.
7121 (gen_d_form): New function.
7122 (GEN_ADDI): New macro.
7123 (GEN_ADDIS): New macro.
7124 (GEN_LI): New macro.
7125 (GEN_LIS): New macro.
7126 (GEN_ORI): New macro.
7127 (GEN_ORIS): New macro.
7128 (GEN_LWZ): New macro.
7129 (GEN_STW): New macro.
7130 (GEN_STWU): New macro.
7131 (gen_xfx_form): New function.
7132 (GEN_MFSPR): New macro.
7133 (GEN_MTSPR): New macro.
7134 (GEN_MFCR): New macro.
7135 (GEN_MTCR): New macro.
7136 (GEN_SYNC): New macro.
7137 (GEN_LWSYNC): New macro.
7138 (gen_x_form): New function.
7139 (GEN_OR): New macro.
7140 (GEN_MR): New macro.
7141 (GEN_LWARX): New macro.
7142 (GEN_STWCX): New macro.
7143 (GEN_CMPW): New macro.
7144 (gen_md_form): New function.
7145 (GEN_RLDICL): New macro.
7146 (GEN_RLDICR): New macro.
7147 (gen_i_form): New function.
7149 (GEN_BL): New macro.
7150 (gen_b_form): New function.
7151 (GEN_BNE): New macro.
7152 (GEN_LOAD): New macro.
7153 (GEN_STORE): New macro.
7154 (gen_limm): New function.
7155 (gen_atomic_xchg): New function.
7156 (gen_call): New function.
7157 (ppc_relocate_instruction): New function.
7158 (ppc_install_fast_tracepoint_jump_pad): New function.
7159 (ppc_get_min_fast_tracepoint_insn_len): New function.
7160 (ppc_get_ipa_tdesc_idx): New function.
7161 (the_low_target): Wire in the new functions.
7162 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7164 * linux-ppc-tdesc.h: New file.
7166 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7168 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7169 (alloc_jump_pad_buffer): New function.
7170 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7171 (alloc_jump_pad_buffer): New function.
7172 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7173 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7174 (alloc_jump_pad_buffer): New function.
7175 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7176 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7177 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7178 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7180 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7182 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7183 * linux-amd64-ipa.c: Likewise.
7184 * linux-i386-ipa.c: Likewise.
7185 * linux-s390-ipa.c: Likewise.
7186 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7187 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7188 set_trace_state_variable_value_ptr.
7189 (struct ipa_sym_addresses): Likewise.
7190 (symbol_list): Likewise.
7191 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7192 accessing gdb_collect directly.
7193 (gdb_collect_ptr_type): New typedef.
7194 (get_raw_reg_ptr_type): New typedef.
7195 (get_trace_state_variable_value_ptr_type): New typedef.
7196 (set_trace_state_variable_value_ptr_type): New typedef.
7197 (gdb_collect_ptr): New global.
7198 (get_raw_reg_ptr): New global.
7199 (get_trace_state_variable_value_ptr): New global.
7200 (set_trace_state_variable_value_ptr): New global.
7201 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7202 accessing get_raw_reg directly.
7203 (get_get_tsv_func_addr): Likewise for
7204 get_trace_state_variable_value_ptr.
7205 (get_set_tsv_func_addr): Likewise for
7206 set_trace_state_variable_value_ptr.
7207 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7209 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7211 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7213 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7215 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7217 (relocate_instruction): Remove own_buf.
7218 * server.c (own_buf): Make global.
7219 (handle_v_requests): Make global.
7220 * server.h (own_buf): New declaration.
7221 (handle_v_requests): New prototype.
7223 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7226 * linux-s390-low.c (add_insns): New function.
7227 (s390_emit_prologue): New function.
7228 (s390_emit_epilogue): New function.
7229 (s390_emit_add): New function.
7230 (s390_emit_sub): New function.
7231 (s390_emit_mul): New function.
7232 (s390_emit_lsh): New function.
7233 (s390_emit_rsh_signed): New function.
7234 (s390_emit_rsh_unsigned): New function.
7235 (s390_emit_ext): New function.
7236 (s390_emit_log_not): New function.
7237 (s390_emit_bit_and): New function.
7238 (s390_emit_bit_or): New function.
7239 (s390_emit_bit_xor): New function.
7240 (s390_emit_bit_not): New function.
7241 (s390_emit_equal): New function.
7242 (s390_emit_less_signed): New function.
7243 (s390_emit_less_unsigned): New function.
7244 (s390_emit_ref): New function.
7245 (s390_emit_if_goto): New function.
7246 (s390_emit_goto): New function.
7247 (s390_write_goto_address): New function.
7248 (s390_emit_litpool): New function.
7249 (s390_emit_const): New function.
7250 (s390_emit_call): New function.
7251 (s390_emit_reg): New function.
7252 (s390_emit_pop): New function.
7253 (s390_emit_stack_flush): New function.
7254 (s390_emit_zero_ext): New function.
7255 (s390_emit_swap): New function.
7256 (s390_emit_stack_adjust): New function.
7257 (s390_emit_set_r2): New function.
7258 (s390_emit_int_call_1): New function.
7259 (s390_emit_void_call_2): New function.
7260 (s390_emit_eq_goto): New function.
7261 (s390_emit_ne_goto): New function.
7262 (s390_emit_lt_goto): New function.
7263 (s390_emit_le_goto): New function.
7264 (s390_emit_gt_goto): New function.
7265 (s390_emit_ge_goto): New function.
7266 (s390x_emit_prologue): New function.
7267 (s390x_emit_epilogue): New function.
7268 (s390x_emit_add): New function.
7269 (s390x_emit_sub): New function.
7270 (s390x_emit_mul): New function.
7271 (s390x_emit_lsh): New function.
7272 (s390x_emit_rsh_signed): New function.
7273 (s390x_emit_rsh_unsigned): New function.
7274 (s390x_emit_ext): New function.
7275 (s390x_emit_log_not): New function.
7276 (s390x_emit_bit_and): New function.
7277 (s390x_emit_bit_or): New function.
7278 (s390x_emit_bit_xor): New function.
7279 (s390x_emit_bit_not): New function.
7280 (s390x_emit_equal): New function.
7281 (s390x_emit_less_signed): New function.
7282 (s390x_emit_less_unsigned): New function.
7283 (s390x_emit_ref): New function.
7284 (s390x_emit_if_goto): New function.
7285 (s390x_emit_const): New function.
7286 (s390x_emit_call): New function.
7287 (s390x_emit_reg): New function.
7288 (s390x_emit_pop): New function.
7289 (s390x_emit_stack_flush): New function.
7290 (s390x_emit_zero_ext): New function.
7291 (s390x_emit_swap): New function.
7292 (s390x_emit_stack_adjust): New function.
7293 (s390x_emit_int_call_1): New function.
7294 (s390x_emit_void_call_2): New function.
7295 (s390x_emit_eq_goto): New function.
7296 (s390x_emit_ne_goto): New function.
7297 (s390x_emit_lt_goto): New function.
7298 (s390x_emit_le_goto): New function.
7299 (s390x_emit_gt_goto): New function.
7300 (s390x_emit_ge_goto): New function.
7301 (s390_emit_ops): New function.
7302 (struct linux_target_ops): Fill in emit_ops hook.
7304 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7307 * Makefile.in: Add s390 IPA files.
7308 * configure.srv: Build IPA for s390.
7309 * linux-s390-ipa.c: New file.
7310 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7311 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7312 (tdesc_s390_linux32): Likewise.
7313 (init_registers_s390_linux32v1): Likewise.
7314 (tdesc_s390_linux32v1): Likewise.
7315 (init_registers_s390_linux32v2): Likewise.
7316 (tdesc_s390_linux32v2): Likewise.
7317 (init_registers_s390_linux64): Likewise.
7318 (tdesc_s390_linux64): Likewise.
7319 (init_registers_s390_linux64v1): Likewise.
7320 (tdesc_s390_linux64v1): Likewise.
7321 (init_registers_s390_linux64v2): Likewise.
7322 (tdesc_s390_linux64v2): Likewise.
7323 (init_registers_s390_te_linux64): Likewise.
7324 (tdesc_s390_te_linux64): Likewise.
7325 (init_registers_s390_vx_linux64): Likewise.
7326 (tdesc_s390_vx_linux64): Likewise.
7327 (init_registers_s390_tevx_linux64): Likewise.
7328 (tdesc_s390_tevx_linux64): Likewise.
7329 (init_registers_s390x_linux64): Likewise.
7330 (tdesc_s390x_linux64): Likewise.
7331 (init_registers_s390x_linux64v1): Likewise.
7332 (tdesc_s390x_linux64v1): Likewise.
7333 (init_registers_s390x_linux64v2): Likewise.
7334 (tdesc_s390x_linux64v2): Likewise.
7335 (init_registers_s390x_te_linux64): Likewise.
7336 (tdesc_s390x_te_linux64): Likewise.
7337 (init_registers_s390x_vx_linux64): Likewise.
7338 (tdesc_s390x_vx_linux64): Likewise.
7339 (init_registers_s390x_tevx_linux64): Likewise.
7340 (tdesc_s390x_tevx_linux64): Likewise.
7341 (have_hwcap_s390_vx): New static variable.
7342 (s390_arch_setup): Fill have_hwcap_s390_vx.
7343 (s390_get_thread_area): New function.
7344 (s390_ft_entry_gpr_esa): New const.
7345 (s390_ft_entry_gpr_zarch): New const.
7346 (s390_ft_entry_misc): New const.
7347 (s390_ft_entry_fr): New const.
7348 (s390_ft_entry_vr): New const.
7349 (s390_ft_main_31): New const.
7350 (s390_ft_main_64): New const.
7351 (s390_ft_exit_fr): New const.
7352 (s390_ft_exit_vr): New const.
7353 (s390_ft_exit_misc): New const.
7354 (s390_ft_exit_gpr_esa): New const.
7355 (s390_ft_exit_gpr_zarch): New const.
7356 (append_insns): New function.
7357 (s390_relocate_instruction): New function.
7358 (s390_install_fast_tracepoint_jump_pad): New function.
7359 (s390_get_min_fast_tracepoint_insn_len): New function.
7360 (s390_get_ipa_tdesc_idx): New function.
7361 (struct linux_target_ops): Wire in the above functions.
7362 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7363 * linux-s390-tdesc.h: New file.
7365 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7367 * linux-s390-low.c (s390_supports_tracepoints): New function.
7368 (struct linux_target_ops): Fill supports_tracepoints hook.
7370 2016-03-18 Yao Qi <yao.qi@linaro.org>
7372 * linux-low.c (lwp_signal_can_be_delivered): New function.
7373 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7375 2016-03-18 Yao Qi <yao.qi@linaro.org>
7377 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7378 0 if signal is enqueued. Remove 'signal' from one debugging
7379 message. Move one debugging message to some lines below.
7380 Remove code setting 'signal' to 0.
7382 2016-03-18 Yao Qi <yao.qi@linaro.org>
7384 * linux-low.c (linux_low_filter_event): Remove redundant
7385 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7387 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7389 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7390 (struct linux_target_ops): Wire in the above.
7392 2016-03-03 Yao Qi <yao.qi@linaro.org>
7394 * linux-low.c: Update comments to start_step_over.
7396 2016-03-03 Yao Qi <yao.qi@linaro.org>
7399 * linux-low.c (handle_extended_wait): Set child suspended
7400 if event_lwp->bp_reinsert isn't zero.
7402 2016-03-02 Yao Qi <yao.qi@linaro.org>
7404 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7405 enqueue_pending_signal.
7407 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7409 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7412 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7414 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7415 (s390_regmap_3264) [!__s390x__]: New global.
7416 (s390_collect_ptrace_register): Skip map entries containing -1.
7417 (s390_supply_ptrace_register): Ditto.
7418 (s390_fill_gprs_high): New function.
7419 (s390_store_gprs_high): New function.
7420 (s390_regsets): Add NT_S390_HIGH_GPRS.
7421 (s390_get_hwcap): Enable on 31-bit.
7422 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7423 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7424 Detect NT_S390_HIGH_GPRS.
7425 (s390_usrregs_info_3264): Enable on 31-bit.
7426 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7427 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7429 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7432 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7433 * configure.srv: Ditto.
7434 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7435 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7436 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7437 (init_registers_amd64_linux): Remove prototype.
7438 (tdesc_amd64_linux): Remove declaration.
7439 (get_ipa_tdesc): New function.
7440 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7441 initialize remaining tdescs.
7442 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7443 (init_registers_i386_linux): Remove prototype.
7444 (tdesc_i386_linux): Remove declaration.
7445 (get_ipa_tdesc): New function.
7446 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7447 initialize remaining tdescs.
7448 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7449 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7450 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7451 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7452 (x86_get_ipa_tdesc_idx): New function.
7453 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7454 * linux-x86-tdesc.h: New file.
7455 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7456 (target_get_ipa_tdesc_idx): New macro.
7457 * tracepoint.c (ipa_tdesc_idx): New macro.
7458 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7459 (symbol_list): Add ipa_tdesc_idx.
7460 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7461 (ipa_tdesc): Remove.
7462 (ipa_tdesc_idx): New variable.
7463 (get_context_regcache): Use get_ipa_tdesc.
7464 (gdb_collect): Ditto.
7466 * tracepoint.h (get_ipa_tdesc): New prototype.
7467 (ipa_tdesc): Remove.
7469 2016-02-24 Pedro Alves <palves@redhat.com>
7471 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7472 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7473 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7474 Factor out common code between the USE_SIGTRAP_SIGINFO and
7475 !USE_SIGTRAP_SIGINFO blocks.
7476 (linux_low_filter_event): Call save_stop_reason instead of
7477 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7479 (linux_wait_1): Update comments.
7481 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
7483 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7484 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7485 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7486 ppc_insert_point, ppc_remove_point.
7488 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7490 * linux-s390-low.c (s390_supports_z_point_type): New function.
7491 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7493 2016-02-16 Yao Qi <yao.qi@linaro.org>
7495 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7496 PC. Get pc from regcache_read_pc.
7498 2016-02-12 Yao Qi <yao.qi@linaro.org>
7500 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7501 or linux_get_pc_32bit.
7502 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7504 2016-02-12 Yao Qi <yao.qi@linaro.org>
7506 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7507 arm_linux_get_next_pcs_fixup.
7509 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7511 * tracepoint.c (x_tracepoint_action_download): Change
7512 write_inferior_data_ptr to write_inferior_data_pointer.
7513 (cmd_qtstart): Likewise.
7514 (write_inferior_data_ptr): Remove.
7515 (download_agent_expr): Change write_inferior_data_ptr to
7516 write_inferior_data_pointer.
7517 (download_tracepoint_1): Likewise.
7518 (download_tracepoint): Likewise.
7519 (download_trace_state_variables): Likewise.
7521 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
7522 Marcin Kościelnicki <koriakin@0x04.net>
7524 * tracepoint.c (struct tracepoint_action_ops): Remove.
7525 (struct tracepoint_action): Remove ops.
7526 (m_tracepoint_action_download, r_tracepoint_action_download)
7527 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7528 size and offset accordingly.
7529 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7530 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7531 (tracepoint_action_send, tracepoint_action_download): New functions.
7532 Helpers for trace action handlers.
7533 (add_tracepoint_action): Remove setup actions ops.
7534 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7536 2016-02-10 Yao Qi <yao.qi@linaro.org>
7538 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7540 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7542 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7544 * configure: Regenerate.
7546 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7548 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7549 void * to gdb_byte *.
7550 * linux-low.c (siginfo_fixup): Likewise.
7551 (linux_xfer_siginfo): Likewise.
7552 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7554 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7556 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7558 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7560 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7562 * linux-x86-low.c [__x86_64__]: Include
7563 "nat/amd64-linux-siginfo.h".
7564 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7565 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7566 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7567 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7568 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7569 (cpt_si_fd, si_timerid, si_overrun): Move from
7570 nat/amd64-linux-siginfo.c.
7571 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7573 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7575 * server.c (skip_to_semicolon): Remove.
7576 (process_point_options): Use strchrnul instead of
7579 2016-01-26 Yao Qi <yao.qi@linaro.org>
7581 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7582 * linux-low.c (install_software_single_step_breakpoints): Don't
7583 call regcache_read_pc.
7584 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7587 2016-01-26 Yao Qi <yao.qi@linaro.org>
7589 * linux-low.c (install_software_single_step_breakpoints): Call
7590 regcache_read_pc instead of get_pc.
7592 2016-01-26 Yao Qi <yao.qi@linaro.org>
7594 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7595 (unblock_async_io): Rename to ...
7596 (block_unblock_async_io): ... it. New function.
7597 (enable_async_io): Don't install SIGIO handler. Unblock it
7599 (disable_async_io): Don't ignore SIGIO. Block it instead.
7600 (initialize_async_io): Install SIGIO handler. Don't call
7603 2016-01-26 Yao Qi <yao.qi@linaro.org>
7605 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7606 first character is '\003', call *the_target->request_interrupt.
7608 2016-01-25 Yao Qi <yao.qi@linaro.org>
7610 * remote-utils.c (new_thread_notify): Remove.
7611 (dead_thread_notify): Likewise.
7612 * remote-utils.h (new_thread_notify): Remove declaration.
7613 (dead_thread_notify): Likewise.
7615 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7617 * gdb.trace/pending.exp: Fix expected message on continue.
7619 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7621 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7622 it works properly on big-endian machines where sizeof (CORE_ADDR)
7625 2016-01-21 Pedro Alves <palves@redhat.com>
7627 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7628 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7629 * configure: Regenerate.
7631 2016-01-21 Yao Qi <yao.qi@linaro.org>
7633 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7634 is_thumb and set it according to CPSR saved on the stack.
7635 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7636 arm_sigreturn_next_pc.
7638 2016-01-18 Yao Qi <yao.qi@linaro.org>
7640 * linux-low.c (linux_set_pc_64bit): New function.
7641 (linux_get_pc_64bit): New function.
7642 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7644 * linux-sparc-low.c (debug_threads): Remove declaration.
7645 (sparc_get_pc): Remove.
7646 (the_low_target): Use linux_get_pc_64bit instead of
7648 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7649 (the_low_target): Use linux_get_pc_64bit and
7652 2016-01-18 Yao Qi <yao.qi@linaro.org>
7654 * linux-arm-low.c (debug_threads): Remove declaration.
7655 (arm_get_pc, arm_set_pc): Remove.
7656 (the_low_target): Use linux_get_pc_32bit and
7658 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
7659 (the_low_target): Use linux_get_pc_32bit and
7661 * linux-cris-low.c (debug_threads): Remove declaration.
7662 (cris_get_pc, cris_set_pc,): Remove.
7663 (the_low_target): Use linux_get_pc_32bit and
7665 * linux-crisv32-low.c (debug_threads): Remove declaration.
7666 (cris_get_pc, cris_set_pc): Remove.
7667 (the_low_target): Use linux_get_pc_32bit and
7669 * linux-low.c: Include inttypes.h.
7670 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
7671 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
7672 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
7673 (the_low_target): Use linux_get_pc_32bit and
7675 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
7676 (the_low_target): Use linux_get_pc_32bit and
7678 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
7679 (the_low_target): Use linux_get_pc_32bit and
7681 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
7682 (the_low_target): Use linux_get_pc_32bit and
7684 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
7685 (the_low_target): Use linux_get_pc_32bit and
7688 2016-01-18 Gary Benson <gbenson@redhat.com>
7690 * configure.ac (AC_FUNC_FORK): New check.
7691 * config.in: Regenerate.
7692 * configure: Likewise.
7694 2016-01-14 Yao Qi <yao.qi@linaro.org>
7696 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
7697 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
7698 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
7699 arm_get_next_pcs_ctor.
7701 2016-01-12 Josh Stone <jistone@redhat.com>
7702 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7704 * inferiors.h: Include "gdb_vecs.h".
7705 (struct process_info): Add syscalls_to_catch.
7706 * inferiors.c (remove_process): Free syscalls_to_catch.
7707 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
7708 syscall_return stops.
7709 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
7710 * server.c (handle_general_set): Handle QCatchSyscalls.
7711 (handle_query): Report support for QCatchSyscalls.
7712 * target.h (struct target_ops): Add supports_catch_syscall.
7713 (target_supports_catch_syscall): New macro.
7714 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
7715 (struct lwp_info): Add syscall_state.
7716 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
7717 Maintain syscall_state and syscalls_to_catch across exec.
7718 (get_syscall_trapinfo): New function, proxy to the_low_target.
7719 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
7720 (linux_low_filter_event): Toggle syscall_state entry/return for
7721 syscall traps, and set it ignored for all others.
7722 (gdb_catching_syscalls_p): New function.
7723 (gdb_catch_this_syscall_p): New function.
7724 (linux_wait_1): Handle SYSCALL_SIGTRAP.
7725 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
7726 (linux_supports_catch_syscall): New function.
7727 (linux_target_ops): Install it.
7728 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
7729 (the_low_target): Install it.
7731 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7733 * acinclude.m4: Include new ../warning.m4 file.
7734 * configure: Regenerated.
7735 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
7737 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7739 * ax.c (is_goto_target): Mark static.
7740 * linux-low.c (register_addr): Likewise.
7741 (linux_fetch_registers, linux_store_registers): Likewise.
7742 * mem-break.c (any_persistent_commands): Fix old prototype.
7743 (add_commands_to_breakpoint): Mark static.
7744 * regcache.c (find_register_by_name): Delete unused func.
7745 * remote-utils.c (hex_or_minus_one): Mark static.
7746 * server.c (monitor_show_help): Mark static.
7747 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
7748 handle_v_requests): Likewise.
7750 2016-01-12 Pedro Alves <palves@redhat.com>
7752 Remove use of the registered trademark symbol throughout.
7754 2016-01-08 Yao Qi <yao.qi@linaro.org>
7756 * remote-utils.c (getpkt): If c is '\003', call target hook
7759 2016-01-06 Yao Qi <yao.qi@linaro.org>
7761 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
7762 linux-aarch32-low.c.
7763 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7764 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7765 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7766 (thumb2_breakpoint): Declare.
7767 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
7768 linux-aarch32-low.h.
7769 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7770 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7771 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7773 2016-01-01 Joel Brobecker <brobecker@adacore.com>
7775 * gdbreplay.c (gdbreplay_version): Change copyright year in
7777 * server.c (gdbserver_version): Likewise.
7779 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
7781 * server.c (crc32_table): Delete.
7782 (crc32): Use libiberty's xcrc32 function.
7784 2015-12-22 Joel Brobecker <brobecker@adacore.com>
7786 * lynx-low.c (lynx_delete_thread_callback): New function.
7787 (lynx_mourn): Properly delete our process and all of its
7788 threads. Remove call to clear_inferiors.
7790 2015-12-22 Joel Brobecker <brobecker@adacore.com>
7792 * target.c (thread_search_callback): Add check that
7793 the thread_stopped target callback is not NULL before
7796 2015-12-21 Yao Qi <yao.qi@linaro.org>
7798 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
7801 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7803 * server.c (handle_query): Call target_supports_software_single_step.
7805 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7807 * linux-low.c (single_step): New function.
7808 (linux_resume_one_lwp_throw): Call single_step.
7809 (start_step_over): Likewise.
7811 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7813 * Makefile.in (SFILES): Append arch/arm-linux.c,
7814 arch/arm-get-next-pcs.c.
7815 (arm-linux.o): New rule.
7816 (arm-get-next-pcs.o): New rule.
7817 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
7819 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
7820 to linux-aarch32-low.c.
7821 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7822 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7823 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7824 (thumb2_breakpoint_len): Likewise.
7825 (arm_is_thumb_mode): Make non-static.
7826 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
7827 from linux-aarch32-low.c.
7828 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7829 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7830 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7831 (thumb2_breakpoint_len): Likewise.
7832 (arm_is_thumb_mode): New declaration.
7833 * linux-arm-low.c: Include arch/arm-linux.h
7834 aarch/arm-get-next-pcs.h, sys/syscall.h.
7835 (get_next_pcs_ops): New struct.
7836 (get_next_pcs_addr_bits_remove): New function.
7837 (get_next_pcs_is_thumb): New function.
7838 (get_next_pcs_read_memory_unsigned_integer): Likewise.
7839 (arm_sigreturn_next_pc): Likewise.
7840 (get_next_pcs_syscall_next_pc): Likewise.
7841 (arm_gdbserver_get_next_pcs): Likewise.
7842 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
7844 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
7845 * server.h: Include gdb_vecs.h.
7847 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7849 * Makefile.in (SFILES): Append common/common-regcache.c.
7850 (OBS): Append common-regcache.o.
7851 (common-regcache.o): New rule.
7852 * regcache.c (init_register_cache): Initialize cache to
7854 (regcache_raw_read_unsigned): New function.
7855 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
7856 register_status enum.
7858 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7860 * linux-aarch64-low.c (the_low_targets): Rename
7861 breakpoint_reinsert_addr to get_next_pcs.
7862 * linux-arm-low.c (the_low_targets): Likewise.
7863 * linux-bfin-low.c (the_low_targets): Likewise.
7864 * linux-cris-low.c (the_low_targets): Likewise.
7865 * linux-crisv32-low.c (the_low_targets): Likewise.
7866 * linux-low.c (can_software_single_step): Likewise.
7867 (install_software_single_step_breakpoints): New function.
7868 (start_step_over): Use install_software_single_step_breakpoints.
7869 * linux-low.h: New CORE_ADDR vector.
7870 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
7872 * linux-mips-low.c (the_low_targets): Likewise.
7873 * linux-nios2-low.c (the_low_targets): Likewise.
7874 * linux-sparc-low.c (the_low_targets): Likewise.
7876 2015-12-17 Pedro Alves <palves@redhat.com>
7878 * linux-low.c (linux_kill_one_lwp): Remove references to
7880 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
7882 (linux_init_signals): Delete.
7883 (initialize_low): Adjust.
7884 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
7886 2015-12-16 Pedro Alves <palves@redhat.com>
7888 * configure.ac (compiler warning flags): When testing a
7889 -Wno-foo option, check whether -Wfoo works instead.
7890 * configure: Regenerate.
7892 2015-12-11 Don Breazeal <donb@codesourcery.com>
7894 * server.c (process_serial_event): Don't exit from gdbserver
7895 in remote mode if there are still active inferiors.
7897 2015-12-11 Yao Qi <yao.qi@linaro.org>
7899 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
7900 arm_breakpoint_at if the process is 32-bit.
7902 2015-12-11 Yao Qi <yao.qi@linaro.org>
7904 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
7907 2015-12-07 Yao Qi <yao.qi@linaro.org>
7909 * configure.srv: Append arm.o to srv_tgtobj for
7910 aarch64*-*-linux* target.
7911 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
7912 from linux-arm-low.c.
7913 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7914 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7915 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7916 (thumb2_breakpoint_len): Likewise.
7917 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
7918 (arm_breakpoint_kinds): Likewise.
7919 (arm_breakpoint_kind_from_pc): Likewise.
7920 (arm_sw_breakpoint_from_kind): Likewise.
7921 (arm_breakpoint_kind_from_current_state): Likewise.
7922 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
7923 (arm_sw_breakpoint_from_kind): Declare.
7924 (arm_breakpoint_kind_from_current_state): Declare.
7925 (arm_breakpoint_at): Declare.
7926 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
7927 arm_sw_breakpoint_from_kind if process is 32-bit.
7928 (aarch64_breakpoint_kind_from_pc): New function.
7929 (aarch64_breakpoint_kind_from_current_state): New function.
7930 (the_low_target): Initialize fields breakpoint_kind_from_pc
7931 and breakpoint_kind_from_current_state.
7932 * linux-arm-low.c (arm_breakpoint_kinds): Move to
7933 linux-aarch32-low.c.
7934 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
7935 (arm_breakpoint, arm_breakpoint_len): Likewise.
7936 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
7937 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7938 (arm_is_thumb_mode): Likewise.
7939 (arm_breakpoint_at): Likewise.
7940 (arm_breakpoint_kind_from_pc): Likewise.
7941 (arm_sw_breakpoint_from_kind): Likewise.
7942 (arm_breakpoint_kind_from_current_state): Likewise.
7945 2015-08-04 Yao Qi <yao.qi@linaro.org>
7947 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7948 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7949 * server.c (extended_protocol): Remove "static".
7950 * server.h (extended_protocol): Declare it.
7952 2015-12-04 Josh Stone <jistone@redhat.com>
7954 * target.h (struct target_ops) <arch_setup>: Rename to ...
7955 (struct target_ops) <post_create_inferior>: ... this.
7956 (target_arch_setup): Rename to ...
7957 (target_post_create_inferior): ... this, calling post_create_inferior.
7958 * server.c (start_inferior): Update target_arch_setup calls to
7959 target_post_create_inferior.
7960 * linux-low.c (linux_low_ptrace_options): Forward declare.
7961 (linux_arch_setup): Update its comment for general use.
7962 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
7963 (struct linux_target_ops): Use linux_post_create_inferior.
7964 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
7965 to post_create_inferior.
7966 * nto-low.c (struct nto_target_ops): Likewise.
7967 * spu-low.c (struct spu_target_ops): Likewise.
7968 * win32-low.c (struct win32_target_ops): Likewise.
7970 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
7972 * linux-arm-low.c: Remove duplicate arch/arm.h include.
7974 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7976 * linux-arm-low.c (arm_reinsert_addr): Remove function.
7977 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
7978 * linux-cris-low.c (cris_reinsert_addr> Remove function.
7979 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7980 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
7981 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7982 * linux-mips-low.c (mips_reinsert_addr): Remove function.
7983 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7984 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
7985 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7986 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
7987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7989 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7991 * linux-low.c (linux_look_up_symbols): Don't call
7992 linux_supports_traceclone.
7993 * linux-low.h (thread_db_init): Remove use_events argument.
7994 * thread-db.c (thread_db_use_event): Remove global variable.
7995 (struct thread_db) <td_thr_event_enable_p>: Remove field.
7996 (struct thread_db) <td_create_bp>: Remove field.
7997 (thread_db_create_event): Remove function.
7998 (thread_db_enable_reporting): Likewise.
7999 (find_one_thread): Don't check for thread_db_use_events.
8000 (attach_thread): Likewise.
8001 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8002 (try_thread_db_load_1): Don't check for thread_db_use_events.
8003 (thread_db_init): Remove use_events argument and thread events
8005 (remove_thread_event_breakpoints): Remove function.
8006 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8008 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8010 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8012 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8013 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8014 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8015 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8016 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8018 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8020 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8021 * linux-low.c (can_hardware_single_step): Use
8022 supports_hardware_single_step.
8023 (can_software_single_step): New function.
8024 (start_step_over): Call can_software_single_step.
8025 (linux_supports_hardware_single_step): New function.
8026 (struct target_ops) <supports_software_single_step>: Initialize.
8027 * linux-low.h (struct linux_target_ops)
8028 <supports_hardware_single_step>: Initialize.
8029 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8030 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8031 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8032 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8033 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8035 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8036 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8037 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8038 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8040 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8041 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8043 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8044 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8045 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8048 * target.h (struct target_ops): <supports_software_single_step>:
8050 (target_supports_software_single_step): New macro.
8052 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8054 * linux-low.c (linux_wait_1): Fix pc advance condition.
8055 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8056 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8058 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8060 * linux-arm-low.c (arm_is_thumb_mode): New function.
8061 (arm_breakpoint_at): Use arm_is_thumb_mode.
8062 (arm_breakpoint_kind_from_current_state): New function.
8063 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8065 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8066 (linux_breakpoint_kind_from_current_state): New function.
8067 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8068 * linux-low.h (struct linux_target_ops)
8069 <breakpoint_kind_from_current_state>: New field.
8070 * target.h (struct target_ops): Likewise.
8071 (target_breakpoint_kind_from_current_state): New macro.
8073 2015-11-30 Pedro Alves <palves@redhat.com>
8075 * linux-low.c (linux_resume): Wake up the event loop before
8078 2015-11-30 Pedro Alves <palves@redhat.com>
8080 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8082 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8084 * target.c (struct thread_search): New structure.
8085 (thread_search_callback): New function.
8086 (prev_general_thread): New global.
8087 (prepare_to_access_memory, done_accessing_memory): New functions.
8088 * target.h (prepare_to_access_memory, done_accessing_memory):
8089 Replace macros with function declarations.
8091 2015-11-30 Pedro Alves <palves@redhat.com>
8094 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8095 report TARGET_WAITKIND_NO_RESUMED.
8096 * remote-utils.c (prepare_resume_reply): Handle
8097 TARGET_WAITKIND_NO_RESUMED.
8098 * server.c (report_no_resumed): New global.
8099 (handle_query) <qSupported>: Handle "no-resumed+". Report
8100 "no-resumed+" support.
8101 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8102 return error if the client doesn't support no-resumed events.
8103 (push_stop_notification): New function.
8104 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8105 events if the client supports them.
8107 2015-11-30 Pedro Alves <palves@redhat.com>
8109 * linux-low.c (thread_still_has_status_pending_p): Don't check
8111 (lwp_resumed): New function.
8112 (status_pending_p_callback): Return early if the LWP is not
8113 supposed to be resumed.
8115 2015-11-30 Pedro Alves <palves@redhat.com>
8117 * linux-low.c (handle_extended_wait): Assert that the LWP's
8118 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8119 thread create events, leave the new child's status pending.
8120 (linux_low_filter_event): If GDB wants to hear about thread exit
8121 events, leave the LWP marked dead and don't delete it.
8122 (linux_wait_for_event_filtered): Don't check for thread exit.
8123 (filter_exit_event): New function.
8124 (linux_wait_1): Use it, when returning an exit event.
8125 (linux_resume_one_lwp_throw): Assert that the LWP's
8126 waitstatus is TARGET_WAITKIND_IGNORE.
8127 * remote-utils.c (prepare_resume_reply): Handle
8128 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8129 * server.c (report_thread_events): New global.
8130 (handle_general_set): Handle QThreadEvents.
8131 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8132 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8133 TARGET_WAITKIND_THREAD_EXITED.
8134 * server.h (report_thread_events): Declare.
8136 2015-11-30 Pedro Alves <palves@redhat.com>
8138 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8139 the thread's last_resume_kind was resume_stop.
8141 2015-11-30 Pedro Alves <palves@redhat.com>
8143 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8146 2015-11-30 Pedro Alves <palves@redhat.com>
8148 * server.c (handle_v_requests): Handle vCtrlC.
8150 2015-11-30 Pedro Alves <palves@redhat.com>
8152 * gdbthread.h (find_any_thread_of_pid): Declare.
8153 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8155 * server.c (handle_query): If current_thread is NULL, look for
8156 another thread of the selected process.
8158 2015-11-26 Daniel Colascione <dancol@dancol.org>
8159 Simon Marchi <simon.marchi@ericsson.com>
8161 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8162 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8164 * target.h (struct target_ops) <thread_name>: New field.
8165 (target_thread_name): New macro.
8167 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8169 * regcache.h (regcache_invalidate_pid): Add declaration.
8170 * regcache.c (regcache_invalidate_pid): New function, extracted
8171 from regcache_invalidate.
8172 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8173 Add trivial documentation comment.
8174 * lynx-low.c: Use regcache_invalidate_pid instead of
8175 regcache_invalidate.
8177 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8179 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8180 and Elf64_auxv_t if the target is Android.
8182 2015-11-22 Doug Evans <xdje42@gmail.com>
8184 * target.h: #include <sys/types.h>.
8186 2015-11-19 Pedro Alves <palves@redhat.com>
8188 * linux-low.c (linux_process_qsupported): Change prototype.
8190 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8192 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8193 and adjust to loop over all features.
8194 * server.c (handle_query) <qSupported>: Adjust to call
8195 target_process_qsupported once, passing it a vector of unprocessed
8197 * target.h (struct target_ops) <process_qsupported>: Change
8199 (target_process_qsupported): Adjust.
8201 2015-11-19 Pedro Alves <palves@redhat.com>
8203 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8205 * configure: Regenerate.
8207 2015-11-19 Pedro Alves <palves@redhat.com>
8209 * configure: Regenerate.
8211 2015-11-19 Yao Qi <yao.qi@linaro.org>
8213 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8216 2015-11-19 Yao Qi <yao.qi@linaro.org>
8218 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8219 (struct aarch64_operand): Move enum out.
8221 2015-11-19 Yao Qi <yao.qi@linaro.org>
8223 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8224 struct user_fpsimd_state *.
8225 (aarch64_store_fpregset): Likewise.
8227 2015-11-19 Yao Qi <yao.qi@linaro.org>
8229 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8230 struct user_pt_regs *.
8231 (aarch64_store_gregset): Likewise.
8233 2015-11-18 Pedro Alves <palves@redhat.com>
8235 * Makefile.in (all_object_files): Add $IPA_OBJS.
8237 2015-11-17 Pedro Alves <palves@redhat.com>
8239 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8240 GDB_SIGNAL_0 and gdb_signal_to_string.
8242 2015-11-17 Pedro Alves <palves@redhat.com>
8244 * win32-low.c (handle_output_debug_string): Remove parameter.
8245 (win32_kill): Remove our_status local and adjust call to
8246 handle_output_debug_string.
8247 (get_child_debug_event): Adjust call to
8248 handle_output_debug_string.
8250 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8252 * linux-mips-low.c (mips_fill_gregset): Add cast.
8253 (mips_store_gregset): Likewise.
8254 (mips_fill_fpregset): Likewise.
8255 (mips_store_fpregset): Likewise.
8257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8259 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8262 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8264 * linux-mips-low.c (mips_linux_new_thread): Change type of
8265 watch_type to enum target_hw_bp_type.
8267 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8269 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8270 Change return type to arm_hwbp_type.
8272 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8274 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8275 (arm_store_gregset): Likewise.
8276 * linux-arm-low.c (arm_get_hwcap): Likewise.
8277 (arm_read_description): Likewise.
8279 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8281 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8283 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8285 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8286 (ppc_fill_vsxregset): Likewise.
8287 (ppc_store_vsxregset): Likewise.
8288 (ppc_fill_vrregset): Likewise.
8289 (ppc_store_vrregset): Likewise.
8290 (ppc_fill_evrregset): Likewise.
8291 (ppc_store_evrregset): Likewise.
8293 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8295 * linux-ppc-low.c (ppc_usrregs_info): Remove
8296 forward-declaration.
8297 (ppc_arch_setup): Move lower in file.
8299 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8301 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8302 (ps_pdwrite): Likewise.
8304 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8306 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8307 to after assert checks.
8309 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8311 * proc-service.c (ps_pdread): Add/adjust casts.
8312 (ps_pdwrite): Add/adjust casts.
8314 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8316 * server.c (handle_search_memory_1): Cast return value of
8319 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8321 * server.c (write_qxfer_response): Change type of data to
8324 2015-10-29 Pedro Alves <palves@redhat.com>
8326 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8328 2015-10-29 Pedro Alves <palves@redhat.com>
8330 * tracepoint.c (clear_installed_tracepoints): Add casts.
8332 2015-10-29 Pedro Alves <palves@redhat.com>
8334 * server.c (handle_v_cont, process_serial_event): Add enum
8335 gdb_signal casts to signal parsing code.
8337 2015-10-29 Pedro Alves <palves@redhat.com>
8339 * linux-low.h (NULL_REGSET): Define.
8340 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8341 * linux-arm-low.c (arm_regsets): Likewise.
8342 * linux-crisv32-low.c (cris_regsets): Likewise.
8343 * linux-m68k-low.c (m68k_regsets): Likewise.
8344 * linux-mips-low.c (mips_regsets): Likewise.
8345 * linux-nios2-low.c (nios2_regsets): Likewise.
8346 * linux-ppc-low.c (ppc_regsets): Likewise.
8347 * linux-s390-low.c (s390_regsets): Likewise.
8348 * linux-sh-low.c (sh_regsets): Likewise.
8349 * linux-sparc-low.c (sparc_regsets): Likewise.
8350 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8351 * linux-tile-low.c (tile_regsets): Likewise.
8352 * linux-x86-low.c (x86_regsets): Likewise.
8353 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8355 2015-10-29 Pedro Alves <palves@redhat.com>
8357 * linux-low.h (NULL_REGSET): Define.
8358 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8359 * linux-arm-low.c (arm_regsets): Likewise.
8360 * linux-crisv32-low.c (cris_regsets): Likewise.
8361 * linux-m68k-low.c (m68k_regsets): Likewise.
8362 * linux-mips-low.c (mips_regsets): Likewise.
8363 * linux-nios2-low.c (nios2_regsets): Likewise.
8364 * linux-ppc-low.c (ppc_regsets): Likewise.
8365 * linux-s390-low.c (s390_regsets): Likewise.
8366 * linux-sh-low.c (sh_regsets): Likewise.
8367 * linux-sparc-low.c (sparc_regsets): Likewise.
8368 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8369 * linux-tile-low.c (tile_regsets): Likewise.
8370 * linux-x86-low.c (x86_regsets): Likewise.
8371 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8373 2015-10-26 Doug Evans <dje@google.com>
8375 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8377 2015-10-26 Doug Evans <dje@google.com>
8379 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8381 2015-10-26 Doug Evans <dje@google.com>
8383 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8385 (attach_thread, find_new_threads_callback): Ditto.
8387 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8389 * mem-break.h (set_breakpoint_data): Remove.
8391 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8393 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8394 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8395 (initialize_low): Remove set_breakpoint_data call.
8396 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8397 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8398 (initialize_low): Remove set_breakpoint_data call.
8399 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8400 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8401 (initialize_low): Remove set_breakpoint_data call.
8403 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8405 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8406 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8407 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8408 * target.h (target_breakpoint_kind_from_pc): New macro.
8410 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8412 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8413 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8414 the default breakpoint kind.
8416 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8418 * linux-arm-low.c (arm_supports_z_point_type): Add software
8421 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8423 * linux-arm-low.c: Refactor breakpoint definitions.
8424 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8425 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8427 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8429 * Makefile.in: Add arm.c/o.
8430 * configure.srv: Likewise.
8431 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8432 (arm_breakpoint_kind_from_pc): New function.
8433 (arm_sw_breakpoint_from_kind): Return proper kind.
8434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8436 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8438 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8440 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8441 (struct raw_breakpoint) <size>: Remove.
8442 (struct raw_breakpoint) <kind>: Add.
8443 (bp_size): New function.
8444 (bp_opcode): Likewise.
8445 (find_raw_breakpoint_at): Adjust for kind.
8446 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8447 (remove_memory_breakpoint): Adjust for kind call bp_size.
8448 (set_raw_breakpoint_at): Adjust for kind.
8449 (set_breakpoint): Likewise.
8450 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8451 (delete_raw_breakpoint): Adjust for kind.
8452 (delete_breakpoint): Likewise.
8453 (find_gdb_breakpoint): Likewise.
8454 (set_gdb_breakpoint_1): Likewise.
8455 (set_gdb_breakpoint): Likewise.
8456 (delete_gdb_breakpoint_1): Likewise.
8457 (delete_gdb_breakpoint): Likewise.
8458 (uninsert_raw_breakpoint): Likewise.
8459 (reinsert_raw_breakpoint): Likewise.
8460 (set_breakpoint_data): Remove.
8461 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8462 (check_mem_read): Adjust for kind call bp_size.
8463 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8464 (clone_one_breakpoint): Adjust for kind.
8465 * mem-break.h (set_gdb_breakpoint): Likewise.
8466 (delete_gdb_breakpoint): Likewise.
8467 * server.c (process_serial_event): Likewise.
8469 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8471 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8472 (struct linux_target_ops) <breakpoint>: Remove.
8473 (struct linux_target_ops) <breakpoint_len>: Remove.
8474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8476 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8477 (arm_sw_breakpoint_from_kind): New function.
8478 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8479 (struct linux_target_ops) <breakpoint>: Remove.
8480 (struct linux_target_ops) <breakpoint_len>: Remove.
8481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8483 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8484 (struct linux_target_ops) <breakpoint>: Remove.
8485 (struct linux_target_ops) <breakpoint_len>: Remove.
8486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8488 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8489 (struct linux_target_ops) <breakpoint>: Remove.
8490 (struct linux_target_ops) <breakpoint_len>: Remove.
8491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8493 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8494 and sw_breakpoint_from_kind to increment the pc.
8495 (linux_breakpoint_kind_from_pc): New function.
8496 (linux_sw_breakpoint_from_kind): New function.
8497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8498 (initialize_low): Call breakpoint_kind_from_pc and
8499 sw_breakpoint_from_kind to replace breakpoint_data/len.
8500 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8503 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8504 (struct linux_target_ops) <breakpoint>: Remove.
8505 (struct linux_target_ops) <breakpoint_len>: Remove.
8506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8508 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8509 (struct linux_target_ops) <breakpoint>: Remove.
8510 (struct linux_target_ops) <breakpoint_len>: Remove.
8511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8513 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8514 (struct linux_target_ops) <breakpoint>: Remove.
8515 (struct linux_target_ops) <breakpoint_len>: Remove.
8516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8518 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8519 (struct linux_target_ops) <breakpoint>: Remove.
8520 (struct linux_target_ops) <breakpoint_len>: Remove.
8521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8523 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8524 (struct linux_target_ops) <breakpoint>: Remove.
8525 (struct linux_target_ops) <breakpoint_len>: Remove.
8526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8528 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8529 (struct linux_target_ops) <breakpoint>: Remove.
8530 (struct linux_target_ops) <breakpoint_len>: Remove.
8531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8533 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8534 (struct linux_target_ops) <breakpoint>: Remove.
8535 (struct linux_target_ops) <breakpoint_len>: Remove.
8536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8538 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8539 (struct linux_target_ops) <breakpoint>: Remove.
8540 (struct linux_target_ops) <breakpoint_len>: Remove.
8541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8543 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8544 (struct linux_target_ops) <breakpoint>: Remove.
8545 (struct linux_target_ops) <breakpoint_len>: Remove.
8546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8548 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8549 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8550 (struct linux_target_ops) <breakpoint>: Remove.
8551 (struct linux_target_ops) <breakpoint_len>: Remove.
8552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8554 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8555 (struct linux_target_ops) <breakpoint>: Remove.
8556 (struct linux_target_ops) <breakpoint_len>: Remove.
8557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8560 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8562 * linux-cris-low.c (cris_get_pc): Remove void arg.
8564 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8566 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8569 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8571 * inferiors.c (thread_pid_matches_callback): New function.
8572 (find_thread_process): New function.
8573 (remove_thread): Reset current_thread.
8574 (remove_process): Assert threads have been removed first.
8576 2015-10-15 Yao Qi <yao.qi@linaro.org>
8578 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8580 (aarch64_remove_point): Likewise.
8581 * regcache.c (regcache_register_size): New function.
8583 2015-10-12 Yao Qi <yao.qi@linaro.org>
8585 * linux-aarch64-low.c: Update all callers as emit_load_store
8586 is renamed to aarch64_emit_load_store.
8588 2015-10-12 Yao Qi <yao.qi@linaro.org>
8590 * linux-aarch64-low.c: Update all callers of function renaming
8591 from emit_insn to aarch64_emit_insn.
8593 2015-10-12 Yao Qi <yao.qi@linaro.org>
8595 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8596 arch/aarch64-insn.h.
8597 (struct aarch64_memory_operand): Likewise.
8599 (emit_insn): Move to arch/aarch64-insn.c.
8600 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8601 (emit_load_store): Move to arch/aarch64-insn.c.
8602 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8603 (can_encode_int32): Remove.
8605 2015-10-12 Yao Qi <yao.qi@linaro.org>
8607 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8608 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8609 (aarch64_relocate_instruction): Likewise.
8610 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8611 (struct aarch64_insn_visitor): Likewise.
8613 2015-10-12 Yao Qi <yao.qi@linaro.org>
8615 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8616 (struct aarch64_insn_visitor): New.
8617 (struct aarch64_insn_relocation_data): New.
8618 (aarch64_ftrace_insn_reloc_b): New function.
8619 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8620 (aarch64_ftrace_insn_reloc_cb): Likewise.
8621 (aarch64_ftrace_insn_reloc_tb): Likewise.
8622 (aarch64_ftrace_insn_reloc_adr): Likewise.
8623 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8624 (aarch64_ftrace_insn_reloc_others): Likewise.
8626 (aarch64_relocate_instruction): Use visitor.
8628 2015-10-12 Yao Qi <yao.qi@linaro.org>
8630 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8631 int. Add argument buf.
8632 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8633 aarch64_relocate_instruction.
8635 2015-10-12 Yao Qi <yao.qi@linaro.org>
8637 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8638 argument insn. Remove local variable insn. Don't call
8640 (aarch64_install_fast_tracepoint_jump_pad): Call
8643 2015-09-30 Yao Qi <yao.qi@linaro.org>
8645 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8646 (emit_load_store_pair): Likewise.
8648 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8650 * dll.c (match_dll): Add cast(s).
8651 (unloaded_dll): Likewise.
8652 * linux-low.c (second_thread_of_pid_p): Likewise.
8653 (delete_lwp_callback): Likewise.
8654 (count_events_callback): Likewise.
8655 (select_event_lwp_callback): Likewise.
8656 (linux_set_resume_request): Likewise.
8657 * server.c (accumulate_file_name_length): Likewise.
8658 (emit_dll_description): Likewise.
8659 (handle_qxfer_threads_worker): Likewise.
8660 (visit_actioned_threads): Likewise.
8661 * thread-db.c (any_thread_of): Likewise.
8662 * tracepoint.c (same_process_p): Likewise.
8663 (match_blocktype): Likewise.
8664 (build_traceframe_info_xml): Likewise.
8666 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8668 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
8670 (gdb_unparse_agent_expr): Likewise.
8671 * hostio.c (require_data): Likewise.
8672 (handle_pread): Likewise.
8673 * linux-low.c (disable_regset): Likewise.
8674 (fetch_register): Likewise.
8675 (store_register): Likewise.
8676 (get_dynamic): Likewise.
8677 (linux_qxfer_libraries_svr4): Likewise.
8678 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
8679 (set_fast_tracepoint_jump): Likewise.
8680 (uninsert_fast_tracepoint_jumps_at): Likewise.
8681 (reinsert_fast_tracepoint_jumps_at): Likewise.
8682 (validate_inserted_breakpoint): Likewise.
8683 (clone_agent_expr): Likewise.
8684 * regcache.c (init_register_cache): Likewise.
8685 * remote-utils.c (putpkt_binary_1): Likewise.
8686 (decode_M_packet): Likewise.
8687 (decode_X_packet): Likewise.
8688 (look_up_one_symbol): Likewise.
8689 (relocate_instruction): Likewise.
8690 (monitor_output): Likewise.
8691 * server.c (handle_search_memory): Likewise.
8692 (handle_qxfer_exec_file): Likewise.
8693 (handle_qxfer_libraries): Likewise.
8694 (handle_qxfer): Likewise.
8695 (handle_query): Likewise.
8696 (handle_v_cont): Likewise.
8697 (handle_v_run): Likewise.
8698 (captured_main): Likewise.
8699 * target.c (write_inferior_memory): Likewise.
8700 * thread-db.c (try_thread_db_load_from_dir): Likewise.
8701 * tracepoint.c (init_trace_buffer): Likewise.
8702 (add_tracepoint_action): Likewise.
8703 (add_traceframe): Likewise.
8704 (add_traceframe_block): Likewise.
8705 (cmd_qtdpsrc): Likewise.
8706 (cmd_qtdv): Likewise.
8707 (cmd_qtstatus): Likewise.
8708 (response_source): Likewise.
8709 (response_tsv): Likewise.
8710 (cmd_qtnotes): Likewise.
8711 (gdb_collect): Likewise.
8712 (initialize_tracepoint): Likewise.
8714 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8716 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
8717 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
8718 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
8720 (enum aarch64_condition_codes): New enum.
8721 (w0): New static global.
8724 (struct aarch64_memory_operand) <type>: New
8725 MEMORY_OPERAND_POSTINDEX type.
8726 (postindex_memory_operand): New helper function.
8727 (emit_ret): New function.
8728 (emit_load_store_pair): New function, factored out of emit_stp
8729 with support for MEMORY_OPERAND_POSTINDEX.
8730 (emit_stp): Rewrite using emit_load_store_pair.
8731 (emit_ldp): New function.
8732 (emit_load_store): Likewise.
8733 (emit_ldr): Mention post-index instruction in comment.
8734 (emit_ldrh): New function.
8735 (emit_ldrb): New function.
8736 (emit_ldrsw): Mention post-index instruction in comment.
8737 (emit_str): Likewise.
8738 (emit_subs): New function.
8739 (emit_cmp): Likewise.
8740 (emit_and): Likewise.
8741 (emit_orr): Likewise.
8742 (emit_orn): Likewise.
8743 (emit_eor): Likewise.
8744 (emit_mvn): Likewise.
8745 (emit_lslv): Likewise.
8746 (emit_lsrv): Likewise.
8747 (emit_asrv): Likewise.
8748 (emit_mul): Likewise.
8749 (emit_sbfm): Likewise.
8750 (emit_sbfx): Likewise.
8751 (emit_ubfm): Likewise.
8752 (emit_ubfx): Likewise.
8753 (emit_csinc): Likewise.
8754 (emit_cset): Likewise.
8755 (emit_nop): Likewise.
8756 (emit_ops_insns): New helper function.
8757 (emit_pop): Likewise.
8758 (emit_push): Likewise.
8759 (aarch64_emit_prologue): New function.
8760 (aarch64_emit_epilogue): Likewise.
8761 (aarch64_emit_add): Likewise.
8762 (aarch64_emit_sub): Likewise.
8763 (aarch64_emit_mul): Likewise.
8764 (aarch64_emit_lsh): Likewise.
8765 (aarch64_emit_rsh_signed): Likewise.
8766 (aarch64_emit_rsh_unsigned): Likewise.
8767 (aarch64_emit_ext): Likewise.
8768 (aarch64_emit_log_not): Likewise.
8769 (aarch64_emit_bit_and): Likewise.
8770 (aarch64_emit_bit_or): Likewise.
8771 (aarch64_emit_bit_xor): Likewise.
8772 (aarch64_emit_bit_not): Likewise.
8773 (aarch64_emit_equal): Likewise.
8774 (aarch64_emit_less_signed): Likewise.
8775 (aarch64_emit_less_unsigned): Likewise.
8776 (aarch64_emit_ref): Likewise.
8777 (aarch64_emit_if_goto): Likewise.
8778 (aarch64_emit_goto): Likewise.
8779 (aarch64_write_goto_address): Likewise.
8780 (aarch64_emit_const): Likewise.
8781 (aarch64_emit_call): Likewise.
8782 (aarch64_emit_reg): Likewise.
8783 (aarch64_emit_pop): Likewise.
8784 (aarch64_emit_stack_flush): Likewise.
8785 (aarch64_emit_zero_ext): Likewise.
8786 (aarch64_emit_swap): Likewise.
8787 (aarch64_emit_stack_adjust): Likewise.
8788 (aarch64_emit_int_call_1): Likewise.
8789 (aarch64_emit_void_call_2): Likewise.
8790 (aarch64_emit_eq_goto): Likewise.
8791 (aarch64_emit_ne_goto): Likewise.
8792 (aarch64_emit_lt_goto): Likewise.
8793 (aarch64_emit_le_goto): Likewise.
8794 (aarch64_emit_gt_goto): Likewise.
8795 (aarch64_emit_ge_got): Likewise.
8796 (aarch64_emit_ops_impl): New static global variable.
8797 (aarch64_emit_ops): New target function, return
8798 &aarch64_emit_ops_impl.
8799 (struct linux_target_ops): Install it.
8801 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8803 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
8804 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
8806 * linux-aarch64-ipa.c: New file.
8807 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
8809 (aarch64_get_thread_area): New target method.
8810 (extract_signed_bitfield): New helper function.
8811 (aarch64_decode_ldr_literal): New function.
8812 (enum aarch64_opcodes): New enum.
8813 (struct aarch64_register): New struct.
8814 (struct aarch64_operand): New struct.
8815 (x0): New static global.
8824 (aarch64_register): New helper function.
8825 (register_operand): Likewise.
8826 (immediate_operand): Likewise.
8827 (struct aarch64_memory_operand): New struct.
8828 (offset_memory_operand): New helper function.
8829 (preindex_memory_operand): Likewise.
8830 (enum aarch64_system_control_registers): New enum.
8831 (ENCODE): New macro.
8832 (emit_insn): New helper function.
8833 (emit_b): New function.
8834 (emit_bcond): Likewise.
8835 (emit_cb): Likewise.
8836 (emit_tb): Likewise.
8837 (emit_blr): Likewise.
8838 (emit_stp): Likewise.
8839 (emit_ldp_q_offset): Likewise.
8840 (emit_stp_q_offset): Likewise.
8841 (emit_load_store): Likewise.
8842 (emit_ldr): Likewise.
8843 (emit_ldrsw): Likewise.
8844 (emit_str): Likewise.
8845 (emit_ldaxr): Likewise.
8846 (emit_stxr): Likewise.
8847 (emit_stlr): Likewise.
8848 (emit_data_processing_reg): Likewise.
8849 (emit_data_processing): Likewise.
8850 (emit_add): Likewise.
8851 (emit_sub): Likewise.
8852 (emit_mov): Likewise.
8853 (emit_movk): Likewise.
8854 (emit_mov_addr): Likewise.
8855 (emit_mrs): Likewise.
8856 (emit_msr): Likewise.
8857 (emit_sevl): Likewise.
8858 (emit_wfe): Likewise.
8859 (append_insns): Likewise.
8860 (can_encode_int32_in): New helper function.
8861 (aarch64_relocate_instruction): New function.
8862 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
8863 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
8864 (struct linux_target_ops): Install aarch64_get_thread_area,
8865 aarch64_install_fast_tracepoint_jump_pad and
8866 aarch64_get_min_fast_tracepoint_insn_len.
8868 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8870 * Makefile.in (aarch64-insn.o): New rule.
8871 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
8873 2015-09-21 Yao Qi <yao.qi@linaro.org>
8875 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
8877 2015-09-21 Yao Qi <yao.qi@linaro.org>
8879 * tracepoint.c (max_jump_pad_size): Remove.
8881 2015-09-18 Yao Qi <yao.qi@linaro.org>
8883 * linux-aarch64-low.c: Don't include sys/uio.h.
8884 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
8886 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
8888 * tracepoint.c (eval_result_type): Change prototype.
8889 (condition_true_at_tracepoint): Fix argument to compiled_cond.
8891 2015-09-15 Pedro Alves <palves@redhat.com>
8893 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
8894 Check whether to report exec events instead of checking whether
8895 multiprocess is enabled.
8897 2015-09-15 Pedro Alves <palves@redhat.com>
8900 * remote-utils.c (prepare_resume_reply): Merge
8901 TARGET_WAITKIND_VFORK_DONE switch case with the
8902 TARGET_WAITKIND_FORKED case.
8904 2015-09-15 Yao Qi <yao.qi@linaro.org>
8906 * server.c (handle_query): Check string comparison using
8907 "else if" instead of "if".
8909 2015-09-15 Yao Qi <yao.qi@linaro.org>
8911 * server.c (vCont_supported): New global variable.
8912 (handle_query): Set vCont_supported to 1 if "vContSupported+"
8913 matches. Append ";vContSupported+" to own_buf.
8914 (handle_v_requests): Append ";s;S" to own_buf if target supports
8915 hardware single step or vCont_supported is false.
8916 (capture_main): Set vCont_supported to zero.
8918 2015-09-15 Yao Qi <yao.qi@linaro.org>
8920 * linux-low.c (linux_supports_conditional_breakpoints): Rename
8922 (linux_supports_hardware_single_step): ... New function.
8923 (linux_target_ops): Update.
8924 * lynx-low.c (lynx_target_ops): Set field
8925 supports_hardware_single_step to target_can_do_hardware_single_step.
8926 * nto-low.c (nto_target_ops): Likewise.
8927 * spu-low.c (spu_target_ops): Likewise.
8928 * win32-low.c (win32_target_ops): Likewise.
8929 * target.c (target_can_do_hardware_single_step): New function.
8930 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8931 Remove. <supports_hardware_single_step>: New field.
8932 (target_supports_conditional_breakpoints): Remove.
8933 (target_supports_hardware_single_step): New macro.
8934 (target_can_do_hardware_single_step): Declare.
8935 * server.c (handle_query): Use target_supports_hardware_single_step
8936 instead of target_supports_conditional_breakpoints.
8938 2015-09-15 Yao Qi <yao.qi@linaro.org>
8940 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
8942 (struct linux_target_ops the_low_target): Install
8943 aarch64_linux_siginfo_fixup.
8945 2015-09-11 Don Breazeal <donb@codesourcery.com>
8946 Luis Machado <lgustavo@codesourcery.com>
8948 * linux-low.c (linux_mourn): Static declaration.
8949 (linux_arch_setup): Move in front of
8950 handle_extended_wait.
8951 (linux_arch_setup_thread): New function.
8952 (handle_extended_wait): Handle exec events. Call
8953 linux_arch_setup_thread. Make event_lwp argument a
8954 pointer-to-a-pointer.
8955 (check_zombie_leaders): Do not check stopped threads.
8956 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
8957 (linux_low_filter_event): Add lwp and thread for exec'ing
8958 non-leader thread if leader thread has been deleted.
8959 Refactor code into linux_arch_setup_thread and call it.
8960 Pass child lwp pointer by reference to handle_extended_wait.
8961 (linux_wait_for_event_filtered): Update comment.
8962 (linux_wait_1): Prevent clobbering exec event status.
8963 (linux_supports_exec_events): New function.
8964 (linux_target_ops) <supports_exec_events>: Initialize new member.
8965 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
8967 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
8968 * server.c (report_exec_events): New global variable.
8969 (handle_query): Handle qSupported query for exec-events feature.
8970 (captured_main): Initialize report_exec_events.
8971 * server.h (report_exec_events): Declare new global variable.
8972 * target.h (struct target_ops) <supports_exec_events>: New
8974 (target_supports_exec_events): New macro.
8975 * win32-low.c (win32_target_ops) <supports_exec_events>:
8976 Initialize new member.
8978 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
8980 * linux-low.c (linux_low_enable_btrace): Remove.
8981 (linux_target_ops): Replace linux_low_enable_btrace with
8982 linux_enable_btrace.
8984 2015-09-03 Yao Qi <yao.qi@linaro.org>
8986 * linux-aarch64-low.c (aarch64_insert_point): Call
8987 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
8990 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8992 * linux-low.c (check_stopped_by_breakpoint): Use
8993 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
8995 2015-08-27 Pedro Alves <palves@redhat.com>
8997 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
8999 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9001 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9002 the XNEW-family equivalent.
9003 (compile_bytecodes): Likewise.
9004 * dll.c (loaded_dll): Likewise.
9005 * event-loop.c (append_callback_event): Likewise.
9006 (create_file_handler): Likewise.
9007 (create_file_event): Likewise.
9008 * hostio.c (handle_open): Likewise.
9009 * inferiors.c (add_thread): Likewise.
9010 (add_process): Likewise.
9011 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9012 * linux-arm-low.c (arm_new_process): Likewise.
9013 (arm_new_thread): Likewise.
9014 * linux-low.c (add_to_pid_list): Likewise.
9015 (linux_add_process): Likewise.
9016 (handle_extended_wait): Likewise.
9017 (add_lwp): Likewise.
9018 (enqueue_one_deferred_signal): Likewise.
9019 (enqueue_pending_signal): Likewise.
9020 (linux_resume_one_lwp_throw): Likewise.
9021 (linux_resume_one_thread): Likewise.
9022 (linux_read_memory): Likewise.
9023 (linux_write_memory): Likewise.
9024 * linux-mips-low.c (mips_linux_new_process): Likewise.
9025 (mips_linux_new_thread): Likewise.
9026 (mips_add_watchpoint): Likewise.
9027 * linux-x86-low.c (initialize_low_arch): Likewise.
9028 * lynx-low.c (lynx_add_process): Likewise.
9029 * mem-break.c (set_raw_breakpoint_at): Likewise.
9030 (set_breakpoint): Likewise.
9031 (add_condition_to_breakpoint): Likewise.
9032 (add_commands_to_breakpoint): Likewise.
9033 (clone_agent_expr): Likewise.
9034 (clone_one_breakpoint): Likewise.
9035 * regcache.c (new_register_cache): Likewise.
9036 * remote-utils.c (look_up_one_symbol): Likewise.
9037 * server.c (queue_stop_reply): Likewise.
9038 (start_inferior): Likewise.
9039 (queue_stop_reply_callback): Likewise.
9040 (handle_target_event): Likewise.
9041 * spu-low.c (fetch_ppc_memory): Likewise.
9042 (store_ppc_memory): Likewise.
9043 * target.c (set_target_ops): Likewise.
9044 * thread-db.c (thread_db_load_search): Likewise.
9045 (try_thread_db_load_1): Likewise.
9046 * tracepoint.c (add_tracepoint): Likewise.
9047 (add_tracepoint_action): Likewise.
9048 (create_trace_state_variable): Likewise.
9049 (cmd_qtdpsrc): Likewise.
9050 (cmd_qtro): Likewise.
9051 (add_while_stepping_state): Likewise.
9052 * win32-low.c (child_add_thread): Likewise.
9053 (get_image_name): Likewise.
9055 2015-08-25 Yao Qi <yao.qi@linaro.org>
9057 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9059 2015-08-25 Yao Qi <yao.qi@linaro.org>
9061 * Makefile.in (aarch64-linux.o): New rule.
9062 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9064 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9065 (aarch64_init_debug_reg_state): Make it extern.
9066 (aarch64_linux_prepare_to_resume): Remove.
9068 2015-08-25 Yao Qi <yao.qi@linaro.org>
9070 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9071 lwp_arch_private_info and ptid_of_lwp.
9073 2015-08-25 Yao Qi <yao.qi@linaro.org>
9075 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9076 Find proc_info by find_process_pid. All callers updated.
9078 2015-08-25 Yao Qi <yao.qi@linaro.org>
9080 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9082 (debug_reg_change_callback): Remove.
9083 (aarch64_notify_debug_reg_change): Remove.
9085 2015-08-25 Yao Qi <yao.qi@linaro.org>
9087 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9088 Call current_lwp_ptid.
9090 2015-08-25 Yao Qi <yao.qi@linaro.org>
9092 * linux-aarch64-low.c (debug_reg_change_callback): Use
9095 2015-08-25 Yao Qi <yao.qi@linaro.org>
9097 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9099 2015-08-25 Yao Qi <yao.qi@linaro.org>
9101 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9103 2015-08-25 Yao Qi <yao.qi@linaro.org>
9105 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9108 2015-08-25 Yao Qi <yao.qi@linaro.org>
9110 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9112 (debug_reg_change_callback): Remove argument entry and add argument
9113 lwp. Remove local variable thread. Don't print thread id in the
9114 debugging output. Don't check whether pid of thread equals to pid.
9115 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9116 iterate_over_lwps instead find_inferior.
9118 2015-08-24 Pedro Alves <palves@redhat.com>
9120 * inferiors.c (get_first_process): New function.
9121 * inferiors.h (get_first_process): New declaration.
9122 * remote-utils.c (read_ptid): Default to the first process in the
9123 list, instead of to the current thread's process.
9125 2015-08-24 Pedro Alves <palves@redhat.com>
9127 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9128 * event-loop.c: Likewise.
9129 * remote-utils.c: Likewise.
9130 * tracepoint.c: Likewise.
9132 2015-08-24 Pedro Alves <palves@redhat.com>
9134 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9137 2015-08-21 Pedro Alves <palves@redhat.com>
9139 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9140 instead of literal 1.
9142 2015-08-21 Pedro Alves <palves@redhat.com>
9144 * tdesc.c (default_description): Explicitly zero-initialize.
9146 2015-08-21 Pedro Alves <palves@redhat.com>
9149 * inferiors.c (remove_thread): Discard any pending stop reply for
9151 * server.c (remove_all_on_match_pid): Rename to ...
9152 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9154 (discard_queued_stop_replies): Change parameter to a ptid. Now
9156 (handle_v_kill, kill_inferior_callback, captured_main)
9157 (process_serial_event): Adjust.
9158 * server.h (discard_queued_stop_replies): Declare.
9160 2015-08-21 Pedro Alves <palves@redhat.com>
9162 * linux-low.c (wait_for_sigstop): Always switch to no thread
9163 selected if the previously current thread dies.
9164 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9165 process instead of the current thread's.
9166 * remote-utils.c (input_interrupt): Don't check if there's no
9168 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9169 current thread to the general thread fails, error out.
9170 (handle_qxfer_auxv, handle_qxfer_libraries)
9171 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9172 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9173 (handle_query): Check if there's a thread selected instead of
9174 checking whether there's any thread in the thread list.
9175 (handle_qxfer_threads, handle_qxfer_btrace)
9176 (handle_qxfer_btrace_conf): Don't error out early if there's no
9177 thread in the thread list.
9178 (handle_v_cont, myresume): Don't set the current thread to the
9180 (process_serial_event) <Hg handling>: Also set thread_id if the
9181 previous general thread is still alive.
9182 (process_serial_event) <g/G handling>: If setting the current
9183 thread to the general thread fails, error out.
9184 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9185 thread's lwp instead of the current thread's.
9186 * target.c (set_desired_thread): If the desired thread was not
9187 found, leave the current thread pointing to NULL. Return an int
9188 (boolean) indicating success.
9189 * target.h (set_desired_thread): Change return type to int.
9191 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9193 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9194 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9196 (ps_get_thread_area): New function.
9198 2015-08-19 Gary Benson <gbenson@redhat.com>
9200 * hostio.c (handle_pread): Do not attempt to read more data
9201 than hostio_reply_with_data can fit in a packet.
9203 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9205 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9207 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9209 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9211 2015-08-06 Pedro Alves <palves@redhat.com>
9213 * tracepoint.c (expr_eval_result): Now an int.
9215 2015-08-06 Pedro Alves <palves@redhat.com>
9217 * gdbthread.h (struct regcache): Forward declare.
9218 (struct thread_info) <regcache_data>: Now a struct regcache
9220 * inferiors.c (inferior_regcache_data)
9221 (set_inferior_regcache_data): Now work with struct regcache
9223 * inferiors.h (struct regcache): Forward declare.
9224 (inferior_regcache_data, set_inferior_regcache_data): Now work
9225 with struct regcache pointers.
9226 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9227 (free_register_cache_thread): Remove struct regcache pointer
9230 2015-08-06 Pedro Alves <palves@redhat.com>
9232 * server.c (captured_main): On error, print the exception message
9233 to stderr, and if run_once is set, throw a quit.
9235 2015-08-06 Pedro Alves <palves@redhat.com>
9237 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9240 2015-08-06 Pedro Alves <palves@redhat.com>
9242 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9243 reading beyond the passed in buffer length.
9245 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9247 * tracepoint.c (symbol_list) <required>: Remove.
9249 2015-08-06 Pedro Alves <palves@redhat.com>
9251 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9252 count if stopping and suspending threads.
9253 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9254 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9255 (linux_detach): Complete an ongoing step-over.
9256 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9258 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9259 (linux_wait_1): If passing a signal to the inferior after
9260 finishing a step-over, unsuspend and re-resume all lwps. If we
9261 see a single-step event but the thread should be continuing, don't
9262 pass the trap to gdb.
9263 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9264 internal_error instead of gdb_assert.
9265 (enqueue_pending_signal): New function.
9266 (check_ptrace_stopped_lwp_gone): Add debug output.
9267 (start_step_over): Use internal_error instead of gdb_assert.
9268 (complete_ongoing_step_over): New function.
9269 (linux_resume_one_thread): Don't resume a suspended thread.
9270 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9273 2015-08-06 Pedro Alves <palves@redhat.com>
9275 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9276 (linux_thread_alive): Use lwp_is_marked_dead.
9277 (extended_event_reported): Delete.
9278 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9279 instead of extended_event_reported.
9280 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9282 (lwp_is_marked_dead): New function.
9283 (lwp_running): Use lwp_is_marked_dead.
9284 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9287 2015-08-06 Pedro Alves <palves@redhat.com>
9289 * linux-low.c (linux_wait_1): Move fork event output out of the
9290 !report_to_gdb check. Pass event_child->waitstatus to
9291 target_waitstatus_to_string instead of ourstatus.
9293 2015-08-04 Yao Qi <yao.qi@linaro.org>
9295 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9296 if current_thread is 32 bit.
9298 2015-08-04 Yao Qi <yao.qi@linaro.org>
9300 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9301 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9302 * server.c (extended_protocol): Remove "static".
9303 * server.h (extended_protocol): Declare it.
9305 2015-08-04 Yao Qi <yao.qi@linaro.org>
9307 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9308 both aarch64 and aarch32.
9309 (aarch64_set_pc): Likewise.
9311 2015-08-04 Yao Qi <yao.qi@linaro.org>
9313 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9314 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9315 arm-with-neon.xml to srv_xmlfiles.
9316 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9317 (is_64bit_tdesc): New function.
9318 (aarch64_linux_read_description): New function.
9319 (aarch64_arch_setup): Call aarch64_linux_read_description.
9320 (regs_info): Rename to regs_info_aarch64.
9321 (aarch64_regs_info): Return right regs_info.
9322 (initialize_low_arch): Call initialize_low_arch_aarch32.
9324 2015-08-04 Yao Qi <yao.qi@linaro.org>
9326 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9327 * linux-aarch32-low.c: New file.
9328 * linux-aarch32-low.h: New file.
9329 * linux-arm-low.c (arm_fill_gregset): Move it to
9330 linux-aarch32-low.c.
9331 (arm_store_gregset): Likewise.
9332 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9333 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9334 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9335 (regs_info): Rename to regs_info_arm.
9336 (arm_regs_info): Return regs_info_aarch32 if
9337 have_ptrace_getregset is 1 and target description is
9338 arm_with_neon or arm_with_vfpv3.
9339 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9340 Call initialize_low_arch_aarch32 instead.
9342 2015-08-04 Yao Qi <yao.qi@linaro.org>
9344 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9345 * linux-low.c: ... here.
9346 * linux-low.h (have_ptrace_getregset): Declare it.
9348 2015-08-04 Pedro Alves <palves@redhat.com>
9350 * thread-db.c (struct thread_db): Use new typedefs.
9351 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9353 (disable_thread_event_reporting): Cast result of dlsym to
9354 destination function pointer type.
9355 (thread_db_mourn): Use td_ta_delete_ftype.
9357 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9359 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9361 (CDX_BREAKPOINT): Define for R2.
9362 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9363 (the_low_target): Add comments.
9365 2015-07-30 Yao Qi <yao.qi@linaro.org>
9367 * linux-arm-low.c (arm_hwcap): Remove it.
9368 (arm_read_description): New local variable arm_hwcap. Don't
9369 set arm_hwcap to zero.
9371 2015-07-30 Yao Qi <yao.qi@linaro.org>
9373 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9374 Use regcache->tdesc instead.
9375 (arm_store_wmmxregset): Likewise.
9376 (arm_fill_vfpregset): Likewise.
9377 (arm_store_vfpregset): Likewise.
9379 2015-07-30 Yao Qi <yao.qi@linaro.org>
9381 * linux-arm-low.c: Include arch/arm.h.
9382 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9383 (arm_store_gregset): Likewise.
9385 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9387 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9388 ptrace's 4th parameter.
9390 2015-07-27 Yao Qi <yao.qi@linaro.org>
9392 * configure.srv (case aarch64*-*-linux*): Don't set
9395 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9397 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9399 * linux-arm-low.c: Likewise.
9400 * linux-cris-low.c: Likewise.
9401 * linux-crisv32-low.c: Likewise.
9402 * linux-low.c: Likewise.
9403 * linux-m68k-low.c: Likewise.
9404 * linux-mips-low.c: Likewise.
9405 * linux-nios2-low.c: Likewise.
9406 * linux-s390-low.c: Likewise.
9407 * linux-sparc-low.c: Likewise.
9408 * linux-tic6x-low.c: Likewise.
9409 * linux-tile-low.c: Likewise.
9410 * linux-x86-low.c: Likewise.
9412 2015-07-24 Pedro Alves <palves@redhat.com>
9414 * config.in: Regenerate.
9415 * configure: Regenerate.
9417 2015-07-24 Pedro Alves <palves@redhat.com>
9419 * acinclude.m4: Include ../ptrace.m4.
9420 * configure.ac: Call GDB_AC_PTRACE.
9421 * config.in, configure: Regenerate.
9423 2015-07-24 Yao Qi <yao.qi@linaro.org>
9425 * linux-low.c (linux_create_inferior): Remove setting to
9426 proc->priv->new_inferior.
9427 (linux_attach): Likewise.
9428 (linux_low_filter_event): Likewise.
9429 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9431 2015-07-24 Yao Qi <yao.qi@linaro.org>
9433 * linux-low.c (linux_arch_setup): New function.
9434 (linux_low_filter_event): If proc->tdesc is NULL and
9435 proc->attached is true, call the_low_target.arch_setup.
9436 Otherwise, keep status pending, and return.
9437 (linux_resume_one_lwp_throw): Don't call get_pc if
9438 thread->while_stepping isn't NULL. Don't call
9439 get_thread_regcache if proc->tdesc is NULL.
9440 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9441 (linux_target_ops): Install arch_setup.
9442 * server.c (start_inferior): Call the_target->arch_setup.
9443 * target.h (struct target_ops) <arch_setup>: New field.
9444 (target_arch_setup): New marco.
9445 * lynx-low.c (lynx_target_ops): Update.
9446 * nto-low.c (nto_target_ops): Update.
9447 * spu-low.c (spu_target_ops): Update.
9448 * win32-low.c (win32_target_ops): Update.
9450 2015-07-24 Yao Qi <yao.qi@linaro.org>
9452 * linux-low.c (linux_add_process): Don't set
9453 proc->priv->new_inferior.
9454 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9455 (linux_attach): Likewise.
9457 2015-07-24 Yao Qi <yao.qi@linaro.org>
9459 * server.c (start_inferior): Code refactor.
9461 2015-07-24 Yao Qi <yao.qi@linaro.org>
9463 * server.c (process_serial_event): Set general_thread.
9465 2015-07-21 Yao Qi <yao.qi@linaro.org>
9467 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9468 aarch64_linux_get_debug_reg_capacity.
9470 2015-07-17 Yao Qi <yao.qi@linaro.org>
9472 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9473 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9474 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9475 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9476 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9477 (AARCH64_HWP_ALIGNMENT): Likewise.
9478 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9479 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9480 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9481 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9482 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9483 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9484 (struct aarch64_debug_reg_state): Likewise.
9485 (struct arch_lwp_info): Likewise.
9486 (aarch64_align_watchpoint): Likewise.
9487 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9488 (aarch64_watchpoint_length): Likewise.
9489 (aarch64_point_encode_ctrl_reg): Likewise
9490 (aarch64_point_is_aligned): Likewise.
9491 (aarch64_align_watchpoint): Likewise.
9492 (aarch64_linux_set_debug_regs):
9493 (aarch64_dr_state_insert_one_point): Likewise.
9494 (aarch64_dr_state_remove_one_point): Likewise.
9495 (aarch64_handle_breakpoint): Likewise.
9496 (aarch64_handle_aligned_watchpoint): Likewise.
9497 (aarch64_handle_unaligned_watchpoint): Likewise.
9498 (aarch64_handle_watchpoint): Likewise.
9500 2015-07-17 Yao Qi <yao.qi@linaro.org>
9502 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9503 and don't aarch64_get_debug_reg_state. All callers update.
9504 (aarch64_handle_aligned_watchpoint): Likewise.
9505 (aarch64_handle_unaligned_watchpoint): Likewise.
9506 (aarch64_handle_watchpoint): Likewise.
9507 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9508 (aarch64_remove_point): Likewise.
9510 2015-07-17 Yao Qi <yao.qi@linaro.org>
9512 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9514 (aarch64_handle_unaligned_watchpoint): Likewise.
9516 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9518 Revert the previous 3 commits:
9519 Move gdb_regex* to common/
9520 Move linux_find_memory_regions_full & co.
9521 gdbserver build-id attribute generator
9523 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9524 Jan Kratochvil <jan.kratochvil@redhat.com>
9526 gdbserver build-id attribute generator.
9527 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9528 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9529 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9531 (get_dynamic): Use find_pdhr to traverse program headers.
9532 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9533 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9534 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9535 (get_hex_build_id): New.
9536 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9537 to reply XML document.
9539 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9540 Jan Kratochvil <jan.kratochvil@redhat.com>
9542 * target.c: Include target/target-utils.h and fcntl.h.
9543 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9544 (target_fileio_read_stralloc): New functions.
9546 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9548 * Makefile.in (OBS): Add gdb_regex.o.
9550 * config.in: Rebuilt.
9551 * configure: Rebuilt.
9553 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9554 Jan Kratochvil <jan.kratochvil@redhat.com>
9556 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9557 * Makefile.in (OBS): Add target-utils.o.
9558 (linux-maps.o, target-utils.o): New.
9559 * configure.srv (srv_linux_obj): Add linux-maps.o.
9561 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9563 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9565 (the_low_target): Install it.
9567 2015-07-14 Pedro Alves <palves@redhat.com>
9569 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9570 Instead, ignore ECHILD, and throw an error for other errnos.
9572 2015-07-10 Pedro Alves <palves@redhat.com>
9574 * event-loop.c (struct callback_event) <data>: Change type to
9575 gdb_client_data instance instead of gdb_client_data pointer.
9576 (append_callback_event): Adjust.
9578 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9580 * linux-aarch64-low.c: Add comments for each linux_target_ops
9581 method. Remove comments already covered in target_ops and
9582 linux_target_ops definitions.
9583 (the_low_target): Add comments for each unimplemented method.
9585 2015-07-09 Yao Qi <yao.qi@linaro.org>
9587 * linux-aarch64-low.c (aarch64_regmap): Remove.
9588 (aarch64_usrregs_info): Remove.
9589 (regs_info): Set field usrregs to NULL.
9591 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9593 * linux-low.c: Include "rsp-low.h"
9594 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9595 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9596 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9597 (handle_btrace_enable_pt): New.
9598 (handle_btrace_general_set): Support "pt".
9599 (handle_btrace_conf_general_set): Support "pt:size".
9601 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9603 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9606 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9608 * linux-aarch64-low.c: Remove comment about endianness.
9609 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9610 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9613 2015-06-24 Gary Benson <gbenson@redhat.com>
9615 * linux-i386-ipa.c (stdint.h): Do not include.
9616 * lynx-i386-low.c (stdint.h): Likewise.
9617 * lynx-ppc-low.c (stdint.h): Likewise.
9618 * mem-break.c (stdint.h): Likewise.
9619 * thread-db.c (stdint.h): Likewise.
9620 * tracepoint.c (stdint.h): Likewise.
9621 * win32-low.c (stdint.h): Likewise.
9623 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9625 * server.c (write_qxfer_response): Update call to
9626 remote_escape_output.
9628 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9629 Jan Kratochvil <jan.kratochvil@redhat.com>
9631 Merge multiple hex conversions.
9632 * gdbreplay.c (tohex): Rename to 'fromhex'.
9633 (logchar): Use fromhex.
9635 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9637 * server.c (handle_qxfer_libraries): Set `version' attribute for
9640 2015-06-10 Gary Benson <gbenson@redhat.com>
9642 * target.h (struct target_ops) <multifs_open>: New field.
9643 <multifs_unlink>: Likewise.
9644 <multifs_readlink>: Likewise.
9645 * linux-low.c (nat/linux-namespaces.h): New include.
9646 (linux_target_ops): Initialize the_target->multifs_open,
9647 the_target->multifs_unlink and the_target->multifs_readlink.
9648 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9649 * hostio.c (hostio_fs_pid): New static variable.
9650 (hostio_handle_new_gdb_connection): New function.
9651 (handle_setfs): Likewise.
9652 (handle_open): Use the_target->multifs_open as appropriate.
9653 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9654 (handle_readlink): Use the_target->multifs_readlink as
9656 (handle_vFile): Handle vFile:setfs packets.
9657 * server.c (handle_query): Call hostio_handle_new_gdb_connection
9658 after target_handle_new_gdb_connection.
9660 2015-06-10 Gary Benson <gbenson@redhat.com>
9662 * configure.ac (AC_CHECK_FUNCS): Add setns.
9663 * config.in: Regenerate.
9664 * configure: Likewise.
9665 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
9666 (linux-namespaces.o): New rule.
9667 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9669 2015-06-09 Gary Benson <gbenson@redhat.com>
9671 * hostio.c (handle_open): Process mode argument with
9672 fileio_to_host_mode.
9674 2015-06-01 Yao Qi <yao.qi@linaro.org>
9676 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9677 * linux-x86-low.c: Likewise.
9679 2015-05-28 Don Breazeal <donb@codesourcery.com>
9681 * linux-low.c (handle_extended_wait): Initialize
9682 thread_info.last_resume_kind for new fork children.
9684 2015-05-15 Pedro Alves <palves@redhat.com>
9686 * target.h (target_handle_new_gdb_connection): Rewrite using if
9687 wrapped in do/while.
9689 2015-05-14 Joel Brobecker <brobecker@adacore.com>
9691 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9692 * configure, config.in: Regenerate.
9693 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
9696 2015-05-12 Don Breazeal <donb@codesourcery.com>
9698 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
9699 PTRACE_EVENT_VFORK_DONE.
9700 (linux_low_ptrace_options, extended_event_reported): Add vfork
9702 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
9703 and "vforkdone" for RSP 'T' Stop Reply Packet.
9704 * server.h (report_vfork_events): Declare
9707 2015-05-12 Don Breazeal <donb@codesourcery.com>
9709 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
9710 (the_low_target) <new_fork>: Initialize new member.
9711 * linux-arm-low.c (arm_new_fork): New function.
9712 (the_low_target) <new_fork>: Initialize new member.
9713 * linux-low.c (handle_extended_wait): Call new target function
9715 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
9716 * linux-mips-low.c (mips_add_watchpoint): New function
9717 extracted from mips_insert_point.
9718 (the_low_target) <new_fork>: Initialize new member.
9719 (mips_linux_new_fork): New function.
9720 (mips_insert_point): Call mips_add_watchpoint.
9721 * linux-x86-low.c (x86_linux_new_fork): New function.
9722 (the_low_target) <new_fork>: Initialize new member.
9724 2015-05-12 Don Breazeal <donb@codesourcery.com>
9726 * linux-low.c (handle_extended_wait): Implement return value,
9727 rename argument 'event_child' to 'event_lwp', handle
9728 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
9729 (linux_low_ptrace_options): New function.
9730 (linux_low_filter_event): Call linux_low_ptrace_options,
9731 use different argument fo linux_enable_event_reporting,
9732 use return value from handle_extended_wait.
9733 (extended_event_reported): New function.
9734 (linux_wait_1): Call extended_event_reported and set
9735 status to report fork events.
9736 (linux_write_memory): Add pid to debug message.
9737 (reset_lwp_ptrace_options_callback): New function.
9738 (linux_handle_new_gdb_connection): New function.
9739 (linux_target_ops): Initialize new structure member.
9740 * linux-low.h (struct lwp_info) <waitstatus>: New member.
9741 * lynx-low.c: Initialize new structure member.
9742 * remote-utils.c (prepare_resume_reply): Implement stop reason
9743 "fork" for "T" stop message.
9744 * server.c (handle_query): Call handle_new_gdb_connection.
9745 * server.h (report_fork_events): Declare global flag.
9746 * target.h (struct target_ops) <handle_new_gdb_connection>:
9748 (target_handle_new_gdb_connection): New macro.
9749 * win32-low.c: Initialize new structure member.
9751 2015-05-12 Don Breazeal <donb@codesourcery.com>
9753 * mem-break.c (APPEND_TO_LIST): Define macro.
9754 (clone_agent_expr): New function.
9755 (clone_one_breakpoint): New function.
9756 (clone_all_breakpoints): New function.
9757 * mem-break.h: Declare new functions.
9759 2015-05-12 Don Breazeal <donb@codesourcery.com>
9761 * linux-low.c (linux_supports_fork_events): New function.
9762 (linux_supports_vfork_events): New function.
9763 (linux_target_ops): Initialize new structure members.
9764 (initialize_low): Call linux_check_ptrace_features.
9765 * lynx-low.c (lynx_target_ops): Initialize new structure
9767 * server.c (report_fork_events, report_vfork_events):
9769 (handle_query): Add new features to qSupported packet and
9771 (captured_main): Initialize new global variables.
9772 * target.h (struct target_ops) <supports_fork_events>:
9774 <supports_vfork_events>: New member.
9775 (target_supports_fork_events): New macro.
9776 (target_supports_vfork_events): New macro.
9777 * win32-low.c (win32_target_ops): Initialize new structure
9780 2015-05-12 Gary Benson <gbenson@redhat.com>
9782 * server.c (handle_qxfer_exec_file): Use current process
9785 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
9787 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
9788 Remove HAVE_PTRACE_GETREGS conditionals.
9789 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
9790 instead of PTRACE_GETREGS and PTRACE_SETREGS.
9792 2015-05-08 Yao Qi <yao.qi@linaro.org>
9794 * linux-low.c (linux_supports_conditional_breakpoints): New
9796 (linux_target_ops): Install new target method.
9797 * lynx-low.c (lynx_target_ops): Install NULL hook for
9798 supports_conditional_breakpoints.
9799 * nto-low.c (nto_target_ops): Likewise.
9800 * spu-low.c (spu_target_ops): Likewise.
9801 * win32-low.c (win32_target_ops): Likewise.
9802 * server.c (handle_query): Check
9803 target_supports_conditional_breakpoints.
9804 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9806 (target_supports_conditional_breakpoints): New macro.
9808 2015-05-06 Pedro Alves <palves@redhat.com>
9811 * server.c (start_inferior): If the process exits, mourn it.
9813 2015-04-21 Gary Benson <gbenson@redhat.com>
9815 * hostio.c (fileio_open_flags_to_host): Factored out to
9816 fileio_to_host_openflags in common/fileio.c. Single use
9819 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9821 * linux-xtensa-low.c (xtensa_fill_gregset)
9822 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
9825 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9827 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
9828 (regs_info): Replace usrregs pointer with NULL.
9830 2015-04-17 Gary Benson <gbenson@redhat.com>
9832 * target.h (struct target_ops) <pid_to_exec_file>: New field.
9833 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
9834 * server.c (handle_qxfer_exec_file): New function.
9835 (qxfer_packets): Add exec-file entry.
9836 (handle_query): Report qXfer:exec-file:read as supported packet.
9838 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
9840 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
9842 2015-04-09 Gary Benson <gbenson@redhat.com>
9844 * hostio-errno.c (errno_to_fileio_error): Remove function.
9845 Update caller to use remote_fileio_to_fio_error.
9847 2015-04-09 Yao Qi <yao.qi@linaro.org>
9849 * linux-low.c (linux_insert_point): Call
9850 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
9851 (linux_remove_point): Call remove_memory_breakpoint if type is
9853 * linux-x86-low.c (x86_insert_point): Don't call
9854 insert_memory_breakpoint.
9855 (x86_remove_point): Don't call remove_memory_breakpoint.
9857 2015-04-01 Pedro Alves <palves@redhat.com>
9858 Cleber Rosa <crosa@redhat.com>
9860 * server.c (gdbserver_usage): Reorganize and extend the usage
9863 2015-03-24 Pedro Alves <palves@redhat.com>
9865 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
9866 output. Also dump TRAP_TRACE.
9867 (linux_low_filter_event): In debug output, distinguish a
9868 resume_stop SIGSTOP from a delayed SIGSTOP.
9870 2015-03-24 Gary Benson <gbenson@redhat.com>
9872 * linux-x86-low.c (x86_linux_new_thread): Moved to
9874 (x86_linux_prepare_to_resume): Likewise.
9876 2015-03-24 Gary Benson <gbenson@redhat.com>
9878 * Makefile.in (x86-linux-dregs.o): New rule.
9879 * configure.srv: Add x86-linux-dregs.o to relevant targets.
9880 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
9881 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
9882 (x86_linux_dr_get): Likewise.
9883 (x86_linux_dr_set): Likewise.
9884 (update_debug_registers_callback): Likewise.
9885 (x86_linux_dr_set_addr): Likewise.
9886 (x86_linux_dr_get_addr): Likewise.
9887 (x86_linux_dr_set_control): Likewise.
9888 (x86_linux_dr_get_control): Likewise.
9889 (x86_linux_dr_get_status): Likewise.
9890 (x86_linux_update_debug_registers): Likewise.
9892 2015-03-24 Gary Benson <gbenson@redhat.com>
9894 * linux-x86-low.c (x86_linux_update_debug_registers):
9895 New function, factored out from...
9896 (x86_linux_prepare_to_resume): ...this.
9898 2015-03-24 Gary Benson <gbenson@redhat.com>
9900 * linux-x86-low.c (x86_linux_dr_get): Update comments.
9901 (x86_linux_dr_set): Likewise.
9902 (update_debug_registers_callback): Likewise.
9903 (x86_linux_dr_set_addr): Likewise.
9904 (x86_linux_dr_get_addr): Likewise.
9905 (x86_linux_dr_set_control): Likewise.
9906 (x86_linux_dr_get_control): Likewise.
9907 (x86_linux_dr_get_status): Likewise.
9908 (x86_linux_prepare_to_resume): Likewise.
9910 2015-03-24 Gary Benson <gbenson@redhat.com>
9912 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
9913 Use perror_with_name. Pass string through gettext.
9914 (x86_linux_dr_set): Likewise.
9916 2015-03-24 Gary Benson <gbenson@redhat.com>
9918 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
9919 (x86_linux_dr_set_addr): ...this.
9920 (x86_dr_low_get_addr): Rename to...
9921 (x86_linux_dr_get_addr): ...this.
9922 (x86_dr_low_set_control): Rename to...
9923 (x86_linux_dr_set_control): ...this.
9924 (x86_dr_low_get_control): Rename to...
9925 (x86_linux_dr_get_control): ...this.
9926 (x86_dr_low_get_status): Rename to...
9927 (x86_linux_dr_get_status): ...this.
9928 (x86_dr_low): Update with new function names.
9930 2015-03-24 Gary Benson <gbenson@redhat.com>
9932 * Makefile.in (x86-linux.o): New rule.
9933 * configure.srv: Add x86-linux.o to relevant targets.
9934 * linux-low.c (lwp_set_arch_private_info): New function.
9935 (lwp_arch_private_info): Likewise.
9936 * linux-x86-low.c: Include nat/x86-linux.h.
9937 (arch_lwp_info): Removed structure.
9938 (update_debug_registers_callback):
9939 Use lwp_set_debug_registers_changed.
9940 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
9941 and lwp_set_debug_registers_changed.
9942 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
9944 2015-03-24 Gary Benson <gbenson@redhat.com>
9946 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
9947 * linux-arm-low.c (arm_new_thread): Likewise.
9948 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
9949 * linux-mips-low.c (mips_linux_new_thread): Likewise.
9950 * linux-x86-low.c (x86_linux_new_thread): Likewise.
9951 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
9953 2015-03-24 Gary Benson <gbenson@redhat.com>
9955 * linux-low.c (ptid_of_lwp): New function.
9956 (lwp_is_stopped): Likewise.
9957 (lwp_stop_reason): Likewise.
9958 * linux-x86-low.c (update_debug_registers_callback):
9960 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
9963 2015-03-24 Gary Benson <gbenson@redhat.com>
9965 * linux-low.h (linux_stop_lwp): Remove declaration.
9967 2015-03-24 Gary Benson <gbenson@redhat.com>
9969 * linux-low.h: Include nat/linux-nat.h.
9970 * linux-low.c (iterate_over_lwps_args): New structure.
9971 (iterate_over_lwps_filter): New function.
9972 (iterate_over_lwps): Likewise.
9973 * linux-x86-low.c (update_debug_registers_callback):
9974 Update signature to what iterate_over_lwps expects.
9975 Remove PID check that iterate_over_lwps now performs.
9976 (x86_dr_low_set_addr): Use iterate_over_lwps.
9977 (x86_dr_low_set_control): Likewise.
9979 2015-03-24 Gary Benson <gbenson@redhat.com>
9981 * linux-x86-low.c (x86_debug_reg_state): New function.
9982 (x86_linux_prepare_to_resume): Use the above.
9984 2015-03-24 Gary Benson <gbenson@redhat.com>
9986 * linux-low.c (current_lwp_ptid): New function.
9987 * linux-x86-low.c: Include nat/linux-nat.h.
9988 (x86_dr_low_get_addr): Use current_lwp_ptid.
9989 (x86_dr_low_get_control): Likewise.
9990 (x86_dr_low_get_status): Likewise.
9992 2015-03-20 Pedro Alves <palves@redhat.com>
9994 * tracepoint.c (cmd_qtstatus): Make "str" const.
9996 2015-03-20 Pedro Alves <palves@redhat.com>
9998 * server.c (handle_general_set): Make "req_str" const.
10000 2015-03-19 Pedro Alves <palves@redhat.com>
10002 * linux-low.c (linux_resume_one_lwp): Rename to ...
10003 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10004 instead call perror_with_name.
10005 (check_ptrace_stopped_lwp_gone): New function.
10006 (linux_resume_one_lwp): Reimplement as wrapper around
10007 linux_resume_one_lwp_throw that swallows errors if the LWP is
10010 2015-03-19 Pedro Alves <palves@redhat.com>
10012 * linux-low.c (count_events_callback, select_event_lwp_callback):
10013 No longer check whether the thread has resume_stop as last resume
10016 2015-03-19 Pedro Alves <palves@redhat.com>
10018 * linux-low.c (count_events_callback, select_event_lwp_callback):
10019 Use the lwp's status_pending_p field, not the thread's.
10021 2015-03-19 Pedro Alves <palves@redhat.com>
10023 * linux-low.c (select_event_lwp_callback): Update comments to
10024 no longer mention SIGTRAP.
10026 2015-03-18 Gary Benson <gbenson@redhat.com>
10028 * server.c (handle_query): Do not report vFile:fstat as supported.
10030 2015-03-11 Gary Benson <gbenson@redhat.com>
10032 * hostio.c (sys/types.h): New include.
10033 (sys/stat.h): Likewise.
10034 (common-remote-fileio.h): Likewise.
10035 (handle_fstat): New function.
10036 (handle_vFile): Handle vFile:fstat packets.
10038 2015-03-11 Gary Benson <gbenson@redhat.com>
10040 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10041 struct stat.st_blocks and struct stat.st_blksize.
10042 * configure: Regenerate.
10043 * config.in: Likewise.
10044 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10045 (OBS): Add common-remote-fileio.o.
10046 (common-remote-fileio.o): New rule.
10048 2015-03-09 Pedro Alves <palves@redhat.com>
10050 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10051 'struct sockaddr' pointer in 'accept' call.
10053 2015-03-09 Pedro Alves <palves@redhat.com>
10056 2015-03-07 Pedro Alves <palves@redhat.com>
10057 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10058 or <winsock2.h> here. Instead include "gdb_socket.h".
10059 (remote_open): Use union gdb_sockaddr_u.
10060 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10061 or <winsock2.h> here. Instead include "gdb_socket.h".
10062 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10063 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10065 (init_named_socket, gdb_agent_helper_thread): Use union
10068 2015-03-07 Pedro Alves <palves@redhat.com>
10070 * configure.ac (build_warnings): Move
10071 -Wdeclaration-after-statement to the C-specific set.
10072 * configure: Regenerate.
10074 2015-03-07 Pedro Alves <palves@redhat.com>
10076 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10077 or <winsock2.h> here. Instead include "gdb_socket.h".
10078 (remote_open): Use union gdb_sockaddr_u.
10079 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10080 or <winsock2.h> here. Instead include "gdb_socket.h".
10081 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10082 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10084 (init_named_socket, gdb_agent_helper_thread): Use union
10087 2015-03-07 Pedro Alves <palves@redhat.com>
10089 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10092 2015-03-06 Yao Qi <yao.qi@linaro.org>
10094 * linux-aarch64-low.c (aarch64_insert_point): Use
10095 show_debug_regs as a boolean.
10096 (aarch64_remove_point): Likewise.
10098 2015-03-05 Pedro Alves <palves@redhat.com>
10100 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10101 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10102 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10103 * nto-low.c (nto_target_ops): Likewise.
10104 * spu-low.c (spu_target_ops): Likewise.
10105 * win32-low.c (win32_target_ops): Likewise.
10107 2015-03-04 Pedro Alves <palves@redhat.com>
10109 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10110 Decide whether a breakpoint triggered based on the SIGTRAP's
10112 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10113 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10114 (linux_low_filter_event): Check for breakpoints before checking
10116 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10118 (linux_stopped_by_sw_breakpoint)
10119 (linux_supports_stopped_by_sw_breakpoint)
10120 (linux_stopped_by_hw_breakpoint)
10121 (linux_supports_stopped_by_hw_breakpoint): New functions.
10122 (linux_target_ops): Install new target methods.
10124 2015-03-04 Pedro Alves <palves@redhat.com>
10126 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10127 * server.c (swbreak_feature, hwbreak_feature): New globals.
10128 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10129 (captured_main): Clear swbreak_feature and hwbreak_feature.
10130 * server.h (swbreak_feature, hwbreak_feature): Declare.
10131 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10132 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10133 supports_stopped_by_hw_breakpoint>: New fields.
10134 (target_supports_stopped_by_sw_breakpoint)
10135 (target_stopped_by_sw_breakpoint)
10136 (target_supports_stopped_by_hw_breakpoint)
10137 (target_stopped_by_hw_breakpoint): Declare.
10139 2015-03-04 Pedro Alves <palves@redhat.com>
10141 enum lwp_stop_reason -> enum target_stop_reason
10142 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10143 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10144 (linux_wait_1, stuck_in_jump_pad_callback)
10145 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10146 (linux_stopped_by_watchpoint):
10147 * linux-low.h (enum lwp_stop_reason): Delete.
10148 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10149 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10151 2015-03-04 Yao Qi <yao.qi@linaro.org>
10153 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10155 2015-03-03 Gary Benson <gbenson@redhat.com>
10157 * hostio.c (handle_vFile): Fix prefix lengths.
10159 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10161 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10164 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10166 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10167 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10168 (clean): Add "rm -f" for above C files.
10169 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10170 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10171 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10172 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10173 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10174 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10175 (init_registers_s390x_vx_linux64)
10176 (init_registers_s390x_tevx_linux64)
10177 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10178 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10180 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10181 (s390_store_vxrs_high): New functions.
10182 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10184 (s390_arch_setup): Add logic for selecting one of the new target
10185 descriptions. Activate the new vector regsets if applicable.
10186 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10187 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10188 and init_registers_s390x_tevx_linux64.
10190 2015-03-01 Pedro Alves <palves@redhat.com>
10192 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10195 2015-02-27 Pedro Alves <palves@redhat.com>
10197 * linux-x86-low.c (u_debugreg_offset): New function.
10198 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10200 2015-02-27 Pedro Alves <palves@redhat.com>
10202 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10203 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10204 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10205 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10206 (ps_lsetfpregs, ps_getpid)
10207 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10208 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10209 (ps_lsetxregs, ps_plog): Declare.
10211 2015-02-27 Pedro Alves <palves@redhat.com>
10213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10214 IP_AGENT_EXPORT_FUNC.
10215 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10216 IP_AGENT_EXPORT_FUNC.
10217 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10218 (IP_AGENT_EXPORT): Delete.
10219 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10220 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10221 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10222 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10223 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10224 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10225 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10226 (traceframe_read_count, traceframe_write_count)
10227 (traceframes_created, trace_state_variables, get_raw_reg)
10228 (get_trace_state_variable_value, set_trace_state_variable_value)
10229 (ust_loaded, helper_thread_id, cmd_buf): Use
10230 IPA_SYM_EXPORTED_NAME.
10231 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10232 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10233 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10234 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10235 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10236 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10237 EXTERN_C_PUSH/EXTERN_C_POP.
10238 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10239 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10240 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10241 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10242 (traceframe_write_count, traceframe_read_count)
10243 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10244 (about_to_request_buffer_space, get_trace_state_variable_value)
10245 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10246 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10247 EXTERN_C_PUSH/EXTERN_C_POP.
10248 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10249 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10250 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10251 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10252 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10253 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10254 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10255 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10257 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10258 (IP_AGENT_EXPORT_VAR_DECL): Define.
10259 (tracing): Declare.
10260 (gdb_agent_get_raw_reg): Declare.
10262 2015-02-27 Tom Tromey <tromey@redhat.com>
10263 Pedro Alves <palves@redhat.com>
10265 Rename symbols whose names are reserved C++ keywords throughout.
10267 2015-02-27 Pedro Alves <palves@redhat.com>
10269 * Makefile.in (COMPILER): New, get it from autoconf.
10270 (CXX): Get from autoconf instead.
10271 (COMPILE.pre): Use COMPILER.
10272 (CC-LD): Rename to ...
10273 (CC_LD): ... this. Use COMPILER.
10274 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10275 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10276 * acinclude.m4: Include build-with-cxx.m4.
10277 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10278 Disable -Werror by default if building in C++ mode.
10279 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10280 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10281 the C++ compiler. Save/restore CXXFLAGS too.
10282 * configure: Regenerate.
10284 2015-02-27 Pedro Alves <palves@redhat.com>
10286 * acinclude.m4: Include libiberty.m4.
10287 * configure.ac: Call libiberty_INIT.
10288 * config.in, configure: Regenerate.
10290 2015-02-26 Pedro Alves <palves@redhat.com>
10292 * linux-low.c (linux_wait_1): When incrementing the PC past a
10293 program breakpoint always use the_low_target.breakpoint_len as
10294 increment, rather than the maximum between that and
10295 the_low_target.decr_pc_after_break.
10297 2015-02-23 Pedro Alves <palves@redhat.com>
10299 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10300 thread was doing a step-over; always adjust the PC if
10301 we stepped over a permanent breakpoint.
10302 (linux_wait_1): If we stepped over breakpoint that was on top of a
10303 permanent breakpoint, manually advance the PC past it.
10305 2015-02-23 Pedro Alves <palves@redhat.com>
10307 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10309 (x86_fill_gregset, x86_store_gregset): Use it when handling
10312 2015-02-20 Pedro Alves <palves@redhat.com>
10314 * thread-db.c: Include "nat/linux-procfs.h".
10315 (thread_db_init): Skip listing new threads if the kernel supports
10316 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10318 2015-02-20 Pedro Alves <palves@redhat.com>
10320 * linux-low.c (status_pending_p_callback): Use ptid_match.
10322 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10324 PR breakpoints/16812
10325 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10326 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10327 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10329 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10331 PR breakpoints/15956
10332 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10334 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10336 * linux-low.c (linux_low_btrace_conf): Print size.
10337 * server.c (handle_btrace_conf_general_set): New.
10338 (hanle_general_set): Call handle_btrace_conf_general_set.
10339 (handle_query): Report Qbtrace-conf:bts:size as supported.
10341 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10343 * linux-low.c (linux_low_enable_btrace): Update parameters.
10344 (linux_low_btrace_conf): New.
10345 (linux_target_ops)<to_btrace_conf>: Initialize.
10346 * server.c (current_btrace_conf): New.
10347 (handle_btrace_enable): Rename to ...
10348 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
10349 to target_enable_btrace. Update comment. Update users.
10350 (handle_qxfer_btrace_conf): New.
10351 (qxfer_packets): Add btrace-conf entry.
10352 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10353 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10354 (target_ops)<read_btrace_conf>: New.
10355 (target_enable_btrace): Update parameters.
10356 (target_read_btrace_conf): New.
10358 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10360 * server.c (handle_btrace_general_set): Remove call to
10361 target_supports_btrace.
10362 (supported_btrace_packets): New.
10363 (handle_query): Call supported_btrace_packets.
10364 * target.h: include btrace-common.h.
10365 (btrace_target_info): Removed.
10366 (supports_btrace, target_supports_btrace): Update parameters.
10368 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10370 * Makefile.in (SFILES): Add common/btrace-common.c.
10371 (OBS): Add common/btrace-common.o.
10372 (btrace-common.o): Add build rules.
10373 * linux-low: Include btrace-common.h.
10374 (linux_low_read_btrace): Use struct btrace_data. Call
10375 btrace_data_init and btrace_data_fini.
10377 2015-02-06 Pedro Alves <palves@redhat.com>
10379 * thread-db.c (find_new_threads_callback): Add debug output.
10381 2015-02-04 Pedro Alves <palves@redhat.com>
10383 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10384 (resume_stopped_resumed_lwps): New function.
10385 (linux_wait_for_event_filtered): Use it.
10387 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10389 * Makefile.in (SFILES): Add linux-personality.c.
10390 (linux-personality.o): New rule.
10391 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10392 list of objects to be built.
10393 * linux-low.c: Include nat/linux-personality.h.
10394 (linux_create_inferior): Remove code to disable address space
10395 randomization (moved to ../nat/linux-personality.c). Create
10396 cleanup to disable address space randomization.
10398 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10400 * Makefile.in (posix-strerror.o): New rule.
10401 (mingw-strerror.o): Likewise.
10402 * configure: Regenerated.
10403 * configure.ac: Source file ../common/common.host. Initialize new
10404 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10406 2015-01-14 Yao Qi <yao@codesourcery.com>
10408 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10409 (ppc-linux.o): New rule.
10410 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10411 * configure.ac: AC_CHECK_FUNCS(getauxval).
10412 * config.in: Re-generated.
10413 * configure: Re-generated.
10414 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10415 ppc64_64bit_inferior_p
10417 2015-01-14 Yao Qi <yao@codesourcery.com>
10419 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10420 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10421 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10422 (PT_ORIG_R3, PT_TRAP): Likewise.
10423 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10424 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10425 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10427 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10429 * i387-fp.c (i387_cache_to_xsave): In look over
10430 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10431 zmmh_low_space field by use of zmmh_high_space.
10433 2015-01-09 Pedro Alves <palves@redhat.com>
10435 * linux-low.c (step_over_bkpt): Move higher up in the file.
10436 (handle_extended_wait): Don't store the stop_pc here.
10437 (get_stop_pc): Adjust comments and rename to ...
10438 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10439 stopped for a software breakpoint or hardware breakpoint.
10440 (thread_still_has_status_pending_p): New function.
10441 (status_pending_p_callback): Use
10442 thread_still_has_status_pending_p. If the event is no longer
10443 interesting, resume the LWP.
10444 (handle_tracepoints): Add assert.
10445 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10446 (wstatus_maybe_breakpoint): New function.
10447 (cancel_breakpoint): Delete function.
10448 (check_stopped_by_watchpoint): New function, factored out from
10449 linux_low_filter_event.
10450 (lp_status_maybe_breakpoint): Delete function.
10451 (linux_low_filter_event): Remove filter_ptid argument.
10452 Leave thread group exits pending here. Store the LWP's stop PC.
10453 Always leave events pending.
10454 (linux_wait_for_event_filtered): Pull all events out of the
10455 kernel, and leave them all pending.
10456 (count_events_callback, select_event_lwp_callback): Consider all
10458 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10459 (select_event_lwp): Only give preference to the stepping LWP in
10460 all-stop mode. Adjust comments.
10461 (ignore_event): New function.
10462 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10463 references to cancel_breakpoints. Adjust to renames. Also give
10464 equal priority to all LWPs that have had events in non-stop mode.
10465 If reporting a software breakpoint event, unadjust the LWP's PC.
10466 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10467 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10469 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10470 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10471 (linux_stopped_by_watchpoint): Adjust.
10472 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10473 * linux-low.h (enum lwp_stop_reason): New.
10474 (struct lwp_info) <stop_pc>: Adjust comment.
10475 <stopped_by_watchpoint>: Delete field.
10476 <stop_reason>: New field.
10477 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10478 * mem-break.c (software_breakpoint_inserted_here)
10479 (hardware_breakpoint_inserted_here): New function.
10480 * mem-break.h (software_breakpoint_inserted_here)
10481 (hardware_breakpoint_inserted_here): Declare.
10482 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10483 (cancel_breakpoints): Delete.
10484 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10485 (upload_fast_traceframes): Remove references to
10486 cancel_breakpoints.
10488 2015-01-09 Pedro Alves <palves@redhat.com>
10490 * thread-db.c (find_new_threads_callback): Ignore thread if the
10491 kernel thread ID is -1.
10493 2015-01-09 Pedro Alves <palves@redhat.com>
10495 * linux-low.c (linux_attach_fail_reason_string): Move to
10496 nat/linux-ptrace.c, and rename.
10497 (linux_attach_lwp): Update comment.
10498 (attach_proc_task_lwp_callback): New function.
10499 (linux_attach): Adjust to rename and use
10500 linux_proc_attach_tgid_threads.
10501 (linux_attach_fail_reason_string): Delete declaration.
10503 2015-01-01 Joel Brobecker <brobecker@adacore.com>
10505 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10506 * server.c (gdbserver_version): Likewise.
10508 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10510 * remote-utils.c: Include ctype.h.
10511 (input_interrupt): Explicitly handle the case when the char
10512 received is the NUL byte. Improve the printing of non-ASCII
10515 2014-12-16 Joel Brobecker <brobecker@adacore.com>
10517 * linux-low.c (linux_low_filter_event): Update call to
10518 linux_enable_event_reporting following the addition of
10519 a new parameter to that function.
10521 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
10524 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10525 (AARCH64_FPCR_REGNO): Likewise.
10526 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10527 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10528 (aarch64_store_fpregset): Likewise.
10530 2014-12-15 Joel Brobecker <brobecker@adacore.com>
10532 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10533 Remove FIXME comment about assumption about N.
10535 2014-12-13 Joel Brobecker <brobecker@adacore.com>
10537 * configure.ac: If large-file support is disabled in GDBserver,
10538 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10539 * configure: Regenerate.
10541 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10543 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10544 warning upon ENODATA from ptrace.
10545 * linux-s390-low.c (s390_store_tdb): New.
10546 (s390_regsets): Add regset for NT_S390_TDB.
10548 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10550 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10551 without a fill_function.
10552 * linux-s390-low.c (s390_fill_last_break): Remove.
10553 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10554 (s390_arch_setup): Use regset's size instead of fill_function for
10555 loop end condition.
10557 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10559 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10560 the regset's store function when ptrace returned an error.
10561 * regcache.c (get_thread_regcache): Invalidate register cache
10562 before fetching inferior's registers.
10564 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10566 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10567 while-loop as for-loop.
10568 (regsets_store_inferior_registers): Likewise.
10570 2014-11-28 Yao Qi <yao@codesourcery.com>
10572 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10573 * config.in, configure: Re-generate.
10574 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10577 2014-11-21 Yao Qi <yao@codesourcery.com>
10579 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10580 (AC_CHECK_HEADERS): Remove malloc.h.
10581 * configure: Re-generated.
10582 * config.in: Re-generated.
10583 * server.h: Don't include alloca.h and malloc.h.
10584 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10585 Don't include malloc.h.
10587 2014-11-17 Joel Brobecker <brobecker@adacore.com>
10589 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10590 corresponding ERRNO check in same block.
10592 2014-11-12 Pedro Alves <palves@redhat.com>
10594 * server.c (cont_thread): Update comment.
10595 (start_inferior, attach_inferior): No longer clear cont_thread.
10596 (handle_v_cont): No longer set cont_thread.
10597 (captured_main): Clear cont_thread each time a GDB connects.
10599 2014-11-12 Pedro Alves <palves@redhat.com>
10601 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10602 thread, and don't resume all threads if the Hc thread has exited.
10604 2014-11-12 Pedro Alves <palves@redhat.com>
10606 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10607 the process group instead of to a specific LWP.
10609 2014-10-15 Pedro Alves <palves@redhat.com>
10612 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10614 (arm_set_thread_context): Delete.
10615 (the_low_target): Adjust.
10616 * win32-i386-low.c (debug_registers_changed)
10617 (debug_registers_used): Delete.
10618 (update_debug_registers_callback): New function.
10619 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10620 needing to update their debug registers.
10621 (win32_get_current_dr): New function.
10622 (x86_dr_low_get_addr, x86_dr_low_get_control)
10623 (x86_dr_low_get_status): Fetch the debug register from the thread
10625 (i386_initial_stuff): Adjust.
10626 (i386_get_thread_context): Remove current_event parameter. Don't
10627 clear debug_registers_changed nor copy DR values to
10629 (i386_set_thread_context): Delete.
10630 (i386_prepare_to_resume): New function.
10631 (i386_thread_added): Mark the thread as needing to update irs
10633 (the_low_target): Remove i386_set_thread_context and install
10634 i386_prepare_to_resume.
10635 * win32-low.c (win32_get_thread_context): Adjust.
10636 (win32_set_thread_context): Use SetThreadContext
10638 (win32_prepare_to_resume): New function.
10639 (win32_require_context): New function, factored out from ...
10640 (thread_rec): ... this.
10641 (continue_one_thread): Call win32_prepare_to_resume on each thread
10642 we're about to continue.
10643 (win32_resume): Call win32_prepare_to_resume on the event thread.
10644 * win32-low.h (struct win32_thread_info)
10645 <debug_registers_changed>: New field.
10646 (struct win32_target_ops): Change prototype of set_thread_context,
10647 delete set_thread_context and add prepare_to_resume.
10648 (win32_require_context): New declaration.
10650 2014-10-08 Gary Benson <gbenson@redhat.com>
10652 * server.h: Do not include common-exceptions.h.
10654 2014-10-08 Gary Benson <gbenson@redhat.com>
10656 * server.h: Do not include cleanups.h.
10658 2014-09-30 James Hogan <james.hogan@imgtec.com>
10660 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
10661 mips64-dsp-linux.c.
10663 2014-09-23 Yao Qi <yao@codesourcery.com>
10665 * linux-low.c (lp_status_maybe_breakpoint): New function.
10666 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
10667 (count_events_callback): Likewise.
10668 (select_event_lwp_callback): Likewise.
10669 (cancel_breakpoints_callback): Likewise.
10671 2014-09-19 Don Breazeal <donb@codesourcery.com>
10673 * linux-low.c (handle_extended_wait): Call
10674 linux_ptrace_get_extended_event.
10675 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
10676 linux_is_extended_waitstatus.
10678 2014-09-16 Joel Brobecker <brobecker@adacore.com>
10680 * Makefile.in (CPPFLAGS): Define.
10681 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
10682 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
10684 2014-09-16 Gary Benson <gbenson@redhat.com>
10686 * inferiors.h (current_inferior): Renamed as...
10687 (current_thread): New variable. All uses updated.
10688 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
10689 (maybe_move_out_of_jump_pad): Likewise.
10690 (cancel_breakpoint): Likewise.
10691 (linux_low_filter_event): Likewise.
10692 (wait_for_sigstop): Likewise.
10693 (linux_resume_one_lwp): Likewise.
10694 (need_step_over_p): Likewise.
10695 (start_step_over): Likewise.
10696 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
10697 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
10698 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
10699 and save_inferior as saved_thread.
10700 * regcache.c (get_thread_regcache): Renamed saved_inferior as
10702 (regcache_invalidate_thread): Likewise.
10703 * remote-utils.c (prepare_resume_reply): Likewise.
10704 * thread-db.c (thread_db_get_tls_address): Likewise.
10705 (disable_thread_event_reporting): Likewise.
10706 (remove_thread_event_breakpoints): Likewise.
10707 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
10709 * target.h (set_desired_inferior): Renamed as...
10710 (set_desired_thread): New declaration. All uses updated.
10711 * server.c (myresume): Updated comment to reference thread instead
10713 (handle_serial_event): Likewise.
10714 (handle_target_event): Likewise.
10716 2014-09-12 Tom Tromey <tromey@redhat.com>
10717 Gary Benson <gbenson@redhat.com>
10719 * regcache.h: Include common-regcache.h.
10720 (regcache_read_pc): Don't declare.
10721 * regcache.c (get_thread_regcache_for_ptid): New function.
10723 2014-09-11 Tom Tromey <tromey@redhat.com>
10724 Gary Benson <gbenson@redhat.com>
10726 * symbol.c: New file.
10727 * Makefile.in (SFILES): Add symbol.c.
10728 (OBS): Add symbol.o.
10730 2014-09-11 Gary Benson <gbenson@redhat.com>
10732 * target.c (target_stop_ptid, target_continue_ptid): New
10735 2014-09-11 Tom Tromey <tromey@redhat.com>
10736 Gary Benson <gbenson@redhat.com>
10738 * target.h: Include target/target.h.
10739 * target.c (target_read_memory, target_read_uint32)
10740 (target_write_memory): New functions.
10742 2014-09-11 Gary Benson <gbenson@redhat.com>
10744 * server.h (debug_hw_points): Don't declare.
10745 * server.c (debug_hw_points): Don't define. Replace all uses
10746 with show_debug_regs.
10747 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
10748 all uses with show_debug_regs.
10750 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10752 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
10753 endianness into account.
10754 (ppc_supply_ptrace_register): Likewise.
10756 2014-09-03 James Hogan <james.hogan@imgtec.com>
10758 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
10759 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
10761 2014-09-03 Gary Benson <gbenson@redhat.com>
10763 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
10764 ALL_DEBUG_ADDRESS_REGISTERS.
10766 2014-09-02 Gary Benson <gbenson@redhat.com>
10768 * i386-low.h: Renamed as...
10769 * x86-low.h: New file. All type, function and variable name
10770 prefixes changed from "i386_" to "x86_". All references updated.
10771 * i386-low.c: Renamed as...
10772 * x86-low.c: New file. All type, function and variable name
10773 prefixes changed from "i386_" to "x86_". All references updated.
10775 2014-09-02 Gary Benson <gbenson@redhat.com>
10777 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
10778 (x86_linux_new_thread): Likewise.
10780 2014-08-29 Gary Benson <gbenson@redhat.com>
10782 * server.h (setjmp.h): Do not include.
10783 (toplevel): Do not declare.
10784 (common-exceptions.h): Include.
10785 (cleanups.h): Likewise.
10786 * server.c (toplevel): Do not define.
10787 (exit_code): New static global.
10788 (detach_or_kill_for_exit_cleanup): New function.
10789 (main): New function. Original main renamed to...
10790 (captured_main): New function.
10791 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
10793 2014-08-29 Gary Benson <gbenson@redhat.com>
10795 * Makefile.in (SFILES): Add common/common-exceptions.c.
10796 (OBS): Add common-exceptions.o.
10797 (common-exceptions.o): New rule.
10798 * utils.c (prepare_to_throw_exception): New function.
10800 2014-08-29 Gary Benson <gbenson@redhat.com>
10802 * config.in: Regenerate.
10803 * configure: Likewise.
10805 2014-08-29 Gary Benson <gbenson@redhat.com>
10807 * Makefile.in (SFILES): Add common/cleanups.c.
10809 (cleanups.o): New rule.
10811 2014-08-29 Gary Benson <gbenson@redhat.com>
10813 * utils.c (internal_vwarning): New function.
10815 2014-08-28 Gary Benson <gbenson@redhat.com>
10817 * utils.h (fatal): Remove declaration.
10818 * utils.c (fatal): Remove function.
10820 2014-08-28 Gary Benson <gbenson@redhat.com>
10822 * tracepoint.c (gdb_agent_init): Replace fatal with
10824 (initialize_tracepoint): Likewise.
10826 2014-08-28 Gary Benson <gbenson@redhat.com>
10828 * remote-utils.c (remote_prepare): Replace fatal with error.
10830 2014-08-28 Gary Benson <gbenson@redhat.com>
10832 * linux-low.c (linux_async): Replace fatal with warning.
10833 Tidy up and return.
10834 (linux_start_non_stop): Return -1 if linux_async failed.
10836 2014-08-28 Gary Benson <gbenson@redhat.com>
10838 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
10840 (i386_dr_low_get_addr): Remove vague comment.
10841 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
10844 2014-08-28 Gary Benson <gbenson@redhat.com>
10846 * inferiors.c (get_thread_process): Replace check with gdb_assert.
10847 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
10849 (linux_resume_one_lwp): Likewise.
10850 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
10852 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
10853 with internal_error.
10854 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
10855 (init_register_cache): Replace fatal with gdb_assert_not_reached.
10856 (find_register_by_name): Replace fatal with internal_error.
10857 (find_regno): Likewise.
10858 * tdesc.c (init_target_desc): Replace check with gdb_assert.
10859 * thread-db.c (thread_db_create_event): Likewise.
10860 (thread_db_load_search): Likewise.
10861 (try_thread_db_load_1): Likewise.
10862 * tracepoint.c (get_jump_space_head): Replace fatal with
10864 (claim_trampoline_space): Likewise.
10865 (have_fast_tracepoint_trampoline_buffer): Likewise.
10866 (cmd_qtstart): Likewise.
10867 (stop_tracing): Likewise.
10868 (fast_tracepoint_collecting): Likewise.
10869 (target_malloc): Likewise.
10870 (download_tracepoint): Likewise.
10871 (download_trace_state_variables): Replace check with gdb_assert.
10872 (upload_fast_traceframes): Replace fatal with internal_error.
10874 2014-08-19 Tom Tromey <tromey@redhat.com>
10875 Gary Benson <gbenson@redhat.com>
10877 * Makefile.in (SFILES): Add common/common-debug.c.
10878 (OBS): Add common-debug.o.
10879 (common-debug.o): New rule.
10880 * debug.h (debug_printf): Don't declare.
10881 * debug.c (debug_printf): Renamed and rewritten as...
10882 (debug_vprintf): New function.
10884 2014-08-19 Gary Benson <gbenson@redhat.com>
10886 * utils.h: Do not include print-utils.h.
10888 2014-08-19 Tom Tromey <tromey@redhat.com>
10889 Gary Benson <gbenson@redhat.com>
10891 * server.h: Add static assertion.
10892 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
10894 2014-08-19 Tom Tromey <tromey@redhat.com>
10895 Gary Benson <gbenson@redhat.com>
10897 * Makefile.in (SFILES): Add common/errors.c.
10898 (OBS): Add errors.o.
10899 (IPA_OBS): Add errors-ipa.o.
10900 (errors.o): New rule.
10901 (errors-ipa.o): Likewise.
10902 * utils.h (perror_with_name, error, warning): Don't declare.
10903 * utils.c (warning): Renamed and rewritten as...
10904 (vwarning): New function.
10905 (error): Renamed and rewritten as...
10906 (verror): New function.
10907 (internal_error): Renamed and rewritten as...
10908 (internal_verror): New function.
10910 2014-08-07 Gary Benson <gbenson@redhat.com>
10912 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
10913 * configure: Regenerate.
10914 * config.in: Likewise.
10915 * server.h: Do not include errno.h.
10916 * event-loop.c: Likewise.
10917 * hostio-errno.c: Likewise.
10918 * linux-low.c: Likewise.
10919 * remote-utils.c: Likewise.
10920 * spu-low.c: Likewise.
10921 * utils.c: Likewise.
10922 * gdbreplay.c: Unconditionally include errno.h.
10924 2014-08-07 Gary Benson <gbenson@redhat.com>
10926 * server.h: Do not include string.h.
10927 * event-loop.c: Likewise.
10928 * linux-low.c: Likewise.
10929 * regcache.c: Likewise.
10930 * remote-utils.c: Likewise.
10931 * spu-low.c: Likewise.
10932 * utils.c: Likewise.
10934 2014-08-07 Gary Benson <gbenson@redhat.com>
10936 * server.h: Do not include gdb_assert.h.
10938 2014-08-07 Gary Benson <gbenson@redhat.com>
10940 * server.h: Do not include common-utils.h.
10942 2014-08-07 Gary Benson <gbenson@redhat.com>
10944 * server.h: Do not include ptid.h.
10945 * notif.h: Likewise.
10947 2014-08-07 Gary Benson <gbenson@redhat.com>
10949 * server.h: Do not include gdb_locale.h.
10951 2014-08-07 Gary Benson <gbenson@redhat.com>
10953 * server.h: Do not include gdb/signals.h.
10954 * win32-low.c: Likewise.
10956 2014-08-07 Gary Benson <gbenson@redhat.com>
10958 * server.h: Do not include pathmax.h.
10960 2014-08-07 Gary Benson <gbenson@redhat.com>
10962 * server.h: Do not include libiberty.h.
10963 * linux-bfin-low.c: Likewise.
10965 2014-08-07 Gary Benson <gbenson@redhat.com>
10967 * server.h: Do not include ansidecl.h.
10969 2014-08-07 Gary Benson <gbenson@redhat.com>
10971 * linux-x86-low.c: Do not include stddef.h.
10972 * lynx-ppc-low.c: Likewise.
10973 * tracepoint.c: Likewise.
10975 2014-08-07 Gary Benson <gbenson@redhat.com>
10977 * server.h: Do not include stdarg.h.
10978 * nto-low.c: Likewise.
10980 2014-08-07 Gary Benson <gbenson@redhat.com>
10982 * server.h: Do not include stdlib.h.
10983 * inferiors.c: Likewise.
10984 * linux-low.c: Likewise.
10985 * regcache.c: Likewise.
10986 * spu-low.c: Likewise.
10987 * tracepoint.c: Likewise.
10988 * utils.c: Likewise.
10990 2014-08-07 Gary Benson <gbenson@redhat.com>
10992 * server.h: Do not include stdio.h.
10993 * linux-low.c: Likewise.
10994 * remote-utils.c: Likewise.
10995 * spu-low.c: Likewise.
10996 * utils.c: Likewise.
10997 * wincecompat.c: Likewise.
10999 2014-08-06 Gary Benson <gbenson@redhat.com>
11001 * regcache.c (init_register_cache): Move conditionals inside if.
11003 2014-08-06 Gary Benson <gbenson@redhat.com>
11005 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11007 2014-07-31 Gary Benson <gbenson@redhat.com>
11009 * ax.h: Do not include server.h.
11010 * gdbthread.h: Likewise.
11011 * lynx-low.h: Likewise.
11012 * notif.h: Likewise.
11014 2014-07-30 Gary Benson <gbenson@redhat.com>
11016 * server.h: Include common-defs.h.
11017 Do not include config.h or build-gnulib-gdbserver/config.h.
11019 2014-07-30 Gary Benson <gbenson@redhat.com>
11021 * hostio-errno.c: Move server.h to top of includes list.
11022 * inferiors.c: Likewise.
11023 * linux-x86-low.c: Likewise.
11024 * notif.c: Include server.h.
11026 2014-07-24 Tom Tromey <tromey@redhat.com>
11027 Gary Benson <gbenson@redhat.com>
11029 * server.h (CORE_ADDR): Now unsigned.
11031 2014-07-16 Pedro Alves <palves@redhat.com>
11033 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11035 2014-07-15 Pedro Alves <palves@redhat.com>
11037 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11040 2014-07-11 Pedro Alves <palves@redhat.com>
11042 * linux-low.c (kill_wait_lwp): New function, based on
11043 kill_one_lwp_callback, but use my_waitpid directly.
11044 (kill_one_lwp_callback, linux_kill): Use it.
11046 2014-06-23 Pedro Alves <palves@redhat.com>
11048 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11049 before setting DR0..DR3.
11051 2014-06-20 Gary Benson <gbenson@redhat.com>
11053 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11054 * configure: Regenerated.
11055 * config.in: Likewise.
11057 2014-06-20 Gary Benson <gbenson@redhat.com>
11059 * Makefile.in (SFILES): Update locations for files moved
11060 from common to nat.
11061 (object file files): Reordered.
11063 2014-06-20 Gary Benson <gbenson@redhat.com>
11065 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11066 (i386_dr_low_set_addr): Likewise.
11067 (i386_dr_low_get_addr): Likewise.
11068 (i386_dr_low_can_set_control): Likewise.
11069 (i386_dr_low_set_control): Likewise.
11070 (i386_dr_low_get_control): Likewise.
11071 (i386_dr_low_get_status): Likewise.
11072 (i386_get_debug_register_length): Likewise.
11073 * linux-x86-low.c (i386_dr_low_set_addr):
11074 Changed signature. Made static.
11075 (i386_dr_low_get_addr): Likewise.
11076 (i386_dr_low_set_control): Likewise.
11077 (i386_dr_low_get_control): Likewise.
11078 (i386_dr_low_get_status): Likewise.
11079 (i386_dr_low): New global variable.
11080 * win32-i386-low.c (i386_dr_low_set_addr):
11081 Changed signature. Made static.
11082 (i386_dr_low_get_addr): Likewise.
11083 (i386_dr_low_set_control): Likewise.
11084 (i386_dr_low_get_control): Likewise.
11085 (i386_dr_low_get_status): Likewise.
11086 (i386_dr_low): New global variable.
11088 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11090 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11091 * Makefile.in (AR, AR_FLAGS): Define.
11092 * configure: Regenerate.
11094 2014-06-19 Gary Benson <gbenson@redhat.com>
11096 * Makefile.in (i386-dregs.o): New rule.
11097 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11098 * i386-low.c (target.h): Remove include.
11099 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11100 (DR_CONTROL_SHIFT): Likewise.
11101 (DR_CONTROL_SIZE): Likewise.
11102 (DR_RW_EXECUTE): Likewise.
11103 (DR_RW_WRITE): Likewise.
11104 (DR_RW_READ): Likewise.
11105 (DR_RW_IORW): Likewise.
11106 (DR_LEN_1): Likewise.
11107 (DR_LEN_2): Likewise.
11108 (DR_LEN_4): Likewise.
11109 (DR_LEN_8): Likewise.
11110 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11111 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11112 (DR_ENABLE_SIZE): Likewise.
11113 (DR_LOCAL_SLOWDOWN): Likewise.
11114 (DR_GLOBAL_SLOWDOWN): Likewise.
11115 (DR_CONTROL_RESERVED): Likewise.
11116 (I386_DR_CONTROL_MASK): Likewise.
11117 (I386_DR_VACANT): Likewise.
11118 (I386_DR_LOCAL_ENABLE): Likewise.
11119 (I386_DR_GLOBAL_ENABLE): Likewise.
11120 (I386_DR_DISABLE): Likewise.
11121 (I386_DR_SET_RW_LEN): Likewise.
11122 (I386_DR_GET_RW_LEN): Likewise.
11123 (I386_DR_WATCH_HIT): Likewise.
11124 (i386_wp_op_t): Likewise.
11125 (i386_show_dr): Likewise.
11126 (i386_length_and_rw_bits): Likewise.
11127 (i386_insert_aligned_watchpoint): Likewise.
11128 (i386_remove_aligned_watchpoint): Likewise.
11129 (i386_handle_nonaligned_watchpoint): Likewise.
11130 i386_update_inferior_debug_regs(): Likewise.
11131 (i386_dr_insert_watchpoint): Likewise.
11132 (i386_dr_remove_watchpoint): Likewise.
11133 (i386_dr_region_ok_for_watchpoint): Likewise.
11134 (i386_dr_stopped_data_address): Likewise.
11135 (i386_dr_stopped_by_watchpoint): Likewise.
11137 2014-06-19 Gary Benson <gbenson@redhat.com>
11139 * i386-low.c (i386_dr_show): Renamed to
11140 i386_show_dr and made static. All uses updated.
11141 (i386_dr_length_and_rw_bits): Renamed to
11142 i386_length_and_rw_bits and made static.
11144 (i386_dr_insert_aligned_watchpoint): Renamed to
11145 i386_insert_aligned_watchpoint and made static.
11147 (i386_dr_remove_aligned_watchpoint): Renamed to
11148 i386_remove_aligned_watchpoint and made static.
11150 (i386_dr_update_inferior_debug_regs): Renamed to
11151 i386_update_inferior_debug_regs and made static.
11154 2014-06-18 Gary Benson <gbenson@redhat.com>
11156 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11157 (i386_dr_low_can_set_control): Likewise.
11158 (i386_get_debug_register_length): Likewise.
11159 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11160 (i386_dr_low_can_set_control): Likewise.
11161 (i386_get_debug_register_length): Likewise.
11163 2014-06-17 Gary Benson <gbenson@redhat.com>
11165 * i386-low.h (i386-dregs.h): New include.
11166 (DR_FIRSTADDR): Now in i386-dregs.h.
11167 (DR_LASTADDR): Likewise.
11168 (DR_NADDR): Likewise.
11169 (DR_STATUS): Likewise.
11170 (DR_CONTROL): Likewise.
11171 (i386_debug_reg_state): Likewise.
11172 (i386_dr_insert_watchpoint): Likewise.
11173 (i386_dr_remove_watchpoint): Likewise.
11174 (i386_dr_region_ok_for_watchpoint): Likewise.
11175 (i386_dr_stopped_data_address): Likewise.
11176 (i386_dr_stopped_by_watchpoint): Likewise.
11177 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11179 2014-06-18 Gary Benson <gbenson@redhat.com>
11181 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11182 i386_dr_insert_watchpoint.
11183 (i386_low_remove_watchpoint): Renamed to
11184 i386_dr_remove_watchpoint.
11185 (i386_low_region_ok_for_watchpoint): Renamed to
11186 i386_dr_region_ok_for_watchpoint.
11187 (i386_low_stopped_data_address): Renamed to
11188 i386_dr_stopped_data_address.
11189 (i386_low_stopped_by_watchpoint): Renamed to
11190 i386_dr_stopped_by_watchpoint.
11191 * i386-low.c (i386_show_dr): Renamed to
11192 i386_dr_show and made nonstatic. All uses updated.
11193 (i386_length_and_rw_bits): Renamed to
11194 i386_dr_length_and_rw_bits and made nonstatic.
11196 (i386_insert_aligned_watchpoint): Renamed to
11197 i386_dr_insert_aligned_watchpoint and made nonstatic.
11199 (i386_remove_aligned_watchpoint): Renamed to
11200 i386_dr_remove_aligned_watchpoint and made nonstatic.
11202 (i386_update_inferior_debug_regs): Renamed to
11203 i386_dr_update_inferior_debug_regs and made nonstatic.
11205 (i386_low_insert_watchpoint): Renamed to
11206 i386_dr_insert_watchpoint. All uses updated.
11207 (i386_low_remove_watchpoint): Renamed to
11208 i386_dr_remove_watchpoint. All uses updated.
11209 (i386_low_region_ok_for_watchpoint): Renamed to
11210 i386_dr_region_ok_for_watchpoint. All uses updated.
11211 (i386_low_stopped_data_address): Renamed to
11212 i386_dr_stopped_data_address. All uses updated.
11213 (i386_low_stopped_by_watchpoint): Renamed to
11214 i386_dr_stopped_by_watchpoint. All uses updated.
11216 2014-06-18 Gary Benson <gbenson@redhat.com>
11218 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11219 (i386_dr_low_can_set_control): Likewise.
11220 (i386_insert_aligned_watchpoint): New check.
11222 2014-06-18 Gary Benson <gbenson@redhat.com>
11224 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11227 2014-06-18 Gary Benson <gbenson@redhat.com>
11229 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11230 instead of fatal and error.
11231 (i386_handle_nonaligned_watchpoint): Likewise.
11233 2014-06-18 Gary Benson <gbenson@redhat.com>
11235 * i386-low.c (i386_get_debug_register_length): New macro.
11236 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11237 (i386_show_dr): Use debug_printf instead of fprintf. Use
11238 phex to format values.
11240 2014-06-18 Gary Benson <gbenson@redhat.com>
11242 * i386-low.h: Comment changes.
11243 * i386-low.c: Likewise.
11245 2014-06-18 Gary Benson <gbenson@redhat.com>
11247 * i386-low.c: Whitespace changes.
11249 2014-06-12 Tom Tromey <tromey@redhat.com>
11251 * utils.c (freeargv): Remove.
11253 2014-06-12 Tom Tromey <tromey@redhat.com>
11255 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11256 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11257 (parse_debug_format_options): Likewise.
11258 (gdbserver_usage): Likewise.
11259 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11260 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11261 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11263 ($(LIBGNU)): Depend on libiberty.
11264 (all-lib): Recurse into all subdirs.
11265 (install-only): Invoke "install" target in subdirs.
11266 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11268 * configure: Rebuild.
11269 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11270 for vasprintf, vsnprintf, or gettimeofday.
11271 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11274 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11276 * development.sh: Delete.
11277 * Makefile.in (config.status): Adjust dependency on development.sh.
11278 * configure.ac: Adjust development.sh source call.
11279 * configure: Regenerate.
11281 2014-06-02 Pedro Alves <palves@redhat.com>
11283 * ax.c (gdb_free_agent_expr): New function.
11284 * ax.h (gdb_free_agent_expr): New declaration.
11285 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11287 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11289 (clear_breakpoint_conditions_and_commands): New function.
11290 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11291 (clear_breakpoint_conditions_and_commands): New declaration.
11293 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11295 * linux-aarch64-low.c (asm/ptrace.h): Include.
11297 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11299 Fix TLS access for -static -pthread.
11300 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11301 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11302 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11304 2014-05-20 Pedro Alves <palves@redhat.com>
11306 * linux-aarch64-low.c (aarch64_insert_point)
11307 (aarch64_remove_point): No longer check whether the type is
11308 supported here. Adjust to new interface.
11309 (the_low_target): Install aarch64_supports_z_point_type as
11310 supports_z_point_type method.
11311 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11312 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11313 instead of a Z packet char. Adjust.
11314 (arm_supports_z_point_type): New function.
11315 (arm_insert_point, arm_remove_point): Adjust to new interface.
11316 (the_low_target): Install arm_supports_z_point_type.
11317 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11318 (cris_insert_point, cris_remove_point): Adjust to new interface.
11319 Don't check whether the type is supported here.
11320 (the_low_target): Install cris_supports_z_point_type.
11321 * linux-low.c (linux_supports_z_point_type): New function.
11322 (linux_insert_point, linux_remove_point): Adjust to new interface.
11323 * linux-low.h (struct linux_target_ops) <insert_point,
11324 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11325 raw_breakpoint pointer parameter.
11326 <supports_z_point_type>: New method.
11327 * linux-mips-low.c (mips_supports_z_point_type): New function.
11328 (mips_insert_point, mips_remove_point): Adjust to new interface.
11329 Use mips_supports_z_point_type.
11330 (the_low_target): Install mips_supports_z_point_type.
11331 * linux-ppc-low.c (the_low_target): Install NULL as
11332 supports_z_point_type method.
11333 * linux-s390-low.c (the_low_target): Install NULL as
11334 supports_z_point_type method.
11335 * linux-sparc-low.c (the_low_target): Install NULL as
11336 supports_z_point_type method.
11337 * linux-x86-low.c (x86_supports_z_point_type): New function.
11338 (x86_insert_point): Adjust to new insert_point interface. Use
11339 insert_memory_breakpoint. Adjust to new
11340 i386_low_insert_watchpoint interface.
11341 (x86_remove_point): Adjust to remove_point interface. Use
11342 remove_memory_breakpoint. Adjust to new
11343 i386_low_remove_watchpoint interface.
11344 (the_low_target): Install x86_supports_z_point_type.
11345 * lynx-low.c (lynx_target_ops): Install NULL as
11346 supports_z_point_type callback.
11347 * nto-low.c (nto_supports_z_point_type): New.
11348 (nto_insert_point, nto_remove_point): Adjust to new interface.
11349 (nto_target_ops): Install nto_supports_z_point_type.
11350 * mem-break.c: Adjust intro comment.
11351 (struct raw_breakpoint) <raw_type, size>: New fields.
11352 <inserted>: Update comment.
11353 <shlib_disabled>: Delete field.
11354 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11355 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11356 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11357 (raw_bkpt_type_to_target_hw_bp_type): New function.
11358 (find_enabled_raw_code_breakpoint_at): New function.
11359 (find_raw_breakpoint_at): New type and size parameters. Use them.
11360 (insert_memory_breakpoint): New function, based off
11361 set_raw_breakpoint_at.
11362 (remove_memory_breakpoint): New function.
11363 (set_raw_breakpoint_at): Reimplement.
11364 (set_breakpoint): New, based on set_breakpoint_at.
11365 (set_breakpoint_at): Reimplement.
11366 (delete_raw_breakpoint): Go through the_target->remove_point
11367 instead of assuming memory breakpoints.
11368 (find_gdb_breakpoint_at): Delete.
11369 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11370 (find_gdb_breakpoint): New function.
11371 (set_gdb_breakpoint_at): Delete.
11372 (z_type_supported): New function.
11373 (set_gdb_breakpoint_1): New function, loosely based off
11374 set_gdb_breakpoint_at.
11375 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11376 (delete_gdb_breakpoint_at): Delete.
11377 (delete_gdb_breakpoint_1): New function, loosely based off
11378 delete_gdb_breakpoint_at.
11379 (delete_gdb_breakpoint): New function.
11380 (clear_gdb_breakpoint_conditions): Rename to ...
11381 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11383 (add_condition_to_breakpoint): Make static.
11384 (add_breakpoint_condition): Take a struct breakpoint pointer
11385 instead of an address. Adjust.
11386 (gdb_condition_true_at_breakpoint): Rename to ...
11387 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11389 (gdb_condition_true_at_breakpoint): Reimplement.
11390 (add_breakpoint_commands): Take a struct breakpoint pointer
11391 instead of an address. Adjust.
11392 (gdb_no_commands_at_breakpoint): Rename to ...
11393 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11394 parameter. Return true if no breakpoint was found. Change debug
11396 (gdb_no_commands_at_breakpoint): Reimplement.
11397 (run_breakpoint_commands): Rename to ...
11398 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11399 and change return type to boolean.
11400 (run_breakpoint_commands): New function.
11401 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11402 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11403 breakpoint. Go through the_target->remove_point instead of
11404 assuming memory breakpoint.
11405 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11406 software and hardware breakpoints.
11407 (reinsert_raw_breakpoint): Go through the_target->insert_point
11408 instead of assuming memory breakpoint.
11409 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11410 software and hardware breakpoints.
11411 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11412 Check both software and hardware breakpoints.
11413 (validate_inserted_breakpoint): Assert the breakpoint is a
11414 software breakpoint. Set the inserted flag to -1 instead of
11415 setting shlib_disabled.
11416 (delete_disabled_breakpoints): Adjust.
11417 (validate_breakpoints): Only validate software breakpoints.
11418 Adjust to inserted flag change.
11419 (check_mem_read, check_mem_write): Skip breakpoint types other
11420 than software breakpoints. Adjust to inserted flag change.
11421 * mem-break.h (enum raw_bkpt_type): New enum.
11422 (raw_breakpoint, struct process_info): Forward declare.
11423 (Z_packet_to_target_hw_bp_type): Delete declaration.
11424 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11425 (set_gdb_breakpoint, delete_gdb_breakpoint)
11426 (clear_breakpoint_conditions): New declarations.
11427 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11428 (breakpoint_inserted_here): Update comment.
11429 (add_breakpoint_condition, add_breakpoint_commands): Replace
11430 address parameter with a breakpoint pointer parameter.
11431 (gdb_breakpoint_here): Update comment.
11432 (delete_gdb_breakpoint_at): Delete.
11433 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11434 * server.c (process_point_options): Take a struct breakpoint
11435 pointer instead of an address. Adjust.
11436 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11437 delete_gdb_breakpoint.
11438 * spu-low.c (spu_target_ops): Install NULL as
11439 supports_z_point_type method.
11440 * target.h: Include mem-break.h.
11441 (struct target_ops) <prepare_to_access_memory>: Update comment.
11442 <supports_z_point_type>: New field.
11443 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11444 instead of a char. Also take a raw breakpoint pointer.
11445 * win32-arm-low.c (the_low_target): Install NULL as
11446 supports_z_point_type.
11447 * win32-i386-low.c (i386_supports_z_point_type): New function.
11448 (i386_insert_point, i386_remove_point): Adjust to new interface.
11449 (the_low_target): Install i386_supports_z_point_type.
11450 * win32-low.c (win32_supports_z_point_type): New function.
11451 (win32_insert_point, win32_remove_point): Adjust to new interface.
11452 (win32_target_ops): Install win32_supports_z_point_type.
11453 * win32-low.h (struct win32_target_ops):
11454 <supports_z_point_type>: New method.
11455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11456 instead of a char. Also take a raw breakpoint pointer.
11458 2014-05-20 Pedro Alves <palves@redhat.com>
11460 * mem-break.h: Include break-common.h.
11461 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11462 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11463 (Z_packet_to_target_hw_bp_type): New declaration.
11464 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11465 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11466 (Z_PACKET_ACCESS_WP): Delete macros.
11467 (Z_packet_to_hw_type): Delete function.
11468 * i386-low.h: Don't include break-common.h here.
11469 (Z_packet_to_hw_type): Delete declaration.
11470 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11471 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11472 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11473 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11474 * linux-aarch64-low.c: Don't include break-common.h here.
11475 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11476 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11477 (Z_packet_to_target_hw_bp_type): Delete function.
11478 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11480 (mips_insert_point, mips_remove_point): Use
11481 Z_packet_to_target_hw_bp_type.
11483 2014-05-20 Pedro Alves <palves@redhat.com>
11485 * linux-aarch64-low.c: Include break-common.h.
11486 (enum target_point_type): Delete.
11487 (Z_packet_to_point_type): Rename to ...
11488 (Z_packet_to_target_hw_bp_type): ... this, and return a
11489 target_hw_bp_type instead.
11490 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11491 instead of an enum target_point_type.
11492 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11494 (aarch64_dr_state_insert_one_point)
11495 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11496 (aarch64_handle_aligned_watchpoint)
11497 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11498 Take an enum target_hw_bp_type instead of an enum
11500 (aarch64_supports_z_point_type): New function.
11501 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11502 use Z_packet_to_target_hw_bp_type.
11504 2014-05-20 Joel Brobecker <brobecker@adacore.com>
11506 * configure.ac: Only use -Werror by default when DEVELOPMENT
11508 * configure: Regenerate.
11510 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11512 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11513 * linux-x86-low.c (X86_64_USER_REGS): New.
11514 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11516 2014-04-28 Yao Qi <yao@codesourcery.com>
11518 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11521 2014-04-25 Pedro Alves <palves@redhat.com>
11524 * linux-low.c (linux_attach_fail_reason_string): New function.
11525 (linux_attach_lwp): Delete.
11526 (linux_attach_lwp_1): Rename to ...
11527 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11528 argument. Remove "initial" parameter. Return int instead of
11529 void. Don't error or warn here.
11530 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11531 failure to attach to the tgid. Call warning when failing to
11533 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11534 argument. Remove "initial" parameter. Return int instead of
11535 void. Don't error or warn here.
11536 (linux_attach_fail_reason_string): New declaration.
11537 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11538 interface change. Use linux_attach_fail_reason_string.
11540 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
11541 Walfred Tedeschi <walfred.tedeschi@intel.com>
11543 * Makefile.in: Added rules to handle new files
11544 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11545 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11546 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11547 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11548 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11549 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11550 x32-avx512-linux.o.
11551 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11552 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11553 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11554 i386/x32-avx512.xml.
11555 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11556 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11557 i386/x32-avx512-linux.xml.
11558 * i387-fp.c (num_avx512_k_registers): New constant for number
11560 (num_avx512_zmmh_low_registers): New constant for number of
11561 lower ZMM registers (0-15).
11562 (num_avx512_zmmh_high_registers): New constant for number of
11563 higher ZMM registers (16-31).
11564 (num_avx512_ymmh_registers): New contant for number of higher
11565 YMM registers (ymm16-31 added by avx521 on x86_64).
11566 (num_avx512_xmm_registers): New constant for number of higher
11567 XMM registers (xmm16-31 added by AVX512 on x86_64).
11568 (struct i387_xsave): Add space for AVX512 registers.
11569 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11570 Add code to handle AVX512 registers.
11571 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11572 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11573 prototypei from generated file.
11574 (tdesc_amd64_avx512_linux): Likewise.
11575 (init_registers_x32_avx512_linux): Likewise.
11576 (tdesc_x32_avx512_linux): Likewise.
11577 (init_registers_i386_avx512_linux): Likewise.
11578 (tdesc_i386_avx512_linux): Likewise.
11579 (x86_64_regmap): Add AVX512 registers.
11580 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11582 (initialize_low_arch): Add code to initialize AVX512 registers.
11584 2014-04-23 Pedro Alves <palves@redhat.com>
11586 * mem-break.c (find_gdb_breakpoint_at): Make static.
11587 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11589 2014-04-23 Pedro Alves <palves@redhat.com>
11591 * i386-low.c: Don't include break-common.h here.
11592 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11593 prototype to take target_hw_bp_type as argument instead of a Z
11595 * i386-low.h: Include break-common.h here.
11596 (Z_packet_to_hw_type): Declare.
11597 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11599 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11600 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11601 (x86_remove_point): Convert the packet number to a
11602 target_hw_bp_type before calling i386_low_remove_watchpoint.
11603 * win32-i386-low.c (i386_insert_point): Convert the packet number
11604 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11605 (i386_remove_point): Convert the packet number to a
11606 target_hw_bp_type before calling i386_low_remove_watchpoint.
11608 2014-04-23 Pedro Alves <palves@redhat.com>
11610 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11612 2014-04-10 Pedro Alves <palves@redhat.com>
11614 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11615 Check if the condition or command is NULL before checking if the
11616 breakpoint is known. On success, return true.
11617 * mem-break.h (add_breakpoint_condition): Document return.
11618 (add_breakpoint_commands): Add describing comment.
11619 * server.c (skip_to_semicolon): New function.
11620 (process_point_options): Use it.
11622 2014-04-09 Pedro Alves <palves@redhat.com>
11624 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11627 2014-02-27 Pedro Alves <palves@redhat.com>
11630 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11632 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11634 (last_thread_of_process_p): Take a PID argument instead of a
11636 (linux_wait_for_lwp): Delete.
11637 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11639 (linux_low_filter_event): New function, party factored out from
11640 linux_wait_for_event.
11641 (linux_wait_for_event): Rename to ...
11642 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11643 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11644 sigsuspend. Check for zombie leaders.
11645 (linux_wait_for_event): Reimplement as wrapper around
11646 linux_wait_for_event_filtered.
11647 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11648 a normal or signal exit is seen, it's the whole process exiting.
11649 (wait_for_sigstop): No longer a for_each_inferior callback.
11650 Rewrite on top of linux_wait_for_event_filtered.
11651 (stop_all_lwps): Call wait_for_sigstop directly.
11652 * server.c (resume, handle_target_event): Handle
11653 TARGET_WAITKIND_NO_RESUMED.
11655 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11657 * win32-low.c (psapi_get_dll_name,
11658 * win32_CreateToolhelp32Snapshot): Delete.
11659 (win32_CreateToolhelp32Snapshot, win32_Module32First)
11660 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
11662 (handle_load_dll): Add function description.
11663 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
11665 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11667 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
11669 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
11670 base address when calling win32_add_one_solib.
11671 (handle_load_dll): Delete local variable load_addr.
11672 Remove 0x1000 offset applied to DLL base address when calling
11673 win32_add_one_solib.
11674 (handle_unload_dll): Add comment.
11676 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11678 * win32-low.c (win32_add_all_dlls): Renames
11679 win32_ensure_ntdll_loaded. Rewrite function documentation.
11680 Adjust implementation to always load all DLLs.
11681 Add 0x1000 offset to DLL base address when calling
11682 win32_add_one_solib.
11683 (child_initialization_done): New static global.
11684 (do_initial_child_stuff): Set child_initialization_done to
11685 zero during child initialization, and 1 after. Replace call
11686 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
11688 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
11689 (handle_unload_dll): Add function documentation.
11690 (get_child_debug_event): Ignore load and unload DLL events
11691 during child initialization.
11693 2014-02-20 Doug Evans <dje@google.com>
11695 Remove global all_lwps.
11696 * inferiors.h (ptid_of): Move here from linux-low.h.
11697 (pid_of, lwpid_of): Ditto.
11698 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
11699 parameter is a struct thread_info * now.
11700 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
11701 directly. Pass &all_threads to find_inferior instead of &all_lwps.
11702 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
11704 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
11705 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
11706 * linux-arm-low.c (update_registers_callback): Update, "entry"
11707 parameter is a struct thread_info * now.
11708 Fetch lwpid from current_inferior directly.
11709 (arm_insert_point): Pass &all_threads to find_inferior instead of
11711 (arm_remove_point): Ditto.
11712 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
11713 (arm_prepare_to_resume): Fetch pid from thread.
11714 (arm_read_description): Fetch lwpid from current_inferior directly.
11715 * linux-low.c (all_lwps): Delete.
11716 (delete_lwp): Delete call to remove_inferior.
11717 (handle_extended_wait): Fetch lwpid from thread.
11718 (add_lwp): Don't set lwp->entry.id. Remove call to
11719 add_inferior_to_list.
11720 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
11721 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
11722 (kill_one_lwp_callback): Ditto.
11723 (linux_kill): Don't dereference NULL pointer.
11724 Fetch ptid,lwpid from thread.
11725 (get_detach_signal): Fetch ptid from thread.
11726 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
11727 Simplify call to regcache_invalidate_thread.
11728 (delete_lwp_callback): Update, "entry" parameter is a
11729 struct thread_info * now. Fetch pid from thread.
11730 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
11731 (status_pending_p_callback): Update, "entry" parameter is a
11732 struct thread_info * now. Fetch ptid from thread.
11733 (find_lwp_pid): Update, "entry" parameter is a
11734 struct thread_info * now.
11735 (linux_wait_for_lwp): Fetch pid from thread.
11736 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
11737 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
11738 (enqueue_one_deferred_signal): Fetch lwpid from thread.
11739 (dequeue_one_deferred_signal): Ditto.
11740 (cancel_breakpoint): Fetch ptid from current_inferior.
11741 (linux_wait_for_event): Pass &all_threads to find_inferior,
11742 not &all_lwps. Fetch ptid, lwpid from thread.
11743 (count_events_callback): Update, "entry" parameter is a
11744 struct thread_info * now.
11745 (select_singlestep_lwp_callback): Ditto.
11746 (select_event_lwp_callback): Ditto.
11747 (cancel_breakpoints_callback): Ditto.
11748 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
11750 (select_event_lwp): Ditto. Fetch ptid from event_thread.
11751 (unsuspend_one_lwp): Update, "entry" parameter is a
11752 struct thread_info * now.
11753 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
11755 (linux_stabilize_threads): Ditto. And for for_each_inferior.
11756 Fetch lwpid from thread, not lwp.
11757 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
11758 Pass &all_threads to find_inferior, not &all_lwps.
11759 (send_sigstop): Fetch lwpid from thread, not lwp.
11760 (send_sigstop_callback): Update, "entry" parameter is a
11761 struct thread_info * now.
11762 (suspend_and_send_sigstop_callback): Ditto.
11763 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
11764 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
11765 struct thread_info * now.
11766 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
11768 (lwp_running): Update, "entry" parameter is a
11769 struct thread_info * now.
11770 (stop_all_lwps): Fetch ptid from thread.
11771 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
11772 (linux_resume_one_lwp): Fetch lwpid from thread.
11773 (linux_set_resume_request): Update, "entry" parameter is a
11774 struct thread_info * now. Fetch pid, lwpid from thread.
11775 (resume_status_pending_p): Update, "entry" parameter is a
11776 struct thread_info * now.
11777 (need_step_over_p): Ditto. Fetch lwpid from thread.
11778 (start_step_over): Fetch lwpid from thread.
11779 (linux_resume_one_thread): Update, "entry" parameter is a
11780 struct thread_info * now. Fetch lwpid from thread.
11781 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
11782 (proceed_one_lwp): Update, "entry" parameter is a
11783 struct thread_info * now. Fetch lwpid from thread.
11784 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
11785 struct thread_info * now.
11786 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
11787 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
11788 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
11790 (regsets_store_inferior_registers): Ditto.
11791 (fetch_register, store_register): Ditto.
11792 (linux_read_memory, linux_write_memory): Ditto.
11793 (linux_request_interrupt): Ditto.
11794 (linux_read_auxv): Ditto.
11795 (linux_xfer_siginfo): Ditto.
11796 (linux_qxfer_spu): Ditto.
11797 (linux_qxfer_libraries_svr4): Ditto.
11798 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
11799 moved to inferiors.h.
11801 (get_thread_lwp): Update.
11802 (struct lwp_info): Delete member "entry". Simplify comment for
11804 (all_lwps): Delete.
11805 * linux-mips-low.c (mips_read_description): Fetch lwpid from
11806 current_inferior directly.
11807 (update_watch_registers_callback): Update, "entry" parameter is a
11808 struct thread_info * now. Fetch pid from thread.
11809 (mips_linux_prepare_to_resume): Fetch ptid from thread.
11810 (mips_insert_point): Fetch lwpid from current_inferior.
11811 Pass &all_threads to find_inferior, not &all_lwps.
11812 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
11813 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
11815 (mips_stopped_data_address): Ditto.
11816 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
11818 * linux-tile-low.c (tile_arch_setup): Ditto.
11819 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
11820 (update_debug_registers_callback): Update, "entry" parameter is a
11821 struct thread_info * now. Fetch pid from thread.
11822 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
11823 Pass &all_threads to find_inferior, not &all_lwps.
11824 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
11825 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
11826 Pass &all_threads to find_inferior, not &all_lwps.
11827 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
11828 (i386_dr_low_get_status): Ditto.
11829 (x86_linux_prepare_to_resume): Fetch ptid from thread.
11830 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
11831 (x86_linux_read_description): Ditto.
11832 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
11834 2014-02-20 Doug Evans <dje@google.com>
11836 * inferiors.c (get_first_inferior): Fix buglet.
11838 2014-02-19 Doug Evans <dje@google.com>
11840 * gdbthread.h (add_thread): Change result type to struct thread_info *.
11841 * inferiors.c (add_thread): Change result type to struct thread_info *.
11842 All callers updated.
11843 (add_lwp): Call add_thread here instead of in callers.
11844 All callers updated.
11845 * linux-low.h (get_lwp_thread): Rewrite.
11846 (struct lwp_info): New member "thread".
11848 2014-02-19 Doug Evans <dje@google.com>
11850 * linux-low.c (add_lwp): Change result to struct lwp_info *.
11851 All callers updated.
11853 2014-02-19 Doug Evans <dje@google.com>
11855 * inferiors.c (add_thread): Fix whitespace.
11857 2014-02-19 Doug Evans <dje@google.com>
11859 * dll.c (clear_dlls): Replace accessing list implemention details
11861 * gdbthread.h (get_first_thread): Declare.
11862 * inferiors.c (for_each_inferior_with_data): New function.
11863 (get_first_thread): New function.
11864 (find_thread_ptid): Simplify.
11865 (get_first_inferior): New function.
11866 (clear_list): Delete.
11867 (one_inferior_p): New function.
11868 (clear_inferior_list): New function.
11869 (clear_inferiors): Update.
11870 * inferiors.h (for_each_inferior_with_data): Declare.
11871 (clear_inferior_list): Declare.
11872 (one_inferior_p): Declare.
11873 (get_first_inferior): Declare.
11874 * linux-low.c (linux_wait_for_event): Replace accessing list
11875 implemention details with API function.
11876 * server.c (target_running): Ditto.
11877 (accumulate_file_name_length): New function.
11878 (emit_dll_description): New function.
11879 (handle_qxfer_libraries): Replace accessing list implemention
11880 details with API function.
11881 (handle_qxfer_threads_worker): New function.
11882 (handle_qxfer_threads_proper): Replace accessing list implemention
11883 details with API function.
11884 (handle_query): Ditto.
11885 (visit_actioned_threads_callback_ftype): New typedef.
11886 (visit_actioned_threads_data): New struct.
11887 (visit_actioned_threads): Rewrite to be find_inferior callback.
11888 (resume): Call find_inferior.
11889 (handle_status): Replace accessing list implemention
11890 details with API function.
11891 (process_serial_event): Replace accessing list implemention details
11893 * target.c (set_desired_inferior): Replace accessing list implemention
11894 details with API function.
11895 * tracepoint.c (same_process_p): New function.
11896 (gdb_agent_about_to_close): Replace accessing list implemention
11897 details with API function.
11898 * win32-low.c (child_delete_thread): Replace accessing list
11899 implemention details with API function.
11900 (match_dll_by_basename): New function.
11901 (dll_is_loaded_by_basename): New function.
11902 (win32_ensure_ntdll_loaded): Replace accessing list implemention
11903 details call to dll_is_loaded_by_basename.
11905 2014-02-19 Doug Evans <dje@google.com>
11907 * dll.h (struct dll_info): Add comment.
11908 * gdbthread.h (struct thread_info): Add comment.
11909 (current_ptid): Simplify.
11910 * inferiors.c (add_process): Update.
11911 (remove_process): Update.
11912 * inferiors.h (struct process_info): Rename member "head" to "entry".
11913 * linux-low.c (delete_lwp): Update.
11915 (last_thread_of_process_p): Update.
11916 (kill_one_lwp_callback, linux_kill): Update.
11917 (status_pending_p_callback): Update.
11918 (wait_for_sigstop): Update. Simplify read of ptid.
11919 (start_step_over): Update.
11920 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
11921 (get_lwp_thread): Update.
11922 (struct lwp_info): Rename member "head" to "entry".
11923 * regcache.h (inferior_list_entry): Delete.
11924 * server.c (kill_inferior_callback): Update.
11925 (detach_or_kill_inferior_callback): Update.
11926 (print_started_pid): Update.
11927 (print_attached_pid): Update.
11928 (process_serial_event): Simplify read of ptid.
11929 * thread-db.c (thread_db_create_event): Update.
11930 (thread_db_get_tls_address): Update.
11931 * win32-low.c (current_inferior_ptid): Simplify.
11933 2014-02-19 Tom Tromey <tromey@redhat.com>
11935 * target.h (struct target_ops) <supports_btrace>: Add target_ops
11937 (target_supports_btrace): Update.
11939 2014-02-14 Yao Qi <yao@codesourcery.com>
11941 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
11942 (rsp-low-ipa.o): New target.
11944 2014-02-12 Tom Tromey <tromey@redhat.com>
11946 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
11947 convert_ascii_to_int.
11948 * regcache.c (registers_to_string): Likewise.
11949 * remote-utils.c (decode_M_packet): Likewise.
11950 * server.c (process_serial_event): Likewise.
11952 2014-02-12 Tom Tromey <tromey@redhat.com>
11954 * server.c (handle_query, handle_v_run): Use hex2bin, not
11956 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
11958 2014-02-12 Tom Tromey <tromey@redhat.com>
11960 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
11961 convert_int_to_ascii.
11962 * regcache.c (registers_to_string, collect_register_as_string):
11964 * remote-utils.c (look_up_one_symbol, relocate_instruction):
11966 * server.c (process_serial_event): Likewise.
11967 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
11968 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
11970 2014-02-12 Tom Tromey <tromey@redhat.com>
11972 * remote-utils.c (look_up_one_symbol, monitor_output): Use
11973 bin2hex, not hexify.
11974 * tracepoint.c (cmd_qtstatus): Likewise.
11976 2014-02-12 Tom Tromey <tromey@redhat.com>
11978 * remote-utils.c (monitor_output): Pass explicit length to
11981 2014-02-12 Tom Tromey <tromey@redhat.com>
11983 * tracepoint.c: Include rsp-low.h.
11984 * server.c: Include rsp-low.h.
11985 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
11986 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
11988 * remote-utils.c: Include rsp-low.h.
11989 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
11990 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
11991 (convert_int_to_ascii, convert_ascii_to_int): Move to
11993 * regcache.c: Include rsp-low.h.
11994 * ax.c: Include rsp-low.h.
11995 * Makefile.in (SFILES): Add common/rsp-low.c.
11996 (OBS): Add rsp-low.o.
11997 (rsp-low.o): New target.
11999 2014-02-12 Tom Tromey <tromey@redhat.com>
12001 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12002 Include print-utils.h.
12003 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12004 (plongest, thirty_two, phex_nz): Remove.
12005 * Makefile.in (SFILES): Add common/print-utils.c.
12006 (OBS): Add print-utils.o.
12007 (print-utils-ipa.o): New target.
12008 (print-utils.o): New target.
12009 (IPA_OBJS): Add print-utils-ipa.o.
12011 2014-02-06 Tom Tromey <tromey@redhat.com>
12013 * Makefile.in (SFILES): Fix indentation.
12015 2014-02-05 Doug Evans <dje@google.com>
12017 * linux-low.c (linux_wait_for_event): Improve comment.
12018 (linux_wait_1): Keep current_inferior in sync with event_child.
12020 2014-01-22 Doug Evans <dje@google.com>
12022 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12024 2014-01-22 Doug Evans <dje@google.com>
12026 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12027 * configure: Regenerate.
12028 * config.in: Regenerate.
12029 * Makefile.in (SFILES): Add debug.c.
12030 (OBS): Add debug.o.
12031 * debug.c: New file.
12032 * debug.h: New file.
12033 * linux-aarch64-low.c (*): Update all debugging printfs to use
12034 debug_printf instead of fprintf.
12035 * linux-arm-low.c (*): Ditto.
12036 * linux-cris-low.c (*): Ditto.
12037 * linux-crisv32-low.c (*): Ditto.
12038 * linux-m32r-low.c (*): Ditto.
12039 * linux-sparc-low.c (*): Ditto.
12040 * linux-x86.c (*): Ditto.
12041 * linux-low.c (*): Ditto.
12042 (linux_wait_1): Add calls to debug_enter, debug_exit.
12043 (linux_wait): Remove redundant debugging printf.
12044 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12045 (linux_resume, unstop_all_lwps): Ditto.
12046 * mem-break.c (*): Update all debugging printfs to use
12047 debug_printf instead of fprintf.
12048 * remote-utils.c (*): Ditto.
12049 * thread-db.c (*): Ditto.
12050 * server.c #include <ctype.h>, "gdb_vecs.h".
12051 (debug_threads): Moved to debug.c.
12052 (*): Update all debugging printfs to use debug_printf instead of
12054 (start_inferior): Replace call to fflush with call to debug_flush.
12055 (monitor_show_help): Mention set debug-format.
12056 (parse_debug_format_options): New function.
12057 (handle_monitor_command): Handle "monitor set debug-format".
12058 (gdbserver_usage): Mention --debug-format.
12059 (main): Parse --debug-format.
12060 * server.h (debug_threads): Declaration moved to debug.h.
12061 #include "debug.h".
12062 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12063 trace_debug_1 that uses debug_printf.
12064 (tracepoint_look_up_symbols): Update all debugging printfs to use
12065 debug_printf instead of fprintf.
12067 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12069 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12072 2014-01-17 Pedro Alves <palves@redhat.com>
12075 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12076 defined after including gdb_proc_service.h.
12078 2014-01-16 Doug Evans <dje@google.com>
12080 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12081 (match_dll): Use it.
12083 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12085 * target.h (target_ops) <read_btrace>: Change parameters and
12086 return type to allow error reporting.
12087 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12088 trace reading errors on.
12089 * linux-low.c (linux_low_read_btrace): Pass trace reading
12091 (linux_low_disable_btrace): New.
12093 2014-01-15 Doug Evans <dje@google.com>
12095 * inferiors.c (thread_id_to_gdb_id): Delete.
12096 * inferiors.h (thread_id_to_gdb_id): Delete.
12098 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12100 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12101 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12104 2014-01-08 Pedro Alves <palves@redhat.com>
12106 * server.c (handle_status): Don't discard previous queued stop
12107 replies or thread's pending status here.
12108 (main) <disconnection>: Do it here instead.
12110 2014-01-08 Pedro Alves <palves@redhat.com>
12112 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12113 * server.c (visit_actioned_threads, handle_pending_status): New
12115 (handle_v_cont): Factor out parts to ...
12116 (resume): ... this new function. If in all-stop, and a thread
12117 being resumed has a pending status, report it without actually
12119 (myresume): Adjust to use the new 'resume' function.
12120 (clear_pending_status_callback, set_pending_status_callback)
12121 (find_status_pending_thread_callback): New functions.
12122 (handle_status): Handle the case of multiple threads having
12123 interesting statuses to report. Report threads' real last signal
12124 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12125 with an interesting thread to report the status for, instead of
12126 always reporting the status of the first thread.
12128 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12130 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12131 * gdbreplay.c (gdbreplay_version): Likewise.
12133 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12135 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12136 iov.iov_len with the real length in use.
12138 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12140 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12141 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12142 for all targets that use win32-low.c.
12143 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12144 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12146 2013-12-13 Pedro Alves <palves@redhat.com>
12148 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12149 if equal to TARGET_WAITKIND_LOADED.
12150 * win32-low.c (cached_status): New static global.
12151 (win32_wait): Add declaration.
12152 (do_initial_child_stuff): Flush all initial pending debug events
12153 up to the initial breakpoint.
12154 (win32_wait): If CACHED_STATUS was set, return that instead
12155 of doing a real wait. Remove the code resuming the execution
12156 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12157 during the initial phase. Also remove the code changing
12158 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12159 TARGET_WAITKIND_STOPPED.
12161 2013-12-11 Yao Qi <yao@codesourcery.com>
12163 * notif.c (handle_notif_ack): Return 0 if no notification
12166 2013-11-20 Doug Evans <dje@google.com>
12168 * linux-low.c (linux_set_resume_request): Fix comment.
12170 2013-11-20 Doug Evans <dje@google.com>
12172 * linux-low.c (resume_status_pending_p): Tweak comment.
12174 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12176 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12177 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12178 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12179 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12180 (srv_amd64_regobj): Add amd64-mpx.o.
12181 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12182 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12183 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12184 * i387-fp.c (num_pl_bnd_register) Added constant.
12185 (num_pl_bnd_cfg_registers) Added constant.
12186 (struct i387_xsave) Added reserved area and MPX fields.
12187 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12188 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12190 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12191 (init_registers_amd64_mpx_linux): Declare new function.
12192 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12193 (x86_64_regmap): Add MPX registers.
12194 (x86_linux_read_description): Add MPX case.
12195 (initialize_low_arch): Initialize MPX targets.
12197 2013-11-18 Tom Tromey <tromey@redhat.com>
12199 * configure: Rebuild.
12200 * configure.ac: Don't check for stdlib.h.
12201 * gdbreplay.c: Unconditionally include stdlib.h.
12203 2013-11-18 Tom Tromey <tromey@redhat.com>
12205 * config.in: Rebuild.
12206 * configure: Rebuild.
12207 * configure.ac: Don't use AC_HEADER_DIRENT.
12209 2013-11-18 Tom Tromey <tromey@redhat.com>
12211 * server.h: Don't check HAVE_STRING_H.
12212 * gdbreplay.c: Don't check HAVE_STRING_H.
12213 * configure: Rebuild.
12215 2013-11-18 Tom Tromey <tromey@redhat.com>
12217 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12220 2013-11-08 Tom Tromey <tromey@redhat.com>
12222 * configure, config.in: Rebuild.
12223 * configure.ac: Remove unused configury.
12225 2013-11-08 Tom Tromey <tromey@redhat.com>
12227 * acinclude.m4: Include common.m4, codeset.m4.
12228 * configure, config.in: Rebuild.
12229 * configure.ac: Use GDB_AC_COMMON.
12231 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12233 * linux-s390-low.c (HWCAP_S390_TE): New define.
12234 (s390_arch_setup): Consider the TE field in the HWCAP for
12235 determining 'have_regset_tdb'.
12237 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12240 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12243 2013-10-02 Pedro Alves <palves@redhat.com>
12245 * server.c (process_serial_event): Don't output "GDBserver
12246 exiting" if GDB is connected through stdio.
12247 * target.c (mywait): Likewise, be silent if GDB is connected
12250 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12252 * lynx-low.c (lynx_add_threads_after_attach): New function.
12253 (lynx_attach): Remove call to add_thread. Add call to
12254 lynx_add_threads_after_attach instead.
12256 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12258 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12259 * config.in, configure: Regenerated.
12261 2013-09-18 Yao Qi <yao@codesourcery.com>
12264 * server.c (start_inferior): Clear 'resume_info'.
12266 2013-09-16 Jiong Wang <jiwang@tilera.com>
12268 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12271 2013-09-16 Jiong Wang <jiwang@tilera.com>
12273 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12274 linux-tile-low.o to srv_tgtobj.
12276 2013-09-16 Will Newton <will.newton@linaro.org>
12278 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12281 2013-09-06 Pedro Alves <palves@redhat.com>
12283 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12284 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12285 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12286 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12287 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12288 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12290 2013-09-06 Pedro Alves <palves@redhat.com>
12292 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12293 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12295 2013-09-06 Pedro Alves <palves@redhat.com>
12297 * linux-amd64-ipa.c: Include tracepoint.h.
12298 * linux-i386-ipa.c: Include tracepoint.h.
12300 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12302 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12303 (ps_get_thread_area): New function.
12305 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12307 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12308 (initialize_low_arch): Call init_registers_crisv32 rather than
12309 init_register_crisv32.
12311 2013-09-05 Pedro Alves <palves@redhat.com>
12313 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12315 * hostio.h: ... this new file.
12316 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12317 win32-low.c: Include hostio.h.
12319 2013-09-05 Pedro Alves <palves@redhat.com>
12321 * server.h (gdb_client_data, handler_func, callback_handler_func)
12322 (delete_file_handler, add_file_handler, append_callback_event)
12323 (delete_callback_event, start_event_loop, initialize_event_loop):
12324 Move to event-loop.h and include it.
12325 * event-loop.h: New file.
12327 2013-09-05 Pedro Alves <palves@redhat.com>
12329 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12330 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12331 (loaded_dll, unloaded_dll): Move to ...
12332 * dll.h: ... this new file.
12333 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12335 2013-09-05 Pedro Alves <palves@redhat.com>
12337 * server.h (current_process, get_thread_process, all_processes)
12338 (add_inferior_to_list, for_each_inferior, current_inferior)
12339 (remove_inferior, add_process, remove_process, find_process_pid)
12340 (have_started_inferiors_p, have_attached_inferiors_p)
12341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12342 (clear_inferiors, find_inferior, find_inferior_id)
12343 (inferior_target_data, set_inferior_target_data)
12344 (inferior_regcache_data, set_inferior_regcache_data): Move to
12345 inferiors.h, and include it.
12346 * inferiors.h: New file.
12348 2013-09-05 Pedro Alves <palves@redhat.com>
12350 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12354 2013-09-05 Pedro Alves <palves@redhat.com>
12356 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12358 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12359 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12360 (handle_tracepoint_general_set, handle_tracepoint_query)
12361 (tracepoint_finished_step, tracepoint_was_hit)
12362 (release_while_stepping_state_list, current_traceframe)
12363 (in_readonly_region, traceframe_read_mem)
12364 (fetch_traceframe_registers, traceframe_read_sdata)
12365 (traceframe_read_info, struct fast_tpoint_collect_status)
12366 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12367 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12368 (supply_fast_tracepoint_registers)
12369 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12370 (ipa_tdesc, claim_trampoline_space)
12371 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12372 (agent_mem_read, agent_get_trace_state_variable_value)
12373 (agent_set_trace_state_variable_value, agent_tsv_read)
12374 (agent_mem_read_string, get_raw_reg_func_addr)
12375 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12376 * tracepoint.h: ... this new file.
12378 2013-09-05 Pedro Alves <palves@redhat.com>
12380 * server.h (perror_with_name, error, fatal, warning, paddress)
12381 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12383 * utils.h: New file.
12385 2013-09-05 Pedro Alves <palves@redhat.com>
12387 * server.h (remote_debug, noack_mode, transport_is_reliable)
12388 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12389 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12390 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12391 (write_enn, initialize_async_io, enable_async_io)
12392 (disable_async_io, check_remote_input_interrupt_request)
12393 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12394 (dead_thread_notify, prepare_resume_reply)
12395 (decode_address_to_semicolon, decode_address, decode_m_packet)
12396 (decode_M_packet, decode_X_packet, decode_xfer_write)
12397 (decode_search_memory_packet, unhexify, hexify)
12398 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12399 (look_up_one_symbol, relocate_instruction)
12400 (monitor_output): Move to remote-utils.h, and include it.
12401 * remote-utils.h: New file.
12403 2013-09-05 Pedro Alves <palves@redhat.com>
12405 * server.h (_): Delete.
12407 2013-09-02 Pedro Alves <palves@redhat.com>
12409 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12410 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12412 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12414 2013-09-02 Pierre Muller <muller@sourceware.org>
12416 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12417 or WriteProcessMemory complete successfully and handle
12418 ERROR_PARTIAL_COPY error.
12420 2013-09-02 Pedro Alves <palves@redhat.com>
12422 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12423 error instead of EIO.
12425 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12428 * linux-low.c: Include filestuff.h.
12429 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12430 * lynx-low.c: Include filestuff.h.
12431 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12432 * server.c: Include filestuff.h.
12433 (main): Call notice_open_fds.
12434 * spu-low.c: Include filestuff.h.
12435 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12437 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12439 * Makefile.in: Explain why ../target and ../nat are not
12440 listed as include file search paths.
12441 (linux-waitpid.o): New object file rule.
12442 * configure.srv (srv_native_linux_obj): New variable.
12443 Replace all occurrences of linux native object files with
12444 $srv_native_linux_obj.
12445 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12446 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12447 (linux_enable_event_reporting): Remove declaration.
12448 (my_waitpid): Moved to common/linux-waitpid.c.
12449 (linux_wait_for_event): Pass ptid when calling
12450 linux_enable_event_reporting.
12451 (linux_supports_tracefork_flag): Remove.
12452 (linux_enable_event_reporting): Likewise.
12453 (linux_tracefork_grandchild): Remove.
12454 (STACK_SIZE): Moved to common/linux-ptrace.c.
12455 (linux_tracefork_child): Remove.
12456 (linux_test_for_tracefork): Remove.
12457 (linux_look_up_symbols): Call linux_supports_traceclone.
12458 (initialize_low): Remove call to linux_test_for_tracefork.
12459 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12460 common/linux-ptrace.h.
12461 (PTRACE_TYPE_ARG4): Likewise.
12462 Include linux-ptrace.h.
12464 2013-08-21 Pedro Alves <palves@redhat.com>
12466 * config.in: Renegerate.
12468 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
12470 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12471 (SFILES): Remove $(srcdir)/common/target-common.c and
12472 add $(srcdir)/target/waitstatus.c.
12473 (OBS): Remove target-common.o and add waitstatus.o.
12474 (server_h): Remove $(srcdir)/../common/target-common.h and
12475 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12476 and $(srcdir)/../target/waitstatus.h.
12477 (target-common.o): Remove.
12478 (waitstatus.o): New target object file.
12479 * target.h: Do not include target-common.h and
12480 include target/resume.h, target/wait.h and
12481 target/waitstatus.h.
12483 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
12485 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12486 to PTRACE_TYPE_ARG3.
12487 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12488 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12490 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12491 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12493 2013-07-27 Jie Zhang <jie@codesourcery.com>
12494 Daniel Jacobowitz <dan@codesourcery.com>
12495 Yao Qi <yao@codesourcery.com>
12497 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12498 (mips-linux-watch.o): New rule.
12499 (mips_linux_watch_h): New variable.
12500 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12502 * linux-mips-low.c: Include mips-linux-watch.h.
12503 (struct arch_process_info, struct arch_lwp_info): New.
12504 (update_watch_registers_callback): New function.
12505 (mips_linux_new_process, mips_linux_new_thread) New functions.
12506 (mips_linux_prepare_to_resume, mips_insert_point): New
12508 (mips_remove_point, mips_stopped_by_watchpoint): New
12510 (rsp_bp_type_to_target_hw_bp_type): New function.
12511 (mips_stopped_data_address): New function.
12512 (the_low_target): Add watchpoint support functions.
12514 2013-07-27 Yao Qi <yao@codesourcery.com>
12516 * i386-low.c: Include break-common.h.
12517 (enum target_hw_bp_type): Remove.
12519 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
12521 * Makefile.in (SFILES): /common/target-common.c.
12522 (OBS): Add target-common.o.
12523 (server_h): Add $(srcdir)/../common/target-common.h.
12524 (target-common.o): New target.
12525 * server.c (queue_stop_reply_callback): Free
12526 status string after use.
12527 * target.c (target_waitstatus_to_string): Remove.
12528 * target.h: Include target-common.h.
12529 (resume_kind): Likewise.
12530 (target_waitkind): Likewise.
12531 (target_waitstatus): Likewise.
12532 (TARGET_WNOHANG): Likewise.
12534 2013-07-04 Yao Qi <yao@codesourcery.com>
12536 * Makefile.in (host_alias): Use @host_noncanonical@.
12537 (target_alias): Use @target_noncanonical@.
12538 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12539 ACX_NONCANONICAL_HOST.
12540 * configure: Regenerated.
12543 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12545 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12546 * configure: Rebuild.
12547 * Makefile.in (version_host, version_target): Get from configure.
12548 (version.c): Use $(version_host) and $(version_target).
12550 2013-07-03 Pedro Alves <palves@redhat.com>
12552 * Makefile.in (config.status): Depend on development.sh.
12553 * acinclude.m4: Include libmcheck.m4.
12554 * configure: Regenerate.
12556 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12558 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12559 attribute inside the parentheses.
12560 (winapi_DebugSetProcessKillOnExit): Ditto.
12561 (winapi_DebugBreakProcess): Ditto.
12562 (winapi_GenerateConsoleCtrlEvent): Ditto.
12564 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12566 * notif.h (notif_event): Add a dummy member to avoid compiler
12569 2013-07-01 Pedro Alves <palves@redhat.com>
12571 * hostio.c (HOSTIO_PATH_MAX): Define.
12572 (require_filename, handle_open, handle_unlink, handle_readlink):
12575 2013-07-01 Pedro Alves <palves@redhat.com>
12577 * server.h: Include "pathmax.h".
12578 * linux-low.c: Don't include sys/param.h.
12579 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12581 * win32-low.c: Don't include sys/param.h.
12582 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12584 2013-07-01 Pedro Alves <palves@redhat.com>
12586 * event-loop.c: Don't check HAVE_UNISTD_H before including
12588 * gdbreplay.c: Likewise.
12589 * remote-utils.c: Likewise.
12590 * server.c: Likewise.
12591 * configure.ac: Don't check for unistd.h.
12592 * configure: Regenerate.
12594 2013-06-28 Tom Tromey <tromey@redhat.com>
12596 * Makefile.in (version.c): Use version.in, not
12599 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12601 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12602 * configure: Rebuild.
12603 * Makefile.in (version_host, version_target): Get from configure.
12604 (version.c): Use $(version_host) and $(version_target).
12606 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12608 Fix trace-status to output user name without trailing colon.
12609 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12611 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12613 Fix trace-status to output proper start-time and stop-time.
12614 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12615 output start time and stop time in hex as gdb expects.
12617 2013-06-26 Pedro Alves <pedro@codesourcery.com>
12619 * tracepoint.c (build_traceframe_info_xml): Output trace state
12620 variables present in the trace buffer.
12622 2013-06-24 Tom Tromey <tromey@redhat.com>
12624 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12626 (version.o): Remove.
12627 * gdbreplay.c: Include version.h.
12628 (version, host_name): Don't declare.
12629 * server.h: Include version.h.
12630 (version, host_name): Don't declare.
12632 2013-06-12 Pedro Alves <palves@redhat.com>
12634 * linux-x86-low.c (linux_is_elf64): Delete global.
12635 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12636 with local linux_pid_exe_is_elf_64_file use.
12638 2013-06-11 Pedro Alves <palves@redhat.com>
12640 * linux-low.c (regset_disabled, disable_regset): New functions.
12641 (regsets_fetch_inferior_registers)
12642 (regsets_store_inferior_registers): Use them.
12643 (initialize_regsets_info); Don't allocate the disabled_regsets
12645 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12648 2013-06-11 Pedro Alves <palves@redhat.com>
12650 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12653 2013-06-11 Pedro Alves <palves@redhat.com>
12655 * linux-x86-low.c (initialize_low_arch): Call
12656 init_registers_x32_avx_linux.
12658 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
12660 Fix compatibility with Android Bionic.
12661 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
12664 2013-06-07 Pedro Alves <palves@redhat.com>
12667 * Makefile.in (OBS): Add tdesc.o.
12668 (IPA_OBJS): Add tdesc-ipa.o.
12669 (tdesc-ipa.o): New rule.
12670 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
12672 * linux-low.c (new_inferior): Delete.
12673 (disabled_regsets, num_regsets): Delete.
12674 (linux_add_process): Adjust to set the new per-process
12676 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
12677 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
12678 was a stop. When calling arch_setup, switch the current inferior
12679 to the thread that got an event.
12680 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
12681 (regsets_fetch_inferior_registers)
12682 (regsets_store_inferior_registers): New regsets_info parameter.
12684 (linux_register_in_regsets): New regs_info parameter. Adjust to
12686 (register_addr, fetch_register, store_register): New usrregs_info
12687 parameter. Adjust to use it.
12688 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
12689 parameter regs_info. Adjust to use it.
12690 (linux_fetch_registers): Get the current inferior's regs_info, and
12692 (linux_store_registers): Ditto.
12693 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
12694 (initialize_low): Don't initialize the target_regsets here. Call
12695 initialize_low_arch.
12696 * linux-low.h (target_regsets): Delete declaration.
12697 (struct regsets_info): New.
12698 (struct usrregs_info): New.
12699 (struct regs_info): New.
12700 (struct process_info_private) <new_inferior>: New field.
12701 (struct linux_target_ops): Delete the num_regs, regmap, and
12702 regset_bitmap fields. New field regs_info.
12703 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
12704 * i387-fp.c (num_xmm_registers): Delete.
12705 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
12706 calls to new interface.
12707 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
12708 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
12709 Infer the number of xmm registers from the regcache's target
12711 * i387-fp.h (num_xmm_registers): Delete.
12712 * inferiors.c (add_thread): Don't install the thread's regcache
12714 * proc-service.c (gregset_info): Fetch the current inferior's
12715 regs_info. Adjust to use it.
12716 * regcache.c: Include tdesc.h.
12717 (register_bytes, reg_defs, num_registers)
12718 (gdbserver_expedite_regs): Delete.
12719 (get_thread_regcache): If the thread doesn't have a regcache yet,
12720 create one, instead of aborting gdbserver.
12721 (regcache_invalidate_one): Rename to ...
12722 (regcache_invalidate_thread): ... this.
12723 (regcache_invalidate_one): New.
12724 (regcache_invalidate): Only invalidate registers of the current
12726 (init_register_cache): Add target_desc parameter, and use it.
12727 (new_register_cache): Ditto. Assert the target description has a
12728 non zero registers_size.
12729 (regcache_cpy): Add assertions. Adjust.
12730 (realloc_register_cache, set_register_cache): Delete.
12731 (registers_to_string, registers_from_string): Adjust.
12732 (find_register_by_name, find_regno, find_register_by_number)
12733 (register_cache_size): Add target_desc parameter, and use it.
12734 (free_register_cache_thread, free_register_cache_thread_one)
12735 (regcache_release, register_cache_size): New.
12736 (register_size): Add target_desc parameter, and use it.
12737 (register_data, supply_register, supply_register_zeroed)
12738 (supply_regblock, supply_register_by_name, collect_register)
12739 (collect_register_as_string, collect_register_by_name): Adjust.
12740 * regcache.h (struct target_desc): Forward declare.
12741 (struct regcache) <tdesc>: New field.
12742 (init_register_cache, new_register_cache): Add target_desc
12744 (regcache_invalidate_thread): Declare.
12745 (regcache_invalidate_one): Delete declaration.
12746 (regcache_release): Declare.
12747 (find_register_by_number, register_cache_size, register_size)
12748 (find_regno): Add target_desc parameter.
12749 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
12751 * remote-utils.c: Include tdesc.h.
12752 (outreg, prepare_resume_reply): Adjust.
12753 * server.c: Include tdesc.h.
12754 (gdbserver_xmltarget): Delete declaration.
12755 (get_features_xml, process_serial_event): Adjust.
12756 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
12758 (struct process_info) <tdesc>: New field.
12759 (ipa_tdesc): Declare.
12760 * tdesc.c: New file.
12761 * tdesc.h: New file.
12762 * tracepoint.c: Include tdesc.h.
12763 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
12764 (get_context_regcache): Adjust to pass ipa_tdesc down.
12765 (do_action_at_tracepoint): Adjust to get the register cache size
12766 from the context regcache's description.
12767 (traceframe_walk_blocks): Adjust to get the register cache size
12768 from the current trace frame's description.
12769 (traceframe_get_pc): Adjust to get current trace frame's
12770 description and pass it down.
12771 (gdb_collect): Adjust to get the register cache size from the
12773 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
12774 (gdbserver_xmltarget): Delete.
12775 (initialize_low_tracepoint): Set the ipa's target description.
12776 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
12777 (initialize_low_tracepoint): Set the ipa's target description.
12778 * linux-x86-low.c: Include tdesc.h.
12779 [__x86_64__] (is_64bit_tdesc): New.
12780 (ps_get_thread_area, x86_get_thread_area): Use it.
12781 (i386_cannot_store_register): Rename to ...
12782 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
12783 (i386_cannot_fetch_register): Rename to ...
12784 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
12785 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
12787 (target_regsets): Rename to ...
12788 (x86_regsets): ... this.
12789 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
12791 (x86_siginfo_fixup): Use is_64bit_tdesc.
12792 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
12793 (tdesc_x32_avx_linux, tdesc_x32_linux)
12794 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
12796 (x86_linux_update_xmltarget): Delete.
12797 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
12798 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
12799 (AMD64_LINUX_USER64_CS): New.
12800 (x86_linux_read_description): New, based on
12801 x86_linux_update_xmltarget.
12802 (same_process_callback): New.
12803 (x86_arch_setup_process_callback): New.
12804 (x86_linux_update_xmltarget): New.
12805 (x86_regsets_info): New.
12806 (amd64_linux_regs_info): New.
12807 (i386_linux_usrregs_info): New.
12808 (i386_linux_regs_info): New.
12809 (x86_linux_regs_info): New.
12810 (x86_arch_setup): Reimplement.
12811 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
12812 (x86_emit_ops): Ditto.
12813 (the_low_target): Adjust. Install x86_linux_regs_info,
12814 x86_cannot_fetch_register, and x86_cannot_store_register.
12815 (initialize_low_arch): New.
12816 * linux-ia64-low.c (tdesc_ia64): Declare.
12817 (ia64_fetch_register): Adjust.
12818 (ia64_usrregs_info, regs_info): New globals.
12819 (ia64_regs_info): New function.
12820 (the_low_target): Adjust.
12821 (initialize_low_arch): New function.
12822 * linux-sparc-low.c (tdesc_sparc64): Declare.
12823 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
12825 (sparc_arch_setup): New function.
12826 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
12827 (the_low_target): Adjust.
12828 (initialize_low_arch): New function.
12829 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
12830 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
12831 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
12832 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
12833 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
12834 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
12835 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
12836 (tdesc_powerpc_isa205_vsx64l): Declare.
12837 (ppc_cannot_store_register, ppc_collect_ptrace_register)
12838 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
12839 (ppc_set_pc, ppc_get_hwcap): Adjust.
12840 (ppc_usrregs_info): Forward declare.
12841 (!__powerpc64__) ppc_regmap_adjusted: New global.
12842 (ppc_arch_setup): Adjust to the current process'es target
12844 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
12845 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
12846 (ppc_store_evrregset): Adjust.
12847 (target_regsets): Rename to ...
12848 (ppc_regsets): ... this, and make static.
12849 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
12850 (ppc_regs_info): New function.
12851 (the_low_target): Adjust.
12852 (initialize_low_arch): New function.
12853 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
12854 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
12855 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
12856 (tdesc_s390x_linux64v2): Declare.
12857 (s390_collect_ptrace_register, s390_supply_ptrace_register)
12858 (s390_fill_gregset, s390_store_last_break): Adjust.
12859 (target_regsets): Rename to ...
12860 (s390_regsets): ... this, and make static.
12861 (s390_get_pc, s390_set_pc): Adjust.
12862 (s390_get_hwcap): New target_desc parameter, and use it.
12863 [__s390x__] (have_hwcap_s390_high_gprs): New global.
12864 (s390_arch_setup): Adjust to set the current process'es target
12865 description. Don't adjust the regmap.
12866 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
12867 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
12868 (regs_info_3264): New globals.
12869 (s390_regs_info): New function.
12870 (the_low_target): Adjust.
12871 (initialize_low_arch): New function.
12872 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
12873 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
12874 [__mips64] (init_registers_mips_linux)
12875 (init_registers_mips_dsp_linux): Delete defines.
12876 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
12877 (have_dsp): New global.
12878 (mips_read_description): New, based on mips_arch_setup.
12879 (mips_arch_setup): Reimplement.
12880 (get_usrregs_info): New function.
12881 (mips_cannot_fetch_register, mips_cannot_store_register)
12882 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
12883 (mips_fill_fpregset, mips_store_fpregset): Adjust.
12884 (target_regsets): Rename to ...
12885 (mips_regsets): ... this, and make static.
12886 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
12887 (dsp_regs_info, regs_info): New globals.
12888 (mips_regs_info): New function.
12889 (the_low_target): Adjust.
12890 (initialize_low_arch): New function.
12891 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
12892 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
12894 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
12895 (arm_read_description): New, with bits factored from
12897 (arm_arch_setup): Reimplement.
12898 (target_regsets): Rename to ...
12899 (arm_regsets): ... this, and make static.
12900 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
12901 (arm_regs_info): New function.
12902 (the_low_target): Adjust.
12903 (initialize_low_arch): New function.
12904 * linux-m68k-low.c (tdesc_m68k): Declare.
12905 (target_regsets): Rename to ...
12906 (m68k_regsets): ... this, and make static.
12907 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
12908 (m68k_regs_info): New function.
12909 (m68k_arch_setup): New function.
12910 (the_low_target): Adjust.
12911 (initialize_low_arch): New function.
12912 * linux-sh-low.c (tdesc_sharch): Declare.
12913 (target_regsets): Rename to ...
12914 (sh_regsets): ... this, and make static.
12915 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
12916 (sh_regs_info, sh_arch_setup): New functions.
12917 (the_low_target): Adjust.
12918 (initialize_low_arch): New function.
12919 * linux-bfin-low.c (tdesc_bfin): Declare.
12920 (bfin_arch_setup): New function.
12921 (bfin_usrregs_info, regs_info): New globals.
12922 (bfin_regs_info): New function.
12923 (the_low_target): Adjust.
12924 (initialize_low_arch): New function.
12925 * linux-cris-low.c (tdesc_cris): Declare.
12926 (cris_arch_setup): New function.
12927 (cris_usrregs_info, regs_info): New globals.
12928 (cris_regs_info): New function.
12929 (the_low_target): Adjust.
12930 (initialize_low_arch): New function.
12931 * linux-cris-low.c (tdesc_crisv32): Declare.
12932 (cris_arch_setup): New function.
12933 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
12934 (cris_regs_info): New function.
12935 (the_low_target): Adjust.
12936 (initialize_low_arch): New function.
12937 * linux-m32r-low.c (tdesc_m32r): Declare.
12938 (m32r_arch_setup): New function.
12939 (m32r_usrregs_info, regs_info): New globals.
12940 (m32r_regs_info): Adjust.
12941 (initialize_low_arch): New function.
12942 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
12943 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
12944 (tic6x_usrregs_info): Forward declare.
12945 (tic6x_read_description): New function, based on ...
12946 (tic6x_arch_setup): ... this. Reimplement.
12947 (target_regsets): Rename to ...
12948 (tic6x_regsets): ... this, and make static.
12949 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
12950 (tic6x_regs_info): New function.
12951 (the_low_target): Adjust.
12952 (initialize_low_arch): New function.
12953 * linux-xtensa-low.c (tdesc_xtensa): Declare.
12954 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
12955 (target_regsets): Rename to ...
12956 (xtensa_regsets): ... this, and make static.
12957 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
12959 (xtensa_arch_setup, xtensa_regs_info): New functions.
12960 (the_low_target): Adjust.
12961 (initialize_low_arch): New function.
12962 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
12963 (nios2_arch_setup): Set the current process'es tdesc.
12964 (target_regsets): Rename to ...
12965 (nios2_regsets): ... this.
12966 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
12967 (nios2_regs_info): New function.
12968 (the_low_target): Adjust.
12969 (initialize_low_arch): New function.
12970 * linux-aarch64-low.c (tdesc_aarch64): Declare.
12971 (aarch64_arch_setup): Set the current process'es tdesc.
12972 (target_regsets): Rename to ...
12973 (aarch64_regsets): ... this.
12974 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
12975 (aarch64_regs_info): New function.
12976 (the_low_target): Adjust.
12977 (initialize_low_arch): New function.
12978 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
12980 (target_regsets): Rename to ...
12981 (tile_regsets): ... this.
12982 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
12983 (tile_regs_info): New function.
12984 (tile_arch_setup): Set the current process'es tdesc.
12985 (the_low_target): Adjust.
12986 (initialize_low_arch): New function.
12987 * spu-low.c (tdesc_spu): Declare.
12988 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
12989 * win32-arm-low.c (tdesc_arm): Declare.
12990 (arm_arch_setup): New function.
12991 (the_low_target): Install arm_arch_setup instead of
12992 init_registers_arm.
12993 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
12994 (init_windows_x86): Rename to ...
12995 (i386_arch_setup): ... this. Set `win32_tdesc'.
12996 (the_low_target): Adjust.
12997 * win32-low.c (win32_tdesc): New global.
12998 (child_add_thread): Don't create the thread cache here.
12999 (do_initial_child_stuff): Set the new process'es tdesc.
13000 * win32-low.h (struct target_desc): Forward declare.
13001 (win32_tdesc): Declare.
13002 * lynx-i386-low.c (tdesc_i386): Declare global.
13003 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13004 * lynx-low.c (lynx_tdesc): New global.
13005 (lynx_add_process): Set the new process'es tdesc.
13006 * lynx-low.h (struct target_desc): Forward declare.
13007 (lynx_tdesc): Declare global.
13008 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13009 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13010 * nto-low.c (nto_tdesc): New global.
13011 (do_attach): Set the new process'es tdesc.
13012 * nto-low.h (struct target_desc): Forward declare.
13013 (nto_tdesc): Declare.
13014 * nto-x86-low.c (tdesc_i386): Declare.
13015 (nto_x86_arch_setup): Set `nto_tdesc'.
13017 2013-06-04 Gary Benson <gbenson@redhat.com>
13019 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13020 to qSupported response when appropriate.
13021 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13022 with nonzero-length annex.
13023 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13024 arguments supplied in annex.
13026 2013-05-31 Doug Evans <dje@google.com>
13029 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13030 64 bits in 64-cross-32 environment.
13032 2013-05-28 Pedro Alves <palves@redhat.com>
13034 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13035 (aarch64-without-fpu.c): Delete rule.
13036 * configure.srv (aarch64*-*-linux*): Remove references to
13037 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13038 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13041 2013-05-24 Pedro Alves <palves@redhat.com>
13043 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13044 instead of strchr/decode_address. Error if the range isn't split
13045 with a ','. Don't assume there's be a ':' in the action.
13047 2013-05-23 Yao Qi <yao@codesourcery.com>
13048 Pedro Alves <palves@redhat.com>
13050 * linux-low.c (lwp_in_step_range): New function.
13051 (linux_wait_1): If the thread was range stepping and stopped
13052 outside the stepping range, report the stop to GDB. Otherwise,
13053 continue stepping. Add range stepping debug output.
13054 (linux_set_resume_request): Copy the step range from the resume
13055 request to the lwp.
13056 (linux_supports_range_stepping): New.
13057 (linux_target_ops) <supports_range_stepping>: Set to
13058 linux_supports_range_stepping.
13059 * linux-low.h (struct linux_target_ops)
13060 <supports_range_stepping>: New field.
13061 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13062 * linux-x86-low.c (x86_supports_range_stepping): New.
13063 (the_low_target) <supports_range_stepping>: Set to
13064 x86_supports_range_stepping.
13065 * server.c (handle_v_cont): Handle 'r' action.
13066 (handle_v_requests): Append ";r" if the target supports range
13068 * target.h (struct thread_resume) <step_range_start,
13069 step_range_end>: New fields.
13070 (struct target_ops) <supports_range_stepping>:
13072 (target_supports_range_stepping): New macro.
13074 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13076 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13077 confusion in comment.
13079 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13081 * lynx-low.c (struct process_info_private): New type.
13082 (lynx_add_process): New function.
13083 (lynx_create_inferior, lynx_attach): Replace calls to
13084 add_process by calls to lynx_add_process.
13085 (lynx_resume): If PTID is null, then try using
13086 current_process()->private->last_wait_event_ptid.
13088 (lynx_clear_inferiors): Delete. The contents of that function
13089 has been inlined in lynx_mourn;
13090 (lynx_wait_1): Save the ptid in the process's private data.
13091 (lynx_mourn): Free the process' private data. Replace call
13092 to lynx_clear_inferiors by call to clear_inferiors.
13094 2013-05-17 Yao Qi <yao@codesourcery.com>
13096 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13099 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13101 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13102 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13103 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13104 PT_TEXT_END_ADDR guards. Update comments.
13105 (linux_target_op) <read_offsets>: Conditionally define to
13106 linux_read_offsets if the target is UCLIBC and if it defines
13107 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13109 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13110 Andrew Jenner <andrew@codesourcery.com>
13112 * Makefile.in (SFILES): Add linux-nios2-low.c.
13113 (clean): Add action to delete nios2-linux.c.
13114 (nios2-linux.c): New rule.
13115 * configure.srv: Add nios2*-*-linux*.
13116 * linux-nios2-low.c: New.
13118 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13120 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13122 2013-04-25 Hui Zhu <hui@codesourcery.com>
13125 * ax.c (ax_printf): Add fflush.
13127 2013-04-22 Tom Tromey <tromey@redhat.com>
13129 * Makefile.in (SFILES): Add filestuff.c.
13130 (OBS): Add filestuff.o.
13131 (filestuff.o): New target.
13132 * config.in, configure: Rebuild.
13133 * configure.ac: Check for fdwalk, pipe2.
13135 2013-04-17 Pedro Alves <palves@redhat.com>
13137 * configure.ac (USE_THREAD_DB): Delete variable.
13138 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13139 Don't AC_SUBST USE_THREAD_DB.
13140 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13141 * config.in, configure: Regenerate.
13143 2013-04-16 Pedro Alves <palves@redhat.com>
13145 * linux-low.h (struct lwp_info) <thread_known>: Move under
13146 the USE_THREAD_DB #ifdef.
13148 2013-04-16 Pedro Alves <palves@redhat.com>
13150 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13151 (linux-low.o): Delete rule.
13152 * linux-low.h: Always include "gdb_thread_db.h" instead of
13153 conditionally including thread_db.h.
13154 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13157 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13159 * Makefile.in (install-only): Fix make install regression.
13161 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13163 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13164 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13166 * gdbserver.1: Remove.
13168 2013-03-22 Pedro Alves <palves@redhat.com>
13170 * linux-low.c (handle_extended_wait): Don't call
13171 linux_enable_event_reporting.
13173 2013-03-15 Tony Theodore <tonyt@logyst.com>
13176 * Makefile.in (SHELL): Use @SHELL@.
13178 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13180 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13183 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13185 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13186 Remove extraneous NULL element.
13188 2013-03-13 Yao Qi <yao@codesourcery.com>
13190 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13191 'V' block in trace frame.
13193 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13195 * target.h (struct target_ops): Add btrace ops.
13196 (target_supports_btrace): New macro.
13197 (target_enable_btrace): New macro.
13198 (target_disable_btrace): New macro.
13199 (target_read_btrace): New macro.
13200 * gdbthread.h (struct thread_info): Add btrace field.
13201 * server.c: Include btrace-common.h.
13202 (handle_btrace_general_set): New function.
13203 (handle_btrace_enable): New function.
13204 (handle_btrace_disable): New function.
13205 (handle_general_set): Call handle_btrace_general_set.
13206 (handle_qxfer_btrace): New function.
13207 (struct qxfer qxfer_packets[]): Add btrace entry.
13208 * inferiors.c (remove_thread): Disable btrace.
13209 * linux-low: Include linux-btrace.h.
13210 (linux_low_enable_btrace): New function.
13211 (linux_low_read_btrace): New function.
13212 (linux_target_ops): Add btrace ops.
13213 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13214 Add srv_linux_btrace=yes.
13215 (x86_64-*-linux*): Add linux-btrace.o.
13216 Add srv_linux_btrace=yes.
13217 * configure.ac: Define HAVE_LINUX_BTRACE.
13218 * config.in: Regenerated.
13219 * configure: Regenerated.
13221 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13223 * server.c (handle_qxfer): Preserve error message if -3 is
13225 (qxfer): Document the -3 return value.
13227 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13229 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13230 (linux_btrace_h): New variable.
13231 (linux-btrace.o): New rule.
13233 2013-03-08 Stan Shebs <stan@codesourcery.com>
13234 Hafiz Abid Qadeer <abidh@codesourcery.com>
13236 * tracepoint.c (trace_buffer_size): New global.
13237 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13238 (init_trace_buffer): Change to one-argument function. Allocate
13239 trace buffer memory.
13240 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13241 handle QTBuffer:size packet.
13242 (cmd_bigqtbuffer_size): New function.
13243 (initialize_tracepoint): Call init_trace_buffer with
13244 DEFAULT_TRACE_BUFFER_SIZE.
13245 * server.c (handle_query): Add QTBuffer:size in the
13248 2013-03-07 Yao Qi <yao@codesourcery.com>
13250 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13251 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13253 (cmd_qtsp): Adjust condition. Do post increment.
13254 Set cur_action and cur_step_action back to 0.
13256 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13259 * linux-low.c (linux_write_memory): Return early success if LEN is
13262 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13264 * configure.srv: Add x86_64-*-cygwin* as target.
13266 2013-02-28 Tom Tromey <tromey@redhat.com>
13268 * configure.ac: Invoke AC_SYS_LARGEFILE.
13269 * configure, config.in: Rebuild.
13271 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13273 * win32-low.c: Throughout, fix format strings and casts of
13274 printf-like functions to avoid type related warnings on all
13276 (get_child_debug_event): Print dwDebugEventCode as hex since
13277 that's how it's usually documented.
13279 2013-02-28 Yao Qi <yao@codesourcery.com>
13281 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13284 2013-02-27 Jiong Wang <jiwang@tilera.com>
13286 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13287 (reg-tilegx32.c): New rule.
13288 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13289 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13290 different register info initializer according to elf class.
13291 (init_registers_tilgx32): New function. The tilegx32 register info
13293 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13294 (tile_store_gregset): Likewise.
13296 2013-02-27 Yao Qi <yao@codesourcery.com>
13298 * server.c (process_point_options): Print debug message when
13299 debug_threads is true.
13301 2013-02-26 Yao Qi <yao@codesourcery.com>
13303 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13305 2013-02-19 Pedro Alves <palves@redhat.com>
13306 Kai Tietz <ktietz@redhat.com>
13310 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13311 instead of strtoul to extract address from packet.
13312 (process_serial_event) <'z'>: Likewise.
13314 2013-02-18 Yao Qi <yao@codesourcery.com>
13316 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13318 2013-02-14 Pedro Alves <palves@redhat.com>
13322 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13323 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13325 2013-02-14 Pedro Alves <palves@redhat.com>
13327 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13329 2013-02-14 Pedro Alves <palves@redhat.com>
13331 * tracepoint.c (save_string): Delete.
13332 (add_tracepoint_action): Use savestring instead of save_string.
13334 2013-02-12 Pedro Alves <palves@redhat.com>
13336 * linux-xtensa-low.c: Ditto.
13337 * xtensa-xtregs.c: Ditto.
13339 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13341 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13344 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13346 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13347 aarch64_num_wp_regs and aarch64_num_bp_regs to
13348 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13350 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13352 * linux-aarch64-low.c (ps_get_thread_area): Replace
13353 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13355 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13356 Marcus Shawcroft <marcus.shawcroft@arm.com>
13357 Nigel Stephens <nigel.stephens@arm.com>
13358 Yufeng Zhang <yufeng.zhang@arm.com>
13360 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13361 (aarch64.c, aarch64-without-fpu.c): New targets.
13362 * configure.srv (aarch64*-*-linux*): New.
13363 * linux-aarch64-low.c: New file.
13365 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13367 * linux-low.c (handle_extended_wait, linux_create_inferior)
13368 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13369 (dequeue_one_deferred_signal, linux_resume_one_thread)
13370 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13371 (linux_tracefork_grandchild, linux_test_for_tracefork)
13372 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13373 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13374 where the argument is 0.
13376 2013-01-25 Yao Qi <yao@codesourcery.com>
13378 * event-loop.c: Include "queue.h".
13379 (gdb_event_p): New typedef.
13380 (struct gdb_event) <next_event>: Remove.
13381 (event_queue): Change to QUEUE(gdb_event_p).
13382 (async_queue_event): Remove.
13383 (gdb_event_xfree): New.
13384 (initialize_event_loop): New.
13385 (process_event): Use API from QUEUE.
13386 (wait_for_event): Likewise.
13387 * server.c (main): Call initialize_event_loop.
13388 * server.h (initialize_event_loop): Declare.
13390 2013-01-18 Yao Qi <yao@codesourcery.com>
13392 * ax.h (struct eval_agent_expr_context): New.
13393 (gdb_eval_agent_expr): Update declaration.
13394 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13395 TFRAME. Add new argument CTX.
13396 * server.h (struct eval_agent_expr_context): Declare.
13397 (agent_mem_read, agent_tsv_read): Update declaration.
13398 (agent_mem_read_string): Likewise.
13399 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13400 (add_traceframe_block): Add new argument TPOINT.
13401 Increase TPOINT->traceframe_usage.
13402 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13403 eval_tracepoint_agent_expr.
13404 (condition_true_at_tracepoint): Likewise.
13405 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13406 (agent_mem_read_string, agent_tsv_read): Likewise.
13408 2013-01-16 Yao Qi <yao@codesourcery.com>
13410 * linux-low.c (linux_resume_one_lwp): Don't check
13411 'lwp->bp_reinsert != 0'.
13413 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13414 Pedro Alves <palves@redhat.com>
13416 * lynx-low.c (ptrace_request_to_str): Define a temporary
13417 macro and use it to simplify this function's implementation.
13419 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13421 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13424 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13426 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13428 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13430 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13432 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13434 * lynx-low.c (lynx_resume): Use the resume_info parameter
13435 to determine the ptid for the lynx_ptrace call, unless
13436 it is equal to minus_one_ptid, in which case we use the
13437 ptid of the current_inferior.
13438 (lynx_wait_1): After having received a thread create/exit
13439 event, resume the inferior's execution using the signaling
13440 thread's ptid, rather than the old ptid.
13442 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13444 * lynx-low.c (lynx_resume): Delete variable ret.
13446 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13448 * gdbreplay.c (gdbreplay_version): Update copyright year.
13449 * server.c (gdbserver_version): Likewise.
13451 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13453 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13456 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13458 * lynx-low.c (ptrace_request_to_str): Add handling for
13459 PTRACE_GETTRACESIG.
13461 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13463 * lynx-low.c (lynx_attach): Delete variable new_process.
13465 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13467 * lynx-low.c (lynx_create_inferior): Delete variable
13470 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13472 * lynx-low.c (ptrace_request_to_str): Do not handle
13473 PTRACE_GETTHREADLIST if this macro does not exist.
13475 2012-12-15 Yao Qi <yao@codesourcery.com>
13477 * Makefile.in (OBS): Add notif.o.
13478 * notif.c, notif.h: New.
13479 * server.c: Include "notif.h".
13480 (struct vstop_notif) <next>: Remove.
13482 (queue_stop_reply): Update.
13483 (push_event, send_next_stop_reply): Remove.
13484 (discard_queued_stop_replies): Update.
13485 (notif_stop): New variable.
13486 (handle_v_stopped): Remove.
13487 (handle_v_requests): Don't call handle_v_stopped. Call
13488 handle_ack_notif instead.
13489 (queue_stop_reply_callback): Call notif_event_enque instead
13490 of queue_stop_reply.
13491 (handle_status): Don't call send_next_stop_reply, call
13492 notif_write_event instead.
13493 (kill_inferior_callback): Likewise.
13494 (detach_or_kill_inferior_callback): Likewise.
13495 (main): Call initialize_notif.
13496 (process_serial_event): Call QUEUE_is_empty.
13497 (handle_target_event): Call notif_push instead of push event.
13498 * server.h (push_event): Remove declaration.
13500 2012-12-10 Tom Tromey <tromey@redhat.com>
13502 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13503 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13506 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13507 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13508 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13509 (amd64-linux-ipa.o, ax.o): Rewrite.
13510 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13511 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13512 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13513 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13514 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13515 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13516 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13517 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13518 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13519 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13520 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13521 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13522 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13523 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13524 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13525 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13526 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13527 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13528 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13529 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13530 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13531 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13532 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13533 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13534 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13535 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13536 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13537 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13538 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13539 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13540 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13541 (reg-tilegx.o): Remove.
13542 (all_object_files): New macro.
13543 Include .deps files.
13544 * aclocal.m4, configure: Rebuild.
13545 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13546 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13547 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13549 2012-12-05 Tom Tromey <tromey@redhat.com>
13552 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13554 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
13556 * configure.ac: Check for linux/perf_event.h.
13557 * config.in: Regenerated.
13558 * configure: Regenerated.
13560 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13562 * hostio.c (handle_readlink): Decrease buffer size
13563 parameter passed to readlink by one byte.
13565 2012-11-26 Yao Qi <yao@codesourcery.com>
13567 * configure.ac (build_warnings): Append '-Wempty-body'.
13568 * configure: Regenerated.
13569 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13572 2012-11-15 Pierre Muller <muller@sourceware.org>
13574 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13575 * config.in: Regenerate.
13576 * configure: Regenerate.
13577 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13578 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13579 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13580 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13582 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13583 instead of <sys/wait.h> header.
13584 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13586 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
13588 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13589 (various make rules): Remove -DGDBSERVER
13591 2012-11-09 Yao Qi <yao@codesourcery.com>
13593 * spu-low.c (current_ptid): Move it to ..
13594 * gdbthread.h: ... here. New.
13595 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13596 * server.c (myresume, process_serial_event): Likewise.
13597 * thread-db.c (thread_db_find_new_threads): Likewise.
13598 * tracepoint.c (run_inferior_command): Likewise.
13600 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
13602 * server.c (handle_search_memory_1): Include access length in
13605 2012-09-05 Michael Brandt <michael.brandt@axis.com>
13607 * linux-crisv32-low.c: Fix compile errors.
13609 2012-09-04 Yao Qi <yao@codesourcery.com>
13611 * tracepoint.c (cmd_qtsv): Adjust debug message.
13612 Don't check CUR_TPOINT.
13614 2012-08-28 Yao Qi <yao@codesourcery.com>
13616 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13617 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13618 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13619 Remove declarations of xmalloc, xreallloc, xstrdup and
13621 * Makefile.in (libiberty_h): New.
13622 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13623 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13625 2012-08-23 Yao Qi <yao@codesourcery.com>
13627 * server.h: Remove declaration of 'xsnprintf'.
13629 2012-08-22 Keith Seitz <keiths@redhat.com>
13631 * server.h: Include build-gnulib-gbserver/config.h.
13632 * gdbreplay.c: Likewise.
13634 2012-08-08 Doug Evans <dje@google.com>
13636 * Makefile.in (SFILES): Add gdb_vecs.c.
13637 (OBS): Add gdb_vecs.o.
13638 (gdb_vecs_h, host_defs_h): New variables.
13639 (thread-db.o): Add $(gdb_vecs_h) dependency.
13640 (gdb_vecs.o): New rule.
13641 * thread-db.c: #include "gdb_vecs.h".
13642 (thread_db_load_search): Use a vector to iterate over path elements.
13643 Handle text appearing after "$pdir".
13645 * configure.ac: Add check for strstr.
13646 * config.in: Regenerate.
13647 * configure: Regenerate.
13649 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13651 * hostio.c (handle_pread): If pread fails, fall back to attempting
13653 (handle_pwrite): Likewise for pwrite.
13655 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
13657 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
13658 between unsupported TYPE and unimplementable ADDR/LEN combination.
13659 (arm_insert_point): Act on new return value.
13661 2012-07-31 Pedro Alves <palves@redhat.com>
13663 * server.c (process_point_options): Only skip tokens if we find
13664 one that is unrecognized. Don't treat 'X' specially while
13665 skipping unrecognized tokens.
13667 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
13669 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
13670 to 4-byte-align HW breakpoint addresses for Thumb.
13672 2012-07-27 Yao Qi <yao@codesourcery.com>
13676 * server.h: Declare gdb_agent_about_to_close.
13677 * target.c (kill_inferior): Include "agent.h".
13678 New. Send command 'kill'.
13679 * target.h (kill_inferior): Removed macro.
13680 * tracepoint.c (gdb_agent_about_to_close): New.
13681 (gdb_agent_helper_thread): Handle command 'close'.
13682 Wait endlessly until the inferior stops.
13683 Install gdb_agent_remove_socket to atexit hook.
13684 (agent_socket_name): New static variable.
13685 (gdb_agent_socket_init): Replace local variable 'name' with
13686 'agent_socket_name'.
13687 (gdb_agent_remove_socket): New.
13689 2012-07-27 Yao Qi <yao@codesourcery.com>
13691 * server.c (process_point_options): Stop at 'X' when parsing.
13693 2012-07-19 Michael Eager <eager@eagercon.com>
13695 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
13697 * linux-x86-low.c (x86_insert_point, x86_remove_point):
13698 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
13699 hardware breakpoint.
13701 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13703 * gdbserver/linux-low.c (initialize_low): Call
13704 linux_ptrace_init_warnings.
13706 2012-07-02 Doug Evans <dje@google.com>
13708 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
13711 2012-07-02 Stan Shebs <stan@codesourcery.com>
13713 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
13714 (ax.o): Add it to build rule.
13716 (OBS): Add format.o.
13717 (IPA_OBS): Add format.o.
13718 * server.c (handle_query): Claim support for breakpoint commands.
13719 (process_point_options): Add command case.
13720 (process_serial_event): Leave running if there are printfs in
13722 * mem-break.h (any_persistent_commands): Declare.
13723 (add_breakpoint_commands): Declare.
13724 (gdb_no_commands_at_breakpoint): Declare.
13725 (run_breakpoint_commands): Declare.
13726 * mem-break.c (struct point_command_list): New struct.
13727 (struct breakpoint): New field command_list.
13728 (any_persistent_commands): New function.
13729 (add_commands_to_breakpoint): New function.
13730 (add_breakpoint_commands): New function.
13731 (gdb_no_commands_at_breakpoint): New function.
13732 (run_breakpoint_commands): New function.
13733 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
13735 * ax.c: Include format.h.
13736 (ax_printf): New function.
13737 (gdb_eval_agent_expr): Add printf opcode.
13739 2012-06-13 Yao Qi <yao@codesourcery.com>
13741 * server.c (start_inferior): Remove duplicated writes to fields
13742 'last_resume_kind' and 'last_status' of 'current_inferior'.
13744 2012-06-12 Yao Qi <yao@codesourcery.com>
13745 Pedro Alves <palves@redhat.com>
13747 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
13749 * server.c (handle_v_cont): Extend comment.
13751 2012-06-11 Yao Qi <yao@codesourcery.com>
13753 * linux-low.c (linux_attach): Add 'static'.
13755 2012-06-06 Yao Qi <yao@codesourcery.com>
13757 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
13759 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
13761 Fix gcc -flto compilation warning.
13762 * server.c (main): Make variable multi_mode and attach volatile.
13764 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13766 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
13767 if the platform doesn't know about it.
13769 2012-05-30 Jeff Kenton <jkenton@tilera.com>
13771 * Makefile.in (SFILES): Add linux-tile-low.c.
13772 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
13773 * configure.srv: Handle tilegx-*-linux*.
13774 * linux-tile-low.c: New file.
13776 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13778 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
13780 2012-05-24 Pedro Alves <palves@redhat.com>
13784 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
13786 2012-05-24 Pedro Alves <palves@redhat.com>
13790 Replace target_signal with gdb_signal throughout.
13792 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
13794 * linux-low.c (linux_store_registers): Avoid the copying sequence
13795 when no data has been retrieved by ptrace.
13797 2012-05-22 Will Deacon <will.deacon@arm.com>
13799 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
13800 Include asm/ptrace.h.
13801 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
13804 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
13806 * linux-low.c (linux_store_registers): Don't re-retrieve data
13807 with ptrace that has already been obtained from /proc. Always
13808 copy any data retrieved with ptrace to the buffer supplied.
13810 2012-05-11 Yao Qi <yao@codesourcery.com>
13811 Pedro Alves <palves@redhat.com>
13813 * linux-low.c (enum stopping_threads_kind): New.
13814 (stopping_threads): Change type to `enum stopping_threads_kind'.
13815 (handle_extended_wait): If stopping and suspending threads, leave
13816 the new_lwp suspended too.
13817 (linux_wait_for_event): Adjust.
13818 (stop_all_lwps): Set `stopping_threads' to
13819 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
13820 whether we're suspending threads or just stopping them. Assert no
13823 2012-04-29 Yao Qi <yao@codesourcery.com>
13825 * server.h: Move some code to ...
13826 * gdbthread.h: ... here. New.
13827 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
13828 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
13829 (nto-low.o, win32-low.o): Likewise.
13830 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
13831 * regcache.c, remote-utils.c, server.c: Likewise.
13832 * target.c, tracepoint.c, win32-low.c: Likewise.
13834 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13836 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
13837 (PTRACE_ARG4_TYPE): Likewise.
13838 (PTRACE_XFER_TYPE): Likewise.
13839 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
13840 ptrace to PTRACE_ARG3_TYPE.
13841 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
13842 (PTRACE_ARG4_TYPE): Likewise.
13843 (PTRACE_XFER_TYPE): Likewise.
13844 (linux_detach_one_lwp): Cast fourth argument of
13845 ptrace to long then PTRACE_ARG4_TYPE.
13846 (regsets_fetch_inferior_registers): Cast third argument of
13847 ptrace to long then PTRACE_ARG3_TYPE.
13848 (regsets_store_inferior_registers): Likewise.
13850 2012-04-20 Pedro Alves <palves@redhat.com>
13852 * configure: Regenerate.
13854 2012-04-19 Pedro Alves <palves@redhat.com>
13856 * Makefile.in (GNULIB_BUILDDIR): New.
13857 (LIBGNU, INCGNU, GNULIB_H): Adjust.
13858 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
13859 (all, install-only, uninstall, clean-info, all-lib, clean): No
13860 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
13861 (maintainer-clean realclean distclean): Use subdir_do.
13863 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
13864 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
13865 * acinclude.m4: Include acx_configure_dir.m4.
13866 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
13867 calls. Call AC_PROG_RANLIB. Configure gnulib using
13870 (GNULIB_STDINT_H): Adjust.
13871 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
13872 * gdbreplay.c: Include build-gnulib/config.h.
13873 * server.h: Likewise.
13874 * aclocal.m4: Regenerate.
13875 * config.in: Regenerate.
13876 * configure: Regenerate.
13878 2012-04-19 Pedro Alves <palves@redhat.com>
13880 * Makefile.in (LIBGNU, INCGNU): Adjust.
13881 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
13882 (all, install-only, uninstall, clean-info, all-lib, clean)
13883 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
13884 * configure.ac: Adjust AC_OUTPUT output.
13885 * aclocal.m4: Regenerate.
13886 * configure: Regenerate.
13888 2012-04-19 Pedro Alves <palves@redhat.com>
13890 * Makefile.in (generated_files): New.
13891 (server_h): Remove the explicit dependency on config.h, and depend
13892 on $generated_files.
13894 2012-04-19 Pedro Alves <palves@redhat.com>
13896 * Makefile.in (INCGNU): Add -Ignulib.
13898 2012-04-19 Pedro Alves <palves@redhat.com>
13900 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
13901 (INCGNU): ... this, and spell out -I here.
13902 (GNULIB_LIB): Rename to ...
13903 (LIBGNU): ... this.
13904 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
13906 2012-04-19 Pedro Alves <palves@redhat.com>
13908 * config.in: Regenerate.
13910 2012-04-19 Pedro Alves <palves@redhat.com>
13912 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
13913 * server.h (memmem): Remove declaration.
13914 * config.in: Regenerate.
13915 * configure: Regenerate.
13917 2012-04-19 Yao Qi <yao@codesourcery.com>
13919 * Makefile.in (SFILES): Add common/vec.c.
13923 2012-04-19 Yao Qi <yao@codesourcery.com>
13925 * remote-utils.c (prepare_resume_reply): Replace with macro
13926 target_core_of_thread.
13927 * server.c (handle_qxfer_threads_proper): Likewise.
13928 * target.h (traget_core_of_thread): New macro.
13930 2012-04-18 Pedro Alves <palves@redhat.com>
13932 * aclocal.m4: Regenerate.
13933 * configure: Regenerate.
13935 2012-04-16 Yao Qi <yao@codesourcery.com>
13937 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
13938 duplicated on address.
13940 2012-04-16 Yao Qi <yao@codesourcery.com>
13942 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
13943 (struct tracepoint_action_ops) <send>: New field.
13944 (m_tracepoint_action_send, r_tracepoint_action_send): New.
13945 (agent_expr_send, x_tracepoint_action_send): New.
13946 (l_tracepoint_action_send): New.
13947 (cmd_qtdp): Download and install tracepoint
13948 according to `use_agent'.
13949 (run_inferior_command): Add one more parameter `len'.
13951 (tracepoint_send_agent): New.
13952 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
13954 2012-04-16 Yao Qi <yao@codesourcery.com>
13956 * tracepoint.c (download_tracepoints): Moved to ...
13957 (cmd_qtstart): ... here.
13959 2012-04-14 Yao Qi <yao@codesourcery.com>
13961 * tracepoint.c: Include inttypes.h.
13962 (struct collect_memory_action): Use sized types.
13963 (struct tracepoint): Likewise.
13964 (cmd_qtdp, stop_tracing): Update print specifiers.
13965 (cmd_qtp, response_tracepoint): Likewise.
13966 (collect_data_at_tracepoint): Likewise.
13967 (collect_data_at_step): Likewise.
13969 2012-04-14 Yao Qi <yao@codesourcery.com>
13971 Import gnulib module inttypes.
13972 * aclocal.m4, config.in, configure: Regenerated.
13974 2012-04-14 Yao Qi <yao@codesourcery.com>
13976 * Makefile.in (maintainer-clean, realclean, distclean): Remove
13977 Makefile and config.status at last.
13979 2012-04-13 Yao Qi <yao@codesourcery.com>
13981 * tracepoint.c: Include stdint.h unconditionally.
13983 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13985 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
13986 on BFD_HAVE_SYS_PROCFS_TYPE.
13987 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
13988 * configure: Regenerate.
13989 * config.in: Likewise.
13991 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
13993 * Makefile.in (clean): Also remove x32.c x32-linux.c
13994 x32-avx.c x32-avx-linux.c.
13995 (x32.o): New target.
13997 (x32-linux.o): Likewise.
13998 (x32-linux.c): Likewise.
13999 (x32-avx.o): Likewise.
14000 (x32-avx.c): Likewise.
14001 (x32-avx-linux.o): Likewise.
14002 (x32-avx-linux.c): Likewise.
14004 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14005 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14006 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14007 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14008 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14009 i386/x32-avx-linux.xml.
14011 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14012 (init_registers_x32_avx_linux): Likwise.
14013 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14014 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14016 2012-04-13 Pedro Alves <palves@redhat.com>
14018 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14019 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14020 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14021 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14024 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14026 * linux-x86-low.c (compat_x32_clock_t): New.
14027 (compat_x32_siginfo_t): Likewise.
14028 (compat_x32_siginfo_from_siginfo): Likewise.
14029 (siginfo_from_compat_x32_siginfo): Likewise.
14030 (linux_is_elf64): Likewise.
14031 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14032 and siginfo_from_compat_x32_siginfo for x32.
14033 (x86_arch_setup): Set linux_is_elf64.
14035 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14038 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14040 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14041 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14042 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14043 compatible with process.
14045 2012-04-12 Yao Qi <yao@codesourcery.com>
14047 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14048 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14049 (install-only, install-info, clean): Handle sub dir gnulib.
14050 (all-lib, am--refresh): New targets.
14051 (memmem.o): Remove target.
14052 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14053 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14054 (AC_REPLACE_FUNCS): Remove memmem.
14055 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14056 (AC_OUTPUT): Generate Makefile in gnulib/.
14057 * aclocal.m4, config.in, configure: Regenerated.
14059 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14061 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14063 2012-04-05 Pedro Alves <palves@redhat.com>
14065 -Werror=strict-aliasing
14067 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14070 2012-04-04 Pedro Alves <palves@redhat.com>
14072 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14073 (sparc_store_gregset_from_stack, sparc_store_gregset)
14074 (sparc_breakpoint_at): Fix formatting.
14076 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14078 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14080 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14081 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14082 * config.in: Regenerate.
14083 * configure: Likewise.
14085 2012-03-29 Pedro Alves <palves@redhat.com>
14087 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14088 Correct ptrace arguments.
14090 2012-03-28 Pedro Alves <palves@redhat.com>
14092 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14093 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14094 (IA64_FR1_REGNUM): New defines.
14095 (ia64_fetch_register): New.
14096 (the_low_target): Install it.
14097 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14099 * linux-low.c (linux_fetch_registers): Try the
14100 the_low_target.fetch_register hook first.
14102 * linux-arm-low.c (the_low_target): Adjust.
14103 * linux-bfin-low.c (the_low_target): Adjust.
14104 * linux-cris-low.c (the_low_target): Adjust.
14105 * linux-crisv32-low.c (the_low_target): Adjust.
14106 * linux-m32r-low.c (the_low_target): Adjust.
14107 * linux-m68k-low.c (the_low_target): Adjust.
14108 * linux-mips-low.c (the_low_target): Adjust.
14109 * linux-ppc-low.c (the_low_target): Adjust.
14110 * linux-s390-low.c (the_low_target): Adjust.
14111 * linux-sh-low.c (the_low_target): Adjust.
14112 * linux-sparc-low.c (the_low_target): Adjust.
14113 * linux-tic6x-low.c (the_low_target): Adjust.
14114 * linux-x86-low.c (the_low_target): Adjust.
14115 * linux-xtensa-low.c (the_low_target): Adjust.
14117 2012-03-26 Pedro Alves <palves@redhat.com>
14119 * server.c (handle_qxfer_libraries): Don't bail early if
14120 the_target->qxfer_libraries_svr4 is not NULL.
14122 2012-03-26 Pedro Alves <palves@redhat.com>
14124 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14126 2012-03-23 Pedro Alves <palves@redhat.com>
14128 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14129 "library-list-svr4" element's start tag when the the DSO list is
14132 2012-03-23 Pedro Alves <palves@redhat.com>
14134 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14135 a variable whose type size is the same as the inferior's pointer
14138 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14140 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14142 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14143 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14144 * linux-low.h: Include <signal.h>.
14145 (struct siginfo): Remove forward declaration.
14146 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14149 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14151 * .gitignore: Ignore more files.
14153 2012-03-19 Pedro Alves <palves@redhat.com>
14154 Jan Kratochvil <jan.kratochvil@redhat.com>
14156 * server.c (cont_thread, general_thread): Add describing comments.
14157 (start_inferior): Clear `cont_thread'.
14158 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14161 2012-03-15 Yao Qi <yao@codesourcery.com>
14163 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14165 (cmd_qtdp): ... here.
14167 2012-03-15 Yao Qi <yao@codesourcery.com>
14169 * tracepoint.c (struct tracepoint_action_ops): New.
14170 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14171 (m_tracepoint_action_download): New.
14172 (r_tracepoint_action_download): New.
14173 (x_tracepoint_action_download): New.
14174 (l_tracepoint_action_download): New.
14175 (add_tracepoint_action): Install `action->ops' according type.
14176 (download_tracepoint_1): Move code `download' function pointer
14177 of various tracepoint_action_ops.
14179 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14181 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14182 linux_ptrace_attach_warnings.
14184 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14186 * Makefile.in (linux-ptrace.o): New.
14187 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14188 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14189 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14190 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14191 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14193 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14195 2012-03-08 Yao Qi <yao@codesourcery.com>
14196 Pedro Alves <palves@redhat.com>
14198 Fix PR server/13392.
14199 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14200 offset of JMP insn.
14201 * tracepoint.c (remove_tracepoint): New.
14202 (cmd_qtdp): Call remove_tracepoint when failed to install.
14204 2012-03-07 Pedro Alves <palves@redhat.com>
14206 * linux-low.c (get_detach_signal): New.
14207 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14208 Pass on pending signals to PTRACE_DETACH. Check the result of the
14210 * server.c (program_signals, program_signals_p): New.
14211 (handle_general_set): Handle QProgramSignals.
14212 * server.h (program_signals, program_signals_p): Declare.
14214 2012-03-05 Pedro Alves <palves@redhat.com>
14215 Jan Kratochvil <jan.kratochvil@redhat.com>
14217 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14220 2012-03-03 Yao Qi <yao@codesourcery.com>
14222 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14223 agent_look_up_symbols.
14225 2012-03-03 Yao Qi <yao@codesourcery.com>
14227 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14228 (linux-x86-low.o): Likewise.
14229 * server.h: Remove in_process_agent_loaded.
14230 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14234 2012-03-03 Yao Qi <yao@codesourcery.com>
14236 * tracepoint.c (gdb_agent_capability): New global.
14237 (in_process_agent_loaded_ust): Renamed to
14238 `in_process_agent_supports_ust'.
14240 (in_process_agent_supports_ust): Call agent_capability_check.
14241 (clear_installed_tracepoints): Assert that agent supports
14244 2012-03-03 Yao Qi <yao@codesourcery.com>
14246 * linux-low.c (linux_supports_agent): New.
14247 (linux_target_ops): Initialize field `supports_agent' with
14248 linux_supports_agent.
14249 * target.h (struct target_ops) <supports_agent>: New.
14250 (target_supports_agent): New macro.
14251 * server.c (handle_general_set): Handle packet 'QAgent'.
14252 (handle_query): Send `QAgent+'.
14253 * Makefile.in (server.o): Depends on agent.h.
14255 2012-03-03 Yao Qi <yao@codesourcery.com>
14257 * Makefile.in (OBS): Add agent.o.
14258 Add new rule for agent.o.
14259 Track dependence of tracepoint.c on agent.h.
14260 * tracepoint.c (run_inferior_command_1):
14261 (run_inferior_command): Call agent_run_command.
14262 (gdb_ust_connect_sync_socket): Deleted. Move it to
14264 (resume_thread, stop_thread): Likewise.
14265 (gdb_ust_socket_init): Renamed to ...
14266 (gdb_agent_socket_init): ... New.
14267 (gdb_ust_thread): Renamed to ...
14268 (gdb_agent_helper_thread): ... New.
14269 (gdb_ust_init): Move some code to ...
14270 (gdb_agent_init): ... here. New.
14271 [HAVE_UST]: Call gdb_ust_init.
14272 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14273 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14274 * config.in, configure: Regenerated.
14276 2012-03-02 Pedro Alves <palves@redhat.com>
14278 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14279 * linux-low.c (struct simple_pid_list): New.
14280 (stopped_pids): New a struct simple_pid_list pointer.
14281 (add_to_pid_list, pull_pid_from_list): New.
14282 (handle_extended_wait): Don't assume the first signal new children
14283 report is SIGSTOP. Adjust call to pull_pid_from_list.
14284 (linux_wait_for_lwp): Adjust.
14286 2012-03-02 Yao Qi <yao@codesourcery.com>
14288 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14291 2012-03-02 Yao Qi <yao@codesourcery.com>
14293 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14294 `stop_pc' and `tpoint'. Update caller.
14296 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14298 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14299 * linux-low.c (use_linux_regsets): New macro.
14300 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14301 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14302 (linux_register_in_regsets): New function.
14303 (usr_fetch_inferior_registers): Skip registers covered by
14305 (usr_store_inferior_registers): Likewise.
14306 (usr_fetch_inferior_registers): New macro.
14307 (usr_store_inferior_registers): Likewise.
14308 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14309 (linux_store_registers): Likewise.
14310 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14312 (init_registers_mips64_dsp_linux): Likewise.
14313 (init_registers_mips_linux): New macro.
14314 (init_registers_mips_dsp_linux): Likewise.
14315 (mips_dsp_num_regs): Likewise.
14316 (DSP_BASE, DSP_CONTROL): New fallback macros.
14317 (mips_base_regs): New macro.
14318 (mips_regmap): Use it. Fix the size.
14319 (mips_dsp_regmap): New variable.
14320 (mips_dsp_regset_bitmap): Likewise.
14321 (mips_arch_setup): New function.
14322 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14324 (mips_cannot_store_register): Likewise.
14325 (the_low_target): Update .arch_setup, .num_regs and .regmap
14326 initializers. Add .regset_bitmap initializer.
14327 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14329 * linux-bfin-low.c (the_low_target): Likewise.
14330 * linux-cris-low.c (the_low_target): Likewise.
14331 * linux-crisv32-low.c (the_low_target): Likewise.
14332 * linux-ia64-low.c (the_low_target): Likewise.
14333 * linux-m32r-low.c (the_low_target): Likewise.
14334 * linux-m68k-low.c (the_low_target): Likewise.
14335 * linux-ppc-low.c (the_low_target): Likewise.
14336 * linux-s390-low.c (the_low_target): Likewise.
14337 * linux-sh-low.c (the_low_target): Likewise.
14338 * linux-sparc-low.c (the_low_target): Likewise.
14339 * linux-tic6x-low.c (the_low_target): Likewise.
14340 * linux-x86-low.c (the_low_target): Likewise.
14341 * linux-xtensa-low.c (the_low_target): Likewise.
14342 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14343 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14344 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14346 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14347 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14349 2012-02-29 Yao Qi <yao@codesourcery.com>
14350 Pedro Alves <palves@redhat.com>
14352 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14353 `step_over_finished' is true.
14355 2012-02-27 Pedro Alves <palves@redhat.com>
14357 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14358 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14360 2012-02-27 Pedro Alves <palves@redhat.com>
14363 * linux-low.c (pid_is_stopped): New.
14364 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14366 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14368 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14371 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14373 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14375 2012-02-24 Luis Machado <lgustavo@codesourcery>
14377 * server.c (handle_query): Advertise support for target-side
14378 breakpoint condition evaluation.
14379 (process_point_options): New function.
14380 (process_serial_event): When inserting a breakpoint, check for
14381 a target-side condition that should be evaluated.
14383 * mem-break.c: Include regcache.h and ax.h.
14384 (point_cond_list_t): New data structure.
14385 (breakpoint) <cond_list>: New field.
14386 (find_gdb_breakpoint_at): Make non-static.
14387 (delete_gdb_breakpoint_at): Clear any target-side
14389 (clear_gdb_breakpoint_conditions): New function.
14390 (add_condition_to_breakpoint): Likewise.
14391 (add_breakpoint_condition): Likewise.
14392 (gdb_condition_true_at_breakpoint): Likewise.
14393 (gdb_breakpoint_here): Return result directly instead
14394 of going through a local variable.
14396 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14397 (clear_gdb_breakpoint_conditions): Likewise.
14398 (add_breakpoint_condition): Likewise.
14399 (gdb_condition_true_at_breakpoint): Likewise.
14401 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14402 (need_step_over_p): Take target-side breakpoint condition into
14405 2012-02-24 Luis Machado <lgustavo@codesourcery>
14407 * server.h: Include tracepoint.h.
14408 (agent_mem_read, agent_get_trace_state_variable_value,
14409 agent_set_trace_state_variable_value,
14410 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14411 get_set_tsv_func_addr): New prototypes.
14413 * ax.h: New include file.
14414 * ax.c: New source file.
14416 * tracepoint.c: Include ax.h.
14417 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14418 agent_expr, eval_result_type): Move to ax.h.
14419 (parse_agent_expr): Rename to ...
14420 (gdb_parse_agent_expr): ... this, make it non-static and move
14422 (unparse_agent_expr) Rename to ...
14423 (gdb_unparse_agent_expr): ... this, make it non-static and move
14425 (eval_agent_expr): Rename to ...
14426 (eval_tracepoint_agent_expr): ... this.
14427 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14428 forward declarations.
14429 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14430 (agent_get_trace_state_variable_value): New function.
14431 (agent_set_trace_state_variable_value): New function.
14432 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14433 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14434 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14435 (condition_true_at_tracepoint): Likewise.
14436 (parse_agent_expr): Rename to ...
14437 (gdb_parse_agent_expr): ... this and move to ax.c.
14438 (unparse_agent_expr): Rename to ...
14439 (gdb_unparse_agent_expr): ... this and move to ax.c.
14440 (gdb_agent_op_name): Move to ax.c.
14441 (eval_agent_expr): Rename to ...
14442 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14444 (eval_tracepoint_agent_expr): New function.
14445 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14447 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14449 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14450 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14451 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14452 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14453 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14454 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14455 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14456 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14457 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14458 (compile_bytecodes): Remove forward declaration.
14459 (is_goto_target): Move to ax.c.
14460 (compile_bytecodes): Move to ax.c and call
14461 agent_get_trace_state_variable_value (...) and
14462 agent_set_trace_state_variable_value (...).
14464 * Makefile.in: Update ax.c and IPA dependencies.
14466 2012-02-24 Pedro Alves <palves@redhat.com>
14468 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14469 (cmd_bigqtbuffer_circular): ... this. Only handle
14470 'QTBuffer:circular:'.
14471 (handle_tracepoint_general_set): Adjust.
14473 2012-02-16 Yao Qi <yao@codesourcery.com>
14475 * inferiors.c: Move code to ...
14476 * dll.c: .... here. New.
14477 * server.h: Declare clear_dlls.
14478 * Makefile.in (SFILES): Add dll.c.
14482 2012-02-11 Yao Qi <yao@codesourcery.com>
14484 * server.c: (handle_monitor_command): Add a new parameter
14486 (handle_query): Update caller.
14488 2012-02-09 Joel Brobecker <brobecker@adacore.com>
14490 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14491 * configure, config.in: Regenerate.
14492 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14495 2012-02-02 Pedro Alves <palves@redhat.com>
14497 Try SIGKILL first, then PTRACE_KILL.
14498 * linux-low.c (linux_kill_one_lwp): New.
14499 (linux_kill_one_lwp): Rename to ...
14500 (kill_one_lwp_callback): ... this. Use the new
14501 linux_kill_one_lwp.
14503 2012-02-02 Pedro Alves <palves@redhat.com>
14505 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14508 2012-01-27 Pedro Alves <palves@redhat.com>
14510 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14511 (elf_64_file_p): Make static.
14512 (linux_pid_exe_is_elf_64_file): New.
14513 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14514 Delete declarations.
14515 (linux_pid_exe_is_elf_64_file): Declare.
14516 * linux-x86-low.c (x86_arch_setup): Use
14517 linux_pid_exe_is_elf_64_file.
14519 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14521 * linux-low.c (linux_wait_for_event_1): Rename to ...
14522 (linux_wait_for_event): ... here and merge it with former
14523 linux_wait_for_event - new variable wait_ptid, use it.
14524 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14526 2012-01-23 Pedro Alves <palves@redhat.com>
14528 * server.c (main): Avoid yet another case of infinite loop while
14529 detaching/killing after a longjmp.
14531 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14534 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14536 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14538 * hostio.c (handle_readlink): New function.
14539 (handle_vFile): Call it to handle "vFile:readlink" packets.
14541 2012-01-20 Pedro Alves <palves@redhat.com>
14542 Ulrich Weigand <ulrich.weigand@linaro.org>
14544 * server.c (handle_v_requests): Only support vAttach and vRun to
14545 start multiple processes when in extended protocol mode.
14547 2012-01-17 Pedro Alves <palves@redhat.com>
14549 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14550 memalign plus mprotect to allocate the scratch buffer.
14552 2012-01-13 Pedro Alves <palves@redhat.com>
14554 * server.c (attach_inferior): Clear `cont_thread'.
14556 2012-01-13 Pedro Alves <palves@redhat.com>
14558 * server.c (main): Avoid infinite loop while detaching/killing
14561 2012-01-09 Doug Evans <dje@google.com>
14563 * server.c (start_inferior): Set last_ptid in --wrapper case.
14565 2012-01-06 Yao Qi <yao@codesourcery.com>
14567 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14569 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14571 2012-01-04 Yao Qi <yao@codesourcery.com>
14573 * tracepoint.c (cmd_qtdp): Print debug message
14574 for static tracepoint.
14576 2012-01-04 Yao Qi <yao@codesourcery.com>
14578 * tracepoint.c (trace_vdebug): Differentiate debug message
14579 between gdbserver and IPA.
14581 2012-01-03 Yao Qi <yao@codesourcery.com>
14583 * tracepoint.c (tracepoint_was_hit): Don't collect for
14586 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14588 * terminal.h: Reformat copyright header.
14590 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14592 * server.c (gdbserver_version): Update copyright year.
14593 * gdbreplay.c (gdbreplay_version): Likewise.
14595 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14597 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14600 2011-12-18 Hui Zhu <teawater@gmail.com>
14601 * linux-low.c (linux_create_inferior): Save return value to ret.
14603 2011-12-18 Hui Zhu <teawater@gmail.com>
14605 * linux-low.c (linux_create_inferior): Save return value to ret.
14607 2011-12-16 Doug Evans <dje@google.com>
14609 * linux-low.c (linux_create_inferior): If stdio connection,
14610 redirect stdin from /dev/null, stdout to stderr.
14611 * remote-utils.c (remote_is_stdio): New static global.
14612 (remote_connection_is_stdio): New function.
14613 (remote_prepare): Handle stdio connection.
14614 (remote_open): Ditto.
14615 (remote_close): Don't close stdin for stdio connections.
14616 (read_prim,write_prim): New functions. Replace all calls to
14617 read/write to these.
14618 * server.c (main): Watch for "-" argument. Move call to
14619 remote_prepare before start_inferior.
14620 * server.h (STDIO_CONNECTION_NAME): New macro.
14621 (remote_connection_is_stdio): Declare.
14623 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14624 in debugging output.
14626 2011-12-15 Yao Qi <yao@codesourcery.com>
14628 * tracepoint.c: Include sys/syscall.h.
14629 (gdb_ust_thread): Remove preprocessor conditional.
14631 2011-12-14 Pedro Alves <pedro@codesourcery.com>
14633 * linux-low.c (linux_detach_one_lwp): Call
14634 the_low_target.prepare_to_resume before detaching.
14636 2011-12-14 Yao Qi <yao@codesourcery.com>
14638 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14641 2011-12-14 Yao Qi <yao@codesourcery.com>
14643 * i386-low.c (i386_low_stopped_data_address): Initialize local
14644 variable `control'.
14646 2011-12-13 Pedro Alves <pedro@codesourcery.com>
14650 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14651 DR_CONTROL unless necessary. Extend comments.
14652 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14653 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14655 2011-12-13 Yao Qi <yao@codesourcery.com>
14657 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14659 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
14661 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
14663 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
14664 Print new debug message for such case.
14666 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14668 Fix overlapping memcpy.
14669 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
14670 the read_inferior_memory transfer.
14671 (delete_fast_tracepoint_jump): New variable buf. Use it for the
14672 write_inferior_memory transfer.
14673 (set_fast_tracepoint_jump): New variable buf. Use it for the
14674 read_inferior_memory and write_inferior_memory transfers.
14675 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
14676 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
14677 Use it for the write_inferior_memory transfer.
14678 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
14681 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14683 * linux-low.c (fetch_register, store_register): Make code
14684 consistent, fix formatting.
14686 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14688 * linux-low.c (usr_store_inferior_registers): Factor out code
14689 to handle individual registers into...
14690 (store_register): ... this new function.
14692 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
14694 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
14695 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
14696 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
14697 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
14698 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
14699 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
14700 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
14701 (srv_xmlfiles): Add new XML files.
14703 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
14705 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
14706 (init_registers_s390_linux32v1): Add prototype.
14707 (init_registers_s390_linux32v2): Likewise.
14708 (init_registers_s390_linux64v1): Likewise.
14709 (init_registers_s390_linux64v2): Likewise.
14710 (init_registers_s390x_linux64v1): Likewise.
14711 (init_registers_s390x_linux64v2): Likewise.
14712 (s390_num_regs): Increment to 52.
14713 (s390_regmap): Add orig_r2 register.
14714 (s390_num_regs_3264): Increment to 68.
14715 (s390_regmap_3264): Add orig_r2 register.
14716 (s390_collect_ptrace_register): Handle orig_r2 register.
14717 (s390_supply_ptrace_register): Likewise.
14718 (s390_fill_last_break): New function.
14719 (s390_store_last_break): Likewise.
14720 (s390_fill_system_call): New function.
14721 (s390_store_system_call): Likewise.
14722 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
14724 (s390_check_regset): New function.
14725 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
14726 NT_S390_SYSTEM_CALL regsets and use appropriate description.
14727 Update target_regsets for available register sets.
14729 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
14730 Jan Kratochvil <jan.kratochvil@redhat.com>
14732 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
14733 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
14735 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
14736 * linux-low.h (struct process_info_private): New member r_debug.
14737 * server.c (handle_qxfer_libraries): Call
14738 the_target->qxfer_libraries_svr4.
14739 (handle_qxfer_libraries_svr4): New function.
14740 (qxfer_packets): New entry "libraries-svr4".
14741 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
14742 * target.h (struct target_ops): New member qxfer_libraries_svr4.
14743 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
14744 PACKET_qXfer_libraries_svr4.
14746 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
14748 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
14749 PSW address/mask between 8-byte and 16-byte formats.
14750 (s390_supply_ptrace_register): Likewise.
14751 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
14752 basic addressing mode bit.
14754 2011-11-24 Stan Shebs <stan@codesourcery.com>
14756 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
14758 2011-11-17 Stan Shebs <stan@codesourcery.com>
14760 * tracepoint.c (struct tracepoint): New field traceframe_usage.
14761 (tracing_start_time): New global.
14762 (tracing_stop_time): New global.
14763 (tracing_user_name): New global.
14764 (tracing_notes): New global.
14765 (tracing_stop_note): New global.
14766 (cmd_qtstart): Set traceframe_usage, start_time.
14767 (stop_tracing): Set stop_time.
14768 (cmd_qtstatus): Report additional status.
14769 (cmd_qtp): New function.
14770 (handle_tracepoint_query): Call it.
14771 (cmd_qtnotes): New function.
14772 (handle_tracepoint_general_set): Call it.
14773 (get_timestamp): Rename from tsv_get_timestamp.
14775 2011-11-14 Stan Shebs <stan@codesourcery.com>
14776 Kwok Cheung Yeung <kcy@codesourcery.com>
14778 * linux-x86-low.c (small_jump_insn): New.
14779 (i386_install_fast_tracepoint_jump_pad): Add arguments for
14780 trampoline and error message, build a trampoline and issue a small
14781 jump instruction to it.
14782 (x86_install_fast_tracepoint_jump_pad): Add arguments for
14783 trampoline and error message.
14784 (x86_get_min_fast_tracepoint_insn_len): New.
14785 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
14786 * linux-low.h (struct linux_target_ops): Add arguments to
14787 install_fast_tracepoint_jump_pad operation, add new operation.
14788 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
14790 (linux_get_min_fast_tracepoint_insn_len): New function.
14791 (linux_target_op): Add new operation.
14792 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
14793 (gdb_trampoline_buffer_end): Ditto.
14794 (gdb_trampoline_buffer_error): Ditto.
14795 (struct ipa_sym_addresses): Add fields for new IPA variables.
14796 (symbol_list): Add entries for new IPA variables.
14797 (struct tracepoint): Add fields to hold the address range of the
14798 trampoline used by the tracepoint.
14799 (trampoline_buffer_head): New static variable.
14800 (trampoline_buffer_tail): Ditto.
14801 (claim_trampoline_space): New function.
14802 (have_fast_tracepoint_trampoline_buffer): New function.
14803 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
14805 (install_fast_tracepoint): Ditto, also add error buffer argument.
14806 (cmd_qtminftpilen): New function.
14807 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
14808 (fast_tracepoint_from_trampoline_address): New function.
14809 (fast_tracepoint_collecting): Handle trampoline as part of jump
14811 (set_trampoline_buffer_space): New function.
14812 (initialize_tracepoint): Initialize new IPA variables.
14813 * target.h (struct target_ops): Add arguments to
14814 install_fast_tracepoint_jump_pad operation, add new
14815 get_min_fast_tracepoint_insn_len operation.
14816 (target_get_min_fast_tracepoint_insn_len): New.
14817 (install_fast_tracepoint_jump_pad): Add arguments.
14818 * server.h (IPA_BUFSIZ): Define.
14819 * linux-i386-ipa.c: Include extra header files.
14820 (initialize_fast_tracepoint_trampoline_buffer): New function.
14821 (initialize_low_tracepoint): Call it.
14822 * server.h (set_trampoline_buffer_space): Declare.
14823 (claim_trampoline_space): Ditto.
14824 (have_fast_tracepoint_trampoline_buffer): Ditto.
14826 2011-11-14 Yao Qi <yao@codesourcery.com>
14828 * server.c (handle_query): Handle InstallInTrace for qSupported.
14829 * tracepoint.c (add_tracepoint): Sort list.
14830 (install_tracepoint, download_tracepoint): New.
14831 (cmd_qtdp): Call them to install and download tracepoints.
14832 (sort_tracepoints): Removed.
14833 (cmd_qtstart): Update.
14835 2011-11-14 Yao Qi <yao@codesourcery.com>
14837 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
14838 * mem-break.h: Declare.
14839 * tracepoint.c (cmd_qtstart): Move some code to ...
14840 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
14842 (download_tracepoints): Move some code to ...
14843 (download_tracepoint_1): ... here. New.
14845 2011-11-08 Yao Qi <yao@codesourcery.com>
14847 * remote-utils.c (relocate_instruction): A comment fix.
14849 2011-11-07 Joel Brobecker <brobecker@adacore.com>
14851 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
14852 (i386_dr_low_get_control, i386_dr_low_get_status): Use
14853 dr_status_mirror and dr_control_mirror from debug_reg_state.
14854 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
14855 (i386_initial_stuff): Remove use of deleted globals.
14856 (i386_get_thread_context, i386_set_thread_context,
14857 i386_thread_added): Use dr_status_mirror and dr_control_mirror
14858 from debug_reg_state.
14860 2011-11-05 Yao Qi <yao@codesourcery.com>
14862 * tracepoint.c (gdb_collect): Loop over tracepoints of same
14863 address as TPOINT's.
14865 2011-11-02 Stan Shebs <stan@codesourcery.com>
14867 * tracepoint.c (agent_mem_read_string): New function.
14868 (eval_agent_expr): Call it for tracenz.
14869 * server.c (handle_query): Report support for tracenz.
14871 2011-11-02 Yao Qi <yao@codesourcery.com>
14873 * tracepoint.c (cmd_qtstart): Remove unused local variables.
14875 2011-11-02 Yao Qi <yao@codesourcery.com>
14877 * target.h: Fix a typo in comment.
14879 2011-10-31 Pedro Alves <pedro@codesourcery.com>
14881 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
14882 clobber the breakpoints' shadows with fast tracepoint jumps.
14883 * mem-break.h (check_mem_write): Add `myaddr' parameter.
14884 * target.c (write_inferior_memory): Also pass MYADDR down to
14887 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
14889 * configure.ac: Check support for personality routine.
14890 * configure: Regenerate.
14891 * config.in: Likewise.
14892 * linux-low.c: Include <sys/personality.h>.
14893 Define ADDR_NO_RANDOMIZE if necessary.
14894 (linux_create_inferior): Disable address space randomization when
14895 forking inferior, if requested.
14896 (linux_supports_disable_randomization): New function.
14897 (linux_target_ops): Install it.
14898 * server.h (disable_randomization): Declare.
14899 * server.c (disable_randomization): New global variable.
14900 (handle_general_set): Handle QDisableRandomization.
14901 (handle_query): Likewise for qSupported.
14902 (main): Support --disable-randomization and --no-disable-randomization
14903 command line arguments.
14904 * target.h (struct target_ops): Add supports_disable_randomization.
14905 (target_supports_disable_randomization): New macro.
14907 2011-09-29 Mike Frysinger <vapier@gentoo.org>
14909 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
14911 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
14912 [!PT_GETDSBT] (target_loadmap): New definition.
14913 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
14914 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
14915 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
14916 and PT_GETDSBT to LINUX_LOADMAP.
14917 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
14918 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
14920 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
14922 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
14923 (arm_linux_hwbp_cap): New static variable.
14924 (arm_linux_get_hwbp_cap): Replace by ...
14925 (arm_linux_init_hwbp_cap): ... this new function.
14926 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
14927 (arm_linux_get_hw_watchpoint_count): Likewise.
14928 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14929 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
14930 (arm_prepare_to_resume): Use perror_with_name instead of error.
14932 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
14934 * linux-arm-low.c: Include <signal.h>.
14935 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
14936 (struct arm_linux_hwbp_cap): New data type.
14937 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
14938 (struct arm_linux_hw_breakpoint): New data type.
14939 (MAX_BPTS, MAX_WPTS): Define.
14940 (struct arch_process_info, struct arch_lwp_info): New data types.
14941 (arm_linux_get_hwbp_cap): New function.
14942 (arm_linux_get_hw_breakpoint_count): Likewise.
14943 (arm_linux_get_hw_watchpoint_count): Likewise.
14944 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14945 (arm_hwbp_control_initialize): Likewise.
14946 (arm_hwbp_control_is_enabled): Likewise.
14947 (arm_hwbp_control_is_initialized): Likewise.
14948 (arm_hwbp_control_disable): Likewise.
14949 (arm_linux_hw_breakpoint_equal): Likewise.
14950 (arm_linux_hw_point_initialize): Likewise.
14951 (struct update_registers_data): New data structure.
14952 (update_registers_callback: New function.
14953 (arm_insert_point): Likewise.
14954 (arm_remove_point): Likewise.
14955 (arm_stopped_by_watchpoint): Likewise.
14956 (arm_stopped_data_address): Likewise.
14957 (arm_new_process): Likewise.
14958 (arm_new_thread): Likewise.
14959 (arm_prepare_to_resume): Likewise.
14960 (the_low_target): Register arm_insert_point, arm_remove_point,
14961 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
14962 arm_new_thread, and arm_prepare_to_resume.
14964 2011-09-15 Stan Shebs <stan@codesourcery.com>
14966 * server.h (struct emit_ops): Add compare-goto fields.
14967 * tracepoint.c (gdb_agent_op_sizes): New table.
14968 (emit_eq_goto): New function.
14969 (emit_ne_goto): New function.
14970 (emit_lt_goto): New function.
14971 (emit_le_goto): New function.
14972 (emit_gt_goto): New function.
14973 (emit_ge_goto): New function.
14974 (is_goto_target): New function.
14975 (compile_bytecodes): Recognize special cases of compare-goto
14976 combinations and call specialized emitters for them.
14977 * linux-x86-low.c (amd64_emit_eq_goto): New function.
14978 (amd64_emit_ne_goto): New function.
14979 (amd64_emit_lt_goto): New function.
14980 (amd64_emit_le_goto): New function.
14981 (amd64_emit_gt_goto): New function.
14982 (amd64_emit_ge_goto): New function.
14983 (amd64_emit_ops): Add the new functions.
14984 (i386_emit_eq_goto): New function.
14985 (i386_emit_ne_goto): New function.
14986 (i386_emit_lt_goto): New function.
14987 (i386_emit_le_goto): New function.
14988 (i386_emit_gt_goto): New function.
14989 (i386_emit_ge_goto): New function.
14990 (i386_emit_ops): Add the new functions.
14992 2011-09-08 Stan Shebs <stan@codesourcery.com>
14994 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
14995 (i386_emit_epilogue): Restore %ebx.
14997 2011-08-31 Jie Zhang <jzhang918@gmail.com>
14999 * server.c (step_thread): Remove definition.
15000 (process_serial_event): Don't handle Hs.
15001 * server.h (step_thread): Remove declaration.
15002 * target.c (set_desired_inferior): Remove use of step_thread.
15004 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15006 * linux-low.c: Include linux-procfs.h.
15007 (linux_attach_lwp_1): Update comments.
15008 (linux_attach): Scan for existing threads when attaching to a
15009 process that is the tgid.
15010 * Makefile.in: Update dependencies.
15012 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15014 * configure.srv: Add linux-procfs.o dependencies.
15016 2011-08-14 Yao Qi <yao@codesourcery.com>
15018 * target.h (struct target_ops): Fix indent.
15019 * win32-low.c (win32_target_ops): Fix comment.
15021 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15022 Yao Qi <yao@codesourcery.com>
15024 * Makefile.in (clean): Remove tic6x-*.c files.
15025 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15026 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15027 (tic6x-c64xp-linux.c): Likewise.
15028 * configure.srv: Add support for tic6x-*-uclinux.
15029 * linux-tic6x-low.c: New.
15030 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15032 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15033 Yao Qi <yao@codesourcery.com>
15035 * target.h (struct target_ops): Add read_loadmap.
15036 * linux-low.c (struct target_loadseg): New type.
15037 (struct target_loadmap): New type.
15038 (linux_read_loadmap): New function.
15039 (linux_target_ops): Add linux_read_loadmap.
15040 * server.c (handle_query): Support qXfer:fdpic:read packet.
15041 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15044 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15046 * win32-low.c: Include <stdint.h>.
15048 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15050 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15051 to the inferior here.
15052 (i386_remove_aligned_watchpoint): Ditto.
15053 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15054 fit part of the watchpoint in the debug registers.
15055 (i386_update_inferior_debug_regs): New.
15056 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15057 registers, and only update the inferior on success.
15058 (i386_low_remove_watchpoint): Ditto.
15060 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15062 * linux-low.c (compare_ints, unique, list_threads, show_process,
15063 linux_core_of_thread): Delete.
15064 (linux_target_ops): Change linux_core_of_thread to
15065 linux_common_core_of_thread.
15066 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15067 * utils.c (malloc_failure): Change type of argument.
15068 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15069 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15070 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15071 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15072 (IPA_OBJS): Add common-utils-ipa.o.
15073 (ptid_h, linux_osdata_h): New macros.
15074 (server_h): Add common/common-utils.h, common/xml-utils.h,
15075 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15077 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15078 ptid.o, buffer.o): New rules.
15079 (linux-low.o): Add common/linux-osdata.h as a dependency.
15080 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15081 * configure.ac: Add AC_HEADER_DIRENT check.
15082 * config.in: Regenerate.
15083 * configure: Regenerate.
15084 * remote-utils.c (xml_escape_text): Delete.
15085 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15086 buffer_xml_printf): Move to common/buffer.c.
15087 * server.c (main): Remove call to initialize_inferiors.
15088 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15089 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15090 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15091 internal_error, gdb_assert, gdb_assert_fail): Delete.
15092 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15093 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15095 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15096 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15097 initialize_inferiors): Delete.
15099 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15101 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15104 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15106 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15108 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15110 2011-05-26 Yao Qi <yao@codesourcery.com>
15112 * Makefile.in (thread-db.o): Track dependence to
15113 common/gdb_thread_db.h.
15114 * thread-db.c: include gdb_thread_db.h from right place.
15116 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15118 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15119 __FILE__ and __LINE__ to internal_error.
15121 2011-05-13 Doug Evans <dje@google.com>
15123 * thread-db.c (try_thread_db_load_from_sdir): New function.
15124 (try_thread_db_load_from_dir): New function.
15125 (thread_db_load_search): Handle $sdir, ignore $pdir.
15126 Remove trying of system directories if search of
15127 libthread-db-search-path fails, that is now done via $sdir.
15129 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15131 * server.c (handle_query): Add EnableDisableTracepoints to the list
15132 of supported features.
15133 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15135 (cmd_qtenable_disable): New.
15136 (cmd_qtstart): Install tracepoints even if disabled.
15137 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15138 receiving a QTEnable or QTDisable packet.
15139 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15140 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15142 (gdb_probe): Skip data collection if static tracepoint is disabled.
15144 2011-05-10 Doug Evans <dje@google.com>
15146 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15148 2011-05-04 Doug Evans <dje@google.com>
15150 * linux-low.c (linux_join): Skip process lookup.
15151 * spu-low.c (spu_join): Ditto.
15152 * server.c (join_inferiors_callback): Delete.
15153 (process_serial_event): For 'D' packet (detach) call join_inferior
15156 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15158 * README: Don't mention xscale*-*-linux*.
15159 * configure.srv (xscale*-*-linux*): Don't handle target.
15161 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15163 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15165 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15166 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15167 (i386_emit_void_call_2): Likewise.
15169 2011-04-26 Yao Qi <yao@codesourcery.com>
15171 * linux-low.c: Move common macros to linux-ptrace.h.
15172 Include linux-ptrace.h.
15173 * Makefile.in (linux_ptrace_h): New.
15174 (linux-low.o): Depends on linux-ptrace.h.
15176 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15178 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15179 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15180 (remote_prepare): New function with most of the TCP code from ...
15181 (remote_open): ... here. Detect PORT here unconditionally. Move also
15182 setting transport_is_reliable.
15183 * server.c (run_once): New variable.
15184 (gdbserver_usage): Document it.
15185 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15186 the first run if RUN_ONCE.
15187 * server.h (run_once, remote_prepare): New declarations.
15189 2011-04-19 Tom Tromey <tromey@redhat.com>
15191 * win32-low.c (handle_load_dll): Remove duplicate "the".
15193 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15195 Remove support for old Cygwin 1.5 versions.
15196 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15197 function to avoid warning.
15198 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15201 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15203 * gdbserver/server.h (Macro _): Define it if not available.
15205 2011-03-14 Michael Snyder <msnyder@vmware.com>
15207 * hostio.c (handle_close): Remove unnecessary null test.
15209 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15211 * Makefile.in (maintainer-clean realclean distclean): Remove
15212 "make ... subdir_do" command.
15214 2011-03-10 Michael Snyder <msnyder@vmware.com>
15216 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15218 * server.c (handle_v_run): Free alloced buffer on early return.
15220 2011-03-09 Yao Qi <yao@codesourcery.com>
15223 2011-03-04 Yao Qi <yao@codesourcery.com>
15225 * Makefile.in: Remove GNU make feature --directory.
15227 2011-03-05 Yao Qi <yao@codesourcery.com>
15229 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15230 (subdir_do): New make target. Copied from gdb/Makefile.
15231 (maintainer-clean, realclean, distclean, clean): Call corresponding
15232 make targets in common/Makefile.
15234 2011-02-11 Yao Qi <yao@codesourcery.com>
15236 * configure.ac: Call AC_PROG_RANLIB.
15237 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15238 * configure: Regenerate.
15240 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15242 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15244 2011-03-06 Yao Qi <yao@codesourcery.com>
15246 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15248 2011-03-05 Yao Qi <yao@codesourcery.com>
15250 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15251 (subdir_do): New make target. Copied from gdb/Makefile.
15252 (maintainer-clean, realclean, distclean, clean): Call corresponding
15253 make targets in common/Makefile.
15255 2011-03-04 Yao Qi <yao@codesourcery.com>
15257 * Makefile.in: Remove GNU make feature --directory.
15259 2011-03-04 Michael Snyder <msnyder@vmware.com>
15261 * server.c (queue_stop_reply): Call xmalloc not malloc.
15263 2011-03-02 Michael Snyder <msnyder@vmware.com>
15265 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15267 2011-02-28 Michael Snyder <msnyder@vmware.com>
15269 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15270 (cmd_qtframe): Ditto.
15271 (cmd_qtbuffer): Ditto.
15272 (cmd_bigqtbuffer): Ditto.
15274 * utils.c (decimal2str): Initialize 'width' to nine, then
15275 don't mess with it.
15277 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15279 * hostio.c (require_data): Free *data, not data.
15281 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15283 * hostio.c (require_data): Use free, not xfree.
15285 2011-02-27 Michael Snyder <msnyder@vmware.com>
15287 * server.c (handle_query): Discard unused value.
15289 * hostio.c (require_data): Free malloc memory before returning
15292 2011-02-26 Michael Snyder <msnyder@vmware.com>
15294 * linux-low.c (list_threads): Call closedir for dirent.
15296 2011-02-27 Michael Snyder <msnyder@vmware.com>
15298 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15299 a case statement falls through.
15301 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15303 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15306 2011-02-26 Michael Snyder <msnyder@vmware.com>
15308 * utils.c (decimal2str): Eliminate dead code and dead param.
15309 (pulongest): Drop dead param from call to decimal2str.
15312 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15314 Revert the following patch (not approved yet):
15315 2011-02-21 Hui Zhu <teawater@gmail.com>
15316 * tracepoint.c (tp_printf): New function.
15317 (eval_agent_expr): Handle gdb_agent_op_printf.
15319 2011-02-21 Hui Zhu <teawater@gmail.com>
15321 * tracepoint.c (tp_printf): New function.
15322 (eval_agent_expr): Handle gdb_agent_op_printf.
15324 2011-02-18 Tom Tromey <tromey@redhat.com>
15326 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15327 (tracepoint.o): Likewise.
15328 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15329 (gdb_agent_op_names): Likewise.
15331 2011-02-18 Tom Tromey <tromey@redhat.com>
15333 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15334 gdb_agent_op_rot>: New constants.
15335 (gdb_agent_op_names): Add pick and roll.
15336 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15339 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15341 * aclocal.m4: Regenerated with aclocal-1.11.1.
15343 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15345 * server.c (handle_qxfer_traceframe_info): New.
15346 (qxfer_packets): Register "traceframe-info".
15347 (handle_query): Report support for qXfer:traceframe-info:read+.
15348 * tracepoint.c (match_blocktype): New.
15349 (traceframe_find_block_type): Rename to ...
15350 (traceframe_walk_blocks): ... this. Add callback filter argument,
15352 (traceframe_find_block_type): New, reimplemented on top of
15353 traceframe_walk_blocks.
15354 (build_traceframe_info_xml): New.
15355 (traceframe_read_info): New.
15356 * server.h (traceframe_read_info): Declare.
15358 2011-02-11 Yao Qi <yao@codesourcery.com>
15360 * configure.ac: Call AC_PROG_RANLIB.
15361 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15362 * configure: Regenerate.
15364 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15366 * server.c (gdb_read_memory): Change return semantics to allow
15368 (handle_search_memory_1): Adjust.
15369 (process_serial_event) <'m' packet>: Handle partial transfers.
15370 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15372 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15374 * regcache.c (init_register_cache): Initialize
15375 regcache->register_status.
15376 (free_register_cache): Release regcache->register_status.
15377 (regcache_cpy): Copy register_status.
15378 (registers_to_string): Print 'x's for unavailable registers.
15379 (supply_register): Mark the register's status valid or
15380 unavailable, depending on whether a buffer was passed in or not.
15381 (supply_register_zeroed): New.
15382 (supply_regblock): Mark the registers' status valid or
15383 unavailable, depending on whether a buffer was passed in or not.
15384 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15385 (struct regcache): New `register_status' field.
15386 (supply_register_zeroed): Declare.
15387 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15388 supply_register_zeroed, rather than passing a NULL buffer to
15390 * tracepoint.c (fetch_traceframe_registers): Update comment.
15392 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15394 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15397 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15399 * server.h (decode_xfer_write): Change prototype.
15400 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15401 and don't extract the annex here.
15402 * server.c (decode_xfer_read): Remove `annex' parameter,
15403 and don't extract the annex here.
15404 (decode_xfer): New.
15405 (struct qxfer): New.
15406 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15407 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15408 (handle_qxfer_statictrace): New functions, abstracted out from
15409 handle_query, and made to use the struct qxfer interface.
15410 (handle_threads_qxfer_proper): Rename to ...
15411 (handle_qxfer_threads_proper): ... this.
15412 (handle_threads_qxfer): Rename to ...
15413 (handle_qxfer_threads): ... this. Adjust.
15414 (qxfer_packets): New array.
15415 (handle_qxfer): New function.
15416 (handle_query): Use handle_qxfer.
15418 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15420 * gdbreplay.c: Shorten lines of >= 80 columns.
15421 * linux-low.c: Ditto.
15422 * linux-ppc-low.c: Ditto.
15423 * linux-s390-low.c: Ditto.
15424 * linux-sparc-low.c: Ditto.
15425 * linux-x86-low.c: Ditto.
15426 * linux-xtensa-low.c: Ditto.
15427 * mem-break.c: Ditto.
15428 * nto-low.c: Ditto.
15429 * regcache.h: Ditto.
15430 * remote-utils.c: Ditto.
15433 * thread-db.c: Ditto.
15434 * tracepoint.c: Ditto.
15436 * win32-low.h: Ditto.
15438 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15440 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15443 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15445 * server.c (gdbserver_version): Update copyright year in version
15447 * gdbreplay.c (gdbreplay_version): Ditto.
15449 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15451 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15452 * linux-bfin-low.c: New file.
15453 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15454 PT_DATA_ADDR for BFIN targets.
15455 * Makefile.in (SFILES): Add linux-bfin-low.c.
15456 (clean): Remove reg-bfin.c.
15457 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15458 * README: Mention supported Blackfin targets.
15460 2010-12-23 Mike Frysinger <vapier@gentoo.org>
15462 * .gitignore: New file.
15464 2010-11-16 Mike Frysinger <vapier@gentoo.org>
15466 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15468 2010-10-22 Jie Zhang <jie@codesourcery.com>
15470 * Makefile.in: Add FLAGS_TO_PASS variable.
15471 (install): Remove dependency of install-only and recursively
15472 invoke make for install-only.
15474 2010-10-04 Doug Evans <dje@google.com>
15476 * Makefile.in (uninstall): Use $(DESTDIR).
15478 2010-09-24 Pedro Alves <pedro@codesourcery.com>
15482 * linux-x86-low.c (compat_siginfo_from_siginfo)
15483 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15484 si_code is < 0. Check for si_code == SI_TIMER before checking for
15487 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15489 * lynx-i386-low.c: New file.
15490 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15492 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15494 * lynx-low.c (ptrace_request_to_str): Remove handling for
15495 request values that have been removed in LynxOS 5.x.
15497 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15499 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15502 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15504 * configure.ac: Add --enable-inprocess-agent option.
15505 * configure: Rebuilt.
15507 2010-09-06 Yao Qi <yao@codesourcery.com>
15509 * linux-low.c (linux_kill): Remove unused variable.
15510 (linux_stabilize_threads): Likewise.
15511 * server.c (start_inferior): Likewise.
15512 (queue_stop_reply_callback): Likewise.
15513 * tracepoint.c (do_action_at_tracepoint): Likewise.
15515 2010-09-06 Yao Qi <yao@codesourcery.com>
15517 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15520 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15522 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15524 2010-09-06 Pedro Alves <pedro@codesourcery.com>
15526 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15529 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15531 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15532 gdbserver/lynx-ppc-low.c: New files.
15533 * Makefile.in (lynx_low_h): New variable.
15534 (lynx-low.o, lynx-ppc-low.o): New rules.
15535 * configure.ac: On LynxOS, link with -lnetinet.
15536 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15537 * configure: regenerate.
15539 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15541 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15542 * configure.ac: Add check for vasprintf and vsnprintf.
15543 * configure, config.in: Regenerate.
15544 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15546 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15548 * gdbreplay.c: Move include of alloca.h up, next to include of
15550 * server.h: Add include of malloc.h.
15551 * mem-break.c: Remove include of malloc.h.
15552 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15554 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15556 * Makefile.in (memmem.o): Build with -Wno-error.
15558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15560 * utils.c (xsnprintf): Make non-static.
15561 * server.h: Add xsnprintf declaration.
15562 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15563 replace calls to snprintf by calls to xsnprintf throughout.
15565 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15567 * configure.ac: Add configure check for alloca.
15568 * configure, config.in: Regenerate.
15569 * server.h: Include alloca.h if it exists.
15570 * gdbreplay.c: Include alloca.h if it exists.
15572 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15574 * linux-low.c (__SIGRTMIN): Define if not already defined.
15575 (linux_create_inferior): Check for __ANDROID__ rather than
15577 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15578 are already deferred.
15579 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15580 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15581 stopped and already has a pending signal to report.
15582 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15583 a pending signal to report or is moving out of a jump pad.
15584 (linux_init_signals): Check for __ANDROID__ rather than
15587 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15589 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15590 debug_threads check. Avoid a linear search when not doing debug
15593 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15595 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15596 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15597 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15598 (process_event): Change local fd's type to gdb_fildes_t.
15599 (create_file_handler): Adjust prototype.
15600 (delete_file_handler): Adjust prototype.
15601 (handle_file_event): Adjust prototype. Use pfildes.
15602 (create_file_event): Adjsut prototype.
15603 * remote-utils.c (remote_desc, listen_desc): Change type to
15605 * server.h: New gdb_fildes_t typedef.
15606 [USE_WIN32API]: Include winsock2.h.
15607 (delete_file_handler, add_file_handler): Adjust prototypes.
15608 (pfildes): Declare.
15609 * utils.c (pfildes): New.
15611 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15613 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15614 * configure: Regenerate.
15616 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15618 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15619 (linux_done_accessing_memory): ... this.
15620 (linux_target_ops): Adjust.
15621 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15622 * nto-low.c (nto_target_ops): Adjust comment.
15623 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15624 * spu-low.c (spu_target_ops): Adjust comment.
15625 * target.h (target_ops): Rename unprepare_to_access_memory field
15626 to done_accessing_memory.
15627 (unprepare_to_access_memory): Rename to ...
15628 (done_accessing_memory): ... this.
15630 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15632 * linux-low.c (linux_prepare_to_access_memory): New.
15633 (linux_unprepare_to_access_memory): New.
15634 (linux_target_ops): Install them.
15635 * server.c (read_memory): Rename to ...
15636 (gdb_read_memory): ... this. Use
15637 prepare_to_access_memory/prepare_to_access_memory.
15638 (write_memory): Rename to ...
15639 (gdb_write_memory): ... this. Use
15640 prepare_to_access_memory/prepare_to_access_memory.
15641 (handle_search_memory_1): Adjust.
15642 (process_serial_event): Adjust.
15643 * target.h (struct target_ops): New fields
15644 prepare_to_access_memory and unprepare_to_access_memory.
15645 (prepare_to_access_memory, unprepare_to_access_memory): New.
15646 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15647 prepare_to_access_memory/prepare_to_access_memory.
15648 * nto-low.c (nto_target_ops): Adjust.
15649 * spu-low.c (spu_target_ops): Adjust.
15650 * win32-low.c (win32_target_ops): Adjust.
15652 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15654 * Makefile.in (WARN_CFLAGS): Get it from configure.
15655 (WERROR_CFLAGS): New.
15656 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
15657 * configure.ac: Introduce --enable-werror, which adds -Werror to
15658 the compiler command line. Enabled by default. Disable with
15659 --disable-werror. Add -Wdeclaration-after-statement
15660 Wpointer-arith and -Wformat-nonliteral to warning flags.
15661 * configure: Regenerate.
15663 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15665 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
15667 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15669 * gdbreplay.c (remote_error): New.
15671 (expect): Use gdbchar. Check for error reading from GDB.
15672 Clarify sync error output.
15673 (play): Check for errors writing to GDB.
15674 * linux-low.c (sigchld_handler): Really ignore `write' errors.
15675 * remote-utils.c (getpkt): Check for errors writing to the remote
15678 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15680 * linux-low.c (linux_wait_1): Move non-debugging code out of
15681 `debug_threads' control.
15683 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15685 * linux-low.c (linux_wait_1): Don't set last_status here.
15686 * server.c (push_event, queue_stop_reply_callback): Assert we're
15687 not pushing a TARGET_WAITKIND_IGNORE event.
15688 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
15689 (myresume, handle_target_event): Set the thread's last_resume_kind
15690 and last_status from the target returned status.
15692 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15696 * linux-x86-low.c (update_debug_registers_callback): New.
15697 (i386_dr_low_set_addr): Use it.
15698 (i386_dr_low_get_addr): New.
15699 (i386_dr_low_set_control): Use update_debug_registers_callback.
15700 (i386_dr_low_get_control): New.
15701 (i386_dr_low_get_status): Adjust.
15702 * linux-low.c (linux_stop_lwp): New.
15703 * linux-low.h (linux_stop_lwp): Declare.
15705 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
15706 argument instead of a i386_debug_reg_state.
15707 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
15708 a i386_debug_reg_state.
15709 (i386_insert_aligned_watchpoint): Adjust.
15710 (i386_remove_aligned_watchpoint): Adjust.
15711 (i386_low_stopped_data_address): Read the debug registers from the
15712 inferior instead of from the mirrors.
15713 * i386-low.h (struct i386_debug_reg_state): Extend comment.
15714 (i386_dr_low_get_addr): Declare.
15715 (i386_dr_low_get_control): Declare.
15716 (i386_dr_low_get_status): Change prototype.
15718 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
15719 (i386_dr_low_get_addr): New.
15720 (i386_dr_low_get_control): New.
15721 (i386_dr_low_get_status): Adjust prototype. Return
15723 (i386_initial_stuff): Clear dr_status_mirror and
15725 (i386_get_thread_context): Adjust.
15726 (i386_set_thread_context): Adjust.
15727 (i386_thread_added): Adjust.
15729 2010-08-24 Pedro Alves <pedro@codesourcery.com>
15731 * linux-low.h (linux_thread_area): Delete declaration.
15733 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
15735 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
15736 after its termination.
15738 2010-08-09 Pedro Alves <pedro@codesourcery.com>
15740 * linux-low.c (gdb_wants_lwp_stopped): Delete.
15741 (gdb_wants_all_stopped): Delete.
15742 (linux_wait_1): Don't call them.
15743 * server.c (handle_v_cont): Tag all threads as want-stopped.
15744 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
15745 stopped as "client-wants-stopped".
15747 2010-07-31 Pedro Alves <pedro@codesourcery.com>
15749 * Makefile.in (signals_h): New.
15750 (server_h): Depend on it.
15751 (server.o): Don't depend on $(signals_def).
15752 (signals.o): Depend on $(signals_def).
15754 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
15756 * Makefile.in (signals_def): New.
15757 (server_h): Append include/gdb/signals.h and signals_def.
15758 (server.o): Append signals_def.
15760 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15762 * server.c (handle_target_event): Use target_signal_to_host for
15763 resume_info.sig initialization.
15764 * target.h (struct thread_resume) <sig>: New comment.
15766 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
15768 * server.c (handle_query): strcpy() the returned string from paddress()
15769 instead of sprintf().
15770 * utils.c (paddress): Return phex_nz().
15772 2010-07-07 Joel Brobecker <brobecker@adacore.com>
15774 * server.c (handle_v_cont): Call mourn_inferior if process
15776 (myresume): Likewise.
15778 2010-07-01 Pedro Alves <pedro@codesourcery.com>
15780 Static tracepoints, and integration with UST.
15782 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
15783 * mem-break.c (uninsert_all_breakpoints)
15784 (reinsert_all_breakpoints): New.
15785 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
15786 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
15787 (gdb_agent_ust_loaded, helper_thread_id)
15788 (gdb_agent_helper_thread_id): New macros.
15789 (struct ipa_sym_addresses): Add addr_ust_loaded,
15790 addr_helper_thread_id, addr_cmd_buf.
15791 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
15792 (in_process_agent_loaded_ust): New.
15793 (write_e_ust_not_loaded): New.
15794 (maybe_write_ipa_ust_not_loaded): New.
15795 (struct collect_static_trace_data_action): New.
15796 (enum tracepoint_type) <static_tracepoint>: New.
15797 (struct tracepoint) <handle>: Mention static tracepoints.
15798 (struct static_tracepoint_ctx): New.
15799 (CMD_BUF_SIZE): New.
15800 (add_tracepoint_action): Handle static tracepoint actions.
15801 (unprobe_marker_at): New.
15802 (clear_installed_tracepoints): Handle static tracepoints.
15803 (cmd_qtdp): Handle static tracepoints.
15804 (probe_marker_at): New.
15805 (cmd_qtstart): Handle static tracepoints.
15806 (response_tracepoint): Handle static tracepoints.
15807 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
15808 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
15809 (get_context_regcache): Handle static tracepoints.
15810 (do_action_at_tracepoint): Handle static tracepoint actions.
15811 (traceframe_find_block_type): Handle static trace data blocks.
15812 (traceframe_read_sdata): New.
15813 (download_tracepoints): Download static tracepoint actions.
15814 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
15815 (GDB_PROBE_NAME): New.
15817 (GET_UST_SYM): New.
15820 (ust_marker_to_static_tracepoint): New.
15822 (collect_ust_data_at_tracepoint): New.
15823 (gdb_ust_probe): New.
15824 (UNIX_PATH_MAX, SOCK_DIR): New.
15825 (gdb_ust_connect_sync_socket): New.
15826 (resume_thread, stop_thread): New.
15827 (run_inferior_command): New.
15828 (init_named_socket): New.
15829 (gdb_ust_socket_init): New.
15830 (cstr_to_hexstr): New.
15832 (first_marker, next_marker): New.
15833 (response_ust_marker): New.
15834 (cmd_qtfstm, cmd_qtsstm): New.
15835 (unprobe_marker_at, probe_marker_at): New.
15836 (cmd_qtstmat, gdb_ust_thread): New.
15837 (gdb_ust_init): New.
15838 (initialize_tracepoint_ftlib): Call gdb_ust_init.
15839 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
15840 (ST_REGENTRY): New.
15841 (x86_64_st_collect_regmap): New.
15842 (X86_64_NUM_ST_COLLECT_GREGS): New.
15843 (AMD64_RIP_REGNUM): New.
15844 (supply_static_tracepoint_registers): New.
15845 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
15846 (ST_REGENTRY): New.
15847 (i386_st_collect_regmap): New.
15848 (i386_NUM_ST_COLLECT_GREGS): New.
15849 (supply_static_tracepoint_registers): New.
15850 * server.c (handle_query): Handle qXfer:statictrace:read.
15851 <qSupported>: Report support for StaticTracepoints, and
15852 qXfer:statictrace:read features.
15853 * server.h (traceframe_read_sdata)
15854 (supply_static_tracepoint_registers): Declare.
15855 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
15856 (unpack_varlen_hex): Include in IPA build.
15857 * Makefile.in (ustlibs, ustinc): New.
15858 (IPA_OBJS): Add remote-utils-ipa.o.
15859 ($(IPA_LIB)): Link -ldl and -lpthread.
15861 (IPAGENT_CFLAGS): Add UST_CFLAGS.
15862 * config.in, configure: Regenerate.
15864 2010-06-20 Ian Lance Taylor <iant@google.com>
15865 Pedro Alves <pedro@codesourcery.com>
15867 * linux-x86-low.c (always_true): Delete.
15868 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
15869 trying to fool the compiler with always_true.
15871 2010-06-20 Pedro Alves <pedro@codesourcery.com>
15873 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
15874 conditions in gdbserver.
15876 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
15878 * spu-low.c (spu_read_memory): Wrap around local store limit.
15879 (spu_write_memory): Likewise.
15881 2010-06-15 Pedro Alves <pedro@codesourcery.com>
15883 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
15884 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
15886 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
15888 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
15889 uses with LONGEST uses.
15891 2010-06-14 Stan Shebs <stan@codesourcery.com>
15892 Pedro Alves <pedro@codesourcery.com>
15896 * linux-x86-low.c: Include limits.h.
15898 (always_true): New.
15901 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
15902 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
15903 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
15904 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
15905 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
15906 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
15907 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
15908 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
15909 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
15910 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
15911 (amd64_emit_void_call_2): New.
15912 (amd64_emit_ops): New.
15913 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
15914 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
15915 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
15916 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
15917 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
15918 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
15919 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
15920 (i386_emit_call, i386_emit_reg, i386_emit_pop)
15921 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
15922 (i386_emit_stack_adjust, i386_emit_int_call_1)
15923 (i386_emit_void_call_2): New.
15924 (i386_emit_ops): New.
15925 (x86_emit_ops): New.
15926 (the_low_target): Install x86_emit_ops.
15927 * server.h (struct emit_ops): New.
15928 (get_raw_reg_func_addr): Declare.
15929 (current_insn_ptr, emit_error): Declare.
15930 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
15931 (set_trace_state_variable_value): New defines.
15932 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
15933 addr_get_trace_state_variable_value and
15934 addr_set_trace_state_variable_value.
15935 (symbol_list): New fields for get_raw_reg,
15936 get_trace_state_variable_value and set_trace_state_variable_value.
15937 (condfn): New typedef.
15938 (struct tracepoint): New field `compiled_cond'.
15939 (do_action_at_tracepoint): Clear compiled_cond.
15940 (get_trace_state_variable_value, set_trace_state_variable_value):
15942 (condition_true_at_tracepoint): If there's a compiled condition,
15944 (current_insn_ptr, emit_error): New globals.
15945 (struct bytecode_address): New.
15946 (get_raw_reg_func_addr): New.
15947 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
15948 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
15949 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
15950 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
15951 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
15952 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
15953 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
15954 (compile_tracepoint_condition, compile_bytecodes): New.
15955 * target.h (emit_ops): Forward declare.
15956 (struct target_ops): New field emit_ops.
15957 (target_emit_ops): New.
15958 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
15959 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
15960 * linux-low.c (linux_emit_ops): New.
15961 (linux_target_ops): Install it.
15962 * linux-low.h (struct linux_target_ops): New field emit_ops.
15964 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
15966 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
15967 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
15969 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15970 Stan Shebs <stan@codesourcery.com>
15972 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
15973 (all): Depend on $(extra_libraries).
15974 (install-only): Install the IPA.
15975 (IPA_OBJS, IPA_LIB): New.
15976 (clean): Remove the IPA lib.
15977 (IPAGENT_CFLAGS): New.
15978 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
15979 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
15980 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
15981 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
15982 * configure.ac: Check for atomic builtins support in the compiler.
15983 (IPA_DEPFILES, extra_libraries): Define.
15984 * configure.srv (ipa_obj): Add description.
15985 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
15986 (i[34567]86-*-linux*): Set ipa_obj.
15987 (x86_64-*-linux*): Set ipa_obj.
15988 * linux-low.c (stabilizing_threads): New.
15989 (supports_fast_tracepoints): New.
15990 (linux_detach): Stabilize threads before detaching.
15991 (handle_tracepoints): Handle internal tracing breakpoints. Assert
15992 the lwp is either not stabilizing, or is moving out of a jump pad.
15993 (linux_fast_tracepoint_collecting): New.
15994 (maybe_move_out_of_jump_pad): New.
15995 (enqueue_one_deferred_signal): New.
15996 (dequeue_one_deferred_signal): New.
15997 (linux_wait_for_event_1): If moving out of a jump pad, defer
15998 pending signals to later.
15999 (linux_stabilize_threads): New.
16000 (linux_wait_1): Check if threads need moving out of jump pads, and
16002 (stuck_in_jump_pad_callback): New.
16003 (move_out_of_jump_pad_callback): New.
16004 (lwp_running): New.
16005 (linux_resume_one_lwp): Handle moving out of jump pads.
16006 (linux_set_resume_request): Dequeue deferred signals.
16007 (need_step_over_p): Also step over fast tracepoint jumps.
16008 (start_step_over): Also uninsert fast tracepoint jumps.
16009 (finish_step_over): Also reinsert fast tracepoint jumps.
16010 (linux_install_fast_tracepoint_jump): New.
16011 (linux_target_ops): Install linux_stabilize_threads and
16012 linux_install_fast_tracepoint_jump_pad.
16013 * linux-low.h (linux_target_ops) <get_thread_area,
16014 install_fast_tracepoint_jump_pad>: New fields.
16015 (struct lwp_info) <collecting_fast_tracepoint,
16016 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16017 (linux_get_thread_area): Declare.
16018 * linux-x86-low.c (jump_insn): New.
16019 (x86_get_thread_area): New.
16020 (append_insns): New.
16021 (push_opcode): New.
16022 (amd64_install_fast_tracepoint_jump_pad): New.
16023 (i386_install_fast_tracepoint_jump_pad): New.
16024 (x86_install_fast_tracepoint_jump_pad): New.
16025 (the_low_target): Install x86_get_thread_area and
16026 x86_install_fast_tracepoint_jump_pad.
16027 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16028 (struct fast_tracepoint_jump): New.
16029 (fast_tracepoint_jump_insn): New.
16030 (fast_tracepoint_jump_shadow): New.
16031 (find_fast_tracepoint_jump_at): New.
16032 (fast_tracepoint_jump_here): New.
16033 (delete_fast_tracepoint_jump): New.
16034 (set_fast_tracepoint_jump): New.
16035 (uninsert_fast_tracepoint_jumps_at): New.
16036 (reinsert_fast_tracepoint_jumps_at): New.
16037 (set_breakpoint_at): Use write_inferior_memory.
16038 (uninsert_raw_breakpoint): Use write_inferior_memory.
16039 (check_mem_read): Mask out fast tracepoint jumps.
16040 (check_mem_write): Mask out fast tracepoint jumps.
16041 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16042 (set_fast_tracepoint_jump): Declare.
16043 (delete_fast_tracepoint_jump)
16044 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16045 (reinsert_fast_tracepoint_jumps_at): Declare.
16046 * regcache.c: Don't compile many functions when building the
16047 in-process agent library.
16048 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16049 the register buffer in the heap.
16050 (free_register_cache): If the register buffer isn't owned by the
16051 regcache, don't free it.
16052 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16053 pre-existing register caches.
16054 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16056 (convert_ascii_to_int): : Constify `from' parameter type.
16057 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16058 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16059 the needed buffer in-place.
16060 (relocate_instruction): New.
16061 * server.c (handle_query) <qSymbols>: If the target supports
16062 tracepoints, give it a chance of looking up symbols. Report
16063 support for fast tracepoints.
16064 (handle_status): Stabilize threads.
16065 (process_serial_event): Adjust.
16066 * server.h (struct fast_tracepoint_jump): Forward declare.
16067 (struct process_info) <fast_tracepoint_jumps>: New field.
16068 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16069 (decode_X_packet, decode_M_packet): Adjust.
16070 (relocate_instruction): Declare.
16071 (in_process_agent_loaded): Declare.
16072 (tracepoint_look_up_symbols): Declare.
16073 (struct fast_tpoint_collect_status): Declare.
16074 (fast_tracepoint_collecting): Declare.
16075 (force_unlock_trace_buffer): Declare.
16076 (handle_tracepoint_bkpts): Declare.
16077 (initialize_low_tracepoint)
16078 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16079 * target.h (struct target_ops) <stabilize_threads,
16080 install_fast_tracepoint_jump_pad>: New fields.
16081 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16082 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16083 [HAVE_STDINT_H]: Include stdint.h.
16084 (trace_debug_1): Rename to ...
16085 (trace_vdebug): ... this.
16086 (trace_debug): Rename to ...
16087 (trace_debug_1): ... this. Add `level' parameter.
16088 (trace_debug): New.
16089 (ATTR_USED, ATTR_NOINLINE): New.
16090 (IP_AGENT_EXPORT): New.
16091 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16092 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16093 (about_to_request_buffer_space, trace_buffer_is_full)
16094 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16095 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16096 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16097 (traceframe_write_count, traceframes_created)
16098 (trace_state_variables)
16099 New renaming defines.
16100 (struct ipa_sym_addresses): New.
16101 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16102 (symbol_list): New.
16103 (ipa_sym_addrs): New.
16104 (all_tracepoint_symbols_looked_up): New.
16105 (in_process_agent_loaded): New.
16106 (write_e_ipa_not_loaded): New.
16107 (maybe_write_ipa_not_loaded): New.
16108 (tracepoint_look_up_symbols): New.
16109 (debug_threads) [IN_PROCESS_AGENT]: New.
16110 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16111 (UNKNOWN_SIDE_EFFECTS): New.
16112 (stop_tracing): New.
16113 (flush_trace_buffer): New.
16114 (stop_tracing_bkpt): New.
16115 (flush_trace_buffer_bkpt): New.
16116 (read_inferior_integer): New.
16117 (read_inferior_uinteger): New.
16118 (read_inferior_data_pointer): New.
16119 (write_inferior_data_pointer): New.
16120 (write_inferior_integer): New.
16121 (write_inferior_uinteger): New.
16122 (struct collect_static_trace_data_action): Delete.
16123 (enum tracepoint_type): New.
16124 (struct tracepoint) <type>: New field `type'.
16125 <actions_str, step_actions, step_actions_str>: Only include in
16127 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16128 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16129 (tracepoints): Use IP_AGENT_EXPORT.
16130 (last_tracepoint): Don't include in the IPA.
16131 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16132 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16133 (alloced_trace_state_variables): New.
16134 (trace_state_variables): Use IP_AGENT_EXPORT.
16135 (traceframe_t): Delete unused variable.
16136 (circular_trace_buffer): Don't include in the IPA.
16137 (trace_buffer_start): Delete.
16138 (struct trace_buffer_control): New.
16139 (trace_buffer_free): Delete.
16140 (struct ipa_trace_buffer_control): New.
16141 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16142 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16144 (trace_buffer_ctrl): New.
16145 (TRACE_BUFFER_CTRL_CURR): New.
16146 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16147 Reimplement as macros.
16148 (trace_buffer_wrap): Delete.
16149 (traceframe_write_count, traceframe_read_count)
16150 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16151 (struct tracepoint_hit_ctx) <type>: New field.
16152 (struct fast_tracepoint_ctx): New.
16153 (memory_barrier): New.
16155 (record_tracepoint_error): Update atomically in the IPA.
16156 (clear_inferior_trace_buffer): New.
16157 (about_to_request_buffer_space): New.
16158 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16159 updating the same buffer.
16160 (add_tracepoint): Default the tracepoint's type to trap
16161 tracepoint, and orig_size to -1.
16162 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16163 internal variables.
16164 (create_trace_state_variable): New parameter `gdb'. Handle it.
16165 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16166 (cmd_qtdp): Handle fast tracepoints.
16167 (cmd_qtdv): Adjust.
16168 (max_jump_pad_size): New.
16169 (gdb_jump_pad_head): New.
16170 (get_jump_space_head): New.
16171 (claim_jump_space): New.
16172 (sort_tracepoints): New.
16173 (MAX_JUMP_SIZE): New.
16174 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16176 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16177 support. Upload fast traceframes, and delete internal IPA
16179 (stop_tracing_handler): New.
16180 (flush_trace_buffer_handler): New.
16181 (cmd_qtstop): Upload fast tracepoints.
16182 (response_tracepoint): Handle fast tracepoints.
16183 (tracepoint_finished_step): Upload fast traceframes. Set the
16184 tracepoint hit context's tracepoint type.
16185 (handle_tracepoint_bkpts): New.
16186 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16187 type. Add comment about fast tracepoints.
16188 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16189 non-existing action_str field.
16190 (get_context_regcache): Handle fast tracepoints.
16191 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16193 (fast_tracepoint_from_jump_pad_address): New.
16194 (fast_tracepoint_from_ipa_tpoint_address): New.
16195 (collecting_t): New.
16196 (force_unlock_trace_buffer): New.
16197 (fast_tracepoint_collecting): New.
16199 (gdb_collect): New.
16200 (write_inferior_data_ptr): New.
16201 (target_tp_heap): New.
16202 (target_malloc): New.
16203 (download_agent_expr): New.
16205 (download_tracepoints): New.
16206 (download_trace_state_variables): New.
16207 (upload_fast_traceframes): New.
16208 (IPA_FIRST_TRACEFRAME): New.
16209 (IPA_NEXT_TRACEFRAME_1): New.
16210 (IPA_NEXT_TRACEFRAME): New.
16211 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16212 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16213 (gdb_jump_pad_buffer_end): New.
16214 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16215 (initialize_tracepoint): Adjust.
16216 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16217 buffer. Initialize the low module.
16218 * utils.c (PREFIX, TOOLNAME): New.
16219 (malloc_failure): Use PREFIX.
16220 (error): In the IPA, an error causes an exit.
16221 (fatal, warning): Use PREFIX.
16222 (internal_error): Use TOOLNAME.
16223 (NUMCELLS): Increase to 10.
16224 * configure, config.in: Regenerate.
16226 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16228 * server.c (handle_query) <qSupported>: Do two passes over the
16229 qSupported string to avoid nesting strtok.
16231 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16233 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16235 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16236 -Wl,--dynamic-list.
16237 * configure: Regenerate.
16238 * proc-service.list: New.
16240 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16242 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16245 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16247 * gdbreplay.c (remote_open): Check error return from socket() call by
16248 its equality to -1 not by it being negative.
16249 * remote-utils.c (remote_open): Likewise.
16251 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16253 * config.h: Regenerate.
16255 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16257 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16258 doesn't provide PTRACE_GET_THREAD_AREA.
16260 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16262 * linux-m68k-low.c: Include <asm/ptrace.h>
16263 (ps_get_thread_area): Implement.
16265 2010-05-03 Doug Evans <dje@google.com>
16267 * event-loop.c (struct callback_event): New struct.
16268 (callback_list): New global.
16269 (append_callback_event, delete_callback_event): New functions.
16270 (process_callback): New function.
16271 (start_event_loop): Call it.
16272 * remote-utils.c (NOT_SCHEDULED): Define.
16273 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16274 moved out of readchar.
16275 (readchar): Rewrite. Call reschedule before returning.
16276 (reset_readchar): New function.
16277 (remote_close): Call it.
16278 (process_remaining, reschedule): New functions.
16279 * server.h (callback_handler_func): New typedef.
16280 (append_callback_event, delete_callback_event): Declare.
16282 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16284 * proc-service.c (ps_pglobal_lookup): Use
16285 thread_db_look_up_one_symbol.
16286 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16287 parameter. Use it instead of all_symbols_looked_up.
16288 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16290 (all_symbols_looked_up): Don't declare.
16291 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16292 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16294 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16295 Set all_symbols_looked_up here.
16296 (thread_db_look_up_one_symbol): New.
16297 (thread_db_get_tls_address): Adjust.
16298 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16299 thread_db object on the heap, and tentatively set it in the
16301 (thread_db_init): Don't set all_symbols_looked_up here.
16302 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16304 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16306 * linux-low.c (linux_kill, linux_detach): Adjust.
16307 (status_pending_p_callback): Remove redundant statement. Check
16308 for !TARGET_WAITIKIND_IGNORE, instead of
16309 TARGET_WAITKIND_STOPPED.
16310 (handle_tracepoints): Make sure LWP is locked. Adjust.
16311 (linux_wait_for_event_1): Adjust.
16312 (linux_cancel_breakpoints): New.
16313 (unsuspend_one_lwp): New.
16314 (unsuspend_all_lwps): New.
16315 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16316 (send_sigstop_callback): Change return type to int, add new
16317 `except' parameter and handle it.
16318 (suspend_and_send_sigstop_callback): New.
16319 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16320 pass them down. If SUSPEND, also increment the lwp's suspend
16322 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16323 (need_step_over_p): Don't consider suspended LWPs.
16324 (start_step_over): Adjust.
16325 (proceed_one_lwp): Change return type to int, add new `except'
16326 parameter and handle it.
16327 (unsuspend_and_proceed_one_lwp): New.
16328 (proceed_all_lwps): Use find_inferior instead of
16330 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16331 also decrement the suspend count of LWPs. Pass `except' down,
16332 instead of hacking its suspend count.
16333 (linux_pause_all): Add `freeze' parameter. Adjust.
16334 (linux_unpause_all): New.
16335 (linux_target_ops): Install linux_unpause_all.
16336 * server.c (handle_status): Adjust.
16337 * target.h (struct target_ops): New fields `unpause_all' and
16338 `cancel_breakpoints'. Add new parameter to `pause_all'.
16339 (pause_all): Add new `freeze' parameter.
16340 (unpause_all): New.
16341 (cancel_breakpoints): New.
16342 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16343 cancel breakpoints.
16344 (cmd_qtstart): Pause threads.
16345 (stop_tracing): Pause threads, and cancel breakpoints.
16346 * win32-low.c (win32_target_ops): Adjust.
16348 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16350 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16351 the inferior right away from here...
16352 (linux_wait_1): ... to here, and adjust to check the thread's
16353 last_resume_kind instead of the lwp's step or stop_expected flags.
16355 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16357 * README: Use consistent `GDB' and `GDBserver' spellings.
16359 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16361 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16362 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16363 (linux_detach_one_lwp): Assume the lwp is stopped.
16364 (any_thread_of): Delete.
16365 (linux_detach): Stop all lwps here. Don't blindly delete all
16367 (delete_lwp_callback): New.
16368 (linux_mourn): Delete all lwps of the process that is gone.
16369 (linux_wait_1): Don't delete the last lwp of the process here.
16370 * mem-break.h (mark_breakpoints_out): Declare.
16371 * mem-break.c (mark_breakpoints_out): New.
16372 (free_all_breakpoints): Use it.
16373 * server.c (handle_target_event): If the process is gone, mark
16375 * thread-db.c (struct thread_db) <create_bp>: New field.
16376 (thread_db_enable_reporting): Fix prototype. Store a thread event
16377 breakpoint reference in the thread_db struct.
16378 (thread_db_load_search): Clear the thread_db object.
16379 (try_thread_db_load_1): Ditto.
16380 (switch_to_process): New.
16381 (disable_thread_event_reporting): Use it.
16382 (remove_thread_event_breakpoints): New.
16383 (thread_db_detach, thread_db_mourn): Use it.
16385 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16387 * linux-low.c (linux_enable_event_reporting): New.
16388 (linux_wait_for_event_1, handle_extended_wait): Use it.
16390 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16392 * linux-low.c (linux_kill_one_lwp, linux_kill)
16393 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16394 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16395 SIGSTOP even if the LWP is stopped.
16396 (send_sigstop_callback): New.
16397 (stop_all_lwps): Use send_sigstop_callback instead.
16398 (linux_resume_one_thread): Adjust.
16399 (proceed_one_lwp): Still proceed an LWP that the client has
16400 requested to stop, if we haven't reported it as stopped yet. Make
16401 sure that LWPs the client want stopped, have a pending SIGSTOP.
16403 2010-04-26 Doug Evans <dje@google.com>
16405 * server.c (handle_general_set): Make static.
16407 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16408 Print received char after testing for error/eof instead of before.
16409 (input_interrupt): Tweak comment.
16411 2010-04-23 Doug Evans <dje@google.com>
16413 * server.c (start_inferior): Print inferior argv if --debug.
16415 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16417 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16418 * nto-x86-low.c: Include server.h
16420 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16422 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16423 be consistent with other sources of this directory.
16424 (init_registers_amd64): Correct name of source file of this function
16427 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16429 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16430 64-bit executables.
16432 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16434 * win32-i386-low.c: Add 64-bit support.
16435 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16436 (init_registers_amd64): Declare.
16437 (mappings): Add 64-bit version of array.
16438 (init_windows_x86): New function.
16439 (the_low_target): Change init_arch field to init_windows_x86.
16441 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16443 * win32-low.c: Adapt to support also 64-bit architecture.
16444 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16445 (get_image_name): Use SIZE_T type for local variable `done'.
16446 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16447 (toolhelp_get_dll_name): Idem.
16448 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16449 Use uintptr_t typecast to avoid warning.
16450 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16451 (handle_exception): Use phex_nz to avoid warning.
16452 (win32_wait): Remove unused local variable `process'.
16454 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16456 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16459 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16461 * configure.ac: Use `ws2_32' library for srv_mingw.
16462 * configure: Regenerate.
16463 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16464 * remote-utils.c: Likewise.
16466 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16468 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16469 if __x86_64__ is defined.
16471 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16473 * configure: Regenerate.
16475 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16477 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16478 * target.h (target_ops): New get_tib_address field.
16479 * win32-low.h (win32_thread_info): Add thread_local_base field.
16480 * win32-low.c (child_add_thread): Add tlb argument.
16481 Set thread_local_base field to TLB.
16482 (get_child_debug_event): Adapt to child_add_thread change.
16483 (win32_get_tib_address): New function.
16484 (win32_target_ops): Set get_tib_address field to
16485 win32_get_tib_address.
16486 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16488 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16490 * linux-low.c (linux_mourn): Also remove the process.
16491 * server.c (handle_target_event): Don't remove the process here.
16492 * nto-low.c (nto_mourn): New.
16493 (nto_target_ops): Install it.
16494 * spu-low.c (spu_mourn): New.
16495 (spu_target_ops): Install it.
16496 * win32-low.c (win32_mourn): New.
16497 (win32_target_ops): Install it.
16499 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16501 * server.h (buffer_xml_printf): Remove redundant `;'.
16503 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16505 * regcache.c (set_register_cache): Invalidate regcaches before
16506 changing the register cache layout.
16507 (regcache_invalidate_one): Allow a NULL regcache.
16508 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16509 regcaches before changing the register cache layout or the target
16512 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16514 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16515 variable warning on Linux/x86-64.
16517 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16519 GDBserver disconnected tracing support.
16521 * linux-low.c (linux_remove_process): Delete.
16522 (add_lwp): Don't set last_resume_kind here.
16523 (linux_kill): Use `mourn'.
16524 (linux_detach): Use `thread_db_detach', and `mourn'.
16525 (linux_mourn): New.
16526 (linux_attach_lwp_1): Adjust comment.
16527 (linux_attach): last_resume_kind moved the thread_info; adjust.
16528 (status_pending_p_callback): Adjust.
16529 (linux_wait_for_event_1): Adjust.
16530 (count_events_callback, select_singlestep_lwp_callback)
16531 (select_event_lwp_callback, cancel_breakpoints_callback)
16532 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16533 (proceed_one_lwp): Adjust.
16534 (linux_async): Add debug output.
16535 (linux_thread_stopped): New.
16536 (linux_pause_all): New.
16537 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16539 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16540 (thread_db_free): Delete declaration.
16541 (thread_db_detach, thread_db_mourn): Declare.
16542 * thread-db.c (thread_db_init): Use thread_db_mourn.
16543 (thread_db_free): Delete, split in two.
16544 (disable_thread_event_reporting): New.
16545 (thread_db_detach): New.
16546 (thread_db_mourn): New.
16548 * server.h (struct thread_info) <last_resume_kind>: New field.
16549 <attached>: Add comment.
16550 <gdb_detached>: New field.
16551 (handler_func): Change return type to int.
16552 (handle_serial_event, handle_target_event): Ditto.
16553 (gdb_connected): Declare.
16555 (disconnected_tracing): Declare.
16556 (stop_tracing): Declare.
16558 * server.c (handle_query) <qSupported>: Report support for
16559 disconnected tracing.
16560 (queue_stop_reply_callback): Account for running threads.
16561 (gdb_wants_thread_stopped): New.
16562 (gdb_wants_all_threads_stopped): New.
16563 (gdb_reattached_process): New.
16564 (handle_status): Clear the `gdb_detached' flag of all processes.
16565 In all-stop, stop all threads.
16566 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16567 (process_serial_event): If the remote connection breaks, or if an
16568 exit was forced with "monitor exit", force an event loop exit.
16569 Handle disconnected tracing on detach.
16570 (handle_serial_event): Adjust.
16571 (handle_target_event): If GDB isn't connected, forward events back
16572 to the inferior, unless the last process exited, in which case,
16573 exit gdbserver. Adjust interface.
16575 * remote-utils.c (remote_open): Don't block in accept. Instead
16576 register an event loop source on the listen socket file
16577 descriptor. Refactor bits into ...
16578 (listen_desc): ... this new global.
16579 (gdb_connected): ... this new function.
16580 (enable_async_notification): ... this new function.
16581 (handle_accept_event): ... this new function.
16582 (remote_close): Clear remote_desc.
16584 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16586 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16588 (mourn_inferior): Define.
16589 (target_process_qsupported): Avoid the dangling else problem.
16590 (thread_stopped): Define.
16591 (pause_all): Define.
16592 (target_waitstatus_to_string): Declare.
16593 * target.c (target_waitstatus_to_string): New.
16595 * tracepoint.c (tracing): Make extern.
16596 (disconnected_tracing): New.
16597 (stop_tracing): Make extern. Handle tracing stops due to GDB
16599 (cmd_qtdisconnected): New.
16600 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16601 (handle_tracepoint_general_set): Handle QTDisconnected.
16603 * event-loop.c (event_handler_func): Change return type to int.
16604 (process_event): Bail out if the event handler wants the event
16606 (handle_file_event): Ditto.
16607 (start_event_loop): Bail out if the event handler wants the event
16610 * nto-low.c (nto_target_ops): Adjust.
16611 * spu-low.c (spu_wait): Don't remove the process here.
16612 (spu_target_ops): Adjust.
16613 * win32-low.c (win32_wait): Don't remove the process here.
16614 (win32_target_ops): Adjust.
16616 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16618 * regcache.c (realloc_register_cache): Invalidate inferior's
16619 regcache before recreating it.
16621 2010-04-09 Pedro Alves <pedro@codesourcery.com>
16623 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16625 2010-04-09 Stan Shebs <stan@codesourcery.com>
16626 Pedro Alves <pedro@codesourcery.com>
16628 * server.h (LONGEST): New.
16629 (struct thread_info) <while_stepping>: New field.
16630 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16632 (initialize_tracepoint, handle_tracepoint_general_set)
16633 (handle_tracepoint_query, tracepoint_finished_step)
16634 (tracepoint_was_hit, release_while_stepping_state_list):
16635 (current_traceframe): Declare.
16636 * server.c (handle_general_set): Handle tracepoint packets.
16637 (read_memory): New.
16638 (write_memory): New.
16639 (handle_search_memory_1): Use read_memory.
16640 (handle_query): Report support for conditional tracepoints, trace
16641 state variables, and tracepoint sources. Handle tracepoint
16643 (main): Initialize the tracepoints module.
16644 (process_serial_event): Handle traceframe reads/writes.
16646 * linux-low.c (handle_tracepoints): New.
16647 (linux_wait_1): Call it.
16648 (linux_resume_one_lwp): Handle while-stepping.
16649 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16650 (linux_target_ops): Install them.
16651 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16653 * linux-x86-low.c (x86_supports_tracepoints): New.
16654 (the_low_target). Install it.
16656 * mem-break.h (delete_breakpoint): Declare.
16657 * mem-break.c (delete_breakpoint): Make external.
16659 * target.h (struct target_ops): Add `supports_tracepoints',
16660 `read_pc', and `write_pc' fields.
16661 (target_supports_tracepoints): Define.
16662 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
16665 * regcache.h (struct regcache) <registers_owned>: New field.
16666 (init_register_cache, regcache_cpy): Declare.
16667 (regcache_read_pc, regcache_write_pc): Declare.
16668 (register_cache_size): Declare.
16669 (supply_regblock): Declare.
16670 * regcache.c (init_register_cache): New.
16671 (new_register_cache): Use it.
16672 (regcache_cpy): New.
16673 (register_cache_size): New.
16674 (supply_regblock): New.
16675 (regcache_read_pc, regcache_write_pc): New.
16677 * tracepoint.c: New.
16679 * Makefile.in (OBS): Add tracepoint.o.
16680 (tracepoint.o): New rule.
16682 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
16684 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
16686 (i386-mmx.c): Likewise.
16687 (i386-mmx-linux.o): Likewise.
16688 (i386-mmx-linux.c): Likewise.
16690 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
16691 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
16692 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
16693 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
16695 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
16696 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
16697 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
16699 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
16701 * Makefile.in (clean): Updated.
16703 (i386-avx.c): Likewise.
16704 (i386-avx-linux.o): Likewise.
16705 (i386-avx-linux.c): Likewise.
16706 (amd64-avx.o): Likewise.
16707 (amd64-avx.c): Likewise.
16708 (amd64-avx-linux.o): Likewise.
16709 (amd64-avx-linux.c): Likewise.
16711 * configure.srv (srv_i386_regobj): Add i386-avx.o.
16712 (srv_i386_linux_regobj): Add i386-avx-linux.o.
16713 (srv_amd64_regobj): Add amd64-avx.o.
16714 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
16715 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
16716 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
16717 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
16718 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
16719 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
16720 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
16722 * i387-fp.c: Include "i386-xstate.h".
16724 (i387_cache_to_xsave): Likewise.
16725 (i387_xsave_to_cache): Likewise.
16726 (x86_xcr0): Likewise.
16728 * i387-fp.h (i387_cache_to_xsave): Likewise.
16729 (i387_xsave_to_cache): Likewise.
16730 (x86_xcr0): Likewise.
16732 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
16733 * linux-crisv32-low.c (target_regsets): Likewise.
16734 * linux-m68k-low.c (target_regsets): Likewise.
16735 * linux-mips-low.c (target_regsets): Likewise.
16736 * linux-ppc-low.c (target_regsets): Likewise.
16737 * linux-s390-low.c (target_regsets): Likewise.
16738 * linux-sh-low.c (target_regsets): Likewise.
16739 * linux-sparc-low.c (target_regsets): Likewise.
16740 * linux-xtensa-low.c (target_regsets): Likewise.
16742 * linux-low.c: Include <sys/uio.h>.
16743 (regsets_fetch_inferior_registers): Support nt_type.
16744 (regsets_store_inferior_registers): Likewise.
16745 (linux_process_qsupported): New.
16746 (linux_target_ops): Add linux_process_qsupported.
16748 * linux-low.h (regset_info): Add nt_type.
16749 (linux_target_ops): Add process_qsupported.
16751 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
16753 (init_registers_i386_avx_linux): New.
16754 (init_registers_amd64_avx_linux): Likewise.
16755 (xmltarget_i386_linux_no_xml): Likewise.
16756 (xmltarget_amd64_linux_no_xml): Likewise.
16757 (PTRACE_GETREGSET): Likewise.
16758 (PTRACE_SETREGSET): Likewise.
16759 (x86_fill_xstateregset): Likewise.
16760 (x86_store_xstateregset): Likewise.
16761 (use_xml): Likewise.
16762 (x86_linux_update_xmltarget): Likewise.
16763 (x86_linux_process_qsupported): Likewise.
16764 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
16765 (x86_arch_setup): Don't call init_registers_amd64_linux nor
16766 init_registers_i386_linux here. Call
16767 x86_linux_update_xmltarget.
16768 (the_low_target): Add x86_linux_process_qsupported.
16770 * server.c (handle_query): Call target_process_qsupported.
16772 * target.h (target_ops): Add process_qsupported.
16773 (target_process_qsupported): New.
16775 2010-04-03 Pedro Alves <pedro@codesourcery.com>
16777 * inferiors.c (add_thread): Set last_status kind to
16778 TARGET_WAITKIND_IGNORE.
16779 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
16780 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
16781 (linux_wait_1): Move `thread' local definition to block that uses
16782 it. Don't NULL initialize `event_child'.
16783 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
16784 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
16785 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
16787 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16789 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
16790 an extended waitstatus, or by a watchpoint.
16791 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
16792 thread was stepping or has been stopped by a watchpoint.
16794 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16796 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
16797 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
16798 of another, then delete the previous, and validate all
16800 (validate_inserted_breakpoint): New.
16801 (delete_disabled_breakpoints): New.
16802 (validate_breakpoints): New.
16803 (check_mem_read): Validate breakpoints before trusting their
16804 shadow. Delete disabled breakpoints.
16805 (check_mem_write): Validate breakpoints before trusting they
16806 should be inserted. Delete disabled breakpoints.
16807 * mem-break.h (validate_breakpoints):
16808 * server.c (handle_query): Validate breakpoints when we see a
16811 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16813 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
16814 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
16815 if we could tell there's a GDB breakpoint at stop_pc.
16816 (need_step_over_p): Don't do a step over if we find a GDB
16817 breakpoint at the resume PC.
16819 * mem-break.c (struct raw_breakpoint): New.
16820 (enum bkpt_type): New type `gdb_breakpoint'.
16821 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
16822 fields. New field `raw'.
16823 (find_raw_breakpoint_at): New.
16824 (set_raw_breakpoint_at): Handle refcounting. Create a raw
16825 breakpoint instead.
16826 (set_breakpoint_at): Adjust.
16827 (delete_raw_breakpoint): New.
16828 (release_breakpoint): New.
16829 (delete_breakpoint): Rename to...
16830 (delete_breakpoint_1): ... this. Add proc parameter. Use
16831 release_breakpoint. Return ENOENT.
16832 (delete_breakpoint): Reimplement.
16833 (find_breakpoint_at): Delete.
16834 (find_gdb_breakpoint_at): New.
16835 (delete_breakpoint_at): Delete.
16836 (set_gdb_breakpoint_at): New.
16837 (delete_gdb_breakpoint_at): New.
16838 (gdb_breakpoint_here): New.
16839 (set_reinsert_breakpoint): Use release_breakpoint.
16840 (uninsert_breakpoint): Rename to ...
16841 (uninsert_raw_breakpoint): ... this.
16842 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
16843 (reinsert_raw_breakpoint): Change parameter type to
16845 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
16847 (check_breakpoints): Adjust. Use release_breakpoint.
16848 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
16849 (breakpoint_inserted_here): Ditto.
16850 (check_mem_read): Adjust to iterate over raw breakpoints instead.
16851 Don't trust the breakpoint's shadow if it is not inserted.
16852 (check_mem_write): Adjust to iterate over raw breakpoints instead.
16853 (delete_all_breakpoints): Adjust.
16854 (free_all_breakpoints): Mark all breakpoints as uninserted, and
16855 use delete_breakpoint_1.
16857 * mem-break.h (breakpoints_supported): Delete declaration.
16858 (set_gdb_breakpoint_at): Declare.
16859 (gdb_breakpoint_here): Declare.
16860 (delete_breakpoint_at): Delete.
16861 (delete_gdb_breakpoint_at): Declare.
16863 * server.h (struct raw_breakpoint): Forward declare.
16864 (struct process_info): New field `raw_breakpoints'.
16866 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
16869 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16871 * linux-low.c (status_pending_p_callback): Fix comment.
16872 (linux_wait_for_event_1): Move most of the internal breakpoint
16873 handling from here...
16874 (linux_wait_1): ... to here.
16875 (count_events_callback): New.
16876 (select_singlestep_lwp_callback): New.
16877 (select_event_lwp_callback): New.
16878 (cancel_breakpoints_callback): New.
16879 (select_event_lwp): New.
16880 (linux_wait_1): Simplify internal breakpoint handling. Give equal
16881 priority to all LWPs that have had events that should be reported
16882 to the client. Cancel breakpoints when about to reporting the
16883 event to the client, not while stopping lwps. No longer cancel
16884 finished single-steps here.
16885 (cancel_finished_single_step): Delete.
16886 (cancel_finished_single_steps): Delete.
16888 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16890 * mem-break.c (enum bkpt_type): New.
16891 (struct breakpoint): New field `type'.
16892 (set_breakpoint_at): Change return type to struct breakpoint
16893 pointer. Set type to `other_breakpoint' by default.
16894 (delete_breakpoint): Rewrite, supporting more than one breakpoint
16895 in the breakpoint list.
16896 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
16897 (reinsert_breakpoint): Rename to ...
16898 (reinsert_raw_breakpoint): ... this.
16899 (reinsert_breakpoints_at): Adjust.
16900 * mem-break.h (struct breakpoint): Declare.
16901 (set_breakpoint_at): Change return type to struct breakpoint
16904 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16906 * server.c (handle_query): Assign, not compare.
16908 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16910 Teach linux gdbserver to step-over-breakpoints.
16912 * linux-low.c (can_hardware_single_step): New.
16913 (supports_breakpoints): New.
16914 (handle_extended_wait): If stopping threads, read the stop pc of
16915 the new cloned LWP.
16917 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
16918 low target doesn't support retrieving the PC.
16919 (add_lwp): Set last_resume_kind to resume_continue.
16920 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
16921 (linux_attach): Don't clear stop_expected. Set the lwp's
16922 last_resume_kind to resume_stop.
16923 (linux_detach_one_lwp): Don't check for removed breakpoints.
16924 (check_removed_breakpoint): Delete.
16925 (status_pending_p): Rename to ...
16926 (status_pending_p_callback): ... this. Don't check for removed
16927 breakpoints. Don't consider threads that are stopped from GDB's
16929 (linux_wait_for_lwp): Always read the stop_pc here.
16930 (cancel_breakpoint): New.
16931 (step_over_bkpt): New global.
16932 (linux_wait_for_event_1): Implement stepping over breakpoints.
16933 (gdb_wants_lwp_stopped): New.
16934 (gdb_wants_all_stopped): New.
16935 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
16936 single-step traps here. Store the thread's last reported target
16938 (send_sigstop): Don't clear stop_expected. Always set it,
16940 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
16941 (cancel_finished_single_step): New.
16942 (cancel_finished_single_steps): New.
16943 (wait_for_sigstop): Don't cancel finished single-step traps here.
16944 (linux_resume_one_lwp): Don't check for removed breakpoints.
16945 Don't set `step' on non-hardware step archs.
16946 (linux_set_resume_request): Ignore resume_stop requests if already
16947 stopping or stopped. Set the lwp's last_resume_kind.
16948 (resume_status_pending_p): Don't check for removed breakpoints.
16949 (need_step_over_p): New.
16950 (start_step_over): New.
16951 (finish_step_over): New.
16952 (linux_resume_one_thread): Always queue a sigstop for resume_stop
16953 requests. Clear the thread's last reported target waitstatus.
16954 Don't use the `suspended' flag. Don't consider pending breakpoints.
16955 (linux_resume): Start a step-over if necessary.
16956 (proceed_one_lwp): New.
16957 (proceed_all_lwps): New.
16958 (unstop_all_lwps): New.
16959 * linux-low.h (struct lwp_info): Rewrite comment for the
16960 `suspended' flag. Add the `stop_pc' field. Delete the
16961 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
16962 Add `'last_resume_kind' and `need_step_over' fields.
16963 * inferiors.c (struct thread_info): Delete, moved elsewhere.
16964 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
16965 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
16966 (set_raw_breakpoint_at): New.
16967 (set_breakpoint_at): Rewrite to use it.
16968 (reinsert_breakpoint_handler): Delete.
16969 (set_reinsert_breakpoint): New.
16970 (reinsert_breakpoint_by_bp): Delete.
16971 (delete_reinsert_breakpoints): New.
16972 (uninsert_breakpoint): Rewrite.
16973 (uninsert_breakpoints_at): New.
16974 (reinsert_breakpoint): Rewrite.
16975 (reinsert_breakpoints_at): New.
16976 (check_breakpoints): Rewrite.
16977 (breakpoint_here): New.
16978 (breakpoint_inserted_here): New.
16979 (check_mem_read): Adjust.
16980 * mem-break.h (breakpoints_supported, breakpoint_here)
16981 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
16982 (reinsert_breakpoint_by_bp): Delete declaration.
16983 (delete_reinsert_breakpoints): Declare.
16984 (reinsert_breakpoint): Delete declaration.
16985 (reinsert_breakpoints_at): Declare.
16986 (uninsert_breakpoint): Delete declaration.
16987 (uninsert_breakpoints_at): Declare.
16988 (check_breakpoints): Adjust prototype.
16989 * server.h: Adjust include order.
16990 (struct thread_info): Declare here. Add a `last_status' field.
16992 2010-03-23 Michael Snyder <msnyder@vmware.com>
16994 * server.c (crc32): New function.
16995 (handle_query): Add handling for 'qCRC:' request.
16997 2010-03-23 Pedro Alves <pedro@codesourcery.com>
16999 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17000 lwp had been stopped by a watchpoint.
17002 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17004 * server.h (internal_error): Declare.
17005 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17006 * utils.c (internal_error): New function.
17008 2010-03-15 Andreas Schwab <schwab@redhat.com>
17010 * configure.srv: Fix typo setting srv_regobj.
17012 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17014 * linux-low.c (fetch_register): Avoid passing a non string literal
17016 (usr_store_inferior_registers): Ditto.
17018 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17020 * linux-low.c (linux_write_memory): Bail out early if peeking
17023 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17025 * linux-low.h (struct lwp_info): New fields
17026 `stopped_by_watchpoint' and `stopped_data_address'.
17027 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17028 here, and cache them in the lwp object.
17029 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17031 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17033 (linux_stopped_by_watchpoint): Rewrite.
17034 (linux_stopped_data_address): Rewrite.
17036 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17038 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17039 switching the current inferior, not before.
17041 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17043 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17044 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17045 i386-linux.c and amd64-linux.c.
17046 (reg-i386.o): Removed.
17047 (reg-i386.c): Likewise.
17048 (reg-i386-linux.o): Likewise.
17049 (reg-i386-linux.c): Likewise.
17050 (reg-x86-64.o): Likewise.
17051 (reg-x86-64.c): Likewise.
17052 (reg-x86-64-linux.o): Likewise.
17053 (reg-x86-64-linux.c): Likewise.
17055 (i386.c): Likewise.
17056 (i386-linux.o): Likewise.
17057 (i386-linux.c): Likewise.
17058 (amd64.o): Likewise.
17059 (amd64.c): Likewise.
17060 (amd64-linux.o): Likewise.
17061 (amd64-linux.c): Likewise.
17063 * configure.srv (srv_i386_regobj): New.
17064 (srv_i386_linux_regobj): Likewise.
17065 (srv_amd64_regobj): Likewise.
17066 (srv_amd64_linux_regobj): Likewise.
17067 (srv_i386_32bit_xmlfiles): Likewise.
17068 (srv_i386_64bit_xmlfiles): Likewise.
17069 (srv_i386_xmlfiles): Likewise.
17070 (srv_amd64_xmlfiles): Likewise.
17071 (srv_i386_linux_xmlfiles): Likewise.
17072 (srv_amd64_linux_xmlfiles): Likewise.
17073 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17074 srv_xmlfiles to $srv_i386_xmlfiles.
17075 (i[34567]86-*-mingw32ce*): Likewise.
17076 (i[34567]86-*-mingw*): Likewise.
17077 (i[34567]86-*-nto*): Likewise.
17078 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17079 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17080 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17081 (x86_64-*-linux*): Likewise.
17083 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17084 (init_registers_amd64_linux): New.
17085 (x86_arch_setup): Replace init_registers_x86_64_linux with
17086 init_registers_amd64_linux.
17088 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17090 * configure.ac: Check for libdl. If it is not available link against
17091 static libthread_db.
17092 * configure: Regenerate.
17094 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17098 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17099 handing a read watchpoint.
17100 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17102 2010-02-12 Doug Evans <dje@google.com>
17104 * linux-low.c (linux_supports_tracefork_flag): Document.
17105 (linux_look_up_symbols): Add comment.
17107 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17109 * regcache.c (supply_register): Clear regcache if buf is NULL.
17111 2010-02-02 Nicolas Roche <roche@sourceware.org>
17112 Joel Brobecker <brobecker@adacore.com>
17114 * inferiors.c (find_inferior): Add function documentation.
17115 (unloaded_dll): Handle the case where the unloaded dll has not
17116 been previously registered in the dll list.
17118 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17120 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17121 (thumb2_breakpoint): New.
17122 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17124 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17126 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17127 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17130 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17132 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17134 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17136 * linux-s390-low.c (s390_collect_ptrace_register)
17137 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17139 2010-01-21 Doug Evans <dje@google.com>
17141 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17142 (PTRACE_ARG4_TYPE): New macro.
17143 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17144 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17145 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17146 (usr_store_inferior_registers): Ditto.
17147 (linux_read_memory, linux_write_memory): Ditto.
17148 (linux_test_for_tracefork): Ditto.
17150 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17151 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17153 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17155 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17158 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17160 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17161 prototype to take a regcache. Adjust.
17163 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17165 * regcache.h (struct thread_info): Forward declare.
17166 (struct regcache): New.
17167 (new_register_cache): Adjust prototype.
17168 (get_thread_regcache): Declare.
17169 (free_register_cache): Adjust prototype.
17170 (registers_to_string, registers_from_string): Ditto.
17171 (supply_register, supply_register_by_name, collect_register)
17172 (collect_register_as_string, collect_register_by_name): Ditto.
17173 * regcache.c (struct inferior_regcache_data): Delete.
17174 (get_regcache): Rename to ...
17175 (get_thread_regcache): ... this. Adjust. Switch inferior before
17176 fetching registers.
17177 (regcache_invalidate_one): Adjust.
17178 (regcache_invalidate): Fix prototype.
17179 (new_register_cache): Return the new register cache.
17180 (free_register_cache): Change prototype.
17181 (realloc_register_cache): Adjust.
17182 (registers_to_string): Change prototype to take a regcache. Adjust.
17183 (registers_from_string): Ditto.
17184 (register_data): Ditto.
17185 (supply_register): Ditto.
17186 (supply_register_by_name): Ditto.
17187 (collect_register): Ditto.
17188 (collect_register_as_string): Ditto.
17189 (collect_register_by_name): Ditto.
17190 * server.c (process_serial_event): Adjust.
17191 * linux-low.h (regset_fill_func, regset_store_func): Change
17193 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17195 * linux-low.c (get_stop_pc): Adjust.
17196 (check_removed_breakpoint): Adjust.
17197 (linux_wait_for_event): Adjust.
17198 (linux_resume_one_lwp): Adjust.
17199 (fetch_register): Add regcache parameter. Adjust.
17200 (usr_store_inferior_registers): Ditto.
17201 (regsets_fetch_inferior_registers): Ditto.
17202 (regsets_store_inferior_registers): Ditto.
17203 (linux_fetch_registers, linux_store_registers): Ditto.
17204 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17206 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17208 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17209 prototype to take a regcache.
17210 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17211 * remote-utils.c (convert_ascii_to_int, outreg)
17212 (prepare_resume_reply): Change prototype to take a regcache.
17214 * target.h (struct target_ops) <fetch_registers, store_registers>:
17215 Change prototype to take a regcache.
17216 (fetch_inferior_registers, store_inferior_registers): Change
17217 prototype to take a regcache. Adjust.
17218 * proc-service.c (ps_lgetregs): Adjust.
17219 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17220 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17221 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17222 take a regcache. Adjust.
17223 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17224 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17225 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17226 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17227 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17228 (cris_cannot_fetch_register):
17229 (cris_breakpoint_at): Change prototype to take a regcache.
17231 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17232 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17233 to take a regcache. Adjust.
17234 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17236 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17237 take a regcache. Adjust.
17238 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17239 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17240 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17241 * linux-mips-low.c (mips_get_pc):
17242 (mips_set_pc): Change prototype to take a regcache. Adjust.
17243 (mips_reinsert_addr): Adjust.
17244 (mips_collect_register): Change prototype to take a regcache.
17246 (mips_supply_register):
17247 (mips_collect_register_32bit, mips_supply_register_32bit)
17248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17249 (mips_store_fpregset): Ditto.
17250 * linux-ppc-low.c (ppc_supply_ptrace_register)
17251 (ppc_supply_ptrace_register): Ditto.
17252 (parse_spufs_run): Adjust.
17253 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17254 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17255 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17256 take a regcache. Adjust.
17257 * linux-s390-low.c (s390_collect_ptrace_register)
17258 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17259 (s390_set_pc): Change prototype to take a regcache. Adjust.
17260 (s390_arch_setup): Adjust.
17261 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17262 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17263 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17264 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17265 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17267 (sparc_breakpoint_at): Adjust.
17268 * linux-xtensa-low.c (xtensa_fill_gregset):
17269 (xtensa_store_gregset):
17270 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17271 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17272 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17273 prototype to take a regcache. Adjust.
17274 * win32-arm-low.c (arm_fetch_inferior_register)
17275 (arm_store_inferior_register): Change prototype to take a
17277 * win32-i386-low.c (i386_fetch_inferior_register)
17278 (i386_store_inferior_register): Change prototype to take a
17280 * win32-low.c (child_fetch_inferior_registers)
17281 (child_store_inferior_registers): Change prototype to take a
17283 (win32_wait): Adjust.
17284 (win32_fetch_inferior_registers): Change prototype to take a
17286 (win32_store_inferior_registers): Adjust.
17287 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17288 store_inferior_register>: Change prototype to take a regcache.
17290 2010-01-20 Doug Evans <dje@google.com>
17292 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17294 (linux_wait_for_event1, linux_init_signals): Ditto.
17295 (W_STOPCODE): Provide definition if missing.
17297 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17299 * linux-low.c (linux_core_of_thread): New.
17300 (compare_ints, show_process, list_threads): New.
17301 (linux_qxfer_osdata): Report threads and cores.
17302 (linux_target_op): Register linux_core_of_thread.
17303 * remote-utils.c (prepare_resume_reply): Report the core.
17304 (buffer_xml_printf): Support %d specifier.
17305 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17307 (handle_query): Handle qXfer:threads. Announce availability
17309 * target.h (struct target_ops): New field core_of_thread.
17311 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17313 * Makefile.in (clean): Remove new generated files.
17314 (reg-s390.o, reg-s390.c): Remove rules.
17315 (reg-s390x.o, reg-s390x.c): Likewise.
17316 (s390-linux32.o, s390-linux32.c): Add rules.
17317 (s390-linux64.o, s390-linux64.c): Likewise.
17318 (s390x-linux64.o, s390x-linux64.c): Likewise.
17319 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17320 * linux-s390-low.c: Include <elf.h>.
17321 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17322 (init_registers_s390): Remove prototype.
17323 (init_registers_s390x): Likewise.
17324 (init_registers_s390_linux32): Add prototype.
17325 (init_registers_s390_linux64): Likewise.
17326 (init_registers_s390x_linux64): Likewise.
17327 (s390_num_regs_3264): New define.
17328 (s390_regmap_3264): New global variable.
17329 (s390_cannot_fetch_register): Remove obsolete check.
17330 (s390_cannot_store_register): Likewise.
17331 (s390_collect_ptrace_register): Handle upper/lower register halves.
17332 (s390_supply_ptrace_register): Likewise.
17333 (s390_fill_gregset): Update to register number changes.
17334 (s390_get_hwcap): New routine.
17335 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17336 Install appropriate regmap and register set.
17338 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17340 * server.c (gdbserver_version): Update copyright year to 2010.
17341 * gdbreplay.c (gdbreplay_version): Likewise.
17343 2009-12-28 Doug Evans <dje@google.com>
17345 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17346 elf/external.h. Include <elf.h> instead but only if necessary.
17348 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17350 * linux-low.c (linux_remove_process): Remove `detaching'
17351 parameter. Don't release/detach from thread_db here.
17352 (linux_kill): Release/detach from thread_db here, ...
17353 (linux_detach): ... and here, before actually detaching.
17354 (linux_wait_1): ... and here, when a process exits.
17355 * thread-db.c (any_thread_of): New.
17356 (thread_db_free): Switch the current inferior to a thread of the
17359 2009-12-21 Doug Evans <dje@google.com>
17361 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17363 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17364 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17365 warning ifndef __NR_tkill. Move setting of errno there too.
17366 Delete unnecessary resetting of errno after syscall.
17367 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17369 * configure.ac: Check for dladdr.
17370 * config.in: Regenerate.
17371 * configure: Regenerate.
17372 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17373 (try_thread_db_load): Update.
17375 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17377 2009-12-18 Doug Evans <dje@google.com>
17379 * event-loop.c: Include unistd.h if it exists.
17381 * linux-low.c (my_waitpid): Move definition away from being in
17382 between linux_tracefork_child/linux_test_for_tracefork.
17384 * gdb_proc_service.h (psaddr_t): Fix type.
17385 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17386 signature to match glibc.
17388 2009-12-16 Doug Evans <dje@google.com>
17390 * linux-low.c (linux_read_memory): Fix argument to read.
17392 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17394 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17395 events, don't leave current_inferior pointing at null.
17397 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17399 * win32-low.c (LOG): Delete.
17400 (OUTMSG): Output to stderr.
17401 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17402 on compile time LOG macro.
17403 (win32_wait): Fix debug output.
17405 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17407 * win32-low.c (win32_add_one_solib): If the dll name is
17408 "ntdll.dll", prepend the system directory to the dll path.
17410 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17412 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17414 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17415 Vladimir Prus <vladimir@codesourcery.com>
17417 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17418 * configure.ac: Check for __mcoldfire__ and set
17419 gdb_cv_m68k_is_coldfire.
17420 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17421 reg-cf.o and reg-m68k.o.
17422 * configure: Regenerated.
17424 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17426 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17427 Pass it to thread_db_free.
17428 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17429 proper `detaching' argument to linux_remove_process.
17430 * linux-low.h (thread_db_free): Add `detaching' parameter.
17431 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17433 (thread_db_free): Add `detaching' parameter. Only
17434 call td_ta_clear_event if detaching from process.
17436 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17438 * thread-db.c (thread_db_free): Fix typo.
17440 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17443 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17445 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17447 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17448 with an i686 compiler.
17449 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17451 * configure: Rebuilt.
17453 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17457 * server.c (handle_search_memory_1): Correct read_addr initialization
17458 in loop for searching subsequent chunks.
17460 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17462 * configure.ac: New --with-libthread-db option.
17463 * thread-db.c: Allow direct dependence on libthread_db.
17464 (thread_db_free): Adjust.
17465 * config.in: Regenerate.
17466 * configure: Likewise.
17468 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17471 * thread-db.c (attach_thread): New function.
17472 (maybe_attach_thread): Return success/failure.
17473 (find_new_threads_callback): Adjust.
17474 (thread_db_find_new_threads): Loop until no new threads.
17476 2009-10-13 Pedro Alves <pedro@codesourcery.com>
17478 * proc-service.c (ps_lgetregs): Formatting.
17480 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17482 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17483 * configure.ac: Adjust.
17484 * linux-low.h (struct process_info_private): Move members to struct
17486 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17487 * linux-low.c (linux_remove_process): Adjust.
17488 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17489 * server.c (handle_query): Move code ...
17490 (handle_monitor_command): ... here. New function.
17491 * target.h (struct target_ops): New member.
17492 * thread-db.c (struct thread_db): New.
17493 (libthread_db_search_path): New variable.
17494 (thread_db_create_event, thread_db_enable_reporting)
17495 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17496 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17497 (try_thread_db_load_1, dladdr_to_soname): New functions.
17498 (try_thread_db_load, thread_db_load_search): New functions.
17499 (thread_db_init): Search for libthread_db.
17500 (thread_db_free): New function.
17501 (thread_db_handle_monitor_command): Likewise.
17502 * config.in: Regenerate.
17503 * configure: Regenerate.
17505 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17507 * spu-low.c (spu_kill): Wait for inferior to terminate.
17508 Call clear_inferiors.
17509 (spu_detach): Call clear_inferiors.
17511 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17513 * aclocal.m4: Regenerate.
17514 * config.in: Likewise.
17515 * configure: Likewise.
17517 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17519 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17520 (parse_spufs_run): New function.
17521 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17522 (ppc_breakpoint_at): Handle SPU breakpoints.
17524 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17526 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17527 (SPUFS_MAGIC): Define.
17528 (spu_enumerate_spu_ids): New function.
17529 (linux_qxfer_spu): New function.
17530 (linux_target_ops): Install linux_qxfer_spu.
17532 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17534 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17535 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17536 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17537 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17538 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17539 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17540 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17541 (init_registers_powerpc_cell32l): Add prototype.
17542 (init_registers_powerpc_cell64l): Likewise.
17543 (ppc_arch_setup): Detect Cell/B.E. architecture.
17545 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17547 * Makefile.in (datarootdir): New variable.
17549 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17551 * linux-low.c (linux_write_memory): Update debugging output.
17552 * Makefile.in (clean): Add new descriptions.
17553 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17554 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17555 * configure.srv: Add new files for arm*-*-linux*.
17556 * linux-arm-low.c: Add new declarations.
17557 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17558 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17559 (HWCAP_VFPv3D16): New.
17560 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17561 instead of __IWMMXT__.
17562 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17563 (arm_arch_setup): New.
17564 (target_regsets): Remove #ifdef. Add VFP regset.
17565 (the_low_target): Use arm_arch_setup.
17567 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17569 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17570 the main thread again.
17572 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17574 Adding Neutrino gdbserver.
17575 * configure: Regenerated.
17576 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17577 * configure.srv (i[34567]86-*-nto*): New target.
17578 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17579 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17580 (nto_comctrl) [__QNX__]: New function.
17581 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17583 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
17585 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17588 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17589 Pedro Alves <pedro@codesourcery.com>
17591 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17592 don't support CONTEXT_EXTENDED_REGISTERS.
17593 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17594 (the_low_target): Install them.
17595 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17596 failing with ERROR_PIPE_NOT_CONNECTED.
17598 2009-06-30 Doug Evans <dje@google.com>
17599 Pierre Muller <muller@ics.u-strasbg.fr>
17601 Add h/w watchpoint support to x86-linux, win32-i386.
17602 * Makefile.in (SFILES): Add i386-low.c
17603 (i386_low_h): Define.
17604 (i386-low.o): Add dependencies.
17605 (linux-x86-low.o): Add i386-low.h dependency.
17606 (win32-i386-low.o): Ditto.
17607 * i386-low.c: New file.
17608 * i386-low.h: New file.
17609 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17610 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17611 * linux-low.c (linux_add_process): Initialize arch_private.
17612 (linux_remove_process): Free arch_private.
17613 (add_lwp): Initialize arch_private.
17614 (delete_lwp): Free arch_private.
17615 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17617 * linux-low.h (process_info_private): New member arch_private.
17618 (lwp_info): New member arch_private.
17619 (linux_target_ops): New members new_process, new_thread,
17621 (ptid_of): New macro.
17622 * linux-x86-low.c: Include stddef.h, i386-low.h.
17623 (arch_process_info): New struct.
17624 (arch_lwp_info): New struct.
17625 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17626 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17627 (i386_dr_low_get_status): New function.
17628 (x86_insert_point, x86_remove_point): New functions.
17629 (x86_stopped_by_watchpoint): New function.
17630 (x86_stopped_data_address): New function.
17631 (x86_linux_new_process, x86_linux_new_thread): New functions.
17632 (x86_linux_prepare_to_resume): New function.
17633 (the_low_target): Add entries for insert_point, remove_point,
17634 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17636 * server.c (debug_hw_points): New global.
17637 (monitor_show_help): Document set debug-hw-points.
17638 (handle_query): Process "set debug-hw-points".
17639 * server.h (debug_hw_points): Declare.
17640 (paddress): Declare.
17641 * utils.c (NUMCELLS, CELLSIZE): New macros.
17642 (get_sell, xsnprintf, paddress): New functions.
17643 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17644 remove_point, stopped_by_watchpoint, stopped_data_address.
17645 * win32-i386-low.c: Include i386-low.h.
17646 (debug_reg_state): Replaces dr.
17647 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17648 (i386_dr_low_get_status): New function.
17649 (i386_insert_point, i386_remove_point): New functions.
17650 (i386_stopped_by_watchpoint): New function.
17651 (i386_stopped_data_address): New function.
17652 (i386_initial_stuff): Update.
17653 (get_thread_context,set_thread_context,i386_thread_added): Update.
17654 (the_low_target): Add entries for insert_point,
17655 remove_point, stopped_by_watchpoint, stopped_data_address.
17656 * win32-low.c (win32_insert_watchpoint): New function.
17657 (win32_remove_watchpoint): New function.
17658 (win32_stopped_by_watchpoint): New function.
17659 (win32_stopped_data_address): New function.
17660 (win32_target_ops): Add entries for insert_watchpoint,
17661 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
17662 * win32-low.h (win32_target_ops): New members insert_point,
17663 remove_point, stopped_by_watchpoint, stopped_data_address.
17665 2009-06-25 Pedro Alves <pedro@codesourcery.com>
17667 * server.c (process_serial_event): Re-return unsupported, not
17668 error, if the type isn't recognized. Re-allow supporting only
17669 insert or remove packets. Also call require_running for
17670 breakpoints. Add missing break statement to default case. Tidy.
17671 * target.h (struct target_ops): Rename insert_watchpoint to
17672 insert_point, and remove_watchpoint to remove_point.
17674 * linux-low.h (struct linux_target_ops): Likewise.
17675 * linux-low.c (linux_insert_watchpoint): Rename to ...
17676 (linux_insert_point): ... this. Adjust.
17677 (linux_remove_watchpoint): Rename to ...
17678 (linux_remove_point): ... this. Adjust.
17679 (linux_target_ops): Adjust.
17680 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
17681 (cris_insert_point): ... this.
17682 (cris_remove_watchpoint): Rename to ...
17683 (cris_remove_point): ... this.
17684 (the_low_target): Adjust.
17686 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
17688 * server.c (handle_v_kill): Pass signal_pid to
17689 kill_inferior if multi_process is zero.
17691 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
17693 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
17694 * target.h (target_ops): Comment for *_watchpoint to make it clear
17695 the functions can get types '0' and '1'.
17697 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
17699 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
17700 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
17701 * regcache.c (get_regcache): Likewise.
17702 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
17703 * win32-low.c (child_fetch_inferior_registers): Remove check for
17706 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
17707 Pedro Alves <pedro@codesourcery.com>
17709 * target.h (struct target_ops) <supports_multi_process>: New
17711 (target_supports_multi_process): New.
17712 * server.c (handle_query): Even if GDB reports support, only
17713 enable multi-process if the target also supports it. Report
17714 multi-process support only if the target backend supports it.
17715 * linux-low.c (linux_supports_multi_process): New function.
17716 (linux_target_ops): Install it as target_supports_multi_process
17719 2009-05-24 Doug Evans <dje@google.com>
17721 Global renaming of find_thread_pid to find_thread_ptid.
17722 * server.h (find_thread_ptid): Renamed from find_thread_pid.
17723 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
17724 All callers updated.
17726 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
17727 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
17730 * linux-low.c (get_stop_pc): Print pc if debug_threads.
17731 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
17732 (linux_resume_one_lwp): Ditto.
17734 2009-05-23 Doug Evans <dje@google.com>
17736 * linux-low.c (linux_resume_one_lwp): Change type of first arg
17737 from struct inferior_list_entry * to struct lwp_info *.
17738 All callers updated.
17740 2009-05-13 Doug Evans <dje@google.com>
17742 * linux-x86-low.c: Don't include assert.h.
17743 (x86_siginfo_fixup): Use fatal, not assert.
17744 (x86_arch_setup): Fix comment.
17746 2009-05-12 Doug Evans <dje@google.com>
17748 Biarch support for i386/amd64 gdbserver.
17749 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
17750 Add linux-x86-low.c.
17751 (linux-i386-low.o, linux-x86-64-low.o): Delete.
17752 (linux-x86-low.o): Add.
17753 * linux-x86-64-low.c: Delete.
17754 * linux-i386-low.c: Delete.
17755 * linux-x86-low.c: New file.
17756 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
17758 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
17760 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
17761 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
17762 (linux_child_pid_to_exec_file): New function.
17763 (elf_64_header_p, elf_64_file_p): New functions.
17764 (siginfo_fixup): New function.
17765 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
17766 give target a chance to convert layout.
17767 * linux-low.h (linux_target_ops): New member siginfo_fixup.
17768 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
17770 2009-05-07 Doug Evans <dje@google.com>
17772 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
17773 (regsets_store_inferior_registers): Ditto.
17775 2009-05-06 Pedro Alves <pedro@codesourcery.com>
17779 * linux-low.c (must_set_ptrace_flags): Delete.
17780 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
17782 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
17783 `lwp->must_set_ptrace_flags' instead.
17784 (linux_wait_for_event_1): Set ptrace options here.
17785 (linux_wait_1): ... not here.
17787 2009-04-30 Doug Evans <dje@google.com>
17789 * inferiors.c (started_inferior_callback): New function.
17790 (attached_inferior_callback): New function.
17791 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
17792 * server.c (print_started_pid, print_attached_pid): New functions.
17793 (detach_or_kill_for_exit): New function.
17794 (main): Call it instead of for_each_inferior (kill_inferior_callback).
17795 * server.h (have_started_inferiors_p): Declare.
17796 (have_attached_inferiors_p): Declare.
17798 * inferiors.c (remove_process): Fix memory leak, free process.
17799 * linux-low.c (linux_remove_process): New function.
17800 (linux_kill): Call it instead of remove_process.
17801 (linux_detach, linux_wait_1): Ditto.
17803 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
17805 * configure.srv: Add x86 Windows CE target.
17807 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17809 * inferiors.c (get_thread_process): Make global.
17810 * server.h (get_thread_process): Add prototype.
17811 * thread-db.c (find_one_thread): Use get_thread_process
17812 instead of current_process.
17813 (thread_db_get_tls_address): Do not crash if called when
17814 thread layer is not yet initialized.
17816 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17818 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
17819 * spu-low.c (current_tid): Rename to ...
17820 (current_ptid): ... this.
17821 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
17822 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
17823 ptid_get_lwp (current_ptid) instead of current_tid.
17824 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
17825 instead of current_tid. Use find_process_pid to verify pid
17826 argument is valid. Pass proper argument to remove_process.
17827 (spu_thread_alive): Compare current_ptid instead of current_tid.
17828 (spu_resume): Likewise.
17830 2009-04-02 Pedro Alves <pedro@codesourcery.com>
17832 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
17835 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17837 Implement the multiprocess extensions, and add linux multiprocess
17840 * server.h (ULONGEST): Declare.
17841 (struct ptid, ptid_t): New.
17842 (minus_one_ptid, null_ptid): Declare.
17843 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17844 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
17845 (struct inferior_list_entry): Change `id' type from unsigned from
17847 (struct sym_cache, struct breakpoint, struct
17848 process_info_private): Forward declare.
17849 (struct process_info): Declare.
17850 (current_process): Declare.
17851 (all_processes): Declare.
17852 (initialize_inferiors): Declare.
17853 (add_thread): Adjust to use ptid_t.
17854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
17855 (add_process, remove_process, find_thread_pid): Declare.
17856 (find_inferior_id): Adjust to use ptid_t.
17857 (cont_thread, general_thread, step_thread): Change type to ptid_t.
17858 (multi_process): Declare.
17859 (push_event): Adjust to use ptid_t.
17860 (read_ptid, write_ptid): Declare.
17861 (prepare_resume_reply): Adjust to use ptid_t.
17862 (clear_symbol_cache): Declare.
17863 * inferiors.c (all_processes): New.
17864 (null_ptid, minus_one_ptid): New.
17865 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17866 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
17867 (add_thread): Change unsigned long to ptid. Remove gdb_id
17869 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
17870 (gdb_id_to_thread): Rename to ...
17871 (find_thread_pid): ... this. Change unsigned long to ptid.
17872 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
17873 (loaded_dll, pull_pid_from_list): Adjust.
17874 (add_process, remove_process, find_process_pid)
17875 (get_thread_process, current_process, initialize_inferiors): New.
17876 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
17877 (struct target_waitstatus) <related_pid>: Ditto.
17878 (struct target_ops) <kill, detach>: Add `pid' argument. Change
17879 return type to int.
17880 (struct target_ops) <join>: Add `pid' argument.
17881 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
17882 (struct target_ops) <wait>: Add `ptid' field. Change return type
17884 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
17885 (mywait): Add `ptid' argument. Change return type to ptid_t.
17886 (target_pid_to_str): Declare.
17887 * target.c (set_desired_inferior): Adjust to use ptids.
17888 (mywait): Add new `ptid' argument. Adjust.
17889 (target_pid_to_str): New.
17890 * mem-break.h (free_all_breakpoints): Declare.
17891 * mem-break.c (breakpoints): Delelete.
17892 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
17893 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
17894 to use per-process breakpoint list.
17895 (free_all_breakpoints): New.
17896 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
17897 (symbol_cache, all_symbols_looked_up): Delete.
17899 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
17901 (prepare_resume_reply): Change ptid argument's type from unsigned
17902 long to ptid_t. Adjust. Implement W;process and X;process.
17903 (free_sym_cache, clear_symbol_cache): New.
17904 (look_up_one_symbol): Adjust to per-process symbol cache. *
17905 * server.c (cont_thread, general_thread, step_thread): Change type
17907 (attached): Delete.
17908 (multi_process): New.
17909 (last_ptid): Change type to ptid_t.
17910 (struct vstop_notif) <ptid>: Change type to ptid_t.
17911 (queue_stop_reply, push_event): Change `ptid' argument's type to
17913 (discard_queued_stop_replies): Add `pid' argument.
17914 (start_inferior): Adjust to use ptids. Adjust to mywait interface
17915 changes. Don't reference the `attached' global.
17916 (attach_inferior): Adjust to mywait interface changes.
17917 (handle_query): Adjust to use ptids. Parse GDB's qSupported
17918 features. Handle and report "multiprocess+". Handle
17920 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
17922 (handle_v_kill): New.
17923 (handle_v_stopped): Adjust to use target_pid_to_str.
17924 (handle_v_requests): Allow multiple attaches and runs when
17925 multiprocess extensions are in effect. Handle "vKill".
17926 (myresume): Adjust to use ptids.
17927 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
17928 (handle_status): Adjust to discard_queued_stop_replies interface
17930 (first_thread_of, kill_inferior_callback)
17931 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
17932 (main): Call initialize_inferiors. Adjust to use ptids, killing
17933 and detaching from all inferiors. Handle multiprocess packet
17935 * linux-low.h: Include gdb_proc_service.h.
17936 (struct process_info_private): New.
17937 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
17938 <lwpid_of>: Use ptid_get_lwp.
17939 (get_lwp_thread): Adjust.
17940 (struct lwp_info): Add `dead' member.
17941 (find_lwp_pid): Declare.
17942 * linux-low.c (thread_db_active): Delete.
17943 (new_inferior): Adjust comment.
17944 (inferior_pid): Delete.
17945 (linux_add_process): New.
17946 (handle_extended_wait): Adjust.
17947 (add_lwp): Change unsigned long to ptid.
17948 (linux_create_inferior): Add process to processes table. Adjust
17949 to use ptids. Don't set new_inferior here.
17950 (linux_attach_lwp): Rename to ...
17951 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
17952 it. Adjust to use ptids.
17953 (linux_attach_lwp): New.
17954 (linux_attach): Add process to processes table. Don't set
17956 (struct counter): New.
17957 (second_thread_of_pid_p, last_thread_of_process_p): New.
17958 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
17959 multiple processes.
17960 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
17961 processes. Remove process from process table.
17962 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
17963 to multiple processes.
17964 (any_thread_of): New.
17965 (linux_detach): Add `pid' argument, and handle it. Remove process
17966 from processes table.
17967 (linux_join): Add `pid' argument. Handle it.
17968 (linux_thread_alive): Change unsighed long argument to ptid_t.
17969 Consider dead lwps as not being alive.
17970 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
17971 threads we're not interested in.
17972 (same_lwp, find_lwp_pid): New.
17973 (linux_wait_for_lwp): Change `pid' argument's type from int to
17975 (linux_wait_for_event): Rename to ...
17976 (linux_wait_for_event_1): ... this. Change `pid' argument's type
17977 from int to ptid_t. Adjust.
17978 (linux_wait_for_event): New.
17979 (linux_wait_1): Add `ptid' argument. Change return type to
17980 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
17981 that exit from the process table.
17982 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
17984 (mark_lwp_dead): New.
17985 (wait_for_sigstop): Adjust to use ptids. If a process exits while
17986 stopping all threads, mark its main lwp as dead.
17987 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
17989 (fetch_register, usr_store_inferior_registers)
17990 (regsets_fetch_inferior_registers)
17991 (regsets_store_inferior_registers, linux_read_memory)
17992 (linux_write_memory): Inline `inferior_pid'.
17993 (linux_look_up_symbols): Adjust to use per-process
17994 `thread_db_active'.
17995 (linux_request_interrupt): Adjust to use ptids.
17996 (linux_read_auxv): Inline `inferior_pid'.
17997 (initialize_low): Don't reference thread_db_active.
17998 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
17999 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18000 (ps_getpid): Return the pid of the current inferior.
18001 * thread-db.c (proc_handle, thread_agent): Delete.
18002 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18004 (find_one_thread): Change argument type to ptid_t. Adjust to
18006 (maybe_attach_thread): Adjust to per-process data and ptids.
18007 (thread_db_find_new_threads): Ditto.
18008 (thread_db_init): Ditto.
18009 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18010 processes table. Adjust to use ptids.
18011 (spu_kill, spu_detach): Adjust interface. Remove process from
18013 (spu_join, spu_thread_alive): Adjust interface.
18014 (spu_wait): Adjust interface. Remove process from processes
18015 table. Adjust to use ptids.
18016 * win32-low.c (current_inferior_tid): Delete.
18017 (current_inferior_ptid): New.
18018 (debug_event_ptid): New.
18019 (thread_rec): Take a ptid. Adjust.
18020 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18021 (child_delete_thread): Ditto.
18022 (do_initial_child_stuff): Add `attached' argument. Add process to
18024 (child_fetch_inferior_registers, child_store_inferior_registers):
18026 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18027 (win32_attach): Pass 1 to do_initial_child_stuff.
18028 (win32_kill): Adjust interface. Remove process from processes
18030 (win32_detach): Ditto.
18031 (win32_join): Adjust interface.
18032 (win32_thread_alive): Take a ptid.
18033 (win32_resume): Adjust to use ptids.
18034 (get_child_debug_event): Ditto.
18035 (win32_wait): Adjust interface. Remove exiting process from
18038 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18040 Non-stop mode support.
18042 * server.h (non_stop): Declare.
18043 (gdb_client_data, handler_func): Declare.
18044 (delete_file_handler, add_file_handler, start_event_loop):
18046 (handle_serial_event, handle_target_event, push_event)
18047 (putpkt_notif): Declare.
18048 * target.h (enum resume_kind): New.
18049 (struct thread_resume): Replace `step' field by `kind' field.
18050 (TARGET_WNOHANG): Define.
18051 (struct target_ops) <wait>: Add `options' argument.
18052 <supports_non_stop, async, start_non_stop>: New fields.
18053 (target_supports_non_stop, target_async): New.
18054 (start_non_stop): Declare.
18055 (mywait): Add `options' argument.
18056 * target.c (mywait): Add `options' argument. Print child exit
18057 notifications here.
18058 (start_non_stop): New.
18059 * server.c (non_stop, own_buf, mem_buf): New globals.
18060 (struct vstop_notif): New.
18061 (notif_queue): New global.
18062 (queue_stop_reply, push_event, discard_queued_stop_replies)
18063 (send_next_stop_reply): New.
18064 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18066 (attach_inferior): In non-stop mode, don't wait for the target
18068 (handle_general_set): Handle QNonStop.
18069 (handle_query): When handling qC, return the current general
18070 thread, instead of the first thread of the list.
18071 (handle_query): If the backend supports non-stop mode, include
18072 QNonStop+ in the qSupported query response.
18073 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18075 (handle_v_attach, handle_v_run): Handle non-stop mode.
18076 (handle_v_stopped): New.
18077 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18078 (myresume): Adjust to use resume_kind. Handle non-stop.
18079 (queue_stop_reply_callback): New.
18080 (handle_status): Handle non-stop mode.
18081 (main): Clear non_stop flag on reconnection. Use the event-loop.
18082 Refactor serial protocol handling from here ...
18083 (process_serial_event): ... to this new function. When GDB
18084 selects any thread, select one here. In non-stop mode, wait until
18085 GDB acks all pending events before exiting.
18086 (handle_serial_event, handle_target_event): New.
18087 * remote-utils.c (remote_open): Install remote_desc in the event
18089 (remote_close): Remove remote_desc from the event loop.
18090 (putpkt_binary): Rename to...
18091 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18092 (putpkt_binary): New as wrapper around putpkt_binary_1.
18093 (putpkt_notif): New.
18094 (prepare_resume_reply): In non-stop mode, don't change the
18096 * event-loop.c: New.
18097 * Makefile.in (OBJ): Add event-loop.o.
18098 (event-loop.o): New rule.
18100 * linux-low.h (pid_of): Moved here.
18102 (get_lwp_thread): Use lwpid_of.
18103 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18104 * linux-low.c (pid_of): Delete.
18105 (inferior_pid): Use lwpid_of.
18106 (linux_event_pipe): New.
18107 (target_is_async_p): New.
18109 (handle_extended_wait): Use lwpid_of.
18110 (add_lwp): Don't set lwpid field.
18111 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18112 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18113 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18114 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18115 first. Adjust to linux_wait_for_event interface changes. Use
18117 (linux_detach): Don't delete the main lwp here.
18118 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18119 (status_pending_p): Don't consider explicitly suspended lwps.
18120 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18121 pointer. Add OPTIONS argument. Change return type to int. Use
18122 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18123 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18124 pointer. Add status pointer argument. Return a pid instead of a
18125 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18126 changes. In non-stop mode, don't switch to a random thread.
18127 (linux_wait): Rename to...
18128 (linux_wait_1): ... this. Add target_options argument, and handle
18129 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18130 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18131 clean exit and signal exit code. Don't stop all threads in
18132 non-stop mode. In all-stop mode, only stop all threads when
18133 reporting a stop to GDB. Handle explicit thread stop requests.
18134 (async_file_flush, async_file_mark): New.
18136 (send_sigstop): Use lwpid_of.
18137 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18138 interface changes. In non-stop mode, don't switch to a random
18140 (linux_resume_one_lwp): Use lwpid_of.
18141 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18142 (linux_resume_one_thread): ... this. Handle resume_stop. In
18143 non-stop mode, don't look for pending flag in all threads.
18144 (resume_status_pending_p): Don't consider explicitly suspended
18146 (my_waitpid): Reimplement. Emulate __WALL.
18147 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18149 (sigchld_handler, linux_supports_non_stop, linux_async)
18150 (linux_start_non_stop): New.
18151 (linux_target_ops): Register linux_supports_non_stop, linux_async
18152 and linux_start_non_stop.
18153 (initialize_low): Install SIGCHLD handler.
18154 * thread-db.c (thread_db_create_event, find_one_thread)
18155 (thread_db_get_tls_address): Use lwpid_of.
18156 * win32-low.c (win32_detach): Adjust to use resume_kind.
18157 (win32_wait): Add `options' argument.
18158 * spu-low.c (spu_resume): Adjust to use resume_kind.
18159 (spu_wait): Add `options' argument.
18161 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18163 Decouple target code from remote protocol.
18165 * target.h (enum target_waitkind): New.
18166 (struct target_waitstatus): New.
18167 (struct target_ops) <wait>: Return an unsigned long. Take a
18168 target_waitstatus pointer instead of a char pointer.
18169 (mywait): Likewise.
18170 * target.c (mywait): Change prototype to return an unsigned long.
18171 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18172 * server.h (thread_from_wait, old_thread_from_wait): Delete
18174 (prepare_resume_reply): Change prototype to take a
18176 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18177 (last_status, last_ptid): New.
18178 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18179 pid instead of a signal.
18180 (attach_inferior): Remove "status" and "signal" parameters.
18182 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18184 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18185 (handle_v_requests, myresume): Remove "status" and "signal"
18186 parameters. Adjust.
18187 (handle_status): New.
18188 (main): Delete local `status'. Adjust.
18189 * remote-utils.c: Include target.h.
18190 (prepare_resume_reply): Change prototype to take a
18191 target_waitstatus. Adjust.
18193 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18195 * spu-low.c (spu_wait): Adjust.
18196 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18198 (win32_wait): Adjust.
18200 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18202 * target.h (struct thread_resume): Delete leave_stopped member.
18203 (struct target_ops): Add a `n' argument to the `resume' callback.
18204 * server.c (start_inferior): Adjust.
18205 (handle_v_cont, myresume): Adjust.
18206 * linux-low.c (check_removed_breakpoint): Adjust to resume
18207 interface change, and to removed leave_stopped field.
18208 (resume_ptr): Delete.
18209 (struct thread_resume_array): New.
18210 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18211 resume interface change.
18212 (linux_continue_one_thread, linux_queue_one_thread)
18213 (resume_status_pending_p): Check if the resume field is NULL
18214 instead of checking the leave_stopped member.
18215 (linux_resume): Adjust to the target resume interface change.
18216 * spu-low.c (spu_resume): Adjust to the target resume interface
18218 * win32-low.c (win32_detach, win32_resume): Ditto.
18220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18222 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18224 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18226 (linux_continue_one_thread): Only preserve the stepping flag if
18227 there's a pending breakpoint.
18229 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18231 * server.c (main): After the inferior having exited, call
18232 remote_close before exiting gdbserver.
18234 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18236 Fix size of FPSCR in Power 7 processors.
18237 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18238 (PPC_FEATURE_HAS_DFP): New #define.
18239 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18242 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18244 * server.c (handle_query) Whitespace and formatting.
18246 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18248 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18249 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18250 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18251 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18252 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18253 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18254 Makefile.in, configure.ac: Fix whitespace throughout.
18255 * configure: Regenerate.
18257 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18259 * inferiors.c (find_inferior): Make it safe for the callback
18260 function to delete the currently iterated inferior.
18262 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18264 * Makefile.in (linuw_low_h): Move higher.
18265 (thread-db.o): Depend on $(linux_low_h).
18267 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18269 Rename "process" to "lwp" throughout.
18271 * linux-low.c (all_processes): Rename to...
18272 (all_lwps): ... this.
18273 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18274 (add_process): Rename to ...
18275 (add_lwp): ... this. Adjust.
18276 (linux_create_inferior): Adjust.
18277 (linux_attach_lwp): Adjust.
18278 (linux_attach): Adjust.
18279 (linux_kill_one_process): Rename to ...
18280 (linux_kill_one_lwp): ... this. Adjust.
18281 (linux_kill): Adjust.
18282 (linux_detach_one_process): Rename to ...
18283 (linux_detach_one_lwp): ... this. Adjust.
18284 (linux_detach): Adjust.
18285 (check_removed_breakpoint): Adjust.
18286 (status_pending_p): Adjust.
18287 (linux_wait_for_process): Rename to ...
18288 (linux_wait_for_lwp): ... this. Adjust.
18289 (linux_wait_for_event): Adjust.
18290 (send_sigstop): Adjust.
18291 (wait_for_sigstop): Adjust.
18292 (stop_all_processes): Rename to ...
18293 (stop_all_lwps): ... this.
18294 (linux_resume_one_process): Rename to ...
18295 (linux_resume_one_lwp): ... this. Adjust.
18296 (linux_set_resume_request, linux_continue_one_thread)
18297 (linux_queue_one_thread, resume_status_pending_p)
18298 (usr_store_inferior_registers, regsets_store_inferior_registers)
18299 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18301 * linux-low.h (get_process): Rename to ...
18302 (get_lwp): ... this. Adjust.
18303 (get_thread_process): Rename to ...
18304 (get_thread_lwp): ... this. Adjust.
18305 (get_process_thread): Rename to ...
18306 (get_lwp_thread): ... this. Adjust.
18307 (struct process_info): Rename to ...
18308 (struct lwp_info): ... this.
18309 (all_processes): Rename to ...
18310 (all_lwps): ... this.
18311 * proc-service.c (ps_lgetregs): Adjust.
18312 * thread-db.c (thread_db_create_event, find_one_thread)
18313 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18315 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18317 * server.c (handle_query): Handle "qAttached".
18319 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18321 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18322 GPLv3, update license URL.
18324 2009-03-01 Doug Evans <dje@google.com>
18326 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18327 (server_h): Add gdb_signals.h.
18328 (signals.o): Update.
18329 * server.h (target_signal_from_host,target_signal_to_host_p)
18330 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18332 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18334 * remote-utils.c (getpkt): Also generate remote-debug
18335 information if noack_mode is set.
18337 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18339 * server.c (handle_query): Report qXfer:siginfo:read and
18340 qXfer:siginfo:write as supported and handle them.
18341 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18342 * linux-low.c (linux_xfer_siginfo): New.
18343 (linux_target_ops): Set it.
18345 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18347 * server.c (gdbserver_usage): Mention --remote-debug.
18348 (main): Accept '--remote-debug' switch.
18350 2009-01-18 Doug Evans <dje@google.com>
18352 * regcache.c (new_register_cache): No need to check result of xcalloc.
18353 * server.c (handle_search_memory): Back out calls to xmalloc,
18354 result is checked and error is returned to user upon failure.
18355 (handle_query): Ditto. Add more checks for result of malloc.
18356 (handle_v_cont): Check result of malloc, report error back to
18358 (handle_v_run): Ditto. Call freeargv.
18359 * server.h (freeargv): Declare.
18360 * utils.c (freeargv): New fn.
18362 2009-01-15 Doug Evans <dje@google.com>
18364 * gdbreplay.c (perror_with_name): Make arg const char *.
18365 * server.h (target_signal_to_name): Make return type const char *.
18366 * thread-db.c (thread_db_err_str): Make return type const char *.
18367 * utils.c (perror_with_name): Make arg const char *.
18369 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18371 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18372 when handling a EXIT_PROCESS_DEBUG_EVENT.
18374 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18376 * gdbreplay.c (gdbreplay_version): Update copyright year.
18377 * server.c (gdbserver_version): Likewise.
18379 2009-01-05 Doug Evans <dje@google.com>
18381 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18382 (handle_extended_wait): Improve comment.
18384 2008-12-13 Doug Evans <dje@google.com>
18386 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18387 * server.h (ATTR_MALLOC): New macro.
18388 (xmalloc,xcalloc,xstrdup): Declare.
18389 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18390 * inferiors.c: Ditto.
18391 * linux-low.c: Ditto.
18392 * mem-break.c: Ditto.
18393 * regcache.c: Ditto.
18394 * remote-utils.c: Ditto.
18397 * win32-low.c: Ditto.
18399 2008-12-12 Doug Evans <dje@google.com>
18401 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18402 in debugging printf.
18404 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18406 2008-12-09 Doug Evans <dje@google.com>
18408 * linux-low.h (struct process_info): Delete member tid, unused.
18409 * thread-db.c (find_one_thread): Update.
18410 (maybe_attach_thread): Update.
18412 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18414 * target.h (struct target_ops): Add qxfer_osdata member.
18415 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18417 (linux_qxfer_osdata): New functions.
18418 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18420 * server.c (handle_query): Handle "qXfer:osdata:read:".
18421 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18422 (buffer_xml_printf): New functions.
18423 * server.h (struct buffer): New.
18424 (buffer_grow_str, buffer_grow_str0): New macros.
18425 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18426 (buffer_xml_printf): Declare.
18428 2008-11-24 Doug Evans <dje@google.com>
18430 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18432 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18434 * server.c (handle_v_run): Always use the supplied argument list.
18436 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18438 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18439 (xtensa_regmap_table): Add entry for scompare1.
18441 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18443 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18444 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18445 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18446 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18447 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18448 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18449 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18450 XML target descriptions.
18451 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18452 when inferior is running on an ISA 2.05 or later processor. Add
18453 special case to return offset for full 64-bit slot of FPSCR when
18456 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18458 * Makefile.in (SFILES, clean): Added sparc64 files.
18459 (reg-sparc64.o, reg-sparc64.c): New.
18460 * configure.srv (sparc*-*-linux*): New configuration.
18461 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18462 syscall arguments for SPARC.
18463 (regsets_store_inferior_registers): Likewise.
18464 * linux-sparc-low.c: New file.
18466 2008-10-21 Doug Evans <dje@google.com>
18468 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18469 (READLINE_DIR,READLINE_DEP): Delete.
18470 (INTERNAL_CFLAGS): Update.
18471 (LINTFLAGS): Update.
18473 2008-10-10 Pedro Alves <pedro@codesourcery.com>
18475 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18476 whole argv from the last run, not just argv[0].
18478 2008-09-08 Pedro Alves <pedro@codesourcery.com>
18480 * regcache.c (new_register_cache): Return NULL if the register
18481 cache size isn't known yet.
18482 (free_register_cache): Avoid dereferencing a NULL regcache.
18484 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18486 * configure.srv: Merge MIPS and MIPS64.
18488 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18490 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18492 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
18494 * Makefile.in: Add required vsx dependencies.
18496 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18497 Declare init_registers_powerpc_vsx32l.
18498 Declare init_registers_powerpc_vsx64l.
18499 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18500 (ppc_arch_setup): Check for VSX in hwcap.
18501 (ppc_fill_vsxregset): New function.
18502 (ppc_store_vsxregset): New function.
18503 Add new VSX entry in regset_info target_regsets.
18505 * configure.srv: Add new VSX dependencies.
18507 2008-08-12 Pedro Alves <pedro@codesourcery.com>
18509 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18510 (remote_open): Set or clear transport_is_reliable.
18511 (putpkt_binary): Don't expect acks in noack mode.
18512 (getpkt): Don't send ack/nac in noack mode.
18513 * server.c (handle_general_set): Handle QStartNoAckMode.
18514 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18516 (main): Reset noack_mode on every connection.
18517 * server.h (noack_mode): Declare.
18519 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18521 * Makefile.in (GDBREPLAY_OBS): New variable.
18522 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18524 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18525 Daniel Jacobowitz <dan@codesourcery.com>
18527 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18528 (usr_store_inferior_registers): Likewise.
18529 (regsets_store_inferior_registers): Likewise.
18531 2008-07-31 Rolf Jansen <rj@surtec.com>
18532 Pedro Alves <pedro@codesourcery.com>
18534 * configure.ac: Check for memmem declaration.
18535 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18536 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18537 (disable_packet_qfThreadInfo): Unconditionally compile.
18538 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18539 * configure, config.in: Regenerate.
18541 2008-07-28 Doug Kwan <dougkwan@google.com>
18543 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18544 (linux_write_memory): Remove declaration of errno.
18546 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18548 * linux-low.c (handle_extended_wait): Do not use "status"
18549 variable uninitialized.
18551 2008-07-07 Pedro Alves <pedro@codesourcery.com>
18553 * server.c (handle_v_attach): Inhibit reporting dll changes.
18555 2008-06-27 Pedro Alves <pedro@codesourcery.com>
18557 * remote-utils.c (prepare_resume_reply): If requested, don't
18558 output "thread:TID" in the T stop reply.
18560 * server.c (disable_packet_vCont, disable_packet_Tthread)
18561 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18562 (handle_query): If requested, disable support for qC, qfThreadInfo
18564 (handle_v_requests): If requested, disable support for vCont.
18565 (gdbserver_show_disableable): New.
18566 (main): Handle --disable-packet and --disable-packet=LIST.
18568 * server.h (disable_packet_vCont, disable_packet_Tthread)
18569 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18571 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18573 * server.c (gdbserver_usage): Mention --version.
18575 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18577 * Makefile.in (gdbreplay.o): New rule.
18579 2008-06-06 Joseph Myers <joseph@codesourcery.com>
18581 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18582 message, not gdbserver.
18584 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
18585 Nathan Sidwell <nathan@codesourcery.com>
18586 Joseph Myers <joseph@codesourcery.com>
18588 * acinclude.m4: Include ../../config/acx.m4.
18589 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18590 * configure, config.in: Regenerate.
18591 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18592 * server.c (gdbserver_version): Print PKGVERSION.
18593 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18594 (main): Adjust gdbserver_usage calls.
18595 * gdbreplay.c (version, host_name): Add declarations.
18596 (gdbreplay_version, gdbreplay_usage): New.
18597 (main): Accept --version and --help options.
18599 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18601 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18602 (arm_breakpoint_at): Handle Thumb.
18603 (the_low_target): Add comment.
18605 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18607 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18609 2008-05-09 Doug Evans <dje@google.com>
18611 * server.h (decode_search_memory_packet): Declare.
18612 * remote-utils.c (decode_search_memory_packet): New fn.
18613 * server.c (handle_search_memory_1): New fn.
18614 (handle_search_memory): New fn.
18615 (handle_query): Process qSearch:memory packets.
18617 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18619 * regcache.c (registers_length): Remove.
18620 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18621 full register packet.
18622 * regcache.h (registers_length): Remove prototype.
18623 * server.h (PBUFSIZ): Define to 16384.
18625 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18627 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18628 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18629 powerpc-64l.o, and powerpc-altivec64l.o.
18630 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18631 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18632 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18633 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18634 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18637 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18638 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18639 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18640 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18641 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18642 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18643 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18644 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18645 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18646 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18649 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18650 (init_registers_powerpc_32l): ... this new prototype.
18651 (init_registers_powerpc_32): Remove, replace by ...
18652 (init_registers_powerpc_altivec32l): ... this new prototype.
18653 (init_registers_powerpc_e500): Remove, replace by ...
18654 (init_registers_powerpc_e500l): ... this new prototype.
18655 (init_registers_ppc64): Remove, replace by ...
18656 (init_registers_powerpc_64l): ... this new prototype.
18657 (init_registers_powerpc_64): Remove, replace by ...
18658 (init_registers_powerpc_altivec64l): ... this new prototype.
18659 (ppc_num_regs): Set to 73.
18660 (PT_ORIG_R3, PT_TRAP): Define if necessary.
18661 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
18662 (ppc_cannot_store_register): Handle orig_r3 and trap.
18663 (ppc_arch_setup): Update init_registers_... calls.
18664 (ppc_fill_gregset): Handle orig_r3 and trap.
18666 * inferiors.c (clear_inferiors): Reset current_inferior.
18668 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
18670 * acinclude.m4: Add override.m4.
18671 * configure: Regenerate.
18673 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18675 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
18676 initial call to init_register_ppc64.
18678 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18680 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
18681 single powerpc*-*-linux* case.
18682 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
18684 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
18686 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
18687 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
18689 * linux-ppc-low.c: Include <elf.h>.
18690 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
18691 (ppc_hwcap): New global variable.
18692 (ppc_regmap): Remove __SPE__ #ifdef sections.
18693 (ppc_regmap_e500): New global variable.
18694 (ppc_cannot_store_register): Update __SPE__ special case.
18695 (ppc_get_hwcap): New function.
18696 (ppc_arch_setup): Use it to determine whether inferior supports
18697 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
18698 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
18699 Do not access registers if target does not support AltiVec.
18700 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18701 Do not access registers if target does not support SPE.
18702 (target_regsets): Unconditionally include AltiVec and SPE regsets.
18704 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
18706 * linux-low.c (disabled_regsets, num_regsets): New.
18707 (use_regsets_p): Delete.
18708 (linux_wait_for_process): Clear disabled_regsets.
18709 (regsets_fetch_inferior_registers): Check and set it.
18710 (regsets_store_inferior_registers): Likewise.
18711 (linux_fetch_registers, linux_store_registers): Do not use
18713 (initialize_low): Allocate disabled_regsets.
18715 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
18717 * Makefile.in (LIBOBJS): New.
18718 (OBS): Use LIBOBJS.
18719 (memmem.o): New rule.
18720 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
18721 * configure: Regenerated.
18723 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
18725 * server.c (handle_query): Never return "unsupported" for
18726 qXfer:features:read queries.
18728 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
18730 * server.c (get_features_xml): Fix inverted condition.
18731 (handle_query): Always support qXfer:feature:read.
18733 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
18735 * server.c (wrapper_argv): New.
18736 (start_inferior): Handle wrapper_argv. If set, expect an extra
18738 (gdbserver_usage): Document --wrapper.
18739 (main): Parse --wrapper.
18741 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18743 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
18744 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
18745 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
18746 (ppc_set_pc): Likewise.
18747 (ppc_arch_setup): New function.
18748 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
18749 of collect_register.
18750 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
18752 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18754 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
18755 instead of linux-ppc64-low.o.
18756 * linux-ppc64-low.c: Remove file.
18757 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
18758 (linux-ppc64-low.o): Remove rule.
18760 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
18761 (init_registers_powerpc_64): Likewise.
18762 (ppc_regmap): Conditionally define depending on __powerpc64__.
18763 (ppc_cannot_store_register): Do not special-case "fpscr" when
18764 compiled on __powerpc64__.
18765 (ppc_collect_ptrace_register): New function.
18766 (ppc_supply_ptrace_register): New function.
18767 (ppc_breakpoint): Change type to "unsigned int".
18768 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
18769 (the_low_target): Conditionally provide initializers for the
18770 arch_setup member depending on __powerpc64__. Install
18771 collect_ptrace_register and supply_ptrace_register members.
18773 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18775 * regcache.h (gdbserver_xmltarget): Add extern declaration.
18776 * server.c (gdbserver_xmltarget): Define.
18777 (get_features_xml): Use it to replace "target.xml" and arch_string.
18779 * configure.srv: Remove srv_xmltarget. Add XML files that were
18780 mentioned there to srv_xmlfiles instead. Remove conditional tests
18781 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
18782 srv_xmlfiles and srv_regobj to include all possible choices.
18783 * configure.ac (srv_xmltarget): Remove.
18784 (srv_xmlfiles): Do not add "target.xml".
18785 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
18786 checks for supplementary target information.
18787 * configure: Regenerate.
18788 * Makefile.in (XML_TARGET): Remove.
18789 (target.xml): Remove rule.
18790 (clean): Do not clean up target.xml.
18791 (.PRECIOUS): Do not mention target.xml.
18793 * target.h (struct target_ops): Remove arch_string member.
18794 * linux-low.c (linux_arch_string): Remove.
18795 (linux_target_ops): Remove arch_string initializer.
18796 * linux-low.h (struct linux_target_ops): Remove arch_string member.
18797 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
18798 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
18799 * spu-low.c (spu_arch_string): Remove.
18800 (spu_target_ops): Remove arch_string initializer.
18801 * win32-low.c (win32_arch_string): Remove.
18802 (win32_target_ops): Remove arch_string initializer.
18803 * win32-low.h (struct win32_target_ops): Remove arch_string member.
18804 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
18805 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
18807 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18809 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
18810 by collect_ptrace_register and supply_ptrace_register hooks.
18811 * linux-low.c (fetch_register): Use supply_ptrace_register callback
18812 instead of checking for the_low_target.left_pad_xfer.
18813 (usr_store_inferior_registers): Use collect_ptrace_register callback
18814 instead of checking for the_low_target.left_pad_xfer.
18816 * linux-s390-low.c (s390_collect_ptrace_register): New function.
18817 (s390_supply_ptrace_register): Likewise.
18818 (s390_fill_gregset): Call s390_collect_ptrace_register.
18819 (the_low_target): Update.
18821 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
18822 (ppc_supply_ptrace_register): Likewise.
18823 (the_low_target): Update.
18825 * linux-i386-low.c (the_low_target): Update.
18826 * linux-x86-64-low.c (the_low_target): Update.
18828 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18830 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
18831 reg-s390.o and reg-s390x.o.
18833 * linux-low.c (new_inferior): New global variable.
18834 (linux_create_inferior, linux_attach): Set it.
18835 (linux_wait_for_process): Call the_low_target.arch_setup after the
18836 target has stopped for the first time.
18837 (initialize_low): Do not call the_low_target.arch_setup.
18839 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
18840 (s390_set_pc): Likewise.
18841 (s390_arch_setup): New function.
18842 (the_low_target): Use s390_arch_setup as arch_setup routine.
18844 * regcache.c (realloc_register_cache): New function.
18845 (set_register_cache): Call it for each existing regcache.
18847 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18849 * server.h (init_registers): Remove prototype.
18851 * linux-low.h (struct linux_target_ops): Add arch_setup field.
18852 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
18853 instead of init_registers ().
18854 * linux-arm-low.c (init_registers_arm): Add prototype.
18855 (init_registers_arm_with_iwmmxt): Likewise.
18856 (the_low_target): Add initializer for arch_setup field.
18857 * linux-cris-low.c (init_registers_cris): Add prototype.
18858 (the_low_target): Add initializer for arch_setup field.
18859 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
18860 (the_low_target): Add initializer for arch_setup field.
18861 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
18862 (the_low_target): Add initializer for arch_setup field.
18863 * linux-ia64-low.c (init_registers_ia64): Add prototype.
18864 (the_low_target): Add initializer for arch_setup field.
18865 * linux-m32r-low.c (init_registers_m32r): Add prototype.
18866 (the_low_target): Add initializer for arch_setup field.
18867 * linux-m68k-low.c (init_registers_m68k): Add prototype.
18868 (the_low_target): Add initializer for arch_setup field.
18869 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
18870 (init_registers_mips64_linux): Likewise.
18871 (the_low_target): Add initializer for arch_setup field.
18872 * linux-ppc-low.c (init_registers_ppc): Add prototype.
18873 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
18874 (the_low_target): Add initializer for arch_setup field.
18875 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
18876 (init_registers_powerpc_64): Likewise.
18877 (the_low_target): Add initializer for arch_setup field.
18878 * linux-s390-low.c (init_registers_s390): Add prototype.
18879 (init_registers_s390x): Likewise.
18880 (the_low_target): Add initializer for arch_setup field.
18881 * linux-sh-low.c (init_registers_sh): Add prototype.
18882 (the_low_target): Add initializer for arch_setup field.
18883 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
18884 (the_low_target): Add initializer for arch_setup field.
18885 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
18886 (the_low_target): Add initializer for arch_setup field.
18888 * win32-low.h (struct win32_target_ops): Add arch_setup field.
18889 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
18890 instead of init_registers ().
18891 * win32-arm-low.c (init_registers_arm): Add prototype.
18892 (the_low_target): Add initializer for arch_setup field.
18893 * win32-i386-low.c (init_registers_i386): Add prototype.
18894 (the_low_target): Add initializer for arch_setup field.
18896 * spu-low.c (init_registers_spu): Add prototype.
18897 (initialize_low): Call initialie_registers_spu () instead of
18898 initialize_registers ().
18900 2008-02-19 Pedro Alves <pedro@codesourcery.com>
18902 * server.c (handle_v_requests): When handling the vRun and vAttach
18903 packets, if already debugging a process, don't kill it. Return an
18906 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
18908 * server.c (handle_query): Correct length check.
18910 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
18912 * win32-low.c (do_initial_child_stuff): Add process handle
18913 parameter. Set current_process_handle and current_process_id from the
18914 parameters. Clear globals.
18915 (win32_create_inferior): Don't set current_process_handle and
18916 current_process_id here. Instead pass them on the call to
18917 do_initial_child_stuff.
18918 (win32_attach): Likewise.
18919 (win32_clear_inferiors): New.
18920 (win32_kill): Don't close the current process handle or the
18921 current thread handle here. Instead call win32_clear_inferiors.
18922 (win32_detach): Don't open a new handle to the process. Call
18923 win32_clear_inferiors.
18924 (win32_join): Don't rely on current_process_handle; open a new
18925 handle using the process id.
18926 (win32_wait): Call win32_clear_inferiors when the inferior process
18929 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
18931 * server.c (monitor_show_help): Add "exit".
18933 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
18935 * Makefile.in (SFILES): Add linux-xtensa-low.c.
18936 (clean): Add reg-xtensa.c.
18937 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
18938 * configure.srv (xtensa*-*-linux*) New target.
18939 * linux-xtensa-low.c: New.
18940 * xtensa-xtregs.c: New.
18942 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
18944 * hostio.c: Don't include errno.h.
18945 (errno_to_fileio_errno): Move to hostio-errno.
18946 * hostio.c: (hostio_error): Remove the error parameter. Defer the
18947 error number outputting to the target->hostio_last_error callback.
18948 (hostio_packet_error): Use FILEIO_EINVAL directly.
18949 (handle_open, handle_pread, hostio_error, handle_unlink): Update
18950 calls to hostio_error.
18951 * hostio-errno.c: New.
18952 * server.h (hostio_last_error_from_errno): Declare.
18953 * target.h (target_ops): Add hostio_last_error member.
18954 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
18955 as hostio_last_error handler.
18956 * spu-low.c (spu_target_ops): Likewise.
18957 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
18958 (wince_hostio_last_error): New functions.
18959 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
18960 as hostio_last_error handler.
18961 (win32_target_ops) [!_WIN32_WCE]: Register
18962 hostio_last_error_from_errno as hostio_last_error handler.
18963 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
18964 (hostio-errno.o): New rule.
18965 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
18966 * configure.srv (srv_hostio_err_objs): New variable. Default to
18968 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
18969 * configure: Regenerate.
18971 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18973 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
18974 (linux_kill, linux_detach): Clean up the process list.
18975 * remote-utils.c (remote_open): Improve port number parsing.
18976 (putpkt_binary, input_interrupt): Only send interrupts if the target
18978 * server.c (extended_protocol): Make static.
18979 (attached): Define earlier.
18980 (exit_requested, response_needed, program_argv): New variables.
18981 (target_running): New.
18982 (start_inferior): Clear attached here.
18983 (attach_inferior): Set attached here.
18984 (require_running): Define.
18985 (handle_query): Use require_running and target_running. Implement
18987 (handle_v_attach, handle_v_run): New.
18988 (handle_v_requests): Use require_running. Handle vAttach and vRun.
18989 (gdbserver_usage): Update.
18990 (main): Redo argument parsing. Handle --debug and --multi. Handle
18991 --attach along with other options or after the port. Save
18992 program_argv. Support no initial program. Resynchronize
18993 communication with GDB after an error. Handle "monitor exit".
18994 Use require_running and target_running. Always allow the extended
18995 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
18996 restart in extended mode.
18997 * README: Refer to the GDB manual. Update --attach usage.
18999 2007-12-20 Andreas Schwab <schwab@suse.de>
19001 * linux-low.c (STACK_SIZE): Define.
19002 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19003 (linux_test_for_tracefork): Likewise.
19005 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19007 * linux-low.c (linux_wait_for_event): Update messages. Do not
19008 reinsert auto-delete breakpoints.
19009 * mem-break.c (struct breakpoint): Change return type of handler to
19011 (set_breakpoint_at): Update handler type.
19012 (reinsert_breakpoint_handler): Return 1 instead of calling
19014 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19016 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19017 * mem-break.h (set_breakpoint_at): Update handler type.
19018 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19019 * win32-low.c (auto_delete_breakpoint): New.
19020 (get_child_debug_event): Use it.
19022 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19024 * configure.ac: Check for pread and pwrite.
19025 * hostio.c (handle_pread): Fall back to lseek and read.
19026 (handle_pwrite): Fall back to lseek and write.
19027 * config.in, configure: Regenerated.
19029 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19031 * server.c (myresume): Add own_buf argument.
19032 (main): Update calls.
19034 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19036 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19037 * remote-utils.c (remote_open): Do not call disable_async_io.
19038 (block_async_io): Delete.
19039 (unblock_async_io): Make static.
19040 (initialize_async_io): New.
19041 * server.c (handle_v_cont): Handle async I/O here.
19042 (myresume): Likewise. Move other common resume tasks here...
19043 (main): ... from here. Call initialize_async_io. Disable async
19044 I/O before the main loop.
19045 * server.h (initialize_async_io): Declare.
19046 (block_async_io, unblock_async_io): Delete prototypes.
19047 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19049 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19051 * remote-utils.c (readchar): Allow binary data in received messages.
19053 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19055 * win32-low.c (attaching): New global.
19056 (win32_create_inferior): Clear the `attaching' global.
19057 (win32_attach): Set the `attaching' global.
19058 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19059 attaching. Only set a breakpoint at the entry point if not
19062 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19064 * server.c (main): Don't report dll events on the initial
19065 connection on attaches.
19067 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19069 * server.c (main): Relax numerical bases supported for the pid of
19070 the --attach command line argument.
19072 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19074 * win32-low.c (win32_attach): Call OpenProcess before
19075 DebugActiveProcess, not after. Add last error output to error
19078 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19080 * win32-low.c (win32_get_thread_context)
19081 (win32_set_thread_context): New functions.
19082 (thread_rec): Use win32_get_thread_context.
19083 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19084 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19087 2007-12-03 Leo Zayas
19088 Pedro Alves <pedro_alves@portugalmail.pt>
19090 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19092 (child_add_thread): Minor cleanup.
19093 (child_continue): Resume artificially suspended threads before
19094 calling ContinueDebugEvent.
19095 (suspend_one_thread): New.
19096 (fake_breakpoint_event): New.
19097 (get_child_debug_event): Change return type to int. Check here if
19098 gdb sent an interrupt request. If a soft interrupt was requested,
19099 fake a breakpoint event. Return 0 if there is no event to handle,
19101 (win32_wait): Don't check here if gdb sent an interrupt request.
19102 Ensure there is a valid event to handle.
19103 (win32_request_interrupt): Add soft interruption method as last
19106 2007-12-03 Leo Zayas
19107 Pedro Alves <pedro_alves@portugalmail.pt>
19109 * win32-low.h (win32_thread_info): Add descriptions to the
19110 structure members. Replace `suspend_count' counter by a
19112 * win32-low.c (thread_rec): Update condition of when to get the
19113 context from the inferior. Rely on ContextFlags being set if it
19114 has already been retrieved. Only suspend the inferior thread if
19115 we haven't already. Warn if that fails.
19116 (continue_one_thread): s/suspend_count/suspended/. Only call
19117 ResumeThread once. Warn if that fails.
19119 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19121 * win32-low.c (win32_wait): Don't read from the inferior when it
19122 has already exited.
19124 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19126 * Makefile.in (win32_low_h): New variable.
19127 (win32-low.o): Add dependency on $(win32_low_h).
19128 (win32-arm-low.o, win32-i386-low.o): New rules.
19130 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19132 * hostio.c: Correct copyright year.
19134 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19136 * Makefile.in (OBS): Add hostio.o.
19137 (hostio.o): New rule.
19138 * server.h (handle_vFile): Declare.
19139 * hostio.c: New file.
19140 * server.c (handle_v_requests): Take packet_len and new_packet_len
19141 for binary packets. Call handle_vFile.
19142 (main): Update call to handle_v_requests.
19144 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19146 * linux-low.c: Include <sched.h>.
19148 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19150 * linux-low.c (linux_tracefork_grandchild): New.
19151 (linux_tracefork_child): Use clone.
19152 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19154 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19156 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19158 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19160 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19162 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19164 * inferiors.c (change_inferior_id): Delete.
19165 (add_pid_to_list, pull_pid_from_list): New.
19166 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19167 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19168 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19169 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19170 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19171 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19172 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19173 (using_threads): Always set to 1.
19174 (handle_extended_wait): New.
19175 (add_process): Do not set TID.
19176 (linux_create_inferior): Set must_set_ptrace_flags.
19177 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19178 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19179 (linux_thread_alive): Rename TID argument to LWPID.
19180 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19181 (linux_wait_for_event): Do not use TID or check using_threads. Update
19182 call to dead_thread_notify. Call handle_extended_wait.
19183 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19184 (send_sigstop): Delete sigstop_sent.
19185 (wait_for_sigstop): Avoid TID.
19186 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19187 (linux_test_for_tracefork): New.
19188 (linux_lookup_signals): Use thread_db_active and
19189 linux_supports_tracefork_flag.
19190 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19191 * linux-low.h (get_process_thread): Avoid TID.
19192 (struct process_ifo): Move thread_known and tid to the end. Remove
19194 (linux_attach_lwp, thread_db_init): Update prototypes.
19195 * server.h (change_inferior_id): Delete prototype.
19196 (add_pid_to_list, pull_pid_from_list): New prototypes.
19197 * thread-db.c (thread_db_use_events): New.
19198 (find_first_thread): Rename to...
19199 (find_one_thread): ...this. Update callers and messages. Do not
19200 call fatal. Check thread_db_use_events. Do not call
19201 change_inferior_id or new_thread_notify.
19202 (maybe_attach_thread): Update. Do not call new_thread_notify.
19203 (thread_db_init): Set thread_db_use_events. Check use_events.
19204 * utils.c (fatal, warning): Correct message prefix.
19206 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19208 * Makefile.in (clean): Remove new files.
19209 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19210 (powerpc-64.o, powerpc-64.c): New rules.
19211 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19212 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19214 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19216 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19217 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19218 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19219 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19220 (target_regsets): Add AltiVec and SPE register sets.
19221 * configure.ac: Check for AltiVec and SPE.
19222 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19223 (ppc_fill_vrregset, ppc_store_vrregset): New.
19224 (target_regsets): Add AltiVec register set.
19225 * configure: Regenerated.
19227 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19229 * linux-low.c (O_LARGEFILE): Define.
19230 (linux_read_memory): Use /proc/PID/mem.
19231 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19232 * configure, config.in: Regenerated.
19234 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19236 * linux-low.c (linux_wait_for_event): Do not pass signals while
19239 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19241 * win32-low.c (create_process): New.
19242 (win32_create_inferior): Use create_process instead of
19243 CreateProcess. If create_process failed retry appending an ".exe"
19244 suffix. Store the GetLastError result immediatelly after
19245 create_process calls and use it on the call to error.
19247 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19249 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19251 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19253 * configure.ac: Switch license to GPLv3.
19255 2007-08-01 Michael Snyder <msnyder@access-company.com>
19257 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19259 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19261 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19263 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19264 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19265 CloseToolhelp32Snapshot.
19266 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19267 CloseToolhelp32Snapshot.
19269 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19271 * server.c (main): Check for inferior exit before main loop.
19273 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19275 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19276 instead of on tmp_desc.
19278 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19279 Daniel Jacobowitz <dan@codesourcery.com>
19281 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19282 (add_thread): Minor cleanups.
19283 (clear_inferiors): Move lower in the file. Clear the DLL
19285 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19286 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19287 (xml_escape_text): New.
19288 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19290 (handle_v_cont): Report errors.
19291 (gdbserver_version): Update.
19292 (main): Correct size of own_buf. Do not report initial DLL events.
19293 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19294 (unloaded_dll, xml_escape_text): New.
19295 * win32-low.c (enum target_waitkind): Update comments.
19296 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19297 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19298 (win32_EnumProcessModules, win32_GetModuleInformation)
19299 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19300 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19301 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19302 (win32_Module32First, win32_Module32Next, load_toolhelp)
19303 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19304 (get_child_debug_event): Handle DLL events.
19305 (win32_wait): Likewise.
19307 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19309 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19310 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19312 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19314 * win32-low.c (handle_output_debug_string): Ignore event if not
19317 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19319 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19321 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19323 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19325 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19327 * inferiors.c (change_inferior_id): Add comment.
19328 * linux-low.c (check_removed_breakpoint): Add an early
19329 prototype. Improve debug output.
19330 (linux_attach): Doc update.
19331 (linux_detach_one_process, linux_detach): Clean up before releasing
19333 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19334 * linux-low.h (struct process_info): Doc improvement.
19335 * mem-break.c (delete_all_breakpoints): New.
19336 * mem-break.h (delete_all_breakpoints): New prototype.
19337 * thread-db.c (find_first_thread): New.
19338 (thread_db_create_event): Call it instead of
19339 thread_db_find_new_threads. Clean up unused variables.
19340 (maybe_attach_thread): Remove first thread handling.
19341 (thread_db_find_new_threads): Use find_first_thread.
19342 (thread_db_get_tls_address): Likewise.
19344 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19346 * thread-db.c (thread_db_find_new_threads): Add prototype.
19347 (thread_db_create_event): Check for the main thread before adding
19349 (maybe_attach_thread): Only enable event reporting if TID == 0.
19350 (thread_db_get_tls_address): Check for new threads.
19352 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19354 * linux-low.c (linux_create_inferior): Try execv before execvp.
19355 * spu-low.c (spu_create_inferior): Likewise.
19357 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19359 * linux-low.c (linux_create_inferior): Change execv to execvp.
19360 * spu-low.c (spu_create_inferior): Likewies.
19362 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19364 * Makefile.in (clean): Clean new files instead of deleted ones.
19365 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19366 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19368 * configure.srv: Specify XML files and new regformats for MIPS and
19370 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19371 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19372 an entry for the restart register.
19373 (mips_cannot_fetch_register, mips_cannot_store_register)
19374 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19375 register names to match the XML descriptions.
19376 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19377 restart register instead of $0.
19379 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19380 Markus Deuling <deuling@de.ibm.com>
19382 * remote-utils.c (decode_xfer_write): New function.
19383 * server.h (decode_xfer_write): Add prototype.
19384 * server.c (handle_query): Add PACKET_LEN argument. Support
19385 qXfer:spu:read and qXfer:spu:write packets.
19386 (main): Pass packet_len to handle_query.
19387 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19388 * target.h (target_ops): Add qxfer_spu.
19390 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19392 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19393 accessing non-seekable spufs files.
19395 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19397 * server.c (handle_query): Add reply for qC packet.
19399 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19400 Leo Zayas <lerele@champenstudios@com>
19402 * server.h (check_remote_input_interrupt_request): New function.
19403 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19404 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19405 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19406 (check_remote_input_interrupt_request): New function.
19407 * server.h (check_remote_input_interrupt_request): Declare.
19408 * win32-low.c (winapi_DebugBreakProcess,
19409 winapi_GenerateConsoleCtrlEvent): New typedefs.
19410 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19412 (win32_wait): Check for remote interrupt request
19413 with check_remote_input_interrupt_request.
19414 (win32_request_interrupt): New function.
19415 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19417 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19419 * win32-low.c (debug_registers_changed,
19420 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19421 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19422 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19423 (thread_rec): Get context using the low target.
19424 (child_add_thread): Call thread_added on the low target,
19425 which does the same thing.
19427 (do_initial_child_stuff): Remove debug registers references.
19428 Set context using the low target. Resume threads after
19429 setting the contexts.
19430 (child_continue): Remove dead variable. Remove debug
19431 registers references.
19432 (child_fetch_inferior_registers): Go through the low target.
19433 (do_child_store_inferior_registers): Remove.
19434 (child_store_inferior_registers): Go through the low target.
19435 (win32_resume): Remove debug registers references.
19436 Set context using the low target.
19437 (handle_exception): Change return type to void. Don't record
19438 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19439 first chance exception.
19440 (get_child_debug_event): Change return type to void. Remove
19441 goto loop. Always return after waiting for debug event.
19442 (win32_wait): Convert to switch statement. Handle spurious
19445 * win32-i386-low.c (debug_registers_changed,
19446 debug_registers_used): New.
19447 (initial_stuff): Rename to ...
19448 (i386_initial_stuff): ... this. Clear debug registers
19450 (store_debug_registers): Delete.
19451 (i386_get_thread_context): New.
19452 (load_debug_registers): Delete.
19453 (i386_set_thread_context): New.
19454 (i386_thread_added): New.
19455 (single_step): Rename to ...
19456 (i386_single_step): ... this.
19457 (do_fetch_inferior_registers): Rename to ...
19458 (i386_fetch_inferior_register): ... this.
19459 (i386_store_inferior_register): New.
19460 (the_low_target): Adapt to new interface.
19462 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19463 (arm_get_thread_context): New.
19464 (arm_set_thread_context): New.
19466 (do_fetch_inferior_registers): Rename to ...
19467 (arm_fetch_inferior_register): ... this.
19468 (arm_store_inferior_register): New.
19469 (arm_wince_breakpoint): Reimplement as unsigned long.
19470 (arm_wince_breakpoint_len): Define.
19471 (the_low_target): Adapt to new interface.
19473 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19474 load_debug_registers. Add get_thread_context, set_thread_context,
19475 thread_added and store_inferior_register. Rename
19476 fetch_inferior_registers to fetch_inferior_register.
19477 (regptr): Remove declaration.
19479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19481 * linux-low.c (linux_detach): Change return type to int. Return 0.
19482 * spu-low.c (spu_detach): Likewise.
19484 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19486 * target.h (target_ops): Change return type of detach to int.
19488 (join_inferior): New.
19489 * server.c (main): Don't skip detach support on mingw32.
19490 If the inferior doesn't support detaching return error.
19491 Call join_inferior instead of using waitpid.
19492 * linux-low.c (linux_join): New.
19493 (linux_target_op): Add linux_join.
19494 * spu-low.c (spu_join): New.
19495 (spu_target_ops): Add spu_join.
19496 * win32-low.c (win32_detach): Adapt to new interface.
19497 Reopen current_process_handle before detaching. Issue a child
19498 resume before detaching.
19500 (win32_target_op): Add win32_join.
19502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19504 * win32-low.c (win32-attach): Fix return value.
19505 * target.h (target_ops): Describe ATTACH return values.
19507 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19509 * win32-low.c (GETPROCADDRESS): Define.
19510 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19511 (winapi_DebugSetProcessKillOnExit): Likewise.
19512 (win32_create_inferior): Force usage of ansi CreateProcessA.
19513 (win32_attach): Use GETPROCADDRESS.
19514 (win32_detach): Likewise.
19516 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19518 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19520 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19522 * win32-low.c: Commit leftover changes from 2007-03-29.
19524 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19527 fields short instead of int. Add explicit padding.
19528 (i387_cache_to_fsave): Remove unnecessary casts.
19529 (i387_fsave_to_cache): Doc fix.
19530 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19532 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19534 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19535 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19537 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19539 * configure.srv (arm*-*-mingw32ce*): Move near the other
19542 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19544 * configure.ac: Add errno checking.
19545 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19546 sys/file.h and malloc.h.
19547 (AC_CHECK_DECLS): Add perror.
19548 (srv_mingwce): Handle.
19549 * configure.srv (i[34567]86-*-cygwin*): Add
19550 win32-i386-low.o to srv_tgtobj.
19551 (i[34567]86-*-mingw*): Likewise.
19552 (arm*-*-mingw32ce*): Add case.
19553 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19554 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19555 [__MINGW32CE__] (strerror): New function.
19556 [__MINGW32CE__] (errno): Define to GetLastError.
19557 [__MINGW32CE__] (COUNTOF): New macro.
19558 (remote_open): Remove extra close call.
19559 * mem-break.c (delete_breakpoint_at): New function.
19560 * mem-break.h (delete_breakpoint_at): Declare.
19561 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19562 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19563 [USE_WIN32API] (read, write): Add char* casts.
19564 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19565 * server.h: Include wincecompat.h on Windows CE.
19566 [HAVE_ERRNO_H]: Check.
19567 (perror): Declare if not declared.
19568 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19569 (perror_with_name): Remove errno declaration.
19570 * wincecompat.h: New.
19571 * wincecompat.c: New.
19572 * win32-low.h: New.
19573 * win32-arm-low.c: New.
19574 * win32-i386-low.c: New.
19575 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19576 (OUTMSG2): Make it safe.
19578 (COUNTOF): New macro.
19579 (NUM_REGS): Get it from the low target.
19580 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19581 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19582 (thread_rec): Let low target handle debug registers.
19583 (child_add_thread): Likewise.
19584 (child_init_thread_list): Likewise.
19585 (continue_one_thread): Likewise.
19587 (do_child_fetch_inferior_registers): Move to ...
19588 * win32-i386-low.c: ... here, and rename to ...
19589 (do_fetch_inferior_registers): ... this.
19590 * win32-low.c (child_fetch_inferior_registers):
19591 Go through the low target.
19592 (do_child_store_inferior_registers): Use regptr.
19593 (strwinerror): New function.
19594 (win32_create_inferior): Handle Windows CE.
19595 Use strwinerror instead of strerror on Windows error
19596 codes. Add program to the error output.
19597 Don't close the main thread handle on Windows CE.
19598 (win32_attach): Use coredll.dll on Windows CE.
19599 (win32_kill): Close current process and current
19601 (win32_detach): Use coredll.dll on Windows CE.
19602 (win32_resume): Let low target handle debug registers, and
19604 (handle_exception): Add/Remove initial breakpoint. Avoid
19605 non-existant WSTOPSIG on Windows CE.
19606 (win32_read_inferior_memory): Cast to remove warning.
19607 (win32_arch_string): Go through the low target.
19608 (initialize_low): Call set_breakpoint_data with the low
19609 target's breakpoint.
19610 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19611 FOP_REGNUM, mappings): Move to ...
19612 * win32-i386-low.c: ... here.
19613 * win32-low.c (win32_thread_info): Move to ...
19614 * win32-low.h: ... here.
19615 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19616 win32-arm-low.c and wincecompat.c.
19617 (all:): Add $EXEEXT.
19618 (install-only:): Likewise.
19619 (gdbserver:): Likewise.
19620 (gdbreplay:): Likewise.
19621 * config.in: Regenerate.
19622 * configure: Regenerate.
19624 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19626 * win32-low.c: Rename typedef thread_info to
19627 win32_thread_info throughout.
19629 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19631 * win32-i386-low.c: Rename to ...
19632 * win32-low.c: ... this.
19633 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19634 * Makefile.in: Likewise.
19636 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19638 * remote-utils.c (monitor_output): Constify msg parameter.
19639 * server.h (monitor_output): Likewise.
19640 * win32-i386-low.c (handle_output_debug_string): New.
19641 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19642 handle_output_debug_string.
19643 (get_child_debug_event): Likewise.
19645 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19647 * server.c (main): Correct strtoul check.
19649 2007-03-27 Jon Ringle <jon@ringle.org>
19651 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19653 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19655 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
19657 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
19659 * terminal.h: Check HAVE_SGTTY_H.
19661 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
19663 * remote-utils.c (remote_open): Print out the assigned port number.
19665 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
19667 * remote-utils.c (monitor_output): New function.
19668 * server.c (debug_threads): Define here.
19669 (monitor_show_help): New function.
19670 (handle_query): Handle qRcmd.
19671 (main): Do not handle 'd' packet.
19672 * server.h (debug_threads, remote_debug, monitor_output): Declare.
19673 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
19676 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19678 * Makefile.in (EXEEXT): New.
19679 (clean): Use $(EXEEXT).
19681 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19683 * target.h (target_ops): Rename send_signal to request_interrupt,
19684 and remove enum target_signal parameter.
19685 * linux-low.c (linux_request_interrupt): Rename from
19686 linux_send_signal, and always send SIGINT.
19687 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
19688 and always send SIGINT.
19689 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
19691 (input_interrupt): Likewise.
19693 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19695 * server.c (get_features_xml): Check if target implemented
19697 * win32-i386-low.c (win32_arch_string): New.
19698 (win32_target_ops): Add win32_arch_string as arch_string member.
19700 2007-02-22 Markus Deuling <deuling@de.ibm.com>
19702 * spu-low.c (spu_arch_string): New.
19703 (spu_target_ops): Add spu_arch_string.
19705 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
19707 * remote-utils.c: Remove HAVE_TERMINAL_H check.
19708 * configure.ac: Do not check for terminal.h.
19709 * configure, config.in: Regenerated.
19711 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19713 * Makefile.in (OBS): Add $(XML_BUILTIN).
19714 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
19716 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
19717 (arm-with-iwmmxt.c): New.
19718 * config.in, configure: Regenerate.
19719 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
19720 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
19721 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
19722 (arm*-*-linux*): Add iWMMXt and regset support.
19723 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
19724 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
19725 (arm_store_wmmxregset, target_regsets): New.
19726 * server.c (get_features_xml): Take annex argument. Check builtin
19728 (handle_query): Handle multiple annexes.
19730 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19732 * remote-utils.c [USE_WIN32API] (read, write): Define.
19733 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
19736 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
19738 * linux-i386-low.c (the_low_target): Set arch_string.
19739 * linux-x86-64-low.c (the_low_target): Likewise.
19740 * linux-low.c (linux_arch_string): New.
19741 (linux_target_ops): Add it.
19742 * linux-low.h (struct linux_target_ops): Add arch_string.
19743 * server.c (write_qxfer_response): Use const void * for DATA.
19744 (get_features_xml): New.
19745 (handle_query): Handle qXfer:features:read. Report it for qSupported.
19746 * target.h (struct target_ops): Add arch_string method.
19748 2007-01-03 Denis Pilat <denis.pilat@st.com>
19749 Daniel Jacobowitz <dan@codesourcery.com>
19751 * linux-low.c (linux_kill): Handle being called with no threads.
19752 * win32-i386-low.c (win32_kill): Likewise.
19753 (get_child_debug_event): Clear current_process_handle.
19755 2006-12-30 Denis PILAT <denis.pilat@st.com>
19756 Daniel Jacobowitz <dan@codesourcery.com>
19758 * remote-utils.c (remote_open): Check the type of specified
19759 serial port devices before opening them.
19760 * server.c (main): Kill the inferior if an error occurs during
19761 the first remote_open.
19763 2006-12-05 Markus Deuling <deuling@de.ibm.com>
19765 * README: Update supported targets.
19767 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
19769 * Makefile.in (clean): Remove reg-mips64.c.
19770 (reg-mips64.c, reg-mips64.o): New rules.
19771 * configure.srv: Handle mips64. Include regset support for mips.
19772 * linux-mips-low.c (union mips_register): New.
19773 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
19774 (mips_breakpoint, mips_breakpoint_at): Use int.
19775 (mips_collect_register, mips_supply_register)
19776 (mips_collect_register_32bit, mips_supply_register_32bit)
19777 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
19778 (mips_store_fpregset, target_regsets): New.
19779 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
19781 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
19783 * configure.srv: Add target "spu*-*-*".
19784 * Makefile.in (clean): Remove reg-spu.c.
19785 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
19786 * spu-low.c: New file.
19788 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19790 * configure.ac: Correct td_thr_tls_get_addr test.
19791 * configure: Regenerated.
19793 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19795 * linux-low.c (linux_wait_for_event): Reformat. Use the
19796 pass_signals array.
19797 * remote-utils.c (decode_address_to_semicolon): New.
19798 * server.c (pass_signals, handle_general_set): New.
19799 (handle_query): Mention QPassSignals for qSupported.
19800 (main): Call handle_general_set.
19801 * server.h (pass_signals, decode_address_to_semicolon): New.
19803 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
19805 * server.c (handle_query): Correct error handling for read_auxv.
19807 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
19809 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
19810 and srv_linux_thread_db to yes.
19811 * linux-s390-low.c (s390_fill_gregset): New function.
19812 (target_regsets): Define data structure.
19814 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
19816 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
19817 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
19818 * config.in, configure: Regenerated.
19819 * inferiors.c (gdb_id_to_thread): New function.
19820 (gdb_id_to_thread_id): Use it.
19821 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
19822 * linux-low.h (struct process_info): Add th member.
19823 (thread_db_get_tls_address): New prototype.
19824 * remote-utils.c (decode_address): Make non-static.
19825 * server.c (handle_query): Handle qGetTLSAddr.
19826 * server.h (gdb_id_to_thread, decode_address): New prototypes.
19827 * target.h (struct target_ops): Add get_tls_address.
19828 * thread-db.c (maybe_attach_thread): Save the thread handle.
19829 (thread_db_get_tls_address): New.
19831 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
19833 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
19834 (linux_resume_one_process): Take a siginfo_t *. Update all
19835 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
19836 (struct pending_signals): Add a siginfo_t.
19837 (linux_wait_for_process): Always set last_status.
19838 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
19839 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
19840 * linux-low.h (struct process_info): Add last_status.
19842 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
19844 * remote-utils.c (try_rle): New function.
19845 (putpkt_binary): Use it.
19847 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
19849 * Makefile.in (clean): Clean reg-x86-64-linux.c.
19850 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
19851 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
19852 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
19853 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
19856 2006-08-08 Richard Sandiford <richard@codesourcery.com>
19858 * server.c (terminal_fd): New variable.
19859 (old_foreground_pgrp): Likewise.
19860 (restore_old_foreground_pgrp): New function.
19861 (start_inferior): Record the terminal file descriptor in terminal_fd
19862 and its original foreground group in old_foreground_pgrp. Register
19863 restore_old_foreground_pgrp with atexit().
19865 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
19867 * server.c (handle_query): Correct qPart to qXfer.
19869 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
19871 * configure.ac: Check for more headers which are missing on
19872 Windows. Automatically supply -lwsock32 and USE_WIN32API.
19873 * configure.srv: Add Cygwin and mingw32.
19874 * remote-utils.c: Don't include headers unconditionally which
19875 are missing on mingw32. Include <winsock.h> for mingw32.
19876 (remote_open): Adjust for mingw32 support. Flush
19877 standard error after writing to it.
19878 (remote_close, putpkt_binary, input_interrupt, block_async_io)
19879 (unblock_async_io, enable_async_io, disable_async_io)
19880 (readchar, getpkt): Update for Winsock support.
19881 (prepare_resume_reply): Expect a protocol signal number.
19882 * server.c: Disable <sys/wait.h> on mingw32.
19883 (start_inferior): Adjust for mingw32 support. Flush
19884 standard error after writing to it.
19885 (attach_inferior): Likewise. Use protocol signal
19887 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
19889 * win32-i386-low.c: New file.
19890 * Makefile.in (XM_CLIBS): Set.
19891 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
19892 (win32-i386-low.o): New dependency rule.
19893 * linux-low.c (linux_wait): Use target signal numbers.
19894 * target.h (struct target_ops): Doc fix.
19895 * server.h (target_signal_to_name): New prototype.
19896 * gdbreplay.c: Don't include headers unconditionally which
19897 are missing on mingw32. Include <winsock.h> for mingw32.
19898 (remote_close, remote_open): Adjust for Winsock support.
19899 * configure, config.in: Regenerated.
19901 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19903 * server.c (decode_xfer_read, write_qxfer_response): New.
19904 (handle_query): Take a packet length argument. Handle
19905 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
19906 the qSupported response.
19907 (main): Update call to handle_query.
19909 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
19911 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
19912 (putpkt_binary): Renamed from putpkt and adjusted for binary
19914 (putpkt): New wrapper for putpkt_binary.
19915 (readchar): Don't mask off the high bit.
19916 (decode_X_packet): New function.
19917 * server.c (main): Call putpkt_binary if a handler sets the packet
19918 length. Save the length of the incoming packet. Handle 'X'.
19919 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
19921 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
19923 * server.c (handle_query): Handle qSupported.
19925 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19927 * remote-utils.c (all_symbols_looked_up): New variable.
19928 (look_up_one_symbol): Check it.
19929 * server.h (look_up_one_symbol): New declaration.
19930 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
19932 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19934 * Makefile.in (linux-arm-low.o): Update dependencies.
19935 * linux-arm-low.c: Include "gdb_proc_service.h".
19936 (PTRACE_GET_THREAD_AREA): Define.
19937 (ps_get_thread_area): New function.
19939 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
19941 * configure.srv (m68k*-*-uclinux*): New target.
19942 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
19943 (linux_resume_one_process): Remove extraneous cast.
19944 (linux_read_offsets): New.
19945 (linux_target_op): Add linux_read_offsets on mmuless systems.
19946 * server.c (handle_query): Add qOffsets logic.
19947 * target.h (struct target_ops): Add read_offsets.
19949 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19951 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
19952 (PTRACE_GET_THREAD_AREA): Define.
19953 (ps_get_thread_area): New function.
19954 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
19955 (linux-x86-64-low.o): Update.
19957 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19959 * configure.ac: Remove checks for prfpregset_t.
19960 * gdb_proc_service.h: New file.
19961 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
19962 new "gdb_proc_service.h".
19963 * proc-service.c: Likewise.
19964 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
19965 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
19966 * Makefile.in (gdb_proc_service_h): Updated.
19967 * configure, config.in: Regenerated.
19969 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19971 * remote-utils.c (prepare_resume_reply): Move declaration
19972 of gdb_id_from_wait to the top of the block.
19974 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
19976 * linux-low.c (regsets_store_inferior_registers): Read the regset
19977 from the target before filling it.
19979 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19981 * server.c (attach_inferior): Return SIGTRAP for a successful
19984 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
19986 * Makefile.in (OBS): Add version.o.
19987 (STAGESTUFF): Delete.
19988 (version.o): Add dependencies.
19989 (version.c): Replace rule.
19990 (clean): Remove version.c.
19991 * server.c (gdbserver_version): New.
19992 (gdbserver_usage): Use printf.
19993 (main): Handle --version and --help.
19994 * server.h (version, host_name): Add declarations.
19996 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20008 * linux-x86-64-low.c:
20010 * linux-s390-low.c:
20011 * linux-ppc64-low.c:
20013 * linux-mips-low.c:
20014 * linux-m68k-low.c:
20015 * linux-m32r-low.c:
20018 * linux-ia64-low.c:
20019 * linux-i386-low.c:
20020 * linux-crisv32-low.c:
20032 * gdbserver.1: Add (C) after Copyright. Update the FSF
20035 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20037 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20038 (arm_breakpoint_at): Recognize both breakpoints.
20039 (the_low_target): Use the correct breakpoint instruction.
20041 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20043 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20044 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20045 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20046 (the_low_target): Update.
20048 2005-10-25 Andreas Schwab <schwab@suse.de>
20050 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20052 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20053 (ia64_num_regs): Reduce to 462.
20055 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20057 * acinclude.m4: Correct quoting.
20058 * aclocal.m4: Regenerated.
20060 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20061 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20062 (thread_db_init): Call thread_db_err_str.
20063 * configure.ac: Check for TD_VERSION.
20064 * config.in, configure: Regenerated.
20066 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20068 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20070 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20072 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20073 is not available. Define HAVE_PTRACE_GETREGS if it is.
20074 * config.in, configure: Regenerated.
20075 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20076 * linux-i386-low.c, linux-m68k-low.c: Update to use
20077 HAVE_PTRACE_GETREGS.
20078 * linux-low.c (regsets_fetch_inferior_registers)
20079 (regsets_store_inferior_registers): Only return 0 if we processed
20081 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20082 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20084 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20086 * inferiors.c (struct thread_info): Add gdb_id.
20087 (add_thread): Add gdb_id argument.
20088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20089 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20090 calls to add_thread.
20091 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20092 * server.c (handle_query): Use thread_to_gdb_id.
20093 (handle_v_cont, main): Use gdb_id_to_thread_id.
20094 * server.h (add_thread): Update prototype.
20095 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20098 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20100 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20101 left-padded registers.
20102 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20103 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20105 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20107 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20108 * configure: Regenerate.
20109 * config.in: Regenerate.
20110 * server.h (NEED_DECLARATION_STRERROR):
20111 Replace with !HAVE_DECL_STRERROR.
20113 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20115 * linux-low.c (linux_wait, linux_send_signal): Don't test
20116 an unsigned long variable for > 0 if it could be MAX_ULONG.
20117 * server.c (myresume): Likewise.
20118 * target.c (set_desired_inferior): Likewise.
20120 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20122 * configure.ac: Simplify and improve check for socklen_t.
20123 * configure, config.in: Regenerate.
20125 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20127 * acconfig.h: Remove.
20128 * configure.ac: Add a test for socklen_t. Use three-argument
20129 AC_DEFINE throughout.
20130 * config.in: Regenerated using autoheader 2.59.
20131 * configure: Regenerated.
20133 * gdbreplay.c (socklen_t): Provide a default.
20134 (remote_open): Use socklen_t.
20135 * remote-utils.c (socklen_t): Provide a default.
20136 (remote_open): Use socklen_t.
20137 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20140 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20142 * linux-low.c (linux_read_memory, linux_write_memory)
20143 (linux_read_auxv): Likewise.
20144 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20145 (check_mem_write): Likewise.
20146 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20148 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20149 (registers_from_string, register_data): Likewise.
20150 * server.c (handle_query, main): Likewise.
20151 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20152 (decode_M_packet): Likewise.
20153 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20154 * target.h (struct target_ops): Update read_memory, write_memory,
20156 (read_inferior_memory, write_inferior_memory): Update.
20157 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20158 to unsigned char *.
20159 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20160 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20161 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20162 linux-s390-low.c, linux-sh-low.c: Update for changes in
20163 read_inferior_memory and the_low_target->breakpoint.
20165 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20167 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20168 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20169 * configure.srv: Add powerpc64-*-linux*.
20170 * linux-ppc64-low.c: New file.
20172 2005-05-23 Orjan Friberg <orjanf@axis.com>
20174 * linux-cris-low.c: New file with support for CRIS.
20175 * linux-crisv32-low.c: Ditto for CRISv32.
20176 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20177 (clean): Add reg-cris.c and reg-crisv32.c.
20178 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20179 reg-crisv32.o, and reg-crisv32.c to make rules.
20180 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20181 recognized targets.
20183 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20185 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20186 of sizeof (PTRACE_XFER_TYPE).
20187 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20189 2005-05-12 Orjan Friberg <orjanf@axis.com>
20191 * target.h (struct target_ops): Add insert_watchpoint,
20192 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20193 pointers for hardware watchpoint support.
20194 * linux-low.h (struct linux_target_ops): Ditto.
20195 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20196 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20197 to linux_target_ops.
20198 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20200 * server.c (main): Recognize 'Z' and 'z' packets.
20202 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20204 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20205 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20206 (the_low_target): Add new members.
20208 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20210 * proc-service.c (ps_lgetregs): Search all_processes instead of
20213 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20215 * server.c (start_inferior): Change return type to int.
20216 (attach_inferior): Change sigptr to int *.
20217 (handle_v_cont, handle_v_requests): Change signal to int *.
20218 (main): Change signal to int.
20220 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20222 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20223 * configure.srv: Add m32r*-*-linux*.
20224 * linux-m32r-low.c: New file.
20226 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20228 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20230 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20232 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20233 Take unsigned long arguments for PIDs.
20234 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20235 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20236 (wait_for_sigstop, linux_resume_one_process)
20237 (regsets_fetch_inferior_registers, linux_send_signal)
20238 (linux_read_auxv): Likewise. Update the types of variables holding
20239 PIDs. Update format string specifiers.
20240 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20241 * remote-utils.c (prepare_resume_reply): Likewise.
20242 * server.c (cont_thread, general_thread, step_thread)
20243 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20245 (handle_query): Update format specifiers.
20246 (handle_v_cont, main): Use strtoul for thread IDs.
20247 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20248 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20249 (general_thread, step_thread, thread_from_wait)
20250 (old_thread_from_wait): Update.
20251 * target.h (struct thread_resume): Use unsigned long for THREAD.
20252 (struct target_ops): Use unsigned long for arguments to attach and
20255 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20257 * acinclude.m4: Include bfd/bfd.m4 directly.
20258 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20259 <agriffis@toolchain.org>.
20260 * aclocal.m4, configure: Regenerated.
20262 2005-01-07 Andrew Cagney <cagney@gnu.org>
20264 * configure.ac: Rename configure.in, require autoconf 2.59.
20265 * configure: Re-generate.
20267 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20269 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20270 LIBS when finished.
20271 * aclocal.m4: Regenerated.
20272 * configure: Regenerated.
20274 2004-11-21 Andreas Schwab <schwab@suse.de>
20276 * linux-m68k-low.c (m68k_num_gregs): Define.
20277 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20278 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20279 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20280 (m68k_breakpoint_at): New. Add to the_low_target.
20282 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20283 srv_linux_thread_db to yes.
20285 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20287 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20288 (ARCH_SET_FS): Likewise.
20289 (ARCH_GET_FS): Likewise.
20290 (ARCH_GET_GS): Likewise.
20292 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20294 * linux-i386-low.c (ps_get_thread_area): New.
20295 * linux-x86-64-low.c (ps_get_thread_area): New.
20296 * linux-low.c: Include <sys/syscall.h>.
20297 (linux_kill_one_process): Don't kill the first thread here.
20298 (linux_kill): Kill the first thread here.
20299 (kill_lwp): New function.
20300 (send_sigstop, linux_send_signal): Use it.
20301 * proc-service.c: Clean up #ifdefs.
20302 (fpregset_info): Delete.
20303 (ps_lgetregs): Update and enable implementation.
20304 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20306 * remote-utils.c (struct sym_cache, symbol_cache): New.
20307 (input_interrupt): Print a clearer message.
20308 (async_io_enabled): New variable.
20309 (enable_async_io, disable_async_io): Use it. Update comments.
20310 (look_up_one_symbol): Use the symbol cache.
20311 * thread-db.c (thread_db_look_up_symbols): New function.
20312 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20314 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20316 * configure.in: Test for -rdynamic.
20317 * configure: Regenerated.
20318 * Makefile (INTERNAL_LDFLAGS): New.
20319 (gdbserver, gdbreplay): Use it.
20321 2004-09-02 Andrew Cagney <cagney@gnu.org>
20323 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20325 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20327 * linux-low.c (linux_wait): Clear all_processes list also.
20329 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20331 * linux-low.c: Include <errno.h>. Remove extern declaration of
20334 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20336 * gdbreplay.c, server.h, utils.c: Update copyright years.
20338 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20340 * server.c (main): Print child status or termination signal from
20341 variable 'signal', not 'sig'.
20343 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20345 * linux-low.c (linux_read_memory): Change return type to
20346 int. Check for and return error from ptrace().
20347 * target.c (read_inferior_memory): Change return type to int. Pass
20348 back return status from the_target->read_memory().
20349 * target.h (struct target_ops): Adapt *read_memory() prototype.
20351 (read_inferior_memory): Adapt prototype.
20352 * server.c (main): Return an error packet if
20353 read_inferior_memory() returns an error.
20355 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20357 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20358 Unify with other clean targets.
20360 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20362 * server.c (handle_v_cont): Call set_desired_inferior.
20364 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20366 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20368 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20370 * linux-low.c (linux_wait): Unblock async I/O.
20371 (linux_resume): Block and enable async I/O.
20372 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20373 * server.h (block_async_io, unblock_async_io): Add prototypes.
20375 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20377 * remote-utils.c (remote_open): Print a status notice after
20378 opening a TCP port.
20379 * server.c (attach_inferior): Print a status notice after
20382 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20384 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20386 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20388 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20390 * server.c, target.h: Update copyright years.
20392 2004-02-25 Roland McGrath <roland@redhat.com>
20394 * target.h (struct target_ops): New member `read_auxv'.
20395 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20396 * linux-low.c (linux_read_auxv): New function.
20397 (linux_target_ops): Initialize `read_auxv' member to that.
20399 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20401 Committed by Jim Blandy <jimb@redhat.com>.
20403 * linux-s390-low.c (s390_num_regs): Update.
20404 (s390_regmap): Remove control registers. Use __s390x__ predefine
20405 instead of GPR_SIZE to distiguish s390 and s390x targets.
20407 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20409 * linux-low.c: Update copyright year.
20410 (check_removed_breakpoint): Clear pending_is_breakpoint.
20411 (linux_set_resume_request, linux_queue_one_thread)
20412 (resume_status_pending_p): New functions.
20413 (linux_continue_one_thread): Use process->resume.
20414 (linux_resume): Only resume threads if there are no pending events.
20415 * linux-low.h (struct process_info): Add resume request
20418 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20420 * regcache.c (new_register_cache): Clear the allocated register
20421 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20423 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20425 * linux-low.c (linux_resume): Take a struct thread_resume *
20427 (linux_wait): Update call.
20428 (resume_ptr): New static variable.
20429 (linux_continue_one_thread): Renamed from
20430 linux_continue_one_process. Use resume_ptr.
20431 (linux_resume): Use linux_continue_one_thread.
20432 * server.c (handle_v_cont, handle_v_requests): New functions.
20433 (myresume): New function.
20434 (main): Handle 'v' case.
20435 * target.h (struct thread_resume): New type.
20436 (struct target_ops): Change argument of "resume" to struct
20438 (myresume): Delete macro.
20440 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20442 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20443 (uninstall): Support DESTDIR.
20445 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20447 * configure.srv: Add xscale*linux copy of arm*linux entry.
20449 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20451 * linux-arm-low.c (arm_reinsert_addr): New function.
20452 (the_low_target): Add arm_reinsert_addr.
20454 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20456 * mem-break.c: Remove whitespace at end of file.
20458 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20460 * configure.in: Check whether we need to prototype strerror.
20461 * server.h: Optionally prototype strerror.
20462 * gdbreplay.c (perror_with_name): Use strerror.
20463 * linux-low.c (linux_attach_lwp): Use strerror.
20464 * utils.c (perror_with_name): Use strerror.
20465 * config.in, configure: Regenerated.
20467 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20469 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20470 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20472 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
20474 * Makefile.in (SFILES): Update.
20475 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20476 low-sun3.c: Remove files.
20478 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
20480 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20481 (linux_detach_one_process, linux_detach): New functions.
20482 (linux_target_ops): Add linux_detach.
20483 * server.c (main): Handle 'D' packet.
20484 * target.h (struct target_ops): Add "detach" member.
20485 (detach_inferior): Define.
20487 2003-06-13 Mark Kettenis <kettenis@gnu.org>
20489 From Kelley Cook <kelleycook@wideopenwest.com>:
20490 * configure.srv: Accept i[34567]86 variants.
20492 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
20494 * linux-low.c (linux_wait_for_event): Correct comment typos.
20495 (linux_resume_one_process): Call check_removed_breakpoint.
20496 (linux_send_signal): New function.
20497 (linux_target_ops): Add linux_send_signal.
20498 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20500 * target.h (struct target_ops): Add send_signal.
20502 2003-05-29 Jim Blandy <jimb@redhat.com>
20504 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20505 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20506 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20507 away part of the register's value.
20509 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
20511 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20512 (linux_wait_for_event, linux_init_signals): Likewise.
20514 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
20516 * configure.in: Check for stdlib.h.
20517 * configure: Regenerated.
20518 * config.in: Regenerated.
20520 2003-01-04 Andreas Schwab <schwab@suse.de>
20522 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20524 2003-01-02 Andrew Cagney <ac131313@redhat.com>
20526 * Makefile.in: Remove obsolete code.
20528 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
20530 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20531 defined(PT_FPR0_HI).
20533 2002-11-17 Stuart Hughes <seh@zee2.com>
20535 * linux-arm-low.c (arm_num_regs): Increase.
20536 (arm_regmap): Include status register.
20538 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
20540 * linux-low.c (register_addr): Remove incorrect -1 check.
20542 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
20544 * linux-low.c (linux_create_inferior): Call setpgid. Return
20546 (unstopped_p, linux_signal_pid): Remove.
20547 (linux_target_ops): Remove linux_signal_pid.
20548 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20549 global instead of target method.
20550 * target.h (struct target_ops): Remove signal_pid. Update comment
20551 for create_inferior.
20552 * server.c (signal_pid): New variable.
20553 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
20554 gdbserver. Set the child to be the foreground process group.
20555 (attach_inferior): Set signal_pid.
20557 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
20559 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20561 2002-08-20 Jim Blandy <jimb@redhat.com>
20563 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20566 2002-08-01 Andrew Cagney <cagney@redhat.com>
20568 * Makefile.in: Make chill references obsolete.
20570 2002-07-24 Kevin Buettner <kevinb@redhat.com>
20572 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20573 * configure: Regenerate.
20574 * config.in: Regenerate.
20576 2002-07-09 David O'Brien <obrien@FreeBSD.org>
20578 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20579 (perror_with_name, remote_close, remote_open, expect, play): Static.
20581 2002-07-04 Michal Ludvig <mludvig@suse.cz>
20583 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
20584 byte offsets instead of an array of indexes.
20585 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20587 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
20589 * regcache.c: Add comment.
20591 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
20593 * thread-db.c: New file.
20594 * proc-service.c: New file.
20595 * acinclude.m4: New file.
20596 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20597 proc-service.o, and thread-db.o.
20598 (linux-low.o): Add USE_THREAD_DB.
20599 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20600 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20601 * aclocal.m4: Regenerated.
20602 * config.in: Regenerated.
20603 * configure: Regenerated.
20604 * configure.in: Check for proc_service.h, sys/procfs.h,
20605 thread_db.h, and linux/elf.h headrs.
20606 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20607 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20608 Check for -lthread_db and thread support.
20609 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20610 PowerPC, and SuperH.
20611 * i387-fp.c: Constify arguments.
20612 * i387-fp.h: Likewise.
20613 * inferiors.c: (struct thread_info): Renamed from
20614 `struct inferior_info'. Remove PID member. Use generic inferior
20615 list header. All uses updated.
20616 (inferiors, signal_pid): Removed.
20617 (all_threads): New variable.
20618 (get_thread): Define.
20619 (add_inferior_to_list): New function.
20620 (for_each_inferior): New function.
20621 (change_inferior_id): New function.
20622 (add_inferior): Removed.
20623 (remove_inferior): New function.
20624 (add_thread): New function.
20625 (free_one_thread): New function.
20626 (remove_thread): New function.
20627 (clear_inferiors): Use for_each_inferior and free_one_thread.
20628 (find_inferior): New function.
20629 (find_inferior_id): New function.
20630 (inferior_target_data): Update argument type.
20631 (set_inferior_target_data): Likewise.
20632 (inferior_regcache_data): Likewise.
20633 (set_inferior_regcache_data): Likewise.
20634 * linux-low.c (linux_bp_reinsert): Remove.
20635 (all_processes, stopping_threads, using_thrads)
20636 (struct pending_signals, debug_threads, pid_of): New.
20637 (inferior_pid): Replace with macro.
20638 (struct inferior_linux_data): Remove.
20639 (get_stop_pc, add_process): New functions.
20640 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20641 Use add_process and add_thread.
20642 (linux_attach_lwp): New function, based on old linux_attach. Use
20643 add_process and add_thread. Set stop_expected for new threads.
20644 (linux_attach): New function.
20645 (linux_kill_one_process): New function.
20646 (linux_kill): Kill all LWPs.
20647 (linux_thread_alive): Use find_inferior_id.
20648 (check_removed_breakpoints, status_pending_p): New functions.
20649 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20650 Update. Use WNOHANG. Wait for cloned processes also. Update process
20651 struct for the found process.
20652 (linux_wait_for_event): New function.
20653 (linux_wait): Use it. Support LWPs.
20654 (send_sigstop, wait_for_sigstop, stop_all_processes)
20655 (linux_resume_one_process, linux_continue_one_process): New functions.
20656 (linux_resume): Support LWPs.
20657 (REGISTER_RAW_SIZE): Remove.
20658 (fetch_register): Use register_size instead. Call supply_register.
20659 (usr_store_inferior_registers): Likewise. Call collect_register.
20660 Fix recursive case.
20661 (regsets_fetch_inferior_registers): Improve error message.
20662 (regsets_store_inferior_registers): Add debugging.
20663 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
20664 (unstopped_p, linux_signal_pid): New functions.
20665 (linux_target_ops): Add linux_signal_pid.
20666 (linux_init_signals): New function.
20667 (initialize_low): Call it. Initialize using_threads.
20668 * regcache.c (inferior_regcache_data): Add valid
20670 (get_regcache): Fetch registers lazily. Add fetch argument
20671 and update all callers.
20672 (regcache_invalidate_one, regcache_invalidate): New
20674 (new_register_cache): Renamed from create_register_cache.
20675 Return the new regcache.
20676 (free_register_cache): Change argument to a void *.
20677 (registers_to_string, registers_from_string): Call get_regcache
20678 with fetch flag set.
20679 (register_data): Make static. Pass fetch flag to get_regcache.
20680 (supply_register): Call get_regcache with fetch flag clear.
20681 (collect_register): Call get_regcache with fetch flag set.
20682 (collect_register_as_string): New function.
20683 * regcache.h: Update.
20684 * remote-utils.c (putpkt): Flush after debug output and use
20686 Handle input interrupts while waiting for an ACK.
20687 (input_interrupt): Use signal_pid method.
20688 (getpkt): Flush after debug output and use stderr.
20689 (outreg): Use collect_register_as_string.
20690 (new_thread_notify, dead_thread_notify): New functions.
20691 (prepare_resume_reply): Check using_threads. Set thread_from_wait
20692 and general_thread.
20693 (look_up_one_symbol): Flush after debug output.
20694 * server.c (step_thread, server_waiting): New variables.
20695 (start_inferior): Don't use signal_pid. Update call to mywait.
20696 (attach_inferior): Update call to mywait.
20697 (handle_query): Handle qfThreadInfo and qsThreadInfo.
20698 (main): Don't fetch/store registers explicitly. Use
20699 set_desired_inferior. Support proposed ``Hs'' packet. Update
20701 * server.h: Update.
20702 (struct inferior_list, struct_inferior_list_entry): New.
20703 * target.c (set_desired_inferior): New.
20704 (write_inferior_memory): Constify.
20705 (mywait): New function.
20706 * target.h: Update.
20707 (struct target_ops): New signal_pid method.
20708 (mywait): Removed macro, added prototype.
20710 * linux-low.h (regset_func): Removed.
20711 (regset_fill_func, regset_store_func): New.
20712 (enum regset_type): New.
20713 (struct regset_info): Add type field. Use new operation types.
20714 (struct linux_target_ops): stop_pc renamed to get_pc.
20715 Add decr_pc_after_break and breakpoint_at.
20716 (get_process, get_thread_proess, get_process_thread)
20717 (strut process_info, all_processes, linux_attach_lwp)
20718 (thread_db_init): New.
20720 * linux-arm-low.c (arm_get_pc, arm_set_pc,
20721 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
20722 (the_low_target): Add new members.
20723 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
20724 (i386_store_fpxregset): Constify.
20725 (target_regsets): Add new kind identifier.
20726 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
20727 (i386_set_pc): Add debugging.
20728 (i386_breakpoint_at): New function.
20729 (the_low_target): Add new members.
20730 * linux-mips-low.c (mips_get_pc, mips_set_pc)
20731 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
20732 (mips_breakpoint_at): New.
20733 (the_low_target): Add new members.
20734 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
20735 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
20736 (the_low_target): Add new members.
20737 * linux-sh-low.c (sh_get_pc, sh_set_pc)
20738 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
20739 (the_low_target): Add new members.
20740 * linux-x86-64-low.c (target_regsets): Add new kind
20743 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
20745 From Martin Pool <mbp@samba.org>:
20746 * server.c (gdbserver_usage): New function.
20749 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
20751 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
20752 stop_at -> stop_pc.
20754 2002-05-04 Andrew Cagney <ac131313@redhat.com>
20756 * Makefile.in: Remove obsolete code.
20758 2002-04-24 Michal Ludvig <mludvig@suse.cz>
20760 * linux-low.c (regsets_fetch_inferior_registers),
20761 (regsets_store_inferior_registers): Removed cast to int from
20763 * regcache.h: Added declaration of struct inferior_info.
20765 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20767 * inferiors.c (struct inferior_info): Add regcache_data.
20768 (add_inferior): Call create_register_cache.
20769 (clear_inferiors): Call free_register_cache.
20770 (inferior_regcache_data, set_inferior_regcache_data): New functions.
20771 * regcache.c (struct inferior_regcache_data): New.
20772 (registers): Remove.
20773 (get_regcache): New function.
20774 (create_register_cache, free_register_cache): New functions.
20775 (set_register_cache): Don't initialize the register cache here.
20776 (registers_to_string, registers_from_string, register_data): Call
20778 * regcache.h: Add prototypes.
20779 * server.h: Likewise.
20781 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20783 * mem-break.c: New file.
20784 * mem-break.h: New file.
20785 * Makefile.in: Add mem-break.o rule; update server.h
20787 * inferiors.c (struct inferior_info): Add target_data
20789 (clear_inferiors): Free target_data member if set.
20790 (inferior_target_data, set_inferior_target_data): New functions.
20791 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
20792 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
20793 * linux-low.c (linux_bp_reinsert): New variable.
20794 (struct inferior_linux_data): New.
20795 (linux_create_inferior): Use set_inferior_target_data.
20796 (linux_attach): Likewise. Call add_inferior.
20797 (linux_wait_for_one_inferior): New function.
20798 (linux_wait): Call it.
20799 (linux_write_memory): Add const.
20800 (initialize_low): Call set_breakpoint_data.
20801 * linux-low.h (struct linux_target_ops): Add breakpoint
20803 * server.c (attach_inferior): Remove extra add_inferior
20805 * server.h: Include mem-break.h. Update inferior.c
20807 * target.c (read_inferior_memory)
20808 (write_inferior_memory): New functions.
20809 * target.h (read_inferior_memory)
20810 (write_inferior_memory): Change macros to prototypes.
20811 (struct target_ops): Update comments. Add const to write_memory
20814 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
20816 * linux-low.c (usr_store_inferior_registers): Support
20817 registers which are allowed to fail to store.
20818 * linux-low.h (linux_target_ops): Likewise.
20819 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
20820 (ppc_cannot_store_register): FPSCR may not be storable.
20822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20824 * server.h: Include <string.h> if HAVE_STRING_H.
20825 * ChangeLog: Correct paths in last ChangeLog entry.
20827 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20829 * linux-low.h: Remove obsolete prototypes.
20830 (struct linux_target_ops): New.
20831 (extern the_low_target): New.
20832 * linux-low.c (num_regs, regmap): Remove declarations.
20833 (register_addr): Use the_low_target explicitly.
20834 (fetch_register): Likewise.
20835 (usr_fetch_inferior_registers): Likewise.
20836 (usr_store_inferior_registers): Likewise.
20837 * linux-arm-low.c (num_regs): Remove.
20838 (arm_num_regs): Define.
20839 (arm_regmap): Renamed from regmap, made static.
20840 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
20842 (arm_cannot_store_register): Renamed from cannot_store_register,
20844 (the_low_target): New.
20845 * linux-i386-low.c (num_regs): Remove.
20846 (i386_num_regs): Define.
20847 (i386_regmap): Renamed from regmap, made static.
20848 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
20850 (i386_cannot_store_register): Renamed from cannot_store_register,
20852 (the_low_target): New.
20853 * linux-ia64-low.c (num_regs): Remove.
20854 (ia64_num_regs): Define.
20855 (ia64_regmap): Renamed from regmap, made static.
20856 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
20858 (ia64_cannot_store_register): Renamed from cannot_store_register,
20860 (the_low_target): New.
20861 * linux-m68k-low.c (num_regs): Remove.
20862 (m68k_num_regs): Define.
20863 (m68k_regmap): Renamed from regmap, made static.
20864 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
20866 (m68k_cannot_store_register): Renamed from cannot_store_register,
20868 (the_low_target): New.
20869 * linux-mips-low.c (num_regs): Remove.
20870 (mips_num_regs): Define.
20871 (mips_regmap): Renamed from regmap, made static.
20872 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
20874 (mips_cannot_store_register): Renamed from cannot_store_register,
20876 (the_low_target): New.
20877 * linux-ppc-low.c (num_regs): Remove.
20878 (ppc_num_regs): Define.
20879 (ppc_regmap): Renamed from regmap, made static.
20880 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
20882 (ppc_cannot_store_register): Renamed from cannot_store_register,
20884 (the_low_target): New.
20885 * linux-s390-low.c (num_regs): Remove.
20886 (s390_num_regs): Define.
20887 (s390_regmap): Renamed from regmap, made static.
20888 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
20890 (s390_cannot_store_register): Renamed from cannot_store_register,
20892 (the_low_target): New.
20893 * linux-sh-low.c (num_regs): Remove.
20894 (sh_num_regs): Define.
20895 (sh_regmap): Renamed from regmap, made static.
20896 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
20898 (sh_cannot_store_register): Renamed from cannot_store_register,
20900 (the_low_target): New.
20901 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
20902 (the_low_target): New.
20904 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20906 * Makefile.in: Add stamp-h target.
20907 * configure.in: Create stamp-h.
20908 * configure: Regenerated.
20910 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20912 * inferiors.c: New file.
20913 * target.c: New file.
20914 * target.h: New file.
20915 * Makefile.in: Add target.o and inferiors.o. Update
20917 * linux-low.c (inferior_pid): New static variable,
20918 moved from server.c.
20919 (linux_create_inferior): Renamed from create_inferior.
20920 Call add_inferior. Return 0 on success instead of a PID.
20921 (linux_attach): Renamed from myattach.
20922 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
20923 (linux_thread_alive): Renamed from mythread_alive.
20924 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
20926 (linux_resume): Renamed from myresume. Add missing ``return 0''.
20927 (regsets_store_inferior_registers): Correct error message.
20928 Add missing ``return 0''.
20929 (linux_fetch_registers): Renamed from fetch_inferior_registers.
20930 (linux_store_registers): Renamed from store_inferior_registers.
20931 (linux_read_memory): Renamed from read_inferior_memory.
20932 (linux_write_memory): Renamed from write_inferior_memory.
20933 (linux_target_ops): New structure.
20934 (initialize_low): Call set_target_ops ().
20935 * remote-utils.c (unhexify): New function.
20936 (hexify): New function.
20937 (input_interrupt): Send signals to ``signal_pid''.
20938 * server.c (inferior_pid): Remove.
20939 (start_inferior): Update create_inferior call.
20940 (attach_inferior): Call add_inferior.
20941 (handle_query): New function.
20942 (main): Call handle_query for `q' packets.
20943 * server.h: Include "target.h". Remove obsolete prototypes.
20944 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
20946 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20948 * Makefile.in: Add WARN_CFLAGS. Update configury
20950 * configure.in: Check for <string.h>
20951 * configure: Regenerate.
20952 * config.in: Regenerate.
20953 * gdbreplay.c: Include needed system headers.
20954 (remote_open): Remove strchr prototype.
20955 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
20956 * regcache.c (supply_register): Change buf argument to const void *.
20957 (supply_register_by_name): Likewise.
20958 (collect_register): Change buf argument to void *.
20959 (collect_register_by_name): Likewise.
20960 * regcache.h: Add missing prototypes.
20961 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
20962 * server.c (handle_query): New function.
20963 (attached): New static variable, moved out of main.
20964 (main): Quiet longjmp clobber warnings.
20965 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
20966 * utils.c (error): Remove NORETURN.