1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's process_qsupported op into a method
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_process_qsupported): Update the macro.
9 * target.cc (process_target::process_qsupported): Define.
11 Update the derived classes and callers below.
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_process_qsupported): Turn into ...
15 (linux_process_target::process_qsupported): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
21 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
23 Turn process_stratum_target's read_loadmap op into a method of
26 * target.h (struct process_stratum_target): Remove the target op.
27 (class process_target): Add the target op. Also add
28 'supports_read_loadmap'.
29 * target.cc (process_target::read_loadmap): Define.
30 (process_target::supports_read_loadmap): Define.
32 Update the derived classes and callers below.
34 * server.cc (handle_qxfer_fdpic): Update.
35 (handle_query): Update.
36 * linux-low.cc (linux_target_ops): Update.
37 (linux_process_target::supports_read_loadmap): Define.
38 (linux_read_loadmap): Turn into ...
39 (linux_process_target::read_loadmap): ... this.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
45 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
47 Turn process_stratum_target's core_of_thread op into a method of
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op.
52 (target_core_of_thread): Update the macro.
53 * target.cc (process_target::core_of_thread): Define.
55 Update the derived classes and callers below.
57 * linux-low.cc (linux_target_ops): Update.
58 (linux_process_target::core_of_thread): Define.
59 * linux-low.h (class linux_process_target): Update.
60 * lynx-low.cc (lynx_target_ops): Update.
61 * nto-low.cc (nto_target_ops): Update.
62 * win32-low.cc (win32_target_ops): Update.
64 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
66 Turn process_stratum_target's handle_monitor_command op into a
67 method of process_target.
69 * target.h (struct process_stratum_target): Remove the target op.
70 (class process_target): Add the target op.
71 (target_handle_monitor_command): Update the macro.
72 * target.cc (process_target::handle_monitor_command): Define.
74 Update the derived classes and callers below.
76 * server.cc (handle_query): Update.
77 * linux-low.cc (linux_target_ops): Update.
78 (linux_process_target::handle_monitor_command): Define.
79 * linux-low.h (class linux_process_target): Update.
80 * lynx-low.cc (lynx_target_ops): Update.
81 * nto-low.cc (nto_target_ops): Update.
82 * win32-low.cc (win32_target_ops): Update.
84 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
86 Turn process_stratum_target's handle_new_gdb_connection op into a
87 method of process_target.
89 * target.h (struct process_stratum_target): Remove the target op.
90 (class process_target): Add the target op.
91 (target_handle_new_gdb_connection): Update the macro.
92 * target.cc (process_target::handle_new_gdb_connection): Define.
94 Update the derived classes and callers below.
96 * linux-low.cc (linux_target_ops): Update.
97 (linux_handle_new_gdb_connection): Turn into ...
98 (linux_process_target::handle_new_gdb_connection): ... this.
99 * linux-low.h (class linux_process_target): Update.
100 * lynx-low.cc (lynx_target_ops): Update.
101 * nto-low.cc (nto_target_ops): Update.
102 * win32-low.cc (win32_target_ops): Update.
104 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
106 Turn process_stratum_target's supports_fork_events,
107 supports_vfork_events, and supports_exec_events ops into methods
110 * target.h (struct process_stratum_target): Remove the target ops.
111 (class process_target): Add the target ops.
112 (target_supports_fork_events): Update the macro.
113 (target_supports_vfork_events): Update the macro.
114 (target_supports_exec_events): Update the macro.
115 * target.cc (process_target::supports_fork_events): Define.
116 (process_target::supports_vfork_events): Define.
117 (process_target::supports_exec_events): Define.
119 Update the derived classes and callers below.
121 * linux-low.cc (linux_target_ops): Update.
122 (linux_supports_fork_events): Turn into ...
123 (linux_process_target::supports_fork_events): ... this.
124 (linux_supports_vfork_events): Turn into ...
125 (linux_process_target::supports_vfork_events): ... this.
126 (linux_supports_exec_events): Turn into ...
127 (linux_process_target::supports_exec_events): ... this.
128 * linux-low.h (class linux_process_target): Update.
129 * lynx-low.cc (lynx_target_ops): Update.
130 * nto-low.cc (nto_target_ops): Update.
131 * win32-low.cc (win32_target_ops): Update.
133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
135 Turn process_stratum_target's supports_multi_process op into a
136 method of process_target.
138 * target.h (struct process_stratum_target): Remove the target op.
139 (class process_target): Add the target op.
140 * target.cc (process_target::supports_multi_process): Define.
141 (target_supports_multi_process): Update.
143 Update the derived classes and callers below.
145 * linux-low.cc (linux_target_ops): Update.
146 (linux_supports_multi_process): Turn into ...
147 (linux_process_target::supports_multi_process): ... this.
148 * linux-low.h (class linux_process_target): Update.
149 * lynx-low.cc (lynx_target_ops): Update.
150 * nto-low.cc (nto_target_ops): Update.
151 * win32-low.cc (win32_target_ops): Update.
153 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
155 Turn process_stratum_target's supports_non_stop, async, and
156 start_non_stop ops into methods of process_target.
158 * target.h (struct process_stratum_target): Remove the target ops.
159 (class process_target): Add the target ops.
160 (target_supports_non_stop): Update the macro.
161 (target_async): Update the macro.
162 (start_non_stop): Remove declaration.
163 * target.cc (process_target::supports_non_stop): Define.
164 (process_target::async): Define.
165 (process_target::start_non_stop): Define.
166 (start_non_stop): Remove.
168 Update the derived classes and callers below.
170 * server.cc (handle_qxfer_siginfo): Update.
171 (handle_query): Update.
172 * linux-low.cc (linux_target_ops): Update.
173 (linux_supports_non_stop): Turn into ...
174 (linux_process_target::supports_non_stop): ... this.
175 (linux_async): Turn into ...
176 (linux_process_target::async): ... this.
177 (linux_start_non_stop): Turn into ...
178 (linux_process_target::start_non_stop): ... this.
179 * linux-low.h (class linux_process_target): Update.
180 * lynx-low.cc (lynx_target_ops): Update.
181 * nto-low.cc (nto_target_ops): Update.
182 (nto_supports_non_stop): Remove; rely on the default behavior
184 * win32-low.cc (win32_target_ops): Update.
186 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
188 Turn process_stratum_target's qxfer_siginfo op into a method of
191 * target.h (struct process_stratum_target): Remove the target op.
192 (class process_target): Add the target op. Also add
193 'supports_qxfer_siginfo'.
194 * target.cc (process_target::qxfer_siginfo): Define.
195 (process_target::supports_qxfer_siginfo): Define.
197 Update the derived classes and callers below.
199 * server.cc (handle_qxfer_siginfo): Update.
200 (handle_query): Update.
201 * linux-low.cc (linux_target_ops): Update.
202 (linux_process_target::supports_qxfer_siginfo): Define.
203 (linux_xfer_siginfo): Turn into ...
204 (linux_process_target::qxfer_siginfo): ... this.
205 * linux-low.h (class linux_process_target): Update.
206 * lynx-low.cc (lynx_target_ops): Update.
207 * nto-low.cc (nto_target_ops): Update.
208 * win32-low.cc (win32_target_ops): Update.
210 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
212 Turn process_stratum_target's qxfer_osdata op into a method of
215 * target.h (struct process_stratum_target): Remove the target op.
216 (class process_target): Add the target op. Also add
217 'supports_qxfer_osdata'.
218 * target.cc (process_target::qxfer_osdata): Define.
219 (process_target::supports_qxfer_osdata): Define.
221 Update the derived classes and callers below.
223 * server.cc (handle_qxfer_osdata): Update.
224 (handle_query): Update.
225 * linux-low.cc (linux_target_ops): Update.
226 (linux_process_target::supports_qxfer_osdata): Define.
227 (linux_qxfer_osdata): Turn into ...
228 (linux_process_target::qxfer_osdata): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 * win32-low.cc (win32_target_ops): Update.
234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
236 Turn process_stratum_target's hostio_last_error op into a
237 method of process_target.
239 * target.h (struct process_stratum_target): Remove the target op.
240 (class process_target): Add the target op.
241 * target.cc: Add "hostio.h" to includes.
242 (process_target::hostio_last_error): Define.
244 Update the derived classes and callers below.
246 * hostio.cc (hostio_error): Update.
247 * linux-low.cc: Remove "hostio.h" from includes.
248 (linux_target_ops): Update.
249 * lynx-low.cc (lynx_target_ops): Update.
250 * nto-low.cc (nto_target_ops): Update.
251 * win32-low.h (class win32_process_target): Update.
252 * win32-low.cc (win32_target_ops): Update.
253 (wince_hostio_last_error): Turn into ...
254 (win32_process_target::hostio_last_error): ... this.
256 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
258 Turn process_stratum_target's get_tls_address op into a method of
261 * target.h (struct process_stratum_target): Remove the target op.
262 (class process_target): Add the target op. Also add
263 'supports_get_tls_address'.
264 * target.cc (process_target::get_tls_address): Define.
265 (process_target::supports_get_tls_address): Define.
267 Update the derived classes and callers below.
269 * server.cc (handle_query): Update.
270 * linux-low.cc (linux_target_ops): Update.
271 (linux_process_target::supports_get_tls_address): Define.
272 (linux_process_target::get_tls_address): Define.
273 * linux-low.h (class linux_process_target): Update.
274 * lynx-low.cc (lynx_target_ops): Update.
275 * nto-low.cc (nto_target_ops): Update.
276 * win32-low.cc (win32_target_ops): Update.
278 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
280 Turn process_stratum_target's read_offsets op into a method of
283 * target.h (struct process_stratum_target): Remove the target op.
284 (class process_target): Add the target op. Also add
285 'supports_read_offsets'.
286 * target.cc (process_target::read_offsets): Define.
287 (process_target::supports_read_offsets): Define.
289 Update the derived classes and callers below.
291 * server.cc (handle_query): Update.
292 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
293 (linux_target_ops): Update.
294 (linux_process_target::supports_read_offsets): Define.
295 (linux_read_offsets): Turn into ...
296 (linux_process_target::read_offsets): ... this.
297 * linux-low.h (class linux_process_target): Update.
298 * lynx-low.cc (lynx_target_ops): Update.
299 * nto-low.cc (nto_target_ops): Update.
300 * win32-low.cc (win32_target_ops): Update.
302 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
304 Turn process_stratum_target's stopped_by_watchpoint and
305 stopped_data_address ops into methods of process_target.
307 * target.h (struct process_stratum_target): Remove the target ops.
308 (class process_target): Add the target ops.
309 * target.cc (process_target::stopped_by_watchpoint): Define.
310 (process_target::stopped_data_address): Define.
312 Update the derived classes and callers below.
314 * remote-utils.cc (prepare_resume_reply): Update.
315 * linux-low.cc (linux_target_ops): Update.
316 (linux_stopped_by_watchpoint): Turn into ...
317 (linux_process_target::stopped_by_watchpoint): ... this.
318 (linux_stopped_data_address): Turn into ...
319 (linux_process_target::stopped_data_address): ... this.
320 * linux-low.h (class linux_process_target): Update.
321 * lynx-low.cc (lynx_target_ops): Update.
322 * nto-low.cc (nto_target_ops): Update.
323 (nto_stopped_by_watchpoint): Turn into ...
324 (nto_process_target::stopped_by_watchpoint): ... this.
325 (nto_stopped_data_address): Turn into ...
326 (nto_process_target::stopped_data_address): ... this.
327 * nto-low.h (class nto_process_target): Update.
328 * win32-low.cc (win32_target_ops): Update.
329 (win32_stopped_by_watchpoint): Turn into ...
330 (win32_process_target::stopped_by_watchpoint): ... this.
331 (win32_stopped_data_address): Turn into ...
332 (win32_process_target::stopped_data_address): ... this.
333 * win32-low.h (class win32_process_target): Update.
335 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
337 Turn process_stratum_target's supports_hardware_single_step op into
338 a method of process_target.
340 * target.h (struct process_stratum_target): Remove the target op.
341 (class process_target): Add the target op.
342 (target_supports_hardware_single_step): Update the macro.
343 (target_can_do_hardware_single_step): Remove declaration.
344 * target.cc (process_target::supports_hardware_single_step): Define.
345 (target_can_do_hardware_single_step): Remove.
347 Update the derived classes and callers below.
349 * linux-low.h (class linux_process_target): Update.
350 * linux-low.cc (linux_target_ops): Update.
351 (linux_supports_hardware_single_step): Turn into ...
352 (linux_process_target::supports_hardware_single_step): ... this.
353 * lynx-low.h (class lynx_process_target): Update.
354 * lynx-low.cc (lynx_target_ops): Update.
355 (lynx_process_target::supports_hardware_single_step): Define.
356 * nto-low.h (class nto_process_target): Update.
357 * nto-low.cc (nto_target_ops): Update.
358 (nto_process_target::supports_hardware_single_step): Define.
359 * win32-low.h (class win32_process_target): Update.
360 * win32-low.cc (win32_target_ops): Update.
361 (win32_process_target::supports_hardware_single_step): Define.
363 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
365 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
366 ops into methods of process_target.
368 * target.h (struct process_stratum_target): Remove the target ops.
369 (class process_target): Add the target ops.
370 (target_stopped_by_hw_breakpoint): Update the macro.
371 (target_supports_stopped_by_hw_breakpoint): Update the macro.
372 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
373 (process_target::supports_stopped_by_hw_breakpoint): Define.
375 Update the derived classes and callers below.
377 * linux-low.cc (linux_target_ops): Update.
378 (linux_stopped_by_hw_breakpoint): Turn into ...
379 (linux_process_target::stopped_by_hw_breakpoint): ... this.
380 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
381 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
382 * linux-low.h (class linux_process_target): Update.
383 * lynx-low.cc (lynx_target_ops): Update.
384 * nto-low.cc (nto_target_ops): Update.
385 * win32-low.cc (win32_target_ops): Update.
387 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
389 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
390 ops into methods of process_target.
392 * target.h (struct process_stratum_target): Remove the target ops.
393 (class process_target): Add the target ops.
394 (target_stopped_by_sw_breakpoint): Update the macro.
395 (target_supports_stopped_by_sw_breakpoint): Update the macro.
396 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
397 (process_target::supports_stopped_by_sw_breakpoint): Define.
399 Update the derived classes and callers below.
401 * linux-low.cc (linux_target_ops): Update.
402 (linux_stopped_by_sw_breakpoint): Turn into ...
403 (linux_process_target::stopped_by_sw_breakpoint): ... this.
404 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
405 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
406 * linux-low.h (class linux_process_target): Update.
407 * lynx-low.cc (lynx_target_ops): Update.
408 * nto-low.cc (nto_target_ops): Update.
409 * win32-low.cc (win32_target_ops): Update.
411 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
413 Turn process_stratum_target's insert_point and remove_point ops
414 into methods of process_target.
416 * target.h (struct process_stratum_target): Remove the target ops.
417 (class process_target): Add the target ops.
418 * target.cc (process_target::insert_point): Define.
419 (process_target::remove_point): Define.
421 Update the derived classes and callers below.
423 * mem-break.cc (set_raw_breakpoint_at): Update.
424 (delete_raw_breakpoint): Update.
425 (uninsert_raw_breakpoint): Update.
426 (reinsert_raw_breakpoint): Update.
427 * linux-low.cc (linux_target_ops): Update.
428 (linux_insert_point): Turn into ...
429 (linux_process_target::insert_point): ... this.
430 (linux_remove_point): Turn into ...
431 (linux_process_target::remove_point): ... this.
432 * linux-low.h (class linux_process_target): Update.
433 * lynx-low.cc (lynx_target_ops): Update.
434 * nto-low.cc (nto_target_ops): Update.
435 (nto_insert_point): Turn into ...
436 (nto_process_target::insert_point): ... this.
437 (nto_remove_point): Turn into ...
438 (nto_process_target::remove_point): ... this.
439 * nto-low.h (class nto_process_target): Update.
440 * win32-low.cc (win32_target_ops): Update.
441 (win32_insert_point): Turn into ...
442 (win32_process_target::insert_point): ... this.
443 (win32_remove_point): Turn into ...
444 (win32_process_target::remove_point): ... this.
445 * win32-low.h (class win32_process_target): Update.
447 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
449 Turn process_stratum_target's supports_z_point_type op into a
450 method of process_target.
452 * target.h (struct process_stratum_target): Remove the target op.
453 (class process_target): Add the target op.
454 * target.cc (process_target::supports_z_point_type): Define.
456 Update the derived classes and callers below.
458 * mem-break.cc (z_type_supported): Update.
459 * linux-low.cc (linux_target_ops): Update.
460 (linux_supports_z_point_type): Turn into ...
461 (linux_process_target::supports_z_point_type): ... this.
462 * linux-low.h (class linux_process_target): Update.
463 * lynx-low.cc (lynx_target_ops): Update.
464 * nto-low.cc (nto_target_ops): Update.
465 (nto_supports_z_point_type): Turn into ...
466 (nto_process_target::supports_z_point_type): ... this.
467 * nto-low.h (class nto_process_target): Update.
468 * win32-low.cc (win32_target_ops): Update.
469 (win32_supports_z_point_type): Turn into ...
470 (win32_process_target::supports_z_point_type): ... this.
471 * win32-low.h (class win32_process_target): Update.
473 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
475 Turn process_stratum_target's read_auxv op into a method of
478 * target.h (class process_stratum_target): Remove the target op.
479 (struct process_target): Add the target op. Also add
480 'supports_read_auxv'.
481 * target.cc (process_target::read_auxv): Define.
482 (process_target::supports_read_auxv): Define.
484 Update the derived classes and callers below.
486 * server.cc (handle_qxfer_auxv): Update.
487 (handle_query): Update.
488 * linux-low.cc (linux_target_ops): Update.
489 (linux_process_target::supports_read_auxv): Define.
490 (linux_read_auxv): Turn into ...
491 (linux_process_target::read_auxv): ... this.
492 * linux-low.h (class linux_process_target): Update.
493 * lynx-low.cc (lynx_target_ops): Update.
494 * nto-low.cc (nto_target_ops): Update.
495 (nto_process_target::supports_read_auxv): Define.
496 (nto_read_auxv): Turn into ...
497 (nto_process_target::read_auxv): ... this.
498 * nto-low.h (class nto_process_target): Update.
499 * win32-low.cc (win32_target_ops): Update.
501 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
503 Turn process_stratum_target's request_interrupt op into a method of
506 * target.h (struct process_stratum_target): Remove the target op.
507 (class process_target): Add the target op.
509 Update the derived classes and callers below.
511 * remote-utils.cc (putpkt_binary_1): Update.
512 (input_interrupt): Update.
514 * server.cc (handle_v_requests): Update.
515 * linux-low.cc (linux_target_ops): Update.
516 (linux_request_interrupt): Turn into ...
517 (linux_process_target::request_interrupt): ... this.
518 * linux-low.h (class linux_process_target): Update.
519 * lynx-low.cc (lynx_target_ops): Update.
520 (lynx_request_interrupt): Turn into ...
521 (lynx_process_target::request_interrupt): ... this.
522 * lynx-low.h (class lynx_process_target): Update.
523 * nto-low.cc (nto_target_ops): Update.
524 (nto_request_interrupt): Turn into ...
525 (nto_process_target::request_interrupt): ... this.
526 * nto-low.h (class nto_process_target): Update.
527 * win32-low.cc (win32_target_ops): Update.
528 (win32_request_interrupt): Turn into ...
529 (win32_process_target::request_interrupt): ... this.
530 * win32-low.h (class win32_process_target): Update.
532 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
534 Turn process_stratum_target's look_up_symbols op into a method of
537 * target.h (struct process_stratum_target): Remove the target op.
538 (class process_target): Add the target op.
539 * target.cc (process_target::look_up_symbols): Define.
541 Update the derived classes and callers below.
543 * server.cc (handle_query): Update.
544 * linux-low.cc (linux_target_ops): Update.
545 (linux_look_up_symbols): Turn into ...
546 (linux_process_target::look_up_symbols): ... this.
547 * linux-low.h (class linux_process_target): Update.
548 * lynx-low.cc (lynx_target_ops): Update.
549 * nto-low.cc (nto_target_ops): Update.
550 * win32-low.cc (win32_target_ops): Update.
552 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
554 Turn process_stratum_target's read_memory and write_memory
555 ops into methods of process_target.
557 * target.h (struct process_stratum_target): Remove the target ops.
558 (class process_target): Add the target ops.
560 Update the derived classes and callers below.
562 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
563 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
564 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
565 (arm_get_syscall_trapinfo): Update.
566 * linux-cris-low.cc (cris_breakpoint_at): Update.
567 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
568 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
569 * linux-mips-low.cc (mips_breakpoint_at): Update.
570 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
571 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
572 * linux-sh-low.cc (sh_breakpoint_at): Update.
573 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
574 (sparc_store_gregset_from_stack): Update.
575 (sparc_breakpoint_at): Update.
576 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
577 * linux-tile-low.cc (tile_breakpoint_at): Update.
578 * linux-x86-low.cc (x86_breakpoint_at): Update.
579 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
580 * mem-brea.cc (insert_memory_breakpoint): Update.
581 (validate_inserted_breakpoint): Update.
582 * target.cc (read_inferior_memory): Update.
583 (target_write_memory): Update.
584 * linux-low.cc (linux_target_ops): Update.
585 (linux_read_memory): Make a wrapper around the read_memory target
587 (linux_process_target::read_memory): Rename from linux_read_memory.
588 (linux_write_memory): Turn into ...
589 (linux_process_target::write_memory): ... this.
590 * linux-low.h (class linux_process_target): Update.
591 * lynx-low.cc (lynx_target_ops): Update.
592 (lynx_read_memory): Turn into ...
593 (lynx_process_target::read_memory): ... this.
594 (lynx_write_memory): Turn into ...
595 (lynx_process_target::write_memory): ... this.
596 * lynx-low.h (class lynx_process_target): Update.
597 * nto-low.cc (nto_target_ops): Update.
598 (nto_read_memory): Turn into ...
599 (nto_process_target::read_memory): ... this.
600 (nto_write_memory): Turn into ...
601 (nto_process_target::write_memory): ... this.
602 * nto-low.h (class nto_process_target): Update.
603 * win32-low.cc (win32_target_ops): Update.
604 (win32_read_inferior_memory): Turn into ...
605 (win32_process_target::read_memory): ... this.
606 (win32_write_inferior_memory): Turn into ...
607 (win32_process_target::write_memory): ... this.
608 * win32-low.h (class win32_process_target): Update.
610 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
612 Turn process_stratum_target's prepare_to_access_memory and
613 done_accessing_memory ops into methods of process_target.
615 * target.h (struct process_stratum_target): Remove the target ops.
616 (class process_target): Add the target ops.
617 * target.cc (process_target::prepare_to_access_memory): Define.
618 (process_target::done_accessing_memory): Define.
619 (prepare_to_access_memory): Update.
620 (done_accessing_memory): Update.
622 Update the derived classes and callers below.
624 * linux-low.cc (linux_target_ops): Update.
625 (linux_prepare_to_access_memory): Turn into ...
626 (linux_process_target::prepare_to_access_memory): ... this.
627 (linux_done_accessing_memory): Turn into ...
628 (linux_process_target::done_accessing_memory): ... this.
629 * linux-low.h (class linux_process_target): Update.
630 * lynx-low.cc (lynx_target_ops): Update.
631 * nto-low.cc (nto_target_ops): Update.
632 * win32-low.cc (win32_target_ops): Update.
634 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
636 Turn process_stratum_target's fetch_registers and store_registers
637 ops into methods of process_target.
639 * target.h (struct process_stratum_target): Remove the target ops.
640 (class process_target): Add the target ops.
641 (fetch_inferior_registers): Update the macro.
642 (store_inferior_registers): Update the macro.
644 Update the derived classes and callers below.
646 * linux-low.cc (linux_target_ops): Update.
647 (linux_fetch_registers): Turn into ...
648 (linux_process_target::fetch_registers): ... this.
649 (linux_store_registers): Turn into ...
650 (linux_process_target::store_registers): ... this.
651 * linux-low.h (class linux_process_target): Update.
652 * lynx-low.cc (lynx_target_ops): Update.
653 (lynx_fetch_registers): Turn into ...
654 (lynx_process_target::fetch_registers): ... this.
655 (lynx_store_registers): Turn into ...
656 (lynx_process_target::store_registers): ... this.
657 * lynx-low.h (class lynx_process_target): Update.
658 * nto-low.cc (nto_target_ops): Update.
659 (nto_fetch_registers): Turn into ...
660 (nto_process_target::fetch_registers): ... this.
661 (nto_store_registers): Turn into ...
662 (nto_process_target::store_registers): ... this.
663 * nto-low.h (class nto_process_target): Update.
664 * win32-low.cc (win32_target_ops): Update.
665 (win32_fetch_inferior_registers): Turn into ...
666 (win32_process_target::fetch_registers): ... this.
667 (win32_store_inferior_registers): Turn into ...
668 (win32_process_target::store_registers): ... this.
669 * win32-low.h (class win32_process_target): Update.
671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
673 Turn process_stratum_target's wait op into a method of
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op.
679 Update the derived classes and callers below.
681 * target.cc (target_wait): Update.
682 * linux-low.cc (linux_target_ops): Update.
683 (linux_wait): Turn into ...
684 (linux_process_target::wait): ... this.
685 * linux-low.h (class linux_process_target): Update.
686 * lynx-low.cc (lynx_target_ops): Update.
687 (lynx_wait): Turn into ...
688 (lynx_process_target::wait): ... this.
689 * lynx-low.h (class lynx_process_target): Update.
690 * nto-low.cc (nto_target_ops): Update.
691 (nto_wait): Turn into ...
692 (nto_process_target::wait): ... this.
693 * nto-low.h (class nto_process_target): Update.
694 * win32-low.cc (win32_target_ops): Update.
695 (win32_wait): Turn into ...
696 (win32_process_target::wait): ... this.
697 (do_initial_child_stuff): Update.
698 * win32-low.h (class win32_process_target): Update.
700 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
702 Turn process_stratum_target's resume op into a method of
705 * target.h (struct process_stratum_target): Remove the target op.
706 (class process_target): Add the target op.
708 Update the derived classes and callers below.
710 * server.cc (resume): Update.
711 * target.cc (target_stop_and_wait): Update.
712 (target_continue_no_signal): Update.
713 (target_continue): Update.
714 * linux-low.cc (linux_target_ops): Update.
715 (linux_resume): Turn into ...
716 (linux_process_target::resume): ... this.
717 * linux-low.h (class linux_process_target): Update.
718 * lynx-low.cc (lynx_target_ops): Update.
719 (lynx_resume): Turn into ...
720 (lynx_process_target::resume): ... this.
721 * lynx-low.h (class lynx_process_target): Update.
722 * nto-low.cc (nto_target_ops): Update.
723 (nto_resume): Turn into ...
724 (nto_process_target::resume): ... this.
725 * nto-low.h (class nto_process_target): Update.
726 * win32-low.cc (win32_target_ops): Update.
727 (win32_resume): Turn into ...
728 (win32_process_target::resume): ... this.
729 (win32_process_target::detach): Update.
730 (do_initial_child_stuff): Update.
731 * win32-low.h (class win32_process_target): Update.
733 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
735 Turn process_stratum_target's thread_alive op into a method of
738 * target.h (struct process_stratum_target): Remove the target op.
739 (class process_target): Add the target op.
740 (mythread_alive): Update the macro.
742 Update the derived classes and callers below.
744 * linux-low.cc (linux_target_ops): Update.
745 (linux_thread_alive): Turn into ...
746 (linux_process_target::thread_alive): ... this.
747 (wait_for_sigstop): Update.
748 * linux-low.h (class linux_process_target): Update.
749 * lynx-low.cc (lynx_target_ops): Update.
750 (lynx_thread_alive): Turn into ...
751 (lynx_process_target::thread_alive): ... this.
752 * lynx-low.h (class lynx_process_target): Update.
753 * nto-low.cc (nto_target_ops): Update.
754 (nto_thread_alive): Turn into ...
755 (nto_process_target::thread_alive): ... this.
756 * nto-low.h (class nto_process_target): Update.
757 * win32-low.cc (win32_target_ops): Update.
758 (win32_thread_alive): Turn into ...
759 (win32_process_target::thread_alive): ... this.
760 * win32-low.h (class win32_process_target): Update.
762 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
764 Turn process_stratum_target's join op into a method of
767 * target.h (struct process_stratum_target): Remove the target op.
768 (class process_target): Add the target op.
769 (join_inferior): Update the macro.
771 Update the derived classes and callers below.
773 * linux-low.cc (linux_target_ops): Update.
774 (linux_join): Turn into ...
775 (linux_process_target::join): ... this.
776 * linux-low.h (class linux_process_target): Update.
777 * lynx-low.cc (lynx_target_ops): Update.
778 (lynx_join): Turn into ...
779 (lynx_process_target::join): ... this.
780 * lynx-low.h (class lynx_process_target): Update.
781 * nto-low.cc (nto_target_ops): Update.
782 (nto_process_target::join): Define.
783 * nto-low.h (class nto_process_target): Update.
784 * win32-low.cc (win32_target_ops): Update.
785 (win32_join): Turn into ...
786 (win32_process_target::join): ... this.
787 * win32-low.h (class win32_process_target): Update.
789 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
791 Turn process_stratum_target's mourn op into a method of
794 * target.h (struct process_stratum_target): Remove the target op.
795 (class process_target): Add the target op.
797 Update the derived classes and callers below.
799 * target.cc (target_mourn_inferior): Update.
800 * linux-low.cc (linux_target_ops): Update.
801 (linux_mourn): Turn into ...
802 (linux_process_target::mourn): ... this.
803 (handle_extended_wait): Update.
804 (linux_process_target::kill): Update.
805 (linux_process_target::detach): Update.
806 * linux-low.h (class linux_process_target): Update.
807 * lynx-low.cc (lynx_target_ops): Update.
808 (lynx_mourn): Turn into ...
809 (lynx_process_target::mourn): ... this.
810 * lynx-low.h (class lynx_process_target): Update.
811 * nto-low.cc (nto_target_ops): Update.
812 (nto_mourn): Turn into ...
813 (nto_process_target::mourn): ... this.
814 * nto-low.h (class nto_process_target): Update.
815 * win32-low.cc (win32_target_ops): Update.
816 (win32_mourn): Turn into ...
817 (win32_process_target::mourn): ... this.
818 * win32-low.h (class win32_process_target): Update.
820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
822 Turn process_stratum_target's detach op into a method of
825 * target.h (struct process_stratum_target): Remove the target op.
826 (class process_target): Add the target op.
827 (detach_inferior): Update the macro.
829 Update the derived classes and callers below.
831 * linux-low.cc (linux_target_ops): Update.
832 (linux_detach): Turn into ...
833 (linux_process_target::detach): ... this.
834 * linux-low.h (class linux_process_target): Update.
835 * lynx-low.cc (lynx_target_ops): Update.
836 (lynx_detach): Turn into ...
837 (lynx_process_target::detach): ... this.
838 * lynx-low.h (class lynx_process_target): Update.
839 * nto-low.cc (nto_target_ops): Update.
840 (nto_detach): Turn into ...
841 (nto_process_target::detach): ... this.
842 * nto-low.h (class nto_process_target): Update.
843 * win32-low.cc (win32_target_ops): Update.
844 (win32_detach): Turn into ...
845 (win32_process_target::detach): ... this.
846 * win32-low.h (class win32_process_target): Update.
848 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
850 Turn process_stratum_target's kill op into a method of
853 * target.h (struct process_stratum_target): Remove the target op.
854 (class process_target): Add the target op.
856 Update the derived classes and callers below.
858 * target.cc (kill_inferior): Update.
859 * linux-low.cc (linux_target_ops): Update.
860 (linux_kill): Turn into ...
861 (linux_process_target::kill): ... this.
862 * linux-low.h (class linux_process_target): Update.
863 * lynx-low.cc (lynx_target_ops): Update.
864 (lynx_kill): Turn into ...
865 (lynx_process_target::kill): ... this.
866 * lynx-low.h (class lynx_process_target): Update.
867 * nto-low.cc (nto_target_ops): Update.
868 (nto_kill): Turn into ...
869 (nto_process_target::kill): ... this.
870 * nto-low.h (class nto_process_target): Update.
871 * win32-low.cc (win32_target_ops): Update.
872 (win32_kill): Turn into ...
873 (win32_process_target::kill): ... this.
874 * win32-low.h (class win32_process_target): Update.
876 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
878 Turn process_stratum_target's attach op into a method of
881 * target.h (struct process_stratum_target): Remove the target op.
882 (class process_target): Add the target op.
883 (myattach): Update the macro.
885 Update the derived classes and callers below.
887 * linux-low.cc (linux_target_ops): Update.
888 (linux_attach): Turn into ...
889 (linux_process_target::attach): ... this.
890 * linux-low.h (class linux_process_target): Update.
891 * lynx-low.cc (lynx_target_ops): Update.
892 (lynx_attach): Turn into ...
893 (lynx_process_target::attach): ... this.
894 * lynx-low.h (class lynx_process_target): Update.
895 * nto-low.cc (nto_target_ops): Update.
896 (nto_attach): Turn into ...
897 (nto_process_target::attach): ... this.
898 * nto-low.h (class nto_process_target): Update.
899 * win32-low.cc (win32_target_ops): Update.
900 (win32_attach): Turn into ...
901 (win32_process_target::attach): ... this.
902 * win32-low.h (class win32_process_target): Update.
904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
906 Turn process_stratum_target's post_create_inferior op into a method
909 * target.h (struct process_stratum_target): Remove the target op.
910 (class process_target): Add the target op.
911 (target_post_create_inferior): Update the macro.
912 * target.cc (process_target::post_create_inferior): Define.
914 Update the derived classes and callers below.
916 * linux-low.cc (linux_target_ops): Update.
917 (linux_post_create_inferior): Turn into ...
918 (linux_process_target::post_create_inferior): ... this.
919 * linux-low.h (class linux_process_target): Update.
920 * lynx-low.cc (lynx_target_ops): Update.
921 * nto-low.cc (nto_target_ops): Update.
922 * win32-low.cc (win32_target_ops): Update.
924 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
926 Turn process_stratum_target's create_inferior op into a method of
929 * target.h (struct process_stratum_target): Remove the target op.
930 (class process_target): Add the target op.
931 (create_inferior): Rename the macro to ...
932 (target_create_inferior): ... this.
934 Update the derived classes and callers below.
936 * server.cc (handle_v_run): Update.
937 (captured_main): Update.
938 (process_serial_event): Update.
939 * linux-low.cc (linux_target_ops): Update.
940 (linux_create_inferior): Turn into ...
941 (linux_process_target::create_inferior): ... this.
942 * linux-low.h (class linux_process_target): Update.
943 * lynx-low.cc (lynx_target_ops): Update.
944 (lynx_create_inferior): Turn into ...
945 (lynx_process_target::create_inferior): ... this.
946 * lynx-low.h (class lynx_process_target): Update.
947 * nto-low.cc (nto_target_ops): Update.
948 (nto_create_inferior): Turn into ...
949 (nto_process_target::create_inferior): ... this.
950 * nto-low.h (class nto_process_target): Update.
951 * win32-low.cc (win32_target_ops): Update.
952 (win32_create_inferior): Turn into ...
953 (win32_process_target::create_inferior): ... this.
954 * win32-low.h (class win32_process_target): Update.
956 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
958 * target.h (class process_target): New class definition.
959 (struct process_stratum_target) <pt>: New field with type
961 * linux-low.h (class linux_process_target): Define as a derived
962 class of 'process_target'.
963 * linux-low.cc (linux_target_ops): Add a linux_process_target*
965 * lynx-low.h (class lynx_process_target): Define as a derived
966 class of 'process_target'.
967 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
969 * nto-low.h (class nto_process_target): Define as a derived
970 class of 'process_target'.
971 * nto-low.cc (nto_target_ops): Add an nto_process_target*
973 * win32-low.h (class win32_process_target): Define as a derived
974 class of 'process_target'.
975 * win32-low.cc (win32_target_ops): Add a win32_process_target*
978 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
980 * configure: Regenerate.
982 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
983 Andrew Burgess <andrew.burgess@embecosm.com>
985 * linux-riscv-low.cc: New file.
986 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
987 and nat/riscv-linux-tdesc.c.
988 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
989 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
992 2020-02-14 Tom Tromey <tom@tromey.com>
994 * acinclude.m4: Don't include acx_configure_dir.m4.
995 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
996 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
997 (all, install-only, uninstall, clean-info, clean)
998 (maintainer-clean): Don't recurse.
999 (subdir_do, all-lib): Remove.
1000 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1002 (generated_files): Update.
1003 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1004 * configure: Rebuild.
1005 * configure.ac: Don't configure gnulib or libiberty.
1008 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1010 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1011 preparing the command line for CreateProcess.
1012 (win32_create_inferior): Reflect the program name in debugging
1013 output that shows the process and its command line.
1015 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1017 * Makefile.in: Rename source files from .c to .cc.
1018 * %.c: Rename to %.cc.
1019 * configure.ac: Rename server.c to server.cc.
1020 * configure: Re-generate.
1022 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1024 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1026 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1028 * win32-low.c (win32_create_inferior): Set signal_pid.
1030 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1031 Pedro Alves <palves@redhat.com>
1033 Skip building gdbserver in a cross-configuration.
1034 * configure.srv: Set $gdbserver_host depending on whether $target
1035 is $host. Use $gdbserver_host instead of $host.
1037 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1039 * configure: Re-generate.
1041 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1043 * configure: Re-generate.
1045 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1047 * acinclude.m4: Update warning.m4 path.
1049 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1051 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1052 (handle_exception): Set siginfo_er.
1053 (win32_xfer_siginfo): New function.
1055 2020-02-07 Tom Tromey <tom@tromey.com>
1056 Pedro Alves <palves@redhat.com>
1058 * README: Update build documentation.
1059 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1061 * configure.ac: Update paths.
1062 * configure: Rebuild.
1063 * acinclude.m4: Update paths.
1064 * Makefile.in: Update include paths.
1065 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1066 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1067 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1068 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1069 (%-generated.c): Update paths.
1070 * Move entire directory from ../gdb/gdbserver.
1072 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1074 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1076 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1078 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1079 assignment instead of srv_linux_obj.
1081 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1083 * server.c (handle_qxfer_libraries): Write segment-address with
1086 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1088 * Makefile.in (install-strip): New target.
1089 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1090 * aclocal.m4: Regenerate.
1091 * configure: Regenerate.
1092 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1094 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1096 * Makefile.in (SFILES): Adjust paths to point to real files.
1097 (OBS): Move waitstatus.o to target/waitstatus.o.
1098 (TAGS): Transform paths appropriately.
1100 (nat/%.o): ... this pattern rule.
1102 (target/%.o): ... this pattern rule.
1103 * configure.srv: Adjust paths throughout to include nat/ prefix
1104 with the revant files.
1105 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1106 * configure: Regenerate.
1108 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1110 * Makefile.in (TAGS): Remove config files from the recipe.
1112 2020-01-14 Tom Tromey <tom@tromey.com>
1114 * configure: Rebuild.
1115 * configure.ac: Remove any checks that were added to common.m4.
1116 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1119 2020-01-14 Tom Tromey <tom@tromey.com>
1121 * server.h: Include config.h.
1122 * gdbreplay.c: Include config.h.
1123 * configure: Rebuild.
1124 * configure.ac: Don't source common.host.
1125 * acinclude.m4: Update path.
1126 * Makefile.in (INCSUPPORT): New variable.
1127 (INCLUDE_CFLAGS): Add INCSUPPORT.
1128 (SFILES): Update paths.
1129 (version-generated.c): Update path to create-version.sh.
1130 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1132 2020-01-14 Tom Tromey <tom@tromey.com>
1134 * configure.ac (LIBS): Use WIN32APILIBS.
1135 (USE_WIN32API): Don't define.
1136 * configure: Rebuild.
1138 2020-01-14 Tom Tromey <tom@tromey.com>
1140 * configure: Rebuild.
1142 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1144 * Makefile.in (%-generated.c): Remove rule for files from
1147 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1149 * configure: Re-generate.
1151 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1153 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1155 * tracepoint.c (stop_tracing, flush_trace_buffer,
1156 about_to_request_buffer_space, get_trace_state_variable_value,
1157 set_trace_state_variable_value, gdb_collect): Add declaration.
1159 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1161 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1162 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1163 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1164 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1165 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1168 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1170 * inferiors.c: Include gdbsupport/common-inferior.h.
1172 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1174 * hostio-errno.c: Include hostio.h.
1176 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1178 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1181 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1183 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1184 * linux-arm-tdesc.h: Include arch/arm.h.
1186 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1188 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1190 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1192 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1193 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1195 2020-01-10 Pedro Alves <palves@redhat.com>
1197 * fork-child.c (post_fork_inferior): Pass target down to
1199 * inferiors.c (switch_to_thread): Add process_stratum_target
1201 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1202 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1203 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1204 * remote-utils.c (prepare_resume_reply): Pass the target to
1206 * target.c (the_target): Now a process_stratum_target.
1207 (done_accessing_memory): Pass the target to switch_to_thread.
1208 (set_target_ops): Ajust to use process_stratum_target.
1209 * target.h (struct target_ops): Rename to ...
1210 (struct process_stratum_target): ... this.
1211 (the_target, set_target_ops): Adjust.
1212 (prepare_to_access_memory): Adjust comment.
1213 * win32-low.c (child_xfer_memory): Adjust to use
1214 process_stratum_target.
1215 (win32_target_ops): Now a process_stratum_target.
1217 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1218 Pedro Alves <palves@redhat.com>
1220 * win32-low.c (get_child_debug_event): Extract the fatal exception
1221 from the exit status and convert to the equivalent Posix signal
1223 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1224 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1226 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1228 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1230 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1232 * server.c (gdbserver_version): Change copyright year to 2020.
1233 * gdbreplay.c (gdbreplay_version): Likewise.
1235 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1237 * configure: Regenerate.
1238 * configure.ac: Quote variable arguments of test.
1240 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1242 * Makefile.in: Fix build with GNU Make 3.81
1244 2019-12-16 Tom Tromey <tromey@adacore.com>
1246 * server.c (get_exec_file): Constify result.
1248 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1250 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1251 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1252 * config.in: Regenerate.
1253 * configure: Regenerate.
1254 * configure.ac: Don't check for strerror.
1255 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1256 Call safe_strerror instead of strerror.
1257 * server.h (strerror): Remove this now-unnecessary declaration.
1258 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1260 (gdb_agent_helper_thread): Likewise.
1261 * utils.c (perror_with_name): Likewise.
1263 2019-11-26 Tom Tromey <tom@tromey.com>
1265 * configure, config.in: Rebuild.
1267 2019-11-26 Tom Tromey <tom@tromey.com>
1269 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1270 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1272 * configure, config.in: Rebuild.
1274 2019-11-26 Tom Tromey <tom@tromey.com>
1276 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1277 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1278 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1279 * acinclude.m4: Include ax_pthread.m4.
1280 * config.in, configure: Rebuild.
1282 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1284 * debug.c (debug_set_output): Call safe_strerror instead of
1286 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1287 (linux_kill_one_lwp): Likewise.
1288 (linux_detach_one_lwp): Likewise.
1289 (linux_wait_for_event_filtered): Likewise.
1290 (store_register): Likewise.
1291 * lynx-low.c (lynx_attach): Likewise.
1292 * mem-break.c (insert_memory_breakpoint): Likewise.
1293 (remove_memory_breakpoint): Likewise.
1294 (delete_fast_tracepoint_jump): Likewise.
1295 (set_fast_tracepoint_jump): Likewise.
1296 (uninsert_fast_tracepoint_jumps_at): Likewise.
1297 (reinsert_fast_tracepoint_jumps_at): Likewise.
1298 * nto-low.c (nto_xfer_memory): Likewise.
1299 (nto_resume): Likewise.
1301 2019-11-20 Luis Machado <luis.machado@linaro.org>
1303 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1304 instead of register count.
1305 * tdesc.c (tdesc_contains_feature): New function.
1306 * tdesc.h (tdesc_contains_feature): New prototype.
1308 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1310 * Makefile.in: Add safe-strerror.c.
1311 * configure: Regenerate.
1312 * configure.ac: Don't source common.host.
1314 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1316 * config.in: Regenerate.
1317 * configure: Regenerate.
1319 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1321 * ax.c (ax_printf): Handle size_t_arg.
1323 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1325 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1326 * mi/mi-main.c (output_cores): Likewise.
1327 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1328 (linux_xfer_osdata_modules): Likewise.
1329 * remote.c (register_remote_support_xml): Likewise.
1330 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1331 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1333 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1335 * configure: Regenerate.
1336 * configure.ac: Remove check for strerror_r.
1338 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1340 * config.in: Regenerate.
1341 * configure: Regenerate.
1342 * configure.ac: Also check for strerror_r.
1344 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1346 * ax.h (debug_agent): Remove duplicate declaration.
1348 2019-10-26 Tom de Vries <tdevries@suse.de>
1350 * linux-aarch64-low.c: Fix typos in comments.
1351 * linux-arm-low.c: Same.
1352 * linux-low.c: Same.
1353 * linux-ppc-low.c: Same.
1354 * proc-service.c: Same.
1357 * tracepoint.c: Same.
1358 * win32-low.c: Same.
1360 2019-10-25 Tom Tromey <tromey@adacore.com>
1362 * utils.c (xstrdup): Remove.
1364 2019-10-23 Tom Tromey <tom@tromey.com>
1366 * configure, config.in: Rebuild.
1368 2019-10-23 Tom Tromey <tom@tromey.com>
1370 * configure: Rebuild.
1371 * acinclude.m4: Use m4_include, not sinclude.
1373 2019-10-17 Tom Tromey <tromey@adacore.com>
1375 * configure: Rebuild.
1376 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1377 in AC_CONFIG_FILES invocation.
1378 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1381 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1383 * server.c: Include xml-builtin.h.
1384 (get_xml_features): Don't declare xml_builtins here.
1386 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1388 * Makefile.in: Remove references to vec-ipa.o.
1390 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1392 * Makefile.in: Remove references to vec.c.
1394 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1396 * server.c (server_waiting): Change to bool.
1397 (extended_protocol): Likewise.
1398 (response_needed): Likewise.
1399 (exit_requested): Likewise.
1400 (run_once): Likewise.
1401 (report_no_resumed): Likewise.
1402 (non_stop): Likewise.
1403 (disable_packet_vCont): Likewise.
1404 (disable_packet_Tthread): Likewise.
1405 (disable_packet_qC): Likewise.
1406 (disable_packet_qfThreadInfo): Likewise.
1407 (handle_general_set): Update.
1408 (handle_detach): Update.
1409 (handle_monitor_command): Update.
1410 (handle_query): Update.
1411 (captured_main): Update.
1412 (process_serial_event): Update.
1413 * server.h (server_waiting): Change to bool.
1414 (disable_packet_vCont): Likewise.
1415 (disable_packet_Tthread): Likewise.
1416 (disable_packet_qC): Likewise.
1417 (disable_packet_qfThreadInfo): Likewise.
1418 (run_once): Likewise.
1419 (non_stop): Likewise.
1420 * target.c (target_stop_and_wait): Update.
1422 2019-10-02 Tom Tromey <tromey@adacore.com>
1424 * Makefile.in (SFILES): Add common-inferior.c.
1425 (OBS): Add common-inferior.o.
1426 * server.c (startup_with_shell): Don't define.
1428 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1430 * linux-low.c (linux_low_read_btrace): Update for change to
1433 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1435 * debug.c (debug_threads): Remove comment in favor of the header.
1436 * debug.h (using_threads): Add declaration.
1437 (debug_threads): Add comment.
1438 * linux-aarch64-low.c: Include debug.h and remove declaration of
1440 * nto-low.c: Likewise.
1441 * remote-utils.c: Likewise.
1442 * thread-db.c: Likewise.
1444 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1446 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1447 and powerpc-cell64l-ipa.o.
1448 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1449 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1450 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1453 * spu-low.c: Remove file.
1455 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1456 (parse_spufs_run): Remove.
1457 (ppc_get_pc): Remove Cell/B.E. support.
1458 (ppc_set_pc): Likewise.
1459 (ppc_breakpoint_at): Likewise.
1460 (ppc_arch_setup): Likewise.
1461 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1462 tdesc_powerpc_cell32l.
1463 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1464 or init_registers_powerpc_cell32l.
1465 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1466 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1467 or init_registers_powerpc_cell32l.
1468 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1469 (init_registers_powerpc_cell32l): Remove prototype.
1470 (init_registers_powerpc_cell64l): Likewise.
1472 * target.h (struct target_ops): Remove qxfer_spu member.
1473 * server.c (handle_qxfer_spu): Remove.
1474 (qxfer_packets): Remove entry for "spu".
1475 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1476 * linux-low.c (SPUFS_MAGIC): Remove.
1477 (spu_enumerate_spu_ids): Remove.
1478 (linux_qxfer_spu): Remove.
1479 (linux_target_ops): Remove qxfer_spu member.
1480 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1481 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1482 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1484 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1486 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1487 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1488 * config.in: Regenerate.
1489 * configure: Regenerate.
1491 2019-08-15 Tom Tromey <tromey@adacore.com>
1493 * target.c (target_write_memory): Use gdb::byte_vector.
1495 2019-08-15 Tom Tromey <tromey@adacore.com>
1497 * tracepoint.c (write_inferior_data_pointer)
1498 (write_inferior_integer, write_inferior_int8)
1499 (write_inferior_uinteger, m_tracepoint_action_download)
1500 (r_tracepoint_action_download, x_tracepoint_action_download)
1501 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1502 (download_agent_expr, download_tracepoint_1)
1503 (download_trace_state_variables, upload_fast_traceframes): Update.
1504 * server.c (gdb_write_memory): Update.
1505 * remote-utils.c (relocate_instruction): Update.
1506 * proc-service.c (ps_pdwrite): Update.
1507 * mem-break.c (remove_memory_breakpoint)
1508 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1509 (uninsert_fast_tracepoint_jumps_at)
1510 (reinsert_fast_tracepoint_jumps_at): Update.
1511 * linux-x86-low.c (append_insns)
1512 (i386_install_fast_tracepoint_jump_pad)
1513 (amd64_write_goto_address, i386_write_goto_address): Update.
1514 * linux-s390-low.c (append_insns, s390_write_goto_address):
1516 * linux-ppc-low.c (ppc_relocate_instruction)
1517 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1518 (ppc_write_goto_address): Update.
1519 * linux-aarch64-low.c (append_insns): Update.
1520 * target.h (struct target_ops): Update.
1521 (write_inferior_memory): Don't declare.
1522 * target.c (target_write_memory): Rename from
1523 write_inferior_memory. Remove old target_write_memory.
1525 2019-08-15 Tom Tromey <tromey@adacore.com>
1527 * target.c (write_inferior_memory): Use std::vector.
1529 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1532 * configure.ac: Drop enable-libmcheck support.
1533 * configure, config.in: Rebuild.
1534 * acinclude.m4: Don't include it.
1536 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1538 * configure.srv: Remove Arm xml files.
1540 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1542 * configure.srv: Add new files. Remove xml generated files.
1543 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1545 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1546 * linux-aarch32-tdesc.c: New file.
1547 * linux-aarch32-tdesc.h: New file.
1548 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1549 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1550 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1551 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1552 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1553 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1554 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1555 (arm_read_description): Call arm_linux_read_description.
1556 (initialize_low_arch): Don't init registers.
1557 * linux-arm-tdesc.c: New file.
1558 * linux-arm-tdesc.h: New file.
1560 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1562 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1563 Move counter inside for.
1564 (arm_read_description): Check ptrace earlier.
1565 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1567 2019-07-09 Tom Tromey <tom@tromey.com>
1569 * configure: Rebuild.
1570 * configure.ac: Change common to gdbsupport.
1571 * acinclude.m4: Change common to gdbsupport.
1572 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1573 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1574 common to gdbsupport.
1575 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1576 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1577 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1578 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1579 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1580 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1581 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1582 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1583 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1584 common to gdbsupport.
1586 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1588 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1590 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1592 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1594 * configure.srv: Remove legacy xml.
1595 * linux-aarch64-low.c (initialize_low_arch): Remove
1596 initialize_low_tdesc call.
1597 * linux-aarch64-tdesc-selftest.c: Remove file.
1598 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1599 * linux-x86-low.c (initialize_low_arch): Remove
1600 initialize_low_tdesc call.
1601 * linux-x86-tdesc-selftest.c: Remove file.
1602 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1604 2019-06-20 Tom de Vries <tdevries@suse.de>
1606 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1607 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1609 2019-06-19 Tom de Vries <tdevries@suse.de>
1611 * debug.h (debug_write): Change return type to ssize_t.
1612 * debug.c (debug_write): Same.
1614 2019-06-14 Tom Tromey <tom@tromey.com>
1616 * configure.ac: Use new path to gnulib.
1617 * configure: Rebuild.
1618 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1621 2019-06-11 Tom Tromey <tom@tromey.com>
1623 * Makefile.in (SFILES): Add alloc.c.
1625 (IPA_OBJS): Add alloc-ipa.o.
1626 (alloc-ipa.o): New target.
1627 (%.o: ../%.c): New pattern rule.
1629 2019-06-10 Tom Tromey <tromey@adacore.com>
1631 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1632 end warning with a newline.
1633 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1635 * thread-db.c (attach_thread): Don't end warning with a newline.
1636 (thread_db_notice_clone): Likewise.
1637 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1639 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1640 end warning with a newline.
1642 2019-06-04 Pedro Alves <palves@redhat.com>
1644 * server.c (captured_main): Use make_unique_xstrdup.
1646 2019-06-02 Tom Tromey <tom@tromey.com>
1648 * gdbreplay.c (fromhex): Remove.
1649 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1651 2019-05-29 Tom Tromey <tromey@adacore.com>
1653 * configure: Rebuild.
1655 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1657 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1658 sign extension code on 32-bit builds.
1660 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1663 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1665 2019-04-19 Tom Tromey <tom@tromey.com>
1667 * server.c (struct vstop_notif): Derive from notif_event.
1669 (queue_stop_reply): Update.
1670 (remove_all_on_match_ptid): Change type. Rewrite.
1671 (discard_queued_stop_replies): Rewrite.
1672 (in_queued_stop_replies_ptid): Change type.
1673 (in_queued_stop_replies): Rewrite.
1674 (notif_stop): Update.
1675 (queue_stop_reply_callback): Update.
1676 (captured_main): Don't call initialize_notif.
1677 (push_stop_notification): Update.
1678 * notif.c (notif_write_event, handle_notif_ack)
1679 (notif_event_enque, notif_push): Update.
1680 (notif_event_xfree, initialize_notif): Remove.
1681 * notif.h (struct notif_event): Include <list>, not
1683 (struct notif_server) <queue>: Now a std::list.
1684 (notif_event_p): Remove typedef.
1685 (initialize_notif): Don't declare.
1686 (struct notif_event): Add virtual destructor.
1688 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1690 * ax.c (ax_vdebug): Call debug_printf.
1691 * debug.c (debug_write): New function.
1692 * debug.h (debug_write): New declaration.
1693 * linux-low.c (sigchld_handler): Call debug_write.
1695 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1697 * debug.c (debug_set_output): New function.
1698 (debug_vprintf): Send output to debug_file.
1699 (debug_flush): Likewise.
1700 * debug.h (debug_set_output): New declaration.
1701 * server.c (handle_monitor_command): Add debug-file option.
1702 (captured_main): Likewise.
1704 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1706 * debug.c (remote_debug): Add definition.
1707 * debug.h (remote_debug): Add declaration.
1708 * hostio.c (remote_debug): Remove declaration.
1709 * remote-utils.c (struct ui_file): Likewise.
1710 (remote_debug): Likewise.
1711 * remote-utils.h (remote_debug): Likewise,
1712 * server.c (remote_debug): Remove definition.
1714 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1716 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1717 when using a 64-bit gdbserver.
1719 2019-04-09 Tom Tromey <tromey@adacore.com>
1721 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1723 2019-04-08 Tom Tromey <tom@tromey.com>
1725 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1727 (linux_resume_one_lwp): Likewise.
1729 2019-04-08 Tom Tromey <tom@tromey.com>
1731 * gdbreplay.c: Update.
1732 * linux-low.c: Update.
1735 2019-04-08 Tom Tromey <tom@tromey.com>
1737 * server.c: Use C++ exception handling.
1738 * linux-low.c: Use C++ exception handling.
1739 * gdbreplay.c: Use C++ exception handling.
1741 2019-04-08 Tom Tromey <tom@tromey.com>
1743 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1744 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1745 (captured_main, main): Update.
1746 * gdbreplay.c (main): Update.
1748 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1750 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1751 value in argument pointer, return 1 if the entry is found and 0
1752 otherwise. Move comment.
1753 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1754 * linux-low.h (linux_get_auxv): Declare.
1755 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1757 2019-04-05 Tom Tromey <tromey@adacore.com>
1759 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1762 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1764 * linux-low.c (AT_HWCAP2): Add define if not already included.
1766 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1768 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1769 (aarch64_arch_setup): Call linux_get_hwcap.
1770 * linux-arm-low.c (arm_get_hwcap): Remove function.
1771 (arm_read_description): Call linux_get_hwcap.
1772 * linux-low.c (linux_get_auxv): New function.
1773 (linux_get_hwcap): Likewise.
1774 (linux_get_hwcap2): Likewise.
1775 * linux-low.h (linux_get_hwcap): New declaration.
1776 (linux_get_hwcap2): Likewise.
1777 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1778 (ppc_arch_setup): Call linux_get_hwcap.
1779 * linux-s390-low.c (s390_get_hwcap): Remove function.
1780 (s390_arch_setup): Call linux_get_hwcap.
1782 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1783 Jiong Wang <jiong.wang@arm.com>
1785 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1786 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1788 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1790 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1791 Jiong Wang <jiong.wang@arm.com>
1793 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1794 (aarch64_get_hwcap): New function.
1795 (aarch64_arch_setup): Read APIA hwcap.
1797 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1798 Jiong Wang <jiong.wang@arm.com>
1800 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1801 (initialize_low_tracepoint): Likewise.
1802 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1803 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1804 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1805 (aarch64_linux_read_description): Likewise.
1806 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1808 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1810 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1811 i386_create_target_description for 'segments' parameter.
1812 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1813 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1814 * win32-i386-low.c (i386_arch_setup): Likewise.
1816 2019-03-12 Tom Tromey <tromey@adacore.com>
1818 * linux-low.c (iterate_over_lwps): Update.
1820 2019-03-06 Tom Tromey <tom@tromey.com>
1822 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1823 (captured_main): Use SCOPE_EXIT.
1825 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1827 * configure.srv: Use '$enable_unittest' instead of '$development'
1828 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1831 2019-02-27 Tom Tromey <tromey@adacore.com>
1833 * gdbreplay.c (logchar): Handle \r\n.
1835 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1837 * linux-low.c (linux_attach): Add process before lwp.
1838 * server.c (attach_inferior): Check if already attached.
1840 2019-02-07 Tom Tromey <tom@tromey.com>
1842 * x86-tdesc.h: Rename include guard.
1843 * x86-low.h: Add include guard.
1844 * wincecompat.h: Rename include guard.
1845 * win32-low.h: Add include guard.
1846 * utils.h: Rename include guard.
1847 * tracepoint.h: Rename include guard.
1848 * tdesc.h: Rename include guard.
1849 * target.h: Rename include guard.
1850 * server.h: Rename include guard.
1851 * remote-utils.h: Rename include guard.
1852 * regcache.h: Rename include guard.
1853 * nto-low.h: Rename include guard.
1854 * notif.h: Add include guard.
1855 * mem-break.h: Rename include guard.
1856 * lynx-low.h: Add include guard.
1857 * linux-x86-tdesc.h: Add include guard.
1858 * linux-s390-tdesc.h: Add include guard.
1859 * linux-ppc-tdesc-init.h: Add include guard.
1860 * linux-low.h: Add include guard.
1861 * linux-aarch64-tdesc.h: Add include guard.
1862 * linux-aarch32-low.h: Add include guard.
1863 * inferiors.h: Rename include guard.
1864 * i387-fp.h: Rename include guard.
1865 * hostio.h: Rename include guard.
1866 * gdbthread.h: Rename include guard.
1867 * gdb_proc_service.h: Rename include guard.
1868 * event-loop.h: Rename include guard.
1869 * dll.h: Rename include guard.
1870 * debug.h: Rename include guard.
1871 * ax.h: Rename include guard.
1873 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1876 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1877 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1879 2019-01-25 Tom Tromey <tom@tromey.com>
1881 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1883 2019-01-25 Tom Tromey <tom@tromey.com>
1885 * win32-low.c: Fix common/ includes.
1886 * win32-i386-low.c: Fix common/ includes.
1887 * tracepoint.c: Fix common/ includes.
1888 * thread-db.c: Fix common/ includes.
1889 * target.h: Fix common/ includes.
1890 * symbol.c: Fix common/ includes.
1891 * spu-low.c: Fix common/ includes.
1892 * server.h: Fix common/ includes.
1893 * server.c: Fix common/ includes.
1894 * remote-utils.c: Fix common/ includes.
1895 * regcache.h: Fix common/ includes.
1896 * regcache.c: Fix common/ includes.
1897 * nto-x86-low.c: Fix common/ includes.
1898 * notif.h: Fix common/ includes.
1899 * mem-break.h: Fix common/ includes.
1900 * lynx-low.c: Fix common/ includes.
1901 * lynx-i386-low.c: Fix common/ includes.
1902 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1903 * linux-x86-low.c: Fix common/ includes.
1904 * linux-low.c: Fix common/ includes.
1905 * inferiors.h: Fix common/ includes.
1906 * i387-fp.c: Fix common/ includes.
1907 * hostio.c: Fix common/ includes.
1908 * hostio-errno.c: Fix common/ includes.
1909 * gdbthread.h: Fix common/ includes.
1910 * gdbreplay.c: Fix common/ includes.
1911 * fork-child.c: Fix common/ includes.
1912 * event-loop.c: Fix common/ includes.
1914 (enum gdb_agent_op): Fix common/ includes.
1916 2019-01-21 Tom Tromey <tom@tromey.com>
1918 * tracepoint.c: Fix includes.
1919 * remote-utils.c: Fix includes.
1920 * linux-x86-low.c: Fix includes.
1922 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1924 * gdbreplay.c (gdbreplay_version): Update copyright year in
1926 * server.c (gdbserver_version): Likewise.
1928 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1930 * linux-low.c (add_lwp): Switch ordering.
1932 2018-11-29 Tom Tromey <tom@tromey.com>
1934 * win32-low.c (win32_join): Take pid, not process.
1935 * target.h (struct target_ops) <join>: Change argument type.
1936 (join_inferior): Change argument name.
1937 * spu-low.c (spu_join): Take pid, not process.
1938 * server.c (handle_detach): Preserve pid before destroying
1940 * lynx-low.c (lynx_join): Take pid, not process.
1941 * linux-low.c (linux_join): Take pid, not process.
1943 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1945 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1946 (aarch64_cannot_fetch_register): Likewise.
1947 (struct linux_target_ops): Update references.
1949 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1951 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1953 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1955 * configure.srv (ipa_ppc_linux_regobj): Add
1956 powerpc-isa207-htm-vsx32l-ipa.o and
1957 powerpc-isa207-htm-vsx64l-ipa.o.
1958 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1959 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1960 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1961 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1962 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1963 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1964 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1965 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1966 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1967 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1968 (init_registers_powerpc_isa207_htm_vsx32l)
1969 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1970 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1971 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1972 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1973 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1974 (ppc_store_tm_ctarregset): New functions.
1975 (ppc_regsets): Add entries for HTM regsets.
1976 (ppc_arch_setup): Set htm in features struct when needed. Set
1977 sizes for the HTM regsets.
1978 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1979 (initialize_low_arch): Call
1980 init_registers_powerpc_isa207_htm_vsx32l and
1981 init_registers_powerpc_isa207_htm_vsx64l.
1982 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1983 PPC_TDESC_ISA207_HTM_VSX.
1984 (initialize_low_tracepoint): Call
1985 init_registers_powerpc_isa207_htm_vsx32l and
1986 init_registers_powerpc_isa207_htm_vsx64l.
1988 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1990 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1991 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1992 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1993 (ppc_store_pmuregset): New functions.
1994 (ppc_regsets): Add entries for ebb and pmu regsets.
1995 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1996 pmu regsets are available. Set sizes for these regsets.
1998 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2000 * configure.srv (ipa_ppc_linux_regobj): Add
2001 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2002 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2003 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2004 rs6000/powerpc-isa207-vsx32l.xml, and
2005 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2006 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2007 <PPC_TDESC_ISA207_VSX>: New enum value.
2008 (init_registers_powerpc_isa207_vsx32l): Declare.
2009 (init_registers_powerpc_isa207_vsx64l): Declare.
2010 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2011 (ppc_store_tarregset): New function.
2012 (ppc_regsets): Add entry for the TAR regset.
2013 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2014 size for the TAR regsets.
2015 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2016 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2017 and init_registers_powerpc_isa207_vsx64l.
2018 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2019 (initialize_low_tracepoint): Call
2020 init_registers_powerpc_isa207_vsx32l and
2021 init_registers_powerpc_isa207_vsx64l.
2023 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2024 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2026 * configure.srv (ipa_ppc_linux_regobj): Add
2027 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2028 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2029 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2030 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2031 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2032 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2033 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2034 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2035 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2036 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2037 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2038 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2039 (ppc_hwcap): Add comment.
2040 (ppc_hwcap2): New global.
2041 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2042 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2043 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2044 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2045 when needed. Set sizes for the the DSCR and PPR regsets.
2046 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2047 (initialize_low_arch): Call
2048 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2049 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2050 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2051 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2052 (initialize_low_tracepoint): Call
2053 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2054 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2056 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2058 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2060 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2061 Simon Marchi <simark@simark.ca>
2063 * acinclude.m4: Include "../selftest.m4".
2064 * configure: Regenerate.
2065 * configure.ac: Use "GDB_AC_SELFTEST".
2066 * configure.srv: Use "$enable_unittests" instead of
2067 "$development" when checking whether unit tests have been
2069 * server.c (captured_main): Update message informing that
2070 selftests have been disabled.
2072 2018-10-04 Tom Tromey <tom@tromey.com>
2074 * configure: Rebuild.
2076 2018-10-04 Tom Tromey <tom@tromey.com>
2078 * server.c (handle_status): Rename inner "thread".
2079 (process_serial_event): Declare "res" in 'm' case.
2080 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2081 (iterate_over_lwps): Rename inner "thread".
2082 (linux_qxfer_libraries_svr4): Rename inner "len".
2083 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2085 2018-10-01 Gary Benson <gbenson@redhat.com>
2087 * gdb_proc_service.h: Moved common code to
2088 common/gdb_proc_service.h.
2090 2018-10-01 Gary Benson <gbenson@redhat.com>
2092 * gdb_proc_service.h: Synchronize comments and whitespace with
2093 GDB's version of this file.
2095 2018-09-25 Tom Tromey <tom@tromey.com>
2097 * configure: Rebuild.
2098 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2100 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2102 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2103 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2104 ($(IPA_LIB)): Sort IPA_OBJS.
2106 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2108 * Makefile.in: Remove references to $(ADD_DEPS).
2110 2018-09-16 Tom Tromey <tom@tromey.com>
2112 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2114 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2117 2018-09-05 Tom Tromey <tom@tromey.com>
2119 * configure: Rebuild.
2121 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2124 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2126 2018-08-27 Tom Tromey <tom@tromey.com>
2129 * configure: Rebuild.
2131 2018-08-27 Tom Tromey <tom@tromey.com>
2133 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2134 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2135 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2136 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2137 (s390x_emit_stack_adjust): Add casts to unsigned char.
2139 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2143 * server.h (struct client_state) <disable_randomization>:
2146 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2148 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2150 (mips_supply_ptrace_register): Likewise.
2152 2018-07-22 Tom Tromey <tom@tromey.com>
2154 * configure: Rebuild.
2156 2018-07-22 Tom Tromey <tom@tromey.com>
2158 * win32-low.c (win32_create_inferior): Remove unused variables.
2159 * gdbreplay.c (remote_open): Remove unused variable.
2160 * remote-utils.c (remote_prepare): Remove unused variable.
2161 * x86-tdesc.h (X86_TDESC_H): Define.
2162 (amd64_expedite_regs): Define conditionally.
2163 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2164 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2165 * remote-utils.c (readchar): Remove unused variable.
2167 2018-07-13 Pedro Alves <palves@redhat.com>
2169 * linux-low.c (linux_kill): Change parameter to process_info
2170 pointer instead of pid. Adjust.
2171 * lynx-low.c (lynx_kill): Likewise.
2172 * nto-low.c (nto_kill): Likewise.
2173 * spu-low.c (spu_kill): Likewise.
2174 * win32-low.c (win32_kill): Likewise.
2175 * server.c (handle_v_kill, kill_inferior_callback)
2176 (detach_or_kill_for_exit): Adjust.
2177 * target.c (kill_inferior): Change parameter to process_info
2178 pointer instead of pid. Adjust.
2179 * target.h (struct target_ops) <kill>: Change parameter to
2180 process_info pointer instead of pid. Adjust all implementations
2182 (kill_inferior): Likewise.
2184 2018-07-13 Pedro Alves <palves@redhat.com>
2186 * linux-low.c (linux_detach, linux_join): Change parameter to
2187 process_info pointer instead of pid. Adjust.
2188 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2189 * nto-low.c (nto_detach): Likewise.
2190 * spu-low.c (spu_detach, spu_join): Likewise.
2191 * win32-low.c (win32_detach, win32_join): Likewise.
2192 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2193 * target.h (struct target_ops) <detach, join>: Change parameter to
2194 process_info pointer instead of pid. Adjust all implementations
2196 (detach_inferior, join_inferior): Rename 'pid' parameter to
2199 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2200 Jan Kratochvil <jan.kratochvil@redhat.com>
2201 Paul Fertser <fercerpav@gmail.com>
2202 Tsutomu Seki <sekiriki@gmail.com>
2204 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2205 (OBS): Add 'common/netstuff.o'.
2206 (GDBREPLAY_OBS): Likewise.
2207 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2208 (remote_open): Implement support for IPv6
2210 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2212 (handle_accept_event): Accept connections from IPv6 sources.
2213 (remote_prepare): Handle IPv6-style hostnames; implement
2214 support for IPv6 connections.
2215 (remote_open): Implement support for printing connections from
2218 2018-07-11 Pedro Alves <palves@redhat.com>
2221 * mem-break.c (any_persistent_commands): Add process_info
2222 parameter and use it instead of relying on the current process.
2223 Change return type to bool.
2224 * mem-break.h (any_persistent_commands): Add process_info
2225 parameter and change return type to bool.
2226 * server.c (handle_detach): Remove require_running_or_return call.
2227 Look up the process_info for the process we're about to detach.
2228 If not found, return back error to GDB. Adjust
2229 any_persistent_commands call to pass down a process pointer.
2231 2018-07-11 Pedro Alves <palves@redhat.com>
2233 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2234 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2235 instead of collect_register_by_name.
2236 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2237 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2239 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2240 Pedro Alves <palves@redhat.com>
2242 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2244 2018-07-03 Tom Tromey <tom@tromey.com>
2246 * linux-low.c: Update.
2247 * lynx-low.c: Update.
2248 * mem-break.c: Update.
2249 * nto-low.c: Update.
2250 * remote-utils.c: Update.
2252 * spu-low.c: Update.
2254 * win32-low.c: Update.
2256 2018-07-03 Tom Tromey <tom@tromey.com>
2260 2018-07-03 Tom Tromey <tom@tromey.com>
2262 * linux-low.c: Update.
2264 2018-07-03 Tom Tromey <tom@tromey.com>
2268 2018-07-03 Tom Tromey <tom@tromey.com>
2270 * linux-low.c: Update.
2271 * linux-mips-low.c: Update.
2272 * lynx-low.c: Update.
2273 * nto-low.c: Update.
2274 * remote-utils.c: Update.
2276 * spu-low.c: Update.
2278 * thread-db.c: Update.
2280 2018-07-03 Tom Tromey <tom@tromey.com>
2282 * linux-low.c: Update.
2283 * linux-mips-low.c: Update.
2284 * lynx-low.c: Update.
2285 * mem-break.c: Update.
2286 * nto-low.c: Update.
2287 * remote-utils.c: Update.
2289 * spu-low.c: Update.
2291 * tracepoint.c: Update.
2293 2018-07-03 Tom Tromey <tom@tromey.com>
2295 * linux-low.c: Update.
2296 * linux-ppc-low.c: Update.
2297 * linux-x86-low.c: Update.
2298 * proc-service.c: Update.
2300 * spu-low.c: Update.
2301 * thread-db.c: Update.
2302 * win32-low.c: Update.
2304 2018-07-03 Tom Tromey <tom@tromey.com>
2306 * linux-low.c: Update.
2307 * lynx-low.c: Update.
2308 * nto-low.c: Update.
2309 * remote-utils.c: Update.
2310 * spu-low.c: Update.
2311 * thread-db.c: Update.
2312 * win32-low.c: Update.
2314 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2316 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2317 parameter in call to 'amd64_create_target_description'.
2319 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2321 * x86-tdesc.h: Remove executable permission flag.
2323 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2325 * configure.ac: Remove AC_PREREQ, add missing quoting.
2326 * configure: Re-generate.
2327 * config.in: Re-generate.
2328 * aclocal.m4: Re-generate.
2330 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2332 * tracepoint.h (current_traceframe): Remove declaration.
2334 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2336 * linux-aarch64-low.c (is_sve_tdesc): New function.
2337 (aarch64_sve_regs_copy_to_regcache): Likewise.
2338 (aarch64_sve_regs_copy_from_regcache): Likewise.
2339 (aarch64_regs_info): Add SVE checks.
2340 (initialize_low_arch): Initialize SVE.
2342 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2344 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2346 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2348 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2349 (initialize_low_tracepoint): Likewise
2350 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2351 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2353 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2355 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2357 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2359 * server.h (PBUFSIZ): Increase size
2361 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2363 * regcache.c (regcache::raw_compare): New function.
2364 * regcache.h (regcache::raw_compare): New declaration.
2366 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2368 * regcache.c (new_register_cache): Use new.
2369 (free_register_cache): Use delete.
2370 (register_data): Use const.
2371 (supply_register): Move body inside regcache.
2372 (regcache::raw_supply): New override function.
2373 (collect_register): Move body inside regcache.
2374 (regcache::raw_collect): New override function.
2375 (regcache::get_register_status): New override function.
2376 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2378 2018-06-09 Tom Tromey <tom@tromey.com>
2380 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2382 (event_queue): Use std::queue.
2383 (gdb_event_xfree): Remove.
2384 (initialize_event_loop, process_event, wait_for_event): Update.
2386 2018-06-08 Stan Cox <scox@redhat.com>
2388 * win32-low.c (win32_create_inferior): last_ptid and last_status
2389 moved to client_state.
2391 2018-06-08 Pedro Alves <palves@redhat.com>
2393 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2394 common/common-exceptions.o, common/common-utils.o,
2395 common/errors.o, common/print-utils.o and utils.o.
2396 * gdbreplay.c: Include "common-defs.h" instead of the two
2397 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2398 string.h or alloca.h.
2399 (perror_with_name): Delete.
2400 (remote_open): Use xstrdup instead of strdup.
2401 (main): Rename to ...
2402 (captured_main): ... this.
2405 2018-06-08 Tom Tromey <tom@tromey.com>
2407 * linux-low.c (linux_low_read_btrace): Update.
2409 2018-06-04 Stan Cox <scox@redhat.com>
2411 * server.h (struct client_state): New.
2412 * server.c (cont_thread, general_thread, multi_process)
2413 (report_fork_events, report_vfork_events, report_exec_events)
2414 (report_thread_events, swbreak_feature, hwbreak_feature)
2415 (vCont_supported, disable_randomization, pass_signals)
2416 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2417 Moved to client_state.
2418 * remote-utils.c (remote_debug, noack_mode)
2419 (transport_is_reliable): Moved to client_state.
2420 * tracepoint.c (current_traceframe): Moved to client_state.
2423 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2424 linux-low.c, remote-utils.h, target.c: Use client_state.
2426 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2428 * configure.srv: Add new c/h file.
2430 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2432 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2435 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2437 * gdb.arch/mips-fpregset-core.exp: New test.
2438 * gdb.arch/mips-fpregset-core.c: New test source.
2440 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2443 * hostio.c (require_int): Do not report overflow for integers
2444 between 0xfffffff and 0x7fffffff.
2446 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2448 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2449 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2450 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2452 (the_low_target): Wire them.
2454 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2456 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2457 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2458 mode. Call collect_register_by_name with vscr using
2459 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2460 (ppc_store_vrregset): Add and set vscr_offset variable as in
2461 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2464 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2466 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2467 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2468 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2470 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2472 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2473 (ppc_store_vsxregset): Likewise.
2474 (ppc_fill_vrregset): Likewise.
2475 (ppc_store_vrregset): Likewise.
2476 (ppc_fill_evrregset): Likewise.
2477 (ppc_store_evrregset): Likewise.
2478 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2479 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2482 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2484 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2485 wordsize of the inferior. Call ppc_linux_target_wordsize.
2487 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2489 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2490 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2491 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2492 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2493 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2494 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2495 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2496 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2497 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2498 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2499 (tdesc_powerpc_e500l): Remove.
2500 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2501 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2502 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2503 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2505 (ppc_arch_setup): Remove target description matching code. Fill a
2506 ppc_linux_features struct and call ppc_linux_match_description
2509 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2511 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2512 width of the requested register exceeds the width of the
2514 (mips_cannot_store_register): Likewise.
2516 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2518 * linux-mips-low.c (mips_fetch_register): New function. Update
2520 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2521 (the_low_target): Wire `mips_fetch_register'.
2523 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2525 * lynx-i386-low.c (LYNXOS_178): New macro.
2526 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2527 the layout on LynxOS-178.
2528 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2529 handle floating point registers that are not supported by
2532 2018-05-10 Tom Tromey <tom@tromey.com>
2534 * configure: Rebuild.
2536 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2539 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2540 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2541 Use it to set the expedite_regs field in the given tdesc.
2542 * x86-tdesc.h: New file.
2543 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2544 Adjust following the addition of the new expedite_regs parameter
2545 to init_target_desc.
2546 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2547 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2548 (i386_linux_read_description, amd64_linux_read_description):
2549 Adjust following the addition of the new expedite_regs parameter
2550 to init_target_desc.
2551 * lynx-i386-low.c: #include "x86-tdesc.h".
2552 (lynx_i386_arch_setup): Adjust following the addition of the new
2553 expedite_regs parameter to init_target_desc.
2554 * nto-x86-low.c: #include "x86-tdesc.h".
2555 (nto_x86_arch_setup): Adjust following the addition of the new
2556 expedite_regs parameter to init_target_desc.
2557 * win32-i386-low.c: #include "x86-tdesc.h".
2558 (i386_arch_setup): Adjust following the addition of the new
2559 expedite_regs parameter to init_target_desc.
2561 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2564 * win32-low.c (win32_create_inferior): Add call to my_wait
2565 setting last_status global.
2567 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2570 * win32-low.c (create_process): Only call gdb_tilde_expand if
2571 inferior_cwd is not NULL.
2573 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2575 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2576 registers to the cache if their values have changed.
2577 (i387_xsave_to_cache): Provide default values for x87 control
2578 registers when these features are available, but disabled.
2579 * regcache.c (supply_register_by_name_zeroed): New function.
2580 * regcache.h (supply_register_by_name_zeroed): Declare new
2583 2018-05-07 Tom Tromey <tom@tromey.com>
2585 * configure: Rebuild.
2587 2018-05-04 Tom Tromey <tom@tromey.com>
2589 * configure: Rebuild.
2591 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2592 Pedro Alves <palves@redhat.com>
2594 * linux-aarch64-low.c (aarch64_stopped_data_address):
2597 2018-04-27 Tom Tromey <tom@tromey.com>
2599 * configure: Rebuild.
2601 2018-04-23 Tom Tromey <tom@tromey.com>
2603 * configure: Rebuild.
2605 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2607 * Makefile.in (depcomp): Add "..".
2608 (all_deps_files): New and use it.
2610 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2612 * configure.srv (aarch64*-*-linux*): Don't include xml.
2613 (i[34567]86-*-cygwin*): Likewise.
2614 (i[34567]86-*-linux*): Likewise.
2615 (i[34567]86-*-lynxos*): Likewise.
2616 (i[34567]86-*-mingw32ce*): Likewise.
2617 (i[34567]86-*-mingw*): Likewise.
2618 (i[34567]86-*-nto*): Likewise.
2619 (tic6x-*-uclinux): Likewise.
2620 (x86_64-*-linux*): Likewise.
2621 (x86_64-*-mingw*): Likewise.
2622 (x86_64-*-cygwin*): Likewise.
2624 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2626 * tdesc.c: Remove xml parameter.
2628 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2630 * server.c (get_features_xml): Remove cast.
2631 * tdesc.c (void target_desc::accept): Fill in function.
2632 (tdesc_get_features_xml): Remove old xml creation.
2633 (print_xml_feature::visit_pre): Add xml vistor.
2634 * tdesc.h (struct target_desc): Make xmltarget mutable.
2635 (tdesc_get_features_xml): Remove declaration.
2637 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2639 * tdesc.c (tdesc_architecture_name): Add new function.
2640 (tdesc_osabi_name): Likewise.
2641 (tdesc_get_features_xml): Use new functions.
2643 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2645 * tdesc.c (tdesc_create_flags): Remove.
2646 (tdesc_add_flag): Likewise.
2647 (tdesc_named_type): Likewise.
2648 (tdesc_create_union): Likewise.
2649 (tdesc_create_struct): Likewise.
2650 (tdesc_create_vector): Likewise.
2651 (tdesc_add_bitfield): Likewise.
2652 (tdesc_add_field): Likewise.
2653 (tdesc_set_struct_size): Likewise.
2655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2657 * tdesc.c (~target_desc): Remove implictly deleted items.
2658 (init_target_desc): Iterate all features.
2659 (tdesc_get_features_xml): Use vector.
2660 (tdesc_create_feature): Create feature.
2661 * tdesc.h (tdesc_feature) Remove
2662 (target_desc): Add features.
2664 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2666 * Makefile.in: Add common/tdesc.c
2667 * tdesc.c (init_target_desc): init all reg_defs from register
2669 (tdesc_create_reg): Create tdesc_reg.
2670 * tdesc.h (tdesc_feature): Add register vector.
2672 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2674 * tdesc.h (struct target_desc) <features>: Change type to
2675 std::vector<std::string>.
2676 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2678 (tdesc_get_features_xml): Likewise.
2679 (tdesc_create_feature): Likewise.
2681 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2683 * regcache.c (find_register_by_number): Return a ref.
2684 (find_regno): Use references.
2685 (register_size): Likewise.
2686 (register_data): Likewise.
2687 * tdesc.c (target_desc::~target_desc): Remove free calls.
2688 (target_desc::operator==): Use std::vector compare.
2689 (init_target_desc): Use reference.
2690 (tdesc_create_reg): Use reg constructors.
2691 * tdesc.h (struct target_desc): Replace pointer with object.
2693 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2695 * regcache.c (find_register_by_number): Make static.
2696 (find_regno): Use find_register_by_number
2697 * regcache.h (struct reg): Remove declaration.
2699 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2701 * tdesc.c (target_desc::~target_desc): Move to here.
2702 (target_desc::operator==): Likewise.
2703 * tdesc.h (target_desc::~target_desc): Move from here.
2704 (target_desc::operator==): Likewise.
2706 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2708 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2710 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2712 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2714 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2715 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2716 and init_registers_s390_gs_linux64.
2718 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2720 * linux-s390-low.c (s390_fill_gs): Remove function.
2721 (s390_fill_gsbc): Remove function.
2722 (s390_regsets): Set fill functions for the guarded storage regsets
2725 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2727 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2728 the word size. Add comment.
2729 (s390_get_wordsize): New function.
2730 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2731 pswm with it. Instead, use s390_get_wordsize to determine the
2732 word size first and derive the correct tdesc from that directly.
2734 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2736 * Makefile.in: Include silent-rules.mk.
2737 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2738 (COMPILE): Add ECHO_CXX.
2739 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2740 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2741 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2742 (version-generated.c): Add ECHO_GEN.
2743 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2744 (IPAGENT_COMPILE): Add ECHO_CXX.
2745 (%-generated.c): Add ECHO_REGDAT.
2747 2018-03-14 Tom Tromey <tom@tromey.com>
2750 * ax.c (ax_printf): Special case for NULL.
2752 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2754 * linux-low.c (linux_qxfer_libraries_svr4): Use
2755 xml_escape_text_append.
2757 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2759 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2761 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2763 * server.c (handle_general_set): Remove unnecessary xstrdup.
2765 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2767 * server.c (parse_debug_format_options): Adjust to
2768 delim_string_to_char_ptr_vec changes.
2769 * thread-db.c (thread_db_load_search): Adjust to
2770 dirnames_to_char_ptr_vec changes.
2772 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2774 * target.h (target_enable_btrace, target_disable_btrace)
2775 (target_read_btrace, target_read_btrace_conf): Turn macro into
2776 inline function. Throw error if target method is not defined.
2777 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2778 check for btrace target method. Be prepared to handle exceptions
2779 from btrace target methods.
2781 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2783 * server.c (captured_main): Change order of error message printed
2784 when the current working directory cannot be found.
2786 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2788 * server.c: Include "filenames.h" and "pathstuff.h".
2789 (program_name): Delete variable.
2790 (program_path): New anonymous class.
2791 (get_exec_wrapper): Use "program_path" instead of
2793 (handle_v_run): Likewise.
2794 (captured_main): Likewise.
2795 (process_serial_event): Likewise.
2797 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2799 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2800 (OBJS): Add "pathstuff.o".
2801 * server.c (current_directory): New global variable.
2802 (captured_main): Initialize "current_directory".
2804 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2806 * tdesc.c: Use common/tdesc.h.
2807 * tdesc.h: Likewise.
2809 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2810 Simon Marchi <simon.marchi@ericsson.com>
2812 * Makefile.in: Switch order of make rules.
2814 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2816 * Makefile.in: Add common directory in build.
2817 * configure.ac: Add common reference.
2818 * configure: Regenerate.
2820 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2822 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2823 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2824 * spu-low.c (spu_target_ops): Likewise.
2825 * win32-low.c (win32_target_ops): Likewise.
2826 * server.c (supported_btrace_packets): Report packets unconditionally.
2827 * target.h (target_ops) <supports_btrace>: Remove.
2828 (target_supports_btrace): Remove.
2830 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2832 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2833 (handle_btrace_disable): Change return type to void. Use exceptions
2835 (handle_btrace_general_set): Catch exception and copy message to
2838 2018-02-08 Tom Tromey <tom@tromey.com>
2840 * linux-low.c (install_software_single_step_breakpoints): Use
2841 make_scoped_restore.
2842 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2843 (do_restore_current_thread_cleanup): Remove.
2844 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2847 2018-02-08 Tom Tromey <tom@tromey.com>
2849 * mem-break.c (set_raw_breakpoint_at): Use
2850 gdb::unique_xmalloc_ptr.
2852 2018-01-30 Pedro Alves <palves@redhat.com>
2855 * target.c (target_terminal::terminal_state): Rename to ...
2856 (target_terminal::m_terminal_state): ... this.
2858 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2860 * linux-low.c (handle_extended_wait): Surround call to
2861 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2863 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2865 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2866 linux_ptrace_attach_fail_reason_string now returning an
2868 (linux_attach): Likewise.
2869 * thread-db.c (attach_thread): Likewise.
2871 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2874 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2875 checking for fs_base/gs_base fields in struct user_regs_struct.
2876 * configure: Regenerate.
2878 2018-01-16 Yao Qi <yao.qi@linaro.org>
2881 * linux-low.c (fetch_register): Call supply_register instead of
2884 2018-01-08 Yao Qi <yao.qi@linaro.org>
2885 Simon Marchi <simon.marchi@ericsson.com>
2887 * Makefile.in (OBS): Remove selftest.o.
2888 * configure.ac: Set srv_selftest_objs if $development is true.
2889 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2890 * configure: Re-generated.
2891 * server.c (captured_main): Wrap variable selftest_filter with
2894 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2896 * server.c (parse_debug_format_options): Return std::string.
2897 (handle_monitor_command, captured_main): Adjust.
2899 2018-01-05 Pedro Alves <palves@redhat.com>
2902 * server.c (captured_main): Pass quiet=false to
2903 save_original_signals_state.
2905 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2907 * gdbreplay.c (gdbreplay_version): Update copyright year in
2909 * server.c (gdbserver_version): Likewise.
2911 2017-12-08 Tom Tromey <tom@tromey.com>
2913 * ax.c (ax_printf): Update.
2915 2017-12-07 Yao Qi <yao.qi@linaro.org>
2917 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2918 aarch64_linux_read_description.
2919 * linux-amd64-ipa.c (idx2mask): New array.
2920 (get_ipa_tdesc): Move idx2mask out.
2921 (initialize_low_tracepoint): Initialize target descriptions.
2922 * linux-i386-ipa.c (idx2mask): New array.
2923 (get_ipa_tdesc): Move idx2mask out.
2924 (initialize_low_tracepoint): Initialize target descriptions.
2926 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2928 * tdesc.c (struct tdesc_type): Change return type.
2929 (tdesc_add_flag): Change parameter type.
2930 (tdesc_add_bitfield): Likewise.
2931 (tdesc_add_field): Likewise.
2932 (tdesc_set_struct_size): Likewise.
2934 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2936 * regcache.c (registers_to_string): Remove unused variable.
2938 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2940 * inferiors.c (for_each_inferior_with_data): Remove.
2941 * inferiors.h (for_each_inferior_with_data): Remove.
2942 * server.c (handle_qxfer_threads_worker): Change parameter type.
2943 (handle_qxfer_threads_proper): Use for_each_thread.
2945 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2947 * inferiors.c (for_each_inferior): Remove.
2948 (clear_inferiors): Use for_each_thread.
2949 * inferiors.h (for_each_inferior): Remove.
2950 * linux-low.c (linux_wait_for_event_filtered): Use
2952 (linux_stabilize_threads): Likewise.
2953 * regcache.c (regcache_release): Likewise.
2954 * server.c (gdb_wants_all_threads_stopped): Likewise.
2955 (clear_pending_status_callback): Remove.
2956 (handle_status): Use for_each_thread.
2957 (captured_main): Likewise.
2958 * win32-low.c (child_init_thread_list): Likewise.
2959 (win32_clear_inferiors): Likewise.
2960 (fake_breakpoint_event): Likewise.
2962 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2964 * inferiors.h (find_inferior): Remove.
2965 * inferiors.c (find_inferior): Remove.
2967 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2969 * linux-low.c (resume_status_pending_p): Update comment.
2970 (need_step_over_p): Update comment.
2972 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2974 * linux-low.c (proceed_one_lwp): Return void, change parameter
2976 (unsuspend_and_proceed_one_lwp): Likewise.
2977 (proceed_all_lwps): Use for_each_thread.
2978 (unstop_all_lwps): Likewise.
2980 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2982 * linux-low.c (linux_resume_one_thread): Return void, take
2984 (linux_resume): Use for_each_thread.
2986 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2988 * linux-low.c (send_sigstop_callback): Return void, change
2989 parameter type. Rename to...
2990 (send_sigstop): ... this.
2991 (suspend_and_send_sigstop_callback): Return void, change parameter
2993 (suspend_and_send_sigstop): ... this.
2994 (stop_all_lwps): Use for_each_thread.
2996 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2998 * linux-low.c (lwp_running): Return bool, remove unused
3000 (linux_stabilize_threads): Use find_thread.
3002 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3004 * linux-low.c (select_singlestep_lwp_callback): Remove.
3005 (count_events_callback): Remove.
3006 (select_event_lwp_callback): Remove.
3007 (select_event_lwp): Use find_thread/for_each_thread.
3009 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3011 * linux-low.c (not_stopped_callback): Return bool, take filter
3013 (linux_wait_for_event_filtered): Use find_thread.
3014 (linux_wait_1): Likewise.
3016 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3018 * linux-low.c (same_lwp): Remove.
3019 (find_lwp_pid): Use find_thread.
3021 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3023 * linux-low.c (delete_lwp_callback): Remove.
3024 (linux_mourn): Use for_each_thread.
3026 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3028 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3029 args parameter, don't check for pid.
3030 (linux_detach): Use for_each_thread.
3032 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3034 * linux-low.c (struct counter): Remove.
3035 (second_thread_of_pid_p): Remove.
3036 (last_thread_of_process_p): Use find_thread.
3038 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3040 * inferiors.c (find_inferior_in_random): Remove.
3041 * inferiors.h (find_inferior_in_random): Remove.
3042 * linux-low.c (status_pending_p_callback): Return bool, accept
3043 parameter ptid directly.
3044 (linux_wait_for_event_filtered): Use find_thread_in_random.
3045 (linux_wait_1): Likewise.
3047 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3049 * inferiors.c (find_inferior_id): Remove.
3050 (find_thread_ptid): Move implemention from find_inferior_id to
3052 * inferiors.h (find_inferior_id): Remove.
3053 * server.c (handle_status): Use find_thread_ptid.
3054 (process_serial_event): Likewise.
3055 * thread-db.c (find_one_thread): Likewise.
3056 (thread_db_thread_handle): Likewise.
3057 * win32-low.c (thread_rec): Likewise.
3058 (child_delete_thread): Likewise.
3059 (win32_thread_alive): Likewise.
3060 (get_child_debug_event): Likewise.
3062 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3064 * linux-mips-low.c (update_watch_registers_callback): Return
3065 void, remove pid_p parameter, don't check for pid.
3066 (mips_insert_point, mips_remove_point): Use for_each_thread.
3068 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3070 * lynx.low (lynx_delete_thread_callback): Remove.
3071 (lynx_mourn): Use for_each_thread.
3073 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3075 * regcache.c (regcache_invalidate_one): Remove.
3076 (regcache_invalidate_pid): use for_each_thread.
3078 2017-11-26 Tom Tromey <tom@tromey.com>
3080 * linux-low.c (linux_create_inferior): Update.
3082 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3084 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3086 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3088 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3089 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3090 * linux-aarch64-tdesc-selftest.c: New file.
3091 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3093 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3095 * configure.srv: Add new file.
3096 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3097 * linux-aarch64-tdesc-selftest.c: New file.
3098 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3100 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3102 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3103 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3104 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3106 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3108 * configure.srv: Add new files.
3109 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3110 aarch64_linux_read_description.
3111 * linux-aarch64-low.c (aarch64_linux_read_description):
3112 Merge with aarch64_arch_setup.
3113 (aarch64_arch_setup): Call aarch64_linux_read_description.
3114 * linux-aarch64-tdesc.c: New file.
3115 * linux-aarch64-tdesc.h: New file.
3117 2017-11-24 Yao Qi <yao.qi@linaro.org>
3119 * configure.srv: Set $srv_regobj for tic6x-linux.
3120 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3121 (tic6x_read_description): Move some code to tic6x_arch_setup.
3122 (tic6x_tdesc_test): New function.
3123 (initialize_low_arch): Call selftests::register_test.
3125 2017-11-22 Yao Qi <yao.qi@linaro.org>
3127 * remote-utils.c (prepare_resume_reply): Use memcpy.
3129 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3131 * linux-low.c (kill_one_lwp_callback): Return void, take
3132 argument directly, don't filter on pid.
3133 (linux_kill): Use for_each_thread.
3135 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3137 * linux-low.c (need_step_over_p): Return bool, remove dummy
3139 (linux_resume, proceed_all_lwps): Use find_thread.
3141 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3143 * linux-low.c (resume_status_pending_p): Return bool, remove
3145 (linux_resume): Use find_thread.
3147 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3149 * linux-low.c (struct thread_resume_array): Remove.
3150 (linux_set_resume_request): Return void, take arguments
3152 (linux_resume): Use for_each_thread.
3154 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3156 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3157 return bool, remove data argument.
3158 (linux_stabilize_threads): Use find_thread.
3160 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3162 * linux-low.c (unsuspend_one_lwp): Remove.
3163 (unsuspend_all_lwps): Use for_each_thread, inline code from
3166 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3168 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3169 * linux-low.c (struct iterate_over_lwps_args): Remove.
3170 (iterate_over_lwps_filter): Remove.
3171 (iterate_over_lwps): Use find_thread.
3173 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3175 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3176 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3177 code from reset_lwp_ptrace_options_callback.
3179 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3181 * linux-arm-low.c (struct update_registers_data): Remove.
3182 (update_registers_callback): Return void, take arguments
3183 directly, don't check thread's pid.
3184 (arm_insert_point, arm_remove_point): Use for_each_thread.
3186 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3188 * win32-low.c (continue_one_thread): Return void, take argument
3190 (child_continue): Use for_each_thread.
3192 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3194 * win32-i386-low.c (update_debug_registers_callback): Rename
3196 (update_debug_registers): ... this, return void, remove pid_p arg.
3197 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3199 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3201 * inferiors.h (struct process_info): Add constructor, initialize
3203 <syscalls_to_catch>: Change type to std::vector<int>.
3204 * inferiors.c (add_process): Allocate process_info with new.
3205 (remove_process): Free process_info with delete.
3206 * linux-low.c (handle_extended_wait): Adjust.
3207 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3208 * server.c (handle_general_set): Adjust.
3210 2017-11-16 Pedro Alves <palves@redhat.com>
3212 * remote-utils.c (remote_close): Block SIGIO signals instead of
3213 uninstalling the SIGIO handler.
3215 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3217 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3219 2017-11-16 Yao Qi <yao.qi@linaro.org>
3221 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3222 (tic6x_store_gregset): Likewise.
3223 (tic6x_usrregs_info): Move it up.
3225 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3227 * Makefile.in: Update arch rules.
3228 * configure.srv: Explicitly mark arch/ files.
3230 2017-11-13 Andreas Schwab <schwab@suse.de>
3232 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3236 2017-11-06 Pedro Alves <palves@redhat.com>
3238 * config.in, configure: Regenerate.
3240 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3242 * target.c (struct thread_search): Remove.
3243 (thread_search_callback): Remove.
3244 (prepare_to_access_memory): Use for_each_thread instead of
3245 find_inferior. Inline code from thread_search_callback.
3247 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3249 * server.c (struct visit_actioned_threads_data): Remove.
3250 (visit_actioned_threads): Change prototype to take arguments
3252 (resume): Use find_thread instead of find_inferior.
3254 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3256 * server.c (queue_stop_reply_callback): Change prototype, return
3258 (find_status_pending_thread_callback): Remove.
3259 (handle_status): Replace find_inferior with find_thread and
3262 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3264 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3266 (aarch64_store_gregset): Likewise.
3267 (aarch64_fill_fpregset): Likewise.
3268 (aarch64_store_fpregset): Likewise.
3270 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3272 * gdbthread.h (find_thread, for_each_thread): New functions.
3273 * inferiors.c (thread_of_pid): Remove.
3274 (find_any_thread_of_pid): Use find_thread.
3275 * linux-low.c (num_lwps): Use for_each_thread.
3277 2017-10-17 Yao Qi <yao.qi@linaro.org>
3279 * Makefile.in: Remove one rule.
3280 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3282 2017-10-17 Yao Qi <yao.qi@linaro.org>
3284 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3285 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3287 2017-10-17 Yao Qi <yao.qi@linaro.org>
3289 * configure.srv: Rename arm.o with arch/arm.o.
3291 2017-10-17 Yao Qi <yao.qi@linaro.org>
3293 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3294 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3295 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3296 (arch-i386.o, arch-amd64.o): Remove rules.
3297 (arch/%.o): New rule.
3298 Update POSTCOMPILE and COMPILE.pre.
3299 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3300 * configure: Re-generated.
3301 * configure.srv: Replace arch-i386.o with arch/i386.o.
3302 Replace arch-amd64.o with arch/amd64.o.
3304 2017-10-16 Yao Qi <yao.qi@linaro.org>
3306 * configure: Regenerated.
3308 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3310 * inferiors.h: (struct inferior_list): Remove.
3311 (struct inferior_list_entry); Remove.
3312 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3313 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3314 get_first_inferior): Remove.
3315 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3316 find_inferior_id, find_inferior_in_random): Change signature.
3317 * inferiors.c (all_threads): Change type to
3318 std::list<thread_info *>.
3319 (get_thread): Remove macro.
3320 (find_inferior, find_inferior_id): Change signature, implement
3322 (find_inferior_in_random): Change signature, implement using
3323 find_thread_in_random.
3324 (for_each_inferior, for_each_inferior_with_data): Change
3325 signature, implement using for_each_thread.
3326 (add_inferior_to_list, remove_inferior): Remove.
3327 (add_thread, get_first_thread, thread_of_pid,
3328 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3329 (get_first_inferior, one_inferior_p, clear_inferior_list):
3331 (clear_inferiors, get_thread_process): Update.
3332 * gdbthread.h: Include <list>.
3333 (struct thread_info) <entry>: Remove field.
3335 (all_threads): Change type to std::list<thread_info *>.
3336 (get_first_inferior): Add doc.
3337 (find_thread, for_each_thread, find_thread_in_random): New
3339 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3340 * linux-arm-low.c (update_registers_callback): Update.
3341 * linux-low.c (second_thread_of_pid_p): Update.
3342 (kill_one_lwp_callback, linux_detach_lwp_callback,
3343 delete_lwp_callback, status_pending_p_callback, same_lwp,
3344 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3345 iterate_over_lwps, not_stopped_callback,
3346 resume_stopped_resumed_lwps, count_events_callback,
3347 select_singlestep_lwp_callback, select_event_lwp_callback,
3348 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3349 suspend_and_send_sigstop_callback, wait_for_sigstop,
3350 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3351 lwp_running, linux_set_resume_request, resume_status_pending_p,
3352 need_step_over_p, start_step_over, linux_resume_one_thread,
3353 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3354 reset_lwp_ptrace_options_callback): Update.
3355 * linux-mips-low.c (update_watch_registers_callback): Update.
3356 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3358 (free_register_cache_thread_one): Remove.
3359 (regcache_release): Update.
3360 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3361 handle_qxfer_threads_worker): Update.
3362 (handle_query): Update, use list iterator.
3363 (visit_actioned_threads, handle_pending_status,
3364 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3365 clear_pending_status_callback, set_pending_status_callback,
3366 find_status_pending_thread_callback, handle_status,
3367 process_serial_event): Update.
3368 * target.c (thread_search_callback): Update.
3369 * thread-db.c (thread_db_get_tls_address): Update.
3370 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3372 * win32-i386-low.c (update_debug_registers_callback): Update.
3373 * win32-low.c (delete_thread_info, child_delete_thread,
3374 continue_one_thread, suspend_one_thread,
3375 get_child_debug_event): Adjust.
3377 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3379 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3380 * inferiors.h: Include <list>.
3381 (struct process_info) <entry>: Remove field.
3383 (pid_of): Change macro to function.
3384 (ptid_of, lwpid_of): Remove macro.
3385 (all_processes): Change type to std::list<process_info *>.
3386 (ALL_PROCESSES): Remove macro.
3387 (for_each_process, find_process): New function.
3388 * inferiors.c (all_processes): Change type to
3389 std::list<process_info *>.
3390 (find_thread_process): Adjust.
3391 (add_process): Likewise.
3392 (remove_process): Likewise.
3393 (find_process_pid): Likewise.
3394 (get_first_process): Likewise.
3395 (started_inferior_callback): Remove.
3396 (have_started_inferiors_p): Adjust.
3397 (attached_inferior_callback): Remove.
3398 (have_attached_inferiors_p): Adjust.
3399 * linux-low.c (check_zombie_leaders): Likewise.
3400 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3401 (x86_linux_update_xmltarget): Adjust.
3402 * server.c (handle_query): Likewise.
3403 (gdb_reattached_process): Remove.
3404 (handle_status): Adjust.
3405 (kill_inferior_callback): Likewise.
3406 (detach_or_kill_inferior): Remove.
3407 (print_started_pid): Likewise.
3408 (print_attached_pid): Likewise.
3409 (detach_or_kill_for_exit): Update.
3410 (process_serial_event): Likewise.
3411 * linux-arm-low.c (arm_new_fork): Likewise.
3413 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3415 * dll.h: Include <list>.
3416 (struct dll_info): Add constructor.
3417 <entry>: Remove field.
3418 (all_dlls): Change type to std::list<dll_info>.
3419 * dll.c: Include <algorithm>.
3420 (get_dll): Remove macro.
3421 (all_dlls): Change type to std::list<dll_info *>.
3422 (free_one_dll): Remove.
3423 (match_dll): Likewise.
3424 (loaded_dll): Adjust.
3425 (unloaded_dll): Adjust to all_dlls type change, use
3426 std::find_if. Inline code from match_dll.
3427 (clear_dlls): Adjust to all_dlls type change.
3428 * server.c (emit_dll_description): Remove.
3429 (handle_qxfer_libraries): Adjust to all_dlls type change,
3430 integrate emit_dll_description's functionality.
3432 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3434 * linux-low.h (struct linux_target_ops) <delete_process>: New
3436 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3437 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3438 (struct linux_target_ops): Add delete_process callback.
3439 * linux-arm-low.c (arm_delete_process): New.
3440 (struct linux_target_ops): Add delete_process callback.
3441 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3442 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3443 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3444 * linux-mips-low.c (mips_linux_delete_process): New.
3445 (struct linux_target_ops): Add delete_process callback.
3446 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3447 * linux-s390-low.c (struct linux_target_ops): Likewise.
3448 * linux-sh-low.c (struct linux_target_ops): Likewise.
3449 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3450 * linux-tile-low.c (struct linux_target_ops): Likewise.
3451 * linux-x86-low.c (x86_linux_delete_process): New.
3452 (struct linux_target_ops): Add delete_process callback.
3453 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3455 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3457 * linux-aarch64-low.c (the_low_target): Add thread delete
3459 * linux-arm-low.c (arm_delete_thread): New function.
3460 (the_low_target): Add thread delete callback.
3461 * linux-bfin-low.c (the_low_target): Likewise.
3462 * linux-crisv32-low.c (the_low_target): Likewise.
3463 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3465 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3467 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3468 * linux-mips-low.c (mips_linux_delete_thread): New function.
3469 (the_low_target): Add thread delete callback.
3470 * linux-ppc-low.c (the_low_target): Likewise.
3471 * linux-s390-low.c (the_low_target): Likewise.
3472 * linux-sh-low.c (the_low_target): Likewise.
3473 * linux-tic6x-low.c (the_low_target): Likewise.
3474 * linux-tile-low.c (the_low_target): Likewise.
3475 * linux-x86-low.c (the_low_target): Likewise.
3476 * linux-xtensa-low.c (the_low_target): Likewise.
3478 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3480 * win32-low.c: Include "common-inferior.h".
3482 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3484 * inferiors.c (set_inferior_cwd): New function.
3485 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3486 (handle_query): Inform that QSetWorkingDir is supported.
3487 * win32-low.c (create_process): Pass the inferior's cwd to
3490 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3492 * inferiors.c (current_inferior_cwd): New global variable.
3493 (get_inferior_cwd): New function.
3494 * inferiors.h (struct process_info) <cwd>: New field.
3496 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3498 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3499 (OBS): Add gdb_tilde_expand.o.
3501 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3503 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3504 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3506 2017-09-29 Pedro Alves <palves@redhat.com>
3508 * ax.c (gdb_parse_agent_expr): Constify.
3509 * ax.h (gdb_parse_agent_expr): Constify.
3510 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3512 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3513 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3514 * remote-utils.h (read_ptid): Constify.
3515 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3516 (process_point_options, process_serial_event): Constify.
3517 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3518 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3519 (cmd_qtbuffer): Constify.
3521 2017-09-29 Pedro Alves <palves@redhat.com>
3523 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3526 2017-09-29 Pedro Alves <palves@redhat.com>
3528 * linux-low.c (handle_extended_wait): Pass parent thread instead
3529 of process to thread_db_notice_clone.
3530 * linux-low.h (thread_db_notice_clone): Replace parent process
3531 parameter with parent thread parameter.
3532 * thread-db.c (find_one_thread): Add comment.
3533 (thread_db_notice_clone): Replace parent process parameter with
3534 parent thread parameter. Temporarily switch to the parent thread.
3536 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3538 * gdbthread.h: Include "common-gdbthread.h".
3539 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3540 "if" when validating the ptid.
3541 * remote-utils.c: Include "gdbthread.h".
3542 (prepare_resume_reply): Use "switch_to_thread".
3543 * target.c (done_accessing_memory): Likewise.
3545 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3547 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3548 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3549 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3550 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3551 s390x-gs-linux64-ipa.o to ipa_obj.
3552 * linux-s390-low.c (HWCAP_S390_GS): New define.
3553 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3555 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3556 (s390_arch_setup): Check for guarded-storage support and choose
3558 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3559 init_registers_s390x_gs_linux64.
3560 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3562 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3563 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3565 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3567 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3569 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3571 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3572 (thread_db_thread_handle): Declare.
3573 * linux-low.c (linux_target_ops): Initialize thread_handle.
3574 * server.c (handle_qxfer_threads_worker): Add support for
3576 * target.h (struct target_ops): Add new function pointer,
3578 (target_thread_handle): Define.
3579 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3581 (thread_db_thread_handle): New function.
3583 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3585 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3586 * linux-low.h (thread_db_notice_clone): Declare.
3587 * thread-db.c (thread_db_notice_clone): New function.
3589 2017-09-21 Pedro Alves <palves@redhat.com>
3591 * server.c (gdb_read_memory, handle_status, process_serial_event)
3592 (handle_serial_event, handle_target_event): Adjust to
3593 set_desired_thread prototype change.
3594 * target.c (set_desired_thread): Remove 'use_general' parameter
3596 * target.h (set_desired_thread): Remove 'use_general' parameter.
3598 2017-09-20 Tom Tromey <tom@tromey.com>
3600 * target.c (target_terminal::terminal_state): Define.
3601 (target_terminal::init): Rename from target_terminal_init.
3602 (target_terminal::inferior): Rename from
3603 target_terminal_inferior.
3604 (target_terminal::ours): Rename from target_terminal_ours.
3605 (target_terminal::ours_for_output, target_terminal::info): New.
3607 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3609 * server.c (accumulate_file_name_length): Remove.
3610 (emit_dll_description): Adjust to std::string change.
3611 (handle_qxfer_libraries): Use std::string to hold document.
3613 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3615 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3616 return type of xml_escape_text.
3617 * server.c (emit_dll_description): Likewise.
3619 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3621 * server.c (captured_main): Accept argument for --selftest.
3622 Update run_tests call.
3623 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3624 when registering selftests.
3626 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3628 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3629 instead of "VEC" for "target_desc.reg_defs".
3630 (regcache_cpy): Likewise.
3631 (registers_to_string): Likewise.
3632 (registers_from_string): Likewise.
3633 (find_regno): Likewise.
3634 (supply_regblock): Likewise.
3635 (regcache_raw_read_unsigned): Likewise.
3636 * tdesc.c (init_target_desc): Likewise.
3637 (tdesc_create_reg): Likewise.
3638 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3639 (struct target_desc) <reg_defs>: Convert to "std::vector".
3640 (target_desc): Do not initialize "reg_defs".
3641 (~target_desc): Update code to use "std::vector" instead of "VEC"
3642 for "target_desc.reg_defs".
3643 (operator==): Likewise.
3645 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3647 * inferiors.h (thread_to_gdb_id): Remove.
3648 * inferiors.c (thread_to_gdb_id): Remove.
3649 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3650 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3651 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3653 * nto-low.c (nto_fetch_registers, nto_store_registers,
3654 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3656 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3658 * inferiors.h (gdb_id_to_thread_id): Remove.
3659 * inferiors.c (gdb_id_to_thread_id): Remove.
3660 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3661 removal. Move pid declaration closer to where it's used.
3663 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3665 * server.c (handle_detach): New function.
3666 (process_serial_event): Move code out, call handle_detach.
3668 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3670 * server.c (require_running): Rename to ...
3671 (require_running_or_return): ... this ...
3672 (require_running_or_break): ... and this.
3673 (handle_query, process_serial_event): Adjust.
3675 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3677 * linux-low.c (linux_set_resume_request): Remove unused
3680 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3682 * server.c (first_thread_of): Remove.
3683 (process_serial_event): Replace usage of first_thread_of with
3684 find_any_thread_of_pid.
3685 * tracepoint.c (same_process_p): Remove.
3686 (gdb_agent_about_to_close): Replace usage of same_process_p with
3687 find_any_thread_of_pid.
3688 * linux-x86-low.c (same_process_callback): Remove.
3689 (x86_arch_setup_process_callback): Replace usage of
3690 same_process_callback with find_any_thread_of_pid.
3691 * thread-db.c (any_thread_of): Remove.
3692 (switch_to_process): Replace usage of any_thread_of with
3693 find_any_thread_of_pid.
3694 * inferiors.c (thread_pid_matches_callback): Remove.
3695 (find_thread_process): Adjust to use find_any_thread_of_pid.
3697 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3699 * regcache.c (get_thread_regcache): Guard calls to "memset"
3702 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3704 * linux-low.c (handle_extended_wait): Use
3705 "allocate_target_description" instead of "XNEW".
3706 * linux-x86-low.c (initialize_low_arch): Likewise.
3708 2017-09-05 Yao Qi <yao.qi@linaro.org>
3710 * configure.srv (srv_i386_regobj): Remove.
3711 (srv_amd64_regobj): Remove.
3712 (srv_regobj): Set it to "" for x86 non-linux targets.
3713 * linux-x86-tdesc.c (i386_linux_read_description):
3714 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3715 (init_registers_i386): Remove the declaration.
3716 (tdesc_i386): Remove the declaration.
3717 (lynx_i386_arch_setup): Call i386_create_target_description.
3718 * nto-x86-low.c: Likewise.
3719 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3720 [!__x86_64__]: include arch/i386.h.
3721 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3723 2017-09-05 Yao Qi <yao.qi@linaro.org>
3725 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3726 i386/amd64-XXX-linux from it.
3728 2017-09-05 Yao Qi <yao.qi@linaro.org>
3730 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3732 (ipa_amd64_linux_regobj): Remove.
3733 (ipa_x32_linux_regobj): Remove.
3735 2017-09-05 Yao Qi <yao.qi@linaro.org>
3737 * Makefile.in (arch-amd64.o): New rule.
3738 * configure.srv: Append arch-amd64.o.
3739 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3740 (get_ipa_tdesc): Call amd64_linux_read_description.
3741 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3742 and init_registers_amd64_XXX.
3743 * linux-x86-low.c (x86_linux_read_description): Call
3744 amd64_linux_read_description.
3745 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3746 (initialize_low_arch): Don't call init_registers_x32_XXX and
3747 init_registers_amd64_XXX.
3748 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3749 and tdesc_amd64_XXX.
3750 [__x86_64__] (amd64_tdesc_test): New function.
3751 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3752 and init_registers_amd64_XXX.
3753 * linux-x86-tdesc.c: Include arch/amd64.h.
3754 (xcr0_to_tdesc_idx): New function.
3755 (i386_linux_read_description): New function.
3756 (amd64_get_ipa_tdesc_idx): New function.
3757 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3758 (amd64_get_ipa_tdesc): Declare.
3760 2017-09-05 Yao Qi <yao.qi@linaro.org>
3762 * configure.srv (srv_i386_linux_xmlfiles): Remove
3763 i386/i386-XXX-linux.xml from it.
3765 2017-09-05 Yao Qi <yao.qi@linaro.org>
3767 * configure.srv: Set srv_i386_linux_regobj empty if $development
3769 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3770 initialize_low_tdesc.
3771 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3772 with #if initialize_low_tdesc.
3773 * linux-x86-tdesc-selftest.c: New file.
3774 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3776 2017-09-05 Yao Qi <yao.qi@linaro.org>
3778 * Makefile.in (arch-i386.o): New rule.
3779 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3780 (x86_64-*-linux*): Likewise.
3781 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3782 include arch/i386.h.
3783 (i386_linux_read_description): Remove code and call
3784 i386_create_target_description.
3785 * tdesc.c (allocate_target_description): New function.
3786 * tdesc.h (set_tdesc_architecture): Remove declaration.
3787 (set_tdesc_osabi): Likewise.
3789 2017-09-05 Yao Qi <yao.qi@linaro.org>
3791 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3792 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3793 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3795 * server.c (get_features_xml): Call tdesc_get_features_xml.
3796 * tdesc.c (set_tdesc_architecture): New function.
3797 (set_tdesc_osabi): New function.
3798 (tdesc_get_features_xml): New function.
3799 (tdesc_create_feature): Add an argument.
3800 * tdesc.h (struct target_desc) <features>: New field.
3801 <arch, osabi>: New field.
3802 (~target_desc): xfree features, arch, and osabi.
3803 (target_desc::oerator==): Don't compare .xmltarget.
3804 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3805 (set_tdesc_osabi): Likewise.
3806 (tdesc_get_features_xml): Likewise.
3808 2017-09-05 Yao Qi <yao.qi@linaro.org>
3810 * linux-x86-tdesc.c: Include selftest.h.
3811 (i386_tdesc_test): New function.
3812 (initialize_low_tdesc): Call selftests::register_test.
3813 * tdesc.h: Include regdef.h.
3814 (target_desc): Override operator == and !=.
3816 2017-09-05 Yao Qi <yao.qi@linaro.org>
3818 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3819 (ipa_obj): Likewise.
3820 * linux-i386-ipa.c: Include common/x86-xstate.h
3821 (get_ipa_tdesc): Call i386_linux_read_description.
3822 (initialize_low_tracepoint): Don't call init_registers_XXX
3823 functions, call initialize_low_tdesc instead.
3824 * linux-x86-low.c (x86_linux_read_description): Call
3825 i386_linux_read_description.
3826 (initialize_low_arch): Don't call init_registers_i386_XXX
3827 functions, call initialize_low_tdesc.
3828 * linux-x86-tdesc.c: New file.
3829 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3830 (i386_get_ipa_tdesc_idx): Declare.
3831 (i386_get_ipa_tdesc): Declare.
3832 (initialize_low_tdesc): Declare.
3834 2017-09-05 Yao Qi <yao.qi@linaro.org>
3836 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3839 2017-09-05 Yao Qi <yao.qi@linaro.org>
3841 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3842 * regcache.c (get_thread_regcache): Use VEC_length.
3843 (init_register_cache): Likewise.
3844 (regcache_cpy): Likewise.
3845 (registers_to_string): Iterate reg_defs via VEC_iterate.
3846 (find_regno): Likewise.
3847 (find_register_by_number): Use VEC_index.
3848 (register_size): Call find_register_by_number.
3849 (register_data): Call find_register_by_number.
3850 (supply_regblock): Use VEC_length.
3851 (regcache_raw_read_unsigned): Likewise.
3852 * tdesc.c (init_target_desc): Iterate reg_defs via
3854 (default_description): Update initializer.
3855 (copy_target_description): Don't update field num_registers.
3856 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3857 <num_registers>: Remove.
3859 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3861 * Makefile.in (.SECONDARY): Define target.
3863 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3865 * linux-low.c (linux_wait_1): Adjust.
3866 * server.c (queue_stop_reply_callback): Adjust.
3868 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3870 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3871 QEnvironmentUnset and QEnvironmentReset packets.
3872 (handle_query): Inform remote that QEnvironmentHexEncoded,
3873 QEnvironmentUnset and QEnvironmentReset are supported.
3875 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3877 * inferiors.h (inferior_target_data): Rename to ...
3878 (thread_target_data): ... this.
3879 (inferior_regcache_data): Rename to ...
3880 (thread_regcache_data): ... this.
3881 (set_inferior_regcache_data): Rename to ...
3882 (set_thread_regcache_data): ... this.
3883 * inferiors.c (inferior_target_data): Rename to ...
3884 (thread_target_data): ... this.
3885 (inferior_regcache_data): Rename to ...
3886 (thread_regcache_data): ... this.
3887 (set_inferior_regcache_data): Rename to ...
3888 (set_thread_regcache_data): ... this.
3889 (free_one_thread): Update.
3890 * linux-low.h (get_thread_lwp): Update.
3891 * regcache.c (get_thread_regcache): Update.
3892 (regcache_invalidate_thread): Update.
3893 (free_register_cache_thread): Update.
3894 * win32-i386-low.c (update_debug_registers_callback): Update.
3895 (win32_get_current_dr): Update.
3896 * win32-low.c (thread_rec): Update.
3897 (delete_thread_info): Update.
3898 (continue_one_thread): Update.
3899 (suspend_one_thread): Update.
3901 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3903 * inferiors.c (set_inferior_target_data): Remove.
3904 * inferiors.h (set_inferior_target_data): Remove.
3906 2017-08-18 Yao Qi <yao.qi@linaro.org>
3908 * Makefile.in (OBS): Add selftest.o.
3909 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3910 * configure, config.in: Re-generated.
3911 * server.c: Include common/sefltest.h.
3912 (captured_main): Handle option --selftest.
3914 2017-08-09 Yao Qi <yao.qi@linaro.org>
3916 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3917 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3918 i386-avx-mpx.o and i386-mmx.o.
3919 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3920 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3921 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3922 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3923 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3924 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3925 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3926 i386/amd64-avx-mpx.xml.
3928 2017-08-09 Yao Qi <yao.qi@linaro.org>
3930 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3931 and x32-avx-avx512.o.
3932 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3933 i386/x32-avx-avx512.xml.
3935 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3937 * tracepoint.h (enum class fast_tpoint_collect_result): New
3939 (fast_tracepoint_collecting): Change return type to
3940 fast_tpoint_collect_result.
3941 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3942 * linux-low.h: Include tracepoint.h.
3943 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3944 fast_tpoint_collect_result.
3945 * linux-low.c (handle_tracepoints): Adjust.
3946 (linux_fast_tracepoint_collecting): Change return type to
3947 fast_tpoint_collect_result.
3948 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3949 linux_wait_1, stuck_in_jump_pad_callback,
3950 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3951 proceed_one_lwp): Adjust to type change.
3953 2017-07-10 Yao Qi <yao.qi@linaro.org>
3955 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3957 2017-06-29 Yao Qi <yao.qi@linaro.org>
3959 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3961 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3963 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3965 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3967 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3969 * linux-low.c (linux_create_inferior): Adjust code to access the
3970 environment information via 'gdb_environ' class.
3971 * lynx-low.c (lynx_create_inferior): Likewise.
3972 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3973 (get_environ): Return a pointer to 'our_environ'.
3974 (captured_main): Initialize 'our_environ'.
3975 * server.h (get_environ): Adjust prototype.
3976 * spu-low.c (spu_create_inferior): Adjust code to access the
3977 environment information via 'gdb_environ' class.
3979 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3981 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3982 usage of "register" keyword.
3984 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3986 * configure: Re-generate.
3988 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3990 * configure: Re-generate.
3992 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3994 * Makefile.in (COMPILE.pre): Add "-x c++".
3996 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3998 * fork-child.c: Conditionally include <signal.h>.
4000 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4002 * server.c (handle_general_set): Handle new packet
4003 "QStartupWithShell".
4004 (handle_query): Add "QStartupWithShell" to the list of supported
4006 (gdbserver_usage): Add help text explaining the
4007 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4009 (captured_main): Recognize and act upon the presence of the new
4012 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4013 Pedro Alves <palves@redhat.com>
4015 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4016 * configure: Regenerate.
4017 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4019 (i[34567]86-*-lynxos*): Likewise.
4020 (spu*-*-*): Likewise.
4021 * fork-child.c: New file.
4022 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4024 (linux_ptrace_fun): New function.
4025 (linux_create_inferior): Adjust function prototype to reflect
4026 change on "target.h". Adjust function code to use
4028 (linux_request_interrupt): Delete "signal_pid".
4029 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4030 (lynx_ptrace_fun): New function.
4031 (lynx_create_inferior): Adjust function prototype to reflect
4032 change on "target.h". Adjust function code to use
4034 * nto-low.c (nto_create_inferior): Adjust function prototype and
4035 code to reflect change on "target.h". Update comments.
4036 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4037 "common-terminal.h" and "environ.h".
4038 (terminal_fd): Moved to fork-child.c.
4039 (old_foreground_pgrp): Likewise.
4040 (restore_old_foreground_pgrp): Likewise.
4041 (last_status): Make it global.
4042 (last_ptid): Likewise.
4043 (our_environ): New variable.
4044 (startup_with_shell): Likewise.
4045 (program_name): Likewise.
4046 (program_argv): Rename to...
4047 (program_args): ...this.
4048 (wrapper_argv): New variable.
4049 (start_inferior): Delete function.
4050 (get_exec_wrapper): New function.
4051 (get_exec_file): Likewise.
4052 (get_environ): Likewise.
4053 (prefork_hook): Likewise.
4054 (post_fork_inferior): Likewise.
4055 (postfork_hook): Likewise.
4056 (postfork_child_hook): Likewise.
4057 (handle_v_run): Update code to deal with arguments coming from the
4058 remote host. Update calls from "start_inferior" to
4060 (captured_main): Likewise. Initialize environment variable. Call
4062 * server.h (post_fork_inferior): New prototype.
4063 (get_environ): Likewise.
4064 (last_status): Declare.
4065 (last_ptid): Likewise.
4066 (signal_pid): Likewise.
4067 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4068 (spu_ptrace_fun): New function.
4069 (spu_create_inferior): Adjust function prototype to reflect change
4070 on "target.h". Adjust function code to use "fork_inferior".
4071 * target.c (target_terminal_init): New function.
4072 (target_terminal_inferior): Likewise.
4073 (target_terminal_ours): Likewise.
4074 * target.h: Include <vector>.
4075 (struct target_ops) <create_inferior>: Update prototype.
4076 (create_inferior): Update macro.
4077 * utils.c (gdb_flush_out_err): New function.
4078 * win32-low.c (win32_create_inferior): Adjust function prototype
4079 and code to reflect change on "target.h".
4081 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4083 * inferiors.c (switch_to_thread): New function.
4085 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4087 * Makefile.in (SFILE): Add "common/job-control.c".
4088 (OBS): Add "job-control.o".
4090 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4092 * Makefile: Remove "@host_makefile_frag@".
4094 2017-05-05 Pedro Alves <palves@redhat.com>
4096 * configure: Regenerate.
4098 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4100 * configure: Regenerate.
4102 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4104 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4105 software_single_step change of return type to
4106 std::vector<CORE_ADDR>.
4107 * linux-low.c (install_software_single_step_breakpoints):
4109 * linux-low.h (install_software_single_step_breakpoints):
4112 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4114 * remote-utils.c: Include "gdb_termios.h" instead of
4116 * terminal.h: Delete file.
4118 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4120 * server.c: Include <vector>.
4121 <program_argv, wrapper_argv>: Convert to std::vector.
4122 (start_inferior): Rewrite function to use C++.
4123 (handle_v_run): Likewise. Update code that calculates the argv
4124 based on the vRun packet; use C++.
4125 (captured_main): Likewise.
4127 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4129 * server.c (handle_v_cont): Initialize thread_resume::thread
4132 2017-04-05 Pedro Alves <palves@redhat.com>
4134 * configure: Regenerate.
4136 2017-04-05 Pedro Alves <palves@redhat.com>
4138 * gdbreplay.c (sync_error): Constify.
4139 * linux-x86-low.c (push_opcode): Constify.
4141 2017-04-05 Pedro Alves <palves@redhat.com>
4143 * win32-low.c (get_child_debug_event)
4144 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4145 Report TARGET_WAITKIND_SPURIOUS instead.
4147 2017-04-05 Pedro Alves <palves@redhat.com>
4149 * remote-utils.c (remote_prepare, remote_open): Constify.
4150 * remote-utils.h (remote_prepare, remote_open): Constify.
4151 * server.c (captured_main): Constify 'port' handling.
4153 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4155 * Makefile.in (clean): Clear .deps.
4157 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4159 * .gitignore: Remove generated files, replace with wildcard.
4160 * (clean): Replace removal of generated files with wildcard.
4161 (version.c): Replace with...
4162 (version-generated.c): ...this.
4163 (xml-builtin.c): Replace with...
4164 (xml-builtin-generated.c): ...this.
4165 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4166 (%.c: *regformats*): Replace with...
4167 (%-generated.c: *regformats*): ...this.
4169 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4171 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4172 (xtensa_fill_gregset): Call collect_register_by_name for
4174 (xtensa_store_gregset): Call supply_register_by_name for
4177 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4179 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4180 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4181 (xtensa_store_gregset): Call supply_register for all registers in
4182 a0_regnum..a0_regnum + C0_NREGS range.
4184 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4186 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4187 (ax-ipa.o: ax.c): Remove.
4188 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4189 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4190 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4191 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4192 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4194 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4196 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4197 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4198 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4199 (errors-ipa.o: ../common/errors.c): Remove.
4200 (format-ipa.o: ../common/format.c): Remove.
4201 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4203 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4205 * Makefile.in (%-ipa.o: %.c): New rule.
4206 (tracepoint-ipa.o: tracepoint.c): Remove.
4207 (utils-ipa.o: utils.c): Remove.
4208 (remote-utils-ipa.o: remote-utils.c): Remove.
4209 (regcache-ipa.o: regcache.c): Remove.
4210 (i386-linux-ipa.o: i386-linux.c): Remove.
4211 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4212 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4213 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4214 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4215 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4216 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4217 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4218 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4219 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4220 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4221 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4222 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4223 (aarch64-ipa.o: aarch64.c): Remove.
4224 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4225 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4226 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4227 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4228 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4229 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4230 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4231 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4232 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4233 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4234 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4235 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4236 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4237 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4238 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4239 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4240 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4241 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4242 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4243 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4244 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4245 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4246 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4247 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4248 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4249 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4250 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4251 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4252 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4253 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4254 (tdesc-ipa.o: tdesc.c): Remove.
4255 (x32-linux-ipa.o: x32-linux.c): Remove.
4256 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4257 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4259 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4261 * Makefile.in (%.o: ../arch/%.c): New rule.
4262 (arm.o: ../arch/arm.c): Remove.
4263 (arm-linux.o: ../arch/arm-linux.c): Remove.
4264 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4265 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4267 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4269 * Makefile.in (%.o: ../nat/%.c): New rule.
4270 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4271 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4272 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4273 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4274 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4275 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4276 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4277 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4278 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4279 (linux-personality.o: ../nat/linux-personality.c): Remove.
4280 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4281 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4282 (x86-linux.o: ../nat/x86-linux.c): Remove.
4283 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4284 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4286 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4288 * Makefile.in (%.o: ../common/%.c): New rule.
4289 (signals.o: ../common/signals.c): Remove.
4290 (print-utils.o: ../common/print-utils.c): Remove.
4291 (rsp-low.o: ../common/rsp-low.c): Remove.
4292 (common-utils.o: ../common/common-utils.c): Remove.
4293 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4294 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4295 (vec.o: ../common/vec.c): Remove.
4296 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4297 (xml-utils.o: ../common/xml-utils.c): Remove.
4298 (ptid.o: ../common/ptid.c): Remove.
4299 (buffer.o: ../common/buffer.c): Remove.
4300 (format.o: ../common/format.c): Remove.
4301 (filestuff.o: ../common/filestuff.c): Remove.
4302 (agent.o: ../common/agent.c): Remove.
4303 (errors.o: ../common/errors.c): Remove.
4304 (environ.o: ../common/environ.c): Remove.
4305 (common-debug.o: ../common/common-debug.c): Remove.
4306 (cleanups.o: ../common/cleanups.c): Remove.
4307 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4308 (fileio.o: ../common/fileio.c): Remove.
4309 (common-regcache.o: ../common/common-regcache.c): Remove.
4310 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4311 (new-op.o: ../common/new-op.c): Remove.
4312 (btrace-common.o: ../common/btrace-common.c): Remove.
4314 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4316 * Makefile.in (%.o: ../target/%.c): New rule.
4317 (waitstatus.o: ../target/waitstatus.c): Remove.
4319 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4322 (%.c: ../regformats/%.dat,
4323 (%.c: ../regformats/arm/%.dat,
4324 (%.c: ../regformats/i386/%.dat,
4325 (%.c: ../regformats/rs6000/%.dat): New rules.
4326 (aarch64.c): Remove.
4327 (reg-arm.c): Remove.
4328 (arm-with-iwmmxt.c): Remove.
4329 (arm-with-vfpv2.c): Remove.
4330 (arm-with-vfpv3.c): Remove.
4331 (arm-with-neon.c): Remove.
4332 (reg-bfin.c): Remove.
4333 (reg-cris.c): Remove.
4334 (reg-crisv32.c): Remove.
4336 (i386-linux.c): Remove.
4337 (i386-avx.c): Remove.
4338 (i386-avx-linux.c): Remove.
4339 (i386-avx-avx512.c): Remove.
4340 (i386-avx-avx512-linux.c): Remove.
4341 (i386-mpx.c): Remove.
4342 (i386-mpx-linux.c): Remove.
4343 (i386-avx-mpx-avx512-pku.c): Remove.
4344 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4345 (i386-avx-mpx.c): Remove.
4346 (i386-avx-mpx-linux.c): Remove.
4347 (i386-mmx.c): Remove.
4348 (i386-mmx-linux.c): Remove.
4349 (reg-ia64.c): Remove.
4350 (reg-m32r.c): Remove.
4351 (reg-m68k.c): Remove.
4353 (mips-linux.c): Remove.
4354 (mips-dsp-linux.c): Remove.
4355 (mips64-linux.c): Remove.
4356 (mips64-dsp-linux.c): Remove.
4357 (nios2-linux.c): Remove.
4358 (powerpc-32.c): Remove.
4359 (powerpc-32l.c): Remove.
4360 (powerpc-altivec32l.c): Remove.
4361 (powerpc-cell32l.c): Remove.
4362 (powerpc-vsx32l.c): Remove.
4363 (powerpc-isa205-32l.c): Remove.
4364 (powerpc-isa205-altivec32l.c): Remove.
4365 (powerpc-isa205-vsx32l.c): Remove.
4366 (powerpc-e500l.c): Remove.
4367 (powerpc-64l.c): Remove.
4368 (powerpc-altivec64l.c): Remove.
4369 (powerpc-cell64l.c): Remove.
4370 (powerpc-vsx64l.c): Remove.
4371 (powerpc-isa205-64l.c): Remove.
4372 (powerpc-isa205-altivec64l.c): Remove.
4373 (powerpc-isa205-vsx64l.c): Remove.
4374 (s390-linux32.c): Remove.
4375 (s390-linux32v1.c): Remove.
4376 (s390-linux32v2.c): Remove.
4377 (s390-linux64.c): Remove.
4378 (s390-linux64v1.c): Remove.
4379 (s390-linux64v2.c): Remove.
4380 (s390-te-linux64.c): Remove.
4381 (s390-vx-linux64.c): Remove.
4382 (s390-tevx-linux64.c): Remove.
4383 (s390x-linux64.c): Remove.
4384 (s390x-linux64v1.c): Remove.
4385 (s390x-linux64v2.c): Remove.
4386 (s390x-te-linux64.c): Remove.
4387 (s390x-vx-linux64.c): Remove.
4388 (s390x-tevx-linux64.c): Remove.
4389 (tic6x-c64xp-linux.c): Remove.
4390 (tic6x-c64x-linux.c): Remove.
4391 (tic6x-c62x-linux.c): Remove.
4393 (reg-sparc64.c): Remove.
4394 (reg-spu.c): Remove.
4396 (amd64-linux.c): Remove.
4397 (amd64-avx.c): Remove.
4398 (amd64-avx-linux.c): Remove.
4399 (amd64-avx-avx512.c): Remove.
4400 (amd64-avx-avx512-linux.c): Remove.
4401 (amd64-mpx.c): Remove.
4402 (amd64-mpx-linux.c): Remove.
4403 (amd64-avx-mpx-avx512-pku.c): Remove.
4404 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4405 (amd64-avx-mpx.c): Remove.
4406 (amd64-avx-mpx-linux.c): Remove.
4408 (x32-linux.c): Remove.
4409 (x32-avx.c): Remove.
4410 (x32-avx-linux.c): Remove.
4411 (x32-avx-avx512.c): Remove.
4412 (x32-avx-avx512-linux.c): Remove.
4413 (reg-xtensa.c): Remove.
4414 (reg-tilegx.c): Remove.
4415 (reg-tilegx32.c): Remove.
4417 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4419 * Makefile.in (SFILES): Add "common/environ.c".
4420 (OBJS): Add "common/environ.h".
4422 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4424 * configure.ac: Check if the fs_base and gs_base members of
4425 `struct user_regs_struct' exist.
4426 * config.in: Regenerated.
4427 * configure: Likewise.
4429 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4431 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4433 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4434 (get_next_pcs_syscall_next_pc): Likewise.
4436 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4438 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4439 * nto-x86-low.c: Likewise.
4441 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4443 * Makefile.in: Include disable-implicit-rules.mk.
4445 2016-11-23 Pedro Alves <palves@redhat.com>
4447 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4448 (debug_vprintf): Use std::chrono::steady_clock instead of
4449 gettimeofday. Use '.' instead of ':'.
4450 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4451 (get_timestamp): Use std::chrono::steady_clock instead of
4454 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4456 * Makefile.in: Fix whitespace formatting.
4458 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4460 * Makefile.in (SFILES, OBS): Flatten list and order
4463 2016-11-23 Pedro Alves <palves@redhat.com>
4465 * event-loop.c (handle_file_event): Use warning.
4466 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4467 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4470 2016-11-23 Pedro Alves <palves@redhat.com>
4472 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4474 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4475 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4476 debug_printf and debug_flush for debug output.
4477 * server.c (handle_general_set): Likewise.
4478 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4481 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4483 * Makefile.in (.c.o): Replace rule with ...
4484 (%.o: %.c): ... this one.
4486 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4488 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4489 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4491 * configure.ac: Remove checks for the make program.
4492 * configure: Re-generate.
4494 2016-10-28 Pedro Alves <palves@redhat.com>
4496 * Makefile.in (CXX_DIALECT): Get from configure.
4497 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4498 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4499 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4500 * config.in: Regenerate.
4501 * configure: Regenerate.
4503 2016-10-27 Yao Qi <yao.qi@linaro.org>
4505 * linux-low.c (linux_supports_range_stepping): Return true if
4506 can_software_single_step return true.
4508 2016-10-27 Yao Qi <yao.qi@linaro.org>
4510 * inferiors.c (find_inferior_in_random): New function.
4511 * inferiors.h (find_inferior_in_random): Declare.
4512 * linux-low.c (linux_wait_for_event_filtered): Call
4513 find_inferior_in_random instead of find_inferior.
4515 2016-10-27 Yao Qi <yao.qi@linaro.org>
4517 * linux-low.c (linux_wait_1): If single-step breakpoints are
4518 inserted, remove them.
4520 2016-10-26 Pedro Alves <palves@redhat.com>
4522 * linux-low.c (handle_extended_wait): Link parent/child fork
4524 (linux_wait_1): Unlink them.
4525 (linux_set_resume_request): Ignore resume requests for
4526 already-resumed and unhandled fork child threads.
4527 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4528 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4530 (handle_v_requests) <vCont>: Don't call require_running.
4531 * server.h (in_queued_stop_replies): New declaration.
4533 2016-10-24 Yao Qi <yao.qi@linaro.org>
4536 * linux-aarch64-low.c (append_insns): Cast the return value to
4539 2016-10-10 Yao Qi <yao.qi@linaro.org>
4541 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4543 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4545 * target.c (target_supports_multi_process): New function, moved
4547 * target.h (target_supports_multi_process): ... here. Remove
4550 2016-10-05 Tom Tromey <tom@tromey.com>
4553 * tracepoint.c (handle_tracepoint_bkpts): Check
4554 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4556 2016-10-05 Yao Qi <yao.qi@linaro.org>
4558 * configure.srv: Update the path of arm-*.xml files.
4560 2016-10-05 Terry Guo <terry.guo@arm.com>
4561 Yao Qi <yao.qi@linaro.org>
4563 * Makefile.in: Adjust the path of rules.
4564 * configure.srv: Update the path of xml files.
4565 * regformats/arm-with-iwmmxt.dat: Regenerated.
4566 * regformats/arm-with-neon.dat: Likewise.
4567 * regformats/arm-with-vfpv2.dat: Likewise.
4568 * regformats/arm-with-vfpv3.dat Likewise.
4570 2016-09-30 Yao Qi <yao.qi@linaro.org>
4573 * target.c (target_stop_and_wait): Don't call
4574 target_continue_no_signal, use resume_stop instead.
4576 2016-09-26 Yao Qi <yao.qi@linaro.org>
4578 * linux-low.c (linux_wait_1): Call debug_exit.
4580 2016-09-23 Pedro Alves <palves@redhat.com>
4582 * Makefile.in (SFILES): Add common/new-op.c.
4583 (OBS): Add common/new-op.o.
4584 (new-op.o): New rule.
4586 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4588 * .gitinore: Ignore more files.
4590 2016-09-21 Yao Qi <yao.qi@linaro.org>
4592 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4595 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4597 * server.c (start_inferior): Call target_mourn_inferior instead of
4598 mourn_inferior; pass ptid_t argument to it.
4600 (handle_target_event): Likewise.
4601 * target.c (target_mourn_inferior): New function.
4602 * target.h (mourn_inferior): Delete macro.
4604 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4606 * linux-low.c (lwp_is_stepping): New function.
4608 2016-09-06 Carl Love <cel@us.ibm.com>
4610 * server.c (start_inferior): Fixed comment, requested comment change
4611 didn't get updated correctly. Removed reference to ptrace () call as
4612 it is only true on Linux systems.
4614 2016-09-06 Carl Love <cel@us.ibm.com>
4616 * server.c (start_inferior): Do not call
4617 function target_post_create_inferior () if the
4618 inferior process has already exited.
4620 2016-09-05 Pedro Alves <palves@redhat.com>
4622 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4623 (COMPILE.pre, CC_LD): Use CXX directly.
4624 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4625 * acinclude.m4: Don't include build-with-cxx.m4.
4626 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4627 * configure: Regenerate.
4629 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4632 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4633 call writing data to own_buf.
4635 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4637 * target.c (mywait): Call target_wait instead of
4639 (target_wait): New function.
4641 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4643 * server.c (start_inferior): New variable 'ptid'. Replace calls
4644 to the_target->resume by target_continue{,_no_signal}, depending
4646 * target.c (target_stop_and_wait): Call target_continue_no_signal
4647 instead of the_target->resume.
4648 (target_continue): New function.
4650 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4652 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4654 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4657 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4659 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4660 * linux-arm-low.c (ps_get_thread_area): Likewise.
4661 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4662 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4663 * linux-mips-low.c (ps_get_thread_area): Likewise.
4664 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4665 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4666 * linux-x86-low.c (ps_get_thread_area): Likewise.
4667 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4669 2016-08-19 Pedro Alves <palves@redhat.com>
4671 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4673 2016-08-19 Pedro Alves <palves@redhat.com>
4675 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4676 comment. Use memcpy instead of casting through unsigned long.
4678 2016-08-19 Pedro Alves <palves@redhat.com>
4680 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4681 allocating around 0x80000000.
4683 2016-08-19 Pedro Alves <palves@redhat.com>
4686 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4687 (x32-avx512-linux-ipa.o): New rules.
4688 * configure.ac (x86_64-*-linux*): New x32 check.
4689 * configure.srv (ipa_x32_linux_regobj): New.
4690 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4691 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4693 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4695 * configure: Regenerate.
4697 2016-08-09 Pedro Alves <palves@redhat.com>
4700 * Makefile.in (OBS): Add signals-state-save-restore.o.
4701 (signals-state-save-restore.o): New rule.
4702 * config.in: Regenerate.
4703 * configure: Regenerate.
4704 * linux-low.c: Include "signals-state-save-restore.h".
4705 (linux_create_inferior): Call
4706 restore_original_signals_state.
4707 * server.c: Include "dispositions-save-restore.h".
4708 (captured_main): Call save_original_signals_state.
4710 2016-08-05 Pedro Alves <palves@redhat.com>
4712 * configure: Regenerate.
4714 2016-08-04 Yao Qi <yao.qi@linaro.org>
4716 * linux-low.c (regsets_fetch_inferior_registers): Check
4717 errno is ESRCH or not.
4719 2016-08-02 Yao Qi <yao.qi@linaro.org>
4721 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4722 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4723 (thread_db_load_search): Update.
4724 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4725 td_ta_set_event and td_ta_event_getmsg.
4727 2016-07-26 Pedro Alves <palves@redhat.com>
4730 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4731 of unsigned long for 64-bit registers and use uint32_t instead of
4732 unsigned int for 32-bit registers.
4734 2016-07-26 Pedro Alves <palves@redhat.com>
4736 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4739 2016-07-21 Tom Tromey <tom@tromey.com>
4741 * configure: Rebuild.
4743 2016-07-21 Yao Qi <yao.qi@linaro.org>
4745 * mem-break.c (find_gdb_breakpoint): Cast bp to
4746 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4748 2016-07-21 Yao Qi <yao.qi@linaro.org>
4750 * server.c (handle_v_requests): Support s and S actions
4751 if target_supports_software_single_step return true.
4753 2016-07-21 Yao Qi <yao.qi@linaro.org>
4755 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4756 is resume_step, call maybe_hw_step.
4757 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4759 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4761 (proceed_one_lwp): If resume request is resume_step, install
4762 reinsert breakpoints and call maybe_hw_step.
4764 2016-07-21 Yao Qi <yao.qi@linaro.org>
4766 * linux-low.c (proceed_one_lwp): Declare.
4767 (linux_resume_one_thread): Remove local variable 'step'.
4768 Lift code enqueue signal. Call proceed_one_lwp instead of
4769 linux_resume_one_lwp.
4771 2016-07-21 Yao Qi <yao.qi@linaro.org>
4773 * linux-low.c (linux_resume_one_thread): Call
4774 enqueue_pending_signal.
4776 2016-07-21 Yao Qi <yao.qi@linaro.org>
4778 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4779 * inferiors.c (do_restore_current_thread_cleanup): New function.
4780 (make_cleanup_restore_current_thread): Likewise.
4781 * linux-low.c (install_software_single_step_breakpoints): Call
4782 make_cleanup_restore_current_thread. Switch current_thread to
4785 2016-07-21 Yao Qi <yao.qi@linaro.org>
4787 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4788 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4789 (clone_one_breakpoint): Likewise.
4790 (delete_reinsert_breakpoints): Change parameter to thread.
4792 (has_reinsert_breakpoints): Likewise.
4793 (uninsert_reinsert_breakpoints): Likewise.
4794 (reinsert_reinsert_breakpoints): Likewise.
4795 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4796 (delete_reinsert_breakpoints): Likewise.
4797 (reinsert_reinsert_breakpoints): Likewise.
4798 (uninsert_reinsert_breakpoints): Likewise.
4799 (has_reinsert_breakpoints): Likewise.
4801 2016-07-21 Yao Qi <yao.qi@linaro.org>
4803 * inferiors.c (get_thread_process): Make parameter const.
4804 * inferiors.h (get_thread_process): Update declaration.
4805 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4806 Add new parameters child_thread and parent_thread. Callers
4808 * mem-break.h (clone_all_breakpoints): Update declaration.
4810 2016-07-21 Yao Qi <yao.qi@linaro.org>
4812 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4813 <command_list, handler>: Remove.
4814 (struct gdb_breakpoint): New.
4815 (struct other_breakpoint): New.
4816 (struct reinsert_breakpoint): New.
4817 (is_gdb_breakpoint): New function.
4818 (any_persistent_commands): Update command_list if
4819 is_gdb_breakpoint returns true.
4820 (set_breakpoint): Create breakpoints according to their types.
4821 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4822 (set_gdb_breakpoint_1): Likewise.
4823 (set_gdb_breakpoint): Likewise.
4824 (clear_breakpoint_conditions): Change parameter type to
4825 'struct gdb_breakpoint *'.
4826 (clear_breakpoint_commands): Likewise.
4827 (clear_breakpoint_conditions_and_commands): Likewise.
4828 (add_condition_to_breakpoint): Likewise.
4829 (add_breakpoint_condition): Likewise.
4830 (add_commands_to_breakpoint): Likewise.
4831 (check_breakpoints): Check other_breakpoint.
4832 (clone_one_breakpoint): Clone breakpopint according to its type.
4833 * mem-break.h (struct gdb_breakpoint): Declare.
4834 (set_gdb_breakpoint): Update declaration.
4835 (clear_breakpoint_conditions_and_commands): Likewise.
4836 (add_breakpoint_condition): Likewise.
4837 (add_breakpoint_commands): Likewise.
4838 * server.c (process_point_options): Change parameter type to
4839 'struct gdb_breakpoint *'.
4841 2016-07-21 Yao Qi <yao.qi@linaro.org>
4843 * mem-break.c (set_breakpoint_at): Rename it to ...
4844 (set_breakpoint_type_at): ... it.
4845 (set_breakpoint_at): Call set_breakpoint_type_at.
4846 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4847 * mem-break.h (set_breakpoint_at): Update comments.
4849 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4851 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4853 (nios2_store_gregset): Likewise.
4855 2016-07-01 Pedro Alves <palves@redhat.com>
4856 Antoine Tremblay <antoine.tremblay@ericsson.com>
4858 * linux-low.c: Change interface to take the target lwp_info
4859 pointer directly and return void. Handle detaching from a zombie
4861 (linux_detach_lwp_callback): New function.
4862 (linux_detach): Detach from the leader thread after detaching from
4865 2016-06-28 Yao Qi <yao.qi@linaro.org>
4867 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4868 for variable new_offset.
4869 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4870 (aarch64_ftrace_insn_reloc_cb): Likewise.
4871 (aarch64_ftrace_insn_reloc_tb): Likewise.
4872 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4873 PRIx64 instead of PRIx32.
4875 2016-06-28 Yao Qi <yao.qi@linaro.org>
4877 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4878 (the_low_target): Install arm_get_syscall_trapinfo.
4880 2016-06-28 Yao Qi <yao.qi@linaro.org>
4882 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4884 (the_low_target): Install aarch64_get_syscall_trapinfo.
4886 2016-06-28 Yao Qi <yao.qi@linaro.org>
4888 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4890 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4891 Remove parameter sysno.
4892 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4895 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4897 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4898 (s390_emit_ne_goto): Likewise.
4899 (s390_emit_lt_goto): Likewise.
4900 (s390_emit_le_goto): Likewise.
4901 (s390_emit_gt_goto): Likewise.
4902 (s390_emit_ge_goto): Likewise.
4903 (s390x_emit_eq_goto): Likewise.
4904 (s390x_emit_ne_goto): Likewise.
4905 (s390x_emit_lt_goto): Likewise.
4906 (s390x_emit_le_goto): Likewise.
4907 (s390x_emit_gt_goto): Likewise.
4908 (s390x_emit_ge_goto): Likewise.
4909 (s390_emit_ops_impl): Mark variable static.
4910 (s390x_emit_ops): Likewise.
4912 2016-06-17 Yao Qi <yao.qi@linaro.org>
4914 * linux-low.c (handle_extended_wait): Call
4915 uninsert_reinsert_breakpoints for the parent process. Remove
4916 reinsert breakpoints from the child process. Reinsert them to
4917 the parent process when vfork is done.
4918 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4919 (reinsert_reinsert_breakpoints): New function.
4920 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4921 (reinsert_reinsert_breakpoints): Declare.
4923 2016-06-17 Yao Qi <yao.qi@linaro.org>
4925 * linux-low.c (handle_extended_wait): If the parent is doing
4926 step-over, remove the reinsert breakpoints from the forked child.
4928 2016-06-17 Yao Qi <yao.qi@linaro.org>
4930 * linux-low.c (unsuspend_all_lwps): Declare.
4931 (linux_low_filter_event): If thread exited, call finish_step_over.
4932 If step-over is finished, unsuspend other threads.
4934 2016-06-17 Yao Qi <yao.qi@linaro.org>
4936 * linux-low.c (linux_resume_one_lwp_throw): Assert
4937 has_reinsert_breakpoints returns false.
4938 * mem-break.c (delete_disabled_breakpoints): Assert
4939 bp type isn't reinsert_breakpoint.
4941 2016-06-17 Yao Qi <yao.qi@linaro.org>
4943 * linux-low.c (maybe_hw_step): New function.
4944 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4945 (finish_step_over): Switch current_thread to lwp temporarily,
4946 and assert has_reinsert_breakpoints returns true.
4947 (proceed_one_lwp): Call maybe_hw_step.
4948 * mem-break.c (has_reinsert_breakpoints): New function.
4949 * mem-break.h (has_reinsert_breakpoints): Declare.
4951 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4953 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4955 2016-05-17 Yao Qi <yao.qi@linaro.org>
4957 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4958 instead of find_inferior.
4960 2016-05-05 Yao Qi <yao.qi@linaro.org>
4962 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4963 Initialize res to zero.
4965 2016-05-05 Yao Qi <yao.qi@linaro.org>
4967 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4970 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4972 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4973 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4974 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4976 2016-04-28 Par Olsson <par.olsson@windriver.com>
4977 Simon Marchi <simon.marchi@ericsson.com>
4979 * tracepoint.c (write_inferior_int8): New function.
4980 (cmd_qtenable_disable): Write enable flag using
4981 write_inferior_int8.
4983 2016-04-25 Yao Qi <yao.qi@linaro.org>
4985 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4986 (need_step_over_p): Return zero if the LWP has pending signals
4987 can be delivered on software single step target.
4989 2016-04-25 Yao Qi <yao.qi@linaro.org>
4991 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4992 return instead of error.
4994 2016-04-22 Yao Qi <yao.qi@linaro.org>
4996 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4999 2016-04-22 Yao Qi <yao.qi@linaro.org>
5001 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5002 signal when stepping over breakpoint with software single
5005 2016-04-21 Pedro Alves <palves@redhat.com>
5007 * linux-s390-low.c (s390_collect_ptrace_register)
5008 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5010 (s390_check_regset): Use void * instead of gdb_byte *.
5012 2016-04-20 Pedro Alves <palves@redhat.com>
5014 * configure: Renegerate.
5016 2016-04-20 Yao Qi <yao.qi@linaro.org>
5018 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5019 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5021 (arm_store_gregset): Likewise.
5023 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5025 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5026 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5027 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5028 (amd64-avx-mpx-linux.c): New rules.
5029 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5030 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5031 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5032 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5033 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5034 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5035 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5036 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5037 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5038 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5039 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5040 * linux-x86-low.c (x86_linux_read_description): Add case for
5041 X86_XSTATE_AVX_MPX_MASK.
5042 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5043 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5044 init_registers_i386_avx_mpx_linux.
5045 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5046 (initialize_low_tracepoint): Call
5047 init_registers_i386_avx_mpx_linux.
5048 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5049 (initialize_low_tracepoint): Call
5050 init_registers_amd64_avx_mpx_linux.
5051 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5052 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5053 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5056 2016-04-18 Pedro Alves <palves@redhat.com>
5058 * configure: Regenerate.
5060 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5062 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5063 (aarch64_emit_sub): Likewise.
5065 2016-04-12 Pedro Alves <palves@redhat.com>
5067 * utils.c (prepare_to_throw_exception): Delete.
5069 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5071 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5073 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5075 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5077 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5079 * linux-aarch64-ipa.c: Add <elf.h> include.
5080 * linux-ppc-ipa.c: Add <elf.h> include.
5081 * linux-s390-ipa.c: Add <elf.h> include.
5083 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5085 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5086 (get_raw_reg_ptr): Likewise.
5087 (get_trace_state_variable_value_ptr): Likewise.
5088 (set_trace_state_variable_value_ptr): Likewise.
5089 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5092 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5093 Marcin Kościelnicki <koriakin@0x04.net>
5096 * linux-ppc-low.c (emit_insns): New function.
5097 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5098 (ppc_emit_prologue): New function.
5099 (ppc_emit_epilogue): New function.
5100 (ppc_emit_add): New function.
5101 (ppc_emit_sub): New function.
5102 (ppc_emit_mul): New function.
5103 (ppc_emit_lsh): New function.
5104 (ppc_emit_rsh_signed): New function.
5105 (ppc_emit_rsh_unsigned): New function.
5106 (ppc_emit_ext): New function.
5107 (ppc_emit_zero_ext): New function.
5108 (ppc_emit_log_not): New function.
5109 (ppc_emit_bit_and): New function.
5110 (ppc_emit_bit_or): New function.
5111 (ppc_emit_bit_xor): New function.
5112 (ppc_emit_bit_not): New function.
5113 (ppc_emit_equal): New function.
5114 (ppc_emit_less_signed): New function.
5115 (ppc_emit_less_unsigned): New function.
5116 (ppc_emit_ref): New function.
5117 (ppc_emit_const): New function.
5118 (ppc_emit_reg): New function.
5119 (ppc_emit_pop): New function.
5120 (ppc_emit_stack_flush): New function.
5121 (ppc_emit_swap): New function.
5122 (ppc_emit_stack_adjust): New function.
5123 (ppc_emit_call): New function.
5124 (ppc_emit_int_call_1): New function.
5125 (ppc_emit_void_call_2): New function.
5126 (ppc_emit_if_goto): New function.
5127 (ppc_emit_goto): New function.
5128 (ppc_emit_eq_goto): New function.
5129 (ppc_emit_ne_goto): New function.
5130 (ppc_emit_lt_goto): New function.
5131 (ppc_emit_le_goto): New function.
5132 (ppc_emit_gt_goto): New function.
5133 (ppc_emit_ge_goto): New function.
5134 (ppc_write_goto_address): New function.
5135 (ppc_emit_ops_impl): New static variable.
5136 (ppc64v1_emit_prologue): New function.
5137 (ppc64v2_emit_prologue): New function.
5138 (ppc64_emit_epilogue): New function.
5139 (ppc64_emit_add): New function.
5140 (ppc64_emit_sub): New function.
5141 (ppc64_emit_mul): New function.
5142 (ppc64_emit_lsh): New function.
5143 (ppc64_emit_rsh_signed): New function.
5144 (ppc64_emit_rsh_unsigned): New function.
5145 (ppc64_emit_ext): New function.
5146 (ppc64_emit_zero_ext): New function.
5147 (ppc64_emit_log_not): New function.
5148 (ppc64_emit_bit_and): New function.
5149 (ppc64_emit_bit_or): New function.
5150 (ppc64_emit_bit_xor): New function.
5151 (ppc64_emit_bit_not): New function.
5152 (ppc64_emit_equal): New function.
5153 (ppc64_emit_less_signed): New function.
5154 (ppc64_emit_less_unsigned): New function.
5155 (ppc64_emit_ref): New function.
5156 (ppc64_emit_const): New function.
5157 (ppc64v1_emit_reg): New function.
5158 (ppc64v2_emit_reg): New function.
5159 (ppc64_emit_pop): New function.
5160 (ppc64_emit_stack_flush): New function.
5161 (ppc64_emit_swap): New function.
5162 (ppc64v1_emit_call): New function.
5163 (ppc64v2_emit_call): New function.
5164 (ppc64v1_emit_int_call_1): New function.
5165 (ppc64v2_emit_int_call_1): New function.
5166 (ppc64v1_emit_void_call_2): New function.
5167 (ppc64v2_emit_void_call_2): New function.
5168 (ppc64_emit_if_goto): New function.
5169 (ppc64_emit_eq_goto): New function.
5170 (ppc64_emit_ne_goto): New function.
5171 (ppc64_emit_lt_goto): New function.
5172 (ppc64_emit_le_goto): New function.
5173 (ppc64_emit_gt_goto): New function.
5174 (ppc64_emit_ge_goto): New function.
5175 (ppc64v1_emit_ops_impl): New static variable.
5176 (ppc64v2_emit_ops_impl): New static variable.
5177 (ppc_emit_ops): New function.
5178 (linux_low_target): Wire in ppc_emit_ops.
5180 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5181 Marcin Kościelnicki <koriakin@0x04.net>
5184 * Makefile.in: Add powerpc-*-ipa.o
5185 * configure.srv: Add ipa_obj for powerpc*-linux.
5186 * linux-ppc-ipa.c: New file.
5187 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5189 (PPC_FIELD): New macro.
5190 (PPC_SEXT): New macro.
5191 (PPC_OP6): New macro.
5192 (PPC_BO): New macro.
5193 (PPC_LI): New macro.
5194 (PPC_BD): New macro.
5195 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5196 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5197 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5198 (ppc_get_thread_area): New function.
5199 (is_elfv2_inferior): New function.
5200 (gen_ds_form): New function.
5201 (GEN_STD): New macro.
5202 (GEN_STDU): New macro.
5203 (GEN_LD): New macro.
5204 (GEN_LDU): New macro.
5205 (gen_d_form): New function.
5206 (GEN_ADDI): New macro.
5207 (GEN_ADDIS): New macro.
5208 (GEN_LI): New macro.
5209 (GEN_LIS): New macro.
5210 (GEN_ORI): New macro.
5211 (GEN_ORIS): New macro.
5212 (GEN_LWZ): New macro.
5213 (GEN_STW): New macro.
5214 (GEN_STWU): New macro.
5215 (gen_xfx_form): New function.
5216 (GEN_MFSPR): New macro.
5217 (GEN_MTSPR): New macro.
5218 (GEN_MFCR): New macro.
5219 (GEN_MTCR): New macro.
5220 (GEN_SYNC): New macro.
5221 (GEN_LWSYNC): New macro.
5222 (gen_x_form): New function.
5223 (GEN_OR): New macro.
5224 (GEN_MR): New macro.
5225 (GEN_LWARX): New macro.
5226 (GEN_STWCX): New macro.
5227 (GEN_CMPW): New macro.
5228 (gen_md_form): New function.
5229 (GEN_RLDICL): New macro.
5230 (GEN_RLDICR): New macro.
5231 (gen_i_form): New function.
5233 (GEN_BL): New macro.
5234 (gen_b_form): New function.
5235 (GEN_BNE): New macro.
5236 (GEN_LOAD): New macro.
5237 (GEN_STORE): New macro.
5238 (gen_limm): New function.
5239 (gen_atomic_xchg): New function.
5240 (gen_call): New function.
5241 (ppc_relocate_instruction): New function.
5242 (ppc_install_fast_tracepoint_jump_pad): New function.
5243 (ppc_get_min_fast_tracepoint_insn_len): New function.
5244 (ppc_get_ipa_tdesc_idx): New function.
5245 (the_low_target): Wire in the new functions.
5246 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5248 * linux-ppc-tdesc.h: New file.
5250 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5252 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5253 (alloc_jump_pad_buffer): New function.
5254 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5255 (alloc_jump_pad_buffer): New function.
5256 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5257 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5258 (alloc_jump_pad_buffer): New function.
5259 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5260 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5261 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5262 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5264 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5266 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5267 * linux-amd64-ipa.c: Likewise.
5268 * linux-i386-ipa.c: Likewise.
5269 * linux-s390-ipa.c: Likewise.
5270 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5271 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5272 set_trace_state_variable_value_ptr.
5273 (struct ipa_sym_addresses): Likewise.
5274 (symbol_list): Likewise.
5275 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5276 accessing gdb_collect directly.
5277 (gdb_collect_ptr_type): New typedef.
5278 (get_raw_reg_ptr_type): New typedef.
5279 (get_trace_state_variable_value_ptr_type): New typedef.
5280 (set_trace_state_variable_value_ptr_type): New typedef.
5281 (gdb_collect_ptr): New global.
5282 (get_raw_reg_ptr): New global.
5283 (get_trace_state_variable_value_ptr): New global.
5284 (set_trace_state_variable_value_ptr): New global.
5285 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5286 accessing get_raw_reg directly.
5287 (get_get_tsv_func_addr): Likewise for
5288 get_trace_state_variable_value_ptr.
5289 (get_set_tsv_func_addr): Likewise for
5290 set_trace_state_variable_value_ptr.
5291 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5293 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5295 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5297 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5299 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5301 (relocate_instruction): Remove own_buf.
5302 * server.c (own_buf): Make global.
5303 (handle_v_requests): Make global.
5304 * server.h (own_buf): New declaration.
5305 (handle_v_requests): New prototype.
5307 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5310 * linux-s390-low.c (add_insns): New function.
5311 (s390_emit_prologue): New function.
5312 (s390_emit_epilogue): New function.
5313 (s390_emit_add): New function.
5314 (s390_emit_sub): New function.
5315 (s390_emit_mul): New function.
5316 (s390_emit_lsh): New function.
5317 (s390_emit_rsh_signed): New function.
5318 (s390_emit_rsh_unsigned): New function.
5319 (s390_emit_ext): New function.
5320 (s390_emit_log_not): New function.
5321 (s390_emit_bit_and): New function.
5322 (s390_emit_bit_or): New function.
5323 (s390_emit_bit_xor): New function.
5324 (s390_emit_bit_not): New function.
5325 (s390_emit_equal): New function.
5326 (s390_emit_less_signed): New function.
5327 (s390_emit_less_unsigned): New function.
5328 (s390_emit_ref): New function.
5329 (s390_emit_if_goto): New function.
5330 (s390_emit_goto): New function.
5331 (s390_write_goto_address): New function.
5332 (s390_emit_litpool): New function.
5333 (s390_emit_const): New function.
5334 (s390_emit_call): New function.
5335 (s390_emit_reg): New function.
5336 (s390_emit_pop): New function.
5337 (s390_emit_stack_flush): New function.
5338 (s390_emit_zero_ext): New function.
5339 (s390_emit_swap): New function.
5340 (s390_emit_stack_adjust): New function.
5341 (s390_emit_set_r2): New function.
5342 (s390_emit_int_call_1): New function.
5343 (s390_emit_void_call_2): New function.
5344 (s390_emit_eq_goto): New function.
5345 (s390_emit_ne_goto): New function.
5346 (s390_emit_lt_goto): New function.
5347 (s390_emit_le_goto): New function.
5348 (s390_emit_gt_goto): New function.
5349 (s390_emit_ge_goto): New function.
5350 (s390x_emit_prologue): New function.
5351 (s390x_emit_epilogue): New function.
5352 (s390x_emit_add): New function.
5353 (s390x_emit_sub): New function.
5354 (s390x_emit_mul): New function.
5355 (s390x_emit_lsh): New function.
5356 (s390x_emit_rsh_signed): New function.
5357 (s390x_emit_rsh_unsigned): New function.
5358 (s390x_emit_ext): New function.
5359 (s390x_emit_log_not): New function.
5360 (s390x_emit_bit_and): New function.
5361 (s390x_emit_bit_or): New function.
5362 (s390x_emit_bit_xor): New function.
5363 (s390x_emit_bit_not): New function.
5364 (s390x_emit_equal): New function.
5365 (s390x_emit_less_signed): New function.
5366 (s390x_emit_less_unsigned): New function.
5367 (s390x_emit_ref): New function.
5368 (s390x_emit_if_goto): New function.
5369 (s390x_emit_const): New function.
5370 (s390x_emit_call): New function.
5371 (s390x_emit_reg): New function.
5372 (s390x_emit_pop): New function.
5373 (s390x_emit_stack_flush): New function.
5374 (s390x_emit_zero_ext): New function.
5375 (s390x_emit_swap): New function.
5376 (s390x_emit_stack_adjust): New function.
5377 (s390x_emit_int_call_1): New function.
5378 (s390x_emit_void_call_2): New function.
5379 (s390x_emit_eq_goto): New function.
5380 (s390x_emit_ne_goto): New function.
5381 (s390x_emit_lt_goto): New function.
5382 (s390x_emit_le_goto): New function.
5383 (s390x_emit_gt_goto): New function.
5384 (s390x_emit_ge_goto): New function.
5385 (s390_emit_ops): New function.
5386 (struct linux_target_ops): Fill in emit_ops hook.
5388 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5391 * Makefile.in: Add s390 IPA files.
5392 * configure.srv: Build IPA for s390.
5393 * linux-s390-ipa.c: New file.
5394 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5395 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5396 (tdesc_s390_linux32): Likewise.
5397 (init_registers_s390_linux32v1): Likewise.
5398 (tdesc_s390_linux32v1): Likewise.
5399 (init_registers_s390_linux32v2): Likewise.
5400 (tdesc_s390_linux32v2): Likewise.
5401 (init_registers_s390_linux64): Likewise.
5402 (tdesc_s390_linux64): Likewise.
5403 (init_registers_s390_linux64v1): Likewise.
5404 (tdesc_s390_linux64v1): Likewise.
5405 (init_registers_s390_linux64v2): Likewise.
5406 (tdesc_s390_linux64v2): Likewise.
5407 (init_registers_s390_te_linux64): Likewise.
5408 (tdesc_s390_te_linux64): Likewise.
5409 (init_registers_s390_vx_linux64): Likewise.
5410 (tdesc_s390_vx_linux64): Likewise.
5411 (init_registers_s390_tevx_linux64): Likewise.
5412 (tdesc_s390_tevx_linux64): Likewise.
5413 (init_registers_s390x_linux64): Likewise.
5414 (tdesc_s390x_linux64): Likewise.
5415 (init_registers_s390x_linux64v1): Likewise.
5416 (tdesc_s390x_linux64v1): Likewise.
5417 (init_registers_s390x_linux64v2): Likewise.
5418 (tdesc_s390x_linux64v2): Likewise.
5419 (init_registers_s390x_te_linux64): Likewise.
5420 (tdesc_s390x_te_linux64): Likewise.
5421 (init_registers_s390x_vx_linux64): Likewise.
5422 (tdesc_s390x_vx_linux64): Likewise.
5423 (init_registers_s390x_tevx_linux64): Likewise.
5424 (tdesc_s390x_tevx_linux64): Likewise.
5425 (have_hwcap_s390_vx): New static variable.
5426 (s390_arch_setup): Fill have_hwcap_s390_vx.
5427 (s390_get_thread_area): New function.
5428 (s390_ft_entry_gpr_esa): New const.
5429 (s390_ft_entry_gpr_zarch): New const.
5430 (s390_ft_entry_misc): New const.
5431 (s390_ft_entry_fr): New const.
5432 (s390_ft_entry_vr): New const.
5433 (s390_ft_main_31): New const.
5434 (s390_ft_main_64): New const.
5435 (s390_ft_exit_fr): New const.
5436 (s390_ft_exit_vr): New const.
5437 (s390_ft_exit_misc): New const.
5438 (s390_ft_exit_gpr_esa): New const.
5439 (s390_ft_exit_gpr_zarch): New const.
5440 (append_insns): New function.
5441 (s390_relocate_instruction): New function.
5442 (s390_install_fast_tracepoint_jump_pad): New function.
5443 (s390_get_min_fast_tracepoint_insn_len): New function.
5444 (s390_get_ipa_tdesc_idx): New function.
5445 (struct linux_target_ops): Wire in the above functions.
5446 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5447 * linux-s390-tdesc.h: New file.
5449 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5451 * linux-s390-low.c (s390_supports_tracepoints): New function.
5452 (struct linux_target_ops): Fill supports_tracepoints hook.
5454 2016-03-18 Yao Qi <yao.qi@linaro.org>
5456 * linux-low.c (lwp_signal_can_be_delivered): New function.
5457 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5459 2016-03-18 Yao Qi <yao.qi@linaro.org>
5461 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5462 0 if signal is enqueued. Remove 'signal' from one debugging
5463 message. Move one debugging message to some lines below.
5464 Remove code setting 'signal' to 0.
5466 2016-03-18 Yao Qi <yao.qi@linaro.org>
5468 * linux-low.c (linux_low_filter_event): Remove redundant
5469 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5471 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5473 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5474 (struct linux_target_ops): Wire in the above.
5476 2016-03-03 Yao Qi <yao.qi@linaro.org>
5478 * linux-low.c: Update comments to start_step_over.
5480 2016-03-03 Yao Qi <yao.qi@linaro.org>
5483 * linux-low.c (handle_extended_wait): Set child suspended
5484 if event_lwp->bp_reinsert isn't zero.
5486 2016-03-02 Yao Qi <yao.qi@linaro.org>
5488 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5489 enqueue_pending_signal.
5491 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5493 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5496 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5498 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5499 (s390_regmap_3264) [!__s390x__]: New global.
5500 (s390_collect_ptrace_register): Skip map entries containing -1.
5501 (s390_supply_ptrace_register): Ditto.
5502 (s390_fill_gprs_high): New function.
5503 (s390_store_gprs_high): New function.
5504 (s390_regsets): Add NT_S390_HIGH_GPRS.
5505 (s390_get_hwcap): Enable on 31-bit.
5506 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5507 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5508 Detect NT_S390_HIGH_GPRS.
5509 (s390_usrregs_info_3264): Enable on 31-bit.
5510 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5511 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5513 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5516 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5517 * configure.srv: Ditto.
5518 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5519 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5520 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5521 (init_registers_amd64_linux): Remove prototype.
5522 (tdesc_amd64_linux): Remove declaration.
5523 (get_ipa_tdesc): New function.
5524 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5525 initialize remaining tdescs.
5526 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5527 (init_registers_i386_linux): Remove prototype.
5528 (tdesc_i386_linux): Remove declaration.
5529 (get_ipa_tdesc): New function.
5530 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5531 initialize remaining tdescs.
5532 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5533 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5534 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5535 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5536 (x86_get_ipa_tdesc_idx): New function.
5537 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5538 * linux-x86-tdesc.h: New file.
5539 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5540 (target_get_ipa_tdesc_idx): New macro.
5541 * tracepoint.c (ipa_tdesc_idx): New macro.
5542 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5543 (symbol_list): Add ipa_tdesc_idx.
5544 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5545 (ipa_tdesc): Remove.
5546 (ipa_tdesc_idx): New variable.
5547 (get_context_regcache): Use get_ipa_tdesc.
5548 (gdb_collect): Ditto.
5550 * tracepoint.h (get_ipa_tdesc): New prototype.
5551 (ipa_tdesc): Remove.
5553 2016-02-24 Pedro Alves <palves@redhat.com>
5555 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5556 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5557 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5558 Factor out common code between the USE_SIGTRAP_SIGINFO and
5559 !USE_SIGTRAP_SIGINFO blocks.
5560 (linux_low_filter_event): Call save_stop_reason instead of
5561 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5563 (linux_wait_1): Update comments.
5565 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5567 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5568 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5569 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5570 ppc_insert_point, ppc_remove_point.
5572 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5574 * linux-s390-low.c (s390_supports_z_point_type): New function.
5575 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5577 2016-02-16 Yao Qi <yao.qi@linaro.org>
5579 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5580 PC. Get pc from regcache_read_pc.
5582 2016-02-12 Yao Qi <yao.qi@linaro.org>
5584 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5585 or linux_get_pc_32bit.
5586 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5588 2016-02-12 Yao Qi <yao.qi@linaro.org>
5590 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5591 arm_linux_get_next_pcs_fixup.
5593 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5595 * tracepoint.c (x_tracepoint_action_download): Change
5596 write_inferior_data_ptr to write_inferior_data_pointer.
5597 (cmd_qtstart): Likewise.
5598 (write_inferior_data_ptr): Remove.
5599 (download_agent_expr): Change write_inferior_data_ptr to
5600 write_inferior_data_pointer.
5601 (download_tracepoint_1): Likewise.
5602 (download_tracepoint): Likewise.
5603 (download_trace_state_variables): Likewise.
5605 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5606 Marcin Kościelnicki <koriakin@0x04.net>
5608 * tracepoint.c (struct tracepoint_action_ops): Remove.
5609 (struct tracepoint_action): Remove ops.
5610 (m_tracepoint_action_download, r_tracepoint_action_download)
5611 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5612 size and offset accordingly.
5613 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5614 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5615 (tracepoint_action_send, tracepoint_action_download): New functions.
5616 Helpers for trace action handlers.
5617 (add_tracepoint_action): Remove setup actions ops.
5618 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5620 2016-02-10 Yao Qi <yao.qi@linaro.org>
5622 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5624 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5626 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5628 * configure: Regenerate.
5630 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5632 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5633 void * to gdb_byte *.
5634 * linux-low.c (siginfo_fixup): Likewise.
5635 (linux_xfer_siginfo): Likewise.
5636 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5638 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5640 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5642 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5644 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5646 * linux-x86-low.c [__x86_64__]: Include
5647 "nat/amd64-linux-siginfo.h".
5648 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5649 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5650 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5651 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5652 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5653 (cpt_si_fd, si_timerid, si_overrun): Move from
5654 nat/amd64-linux-siginfo.c.
5655 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5657 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5659 * server.c (skip_to_semicolon): Remove.
5660 (process_point_options): Use strchrnul instead of
5663 2016-01-26 Yao Qi <yao.qi@linaro.org>
5665 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5666 * linux-low.c (install_software_single_step_breakpoints): Don't
5667 call regcache_read_pc.
5668 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5671 2016-01-26 Yao Qi <yao.qi@linaro.org>
5673 * linux-low.c (install_software_single_step_breakpoints): Call
5674 regcache_read_pc instead of get_pc.
5676 2016-01-26 Yao Qi <yao.qi@linaro.org>
5678 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5679 (unblock_async_io): Rename to ...
5680 (block_unblock_async_io): ... it. New function.
5681 (enable_async_io): Don't install SIGIO handler. Unblock it
5683 (disable_async_io): Don't ignore SIGIO. Block it instead.
5684 (initialize_async_io): Install SIGIO handler. Don't call
5687 2016-01-26 Yao Qi <yao.qi@linaro.org>
5689 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5690 first character is '\003', call *the_target->request_interrupt.
5692 2016-01-25 Yao Qi <yao.qi@linaro.org>
5694 * remote-utils.c (new_thread_notify): Remove.
5695 (dead_thread_notify): Likewise.
5696 * remote-utils.h (new_thread_notify): Remove declaration.
5697 (dead_thread_notify): Likewise.
5699 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5701 * gdb.trace/pending.exp: Fix expected message on continue.
5703 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5705 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5706 it works properly on big-endian machines where sizeof (CORE_ADDR)
5709 2016-01-21 Pedro Alves <palves@redhat.com>
5711 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5712 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5713 * configure: Regenerate.
5715 2016-01-21 Yao Qi <yao.qi@linaro.org>
5717 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5718 is_thumb and set it according to CPSR saved on the stack.
5719 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5720 arm_sigreturn_next_pc.
5722 2016-01-18 Yao Qi <yao.qi@linaro.org>
5724 * linux-low.c (linux_set_pc_64bit): New function.
5725 (linux_get_pc_64bit): New function.
5726 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5728 * linux-sparc-low.c (debug_threads): Remove declaration.
5729 (sparc_get_pc): Remove.
5730 (the_low_target): Use linux_get_pc_64bit instead of
5732 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5733 (the_low_target): Use linux_get_pc_64bit and
5736 2016-01-18 Yao Qi <yao.qi@linaro.org>
5738 * linux-arm-low.c (debug_threads): Remove declaration.
5739 (arm_get_pc, arm_set_pc): Remove.
5740 (the_low_target): Use linux_get_pc_32bit and
5742 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5743 (the_low_target): Use linux_get_pc_32bit and
5745 * linux-cris-low.c (debug_threads): Remove declaration.
5746 (cris_get_pc, cris_set_pc,): Remove.
5747 (the_low_target): Use linux_get_pc_32bit and
5749 * linux-crisv32-low.c (debug_threads): Remove declaration.
5750 (cris_get_pc, cris_set_pc): Remove.
5751 (the_low_target): Use linux_get_pc_32bit and
5753 * linux-low.c: Include inttypes.h.
5754 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5755 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5756 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5757 (the_low_target): Use linux_get_pc_32bit and
5759 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5760 (the_low_target): Use linux_get_pc_32bit and
5762 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5763 (the_low_target): Use linux_get_pc_32bit and
5765 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5766 (the_low_target): Use linux_get_pc_32bit and
5768 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5769 (the_low_target): Use linux_get_pc_32bit and
5772 2016-01-18 Gary Benson <gbenson@redhat.com>
5774 * configure.ac (AC_FUNC_FORK): New check.
5775 * config.in: Regenerate.
5776 * configure: Likewise.
5778 2016-01-14 Yao Qi <yao.qi@linaro.org>
5780 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5781 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5782 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5783 arm_get_next_pcs_ctor.
5785 2016-01-12 Josh Stone <jistone@redhat.com>
5786 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5788 * inferiors.h: Include "gdb_vecs.h".
5789 (struct process_info): Add syscalls_to_catch.
5790 * inferiors.c (remove_process): Free syscalls_to_catch.
5791 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5792 syscall_return stops.
5793 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5794 * server.c (handle_general_set): Handle QCatchSyscalls.
5795 (handle_query): Report support for QCatchSyscalls.
5796 * target.h (struct target_ops): Add supports_catch_syscall.
5797 (target_supports_catch_syscall): New macro.
5798 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5799 (struct lwp_info): Add syscall_state.
5800 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5801 Maintain syscall_state and syscalls_to_catch across exec.
5802 (get_syscall_trapinfo): New function, proxy to the_low_target.
5803 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5804 (linux_low_filter_event): Toggle syscall_state entry/return for
5805 syscall traps, and set it ignored for all others.
5806 (gdb_catching_syscalls_p): New function.
5807 (gdb_catch_this_syscall_p): New function.
5808 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5809 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5810 (linux_supports_catch_syscall): New function.
5811 (linux_target_ops): Install it.
5812 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5813 (the_low_target): Install it.
5815 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5817 * acinclude.m4: Include new ../warning.m4 file.
5818 * configure: Regenerated.
5819 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5821 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5823 * ax.c (is_goto_target): Mark static.
5824 * linux-low.c (register_addr): Likewise.
5825 (linux_fetch_registers, linux_store_registers): Likewise.
5826 * mem-break.c (any_persistent_commands): Fix old prototype.
5827 (add_commands_to_breakpoint): Mark static.
5828 * regcache.c (find_register_by_name): Delete unused func.
5829 * remote-utils.c (hex_or_minus_one): Mark static.
5830 * server.c (monitor_show_help): Mark static.
5831 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5832 handle_v_requests): Likewise.
5834 2016-01-12 Pedro Alves <palves@redhat.com>
5836 Remove use of the registered trademark symbol throughout.
5838 2016-01-08 Yao Qi <yao.qi@linaro.org>
5840 * remote-utils.c (getpkt): If c is '\003', call target hook
5843 2016-01-06 Yao Qi <yao.qi@linaro.org>
5845 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5846 linux-aarch32-low.c.
5847 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5848 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5849 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5850 (thumb2_breakpoint): Declare.
5851 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5852 linux-aarch32-low.h.
5853 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5854 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5855 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5857 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5859 * gdbreplay.c (gdbreplay_version): Change copyright year in
5861 * server.c (gdbserver_version): Likewise.
5863 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5865 * server.c (crc32_table): Delete.
5866 (crc32): Use libiberty's xcrc32 function.
5868 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5870 * lynx-low.c (lynx_delete_thread_callback): New function.
5871 (lynx_mourn): Properly delete our process and all of its
5872 threads. Remove call to clear_inferiors.
5874 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5876 * target.c (thread_search_callback): Add check that
5877 the thread_stopped target callback is not NULL before
5880 2015-12-21 Yao Qi <yao.qi@linaro.org>
5882 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5885 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5887 * server.c (handle_query): Call target_supports_software_single_step.
5889 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5891 * linux-low.c (single_step): New function.
5892 (linux_resume_one_lwp_throw): Call single_step.
5893 (start_step_over): Likewise.
5895 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5897 * Makefile.in (SFILES): Append arch/arm-linux.c,
5898 arch/arm-get-next-pcs.c.
5899 (arm-linux.o): New rule.
5900 (arm-get-next-pcs.o): New rule.
5901 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5903 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5904 to linux-aarch32-low.c.
5905 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5906 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5907 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5908 (thumb2_breakpoint_len): Likewise.
5909 (arm_is_thumb_mode): Make non-static.
5910 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5911 from linux-aarch32-low.c.
5912 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5913 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5914 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5915 (thumb2_breakpoint_len): Likewise.
5916 (arm_is_thumb_mode): New declaration.
5917 * linux-arm-low.c: Include arch/arm-linux.h
5918 aarch/arm-get-next-pcs.h, sys/syscall.h.
5919 (get_next_pcs_ops): New struct.
5920 (get_next_pcs_addr_bits_remove): New function.
5921 (get_next_pcs_is_thumb): New function.
5922 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5923 (arm_sigreturn_next_pc): Likewise.
5924 (get_next_pcs_syscall_next_pc): Likewise.
5925 (arm_gdbserver_get_next_pcs): Likewise.
5926 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5928 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5929 * server.h: Include gdb_vecs.h.
5931 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5933 * Makefile.in (SFILES): Append common/common-regcache.c.
5934 (OBS): Append common-regcache.o.
5935 (common-regcache.o): New rule.
5936 * regcache.c (init_register_cache): Initialize cache to
5938 (regcache_raw_read_unsigned): New function.
5939 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5940 register_status enum.
5942 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5944 * linux-aarch64-low.c (the_low_targets): Rename
5945 breakpoint_reinsert_addr to get_next_pcs.
5946 * linux-arm-low.c (the_low_targets): Likewise.
5947 * linux-bfin-low.c (the_low_targets): Likewise.
5948 * linux-cris-low.c (the_low_targets): Likewise.
5949 * linux-crisv32-low.c (the_low_targets): Likewise.
5950 * linux-low.c (can_software_single_step): Likewise.
5951 (install_software_single_step_breakpoints): New function.
5952 (start_step_over): Use install_software_single_step_breakpoints.
5953 * linux-low.h: New CORE_ADDR vector.
5954 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5956 * linux-mips-low.c (the_low_targets): Likewise.
5957 * linux-nios2-low.c (the_low_targets): Likewise.
5958 * linux-sparc-low.c (the_low_targets): Likewise.
5960 2015-12-17 Pedro Alves <palves@redhat.com>
5962 * linux-low.c (linux_kill_one_lwp): Remove references to
5964 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5966 (linux_init_signals): Delete.
5967 (initialize_low): Adjust.
5968 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5970 2015-12-16 Pedro Alves <palves@redhat.com>
5972 * configure.ac (compiler warning flags): When testing a
5973 -Wno-foo option, check whether -Wfoo works instead.
5974 * configure: Regenerate.
5976 2015-12-11 Don Breazeal <donb@codesourcery.com>
5978 * server.c (process_serial_event): Don't exit from gdbserver
5979 in remote mode if there are still active inferiors.
5981 2015-12-11 Yao Qi <yao.qi@linaro.org>
5983 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5984 arm_breakpoint_at if the process is 32-bit.
5986 2015-12-11 Yao Qi <yao.qi@linaro.org>
5988 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5991 2015-12-07 Yao Qi <yao.qi@linaro.org>
5993 * configure.srv: Append arm.o to srv_tgtobj for
5994 aarch64*-*-linux* target.
5995 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5996 from linux-arm-low.c.
5997 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5998 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5999 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6000 (thumb2_breakpoint_len): Likewise.
6001 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6002 (arm_breakpoint_kinds): Likewise.
6003 (arm_breakpoint_kind_from_pc): Likewise.
6004 (arm_sw_breakpoint_from_kind): Likewise.
6005 (arm_breakpoint_kind_from_current_state): Likewise.
6006 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6007 (arm_sw_breakpoint_from_kind): Declare.
6008 (arm_breakpoint_kind_from_current_state): Declare.
6009 (arm_breakpoint_at): Declare.
6010 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6011 arm_sw_breakpoint_from_kind if process is 32-bit.
6012 (aarch64_breakpoint_kind_from_pc): New function.
6013 (aarch64_breakpoint_kind_from_current_state): New function.
6014 (the_low_target): Initialize fields breakpoint_kind_from_pc
6015 and breakpoint_kind_from_current_state.
6016 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6017 linux-aarch32-low.c.
6018 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6019 (arm_breakpoint, arm_breakpoint_len): Likewise.
6020 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6021 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6022 (arm_is_thumb_mode): Likewise.
6023 (arm_breakpoint_at): Likewise.
6024 (arm_breakpoint_kind_from_pc): Likewise.
6025 (arm_sw_breakpoint_from_kind): Likewise.
6026 (arm_breakpoint_kind_from_current_state): Likewise.
6029 2015-08-04 Yao Qi <yao.qi@linaro.org>
6031 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6032 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6033 * server.c (extended_protocol): Remove "static".
6034 * server.h (extended_protocol): Declare it.
6036 2015-12-04 Josh Stone <jistone@redhat.com>
6038 * target.h (struct target_ops) <arch_setup>: Rename to ...
6039 (struct target_ops) <post_create_inferior>: ... this.
6040 (target_arch_setup): Rename to ...
6041 (target_post_create_inferior): ... this, calling post_create_inferior.
6042 * server.c (start_inferior): Update target_arch_setup calls to
6043 target_post_create_inferior.
6044 * linux-low.c (linux_low_ptrace_options): Forward declare.
6045 (linux_arch_setup): Update its comment for general use.
6046 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6047 (struct linux_target_ops): Use linux_post_create_inferior.
6048 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6049 to post_create_inferior.
6050 * nto-low.c (struct nto_target_ops): Likewise.
6051 * spu-low.c (struct spu_target_ops): Likewise.
6052 * win32-low.c (struct win32_target_ops): Likewise.
6054 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6056 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6058 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6060 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6061 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6062 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6063 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6064 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6065 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6066 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6067 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6068 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6069 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6070 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6071 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6073 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6075 * linux-low.c (linux_look_up_symbols): Don't call
6076 linux_supports_traceclone.
6077 * linux-low.h (thread_db_init): Remove use_events argument.
6078 * thread-db.c (thread_db_use_event): Remove global variable.
6079 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6080 (struct thread_db) <td_create_bp>: Remove field.
6081 (thread_db_create_event): Remove function.
6082 (thread_db_enable_reporting): Likewise.
6083 (find_one_thread): Don't check for thread_db_use_events.
6084 (attach_thread): Likewise.
6085 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6086 (try_thread_db_load_1): Don't check for thread_db_use_events.
6087 (thread_db_init): Remove use_events argument and thread events
6089 (remove_thread_event_breakpoints): Remove function.
6090 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6092 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6094 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6096 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6097 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6099 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6100 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6102 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6104 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6105 * linux-low.c (can_hardware_single_step): Use
6106 supports_hardware_single_step.
6107 (can_software_single_step): New function.
6108 (start_step_over): Call can_software_single_step.
6109 (linux_supports_hardware_single_step): New function.
6110 (struct target_ops) <supports_software_single_step>: Initialize.
6111 * linux-low.h (struct linux_target_ops)
6112 <supports_hardware_single_step>: Initialize.
6113 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6114 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6115 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6116 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6117 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6118 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6119 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6120 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6121 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6122 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6124 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6125 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6127 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6128 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6129 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6131 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6132 * target.h (struct target_ops): <supports_software_single_step>:
6134 (target_supports_software_single_step): New macro.
6136 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6138 * linux-low.c (linux_wait_1): Fix pc advance condition.
6139 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6140 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6142 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6144 * linux-arm-low.c (arm_is_thumb_mode): New function.
6145 (arm_breakpoint_at): Use arm_is_thumb_mode.
6146 (arm_breakpoint_kind_from_current_state): New function.
6147 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6149 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6150 (linux_breakpoint_kind_from_current_state): New function.
6151 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6152 * linux-low.h (struct linux_target_ops)
6153 <breakpoint_kind_from_current_state>: New field.
6154 * target.h (struct target_ops): Likewise.
6155 (target_breakpoint_kind_from_current_state): New macro.
6157 2015-11-30 Pedro Alves <palves@redhat.com>
6159 * linux-low.c (linux_resume): Wake up the event loop before
6162 2015-11-30 Pedro Alves <palves@redhat.com>
6164 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6166 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6168 * target.c (struct thread_search): New structure.
6169 (thread_search_callback): New function.
6170 (prev_general_thread): New global.
6171 (prepare_to_access_memory, done_accessing_memory): New functions.
6172 * target.h (prepare_to_access_memory, done_accessing_memory):
6173 Replace macros with function declarations.
6175 2015-11-30 Pedro Alves <palves@redhat.com>
6178 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6179 report TARGET_WAITKIND_NO_RESUMED.
6180 * remote-utils.c (prepare_resume_reply): Handle
6181 TARGET_WAITKIND_NO_RESUMED.
6182 * server.c (report_no_resumed): New global.
6183 (handle_query) <qSupported>: Handle "no-resumed+". Report
6184 "no-resumed+" support.
6185 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6186 return error if the client doesn't support no-resumed events.
6187 (push_stop_notification): New function.
6188 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6189 events if the client supports them.
6191 2015-11-30 Pedro Alves <palves@redhat.com>
6193 * linux-low.c (thread_still_has_status_pending_p): Don't check
6195 (lwp_resumed): New function.
6196 (status_pending_p_callback): Return early if the LWP is not
6197 supposed to be resumed.
6199 2015-11-30 Pedro Alves <palves@redhat.com>
6201 * linux-low.c (handle_extended_wait): Assert that the LWP's
6202 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6203 thread create events, leave the new child's status pending.
6204 (linux_low_filter_event): If GDB wants to hear about thread exit
6205 events, leave the LWP marked dead and don't delete it.
6206 (linux_wait_for_event_filtered): Don't check for thread exit.
6207 (filter_exit_event): New function.
6208 (linux_wait_1): Use it, when returning an exit event.
6209 (linux_resume_one_lwp_throw): Assert that the LWP's
6210 waitstatus is TARGET_WAITKIND_IGNORE.
6211 * remote-utils.c (prepare_resume_reply): Handle
6212 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6213 * server.c (report_thread_events): New global.
6214 (handle_general_set): Handle QThreadEvents.
6215 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6216 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6217 TARGET_WAITKIND_THREAD_EXITED.
6218 * server.h (report_thread_events): Declare.
6220 2015-11-30 Pedro Alves <palves@redhat.com>
6222 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6223 the thread's last_resume_kind was resume_stop.
6225 2015-11-30 Pedro Alves <palves@redhat.com>
6227 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6230 2015-11-30 Pedro Alves <palves@redhat.com>
6232 * server.c (handle_v_requests): Handle vCtrlC.
6234 2015-11-30 Pedro Alves <palves@redhat.com>
6236 * gdbthread.h (find_any_thread_of_pid): Declare.
6237 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6239 * server.c (handle_query): If current_thread is NULL, look for
6240 another thread of the selected process.
6242 2015-11-26 Daniel Colascione <dancol@dancol.org>
6243 Simon Marchi <simon.marchi@ericsson.com>
6245 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6246 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6248 * target.h (struct target_ops) <thread_name>: New field.
6249 (target_thread_name): New macro.
6251 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6253 * regcache.h (regcache_invalidate_pid): Add declaration.
6254 * regcache.c (regcache_invalidate_pid): New function, extracted
6255 from regcache_invalidate.
6256 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6257 Add trivial documentation comment.
6258 * lynx-low.c: Use regcache_invalidate_pid instead of
6259 regcache_invalidate.
6261 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6263 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6264 and Elf64_auxv_t if the target is Android.
6266 2015-11-22 Doug Evans <xdje42@gmail.com>
6268 * target.h: #include <sys/types.h>.
6270 2015-11-19 Pedro Alves <palves@redhat.com>
6272 * linux-low.c (linux_process_qsupported): Change prototype.
6274 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6276 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6277 and adjust to loop over all features.
6278 * server.c (handle_query) <qSupported>: Adjust to call
6279 target_process_qsupported once, passing it a vector of unprocessed
6281 * target.h (struct target_ops) <process_qsupported>: Change
6283 (target_process_qsupported): Adjust.
6285 2015-11-19 Pedro Alves <palves@redhat.com>
6287 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6289 * configure: Regenerate.
6291 2015-11-19 Pedro Alves <palves@redhat.com>
6293 * configure: Regenerate.
6295 2015-11-19 Yao Qi <yao.qi@linaro.org>
6297 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6300 2015-11-19 Yao Qi <yao.qi@linaro.org>
6302 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6303 (struct aarch64_operand): Move enum out.
6305 2015-11-19 Yao Qi <yao.qi@linaro.org>
6307 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6308 struct user_fpsimd_state *.
6309 (aarch64_store_fpregset): Likewise.
6311 2015-11-19 Yao Qi <yao.qi@linaro.org>
6313 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6314 struct user_pt_regs *.
6315 (aarch64_store_gregset): Likewise.
6317 2015-11-18 Pedro Alves <palves@redhat.com>
6319 * Makefile.in (all_object_files): Add $IPA_OBJS.
6321 2015-11-17 Pedro Alves <palves@redhat.com>
6323 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6324 GDB_SIGNAL_0 and gdb_signal_to_string.
6326 2015-11-17 Pedro Alves <palves@redhat.com>
6328 * win32-low.c (handle_output_debug_string): Remove parameter.
6329 (win32_kill): Remove our_status local and adjust call to
6330 handle_output_debug_string.
6331 (get_child_debug_event): Adjust call to
6332 handle_output_debug_string.
6334 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6336 * linux-mips-low.c (mips_fill_gregset): Add cast.
6337 (mips_store_gregset): Likewise.
6338 (mips_fill_fpregset): Likewise.
6339 (mips_store_fpregset): Likewise.
6341 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6343 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6346 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6348 * linux-mips-low.c (mips_linux_new_thread): Change type of
6349 watch_type to enum target_hw_bp_type.
6351 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6353 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6354 Change return type to arm_hwbp_type.
6356 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6358 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6359 (arm_store_gregset): Likewise.
6360 * linux-arm-low.c (arm_get_hwcap): Likewise.
6361 (arm_read_description): Likewise.
6363 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6365 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6367 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6369 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6370 (ppc_fill_vsxregset): Likewise.
6371 (ppc_store_vsxregset): Likewise.
6372 (ppc_fill_vrregset): Likewise.
6373 (ppc_store_vrregset): Likewise.
6374 (ppc_fill_evrregset): Likewise.
6375 (ppc_store_evrregset): Likewise.
6377 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6379 * linux-ppc-low.c (ppc_usrregs_info): Remove
6380 forward-declaration.
6381 (ppc_arch_setup): Move lower in file.
6383 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6385 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6386 (ps_pdwrite): Likewise.
6388 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6390 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6391 to after assert checks.
6393 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6395 * proc-service.c (ps_pdread): Add/adjust casts.
6396 (ps_pdwrite): Add/adjust casts.
6398 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6400 * server.c (handle_search_memory_1): Cast return value of
6403 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6405 * server.c (write_qxfer_response): Change type of data to
6408 2015-10-29 Pedro Alves <palves@redhat.com>
6410 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6412 2015-10-29 Pedro Alves <palves@redhat.com>
6414 * tracepoint.c (clear_installed_tracepoints): Add casts.
6416 2015-10-29 Pedro Alves <palves@redhat.com>
6418 * server.c (handle_v_cont, process_serial_event): Add enum
6419 gdb_signal casts to signal parsing code.
6421 2015-10-29 Pedro Alves <palves@redhat.com>
6423 * linux-low.h (NULL_REGSET): Define.
6424 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6425 * linux-arm-low.c (arm_regsets): Likewise.
6426 * linux-crisv32-low.c (cris_regsets): Likewise.
6427 * linux-m68k-low.c (m68k_regsets): Likewise.
6428 * linux-mips-low.c (mips_regsets): Likewise.
6429 * linux-nios2-low.c (nios2_regsets): Likewise.
6430 * linux-ppc-low.c (ppc_regsets): Likewise.
6431 * linux-s390-low.c (s390_regsets): Likewise.
6432 * linux-sh-low.c (sh_regsets): Likewise.
6433 * linux-sparc-low.c (sparc_regsets): Likewise.
6434 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6435 * linux-tile-low.c (tile_regsets): Likewise.
6436 * linux-x86-low.c (x86_regsets): Likewise.
6437 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6439 2015-10-29 Pedro Alves <palves@redhat.com>
6441 * linux-low.h (NULL_REGSET): Define.
6442 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6443 * linux-arm-low.c (arm_regsets): Likewise.
6444 * linux-crisv32-low.c (cris_regsets): Likewise.
6445 * linux-m68k-low.c (m68k_regsets): Likewise.
6446 * linux-mips-low.c (mips_regsets): Likewise.
6447 * linux-nios2-low.c (nios2_regsets): Likewise.
6448 * linux-ppc-low.c (ppc_regsets): Likewise.
6449 * linux-s390-low.c (s390_regsets): Likewise.
6450 * linux-sh-low.c (sh_regsets): Likewise.
6451 * linux-sparc-low.c (sparc_regsets): Likewise.
6452 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6453 * linux-tile-low.c (tile_regsets): Likewise.
6454 * linux-x86-low.c (x86_regsets): Likewise.
6455 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6457 2015-10-26 Doug Evans <dje@google.com>
6459 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6461 2015-10-26 Doug Evans <dje@google.com>
6463 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6465 2015-10-26 Doug Evans <dje@google.com>
6467 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6469 (attach_thread, find_new_threads_callback): Ditto.
6471 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6473 * mem-break.h (set_breakpoint_data): Remove.
6475 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6477 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6478 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6479 (initialize_low): Remove set_breakpoint_data call.
6480 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6481 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6482 (initialize_low): Remove set_breakpoint_data call.
6483 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6484 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6485 (initialize_low): Remove set_breakpoint_data call.
6487 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6489 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6490 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6491 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6492 * target.h (target_breakpoint_kind_from_pc): New macro.
6494 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6496 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6497 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6498 the default breakpoint kind.
6500 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6502 * linux-arm-low.c (arm_supports_z_point_type): Add software
6505 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6507 * linux-arm-low.c: Refactor breakpoint definitions.
6508 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6509 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6511 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6513 * Makefile.in: Add arm.c/o.
6514 * configure.srv: Likewise.
6515 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6516 (arm_breakpoint_kind_from_pc): New function.
6517 (arm_sw_breakpoint_from_kind): Return proper kind.
6518 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6520 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6522 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6524 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6525 (struct raw_breakpoint) <size>: Remove.
6526 (struct raw_breakpoint) <kind>: Add.
6527 (bp_size): New function.
6528 (bp_opcode): Likewise.
6529 (find_raw_breakpoint_at): Adjust for kind.
6530 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6531 (remove_memory_breakpoint): Adjust for kind call bp_size.
6532 (set_raw_breakpoint_at): Adjust for kind.
6533 (set_breakpoint): Likewise.
6534 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6535 (delete_raw_breakpoint): Adjust for kind.
6536 (delete_breakpoint): Likewise.
6537 (find_gdb_breakpoint): Likewise.
6538 (set_gdb_breakpoint_1): Likewise.
6539 (set_gdb_breakpoint): Likewise.
6540 (delete_gdb_breakpoint_1): Likewise.
6541 (delete_gdb_breakpoint): Likewise.
6542 (uninsert_raw_breakpoint): Likewise.
6543 (reinsert_raw_breakpoint): Likewise.
6544 (set_breakpoint_data): Remove.
6545 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6546 (check_mem_read): Adjust for kind call bp_size.
6547 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6548 (clone_one_breakpoint): Adjust for kind.
6549 * mem-break.h (set_gdb_breakpoint): Likewise.
6550 (delete_gdb_breakpoint): Likewise.
6551 * server.c (process_serial_event): Likewise.
6553 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6555 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6556 (struct linux_target_ops) <breakpoint>: Remove.
6557 (struct linux_target_ops) <breakpoint_len>: Remove.
6558 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6559 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6560 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6561 (arm_sw_breakpoint_from_kind): New function.
6562 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6563 (struct linux_target_ops) <breakpoint>: Remove.
6564 (struct linux_target_ops) <breakpoint_len>: Remove.
6565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6567 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6568 (struct linux_target_ops) <breakpoint>: Remove.
6569 (struct linux_target_ops) <breakpoint_len>: Remove.
6570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6572 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6573 (struct linux_target_ops) <breakpoint>: Remove.
6574 (struct linux_target_ops) <breakpoint_len>: Remove.
6575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6577 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6578 and sw_breakpoint_from_kind to increment the pc.
6579 (linux_breakpoint_kind_from_pc): New function.
6580 (linux_sw_breakpoint_from_kind): New function.
6581 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6582 (initialize_low): Call breakpoint_kind_from_pc and
6583 sw_breakpoint_from_kind to replace breakpoint_data/len.
6584 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6587 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6588 (struct linux_target_ops) <breakpoint>: Remove.
6589 (struct linux_target_ops) <breakpoint_len>: Remove.
6590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6592 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6593 (struct linux_target_ops) <breakpoint>: Remove.
6594 (struct linux_target_ops) <breakpoint_len>: Remove.
6595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6597 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6598 (struct linux_target_ops) <breakpoint>: Remove.
6599 (struct linux_target_ops) <breakpoint_len>: Remove.
6600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6602 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6603 (struct linux_target_ops) <breakpoint>: Remove.
6604 (struct linux_target_ops) <breakpoint_len>: Remove.
6605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6607 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6608 (struct linux_target_ops) <breakpoint>: Remove.
6609 (struct linux_target_ops) <breakpoint_len>: Remove.
6610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6612 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6613 (struct linux_target_ops) <breakpoint>: Remove.
6614 (struct linux_target_ops) <breakpoint_len>: Remove.
6615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6617 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6618 (struct linux_target_ops) <breakpoint>: Remove.
6619 (struct linux_target_ops) <breakpoint_len>: Remove.
6620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6622 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6623 (struct linux_target_ops) <breakpoint>: Remove.
6624 (struct linux_target_ops) <breakpoint_len>: Remove.
6625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6627 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6628 (struct linux_target_ops) <breakpoint>: Remove.
6629 (struct linux_target_ops) <breakpoint_len>: Remove.
6630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6632 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6633 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6634 (struct linux_target_ops) <breakpoint>: Remove.
6635 (struct linux_target_ops) <breakpoint_len>: Remove.
6636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6637 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6638 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6639 (struct linux_target_ops) <breakpoint>: Remove.
6640 (struct linux_target_ops) <breakpoint_len>: Remove.
6641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6644 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6646 * linux-cris-low.c (cris_get_pc): Remove void arg.
6648 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6650 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6653 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6655 * inferiors.c (thread_pid_matches_callback): New function.
6656 (find_thread_process): New function.
6657 (remove_thread): Reset current_thread.
6658 (remove_process): Assert threads have been removed first.
6660 2015-10-15 Yao Qi <yao.qi@linaro.org>
6662 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6664 (aarch64_remove_point): Likewise.
6665 * regcache.c (regcache_register_size): New function.
6667 2015-10-12 Yao Qi <yao.qi@linaro.org>
6669 * linux-aarch64-low.c: Update all callers as emit_load_store
6670 is renamed to aarch64_emit_load_store.
6672 2015-10-12 Yao Qi <yao.qi@linaro.org>
6674 * linux-aarch64-low.c: Update all callers of function renaming
6675 from emit_insn to aarch64_emit_insn.
6677 2015-10-12 Yao Qi <yao.qi@linaro.org>
6679 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6680 arch/aarch64-insn.h.
6681 (struct aarch64_memory_operand): Likewise.
6683 (emit_insn): Move to arch/aarch64-insn.c.
6684 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6685 (emit_load_store): Move to arch/aarch64-insn.c.
6686 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6687 (can_encode_int32): Remove.
6689 2015-10-12 Yao Qi <yao.qi@linaro.org>
6691 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6692 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6693 (aarch64_relocate_instruction): Likewise.
6694 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6695 (struct aarch64_insn_visitor): Likewise.
6697 2015-10-12 Yao Qi <yao.qi@linaro.org>
6699 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6700 (struct aarch64_insn_visitor): New.
6701 (struct aarch64_insn_relocation_data): New.
6702 (aarch64_ftrace_insn_reloc_b): New function.
6703 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6704 (aarch64_ftrace_insn_reloc_cb): Likewise.
6705 (aarch64_ftrace_insn_reloc_tb): Likewise.
6706 (aarch64_ftrace_insn_reloc_adr): Likewise.
6707 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6708 (aarch64_ftrace_insn_reloc_others): Likewise.
6710 (aarch64_relocate_instruction): Use visitor.
6712 2015-10-12 Yao Qi <yao.qi@linaro.org>
6714 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6715 int. Add argument buf.
6716 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6717 aarch64_relocate_instruction.
6719 2015-10-12 Yao Qi <yao.qi@linaro.org>
6721 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6722 argument insn. Remove local variable insn. Don't call
6724 (aarch64_install_fast_tracepoint_jump_pad): Call
6727 2015-09-30 Yao Qi <yao.qi@linaro.org>
6729 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6730 (emit_load_store_pair): Likewise.
6732 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6734 * dll.c (match_dll): Add cast(s).
6735 (unloaded_dll): Likewise.
6736 * linux-low.c (second_thread_of_pid_p): Likewise.
6737 (delete_lwp_callback): Likewise.
6738 (count_events_callback): Likewise.
6739 (select_event_lwp_callback): Likewise.
6740 (linux_set_resume_request): Likewise.
6741 * server.c (accumulate_file_name_length): Likewise.
6742 (emit_dll_description): Likewise.
6743 (handle_qxfer_threads_worker): Likewise.
6744 (visit_actioned_threads): Likewise.
6745 * thread-db.c (any_thread_of): Likewise.
6746 * tracepoint.c (same_process_p): Likewise.
6747 (match_blocktype): Likewise.
6748 (build_traceframe_info_xml): Likewise.
6750 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6752 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6754 (gdb_unparse_agent_expr): Likewise.
6755 * hostio.c (require_data): Likewise.
6756 (handle_pread): Likewise.
6757 * linux-low.c (disable_regset): Likewise.
6758 (fetch_register): Likewise.
6759 (store_register): Likewise.
6760 (get_dynamic): Likewise.
6761 (linux_qxfer_libraries_svr4): Likewise.
6762 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6763 (set_fast_tracepoint_jump): Likewise.
6764 (uninsert_fast_tracepoint_jumps_at): Likewise.
6765 (reinsert_fast_tracepoint_jumps_at): Likewise.
6766 (validate_inserted_breakpoint): Likewise.
6767 (clone_agent_expr): Likewise.
6768 * regcache.c (init_register_cache): Likewise.
6769 * remote-utils.c (putpkt_binary_1): Likewise.
6770 (decode_M_packet): Likewise.
6771 (decode_X_packet): Likewise.
6772 (look_up_one_symbol): Likewise.
6773 (relocate_instruction): Likewise.
6774 (monitor_output): Likewise.
6775 * server.c (handle_search_memory): Likewise.
6776 (handle_qxfer_exec_file): Likewise.
6777 (handle_qxfer_libraries): Likewise.
6778 (handle_qxfer): Likewise.
6779 (handle_query): Likewise.
6780 (handle_v_cont): Likewise.
6781 (handle_v_run): Likewise.
6782 (captured_main): Likewise.
6783 * target.c (write_inferior_memory): Likewise.
6784 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6785 * tracepoint.c (init_trace_buffer): Likewise.
6786 (add_tracepoint_action): Likewise.
6787 (add_traceframe): Likewise.
6788 (add_traceframe_block): Likewise.
6789 (cmd_qtdpsrc): Likewise.
6790 (cmd_qtdv): Likewise.
6791 (cmd_qtstatus): Likewise.
6792 (response_source): Likewise.
6793 (response_tsv): Likewise.
6794 (cmd_qtnotes): Likewise.
6795 (gdb_collect): Likewise.
6796 (initialize_tracepoint): Likewise.
6798 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6800 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6801 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6802 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6804 (enum aarch64_condition_codes): New enum.
6805 (w0): New static global.
6808 (struct aarch64_memory_operand) <type>: New
6809 MEMORY_OPERAND_POSTINDEX type.
6810 (postindex_memory_operand): New helper function.
6811 (emit_ret): New function.
6812 (emit_load_store_pair): New function, factored out of emit_stp
6813 with support for MEMORY_OPERAND_POSTINDEX.
6814 (emit_stp): Rewrite using emit_load_store_pair.
6815 (emit_ldp): New function.
6816 (emit_load_store): Likewise.
6817 (emit_ldr): Mention post-index instruction in comment.
6818 (emit_ldrh): New function.
6819 (emit_ldrb): New function.
6820 (emit_ldrsw): Mention post-index instruction in comment.
6821 (emit_str): Likewise.
6822 (emit_subs): New function.
6823 (emit_cmp): Likewise.
6824 (emit_and): Likewise.
6825 (emit_orr): Likewise.
6826 (emit_orn): Likewise.
6827 (emit_eor): Likewise.
6828 (emit_mvn): Likewise.
6829 (emit_lslv): Likewise.
6830 (emit_lsrv): Likewise.
6831 (emit_asrv): Likewise.
6832 (emit_mul): Likewise.
6833 (emit_sbfm): Likewise.
6834 (emit_sbfx): Likewise.
6835 (emit_ubfm): Likewise.
6836 (emit_ubfx): Likewise.
6837 (emit_csinc): Likewise.
6838 (emit_cset): Likewise.
6839 (emit_nop): Likewise.
6840 (emit_ops_insns): New helper function.
6841 (emit_pop): Likewise.
6842 (emit_push): Likewise.
6843 (aarch64_emit_prologue): New function.
6844 (aarch64_emit_epilogue): Likewise.
6845 (aarch64_emit_add): Likewise.
6846 (aarch64_emit_sub): Likewise.
6847 (aarch64_emit_mul): Likewise.
6848 (aarch64_emit_lsh): Likewise.
6849 (aarch64_emit_rsh_signed): Likewise.
6850 (aarch64_emit_rsh_unsigned): Likewise.
6851 (aarch64_emit_ext): Likewise.
6852 (aarch64_emit_log_not): Likewise.
6853 (aarch64_emit_bit_and): Likewise.
6854 (aarch64_emit_bit_or): Likewise.
6855 (aarch64_emit_bit_xor): Likewise.
6856 (aarch64_emit_bit_not): Likewise.
6857 (aarch64_emit_equal): Likewise.
6858 (aarch64_emit_less_signed): Likewise.
6859 (aarch64_emit_less_unsigned): Likewise.
6860 (aarch64_emit_ref): Likewise.
6861 (aarch64_emit_if_goto): Likewise.
6862 (aarch64_emit_goto): Likewise.
6863 (aarch64_write_goto_address): Likewise.
6864 (aarch64_emit_const): Likewise.
6865 (aarch64_emit_call): Likewise.
6866 (aarch64_emit_reg): Likewise.
6867 (aarch64_emit_pop): Likewise.
6868 (aarch64_emit_stack_flush): Likewise.
6869 (aarch64_emit_zero_ext): Likewise.
6870 (aarch64_emit_swap): Likewise.
6871 (aarch64_emit_stack_adjust): Likewise.
6872 (aarch64_emit_int_call_1): Likewise.
6873 (aarch64_emit_void_call_2): Likewise.
6874 (aarch64_emit_eq_goto): Likewise.
6875 (aarch64_emit_ne_goto): Likewise.
6876 (aarch64_emit_lt_goto): Likewise.
6877 (aarch64_emit_le_goto): Likewise.
6878 (aarch64_emit_gt_goto): Likewise.
6879 (aarch64_emit_ge_got): Likewise.
6880 (aarch64_emit_ops_impl): New static global variable.
6881 (aarch64_emit_ops): New target function, return
6882 &aarch64_emit_ops_impl.
6883 (struct linux_target_ops): Install it.
6885 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6887 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6888 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6890 * linux-aarch64-ipa.c: New file.
6891 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6893 (aarch64_get_thread_area): New target method.
6894 (extract_signed_bitfield): New helper function.
6895 (aarch64_decode_ldr_literal): New function.
6896 (enum aarch64_opcodes): New enum.
6897 (struct aarch64_register): New struct.
6898 (struct aarch64_operand): New struct.
6899 (x0): New static global.
6908 (aarch64_register): New helper function.
6909 (register_operand): Likewise.
6910 (immediate_operand): Likewise.
6911 (struct aarch64_memory_operand): New struct.
6912 (offset_memory_operand): New helper function.
6913 (preindex_memory_operand): Likewise.
6914 (enum aarch64_system_control_registers): New enum.
6915 (ENCODE): New macro.
6916 (emit_insn): New helper function.
6917 (emit_b): New function.
6918 (emit_bcond): Likewise.
6919 (emit_cb): Likewise.
6920 (emit_tb): Likewise.
6921 (emit_blr): Likewise.
6922 (emit_stp): Likewise.
6923 (emit_ldp_q_offset): Likewise.
6924 (emit_stp_q_offset): Likewise.
6925 (emit_load_store): Likewise.
6926 (emit_ldr): Likewise.
6927 (emit_ldrsw): Likewise.
6928 (emit_str): Likewise.
6929 (emit_ldaxr): Likewise.
6930 (emit_stxr): Likewise.
6931 (emit_stlr): Likewise.
6932 (emit_data_processing_reg): Likewise.
6933 (emit_data_processing): Likewise.
6934 (emit_add): Likewise.
6935 (emit_sub): Likewise.
6936 (emit_mov): Likewise.
6937 (emit_movk): Likewise.
6938 (emit_mov_addr): Likewise.
6939 (emit_mrs): Likewise.
6940 (emit_msr): Likewise.
6941 (emit_sevl): Likewise.
6942 (emit_wfe): Likewise.
6943 (append_insns): Likewise.
6944 (can_encode_int32_in): New helper function.
6945 (aarch64_relocate_instruction): New function.
6946 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6947 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6948 (struct linux_target_ops): Install aarch64_get_thread_area,
6949 aarch64_install_fast_tracepoint_jump_pad and
6950 aarch64_get_min_fast_tracepoint_insn_len.
6952 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6954 * Makefile.in (aarch64-insn.o): New rule.
6955 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6957 2015-09-21 Yao Qi <yao.qi@linaro.org>
6959 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6961 2015-09-21 Yao Qi <yao.qi@linaro.org>
6963 * tracepoint.c (max_jump_pad_size): Remove.
6965 2015-09-18 Yao Qi <yao.qi@linaro.org>
6967 * linux-aarch64-low.c: Don't include sys/uio.h.
6968 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6970 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6972 * tracepoint.c (eval_result_type): Change prototype.
6973 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6975 2015-09-15 Pedro Alves <palves@redhat.com>
6977 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6978 Check whether to report exec events instead of checking whether
6979 multiprocess is enabled.
6981 2015-09-15 Pedro Alves <palves@redhat.com>
6984 * remote-utils.c (prepare_resume_reply): Merge
6985 TARGET_WAITKIND_VFORK_DONE switch case with the
6986 TARGET_WAITKIND_FORKED case.
6988 2015-09-15 Yao Qi <yao.qi@linaro.org>
6990 * server.c (handle_query): Check string comparison using
6991 "else if" instead of "if".
6993 2015-09-15 Yao Qi <yao.qi@linaro.org>
6995 * server.c (vCont_supported): New global variable.
6996 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6997 matches. Append ";vContSupported+" to own_buf.
6998 (handle_v_requests): Append ";s;S" to own_buf if target supports
6999 hardware single step or vCont_supported is false.
7000 (capture_main): Set vCont_supported to zero.
7002 2015-09-15 Yao Qi <yao.qi@linaro.org>
7004 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7006 (linux_supports_hardware_single_step): ... New function.
7007 (linux_target_ops): Update.
7008 * lynx-low.c (lynx_target_ops): Set field
7009 supports_hardware_single_step to target_can_do_hardware_single_step.
7010 * nto-low.c (nto_target_ops): Likewise.
7011 * spu-low.c (spu_target_ops): Likewise.
7012 * win32-low.c (win32_target_ops): Likewise.
7013 * target.c (target_can_do_hardware_single_step): New function.
7014 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7015 Remove. <supports_hardware_single_step>: New field.
7016 (target_supports_conditional_breakpoints): Remove.
7017 (target_supports_hardware_single_step): New macro.
7018 (target_can_do_hardware_single_step): Declare.
7019 * server.c (handle_query): Use target_supports_hardware_single_step
7020 instead of target_supports_conditional_breakpoints.
7022 2015-09-15 Yao Qi <yao.qi@linaro.org>
7024 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7026 (struct linux_target_ops the_low_target): Install
7027 aarch64_linux_siginfo_fixup.
7029 2015-09-11 Don Breazeal <donb@codesourcery.com>
7030 Luis Machado <lgustavo@codesourcery.com>
7032 * linux-low.c (linux_mourn): Static declaration.
7033 (linux_arch_setup): Move in front of
7034 handle_extended_wait.
7035 (linux_arch_setup_thread): New function.
7036 (handle_extended_wait): Handle exec events. Call
7037 linux_arch_setup_thread. Make event_lwp argument a
7038 pointer-to-a-pointer.
7039 (check_zombie_leaders): Do not check stopped threads.
7040 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7041 (linux_low_filter_event): Add lwp and thread for exec'ing
7042 non-leader thread if leader thread has been deleted.
7043 Refactor code into linux_arch_setup_thread and call it.
7044 Pass child lwp pointer by reference to handle_extended_wait.
7045 (linux_wait_for_event_filtered): Update comment.
7046 (linux_wait_1): Prevent clobbering exec event status.
7047 (linux_supports_exec_events): New function.
7048 (linux_target_ops) <supports_exec_events>: Initialize new member.
7049 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7051 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7052 * server.c (report_exec_events): New global variable.
7053 (handle_query): Handle qSupported query for exec-events feature.
7054 (captured_main): Initialize report_exec_events.
7055 * server.h (report_exec_events): Declare new global variable.
7056 * target.h (struct target_ops) <supports_exec_events>: New
7058 (target_supports_exec_events): New macro.
7059 * win32-low.c (win32_target_ops) <supports_exec_events>:
7060 Initialize new member.
7062 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7064 * linux-low.c (linux_low_enable_btrace): Remove.
7065 (linux_target_ops): Replace linux_low_enable_btrace with
7066 linux_enable_btrace.
7068 2015-09-03 Yao Qi <yao.qi@linaro.org>
7070 * linux-aarch64-low.c (aarch64_insert_point): Call
7071 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7074 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7076 * linux-low.c (check_stopped_by_breakpoint): Use
7077 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7079 2015-08-27 Pedro Alves <palves@redhat.com>
7081 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7083 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7085 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7086 the XNEW-family equivalent.
7087 (compile_bytecodes): Likewise.
7088 * dll.c (loaded_dll): Likewise.
7089 * event-loop.c (append_callback_event): Likewise.
7090 (create_file_handler): Likewise.
7091 (create_file_event): Likewise.
7092 * hostio.c (handle_open): Likewise.
7093 * inferiors.c (add_thread): Likewise.
7094 (add_process): Likewise.
7095 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7096 * linux-arm-low.c (arm_new_process): Likewise.
7097 (arm_new_thread): Likewise.
7098 * linux-low.c (add_to_pid_list): Likewise.
7099 (linux_add_process): Likewise.
7100 (handle_extended_wait): Likewise.
7101 (add_lwp): Likewise.
7102 (enqueue_one_deferred_signal): Likewise.
7103 (enqueue_pending_signal): Likewise.
7104 (linux_resume_one_lwp_throw): Likewise.
7105 (linux_resume_one_thread): Likewise.
7106 (linux_read_memory): Likewise.
7107 (linux_write_memory): Likewise.
7108 * linux-mips-low.c (mips_linux_new_process): Likewise.
7109 (mips_linux_new_thread): Likewise.
7110 (mips_add_watchpoint): Likewise.
7111 * linux-x86-low.c (initialize_low_arch): Likewise.
7112 * lynx-low.c (lynx_add_process): Likewise.
7113 * mem-break.c (set_raw_breakpoint_at): Likewise.
7114 (set_breakpoint): Likewise.
7115 (add_condition_to_breakpoint): Likewise.
7116 (add_commands_to_breakpoint): Likewise.
7117 (clone_agent_expr): Likewise.
7118 (clone_one_breakpoint): Likewise.
7119 * regcache.c (new_register_cache): Likewise.
7120 * remote-utils.c (look_up_one_symbol): Likewise.
7121 * server.c (queue_stop_reply): Likewise.
7122 (start_inferior): Likewise.
7123 (queue_stop_reply_callback): Likewise.
7124 (handle_target_event): Likewise.
7125 * spu-low.c (fetch_ppc_memory): Likewise.
7126 (store_ppc_memory): Likewise.
7127 * target.c (set_target_ops): Likewise.
7128 * thread-db.c (thread_db_load_search): Likewise.
7129 (try_thread_db_load_1): Likewise.
7130 * tracepoint.c (add_tracepoint): Likewise.
7131 (add_tracepoint_action): Likewise.
7132 (create_trace_state_variable): Likewise.
7133 (cmd_qtdpsrc): Likewise.
7134 (cmd_qtro): Likewise.
7135 (add_while_stepping_state): Likewise.
7136 * win32-low.c (child_add_thread): Likewise.
7137 (get_image_name): Likewise.
7139 2015-08-25 Yao Qi <yao.qi@linaro.org>
7141 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7143 2015-08-25 Yao Qi <yao.qi@linaro.org>
7145 * Makefile.in (aarch64-linux.o): New rule.
7146 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7148 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7149 (aarch64_init_debug_reg_state): Make it extern.
7150 (aarch64_linux_prepare_to_resume): Remove.
7152 2015-08-25 Yao Qi <yao.qi@linaro.org>
7154 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7155 lwp_arch_private_info and ptid_of_lwp.
7157 2015-08-25 Yao Qi <yao.qi@linaro.org>
7159 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7160 Find proc_info by find_process_pid. All callers updated.
7162 2015-08-25 Yao Qi <yao.qi@linaro.org>
7164 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7166 (debug_reg_change_callback): Remove.
7167 (aarch64_notify_debug_reg_change): Remove.
7169 2015-08-25 Yao Qi <yao.qi@linaro.org>
7171 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7172 Call current_lwp_ptid.
7174 2015-08-25 Yao Qi <yao.qi@linaro.org>
7176 * linux-aarch64-low.c (debug_reg_change_callback): Use
7179 2015-08-25 Yao Qi <yao.qi@linaro.org>
7181 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7183 2015-08-25 Yao Qi <yao.qi@linaro.org>
7185 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7187 2015-08-25 Yao Qi <yao.qi@linaro.org>
7189 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7192 2015-08-25 Yao Qi <yao.qi@linaro.org>
7194 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7196 (debug_reg_change_callback): Remove argument entry and add argument
7197 lwp. Remove local variable thread. Don't print thread id in the
7198 debugging output. Don't check whether pid of thread equals to pid.
7199 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7200 iterate_over_lwps instead find_inferior.
7202 2015-08-24 Pedro Alves <palves@redhat.com>
7204 * inferiors.c (get_first_process): New function.
7205 * inferiors.h (get_first_process): New declaration.
7206 * remote-utils.c (read_ptid): Default to the first process in the
7207 list, instead of to the current thread's process.
7209 2015-08-24 Pedro Alves <palves@redhat.com>
7211 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7212 * event-loop.c: Likewise.
7213 * remote-utils.c: Likewise.
7214 * tracepoint.c: Likewise.
7216 2015-08-24 Pedro Alves <palves@redhat.com>
7218 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7221 2015-08-21 Pedro Alves <palves@redhat.com>
7223 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7224 instead of literal 1.
7226 2015-08-21 Pedro Alves <palves@redhat.com>
7228 * tdesc.c (default_description): Explicitly zero-initialize.
7230 2015-08-21 Pedro Alves <palves@redhat.com>
7233 * inferiors.c (remove_thread): Discard any pending stop reply for
7235 * server.c (remove_all_on_match_pid): Rename to ...
7236 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7238 (discard_queued_stop_replies): Change parameter to a ptid. Now
7240 (handle_v_kill, kill_inferior_callback, captured_main)
7241 (process_serial_event): Adjust.
7242 * server.h (discard_queued_stop_replies): Declare.
7244 2015-08-21 Pedro Alves <palves@redhat.com>
7246 * linux-low.c (wait_for_sigstop): Always switch to no thread
7247 selected if the previously current thread dies.
7248 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7249 process instead of the current thread's.
7250 * remote-utils.c (input_interrupt): Don't check if there's no
7252 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7253 current thread to the general thread fails, error out.
7254 (handle_qxfer_auxv, handle_qxfer_libraries)
7255 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7256 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7257 (handle_query): Check if there's a thread selected instead of
7258 checking whether there's any thread in the thread list.
7259 (handle_qxfer_threads, handle_qxfer_btrace)
7260 (handle_qxfer_btrace_conf): Don't error out early if there's no
7261 thread in the thread list.
7262 (handle_v_cont, myresume): Don't set the current thread to the
7264 (process_serial_event) <Hg handling>: Also set thread_id if the
7265 previous general thread is still alive.
7266 (process_serial_event) <g/G handling>: If setting the current
7267 thread to the general thread fails, error out.
7268 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7269 thread's lwp instead of the current thread's.
7270 * target.c (set_desired_thread): If the desired thread was not
7271 found, leave the current thread pointing to NULL. Return an int
7272 (boolean) indicating success.
7273 * target.h (set_desired_thread): Change return type to int.
7275 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7277 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7278 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7280 (ps_get_thread_area): New function.
7282 2015-08-19 Gary Benson <gbenson@redhat.com>
7284 * hostio.c (handle_pread): Do not attempt to read more data
7285 than hostio_reply_with_data can fit in a packet.
7287 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7289 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7291 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7293 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7295 2015-08-06 Pedro Alves <palves@redhat.com>
7297 * tracepoint.c (expr_eval_result): Now an int.
7299 2015-08-06 Pedro Alves <palves@redhat.com>
7301 * gdbthread.h (struct regcache): Forward declare.
7302 (struct thread_info) <regcache_data>: Now a struct regcache
7304 * inferiors.c (inferior_regcache_data)
7305 (set_inferior_regcache_data): Now work with struct regcache
7307 * inferiors.h (struct regcache): Forward declare.
7308 (inferior_regcache_data, set_inferior_regcache_data): Now work
7309 with struct regcache pointers.
7310 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7311 (free_register_cache_thread): Remove struct regcache pointer
7314 2015-08-06 Pedro Alves <palves@redhat.com>
7316 * server.c (captured_main): On error, print the exception message
7317 to stderr, and if run_once is set, throw a quit.
7319 2015-08-06 Pedro Alves <palves@redhat.com>
7321 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7324 2015-08-06 Pedro Alves <palves@redhat.com>
7326 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7327 reading beyond the passed in buffer length.
7329 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7331 * tracepoint.c (symbol_list) <required>: Remove.
7333 2015-08-06 Pedro Alves <palves@redhat.com>
7335 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7336 count if stopping and suspending threads.
7337 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7338 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7339 (linux_detach): Complete an ongoing step-over.
7340 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7342 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7343 (linux_wait_1): If passing a signal to the inferior after
7344 finishing a step-over, unsuspend and re-resume all lwps. If we
7345 see a single-step event but the thread should be continuing, don't
7346 pass the trap to gdb.
7347 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7348 internal_error instead of gdb_assert.
7349 (enqueue_pending_signal): New function.
7350 (check_ptrace_stopped_lwp_gone): Add debug output.
7351 (start_step_over): Use internal_error instead of gdb_assert.
7352 (complete_ongoing_step_over): New function.
7353 (linux_resume_one_thread): Don't resume a suspended thread.
7354 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7357 2015-08-06 Pedro Alves <palves@redhat.com>
7359 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7360 (linux_thread_alive): Use lwp_is_marked_dead.
7361 (extended_event_reported): Delete.
7362 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7363 instead of extended_event_reported.
7364 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7366 (lwp_is_marked_dead): New function.
7367 (lwp_running): Use lwp_is_marked_dead.
7368 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7371 2015-08-06 Pedro Alves <palves@redhat.com>
7373 * linux-low.c (linux_wait_1): Move fork event output out of the
7374 !report_to_gdb check. Pass event_child->waitstatus to
7375 target_waitstatus_to_string instead of ourstatus.
7377 2015-08-04 Yao Qi <yao.qi@linaro.org>
7379 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7380 if current_thread is 32 bit.
7382 2015-08-04 Yao Qi <yao.qi@linaro.org>
7384 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7385 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7386 * server.c (extended_protocol): Remove "static".
7387 * server.h (extended_protocol): Declare it.
7389 2015-08-04 Yao Qi <yao.qi@linaro.org>
7391 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7392 both aarch64 and aarch32.
7393 (aarch64_set_pc): Likewise.
7395 2015-08-04 Yao Qi <yao.qi@linaro.org>
7397 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7398 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7399 arm-with-neon.xml to srv_xmlfiles.
7400 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7401 (is_64bit_tdesc): New function.
7402 (aarch64_linux_read_description): New function.
7403 (aarch64_arch_setup): Call aarch64_linux_read_description.
7404 (regs_info): Rename to regs_info_aarch64.
7405 (aarch64_regs_info): Return right regs_info.
7406 (initialize_low_arch): Call initialize_low_arch_aarch32.
7408 2015-08-04 Yao Qi <yao.qi@linaro.org>
7410 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7411 * linux-aarch32-low.c: New file.
7412 * linux-aarch32-low.h: New file.
7413 * linux-arm-low.c (arm_fill_gregset): Move it to
7414 linux-aarch32-low.c.
7415 (arm_store_gregset): Likewise.
7416 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7417 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7418 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7419 (regs_info): Rename to regs_info_arm.
7420 (arm_regs_info): Return regs_info_aarch32 if
7421 have_ptrace_getregset is 1 and target description is
7422 arm_with_neon or arm_with_vfpv3.
7423 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7424 Call initialize_low_arch_aarch32 instead.
7426 2015-08-04 Yao Qi <yao.qi@linaro.org>
7428 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7429 * linux-low.c: ... here.
7430 * linux-low.h (have_ptrace_getregset): Declare it.
7432 2015-08-04 Pedro Alves <palves@redhat.com>
7434 * thread-db.c (struct thread_db): Use new typedefs.
7435 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7437 (disable_thread_event_reporting): Cast result of dlsym to
7438 destination function pointer type.
7439 (thread_db_mourn): Use td_ta_delete_ftype.
7441 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7443 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7445 (CDX_BREAKPOINT): Define for R2.
7446 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7447 (the_low_target): Add comments.
7449 2015-07-30 Yao Qi <yao.qi@linaro.org>
7451 * linux-arm-low.c (arm_hwcap): Remove it.
7452 (arm_read_description): New local variable arm_hwcap. Don't
7453 set arm_hwcap to zero.
7455 2015-07-30 Yao Qi <yao.qi@linaro.org>
7457 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7458 Use regcache->tdesc instead.
7459 (arm_store_wmmxregset): Likewise.
7460 (arm_fill_vfpregset): Likewise.
7461 (arm_store_vfpregset): Likewise.
7463 2015-07-30 Yao Qi <yao.qi@linaro.org>
7465 * linux-arm-low.c: Include arch/arm.h.
7466 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7467 (arm_store_gregset): Likewise.
7469 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7471 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7472 ptrace's 4th parameter.
7474 2015-07-27 Yao Qi <yao.qi@linaro.org>
7476 * configure.srv (case aarch64*-*-linux*): Don't set
7479 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7481 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7483 * linux-arm-low.c: Likewise.
7484 * linux-cris-low.c: Likewise.
7485 * linux-crisv32-low.c: Likewise.
7486 * linux-low.c: Likewise.
7487 * linux-m68k-low.c: Likewise.
7488 * linux-mips-low.c: Likewise.
7489 * linux-nios2-low.c: Likewise.
7490 * linux-s390-low.c: Likewise.
7491 * linux-sparc-low.c: Likewise.
7492 * linux-tic6x-low.c: Likewise.
7493 * linux-tile-low.c: Likewise.
7494 * linux-x86-low.c: Likewise.
7496 2015-07-24 Pedro Alves <palves@redhat.com>
7498 * config.in: Regenerate.
7499 * configure: Regenerate.
7501 2015-07-24 Pedro Alves <palves@redhat.com>
7503 * acinclude.m4: Include ../ptrace.m4.
7504 * configure.ac: Call GDB_AC_PTRACE.
7505 * config.in, configure: Regenerate.
7507 2015-07-24 Yao Qi <yao.qi@linaro.org>
7509 * linux-low.c (linux_create_inferior): Remove setting to
7510 proc->priv->new_inferior.
7511 (linux_attach): Likewise.
7512 (linux_low_filter_event): Likewise.
7513 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7515 2015-07-24 Yao Qi <yao.qi@linaro.org>
7517 * linux-low.c (linux_arch_setup): New function.
7518 (linux_low_filter_event): If proc->tdesc is NULL and
7519 proc->attached is true, call the_low_target.arch_setup.
7520 Otherwise, keep status pending, and return.
7521 (linux_resume_one_lwp_throw): Don't call get_pc if
7522 thread->while_stepping isn't NULL. Don't call
7523 get_thread_regcache if proc->tdesc is NULL.
7524 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7525 (linux_target_ops): Install arch_setup.
7526 * server.c (start_inferior): Call the_target->arch_setup.
7527 * target.h (struct target_ops) <arch_setup>: New field.
7528 (target_arch_setup): New marco.
7529 * lynx-low.c (lynx_target_ops): Update.
7530 * nto-low.c (nto_target_ops): Update.
7531 * spu-low.c (spu_target_ops): Update.
7532 * win32-low.c (win32_target_ops): Update.
7534 2015-07-24 Yao Qi <yao.qi@linaro.org>
7536 * linux-low.c (linux_add_process): Don't set
7537 proc->priv->new_inferior.
7538 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7539 (linux_attach): Likewise.
7541 2015-07-24 Yao Qi <yao.qi@linaro.org>
7543 * server.c (start_inferior): Code refactor.
7545 2015-07-24 Yao Qi <yao.qi@linaro.org>
7547 * server.c (process_serial_event): Set general_thread.
7549 2015-07-21 Yao Qi <yao.qi@linaro.org>
7551 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7552 aarch64_linux_get_debug_reg_capacity.
7554 2015-07-17 Yao Qi <yao.qi@linaro.org>
7556 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7557 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7558 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7559 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7560 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7561 (AARCH64_HWP_ALIGNMENT): Likewise.
7562 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7563 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7564 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7565 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7566 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7567 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7568 (struct aarch64_debug_reg_state): Likewise.
7569 (struct arch_lwp_info): Likewise.
7570 (aarch64_align_watchpoint): Likewise.
7571 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7572 (aarch64_watchpoint_length): Likewise.
7573 (aarch64_point_encode_ctrl_reg): Likewise
7574 (aarch64_point_is_aligned): Likewise.
7575 (aarch64_align_watchpoint): Likewise.
7576 (aarch64_linux_set_debug_regs):
7577 (aarch64_dr_state_insert_one_point): Likewise.
7578 (aarch64_dr_state_remove_one_point): Likewise.
7579 (aarch64_handle_breakpoint): Likewise.
7580 (aarch64_handle_aligned_watchpoint): Likewise.
7581 (aarch64_handle_unaligned_watchpoint): Likewise.
7582 (aarch64_handle_watchpoint): Likewise.
7584 2015-07-17 Yao Qi <yao.qi@linaro.org>
7586 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7587 and don't aarch64_get_debug_reg_state. All callers update.
7588 (aarch64_handle_aligned_watchpoint): Likewise.
7589 (aarch64_handle_unaligned_watchpoint): Likewise.
7590 (aarch64_handle_watchpoint): Likewise.
7591 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7592 (aarch64_remove_point): Likewise.
7594 2015-07-17 Yao Qi <yao.qi@linaro.org>
7596 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7598 (aarch64_handle_unaligned_watchpoint): Likewise.
7600 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7602 Revert the previous 3 commits:
7603 Move gdb_regex* to common/
7604 Move linux_find_memory_regions_full & co.
7605 gdbserver build-id attribute generator
7607 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7608 Jan Kratochvil <jan.kratochvil@redhat.com>
7610 gdbserver build-id attribute generator.
7611 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7612 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7613 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7615 (get_dynamic): Use find_pdhr to traverse program headers.
7616 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7617 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7618 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7619 (get_hex_build_id): New.
7620 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7621 to reply XML document.
7623 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7624 Jan Kratochvil <jan.kratochvil@redhat.com>
7626 * target.c: Include target/target-utils.h and fcntl.h.
7627 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7628 (target_fileio_read_stralloc): New functions.
7630 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7632 * Makefile.in (OBS): Add gdb_regex.o.
7634 * config.in: Rebuilt.
7635 * configure: Rebuilt.
7637 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7638 Jan Kratochvil <jan.kratochvil@redhat.com>
7640 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7641 * Makefile.in (OBS): Add target-utils.o.
7642 (linux-maps.o, target-utils.o): New.
7643 * configure.srv (srv_linux_obj): Add linux-maps.o.
7645 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7647 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7649 (the_low_target): Install it.
7651 2015-07-14 Pedro Alves <palves@redhat.com>
7653 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7654 Instead, ignore ECHILD, and throw an error for other errnos.
7656 2015-07-10 Pedro Alves <palves@redhat.com>
7658 * event-loop.c (struct callback_event) <data>: Change type to
7659 gdb_client_data instance instead of gdb_client_data pointer.
7660 (append_callback_event): Adjust.
7662 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7664 * linux-aarch64-low.c: Add comments for each linux_target_ops
7665 method. Remove comments already covered in target_ops and
7666 linux_target_ops definitions.
7667 (the_low_target): Add comments for each unimplemented method.
7669 2015-07-09 Yao Qi <yao.qi@linaro.org>
7671 * linux-aarch64-low.c (aarch64_regmap): Remove.
7672 (aarch64_usrregs_info): Remove.
7673 (regs_info): Set field usrregs to NULL.
7675 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7677 * linux-low.c: Include "rsp-low.h"
7678 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7679 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7680 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7681 (handle_btrace_enable_pt): New.
7682 (handle_btrace_general_set): Support "pt".
7683 (handle_btrace_conf_general_set): Support "pt:size".
7685 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7687 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7690 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7692 * linux-aarch64-low.c: Remove comment about endianness.
7693 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7694 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7697 2015-06-24 Gary Benson <gbenson@redhat.com>
7699 * linux-i386-ipa.c (stdint.h): Do not include.
7700 * lynx-i386-low.c (stdint.h): Likewise.
7701 * lynx-ppc-low.c (stdint.h): Likewise.
7702 * mem-break.c (stdint.h): Likewise.
7703 * thread-db.c (stdint.h): Likewise.
7704 * tracepoint.c (stdint.h): Likewise.
7705 * win32-low.c (stdint.h): Likewise.
7707 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7709 * server.c (write_qxfer_response): Update call to
7710 remote_escape_output.
7712 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7713 Jan Kratochvil <jan.kratochvil@redhat.com>
7715 Merge multiple hex conversions.
7716 * gdbreplay.c (tohex): Rename to 'fromhex'.
7717 (logchar): Use fromhex.
7719 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7721 * server.c (handle_qxfer_libraries): Set `version' attribute for
7724 2015-06-10 Gary Benson <gbenson@redhat.com>
7726 * target.h (struct target_ops) <multifs_open>: New field.
7727 <multifs_unlink>: Likewise.
7728 <multifs_readlink>: Likewise.
7729 * linux-low.c (nat/linux-namespaces.h): New include.
7730 (linux_target_ops): Initialize the_target->multifs_open,
7731 the_target->multifs_unlink and the_target->multifs_readlink.
7732 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7733 * hostio.c (hostio_fs_pid): New static variable.
7734 (hostio_handle_new_gdb_connection): New function.
7735 (handle_setfs): Likewise.
7736 (handle_open): Use the_target->multifs_open as appropriate.
7737 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7738 (handle_readlink): Use the_target->multifs_readlink as
7740 (handle_vFile): Handle vFile:setfs packets.
7741 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7742 after target_handle_new_gdb_connection.
7744 2015-06-10 Gary Benson <gbenson@redhat.com>
7746 * configure.ac (AC_CHECK_FUNCS): Add setns.
7747 * config.in: Regenerate.
7748 * configure: Likewise.
7749 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7750 (linux-namespaces.o): New rule.
7751 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7753 2015-06-09 Gary Benson <gbenson@redhat.com>
7755 * hostio.c (handle_open): Process mode argument with
7756 fileio_to_host_mode.
7758 2015-06-01 Yao Qi <yao.qi@linaro.org>
7760 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7761 * linux-x86-low.c: Likewise.
7763 2015-05-28 Don Breazeal <donb@codesourcery.com>
7765 * linux-low.c (handle_extended_wait): Initialize
7766 thread_info.last_resume_kind for new fork children.
7768 2015-05-15 Pedro Alves <palves@redhat.com>
7770 * target.h (target_handle_new_gdb_connection): Rewrite using if
7771 wrapped in do/while.
7773 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7775 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7776 * configure, config.in: Regenerate.
7777 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7780 2015-05-12 Don Breazeal <donb@codesourcery.com>
7782 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7783 PTRACE_EVENT_VFORK_DONE.
7784 (linux_low_ptrace_options, extended_event_reported): Add vfork
7786 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7787 and "vforkdone" for RSP 'T' Stop Reply Packet.
7788 * server.h (report_vfork_events): Declare
7791 2015-05-12 Don Breazeal <donb@codesourcery.com>
7793 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7794 (the_low_target) <new_fork>: Initialize new member.
7795 * linux-arm-low.c (arm_new_fork): New function.
7796 (the_low_target) <new_fork>: Initialize new member.
7797 * linux-low.c (handle_extended_wait): Call new target function
7799 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7800 * linux-mips-low.c (mips_add_watchpoint): New function
7801 extracted from mips_insert_point.
7802 (the_low_target) <new_fork>: Initialize new member.
7803 (mips_linux_new_fork): New function.
7804 (mips_insert_point): Call mips_add_watchpoint.
7805 * linux-x86-low.c (x86_linux_new_fork): New function.
7806 (the_low_target) <new_fork>: Initialize new member.
7808 2015-05-12 Don Breazeal <donb@codesourcery.com>
7810 * linux-low.c (handle_extended_wait): Implement return value,
7811 rename argument 'event_child' to 'event_lwp', handle
7812 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7813 (linux_low_ptrace_options): New function.
7814 (linux_low_filter_event): Call linux_low_ptrace_options,
7815 use different argument fo linux_enable_event_reporting,
7816 use return value from handle_extended_wait.
7817 (extended_event_reported): New function.
7818 (linux_wait_1): Call extended_event_reported and set
7819 status to report fork events.
7820 (linux_write_memory): Add pid to debug message.
7821 (reset_lwp_ptrace_options_callback): New function.
7822 (linux_handle_new_gdb_connection): New function.
7823 (linux_target_ops): Initialize new structure member.
7824 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7825 * lynx-low.c: Initialize new structure member.
7826 * remote-utils.c (prepare_resume_reply): Implement stop reason
7827 "fork" for "T" stop message.
7828 * server.c (handle_query): Call handle_new_gdb_connection.
7829 * server.h (report_fork_events): Declare global flag.
7830 * target.h (struct target_ops) <handle_new_gdb_connection>:
7832 (target_handle_new_gdb_connection): New macro.
7833 * win32-low.c: Initialize new structure member.
7835 2015-05-12 Don Breazeal <donb@codesourcery.com>
7837 * mem-break.c (APPEND_TO_LIST): Define macro.
7838 (clone_agent_expr): New function.
7839 (clone_one_breakpoint): New function.
7840 (clone_all_breakpoints): New function.
7841 * mem-break.h: Declare new functions.
7843 2015-05-12 Don Breazeal <donb@codesourcery.com>
7845 * linux-low.c (linux_supports_fork_events): New function.
7846 (linux_supports_vfork_events): New function.
7847 (linux_target_ops): Initialize new structure members.
7848 (initialize_low): Call linux_check_ptrace_features.
7849 * lynx-low.c (lynx_target_ops): Initialize new structure
7851 * server.c (report_fork_events, report_vfork_events):
7853 (handle_query): Add new features to qSupported packet and
7855 (captured_main): Initialize new global variables.
7856 * target.h (struct target_ops) <supports_fork_events>:
7858 <supports_vfork_events>: New member.
7859 (target_supports_fork_events): New macro.
7860 (target_supports_vfork_events): New macro.
7861 * win32-low.c (win32_target_ops): Initialize new structure
7864 2015-05-12 Gary Benson <gbenson@redhat.com>
7866 * server.c (handle_qxfer_exec_file): Use current process
7869 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7871 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7872 Remove HAVE_PTRACE_GETREGS conditionals.
7873 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7874 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7876 2015-05-08 Yao Qi <yao.qi@linaro.org>
7878 * linux-low.c (linux_supports_conditional_breakpoints): New
7880 (linux_target_ops): Install new target method.
7881 * lynx-low.c (lynx_target_ops): Install NULL hook for
7882 supports_conditional_breakpoints.
7883 * nto-low.c (nto_target_ops): Likewise.
7884 * spu-low.c (spu_target_ops): Likewise.
7885 * win32-low.c (win32_target_ops): Likewise.
7886 * server.c (handle_query): Check
7887 target_supports_conditional_breakpoints.
7888 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7890 (target_supports_conditional_breakpoints): New macro.
7892 2015-05-06 Pedro Alves <palves@redhat.com>
7895 * server.c (start_inferior): If the process exits, mourn it.
7897 2015-04-21 Gary Benson <gbenson@redhat.com>
7899 * hostio.c (fileio_open_flags_to_host): Factored out to
7900 fileio_to_host_openflags in common/fileio.c. Single use
7903 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7905 * linux-xtensa-low.c (xtensa_fill_gregset)
7906 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7909 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7911 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7912 (regs_info): Replace usrregs pointer with NULL.
7914 2015-04-17 Gary Benson <gbenson@redhat.com>
7916 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7917 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7918 * server.c (handle_qxfer_exec_file): New function.
7919 (qxfer_packets): Add exec-file entry.
7920 (handle_query): Report qXfer:exec-file:read as supported packet.
7922 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7924 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7926 2015-04-09 Gary Benson <gbenson@redhat.com>
7928 * hostio-errno.c (errno_to_fileio_error): Remove function.
7929 Update caller to use remote_fileio_to_fio_error.
7931 2015-04-09 Yao Qi <yao.qi@linaro.org>
7933 * linux-low.c (linux_insert_point): Call
7934 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7935 (linux_remove_point): Call remove_memory_breakpoint if type is
7937 * linux-x86-low.c (x86_insert_point): Don't call
7938 insert_memory_breakpoint.
7939 (x86_remove_point): Don't call remove_memory_breakpoint.
7941 2015-04-01 Pedro Alves <palves@redhat.com>
7942 Cleber Rosa <crosa@redhat.com>
7944 * server.c (gdbserver_usage): Reorganize and extend the usage
7947 2015-03-24 Pedro Alves <palves@redhat.com>
7949 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7950 output. Also dump TRAP_TRACE.
7951 (linux_low_filter_event): In debug output, distinguish a
7952 resume_stop SIGSTOP from a delayed SIGSTOP.
7954 2015-03-24 Gary Benson <gbenson@redhat.com>
7956 * linux-x86-low.c (x86_linux_new_thread): Moved to
7958 (x86_linux_prepare_to_resume): Likewise.
7960 2015-03-24 Gary Benson <gbenson@redhat.com>
7962 * Makefile.in (x86-linux-dregs.o): New rule.
7963 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7964 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7965 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7966 (x86_linux_dr_get): Likewise.
7967 (x86_linux_dr_set): Likewise.
7968 (update_debug_registers_callback): Likewise.
7969 (x86_linux_dr_set_addr): Likewise.
7970 (x86_linux_dr_get_addr): Likewise.
7971 (x86_linux_dr_set_control): Likewise.
7972 (x86_linux_dr_get_control): Likewise.
7973 (x86_linux_dr_get_status): Likewise.
7974 (x86_linux_update_debug_registers): Likewise.
7976 2015-03-24 Gary Benson <gbenson@redhat.com>
7978 * linux-x86-low.c (x86_linux_update_debug_registers):
7979 New function, factored out from...
7980 (x86_linux_prepare_to_resume): ...this.
7982 2015-03-24 Gary Benson <gbenson@redhat.com>
7984 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7985 (x86_linux_dr_set): Likewise.
7986 (update_debug_registers_callback): Likewise.
7987 (x86_linux_dr_set_addr): Likewise.
7988 (x86_linux_dr_get_addr): Likewise.
7989 (x86_linux_dr_set_control): Likewise.
7990 (x86_linux_dr_get_control): Likewise.
7991 (x86_linux_dr_get_status): Likewise.
7992 (x86_linux_prepare_to_resume): Likewise.
7994 2015-03-24 Gary Benson <gbenson@redhat.com>
7996 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7997 Use perror_with_name. Pass string through gettext.
7998 (x86_linux_dr_set): Likewise.
8000 2015-03-24 Gary Benson <gbenson@redhat.com>
8002 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8003 (x86_linux_dr_set_addr): ...this.
8004 (x86_dr_low_get_addr): Rename to...
8005 (x86_linux_dr_get_addr): ...this.
8006 (x86_dr_low_set_control): Rename to...
8007 (x86_linux_dr_set_control): ...this.
8008 (x86_dr_low_get_control): Rename to...
8009 (x86_linux_dr_get_control): ...this.
8010 (x86_dr_low_get_status): Rename to...
8011 (x86_linux_dr_get_status): ...this.
8012 (x86_dr_low): Update with new function names.
8014 2015-03-24 Gary Benson <gbenson@redhat.com>
8016 * Makefile.in (x86-linux.o): New rule.
8017 * configure.srv: Add x86-linux.o to relevant targets.
8018 * linux-low.c (lwp_set_arch_private_info): New function.
8019 (lwp_arch_private_info): Likewise.
8020 * linux-x86-low.c: Include nat/x86-linux.h.
8021 (arch_lwp_info): Removed structure.
8022 (update_debug_registers_callback):
8023 Use lwp_set_debug_registers_changed.
8024 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8025 and lwp_set_debug_registers_changed.
8026 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8028 2015-03-24 Gary Benson <gbenson@redhat.com>
8030 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8031 * linux-arm-low.c (arm_new_thread): Likewise.
8032 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8033 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8034 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8035 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8037 2015-03-24 Gary Benson <gbenson@redhat.com>
8039 * linux-low.c (ptid_of_lwp): New function.
8040 (lwp_is_stopped): Likewise.
8041 (lwp_stop_reason): Likewise.
8042 * linux-x86-low.c (update_debug_registers_callback):
8044 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8047 2015-03-24 Gary Benson <gbenson@redhat.com>
8049 * linux-low.h (linux_stop_lwp): Remove declaration.
8051 2015-03-24 Gary Benson <gbenson@redhat.com>
8053 * linux-low.h: Include nat/linux-nat.h.
8054 * linux-low.c (iterate_over_lwps_args): New structure.
8055 (iterate_over_lwps_filter): New function.
8056 (iterate_over_lwps): Likewise.
8057 * linux-x86-low.c (update_debug_registers_callback):
8058 Update signature to what iterate_over_lwps expects.
8059 Remove PID check that iterate_over_lwps now performs.
8060 (x86_dr_low_set_addr): Use iterate_over_lwps.
8061 (x86_dr_low_set_control): Likewise.
8063 2015-03-24 Gary Benson <gbenson@redhat.com>
8065 * linux-x86-low.c (x86_debug_reg_state): New function.
8066 (x86_linux_prepare_to_resume): Use the above.
8068 2015-03-24 Gary Benson <gbenson@redhat.com>
8070 * linux-low.c (current_lwp_ptid): New function.
8071 * linux-x86-low.c: Include nat/linux-nat.h.
8072 (x86_dr_low_get_addr): Use current_lwp_ptid.
8073 (x86_dr_low_get_control): Likewise.
8074 (x86_dr_low_get_status): Likewise.
8076 2015-03-20 Pedro Alves <palves@redhat.com>
8078 * tracepoint.c (cmd_qtstatus): Make "str" const.
8080 2015-03-20 Pedro Alves <palves@redhat.com>
8082 * server.c (handle_general_set): Make "req_str" const.
8084 2015-03-19 Pedro Alves <palves@redhat.com>
8086 * linux-low.c (linux_resume_one_lwp): Rename to ...
8087 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8088 instead call perror_with_name.
8089 (check_ptrace_stopped_lwp_gone): New function.
8090 (linux_resume_one_lwp): Reimplement as wrapper around
8091 linux_resume_one_lwp_throw that swallows errors if the LWP is
8094 2015-03-19 Pedro Alves <palves@redhat.com>
8096 * linux-low.c (count_events_callback, select_event_lwp_callback):
8097 No longer check whether the thread has resume_stop as last resume
8100 2015-03-19 Pedro Alves <palves@redhat.com>
8102 * linux-low.c (count_events_callback, select_event_lwp_callback):
8103 Use the lwp's status_pending_p field, not the thread's.
8105 2015-03-19 Pedro Alves <palves@redhat.com>
8107 * linux-low.c (select_event_lwp_callback): Update comments to
8108 no longer mention SIGTRAP.
8110 2015-03-18 Gary Benson <gbenson@redhat.com>
8112 * server.c (handle_query): Do not report vFile:fstat as supported.
8114 2015-03-11 Gary Benson <gbenson@redhat.com>
8116 * hostio.c (sys/types.h): New include.
8117 (sys/stat.h): Likewise.
8118 (common-remote-fileio.h): Likewise.
8119 (handle_fstat): New function.
8120 (handle_vFile): Handle vFile:fstat packets.
8122 2015-03-11 Gary Benson <gbenson@redhat.com>
8124 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8125 struct stat.st_blocks and struct stat.st_blksize.
8126 * configure: Regenerate.
8127 * config.in: Likewise.
8128 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8129 (OBS): Add common-remote-fileio.o.
8130 (common-remote-fileio.o): New rule.
8132 2015-03-09 Pedro Alves <palves@redhat.com>
8134 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8135 'struct sockaddr' pointer in 'accept' call.
8137 2015-03-09 Pedro Alves <palves@redhat.com>
8140 2015-03-07 Pedro Alves <palves@redhat.com>
8141 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8142 or <winsock2.h> here. Instead include "gdb_socket.h".
8143 (remote_open): Use union gdb_sockaddr_u.
8144 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8145 or <winsock2.h> here. Instead include "gdb_socket.h".
8146 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8147 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8149 (init_named_socket, gdb_agent_helper_thread): Use union
8152 2015-03-07 Pedro Alves <palves@redhat.com>
8154 * configure.ac (build_warnings): Move
8155 -Wdeclaration-after-statement to the C-specific set.
8156 * configure: Regenerate.
8158 2015-03-07 Pedro Alves <palves@redhat.com>
8160 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8161 or <winsock2.h> here. Instead include "gdb_socket.h".
8162 (remote_open): Use union gdb_sockaddr_u.
8163 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8164 or <winsock2.h> here. Instead include "gdb_socket.h".
8165 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8166 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8168 (init_named_socket, gdb_agent_helper_thread): Use union
8171 2015-03-07 Pedro Alves <palves@redhat.com>
8173 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8176 2015-03-06 Yao Qi <yao.qi@linaro.org>
8178 * linux-aarch64-low.c (aarch64_insert_point): Use
8179 show_debug_regs as a boolean.
8180 (aarch64_remove_point): Likewise.
8182 2015-03-05 Pedro Alves <palves@redhat.com>
8184 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8185 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8186 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8187 * nto-low.c (nto_target_ops): Likewise.
8188 * spu-low.c (spu_target_ops): Likewise.
8189 * win32-low.c (win32_target_ops): Likewise.
8191 2015-03-04 Pedro Alves <palves@redhat.com>
8193 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8194 Decide whether a breakpoint triggered based on the SIGTRAP's
8196 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8197 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8198 (linux_low_filter_event): Check for breakpoints before checking
8200 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8202 (linux_stopped_by_sw_breakpoint)
8203 (linux_supports_stopped_by_sw_breakpoint)
8204 (linux_stopped_by_hw_breakpoint)
8205 (linux_supports_stopped_by_hw_breakpoint): New functions.
8206 (linux_target_ops): Install new target methods.
8208 2015-03-04 Pedro Alves <palves@redhat.com>
8210 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8211 * server.c (swbreak_feature, hwbreak_feature): New globals.
8212 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8213 (captured_main): Clear swbreak_feature and hwbreak_feature.
8214 * server.h (swbreak_feature, hwbreak_feature): Declare.
8215 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8216 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8217 supports_stopped_by_hw_breakpoint>: New fields.
8218 (target_supports_stopped_by_sw_breakpoint)
8219 (target_stopped_by_sw_breakpoint)
8220 (target_supports_stopped_by_hw_breakpoint)
8221 (target_stopped_by_hw_breakpoint): Declare.
8223 2015-03-04 Pedro Alves <palves@redhat.com>
8225 enum lwp_stop_reason -> enum target_stop_reason
8226 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8227 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8228 (linux_wait_1, stuck_in_jump_pad_callback)
8229 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8230 (linux_stopped_by_watchpoint):
8231 * linux-low.h (enum lwp_stop_reason): Delete.
8232 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8233 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8235 2015-03-04 Yao Qi <yao.qi@linaro.org>
8237 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8239 2015-03-03 Gary Benson <gbenson@redhat.com>
8241 * hostio.c (handle_vFile): Fix prefix lengths.
8243 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8245 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8248 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8250 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8251 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8252 (clean): Add "rm -f" for above C files.
8253 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8254 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8255 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8256 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8257 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8258 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8259 (init_registers_s390x_vx_linux64)
8260 (init_registers_s390x_tevx_linux64)
8261 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8262 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8264 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8265 (s390_store_vxrs_high): New functions.
8266 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8268 (s390_arch_setup): Add logic for selecting one of the new target
8269 descriptions. Activate the new vector regsets if applicable.
8270 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8271 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8272 and init_registers_s390x_tevx_linux64.
8274 2015-03-01 Pedro Alves <palves@redhat.com>
8276 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8279 2015-02-27 Pedro Alves <palves@redhat.com>
8281 * linux-x86-low.c (u_debugreg_offset): New function.
8282 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8284 2015-02-27 Pedro Alves <palves@redhat.com>
8286 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8287 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8288 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8289 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8290 (ps_lsetfpregs, ps_getpid)
8291 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8292 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8293 (ps_lsetxregs, ps_plog): Declare.
8295 2015-02-27 Pedro Alves <palves@redhat.com>
8297 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8298 IP_AGENT_EXPORT_FUNC.
8299 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8300 IP_AGENT_EXPORT_FUNC.
8301 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8302 (IP_AGENT_EXPORT): Delete.
8303 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8304 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8305 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8306 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8307 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8308 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8309 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8310 (traceframe_read_count, traceframe_write_count)
8311 (traceframes_created, trace_state_variables, get_raw_reg)
8312 (get_trace_state_variable_value, set_trace_state_variable_value)
8313 (ust_loaded, helper_thread_id, cmd_buf): Use
8314 IPA_SYM_EXPORTED_NAME.
8315 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8316 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8317 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8318 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8319 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8320 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8321 EXTERN_C_PUSH/EXTERN_C_POP.
8322 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8323 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8324 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8325 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8326 (traceframe_write_count, traceframe_read_count)
8327 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8328 (about_to_request_buffer_space, get_trace_state_variable_value)
8329 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8330 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8331 EXTERN_C_PUSH/EXTERN_C_POP.
8332 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8333 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8334 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8335 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8336 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8337 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8338 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8339 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8341 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8342 (IP_AGENT_EXPORT_VAR_DECL): Define.
8344 (gdb_agent_get_raw_reg): Declare.
8346 2015-02-27 Tom Tromey <tromey@redhat.com>
8347 Pedro Alves <palves@redhat.com>
8349 Rename symbols whose names are reserved C++ keywords throughout.
8351 2015-02-27 Pedro Alves <palves@redhat.com>
8353 * Makefile.in (COMPILER): New, get it from autoconf.
8354 (CXX): Get from autoconf instead.
8355 (COMPILE.pre): Use COMPILER.
8356 (CC-LD): Rename to ...
8357 (CC_LD): ... this. Use COMPILER.
8358 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8359 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8360 * acinclude.m4: Include build-with-cxx.m4.
8361 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8362 Disable -Werror by default if building in C++ mode.
8363 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8364 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8365 the C++ compiler. Save/restore CXXFLAGS too.
8366 * configure: Regenerate.
8368 2015-02-27 Pedro Alves <palves@redhat.com>
8370 * acinclude.m4: Include libiberty.m4.
8371 * configure.ac: Call libiberty_INIT.
8372 * config.in, configure: Regenerate.
8374 2015-02-26 Pedro Alves <palves@redhat.com>
8376 * linux-low.c (linux_wait_1): When incrementing the PC past a
8377 program breakpoint always use the_low_target.breakpoint_len as
8378 increment, rather than the maximum between that and
8379 the_low_target.decr_pc_after_break.
8381 2015-02-23 Pedro Alves <palves@redhat.com>
8383 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8384 thread was doing a step-over; always adjust the PC if
8385 we stepped over a permanent breakpoint.
8386 (linux_wait_1): If we stepped over breakpoint that was on top of a
8387 permanent breakpoint, manually advance the PC past it.
8389 2015-02-23 Pedro Alves <palves@redhat.com>
8391 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8393 (x86_fill_gregset, x86_store_gregset): Use it when handling
8396 2015-02-20 Pedro Alves <palves@redhat.com>
8398 * thread-db.c: Include "nat/linux-procfs.h".
8399 (thread_db_init): Skip listing new threads if the kernel supports
8400 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8402 2015-02-20 Pedro Alves <palves@redhat.com>
8404 * linux-low.c (status_pending_p_callback): Use ptid_match.
8406 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8408 PR breakpoints/16812
8409 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8410 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8411 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8413 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8415 PR breakpoints/15956
8416 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8418 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8420 * linux-low.c (linux_low_btrace_conf): Print size.
8421 * server.c (handle_btrace_conf_general_set): New.
8422 (hanle_general_set): Call handle_btrace_conf_general_set.
8423 (handle_query): Report Qbtrace-conf:bts:size as supported.
8425 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8427 * linux-low.c (linux_low_enable_btrace): Update parameters.
8428 (linux_low_btrace_conf): New.
8429 (linux_target_ops)<to_btrace_conf>: Initialize.
8430 * server.c (current_btrace_conf): New.
8431 (handle_btrace_enable): Rename to ...
8432 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8433 to target_enable_btrace. Update comment. Update users.
8434 (handle_qxfer_btrace_conf): New.
8435 (qxfer_packets): Add btrace-conf entry.
8436 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8437 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8438 (target_ops)<read_btrace_conf>: New.
8439 (target_enable_btrace): Update parameters.
8440 (target_read_btrace_conf): New.
8442 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8444 * server.c (handle_btrace_general_set): Remove call to
8445 target_supports_btrace.
8446 (supported_btrace_packets): New.
8447 (handle_query): Call supported_btrace_packets.
8448 * target.h: include btrace-common.h.
8449 (btrace_target_info): Removed.
8450 (supports_btrace, target_supports_btrace): Update parameters.
8452 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8454 * Makefile.in (SFILES): Add common/btrace-common.c.
8455 (OBS): Add common/btrace-common.o.
8456 (btrace-common.o): Add build rules.
8457 * linux-low: Include btrace-common.h.
8458 (linux_low_read_btrace): Use struct btrace_data. Call
8459 btrace_data_init and btrace_data_fini.
8461 2015-02-06 Pedro Alves <palves@redhat.com>
8463 * thread-db.c (find_new_threads_callback): Add debug output.
8465 2015-02-04 Pedro Alves <palves@redhat.com>
8467 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8468 (resume_stopped_resumed_lwps): New function.
8469 (linux_wait_for_event_filtered): Use it.
8471 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8473 * Makefile.in (SFILES): Add linux-personality.c.
8474 (linux-personality.o): New rule.
8475 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8476 list of objects to be built.
8477 * linux-low.c: Include nat/linux-personality.h.
8478 (linux_create_inferior): Remove code to disable address space
8479 randomization (moved to ../nat/linux-personality.c). Create
8480 cleanup to disable address space randomization.
8482 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8484 * Makefile.in (posix-strerror.o): New rule.
8485 (mingw-strerror.o): Likewise.
8486 * configure: Regenerated.
8487 * configure.ac: Source file ../common/common.host. Initialize new
8488 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8490 2015-01-14 Yao Qi <yao@codesourcery.com>
8492 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8493 (ppc-linux.o): New rule.
8494 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8495 * configure.ac: AC_CHECK_FUNCS(getauxval).
8496 * config.in: Re-generated.
8497 * configure: Re-generated.
8498 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8499 ppc64_64bit_inferior_p
8501 2015-01-14 Yao Qi <yao@codesourcery.com>
8503 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8504 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8505 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8506 (PT_ORIG_R3, PT_TRAP): Likewise.
8507 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8508 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8509 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8511 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8513 * i387-fp.c (i387_cache_to_xsave): In look over
8514 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8515 zmmh_low_space field by use of zmmh_high_space.
8517 2015-01-09 Pedro Alves <palves@redhat.com>
8519 * linux-low.c (step_over_bkpt): Move higher up in the file.
8520 (handle_extended_wait): Don't store the stop_pc here.
8521 (get_stop_pc): Adjust comments and rename to ...
8522 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8523 stopped for a software breakpoint or hardware breakpoint.
8524 (thread_still_has_status_pending_p): New function.
8525 (status_pending_p_callback): Use
8526 thread_still_has_status_pending_p. If the event is no longer
8527 interesting, resume the LWP.
8528 (handle_tracepoints): Add assert.
8529 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8530 (wstatus_maybe_breakpoint): New function.
8531 (cancel_breakpoint): Delete function.
8532 (check_stopped_by_watchpoint): New function, factored out from
8533 linux_low_filter_event.
8534 (lp_status_maybe_breakpoint): Delete function.
8535 (linux_low_filter_event): Remove filter_ptid argument.
8536 Leave thread group exits pending here. Store the LWP's stop PC.
8537 Always leave events pending.
8538 (linux_wait_for_event_filtered): Pull all events out of the
8539 kernel, and leave them all pending.
8540 (count_events_callback, select_event_lwp_callback): Consider all
8542 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8543 (select_event_lwp): Only give preference to the stepping LWP in
8544 all-stop mode. Adjust comments.
8545 (ignore_event): New function.
8546 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8547 references to cancel_breakpoints. Adjust to renames. Also give
8548 equal priority to all LWPs that have had events in non-stop mode.
8549 If reporting a software breakpoint event, unadjust the LWP's PC.
8550 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8551 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8553 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8554 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8555 (linux_stopped_by_watchpoint): Adjust.
8556 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8557 * linux-low.h (enum lwp_stop_reason): New.
8558 (struct lwp_info) <stop_pc>: Adjust comment.
8559 <stopped_by_watchpoint>: Delete field.
8560 <stop_reason>: New field.
8561 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8562 * mem-break.c (software_breakpoint_inserted_here)
8563 (hardware_breakpoint_inserted_here): New function.
8564 * mem-break.h (software_breakpoint_inserted_here)
8565 (hardware_breakpoint_inserted_here): Declare.
8566 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8567 (cancel_breakpoints): Delete.
8568 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8569 (upload_fast_traceframes): Remove references to
8572 2015-01-09 Pedro Alves <palves@redhat.com>
8574 * thread-db.c (find_new_threads_callback): Ignore thread if the
8575 kernel thread ID is -1.
8577 2015-01-09 Pedro Alves <palves@redhat.com>
8579 * linux-low.c (linux_attach_fail_reason_string): Move to
8580 nat/linux-ptrace.c, and rename.
8581 (linux_attach_lwp): Update comment.
8582 (attach_proc_task_lwp_callback): New function.
8583 (linux_attach): Adjust to rename and use
8584 linux_proc_attach_tgid_threads.
8585 (linux_attach_fail_reason_string): Delete declaration.
8587 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8589 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8590 * server.c (gdbserver_version): Likewise.
8592 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8594 * remote-utils.c: Include ctype.h.
8595 (input_interrupt): Explicitly handle the case when the char
8596 received is the NUL byte. Improve the printing of non-ASCII
8599 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8601 * linux-low.c (linux_low_filter_event): Update call to
8602 linux_enable_event_reporting following the addition of
8603 a new parameter to that function.
8605 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8608 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8609 (AARCH64_FPCR_REGNO): Likewise.
8610 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8611 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8612 (aarch64_store_fpregset): Likewise.
8614 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8616 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8617 Remove FIXME comment about assumption about N.
8619 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8621 * configure.ac: If large-file support is disabled in GDBserver,
8622 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8623 * configure: Regenerate.
8625 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8627 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8628 warning upon ENODATA from ptrace.
8629 * linux-s390-low.c (s390_store_tdb): New.
8630 (s390_regsets): Add regset for NT_S390_TDB.
8632 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8634 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8635 without a fill_function.
8636 * linux-s390-low.c (s390_fill_last_break): Remove.
8637 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8638 (s390_arch_setup): Use regset's size instead of fill_function for
8641 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8643 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8644 the regset's store function when ptrace returned an error.
8645 * regcache.c (get_thread_regcache): Invalidate register cache
8646 before fetching inferior's registers.
8648 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8650 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8651 while-loop as for-loop.
8652 (regsets_store_inferior_registers): Likewise.
8654 2014-11-28 Yao Qi <yao@codesourcery.com>
8656 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8657 * config.in, configure: Re-generate.
8658 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8661 2014-11-21 Yao Qi <yao@codesourcery.com>
8663 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8664 (AC_CHECK_HEADERS): Remove malloc.h.
8665 * configure: Re-generated.
8666 * config.in: Re-generated.
8667 * server.h: Don't include alloca.h and malloc.h.
8668 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8669 Don't include malloc.h.
8671 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8673 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8674 corresponding ERRNO check in same block.
8676 2014-11-12 Pedro Alves <palves@redhat.com>
8678 * server.c (cont_thread): Update comment.
8679 (start_inferior, attach_inferior): No longer clear cont_thread.
8680 (handle_v_cont): No longer set cont_thread.
8681 (captured_main): Clear cont_thread each time a GDB connects.
8683 2014-11-12 Pedro Alves <palves@redhat.com>
8685 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8686 thread, and don't resume all threads if the Hc thread has exited.
8688 2014-11-12 Pedro Alves <palves@redhat.com>
8690 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8691 the process group instead of to a specific LWP.
8693 2014-10-15 Pedro Alves <palves@redhat.com>
8696 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8698 (arm_set_thread_context): Delete.
8699 (the_low_target): Adjust.
8700 * win32-i386-low.c (debug_registers_changed)
8701 (debug_registers_used): Delete.
8702 (update_debug_registers_callback): New function.
8703 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8704 needing to update their debug registers.
8705 (win32_get_current_dr): New function.
8706 (x86_dr_low_get_addr, x86_dr_low_get_control)
8707 (x86_dr_low_get_status): Fetch the debug register from the thread
8709 (i386_initial_stuff): Adjust.
8710 (i386_get_thread_context): Remove current_event parameter. Don't
8711 clear debug_registers_changed nor copy DR values to
8713 (i386_set_thread_context): Delete.
8714 (i386_prepare_to_resume): New function.
8715 (i386_thread_added): Mark the thread as needing to update irs
8717 (the_low_target): Remove i386_set_thread_context and install
8718 i386_prepare_to_resume.
8719 * win32-low.c (win32_get_thread_context): Adjust.
8720 (win32_set_thread_context): Use SetThreadContext
8722 (win32_prepare_to_resume): New function.
8723 (win32_require_context): New function, factored out from ...
8724 (thread_rec): ... this.
8725 (continue_one_thread): Call win32_prepare_to_resume on each thread
8726 we're about to continue.
8727 (win32_resume): Call win32_prepare_to_resume on the event thread.
8728 * win32-low.h (struct win32_thread_info)
8729 <debug_registers_changed>: New field.
8730 (struct win32_target_ops): Change prototype of set_thread_context,
8731 delete set_thread_context and add prepare_to_resume.
8732 (win32_require_context): New declaration.
8734 2014-10-08 Gary Benson <gbenson@redhat.com>
8736 * server.h: Do not include common-exceptions.h.
8738 2014-10-08 Gary Benson <gbenson@redhat.com>
8740 * server.h: Do not include cleanups.h.
8742 2014-09-30 James Hogan <james.hogan@imgtec.com>
8744 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8747 2014-09-23 Yao Qi <yao@codesourcery.com>
8749 * linux-low.c (lp_status_maybe_breakpoint): New function.
8750 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8751 (count_events_callback): Likewise.
8752 (select_event_lwp_callback): Likewise.
8753 (cancel_breakpoints_callback): Likewise.
8755 2014-09-19 Don Breazeal <donb@codesourcery.com>
8757 * linux-low.c (handle_extended_wait): Call
8758 linux_ptrace_get_extended_event.
8759 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8760 linux_is_extended_waitstatus.
8762 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8764 * Makefile.in (CPPFLAGS): Define.
8765 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8766 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8768 2014-09-16 Gary Benson <gbenson@redhat.com>
8770 * inferiors.h (current_inferior): Renamed as...
8771 (current_thread): New variable. All uses updated.
8772 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8773 (maybe_move_out_of_jump_pad): Likewise.
8774 (cancel_breakpoint): Likewise.
8775 (linux_low_filter_event): Likewise.
8776 (wait_for_sigstop): Likewise.
8777 (linux_resume_one_lwp): Likewise.
8778 (need_step_over_p): Likewise.
8779 (start_step_over): Likewise.
8780 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8781 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8782 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8783 and save_inferior as saved_thread.
8784 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8786 (regcache_invalidate_thread): Likewise.
8787 * remote-utils.c (prepare_resume_reply): Likewise.
8788 * thread-db.c (thread_db_get_tls_address): Likewise.
8789 (disable_thread_event_reporting): Likewise.
8790 (remove_thread_event_breakpoints): Likewise.
8791 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8793 * target.h (set_desired_inferior): Renamed as...
8794 (set_desired_thread): New declaration. All uses updated.
8795 * server.c (myresume): Updated comment to reference thread instead
8797 (handle_serial_event): Likewise.
8798 (handle_target_event): Likewise.
8800 2014-09-12 Tom Tromey <tromey@redhat.com>
8801 Gary Benson <gbenson@redhat.com>
8803 * regcache.h: Include common-regcache.h.
8804 (regcache_read_pc): Don't declare.
8805 * regcache.c (get_thread_regcache_for_ptid): New function.
8807 2014-09-11 Tom Tromey <tromey@redhat.com>
8808 Gary Benson <gbenson@redhat.com>
8810 * symbol.c: New file.
8811 * Makefile.in (SFILES): Add symbol.c.
8812 (OBS): Add symbol.o.
8814 2014-09-11 Gary Benson <gbenson@redhat.com>
8816 * target.c (target_stop_ptid, target_continue_ptid): New
8819 2014-09-11 Tom Tromey <tromey@redhat.com>
8820 Gary Benson <gbenson@redhat.com>
8822 * target.h: Include target/target.h.
8823 * target.c (target_read_memory, target_read_uint32)
8824 (target_write_memory): New functions.
8826 2014-09-11 Gary Benson <gbenson@redhat.com>
8828 * server.h (debug_hw_points): Don't declare.
8829 * server.c (debug_hw_points): Don't define. Replace all uses
8830 with show_debug_regs.
8831 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8832 all uses with show_debug_regs.
8834 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8836 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8837 endianness into account.
8838 (ppc_supply_ptrace_register): Likewise.
8840 2014-09-03 James Hogan <james.hogan@imgtec.com>
8842 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8843 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8845 2014-09-03 Gary Benson <gbenson@redhat.com>
8847 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8848 ALL_DEBUG_ADDRESS_REGISTERS.
8850 2014-09-02 Gary Benson <gbenson@redhat.com>
8852 * i386-low.h: Renamed as...
8853 * x86-low.h: New file. All type, function and variable name
8854 prefixes changed from "i386_" to "x86_". All references updated.
8855 * i386-low.c: Renamed as...
8856 * x86-low.c: New file. All type, function and variable name
8857 prefixes changed from "i386_" to "x86_". All references updated.
8859 2014-09-02 Gary Benson <gbenson@redhat.com>
8861 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8862 (x86_linux_new_thread): Likewise.
8864 2014-08-29 Gary Benson <gbenson@redhat.com>
8866 * server.h (setjmp.h): Do not include.
8867 (toplevel): Do not declare.
8868 (common-exceptions.h): Include.
8869 (cleanups.h): Likewise.
8870 * server.c (toplevel): Do not define.
8871 (exit_code): New static global.
8872 (detach_or_kill_for_exit_cleanup): New function.
8873 (main): New function. Original main renamed to...
8874 (captured_main): New function.
8875 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8877 2014-08-29 Gary Benson <gbenson@redhat.com>
8879 * Makefile.in (SFILES): Add common/common-exceptions.c.
8880 (OBS): Add common-exceptions.o.
8881 (common-exceptions.o): New rule.
8882 * utils.c (prepare_to_throw_exception): New function.
8884 2014-08-29 Gary Benson <gbenson@redhat.com>
8886 * config.in: Regenerate.
8887 * configure: Likewise.
8889 2014-08-29 Gary Benson <gbenson@redhat.com>
8891 * Makefile.in (SFILES): Add common/cleanups.c.
8893 (cleanups.o): New rule.
8895 2014-08-29 Gary Benson <gbenson@redhat.com>
8897 * utils.c (internal_vwarning): New function.
8899 2014-08-28 Gary Benson <gbenson@redhat.com>
8901 * utils.h (fatal): Remove declaration.
8902 * utils.c (fatal): Remove function.
8904 2014-08-28 Gary Benson <gbenson@redhat.com>
8906 * tracepoint.c (gdb_agent_init): Replace fatal with
8908 (initialize_tracepoint): Likewise.
8910 2014-08-28 Gary Benson <gbenson@redhat.com>
8912 * remote-utils.c (remote_prepare): Replace fatal with error.
8914 2014-08-28 Gary Benson <gbenson@redhat.com>
8916 * linux-low.c (linux_async): Replace fatal with warning.
8918 (linux_start_non_stop): Return -1 if linux_async failed.
8920 2014-08-28 Gary Benson <gbenson@redhat.com>
8922 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8924 (i386_dr_low_get_addr): Remove vague comment.
8925 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8928 2014-08-28 Gary Benson <gbenson@redhat.com>
8930 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8931 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8933 (linux_resume_one_lwp): Likewise.
8934 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8936 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8937 with internal_error.
8938 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8939 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8940 (find_register_by_name): Replace fatal with internal_error.
8941 (find_regno): Likewise.
8942 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8943 * thread-db.c (thread_db_create_event): Likewise.
8944 (thread_db_load_search): Likewise.
8945 (try_thread_db_load_1): Likewise.
8946 * tracepoint.c (get_jump_space_head): Replace fatal with
8948 (claim_trampoline_space): Likewise.
8949 (have_fast_tracepoint_trampoline_buffer): Likewise.
8950 (cmd_qtstart): Likewise.
8951 (stop_tracing): Likewise.
8952 (fast_tracepoint_collecting): Likewise.
8953 (target_malloc): Likewise.
8954 (download_tracepoint): Likewise.
8955 (download_trace_state_variables): Replace check with gdb_assert.
8956 (upload_fast_traceframes): Replace fatal with internal_error.
8958 2014-08-19 Tom Tromey <tromey@redhat.com>
8959 Gary Benson <gbenson@redhat.com>
8961 * Makefile.in (SFILES): Add common/common-debug.c.
8962 (OBS): Add common-debug.o.
8963 (common-debug.o): New rule.
8964 * debug.h (debug_printf): Don't declare.
8965 * debug.c (debug_printf): Renamed and rewritten as...
8966 (debug_vprintf): New function.
8968 2014-08-19 Gary Benson <gbenson@redhat.com>
8970 * utils.h: Do not include print-utils.h.
8972 2014-08-19 Tom Tromey <tromey@redhat.com>
8973 Gary Benson <gbenson@redhat.com>
8975 * server.h: Add static assertion.
8976 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8978 2014-08-19 Tom Tromey <tromey@redhat.com>
8979 Gary Benson <gbenson@redhat.com>
8981 * Makefile.in (SFILES): Add common/errors.c.
8982 (OBS): Add errors.o.
8983 (IPA_OBS): Add errors-ipa.o.
8984 (errors.o): New rule.
8985 (errors-ipa.o): Likewise.
8986 * utils.h (perror_with_name, error, warning): Don't declare.
8987 * utils.c (warning): Renamed and rewritten as...
8988 (vwarning): New function.
8989 (error): Renamed and rewritten as...
8990 (verror): New function.
8991 (internal_error): Renamed and rewritten as...
8992 (internal_verror): New function.
8994 2014-08-07 Gary Benson <gbenson@redhat.com>
8996 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8997 * configure: Regenerate.
8998 * config.in: Likewise.
8999 * server.h: Do not include errno.h.
9000 * event-loop.c: Likewise.
9001 * hostio-errno.c: Likewise.
9002 * linux-low.c: Likewise.
9003 * remote-utils.c: Likewise.
9004 * spu-low.c: Likewise.
9005 * utils.c: Likewise.
9006 * gdbreplay.c: Unconditionally include errno.h.
9008 2014-08-07 Gary Benson <gbenson@redhat.com>
9010 * server.h: Do not include string.h.
9011 * event-loop.c: Likewise.
9012 * linux-low.c: Likewise.
9013 * regcache.c: Likewise.
9014 * remote-utils.c: Likewise.
9015 * spu-low.c: Likewise.
9016 * utils.c: Likewise.
9018 2014-08-07 Gary Benson <gbenson@redhat.com>
9020 * server.h: Do not include gdb_assert.h.
9022 2014-08-07 Gary Benson <gbenson@redhat.com>
9024 * server.h: Do not include common-utils.h.
9026 2014-08-07 Gary Benson <gbenson@redhat.com>
9028 * server.h: Do not include ptid.h.
9029 * notif.h: Likewise.
9031 2014-08-07 Gary Benson <gbenson@redhat.com>
9033 * server.h: Do not include gdb_locale.h.
9035 2014-08-07 Gary Benson <gbenson@redhat.com>
9037 * server.h: Do not include gdb/signals.h.
9038 * win32-low.c: Likewise.
9040 2014-08-07 Gary Benson <gbenson@redhat.com>
9042 * server.h: Do not include pathmax.h.
9044 2014-08-07 Gary Benson <gbenson@redhat.com>
9046 * server.h: Do not include libiberty.h.
9047 * linux-bfin-low.c: Likewise.
9049 2014-08-07 Gary Benson <gbenson@redhat.com>
9051 * server.h: Do not include ansidecl.h.
9053 2014-08-07 Gary Benson <gbenson@redhat.com>
9055 * linux-x86-low.c: Do not include stddef.h.
9056 * lynx-ppc-low.c: Likewise.
9057 * tracepoint.c: Likewise.
9059 2014-08-07 Gary Benson <gbenson@redhat.com>
9061 * server.h: Do not include stdarg.h.
9062 * nto-low.c: Likewise.
9064 2014-08-07 Gary Benson <gbenson@redhat.com>
9066 * server.h: Do not include stdlib.h.
9067 * inferiors.c: Likewise.
9068 * linux-low.c: Likewise.
9069 * regcache.c: Likewise.
9070 * spu-low.c: Likewise.
9071 * tracepoint.c: Likewise.
9072 * utils.c: Likewise.
9074 2014-08-07 Gary Benson <gbenson@redhat.com>
9076 * server.h: Do not include stdio.h.
9077 * linux-low.c: Likewise.
9078 * remote-utils.c: Likewise.
9079 * spu-low.c: Likewise.
9080 * utils.c: Likewise.
9081 * wincecompat.c: Likewise.
9083 2014-08-06 Gary Benson <gbenson@redhat.com>
9085 * regcache.c (init_register_cache): Move conditionals inside if.
9087 2014-08-06 Gary Benson <gbenson@redhat.com>
9089 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9091 2014-07-31 Gary Benson <gbenson@redhat.com>
9093 * ax.h: Do not include server.h.
9094 * gdbthread.h: Likewise.
9095 * lynx-low.h: Likewise.
9096 * notif.h: Likewise.
9098 2014-07-30 Gary Benson <gbenson@redhat.com>
9100 * server.h: Include common-defs.h.
9101 Do not include config.h or build-gnulib-gdbserver/config.h.
9103 2014-07-30 Gary Benson <gbenson@redhat.com>
9105 * hostio-errno.c: Move server.h to top of includes list.
9106 * inferiors.c: Likewise.
9107 * linux-x86-low.c: Likewise.
9108 * notif.c: Include server.h.
9110 2014-07-24 Tom Tromey <tromey@redhat.com>
9111 Gary Benson <gbenson@redhat.com>
9113 * server.h (CORE_ADDR): Now unsigned.
9115 2014-07-16 Pedro Alves <palves@redhat.com>
9117 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9119 2014-07-15 Pedro Alves <palves@redhat.com>
9121 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9124 2014-07-11 Pedro Alves <palves@redhat.com>
9126 * linux-low.c (kill_wait_lwp): New function, based on
9127 kill_one_lwp_callback, but use my_waitpid directly.
9128 (kill_one_lwp_callback, linux_kill): Use it.
9130 2014-06-23 Pedro Alves <palves@redhat.com>
9132 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9133 before setting DR0..DR3.
9135 2014-06-20 Gary Benson <gbenson@redhat.com>
9137 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9138 * configure: Regenerated.
9139 * config.in: Likewise.
9141 2014-06-20 Gary Benson <gbenson@redhat.com>
9143 * Makefile.in (SFILES): Update locations for files moved
9145 (object file files): Reordered.
9147 2014-06-20 Gary Benson <gbenson@redhat.com>
9149 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9150 (i386_dr_low_set_addr): Likewise.
9151 (i386_dr_low_get_addr): Likewise.
9152 (i386_dr_low_can_set_control): Likewise.
9153 (i386_dr_low_set_control): Likewise.
9154 (i386_dr_low_get_control): Likewise.
9155 (i386_dr_low_get_status): Likewise.
9156 (i386_get_debug_register_length): Likewise.
9157 * linux-x86-low.c (i386_dr_low_set_addr):
9158 Changed signature. Made static.
9159 (i386_dr_low_get_addr): Likewise.
9160 (i386_dr_low_set_control): Likewise.
9161 (i386_dr_low_get_control): Likewise.
9162 (i386_dr_low_get_status): Likewise.
9163 (i386_dr_low): New global variable.
9164 * win32-i386-low.c (i386_dr_low_set_addr):
9165 Changed signature. Made static.
9166 (i386_dr_low_get_addr): Likewise.
9167 (i386_dr_low_set_control): Likewise.
9168 (i386_dr_low_get_control): Likewise.
9169 (i386_dr_low_get_status): Likewise.
9170 (i386_dr_low): New global variable.
9172 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9174 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9175 * Makefile.in (AR, AR_FLAGS): Define.
9176 * configure: Regenerate.
9178 2014-06-19 Gary Benson <gbenson@redhat.com>
9180 * Makefile.in (i386-dregs.o): New rule.
9181 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9182 * i386-low.c (target.h): Remove include.
9183 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9184 (DR_CONTROL_SHIFT): Likewise.
9185 (DR_CONTROL_SIZE): Likewise.
9186 (DR_RW_EXECUTE): Likewise.
9187 (DR_RW_WRITE): Likewise.
9188 (DR_RW_READ): Likewise.
9189 (DR_RW_IORW): Likewise.
9190 (DR_LEN_1): Likewise.
9191 (DR_LEN_2): Likewise.
9192 (DR_LEN_4): Likewise.
9193 (DR_LEN_8): Likewise.
9194 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9195 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9196 (DR_ENABLE_SIZE): Likewise.
9197 (DR_LOCAL_SLOWDOWN): Likewise.
9198 (DR_GLOBAL_SLOWDOWN): Likewise.
9199 (DR_CONTROL_RESERVED): Likewise.
9200 (I386_DR_CONTROL_MASK): Likewise.
9201 (I386_DR_VACANT): Likewise.
9202 (I386_DR_LOCAL_ENABLE): Likewise.
9203 (I386_DR_GLOBAL_ENABLE): Likewise.
9204 (I386_DR_DISABLE): Likewise.
9205 (I386_DR_SET_RW_LEN): Likewise.
9206 (I386_DR_GET_RW_LEN): Likewise.
9207 (I386_DR_WATCH_HIT): Likewise.
9208 (i386_wp_op_t): Likewise.
9209 (i386_show_dr): Likewise.
9210 (i386_length_and_rw_bits): Likewise.
9211 (i386_insert_aligned_watchpoint): Likewise.
9212 (i386_remove_aligned_watchpoint): Likewise.
9213 (i386_handle_nonaligned_watchpoint): Likewise.
9214 i386_update_inferior_debug_regs(): Likewise.
9215 (i386_dr_insert_watchpoint): Likewise.
9216 (i386_dr_remove_watchpoint): Likewise.
9217 (i386_dr_region_ok_for_watchpoint): Likewise.
9218 (i386_dr_stopped_data_address): Likewise.
9219 (i386_dr_stopped_by_watchpoint): Likewise.
9221 2014-06-19 Gary Benson <gbenson@redhat.com>
9223 * i386-low.c (i386_dr_show): Renamed to
9224 i386_show_dr and made static. All uses updated.
9225 (i386_dr_length_and_rw_bits): Renamed to
9226 i386_length_and_rw_bits and made static.
9228 (i386_dr_insert_aligned_watchpoint): Renamed to
9229 i386_insert_aligned_watchpoint and made static.
9231 (i386_dr_remove_aligned_watchpoint): Renamed to
9232 i386_remove_aligned_watchpoint and made static.
9234 (i386_dr_update_inferior_debug_regs): Renamed to
9235 i386_update_inferior_debug_regs and made static.
9238 2014-06-18 Gary Benson <gbenson@redhat.com>
9240 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9241 (i386_dr_low_can_set_control): Likewise.
9242 (i386_get_debug_register_length): Likewise.
9243 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9244 (i386_dr_low_can_set_control): Likewise.
9245 (i386_get_debug_register_length): Likewise.
9247 2014-06-17 Gary Benson <gbenson@redhat.com>
9249 * i386-low.h (i386-dregs.h): New include.
9250 (DR_FIRSTADDR): Now in i386-dregs.h.
9251 (DR_LASTADDR): Likewise.
9252 (DR_NADDR): Likewise.
9253 (DR_STATUS): Likewise.
9254 (DR_CONTROL): Likewise.
9255 (i386_debug_reg_state): Likewise.
9256 (i386_dr_insert_watchpoint): Likewise.
9257 (i386_dr_remove_watchpoint): Likewise.
9258 (i386_dr_region_ok_for_watchpoint): Likewise.
9259 (i386_dr_stopped_data_address): Likewise.
9260 (i386_dr_stopped_by_watchpoint): Likewise.
9261 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9263 2014-06-18 Gary Benson <gbenson@redhat.com>
9265 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9266 i386_dr_insert_watchpoint.
9267 (i386_low_remove_watchpoint): Renamed to
9268 i386_dr_remove_watchpoint.
9269 (i386_low_region_ok_for_watchpoint): Renamed to
9270 i386_dr_region_ok_for_watchpoint.
9271 (i386_low_stopped_data_address): Renamed to
9272 i386_dr_stopped_data_address.
9273 (i386_low_stopped_by_watchpoint): Renamed to
9274 i386_dr_stopped_by_watchpoint.
9275 * i386-low.c (i386_show_dr): Renamed to
9276 i386_dr_show and made nonstatic. All uses updated.
9277 (i386_length_and_rw_bits): Renamed to
9278 i386_dr_length_and_rw_bits and made nonstatic.
9280 (i386_insert_aligned_watchpoint): Renamed to
9281 i386_dr_insert_aligned_watchpoint and made nonstatic.
9283 (i386_remove_aligned_watchpoint): Renamed to
9284 i386_dr_remove_aligned_watchpoint and made nonstatic.
9286 (i386_update_inferior_debug_regs): Renamed to
9287 i386_dr_update_inferior_debug_regs and made nonstatic.
9289 (i386_low_insert_watchpoint): Renamed to
9290 i386_dr_insert_watchpoint. All uses updated.
9291 (i386_low_remove_watchpoint): Renamed to
9292 i386_dr_remove_watchpoint. All uses updated.
9293 (i386_low_region_ok_for_watchpoint): Renamed to
9294 i386_dr_region_ok_for_watchpoint. All uses updated.
9295 (i386_low_stopped_data_address): Renamed to
9296 i386_dr_stopped_data_address. All uses updated.
9297 (i386_low_stopped_by_watchpoint): Renamed to
9298 i386_dr_stopped_by_watchpoint. All uses updated.
9300 2014-06-18 Gary Benson <gbenson@redhat.com>
9302 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9303 (i386_dr_low_can_set_control): Likewise.
9304 (i386_insert_aligned_watchpoint): New check.
9306 2014-06-18 Gary Benson <gbenson@redhat.com>
9308 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9311 2014-06-18 Gary Benson <gbenson@redhat.com>
9313 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9314 instead of fatal and error.
9315 (i386_handle_nonaligned_watchpoint): Likewise.
9317 2014-06-18 Gary Benson <gbenson@redhat.com>
9319 * i386-low.c (i386_get_debug_register_length): New macro.
9320 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9321 (i386_show_dr): Use debug_printf instead of fprintf. Use
9322 phex to format values.
9324 2014-06-18 Gary Benson <gbenson@redhat.com>
9326 * i386-low.h: Comment changes.
9327 * i386-low.c: Likewise.
9329 2014-06-18 Gary Benson <gbenson@redhat.com>
9331 * i386-low.c: Whitespace changes.
9333 2014-06-12 Tom Tromey <tromey@redhat.com>
9335 * utils.c (freeargv): Remove.
9337 2014-06-12 Tom Tromey <tromey@redhat.com>
9339 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9340 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9341 (parse_debug_format_options): Likewise.
9342 (gdbserver_usage): Likewise.
9343 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9344 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9345 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9347 ($(LIBGNU)): Depend on libiberty.
9348 (all-lib): Recurse into all subdirs.
9349 (install-only): Invoke "install" target in subdirs.
9350 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9352 * configure: Rebuild.
9353 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9354 for vasprintf, vsnprintf, or gettimeofday.
9355 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9358 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9360 * development.sh: Delete.
9361 * Makefile.in (config.status): Adjust dependency on development.sh.
9362 * configure.ac: Adjust development.sh source call.
9363 * configure: Regenerate.
9365 2014-06-02 Pedro Alves <palves@redhat.com>
9367 * ax.c (gdb_free_agent_expr): New function.
9368 * ax.h (gdb_free_agent_expr): New declaration.
9369 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9371 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9373 (clear_breakpoint_conditions_and_commands): New function.
9374 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9375 (clear_breakpoint_conditions_and_commands): New declaration.
9377 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9379 * linux-aarch64-low.c (asm/ptrace.h): Include.
9381 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9383 Fix TLS access for -static -pthread.
9384 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9385 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9386 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9388 2014-05-20 Pedro Alves <palves@redhat.com>
9390 * linux-aarch64-low.c (aarch64_insert_point)
9391 (aarch64_remove_point): No longer check whether the type is
9392 supported here. Adjust to new interface.
9393 (the_low_target): Install aarch64_supports_z_point_type as
9394 supports_z_point_type method.
9395 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9396 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9397 instead of a Z packet char. Adjust.
9398 (arm_supports_z_point_type): New function.
9399 (arm_insert_point, arm_remove_point): Adjust to new interface.
9400 (the_low_target): Install arm_supports_z_point_type.
9401 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9402 (cris_insert_point, cris_remove_point): Adjust to new interface.
9403 Don't check whether the type is supported here.
9404 (the_low_target): Install cris_supports_z_point_type.
9405 * linux-low.c (linux_supports_z_point_type): New function.
9406 (linux_insert_point, linux_remove_point): Adjust to new interface.
9407 * linux-low.h (struct linux_target_ops) <insert_point,
9408 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9409 raw_breakpoint pointer parameter.
9410 <supports_z_point_type>: New method.
9411 * linux-mips-low.c (mips_supports_z_point_type): New function.
9412 (mips_insert_point, mips_remove_point): Adjust to new interface.
9413 Use mips_supports_z_point_type.
9414 (the_low_target): Install mips_supports_z_point_type.
9415 * linux-ppc-low.c (the_low_target): Install NULL as
9416 supports_z_point_type method.
9417 * linux-s390-low.c (the_low_target): Install NULL as
9418 supports_z_point_type method.
9419 * linux-sparc-low.c (the_low_target): Install NULL as
9420 supports_z_point_type method.
9421 * linux-x86-low.c (x86_supports_z_point_type): New function.
9422 (x86_insert_point): Adjust to new insert_point interface. Use
9423 insert_memory_breakpoint. Adjust to new
9424 i386_low_insert_watchpoint interface.
9425 (x86_remove_point): Adjust to remove_point interface. Use
9426 remove_memory_breakpoint. Adjust to new
9427 i386_low_remove_watchpoint interface.
9428 (the_low_target): Install x86_supports_z_point_type.
9429 * lynx-low.c (lynx_target_ops): Install NULL as
9430 supports_z_point_type callback.
9431 * nto-low.c (nto_supports_z_point_type): New.
9432 (nto_insert_point, nto_remove_point): Adjust to new interface.
9433 (nto_target_ops): Install nto_supports_z_point_type.
9434 * mem-break.c: Adjust intro comment.
9435 (struct raw_breakpoint) <raw_type, size>: New fields.
9436 <inserted>: Update comment.
9437 <shlib_disabled>: Delete field.
9438 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9439 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9440 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9441 (raw_bkpt_type_to_target_hw_bp_type): New function.
9442 (find_enabled_raw_code_breakpoint_at): New function.
9443 (find_raw_breakpoint_at): New type and size parameters. Use them.
9444 (insert_memory_breakpoint): New function, based off
9445 set_raw_breakpoint_at.
9446 (remove_memory_breakpoint): New function.
9447 (set_raw_breakpoint_at): Reimplement.
9448 (set_breakpoint): New, based on set_breakpoint_at.
9449 (set_breakpoint_at): Reimplement.
9450 (delete_raw_breakpoint): Go through the_target->remove_point
9451 instead of assuming memory breakpoints.
9452 (find_gdb_breakpoint_at): Delete.
9453 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9454 (find_gdb_breakpoint): New function.
9455 (set_gdb_breakpoint_at): Delete.
9456 (z_type_supported): New function.
9457 (set_gdb_breakpoint_1): New function, loosely based off
9458 set_gdb_breakpoint_at.
9459 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9460 (delete_gdb_breakpoint_at): Delete.
9461 (delete_gdb_breakpoint_1): New function, loosely based off
9462 delete_gdb_breakpoint_at.
9463 (delete_gdb_breakpoint): New function.
9464 (clear_gdb_breakpoint_conditions): Rename to ...
9465 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9467 (add_condition_to_breakpoint): Make static.
9468 (add_breakpoint_condition): Take a struct breakpoint pointer
9469 instead of an address. Adjust.
9470 (gdb_condition_true_at_breakpoint): Rename to ...
9471 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9473 (gdb_condition_true_at_breakpoint): Reimplement.
9474 (add_breakpoint_commands): Take a struct breakpoint pointer
9475 instead of an address. Adjust.
9476 (gdb_no_commands_at_breakpoint): Rename to ...
9477 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9478 parameter. Return true if no breakpoint was found. Change debug
9480 (gdb_no_commands_at_breakpoint): Reimplement.
9481 (run_breakpoint_commands): Rename to ...
9482 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9483 and change return type to boolean.
9484 (run_breakpoint_commands): New function.
9485 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9486 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9487 breakpoint. Go through the_target->remove_point instead of
9488 assuming memory breakpoint.
9489 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9490 software and hardware breakpoints.
9491 (reinsert_raw_breakpoint): Go through the_target->insert_point
9492 instead of assuming memory breakpoint.
9493 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9494 software and hardware breakpoints.
9495 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9496 Check both software and hardware breakpoints.
9497 (validate_inserted_breakpoint): Assert the breakpoint is a
9498 software breakpoint. Set the inserted flag to -1 instead of
9499 setting shlib_disabled.
9500 (delete_disabled_breakpoints): Adjust.
9501 (validate_breakpoints): Only validate software breakpoints.
9502 Adjust to inserted flag change.
9503 (check_mem_read, check_mem_write): Skip breakpoint types other
9504 than software breakpoints. Adjust to inserted flag change.
9505 * mem-break.h (enum raw_bkpt_type): New enum.
9506 (raw_breakpoint, struct process_info): Forward declare.
9507 (Z_packet_to_target_hw_bp_type): Delete declaration.
9508 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9509 (set_gdb_breakpoint, delete_gdb_breakpoint)
9510 (clear_breakpoint_conditions): New declarations.
9511 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9512 (breakpoint_inserted_here): Update comment.
9513 (add_breakpoint_condition, add_breakpoint_commands): Replace
9514 address parameter with a breakpoint pointer parameter.
9515 (gdb_breakpoint_here): Update comment.
9516 (delete_gdb_breakpoint_at): Delete.
9517 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9518 * server.c (process_point_options): Take a struct breakpoint
9519 pointer instead of an address. Adjust.
9520 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9521 delete_gdb_breakpoint.
9522 * spu-low.c (spu_target_ops): Install NULL as
9523 supports_z_point_type method.
9524 * target.h: Include mem-break.h.
9525 (struct target_ops) <prepare_to_access_memory>: Update comment.
9526 <supports_z_point_type>: New field.
9527 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9528 instead of a char. Also take a raw breakpoint pointer.
9529 * win32-arm-low.c (the_low_target): Install NULL as
9530 supports_z_point_type.
9531 * win32-i386-low.c (i386_supports_z_point_type): New function.
9532 (i386_insert_point, i386_remove_point): Adjust to new interface.
9533 (the_low_target): Install i386_supports_z_point_type.
9534 * win32-low.c (win32_supports_z_point_type): New function.
9535 (win32_insert_point, win32_remove_point): Adjust to new interface.
9536 (win32_target_ops): Install win32_supports_z_point_type.
9537 * win32-low.h (struct win32_target_ops):
9538 <supports_z_point_type>: New method.
9539 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9540 instead of a char. Also take a raw breakpoint pointer.
9542 2014-05-20 Pedro Alves <palves@redhat.com>
9544 * mem-break.h: Include break-common.h.
9545 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9546 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9547 (Z_packet_to_target_hw_bp_type): New declaration.
9548 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9549 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9550 (Z_PACKET_ACCESS_WP): Delete macros.
9551 (Z_packet_to_hw_type): Delete function.
9552 * i386-low.h: Don't include break-common.h here.
9553 (Z_packet_to_hw_type): Delete declaration.
9554 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9555 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9556 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9557 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9558 * linux-aarch64-low.c: Don't include break-common.h here.
9559 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9560 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9561 (Z_packet_to_target_hw_bp_type): Delete function.
9562 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9564 (mips_insert_point, mips_remove_point): Use
9565 Z_packet_to_target_hw_bp_type.
9567 2014-05-20 Pedro Alves <palves@redhat.com>
9569 * linux-aarch64-low.c: Include break-common.h.
9570 (enum target_point_type): Delete.
9571 (Z_packet_to_point_type): Rename to ...
9572 (Z_packet_to_target_hw_bp_type): ... this, and return a
9573 target_hw_bp_type instead.
9574 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9575 instead of an enum target_point_type.
9576 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9578 (aarch64_dr_state_insert_one_point)
9579 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9580 (aarch64_handle_aligned_watchpoint)
9581 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9582 Take an enum target_hw_bp_type instead of an enum
9584 (aarch64_supports_z_point_type): New function.
9585 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9586 use Z_packet_to_target_hw_bp_type.
9588 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9590 * configure.ac: Only use -Werror by default when DEVELOPMENT
9592 * configure: Regenerate.
9594 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9596 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9597 * linux-x86-low.c (X86_64_USER_REGS): New.
9598 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9600 2014-04-28 Yao Qi <yao@codesourcery.com>
9602 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9605 2014-04-25 Pedro Alves <palves@redhat.com>
9608 * linux-low.c (linux_attach_fail_reason_string): New function.
9609 (linux_attach_lwp): Delete.
9610 (linux_attach_lwp_1): Rename to ...
9611 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9612 argument. Remove "initial" parameter. Return int instead of
9613 void. Don't error or warn here.
9614 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9615 failure to attach to the tgid. Call warning when failing to
9617 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9618 argument. Remove "initial" parameter. Return int instead of
9619 void. Don't error or warn here.
9620 (linux_attach_fail_reason_string): New declaration.
9621 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9622 interface change. Use linux_attach_fail_reason_string.
9624 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9625 Walfred Tedeschi <walfred.tedeschi@intel.com>
9627 * Makefile.in: Added rules to handle new files
9628 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9629 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9630 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9631 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9632 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9633 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9635 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9636 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9637 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9638 i386/x32-avx512.xml.
9639 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9640 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9641 i386/x32-avx512-linux.xml.
9642 * i387-fp.c (num_avx512_k_registers): New constant for number
9644 (num_avx512_zmmh_low_registers): New constant for number of
9645 lower ZMM registers (0-15).
9646 (num_avx512_zmmh_high_registers): New constant for number of
9647 higher ZMM registers (16-31).
9648 (num_avx512_ymmh_registers): New contant for number of higher
9649 YMM registers (ymm16-31 added by avx521 on x86_64).
9650 (num_avx512_xmm_registers): New constant for number of higher
9651 XMM registers (xmm16-31 added by AVX512 on x86_64).
9652 (struct i387_xsave): Add space for AVX512 registers.
9653 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9654 Add code to handle AVX512 registers.
9655 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9656 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9657 prototypei from generated file.
9658 (tdesc_amd64_avx512_linux): Likewise.
9659 (init_registers_x32_avx512_linux): Likewise.
9660 (tdesc_x32_avx512_linux): Likewise.
9661 (init_registers_i386_avx512_linux): Likewise.
9662 (tdesc_i386_avx512_linux): Likewise.
9663 (x86_64_regmap): Add AVX512 registers.
9664 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9666 (initialize_low_arch): Add code to initialize AVX512 registers.
9668 2014-04-23 Pedro Alves <palves@redhat.com>
9670 * mem-break.c (find_gdb_breakpoint_at): Make static.
9671 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9673 2014-04-23 Pedro Alves <palves@redhat.com>
9675 * i386-low.c: Don't include break-common.h here.
9676 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9677 prototype to take target_hw_bp_type as argument instead of a Z
9679 * i386-low.h: Include break-common.h here.
9680 (Z_packet_to_hw_type): Declare.
9681 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9683 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9684 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9685 (x86_remove_point): Convert the packet number to a
9686 target_hw_bp_type before calling i386_low_remove_watchpoint.
9687 * win32-i386-low.c (i386_insert_point): Convert the packet number
9688 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9689 (i386_remove_point): Convert the packet number to a
9690 target_hw_bp_type before calling i386_low_remove_watchpoint.
9692 2014-04-23 Pedro Alves <palves@redhat.com>
9694 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9696 2014-04-10 Pedro Alves <palves@redhat.com>
9698 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9699 Check if the condition or command is NULL before checking if the
9700 breakpoint is known. On success, return true.
9701 * mem-break.h (add_breakpoint_condition): Document return.
9702 (add_breakpoint_commands): Add describing comment.
9703 * server.c (skip_to_semicolon): New function.
9704 (process_point_options): Use it.
9706 2014-04-09 Pedro Alves <palves@redhat.com>
9708 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9711 2014-02-27 Pedro Alves <palves@redhat.com>
9714 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9716 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9718 (last_thread_of_process_p): Take a PID argument instead of a
9720 (linux_wait_for_lwp): Delete.
9721 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9723 (linux_low_filter_event): New function, party factored out from
9724 linux_wait_for_event.
9725 (linux_wait_for_event): Rename to ...
9726 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9727 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9728 sigsuspend. Check for zombie leaders.
9729 (linux_wait_for_event): Reimplement as wrapper around
9730 linux_wait_for_event_filtered.
9731 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9732 a normal or signal exit is seen, it's the whole process exiting.
9733 (wait_for_sigstop): No longer a for_each_inferior callback.
9734 Rewrite on top of linux_wait_for_event_filtered.
9735 (stop_all_lwps): Call wait_for_sigstop directly.
9736 * server.c (resume, handle_target_event): Handle
9737 TARGET_WAITKIND_NO_RESUMED.
9739 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9741 * win32-low.c (psapi_get_dll_name,
9742 * win32_CreateToolhelp32Snapshot): Delete.
9743 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9744 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9746 (handle_load_dll): Add function description.
9747 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9749 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9751 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9753 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9754 base address when calling win32_add_one_solib.
9755 (handle_load_dll): Delete local variable load_addr.
9756 Remove 0x1000 offset applied to DLL base address when calling
9757 win32_add_one_solib.
9758 (handle_unload_dll): Add comment.
9760 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9762 * win32-low.c (win32_add_all_dlls): Renames
9763 win32_ensure_ntdll_loaded. Rewrite function documentation.
9764 Adjust implementation to always load all DLLs.
9765 Add 0x1000 offset to DLL base address when calling
9766 win32_add_one_solib.
9767 (child_initialization_done): New static global.
9768 (do_initial_child_stuff): Set child_initialization_done to
9769 zero during child initialization, and 1 after. Replace call
9770 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9772 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9773 (handle_unload_dll): Add function documentation.
9774 (get_child_debug_event): Ignore load and unload DLL events
9775 during child initialization.
9777 2014-02-20 Doug Evans <dje@google.com>
9779 Remove global all_lwps.
9780 * inferiors.h (ptid_of): Move here from linux-low.h.
9781 (pid_of, lwpid_of): Ditto.
9782 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9783 parameter is a struct thread_info * now.
9784 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9785 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9786 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9788 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9789 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9790 * linux-arm-low.c (update_registers_callback): Update, "entry"
9791 parameter is a struct thread_info * now.
9792 Fetch lwpid from current_inferior directly.
9793 (arm_insert_point): Pass &all_threads to find_inferior instead of
9795 (arm_remove_point): Ditto.
9796 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9797 (arm_prepare_to_resume): Fetch pid from thread.
9798 (arm_read_description): Fetch lwpid from current_inferior directly.
9799 * linux-low.c (all_lwps): Delete.
9800 (delete_lwp): Delete call to remove_inferior.
9801 (handle_extended_wait): Fetch lwpid from thread.
9802 (add_lwp): Don't set lwp->entry.id. Remove call to
9803 add_inferior_to_list.
9804 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9805 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9806 (kill_one_lwp_callback): Ditto.
9807 (linux_kill): Don't dereference NULL pointer.
9808 Fetch ptid,lwpid from thread.
9809 (get_detach_signal): Fetch ptid from thread.
9810 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9811 Simplify call to regcache_invalidate_thread.
9812 (delete_lwp_callback): Update, "entry" parameter is a
9813 struct thread_info * now. Fetch pid from thread.
9814 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9815 (status_pending_p_callback): Update, "entry" parameter is a
9816 struct thread_info * now. Fetch ptid from thread.
9817 (find_lwp_pid): Update, "entry" parameter is a
9818 struct thread_info * now.
9819 (linux_wait_for_lwp): Fetch pid from thread.
9820 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9821 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9822 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9823 (dequeue_one_deferred_signal): Ditto.
9824 (cancel_breakpoint): Fetch ptid from current_inferior.
9825 (linux_wait_for_event): Pass &all_threads to find_inferior,
9826 not &all_lwps. Fetch ptid, lwpid from thread.
9827 (count_events_callback): Update, "entry" parameter is a
9828 struct thread_info * now.
9829 (select_singlestep_lwp_callback): Ditto.
9830 (select_event_lwp_callback): Ditto.
9831 (cancel_breakpoints_callback): Ditto.
9832 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9834 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9835 (unsuspend_one_lwp): Update, "entry" parameter is a
9836 struct thread_info * now.
9837 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9839 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9840 Fetch lwpid from thread, not lwp.
9841 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9842 Pass &all_threads to find_inferior, not &all_lwps.
9843 (send_sigstop): Fetch lwpid from thread, not lwp.
9844 (send_sigstop_callback): Update, "entry" parameter is a
9845 struct thread_info * now.
9846 (suspend_and_send_sigstop_callback): Ditto.
9847 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9848 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9849 struct thread_info * now.
9850 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9852 (lwp_running): Update, "entry" parameter is a
9853 struct thread_info * now.
9854 (stop_all_lwps): Fetch ptid from thread.
9855 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9856 (linux_resume_one_lwp): Fetch lwpid from thread.
9857 (linux_set_resume_request): Update, "entry" parameter is a
9858 struct thread_info * now. Fetch pid, lwpid from thread.
9859 (resume_status_pending_p): Update, "entry" parameter is a
9860 struct thread_info * now.
9861 (need_step_over_p): Ditto. Fetch lwpid from thread.
9862 (start_step_over): Fetch lwpid from thread.
9863 (linux_resume_one_thread): Update, "entry" parameter is a
9864 struct thread_info * now. Fetch lwpid from thread.
9865 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9866 (proceed_one_lwp): Update, "entry" parameter is a
9867 struct thread_info * now. Fetch lwpid from thread.
9868 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9869 struct thread_info * now.
9870 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9871 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9872 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9874 (regsets_store_inferior_registers): Ditto.
9875 (fetch_register, store_register): Ditto.
9876 (linux_read_memory, linux_write_memory): Ditto.
9877 (linux_request_interrupt): Ditto.
9878 (linux_read_auxv): Ditto.
9879 (linux_xfer_siginfo): Ditto.
9880 (linux_qxfer_spu): Ditto.
9881 (linux_qxfer_libraries_svr4): Ditto.
9882 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9883 moved to inferiors.h.
9885 (get_thread_lwp): Update.
9886 (struct lwp_info): Delete member "entry". Simplify comment for
9889 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9890 current_inferior directly.
9891 (update_watch_registers_callback): Update, "entry" parameter is a
9892 struct thread_info * now. Fetch pid from thread.
9893 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9894 (mips_insert_point): Fetch lwpid from current_inferior.
9895 Pass &all_threads to find_inferior, not &all_lwps.
9896 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9897 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9899 (mips_stopped_data_address): Ditto.
9900 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9902 * linux-tile-low.c (tile_arch_setup): Ditto.
9903 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9904 (update_debug_registers_callback): Update, "entry" parameter is a
9905 struct thread_info * now. Fetch pid from thread.
9906 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9907 Pass &all_threads to find_inferior, not &all_lwps.
9908 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9909 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9910 Pass &all_threads to find_inferior, not &all_lwps.
9911 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9912 (i386_dr_low_get_status): Ditto.
9913 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9914 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9915 (x86_linux_read_description): Ditto.
9916 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9918 2014-02-20 Doug Evans <dje@google.com>
9920 * inferiors.c (get_first_inferior): Fix buglet.
9922 2014-02-19 Doug Evans <dje@google.com>
9924 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9925 * inferiors.c (add_thread): Change result type to struct thread_info *.
9926 All callers updated.
9927 (add_lwp): Call add_thread here instead of in callers.
9928 All callers updated.
9929 * linux-low.h (get_lwp_thread): Rewrite.
9930 (struct lwp_info): New member "thread".
9932 2014-02-19 Doug Evans <dje@google.com>
9934 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9935 All callers updated.
9937 2014-02-19 Doug Evans <dje@google.com>
9939 * inferiors.c (add_thread): Fix whitespace.
9941 2014-02-19 Doug Evans <dje@google.com>
9943 * dll.c (clear_dlls): Replace accessing list implemention details
9945 * gdbthread.h (get_first_thread): Declare.
9946 * inferiors.c (for_each_inferior_with_data): New function.
9947 (get_first_thread): New function.
9948 (find_thread_ptid): Simplify.
9949 (get_first_inferior): New function.
9950 (clear_list): Delete.
9951 (one_inferior_p): New function.
9952 (clear_inferior_list): New function.
9953 (clear_inferiors): Update.
9954 * inferiors.h (for_each_inferior_with_data): Declare.
9955 (clear_inferior_list): Declare.
9956 (one_inferior_p): Declare.
9957 (get_first_inferior): Declare.
9958 * linux-low.c (linux_wait_for_event): Replace accessing list
9959 implemention details with API function.
9960 * server.c (target_running): Ditto.
9961 (accumulate_file_name_length): New function.
9962 (emit_dll_description): New function.
9963 (handle_qxfer_libraries): Replace accessing list implemention
9964 details with API function.
9965 (handle_qxfer_threads_worker): New function.
9966 (handle_qxfer_threads_proper): Replace accessing list implemention
9967 details with API function.
9968 (handle_query): Ditto.
9969 (visit_actioned_threads_callback_ftype): New typedef.
9970 (visit_actioned_threads_data): New struct.
9971 (visit_actioned_threads): Rewrite to be find_inferior callback.
9972 (resume): Call find_inferior.
9973 (handle_status): Replace accessing list implemention
9974 details with API function.
9975 (process_serial_event): Replace accessing list implemention details
9977 * target.c (set_desired_inferior): Replace accessing list implemention
9978 details with API function.
9979 * tracepoint.c (same_process_p): New function.
9980 (gdb_agent_about_to_close): Replace accessing list implemention
9981 details with API function.
9982 * win32-low.c (child_delete_thread): Replace accessing list
9983 implemention details with API function.
9984 (match_dll_by_basename): New function.
9985 (dll_is_loaded_by_basename): New function.
9986 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9987 details call to dll_is_loaded_by_basename.
9989 2014-02-19 Doug Evans <dje@google.com>
9991 * dll.h (struct dll_info): Add comment.
9992 * gdbthread.h (struct thread_info): Add comment.
9993 (current_ptid): Simplify.
9994 * inferiors.c (add_process): Update.
9995 (remove_process): Update.
9996 * inferiors.h (struct process_info): Rename member "head" to "entry".
9997 * linux-low.c (delete_lwp): Update.
9999 (last_thread_of_process_p): Update.
10000 (kill_one_lwp_callback, linux_kill): Update.
10001 (status_pending_p_callback): Update.
10002 (wait_for_sigstop): Update. Simplify read of ptid.
10003 (start_step_over): Update.
10004 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10005 (get_lwp_thread): Update.
10006 (struct lwp_info): Rename member "head" to "entry".
10007 * regcache.h (inferior_list_entry): Delete.
10008 * server.c (kill_inferior_callback): Update.
10009 (detach_or_kill_inferior_callback): Update.
10010 (print_started_pid): Update.
10011 (print_attached_pid): Update.
10012 (process_serial_event): Simplify read of ptid.
10013 * thread-db.c (thread_db_create_event): Update.
10014 (thread_db_get_tls_address): Update.
10015 * win32-low.c (current_inferior_ptid): Simplify.
10017 2014-02-19 Tom Tromey <tromey@redhat.com>
10019 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10021 (target_supports_btrace): Update.
10023 2014-02-14 Yao Qi <yao@codesourcery.com>
10025 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10026 (rsp-low-ipa.o): New target.
10028 2014-02-12 Tom Tromey <tromey@redhat.com>
10030 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10031 convert_ascii_to_int.
10032 * regcache.c (registers_to_string): Likewise.
10033 * remote-utils.c (decode_M_packet): Likewise.
10034 * server.c (process_serial_event): Likewise.
10036 2014-02-12 Tom Tromey <tromey@redhat.com>
10038 * server.c (handle_query, handle_v_run): Use hex2bin, not
10040 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10042 2014-02-12 Tom Tromey <tromey@redhat.com>
10044 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10045 convert_int_to_ascii.
10046 * regcache.c (registers_to_string, collect_register_as_string):
10048 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10050 * server.c (process_serial_event): Likewise.
10051 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10052 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10054 2014-02-12 Tom Tromey <tromey@redhat.com>
10056 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10057 bin2hex, not hexify.
10058 * tracepoint.c (cmd_qtstatus): Likewise.
10060 2014-02-12 Tom Tromey <tromey@redhat.com>
10062 * remote-utils.c (monitor_output): Pass explicit length to
10065 2014-02-12 Tom Tromey <tromey@redhat.com>
10067 * tracepoint.c: Include rsp-low.h.
10068 * server.c: Include rsp-low.h.
10069 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10070 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10072 * remote-utils.c: Include rsp-low.h.
10073 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10074 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10075 (convert_int_to_ascii, convert_ascii_to_int): Move to
10077 * regcache.c: Include rsp-low.h.
10078 * ax.c: Include rsp-low.h.
10079 * Makefile.in (SFILES): Add common/rsp-low.c.
10080 (OBS): Add rsp-low.o.
10081 (rsp-low.o): New target.
10083 2014-02-12 Tom Tromey <tromey@redhat.com>
10085 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10086 Include print-utils.h.
10087 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10088 (plongest, thirty_two, phex_nz): Remove.
10089 * Makefile.in (SFILES): Add common/print-utils.c.
10090 (OBS): Add print-utils.o.
10091 (print-utils-ipa.o): New target.
10092 (print-utils.o): New target.
10093 (IPA_OBJS): Add print-utils-ipa.o.
10095 2014-02-06 Tom Tromey <tromey@redhat.com>
10097 * Makefile.in (SFILES): Fix indentation.
10099 2014-02-05 Doug Evans <dje@google.com>
10101 * linux-low.c (linux_wait_for_event): Improve comment.
10102 (linux_wait_1): Keep current_inferior in sync with event_child.
10104 2014-01-22 Doug Evans <dje@google.com>
10106 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10108 2014-01-22 Doug Evans <dje@google.com>
10110 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10111 * configure: Regenerate.
10112 * config.in: Regenerate.
10113 * Makefile.in (SFILES): Add debug.c.
10114 (OBS): Add debug.o.
10115 * debug.c: New file.
10116 * debug.h: New file.
10117 * linux-aarch64-low.c (*): Update all debugging printfs to use
10118 debug_printf instead of fprintf.
10119 * linux-arm-low.c (*): Ditto.
10120 * linux-cris-low.c (*): Ditto.
10121 * linux-crisv32-low.c (*): Ditto.
10122 * linux-m32r-low.c (*): Ditto.
10123 * linux-sparc-low.c (*): Ditto.
10124 * linux-x86.c (*): Ditto.
10125 * linux-low.c (*): Ditto.
10126 (linux_wait_1): Add calls to debug_enter, debug_exit.
10127 (linux_wait): Remove redundant debugging printf.
10128 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10129 (linux_resume, unstop_all_lwps): Ditto.
10130 * mem-break.c (*): Update all debugging printfs to use
10131 debug_printf instead of fprintf.
10132 * remote-utils.c (*): Ditto.
10133 * thread-db.c (*): Ditto.
10134 * server.c #include <ctype.h>, "gdb_vecs.h".
10135 (debug_threads): Moved to debug.c.
10136 (*): Update all debugging printfs to use debug_printf instead of
10138 (start_inferior): Replace call to fflush with call to debug_flush.
10139 (monitor_show_help): Mention set debug-format.
10140 (parse_debug_format_options): New function.
10141 (handle_monitor_command): Handle "monitor set debug-format".
10142 (gdbserver_usage): Mention --debug-format.
10143 (main): Parse --debug-format.
10144 * server.h (debug_threads): Declaration moved to debug.h.
10145 #include "debug.h".
10146 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10147 trace_debug_1 that uses debug_printf.
10148 (tracepoint_look_up_symbols): Update all debugging printfs to use
10149 debug_printf instead of fprintf.
10151 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10153 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10156 2014-01-17 Pedro Alves <palves@redhat.com>
10159 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10160 defined after including gdb_proc_service.h.
10162 2014-01-16 Doug Evans <dje@google.com>
10164 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10165 (match_dll): Use it.
10167 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10169 * target.h (target_ops) <read_btrace>: Change parameters and
10170 return type to allow error reporting.
10171 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10172 trace reading errors on.
10173 * linux-low.c (linux_low_read_btrace): Pass trace reading
10175 (linux_low_disable_btrace): New.
10177 2014-01-15 Doug Evans <dje@google.com>
10179 * inferiors.c (thread_id_to_gdb_id): Delete.
10180 * inferiors.h (thread_id_to_gdb_id): Delete.
10182 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10184 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10185 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10188 2014-01-08 Pedro Alves <palves@redhat.com>
10190 * server.c (handle_status): Don't discard previous queued stop
10191 replies or thread's pending status here.
10192 (main) <disconnection>: Do it here instead.
10194 2014-01-08 Pedro Alves <palves@redhat.com>
10196 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10197 * server.c (visit_actioned_threads, handle_pending_status): New
10199 (handle_v_cont): Factor out parts to ...
10200 (resume): ... this new function. If in all-stop, and a thread
10201 being resumed has a pending status, report it without actually
10203 (myresume): Adjust to use the new 'resume' function.
10204 (clear_pending_status_callback, set_pending_status_callback)
10205 (find_status_pending_thread_callback): New functions.
10206 (handle_status): Handle the case of multiple threads having
10207 interesting statuses to report. Report threads' real last signal
10208 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10209 with an interesting thread to report the status for, instead of
10210 always reporting the status of the first thread.
10212 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10214 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10215 * gdbreplay.c (gdbreplay_version): Likewise.
10217 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10219 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10220 iov.iov_len with the real length in use.
10222 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10224 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10225 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10226 for all targets that use win32-low.c.
10227 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10228 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10230 2013-12-13 Pedro Alves <palves@redhat.com>
10232 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10233 if equal to TARGET_WAITKIND_LOADED.
10234 * win32-low.c (cached_status): New static global.
10235 (win32_wait): Add declaration.
10236 (do_initial_child_stuff): Flush all initial pending debug events
10237 up to the initial breakpoint.
10238 (win32_wait): If CACHED_STATUS was set, return that instead
10239 of doing a real wait. Remove the code resuming the execution
10240 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10241 during the initial phase. Also remove the code changing
10242 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10243 TARGET_WAITKIND_STOPPED.
10245 2013-12-11 Yao Qi <yao@codesourcery.com>
10247 * notif.c (handle_notif_ack): Return 0 if no notification
10250 2013-11-20 Doug Evans <dje@google.com>
10252 * linux-low.c (linux_set_resume_request): Fix comment.
10254 2013-11-20 Doug Evans <dje@google.com>
10256 * linux-low.c (resume_status_pending_p): Tweak comment.
10258 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10260 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10261 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10262 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10263 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10264 (srv_amd64_regobj): Add amd64-mpx.o.
10265 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10266 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10267 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10268 * i387-fp.c (num_pl_bnd_register) Added constant.
10269 (num_pl_bnd_cfg_registers) Added constant.
10270 (struct i387_xsave) Added reserved area and MPX fields.
10271 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10272 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10274 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10275 (init_registers_amd64_mpx_linux): Declare new function.
10276 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10277 (x86_64_regmap): Add MPX registers.
10278 (x86_linux_read_description): Add MPX case.
10279 (initialize_low_arch): Initialize MPX targets.
10281 2013-11-18 Tom Tromey <tromey@redhat.com>
10283 * configure: Rebuild.
10284 * configure.ac: Don't check for stdlib.h.
10285 * gdbreplay.c: Unconditionally include stdlib.h.
10287 2013-11-18 Tom Tromey <tromey@redhat.com>
10289 * config.in: Rebuild.
10290 * configure: Rebuild.
10291 * configure.ac: Don't use AC_HEADER_DIRENT.
10293 2013-11-18 Tom Tromey <tromey@redhat.com>
10295 * server.h: Don't check HAVE_STRING_H.
10296 * gdbreplay.c: Don't check HAVE_STRING_H.
10297 * configure: Rebuild.
10299 2013-11-18 Tom Tromey <tromey@redhat.com>
10301 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10304 2013-11-08 Tom Tromey <tromey@redhat.com>
10306 * configure, config.in: Rebuild.
10307 * configure.ac: Remove unused configury.
10309 2013-11-08 Tom Tromey <tromey@redhat.com>
10311 * acinclude.m4: Include common.m4, codeset.m4.
10312 * configure, config.in: Rebuild.
10313 * configure.ac: Use GDB_AC_COMMON.
10315 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10317 * linux-s390-low.c (HWCAP_S390_TE): New define.
10318 (s390_arch_setup): Consider the TE field in the HWCAP for
10319 determining 'have_regset_tdb'.
10321 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10324 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10327 2013-10-02 Pedro Alves <palves@redhat.com>
10329 * server.c (process_serial_event): Don't output "GDBserver
10330 exiting" if GDB is connected through stdio.
10331 * target.c (mywait): Likewise, be silent if GDB is connected
10334 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10336 * lynx-low.c (lynx_add_threads_after_attach): New function.
10337 (lynx_attach): Remove call to add_thread. Add call to
10338 lynx_add_threads_after_attach instead.
10340 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10342 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10343 * config.in, configure: Regenerated.
10345 2013-09-18 Yao Qi <yao@codesourcery.com>
10348 * server.c (start_inferior): Clear 'resume_info'.
10350 2013-09-16 Jiong Wang <jiwang@tilera.com>
10352 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10355 2013-09-16 Jiong Wang <jiwang@tilera.com>
10357 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10358 linux-tile-low.o to srv_tgtobj.
10360 2013-09-16 Will Newton <will.newton@linaro.org>
10362 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10365 2013-09-06 Pedro Alves <palves@redhat.com>
10367 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10368 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10369 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10370 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10371 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10372 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10374 2013-09-06 Pedro Alves <palves@redhat.com>
10376 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10377 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10379 2013-09-06 Pedro Alves <palves@redhat.com>
10381 * linux-amd64-ipa.c: Include tracepoint.h.
10382 * linux-i386-ipa.c: Include tracepoint.h.
10384 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10386 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10387 (ps_get_thread_area): New function.
10389 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10391 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10392 (initialize_low_arch): Call init_registers_crisv32 rather than
10393 init_register_crisv32.
10395 2013-09-05 Pedro Alves <palves@redhat.com>
10397 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10399 * hostio.h: ... this new file.
10400 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10401 win32-low.c: Include hostio.h.
10403 2013-09-05 Pedro Alves <palves@redhat.com>
10405 * server.h (gdb_client_data, handler_func, callback_handler_func)
10406 (delete_file_handler, add_file_handler, append_callback_event)
10407 (delete_callback_event, start_event_loop, initialize_event_loop):
10408 Move to event-loop.h and include it.
10409 * event-loop.h: New file.
10411 2013-09-05 Pedro Alves <palves@redhat.com>
10413 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10414 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10415 (loaded_dll, unloaded_dll): Move to ...
10416 * dll.h: ... this new file.
10417 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10419 2013-09-05 Pedro Alves <palves@redhat.com>
10421 * server.h (current_process, get_thread_process, all_processes)
10422 (add_inferior_to_list, for_each_inferior, current_inferior)
10423 (remove_inferior, add_process, remove_process, find_process_pid)
10424 (have_started_inferiors_p, have_attached_inferiors_p)
10425 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10426 (clear_inferiors, find_inferior, find_inferior_id)
10427 (inferior_target_data, set_inferior_target_data)
10428 (inferior_regcache_data, set_inferior_regcache_data): Move to
10429 inferiors.h, and include it.
10430 * inferiors.h: New file.
10432 2013-09-05 Pedro Alves <palves@redhat.com>
10434 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10438 2013-09-05 Pedro Alves <palves@redhat.com>
10440 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10442 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10443 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10444 (handle_tracepoint_general_set, handle_tracepoint_query)
10445 (tracepoint_finished_step, tracepoint_was_hit)
10446 (release_while_stepping_state_list, current_traceframe)
10447 (in_readonly_region, traceframe_read_mem)
10448 (fetch_traceframe_registers, traceframe_read_sdata)
10449 (traceframe_read_info, struct fast_tpoint_collect_status)
10450 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10451 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10452 (supply_fast_tracepoint_registers)
10453 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10454 (ipa_tdesc, claim_trampoline_space)
10455 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10456 (agent_mem_read, agent_get_trace_state_variable_value)
10457 (agent_set_trace_state_variable_value, agent_tsv_read)
10458 (agent_mem_read_string, get_raw_reg_func_addr)
10459 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10460 * tracepoint.h: ... this new file.
10462 2013-09-05 Pedro Alves <palves@redhat.com>
10464 * server.h (perror_with_name, error, fatal, warning, paddress)
10465 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10467 * utils.h: New file.
10469 2013-09-05 Pedro Alves <palves@redhat.com>
10471 * server.h (remote_debug, noack_mode, transport_is_reliable)
10472 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10473 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10474 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10475 (write_enn, initialize_async_io, enable_async_io)
10476 (disable_async_io, check_remote_input_interrupt_request)
10477 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10478 (dead_thread_notify, prepare_resume_reply)
10479 (decode_address_to_semicolon, decode_address, decode_m_packet)
10480 (decode_M_packet, decode_X_packet, decode_xfer_write)
10481 (decode_search_memory_packet, unhexify, hexify)
10482 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10483 (look_up_one_symbol, relocate_instruction)
10484 (monitor_output): Move to remote-utils.h, and include it.
10485 * remote-utils.h: New file.
10487 2013-09-05 Pedro Alves <palves@redhat.com>
10489 * server.h (_): Delete.
10491 2013-09-02 Pedro Alves <palves@redhat.com>
10493 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10494 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10496 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10498 2013-09-02 Pierre Muller <muller@sourceware.org>
10500 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10501 or WriteProcessMemory complete successfully and handle
10502 ERROR_PARTIAL_COPY error.
10504 2013-09-02 Pedro Alves <palves@redhat.com>
10506 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10507 error instead of EIO.
10509 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10512 * linux-low.c: Include filestuff.h.
10513 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10514 * lynx-low.c: Include filestuff.h.
10515 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10516 * server.c: Include filestuff.h.
10517 (main): Call notice_open_fds.
10518 * spu-low.c: Include filestuff.h.
10519 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10521 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10523 * Makefile.in: Explain why ../target and ../nat are not
10524 listed as include file search paths.
10525 (linux-waitpid.o): New object file rule.
10526 * configure.srv (srv_native_linux_obj): New variable.
10527 Replace all occurrences of linux native object files with
10528 $srv_native_linux_obj.
10529 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10530 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10531 (linux_enable_event_reporting): Remove declaration.
10532 (my_waitpid): Moved to common/linux-waitpid.c.
10533 (linux_wait_for_event): Pass ptid when calling
10534 linux_enable_event_reporting.
10535 (linux_supports_tracefork_flag): Remove.
10536 (linux_enable_event_reporting): Likewise.
10537 (linux_tracefork_grandchild): Remove.
10538 (STACK_SIZE): Moved to common/linux-ptrace.c.
10539 (linux_tracefork_child): Remove.
10540 (linux_test_for_tracefork): Remove.
10541 (linux_look_up_symbols): Call linux_supports_traceclone.
10542 (initialize_low): Remove call to linux_test_for_tracefork.
10543 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10544 common/linux-ptrace.h.
10545 (PTRACE_TYPE_ARG4): Likewise.
10546 Include linux-ptrace.h.
10548 2013-08-21 Pedro Alves <palves@redhat.com>
10550 * config.in: Renegerate.
10552 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10554 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10555 (SFILES): Remove $(srcdir)/common/target-common.c and
10556 add $(srcdir)/target/waitstatus.c.
10557 (OBS): Remove target-common.o and add waitstatus.o.
10558 (server_h): Remove $(srcdir)/../common/target-common.h and
10559 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10560 and $(srcdir)/../target/waitstatus.h.
10561 (target-common.o): Remove.
10562 (waitstatus.o): New target object file.
10563 * target.h: Do not include target-common.h and
10564 include target/resume.h, target/wait.h and
10565 target/waitstatus.h.
10567 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10569 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10570 to PTRACE_TYPE_ARG3.
10571 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10572 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10574 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10575 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10577 2013-07-27 Jie Zhang <jie@codesourcery.com>
10578 Daniel Jacobowitz <dan@codesourcery.com>
10579 Yao Qi <yao@codesourcery.com>
10581 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10582 (mips-linux-watch.o): New rule.
10583 (mips_linux_watch_h): New variable.
10584 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10586 * linux-mips-low.c: Include mips-linux-watch.h.
10587 (struct arch_process_info, struct arch_lwp_info): New.
10588 (update_watch_registers_callback): New function.
10589 (mips_linux_new_process, mips_linux_new_thread) New functions.
10590 (mips_linux_prepare_to_resume, mips_insert_point): New
10592 (mips_remove_point, mips_stopped_by_watchpoint): New
10594 (rsp_bp_type_to_target_hw_bp_type): New function.
10595 (mips_stopped_data_address): New function.
10596 (the_low_target): Add watchpoint support functions.
10598 2013-07-27 Yao Qi <yao@codesourcery.com>
10600 * i386-low.c: Include break-common.h.
10601 (enum target_hw_bp_type): Remove.
10603 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10605 * Makefile.in (SFILES): /common/target-common.c.
10606 (OBS): Add target-common.o.
10607 (server_h): Add $(srcdir)/../common/target-common.h.
10608 (target-common.o): New target.
10609 * server.c (queue_stop_reply_callback): Free
10610 status string after use.
10611 * target.c (target_waitstatus_to_string): Remove.
10612 * target.h: Include target-common.h.
10613 (resume_kind): Likewise.
10614 (target_waitkind): Likewise.
10615 (target_waitstatus): Likewise.
10616 (TARGET_WNOHANG): Likewise.
10618 2013-07-04 Yao Qi <yao@codesourcery.com>
10620 * Makefile.in (host_alias): Use @host_noncanonical@.
10621 (target_alias): Use @target_noncanonical@.
10622 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10623 ACX_NONCANONICAL_HOST.
10624 * configure: Regenerated.
10627 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10629 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10630 * configure: Rebuild.
10631 * Makefile.in (version_host, version_target): Get from configure.
10632 (version.c): Use $(version_host) and $(version_target).
10634 2013-07-03 Pedro Alves <palves@redhat.com>
10636 * Makefile.in (config.status): Depend on development.sh.
10637 * acinclude.m4: Include libmcheck.m4.
10638 * configure: Regenerate.
10640 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10642 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10643 attribute inside the parentheses.
10644 (winapi_DebugSetProcessKillOnExit): Ditto.
10645 (winapi_DebugBreakProcess): Ditto.
10646 (winapi_GenerateConsoleCtrlEvent): Ditto.
10648 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10650 * notif.h (notif_event): Add a dummy member to avoid compiler
10653 2013-07-01 Pedro Alves <palves@redhat.com>
10655 * hostio.c (HOSTIO_PATH_MAX): Define.
10656 (require_filename, handle_open, handle_unlink, handle_readlink):
10659 2013-07-01 Pedro Alves <palves@redhat.com>
10661 * server.h: Include "pathmax.h".
10662 * linux-low.c: Don't include sys/param.h.
10663 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10665 * win32-low.c: Don't include sys/param.h.
10666 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10668 2013-07-01 Pedro Alves <palves@redhat.com>
10670 * event-loop.c: Don't check HAVE_UNISTD_H before including
10672 * gdbreplay.c: Likewise.
10673 * remote-utils.c: Likewise.
10674 * server.c: Likewise.
10675 * configure.ac: Don't check for unistd.h.
10676 * configure: Regenerate.
10678 2013-06-28 Tom Tromey <tromey@redhat.com>
10680 * Makefile.in (version.c): Use version.in, not
10683 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10685 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10686 * configure: Rebuild.
10687 * Makefile.in (version_host, version_target): Get from configure.
10688 (version.c): Use $(version_host) and $(version_target).
10690 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10692 Fix trace-status to output user name without trailing colon.
10693 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10695 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10697 Fix trace-status to output proper start-time and stop-time.
10698 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10699 output start time and stop time in hex as gdb expects.
10701 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10703 * tracepoint.c (build_traceframe_info_xml): Output trace state
10704 variables present in the trace buffer.
10706 2013-06-24 Tom Tromey <tromey@redhat.com>
10708 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10710 (version.o): Remove.
10711 * gdbreplay.c: Include version.h.
10712 (version, host_name): Don't declare.
10713 * server.h: Include version.h.
10714 (version, host_name): Don't declare.
10716 2013-06-12 Pedro Alves <palves@redhat.com>
10718 * linux-x86-low.c (linux_is_elf64): Delete global.
10719 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10720 with local linux_pid_exe_is_elf_64_file use.
10722 2013-06-11 Pedro Alves <palves@redhat.com>
10724 * linux-low.c (regset_disabled, disable_regset): New functions.
10725 (regsets_fetch_inferior_registers)
10726 (regsets_store_inferior_registers): Use them.
10727 (initialize_regsets_info); Don't allocate the disabled_regsets
10729 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10732 2013-06-11 Pedro Alves <palves@redhat.com>
10734 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10737 2013-06-11 Pedro Alves <palves@redhat.com>
10739 * linux-x86-low.c (initialize_low_arch): Call
10740 init_registers_x32_avx_linux.
10742 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10744 Fix compatibility with Android Bionic.
10745 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10748 2013-06-07 Pedro Alves <palves@redhat.com>
10751 * Makefile.in (OBS): Add tdesc.o.
10752 (IPA_OBJS): Add tdesc-ipa.o.
10753 (tdesc-ipa.o): New rule.
10754 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10756 * linux-low.c (new_inferior): Delete.
10757 (disabled_regsets, num_regsets): Delete.
10758 (linux_add_process): Adjust to set the new per-process
10760 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10761 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10762 was a stop. When calling arch_setup, switch the current inferior
10763 to the thread that got an event.
10764 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10765 (regsets_fetch_inferior_registers)
10766 (regsets_store_inferior_registers): New regsets_info parameter.
10768 (linux_register_in_regsets): New regs_info parameter. Adjust to
10770 (register_addr, fetch_register, store_register): New usrregs_info
10771 parameter. Adjust to use it.
10772 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10773 parameter regs_info. Adjust to use it.
10774 (linux_fetch_registers): Get the current inferior's regs_info, and
10776 (linux_store_registers): Ditto.
10777 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10778 (initialize_low): Don't initialize the target_regsets here. Call
10779 initialize_low_arch.
10780 * linux-low.h (target_regsets): Delete declaration.
10781 (struct regsets_info): New.
10782 (struct usrregs_info): New.
10783 (struct regs_info): New.
10784 (struct process_info_private) <new_inferior>: New field.
10785 (struct linux_target_ops): Delete the num_regs, regmap, and
10786 regset_bitmap fields. New field regs_info.
10787 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10788 * i387-fp.c (num_xmm_registers): Delete.
10789 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10790 calls to new interface.
10791 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10792 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10793 Infer the number of xmm registers from the regcache's target
10795 * i387-fp.h (num_xmm_registers): Delete.
10796 * inferiors.c (add_thread): Don't install the thread's regcache
10798 * proc-service.c (gregset_info): Fetch the current inferior's
10799 regs_info. Adjust to use it.
10800 * regcache.c: Include tdesc.h.
10801 (register_bytes, reg_defs, num_registers)
10802 (gdbserver_expedite_regs): Delete.
10803 (get_thread_regcache): If the thread doesn't have a regcache yet,
10804 create one, instead of aborting gdbserver.
10805 (regcache_invalidate_one): Rename to ...
10806 (regcache_invalidate_thread): ... this.
10807 (regcache_invalidate_one): New.
10808 (regcache_invalidate): Only invalidate registers of the current
10810 (init_register_cache): Add target_desc parameter, and use it.
10811 (new_register_cache): Ditto. Assert the target description has a
10812 non zero registers_size.
10813 (regcache_cpy): Add assertions. Adjust.
10814 (realloc_register_cache, set_register_cache): Delete.
10815 (registers_to_string, registers_from_string): Adjust.
10816 (find_register_by_name, find_regno, find_register_by_number)
10817 (register_cache_size): Add target_desc parameter, and use it.
10818 (free_register_cache_thread, free_register_cache_thread_one)
10819 (regcache_release, register_cache_size): New.
10820 (register_size): Add target_desc parameter, and use it.
10821 (register_data, supply_register, supply_register_zeroed)
10822 (supply_regblock, supply_register_by_name, collect_register)
10823 (collect_register_as_string, collect_register_by_name): Adjust.
10824 * regcache.h (struct target_desc): Forward declare.
10825 (struct regcache) <tdesc>: New field.
10826 (init_register_cache, new_register_cache): Add target_desc
10828 (regcache_invalidate_thread): Declare.
10829 (regcache_invalidate_one): Delete declaration.
10830 (regcache_release): Declare.
10831 (find_register_by_number, register_cache_size, register_size)
10832 (find_regno): Add target_desc parameter.
10833 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10835 * remote-utils.c: Include tdesc.h.
10836 (outreg, prepare_resume_reply): Adjust.
10837 * server.c: Include tdesc.h.
10838 (gdbserver_xmltarget): Delete declaration.
10839 (get_features_xml, process_serial_event): Adjust.
10840 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10842 (struct process_info) <tdesc>: New field.
10843 (ipa_tdesc): Declare.
10844 * tdesc.c: New file.
10845 * tdesc.h: New file.
10846 * tracepoint.c: Include tdesc.h.
10847 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10848 (get_context_regcache): Adjust to pass ipa_tdesc down.
10849 (do_action_at_tracepoint): Adjust to get the register cache size
10850 from the context regcache's description.
10851 (traceframe_walk_blocks): Adjust to get the register cache size
10852 from the current trace frame's description.
10853 (traceframe_get_pc): Adjust to get current trace frame's
10854 description and pass it down.
10855 (gdb_collect): Adjust to get the register cache size from the
10857 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10858 (gdbserver_xmltarget): Delete.
10859 (initialize_low_tracepoint): Set the ipa's target description.
10860 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10861 (initialize_low_tracepoint): Set the ipa's target description.
10862 * linux-x86-low.c: Include tdesc.h.
10863 [__x86_64__] (is_64bit_tdesc): New.
10864 (ps_get_thread_area, x86_get_thread_area): Use it.
10865 (i386_cannot_store_register): Rename to ...
10866 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10867 (i386_cannot_fetch_register): Rename to ...
10868 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10869 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10871 (target_regsets): Rename to ...
10872 (x86_regsets): ... this.
10873 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10875 (x86_siginfo_fixup): Use is_64bit_tdesc.
10876 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10877 (tdesc_x32_avx_linux, tdesc_x32_linux)
10878 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10880 (x86_linux_update_xmltarget): Delete.
10881 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10882 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10883 (AMD64_LINUX_USER64_CS): New.
10884 (x86_linux_read_description): New, based on
10885 x86_linux_update_xmltarget.
10886 (same_process_callback): New.
10887 (x86_arch_setup_process_callback): New.
10888 (x86_linux_update_xmltarget): New.
10889 (x86_regsets_info): New.
10890 (amd64_linux_regs_info): New.
10891 (i386_linux_usrregs_info): New.
10892 (i386_linux_regs_info): New.
10893 (x86_linux_regs_info): New.
10894 (x86_arch_setup): Reimplement.
10895 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10896 (x86_emit_ops): Ditto.
10897 (the_low_target): Adjust. Install x86_linux_regs_info,
10898 x86_cannot_fetch_register, and x86_cannot_store_register.
10899 (initialize_low_arch): New.
10900 * linux-ia64-low.c (tdesc_ia64): Declare.
10901 (ia64_fetch_register): Adjust.
10902 (ia64_usrregs_info, regs_info): New globals.
10903 (ia64_regs_info): New function.
10904 (the_low_target): Adjust.
10905 (initialize_low_arch): New function.
10906 * linux-sparc-low.c (tdesc_sparc64): Declare.
10907 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10909 (sparc_arch_setup): New function.
10910 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10911 (the_low_target): Adjust.
10912 (initialize_low_arch): New function.
10913 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10914 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10915 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10916 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10917 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10918 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10919 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10920 (tdesc_powerpc_isa205_vsx64l): Declare.
10921 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10922 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10923 (ppc_set_pc, ppc_get_hwcap): Adjust.
10924 (ppc_usrregs_info): Forward declare.
10925 (!__powerpc64__) ppc_regmap_adjusted: New global.
10926 (ppc_arch_setup): Adjust to the current process'es target
10928 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10929 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10930 (ppc_store_evrregset): Adjust.
10931 (target_regsets): Rename to ...
10932 (ppc_regsets): ... this, and make static.
10933 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10934 (ppc_regs_info): New function.
10935 (the_low_target): Adjust.
10936 (initialize_low_arch): New function.
10937 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10938 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10939 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10940 (tdesc_s390x_linux64v2): Declare.
10941 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10942 (s390_fill_gregset, s390_store_last_break): Adjust.
10943 (target_regsets): Rename to ...
10944 (s390_regsets): ... this, and make static.
10945 (s390_get_pc, s390_set_pc): Adjust.
10946 (s390_get_hwcap): New target_desc parameter, and use it.
10947 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10948 (s390_arch_setup): Adjust to set the current process'es target
10949 description. Don't adjust the regmap.
10950 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10951 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10952 (regs_info_3264): New globals.
10953 (s390_regs_info): New function.
10954 (the_low_target): Adjust.
10955 (initialize_low_arch): New function.
10956 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10957 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10958 [__mips64] (init_registers_mips_linux)
10959 (init_registers_mips_dsp_linux): Delete defines.
10960 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10961 (have_dsp): New global.
10962 (mips_read_description): New, based on mips_arch_setup.
10963 (mips_arch_setup): Reimplement.
10964 (get_usrregs_info): New function.
10965 (mips_cannot_fetch_register, mips_cannot_store_register)
10966 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10967 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10968 (target_regsets): Rename to ...
10969 (mips_regsets): ... this, and make static.
10970 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10971 (dsp_regs_info, regs_info): New globals.
10972 (mips_regs_info): New function.
10973 (the_low_target): Adjust.
10974 (initialize_low_arch): New function.
10975 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10976 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10978 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10979 (arm_read_description): New, with bits factored from
10981 (arm_arch_setup): Reimplement.
10982 (target_regsets): Rename to ...
10983 (arm_regsets): ... this, and make static.
10984 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10985 (arm_regs_info): New function.
10986 (the_low_target): Adjust.
10987 (initialize_low_arch): New function.
10988 * linux-m68k-low.c (tdesc_m68k): Declare.
10989 (target_regsets): Rename to ...
10990 (m68k_regsets): ... this, and make static.
10991 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10992 (m68k_regs_info): New function.
10993 (m68k_arch_setup): New function.
10994 (the_low_target): Adjust.
10995 (initialize_low_arch): New function.
10996 * linux-sh-low.c (tdesc_sharch): Declare.
10997 (target_regsets): Rename to ...
10998 (sh_regsets): ... this, and make static.
10999 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11000 (sh_regs_info, sh_arch_setup): New functions.
11001 (the_low_target): Adjust.
11002 (initialize_low_arch): New function.
11003 * linux-bfin-low.c (tdesc_bfin): Declare.
11004 (bfin_arch_setup): New function.
11005 (bfin_usrregs_info, regs_info): New globals.
11006 (bfin_regs_info): New function.
11007 (the_low_target): Adjust.
11008 (initialize_low_arch): New function.
11009 * linux-cris-low.c (tdesc_cris): Declare.
11010 (cris_arch_setup): New function.
11011 (cris_usrregs_info, regs_info): New globals.
11012 (cris_regs_info): New function.
11013 (the_low_target): Adjust.
11014 (initialize_low_arch): New function.
11015 * linux-cris-low.c (tdesc_crisv32): Declare.
11016 (cris_arch_setup): New function.
11017 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11018 (cris_regs_info): New function.
11019 (the_low_target): Adjust.
11020 (initialize_low_arch): New function.
11021 * linux-m32r-low.c (tdesc_m32r): Declare.
11022 (m32r_arch_setup): New function.
11023 (m32r_usrregs_info, regs_info): New globals.
11024 (m32r_regs_info): Adjust.
11025 (initialize_low_arch): New function.
11026 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11027 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11028 (tic6x_usrregs_info): Forward declare.
11029 (tic6x_read_description): New function, based on ...
11030 (tic6x_arch_setup): ... this. Reimplement.
11031 (target_regsets): Rename to ...
11032 (tic6x_regsets): ... this, and make static.
11033 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11034 (tic6x_regs_info): New function.
11035 (the_low_target): Adjust.
11036 (initialize_low_arch): New function.
11037 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11038 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11039 (target_regsets): Rename to ...
11040 (xtensa_regsets): ... this, and make static.
11041 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11043 (xtensa_arch_setup, xtensa_regs_info): New functions.
11044 (the_low_target): Adjust.
11045 (initialize_low_arch): New function.
11046 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11047 (nios2_arch_setup): Set the current process'es tdesc.
11048 (target_regsets): Rename to ...
11049 (nios2_regsets): ... this.
11050 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11051 (nios2_regs_info): New function.
11052 (the_low_target): Adjust.
11053 (initialize_low_arch): New function.
11054 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11055 (aarch64_arch_setup): Set the current process'es tdesc.
11056 (target_regsets): Rename to ...
11057 (aarch64_regsets): ... this.
11058 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11059 (aarch64_regs_info): New function.
11060 (the_low_target): Adjust.
11061 (initialize_low_arch): New function.
11062 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11064 (target_regsets): Rename to ...
11065 (tile_regsets): ... this.
11066 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11067 (tile_regs_info): New function.
11068 (tile_arch_setup): Set the current process'es tdesc.
11069 (the_low_target): Adjust.
11070 (initialize_low_arch): New function.
11071 * spu-low.c (tdesc_spu): Declare.
11072 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11073 * win32-arm-low.c (tdesc_arm): Declare.
11074 (arm_arch_setup): New function.
11075 (the_low_target): Install arm_arch_setup instead of
11076 init_registers_arm.
11077 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11078 (init_windows_x86): Rename to ...
11079 (i386_arch_setup): ... this. Set `win32_tdesc'.
11080 (the_low_target): Adjust.
11081 * win32-low.c (win32_tdesc): New global.
11082 (child_add_thread): Don't create the thread cache here.
11083 (do_initial_child_stuff): Set the new process'es tdesc.
11084 * win32-low.h (struct target_desc): Forward declare.
11085 (win32_tdesc): Declare.
11086 * lynx-i386-low.c (tdesc_i386): Declare global.
11087 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11088 * lynx-low.c (lynx_tdesc): New global.
11089 (lynx_add_process): Set the new process'es tdesc.
11090 * lynx-low.h (struct target_desc): Forward declare.
11091 (lynx_tdesc): Declare global.
11092 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11093 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11094 * nto-low.c (nto_tdesc): New global.
11095 (do_attach): Set the new process'es tdesc.
11096 * nto-low.h (struct target_desc): Forward declare.
11097 (nto_tdesc): Declare.
11098 * nto-x86-low.c (tdesc_i386): Declare.
11099 (nto_x86_arch_setup): Set `nto_tdesc'.
11101 2013-06-04 Gary Benson <gbenson@redhat.com>
11103 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11104 to qSupported response when appropriate.
11105 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11106 with nonzero-length annex.
11107 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11108 arguments supplied in annex.
11110 2013-05-31 Doug Evans <dje@google.com>
11113 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11114 64 bits in 64-cross-32 environment.
11116 2013-05-28 Pedro Alves <palves@redhat.com>
11118 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11119 (aarch64-without-fpu.c): Delete rule.
11120 * configure.srv (aarch64*-*-linux*): Remove references to
11121 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11122 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11125 2013-05-24 Pedro Alves <palves@redhat.com>
11127 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11128 instead of strchr/decode_address. Error if the range isn't split
11129 with a ','. Don't assume there's be a ':' in the action.
11131 2013-05-23 Yao Qi <yao@codesourcery.com>
11132 Pedro Alves <palves@redhat.com>
11134 * linux-low.c (lwp_in_step_range): New function.
11135 (linux_wait_1): If the thread was range stepping and stopped
11136 outside the stepping range, report the stop to GDB. Otherwise,
11137 continue stepping. Add range stepping debug output.
11138 (linux_set_resume_request): Copy the step range from the resume
11139 request to the lwp.
11140 (linux_supports_range_stepping): New.
11141 (linux_target_ops) <supports_range_stepping>: Set to
11142 linux_supports_range_stepping.
11143 * linux-low.h (struct linux_target_ops)
11144 <supports_range_stepping>: New field.
11145 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11146 * linux-x86-low.c (x86_supports_range_stepping): New.
11147 (the_low_target) <supports_range_stepping>: Set to
11148 x86_supports_range_stepping.
11149 * server.c (handle_v_cont): Handle 'r' action.
11150 (handle_v_requests): Append ";r" if the target supports range
11152 * target.h (struct thread_resume) <step_range_start,
11153 step_range_end>: New fields.
11154 (struct target_ops) <supports_range_stepping>:
11156 (target_supports_range_stepping): New macro.
11158 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11160 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11161 confusion in comment.
11163 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11165 * lynx-low.c (struct process_info_private): New type.
11166 (lynx_add_process): New function.
11167 (lynx_create_inferior, lynx_attach): Replace calls to
11168 add_process by calls to lynx_add_process.
11169 (lynx_resume): If PTID is null, then try using
11170 current_process()->private->last_wait_event_ptid.
11172 (lynx_clear_inferiors): Delete. The contents of that function
11173 has been inlined in lynx_mourn;
11174 (lynx_wait_1): Save the ptid in the process's private data.
11175 (lynx_mourn): Free the process' private data. Replace call
11176 to lynx_clear_inferiors by call to clear_inferiors.
11178 2013-05-17 Yao Qi <yao@codesourcery.com>
11180 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11183 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11185 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11186 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11187 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11188 PT_TEXT_END_ADDR guards. Update comments.
11189 (linux_target_op) <read_offsets>: Conditionally define to
11190 linux_read_offsets if the target is UCLIBC and if it defines
11191 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11193 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11194 Andrew Jenner <andrew@codesourcery.com>
11196 * Makefile.in (SFILES): Add linux-nios2-low.c.
11197 (clean): Add action to delete nios2-linux.c.
11198 (nios2-linux.c): New rule.
11199 * configure.srv: Add nios2*-*-linux*.
11200 * linux-nios2-low.c: New.
11202 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11204 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11206 2013-04-25 Hui Zhu <hui@codesourcery.com>
11209 * ax.c (ax_printf): Add fflush.
11211 2013-04-22 Tom Tromey <tromey@redhat.com>
11213 * Makefile.in (SFILES): Add filestuff.c.
11214 (OBS): Add filestuff.o.
11215 (filestuff.o): New target.
11216 * config.in, configure: Rebuild.
11217 * configure.ac: Check for fdwalk, pipe2.
11219 2013-04-17 Pedro Alves <palves@redhat.com>
11221 * configure.ac (USE_THREAD_DB): Delete variable.
11222 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11223 Don't AC_SUBST USE_THREAD_DB.
11224 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11225 * config.in, configure: Regenerate.
11227 2013-04-16 Pedro Alves <palves@redhat.com>
11229 * linux-low.h (struct lwp_info) <thread_known>: Move under
11230 the USE_THREAD_DB #ifdef.
11232 2013-04-16 Pedro Alves <palves@redhat.com>
11234 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11235 (linux-low.o): Delete rule.
11236 * linux-low.h: Always include "gdb_thread_db.h" instead of
11237 conditionally including thread_db.h.
11238 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11241 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11243 * Makefile.in (install-only): Fix make install regression.
11245 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11247 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11248 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11250 * gdbserver.1: Remove.
11252 2013-03-22 Pedro Alves <palves@redhat.com>
11254 * linux-low.c (handle_extended_wait): Don't call
11255 linux_enable_event_reporting.
11257 2013-03-15 Tony Theodore <tonyt@logyst.com>
11260 * Makefile.in (SHELL): Use @SHELL@.
11262 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11264 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11267 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11269 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11270 Remove extraneous NULL element.
11272 2013-03-13 Yao Qi <yao@codesourcery.com>
11274 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11275 'V' block in trace frame.
11277 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11279 * target.h (struct target_ops): Add btrace ops.
11280 (target_supports_btrace): New macro.
11281 (target_enable_btrace): New macro.
11282 (target_disable_btrace): New macro.
11283 (target_read_btrace): New macro.
11284 * gdbthread.h (struct thread_info): Add btrace field.
11285 * server.c: Include btrace-common.h.
11286 (handle_btrace_general_set): New function.
11287 (handle_btrace_enable): New function.
11288 (handle_btrace_disable): New function.
11289 (handle_general_set): Call handle_btrace_general_set.
11290 (handle_qxfer_btrace): New function.
11291 (struct qxfer qxfer_packets[]): Add btrace entry.
11292 * inferiors.c (remove_thread): Disable btrace.
11293 * linux-low: Include linux-btrace.h.
11294 (linux_low_enable_btrace): New function.
11295 (linux_low_read_btrace): New function.
11296 (linux_target_ops): Add btrace ops.
11297 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11298 Add srv_linux_btrace=yes.
11299 (x86_64-*-linux*): Add linux-btrace.o.
11300 Add srv_linux_btrace=yes.
11301 * configure.ac: Define HAVE_LINUX_BTRACE.
11302 * config.in: Regenerated.
11303 * configure: Regenerated.
11305 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11307 * server.c (handle_qxfer): Preserve error message if -3 is
11309 (qxfer): Document the -3 return value.
11311 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11313 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11314 (linux_btrace_h): New variable.
11315 (linux-btrace.o): New rule.
11317 2013-03-08 Stan Shebs <stan@codesourcery.com>
11318 Hafiz Abid Qadeer <abidh@codesourcery.com>
11320 * tracepoint.c (trace_buffer_size): New global.
11321 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11322 (init_trace_buffer): Change to one-argument function. Allocate
11323 trace buffer memory.
11324 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11325 handle QTBuffer:size packet.
11326 (cmd_bigqtbuffer_size): New function.
11327 (initialize_tracepoint): Call init_trace_buffer with
11328 DEFAULT_TRACE_BUFFER_SIZE.
11329 * server.c (handle_query): Add QTBuffer:size in the
11332 2013-03-07 Yao Qi <yao@codesourcery.com>
11334 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11335 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11337 (cmd_qtsp): Adjust condition. Do post increment.
11338 Set cur_action and cur_step_action back to 0.
11340 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11343 * linux-low.c (linux_write_memory): Return early success if LEN is
11346 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11348 * configure.srv: Add x86_64-*-cygwin* as target.
11350 2013-02-28 Tom Tromey <tromey@redhat.com>
11352 * configure.ac: Invoke AC_SYS_LARGEFILE.
11353 * configure, config.in: Rebuild.
11355 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11357 * win32-low.c: Throughout, fix format strings and casts of
11358 printf-like functions to avoid type related warnings on all
11360 (get_child_debug_event): Print dwDebugEventCode as hex since
11361 that's how it's usually documented.
11363 2013-02-28 Yao Qi <yao@codesourcery.com>
11365 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11368 2013-02-27 Jiong Wang <jiwang@tilera.com>
11370 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11371 (reg-tilegx32.c): New rule.
11372 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11373 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11374 different register info initializer according to elf class.
11375 (init_registers_tilgx32): New function. The tilegx32 register info
11377 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11378 (tile_store_gregset): Likewise.
11380 2013-02-27 Yao Qi <yao@codesourcery.com>
11382 * server.c (process_point_options): Print debug message when
11383 debug_threads is true.
11385 2013-02-26 Yao Qi <yao@codesourcery.com>
11387 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11389 2013-02-19 Pedro Alves <palves@redhat.com>
11390 Kai Tietz <ktietz@redhat.com>
11394 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11395 instead of strtoul to extract address from packet.
11396 (process_serial_event) <'z'>: Likewise.
11398 2013-02-18 Yao Qi <yao@codesourcery.com>
11400 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11402 2013-02-14 Pedro Alves <palves@redhat.com>
11406 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11407 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11409 2013-02-14 Pedro Alves <palves@redhat.com>
11411 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11413 2013-02-14 Pedro Alves <palves@redhat.com>
11415 * tracepoint.c (save_string): Delete.
11416 (add_tracepoint_action): Use savestring instead of save_string.
11418 2013-02-12 Pedro Alves <palves@redhat.com>
11420 * linux-xtensa-low.c: Ditto.
11421 * xtensa-xtregs.c: Ditto.
11423 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11425 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11428 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11430 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11431 aarch64_num_wp_regs and aarch64_num_bp_regs to
11432 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11434 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11436 * linux-aarch64-low.c (ps_get_thread_area): Replace
11437 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11439 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11440 Marcus Shawcroft <marcus.shawcroft@arm.com>
11441 Nigel Stephens <nigel.stephens@arm.com>
11442 Yufeng Zhang <yufeng.zhang@arm.com>
11444 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11445 (aarch64.c, aarch64-without-fpu.c): New targets.
11446 * configure.srv (aarch64*-*-linux*): New.
11447 * linux-aarch64-low.c: New file.
11449 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11451 * linux-low.c (handle_extended_wait, linux_create_inferior)
11452 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11453 (dequeue_one_deferred_signal, linux_resume_one_thread)
11454 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11455 (linux_tracefork_grandchild, linux_test_for_tracefork)
11456 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11457 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11458 where the argument is 0.
11460 2013-01-25 Yao Qi <yao@codesourcery.com>
11462 * event-loop.c: Include "queue.h".
11463 (gdb_event_p): New typedef.
11464 (struct gdb_event) <next_event>: Remove.
11465 (event_queue): Change to QUEUE(gdb_event_p).
11466 (async_queue_event): Remove.
11467 (gdb_event_xfree): New.
11468 (initialize_event_loop): New.
11469 (process_event): Use API from QUEUE.
11470 (wait_for_event): Likewise.
11471 * server.c (main): Call initialize_event_loop.
11472 * server.h (initialize_event_loop): Declare.
11474 2013-01-18 Yao Qi <yao@codesourcery.com>
11476 * ax.h (struct eval_agent_expr_context): New.
11477 (gdb_eval_agent_expr): Update declaration.
11478 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11479 TFRAME. Add new argument CTX.
11480 * server.h (struct eval_agent_expr_context): Declare.
11481 (agent_mem_read, agent_tsv_read): Update declaration.
11482 (agent_mem_read_string): Likewise.
11483 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11484 (add_traceframe_block): Add new argument TPOINT.
11485 Increase TPOINT->traceframe_usage.
11486 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11487 eval_tracepoint_agent_expr.
11488 (condition_true_at_tracepoint): Likewise.
11489 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11490 (agent_mem_read_string, agent_tsv_read): Likewise.
11492 2013-01-16 Yao Qi <yao@codesourcery.com>
11494 * linux-low.c (linux_resume_one_lwp): Don't check
11495 'lwp->bp_reinsert != 0'.
11497 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11498 Pedro Alves <palves@redhat.com>
11500 * lynx-low.c (ptrace_request_to_str): Define a temporary
11501 macro and use it to simplify this function's implementation.
11503 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11505 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11508 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11510 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11512 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11514 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11516 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11518 * lynx-low.c (lynx_resume): Use the resume_info parameter
11519 to determine the ptid for the lynx_ptrace call, unless
11520 it is equal to minus_one_ptid, in which case we use the
11521 ptid of the current_inferior.
11522 (lynx_wait_1): After having received a thread create/exit
11523 event, resume the inferior's execution using the signaling
11524 thread's ptid, rather than the old ptid.
11526 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11528 * lynx-low.c (lynx_resume): Delete variable ret.
11530 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11532 * gdbreplay.c (gdbreplay_version): Update copyright year.
11533 * server.c (gdbserver_version): Likewise.
11535 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11537 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11540 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11542 * lynx-low.c (ptrace_request_to_str): Add handling for
11543 PTRACE_GETTRACESIG.
11545 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11547 * lynx-low.c (lynx_attach): Delete variable new_process.
11549 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11551 * lynx-low.c (lynx_create_inferior): Delete variable
11554 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11556 * lynx-low.c (ptrace_request_to_str): Do not handle
11557 PTRACE_GETTHREADLIST if this macro does not exist.
11559 2012-12-15 Yao Qi <yao@codesourcery.com>
11561 * Makefile.in (OBS): Add notif.o.
11562 * notif.c, notif.h: New.
11563 * server.c: Include "notif.h".
11564 (struct vstop_notif) <next>: Remove.
11566 (queue_stop_reply): Update.
11567 (push_event, send_next_stop_reply): Remove.
11568 (discard_queued_stop_replies): Update.
11569 (notif_stop): New variable.
11570 (handle_v_stopped): Remove.
11571 (handle_v_requests): Don't call handle_v_stopped. Call
11572 handle_ack_notif instead.
11573 (queue_stop_reply_callback): Call notif_event_enque instead
11574 of queue_stop_reply.
11575 (handle_status): Don't call send_next_stop_reply, call
11576 notif_write_event instead.
11577 (kill_inferior_callback): Likewise.
11578 (detach_or_kill_inferior_callback): Likewise.
11579 (main): Call initialize_notif.
11580 (process_serial_event): Call QUEUE_is_empty.
11581 (handle_target_event): Call notif_push instead of push event.
11582 * server.h (push_event): Remove declaration.
11584 2012-12-10 Tom Tromey <tromey@redhat.com>
11586 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11587 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11590 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11591 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11592 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11593 (amd64-linux-ipa.o, ax.o): Rewrite.
11594 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11595 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11596 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11597 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11598 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11599 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11600 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11601 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11602 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11603 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11604 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11605 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11606 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11607 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11608 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11609 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11610 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11611 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11612 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11613 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11614 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11615 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11616 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11617 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11618 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11619 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11620 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11621 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11622 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11623 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11624 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11625 (reg-tilegx.o): Remove.
11626 (all_object_files): New macro.
11627 Include .deps files.
11628 * aclocal.m4, configure: Rebuild.
11629 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11630 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11631 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11633 2012-12-05 Tom Tromey <tromey@redhat.com>
11636 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11638 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11640 * configure.ac: Check for linux/perf_event.h.
11641 * config.in: Regenerated.
11642 * configure: Regenerated.
11644 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11646 * hostio.c (handle_readlink): Decrease buffer size
11647 parameter passed to readlink by one byte.
11649 2012-11-26 Yao Qi <yao@codesourcery.com>
11651 * configure.ac (build_warnings): Append '-Wempty-body'.
11652 * configure: Regenerated.
11653 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11656 2012-11-15 Pierre Muller <muller@sourceware.org>
11658 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11659 * config.in: Regenerate.
11660 * configure: Regenerate.
11661 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11662 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11663 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11664 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11666 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11667 instead of <sys/wait.h> header.
11668 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11670 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11672 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11673 (various make rules): Remove -DGDBSERVER
11675 2012-11-09 Yao Qi <yao@codesourcery.com>
11677 * spu-low.c (current_ptid): Move it to ..
11678 * gdbthread.h: ... here. New.
11679 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11680 * server.c (myresume, process_serial_event): Likewise.
11681 * thread-db.c (thread_db_find_new_threads): Likewise.
11682 * tracepoint.c (run_inferior_command): Likewise.
11684 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11686 * server.c (handle_search_memory_1): Include access length in
11689 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11691 * linux-crisv32-low.c: Fix compile errors.
11693 2012-09-04 Yao Qi <yao@codesourcery.com>
11695 * tracepoint.c (cmd_qtsv): Adjust debug message.
11696 Don't check CUR_TPOINT.
11698 2012-08-28 Yao Qi <yao@codesourcery.com>
11700 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11701 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11702 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11703 Remove declarations of xmalloc, xreallloc, xstrdup and
11705 * Makefile.in (libiberty_h): New.
11706 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11707 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11709 2012-08-23 Yao Qi <yao@codesourcery.com>
11711 * server.h: Remove declaration of 'xsnprintf'.
11713 2012-08-22 Keith Seitz <keiths@redhat.com>
11715 * server.h: Include build-gnulib-gbserver/config.h.
11716 * gdbreplay.c: Likewise.
11718 2012-08-08 Doug Evans <dje@google.com>
11720 * Makefile.in (SFILES): Add gdb_vecs.c.
11721 (OBS): Add gdb_vecs.o.
11722 (gdb_vecs_h, host_defs_h): New variables.
11723 (thread-db.o): Add $(gdb_vecs_h) dependency.
11724 (gdb_vecs.o): New rule.
11725 * thread-db.c: #include "gdb_vecs.h".
11726 (thread_db_load_search): Use a vector to iterate over path elements.
11727 Handle text appearing after "$pdir".
11729 * configure.ac: Add check for strstr.
11730 * config.in: Regenerate.
11731 * configure: Regenerate.
11733 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11735 * hostio.c (handle_pread): If pread fails, fall back to attempting
11737 (handle_pwrite): Likewise for pwrite.
11739 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11741 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11742 between unsupported TYPE and unimplementable ADDR/LEN combination.
11743 (arm_insert_point): Act on new return value.
11745 2012-07-31 Pedro Alves <palves@redhat.com>
11747 * server.c (process_point_options): Only skip tokens if we find
11748 one that is unrecognized. Don't treat 'X' specially while
11749 skipping unrecognized tokens.
11751 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11753 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11754 to 4-byte-align HW breakpoint addresses for Thumb.
11756 2012-07-27 Yao Qi <yao@codesourcery.com>
11760 * server.h: Declare gdb_agent_about_to_close.
11761 * target.c (kill_inferior): Include "agent.h".
11762 New. Send command 'kill'.
11763 * target.h (kill_inferior): Removed macro.
11764 * tracepoint.c (gdb_agent_about_to_close): New.
11765 (gdb_agent_helper_thread): Handle command 'close'.
11766 Wait endlessly until the inferior stops.
11767 Install gdb_agent_remove_socket to atexit hook.
11768 (agent_socket_name): New static variable.
11769 (gdb_agent_socket_init): Replace local variable 'name' with
11770 'agent_socket_name'.
11771 (gdb_agent_remove_socket): New.
11773 2012-07-27 Yao Qi <yao@codesourcery.com>
11775 * server.c (process_point_options): Stop at 'X' when parsing.
11777 2012-07-19 Michael Eager <eager@eagercon.com>
11779 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11781 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11782 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11783 hardware breakpoint.
11785 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11787 * gdbserver/linux-low.c (initialize_low): Call
11788 linux_ptrace_init_warnings.
11790 2012-07-02 Doug Evans <dje@google.com>
11792 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11795 2012-07-02 Stan Shebs <stan@codesourcery.com>
11797 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11798 (ax.o): Add it to build rule.
11800 (OBS): Add format.o.
11801 (IPA_OBS): Add format.o.
11802 * server.c (handle_query): Claim support for breakpoint commands.
11803 (process_point_options): Add command case.
11804 (process_serial_event): Leave running if there are printfs in
11806 * mem-break.h (any_persistent_commands): Declare.
11807 (add_breakpoint_commands): Declare.
11808 (gdb_no_commands_at_breakpoint): Declare.
11809 (run_breakpoint_commands): Declare.
11810 * mem-break.c (struct point_command_list): New struct.
11811 (struct breakpoint): New field command_list.
11812 (any_persistent_commands): New function.
11813 (add_commands_to_breakpoint): New function.
11814 (add_breakpoint_commands): New function.
11815 (gdb_no_commands_at_breakpoint): New function.
11816 (run_breakpoint_commands): New function.
11817 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11819 * ax.c: Include format.h.
11820 (ax_printf): New function.
11821 (gdb_eval_agent_expr): Add printf opcode.
11823 2012-06-13 Yao Qi <yao@codesourcery.com>
11825 * server.c (start_inferior): Remove duplicated writes to fields
11826 'last_resume_kind' and 'last_status' of 'current_inferior'.
11828 2012-06-12 Yao Qi <yao@codesourcery.com>
11829 Pedro Alves <palves@redhat.com>
11831 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11833 * server.c (handle_v_cont): Extend comment.
11835 2012-06-11 Yao Qi <yao@codesourcery.com>
11837 * linux-low.c (linux_attach): Add 'static'.
11839 2012-06-06 Yao Qi <yao@codesourcery.com>
11841 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11843 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11845 Fix gcc -flto compilation warning.
11846 * server.c (main): Make variable multi_mode and attach volatile.
11848 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11850 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11851 if the platform doesn't know about it.
11853 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11855 * Makefile.in (SFILES): Add linux-tile-low.c.
11856 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11857 * configure.srv: Handle tilegx-*-linux*.
11858 * linux-tile-low.c: New file.
11860 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11862 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11864 2012-05-24 Pedro Alves <palves@redhat.com>
11868 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11870 2012-05-24 Pedro Alves <palves@redhat.com>
11874 Replace target_signal with gdb_signal throughout.
11876 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11878 * linux-low.c (linux_store_registers): Avoid the copying sequence
11879 when no data has been retrieved by ptrace.
11881 2012-05-22 Will Deacon <will.deacon@arm.com>
11883 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11884 Include asm/ptrace.h.
11885 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11888 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11890 * linux-low.c (linux_store_registers): Don't re-retrieve data
11891 with ptrace that has already been obtained from /proc. Always
11892 copy any data retrieved with ptrace to the buffer supplied.
11894 2012-05-11 Yao Qi <yao@codesourcery.com>
11895 Pedro Alves <palves@redhat.com>
11897 * linux-low.c (enum stopping_threads_kind): New.
11898 (stopping_threads): Change type to `enum stopping_threads_kind'.
11899 (handle_extended_wait): If stopping and suspending threads, leave
11900 the new_lwp suspended too.
11901 (linux_wait_for_event): Adjust.
11902 (stop_all_lwps): Set `stopping_threads' to
11903 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11904 whether we're suspending threads or just stopping them. Assert no
11907 2012-04-29 Yao Qi <yao@codesourcery.com>
11909 * server.h: Move some code to ...
11910 * gdbthread.h: ... here. New.
11911 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11912 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11913 (nto-low.o, win32-low.o): Likewise.
11914 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11915 * regcache.c, remote-utils.c, server.c: Likewise.
11916 * target.c, tracepoint.c, win32-low.c: Likewise.
11918 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11920 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11921 (PTRACE_ARG4_TYPE): Likewise.
11922 (PTRACE_XFER_TYPE): Likewise.
11923 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11924 ptrace to PTRACE_ARG3_TYPE.
11925 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11926 (PTRACE_ARG4_TYPE): Likewise.
11927 (PTRACE_XFER_TYPE): Likewise.
11928 (linux_detach_one_lwp): Cast fourth argument of
11929 ptrace to long then PTRACE_ARG4_TYPE.
11930 (regsets_fetch_inferior_registers): Cast third argument of
11931 ptrace to long then PTRACE_ARG3_TYPE.
11932 (regsets_store_inferior_registers): Likewise.
11934 2012-04-20 Pedro Alves <palves@redhat.com>
11936 * configure: Regenerate.
11938 2012-04-19 Pedro Alves <palves@redhat.com>
11940 * Makefile.in (GNULIB_BUILDDIR): New.
11941 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11942 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11943 (all, install-only, uninstall, clean-info, all-lib, clean): No
11944 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11945 (maintainer-clean realclean distclean): Use subdir_do.
11947 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11948 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11949 * acinclude.m4: Include acx_configure_dir.m4.
11950 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11951 calls. Call AC_PROG_RANLIB. Configure gnulib using
11954 (GNULIB_STDINT_H): Adjust.
11955 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11956 * gdbreplay.c: Include build-gnulib/config.h.
11957 * server.h: Likewise.
11958 * aclocal.m4: Regenerate.
11959 * config.in: Regenerate.
11960 * configure: Regenerate.
11962 2012-04-19 Pedro Alves <palves@redhat.com>
11964 * Makefile.in (LIBGNU, INCGNU): Adjust.
11965 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11966 (all, install-only, uninstall, clean-info, all-lib, clean)
11967 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11968 * configure.ac: Adjust AC_OUTPUT output.
11969 * aclocal.m4: Regenerate.
11970 * configure: Regenerate.
11972 2012-04-19 Pedro Alves <palves@redhat.com>
11974 * Makefile.in (generated_files): New.
11975 (server_h): Remove the explicit dependency on config.h, and depend
11976 on $generated_files.
11978 2012-04-19 Pedro Alves <palves@redhat.com>
11980 * Makefile.in (INCGNU): Add -Ignulib.
11982 2012-04-19 Pedro Alves <palves@redhat.com>
11984 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11985 (INCGNU): ... this, and spell out -I here.
11986 (GNULIB_LIB): Rename to ...
11987 (LIBGNU): ... this.
11988 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11990 2012-04-19 Pedro Alves <palves@redhat.com>
11992 * config.in: Regenerate.
11994 2012-04-19 Pedro Alves <palves@redhat.com>
11996 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11997 * server.h (memmem): Remove declaration.
11998 * config.in: Regenerate.
11999 * configure: Regenerate.
12001 2012-04-19 Yao Qi <yao@codesourcery.com>
12003 * Makefile.in (SFILES): Add common/vec.c.
12007 2012-04-19 Yao Qi <yao@codesourcery.com>
12009 * remote-utils.c (prepare_resume_reply): Replace with macro
12010 target_core_of_thread.
12011 * server.c (handle_qxfer_threads_proper): Likewise.
12012 * target.h (traget_core_of_thread): New macro.
12014 2012-04-18 Pedro Alves <palves@redhat.com>
12016 * aclocal.m4: Regenerate.
12017 * configure: Regenerate.
12019 2012-04-16 Yao Qi <yao@codesourcery.com>
12021 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12022 duplicated on address.
12024 2012-04-16 Yao Qi <yao@codesourcery.com>
12026 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12027 (struct tracepoint_action_ops) <send>: New field.
12028 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12029 (agent_expr_send, x_tracepoint_action_send): New.
12030 (l_tracepoint_action_send): New.
12031 (cmd_qtdp): Download and install tracepoint
12032 according to `use_agent'.
12033 (run_inferior_command): Add one more parameter `len'.
12035 (tracepoint_send_agent): New.
12036 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12038 2012-04-16 Yao Qi <yao@codesourcery.com>
12040 * tracepoint.c (download_tracepoints): Moved to ...
12041 (cmd_qtstart): ... here.
12043 2012-04-14 Yao Qi <yao@codesourcery.com>
12045 * tracepoint.c: Include inttypes.h.
12046 (struct collect_memory_action): Use sized types.
12047 (struct tracepoint): Likewise.
12048 (cmd_qtdp, stop_tracing): Update print specifiers.
12049 (cmd_qtp, response_tracepoint): Likewise.
12050 (collect_data_at_tracepoint): Likewise.
12051 (collect_data_at_step): Likewise.
12053 2012-04-14 Yao Qi <yao@codesourcery.com>
12055 Import gnulib module inttypes.
12056 * aclocal.m4, config.in, configure: Regenerated.
12058 2012-04-14 Yao Qi <yao@codesourcery.com>
12060 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12061 Makefile and config.status at last.
12063 2012-04-13 Yao Qi <yao@codesourcery.com>
12065 * tracepoint.c: Include stdint.h unconditionally.
12067 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12069 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12070 on BFD_HAVE_SYS_PROCFS_TYPE.
12071 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12072 * configure: Regenerate.
12073 * config.in: Likewise.
12075 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12077 * Makefile.in (clean): Also remove x32.c x32-linux.c
12078 x32-avx.c x32-avx-linux.c.
12079 (x32.o): New target.
12081 (x32-linux.o): Likewise.
12082 (x32-linux.c): Likewise.
12083 (x32-avx.o): Likewise.
12084 (x32-avx.c): Likewise.
12085 (x32-avx-linux.o): Likewise.
12086 (x32-avx-linux.c): Likewise.
12088 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12089 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12090 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12091 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12092 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12093 i386/x32-avx-linux.xml.
12095 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12096 (init_registers_x32_avx_linux): Likwise.
12097 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12098 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12100 2012-04-13 Pedro Alves <palves@redhat.com>
12102 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12103 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12104 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12105 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12108 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12110 * linux-x86-low.c (compat_x32_clock_t): New.
12111 (compat_x32_siginfo_t): Likewise.
12112 (compat_x32_siginfo_from_siginfo): Likewise.
12113 (siginfo_from_compat_x32_siginfo): Likewise.
12114 (linux_is_elf64): Likewise.
12115 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12116 and siginfo_from_compat_x32_siginfo for x32.
12117 (x86_arch_setup): Set linux_is_elf64.
12119 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12122 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12124 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12125 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12126 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12127 compatible with process.
12129 2012-04-12 Yao Qi <yao@codesourcery.com>
12131 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12132 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12133 (install-only, install-info, clean): Handle sub dir gnulib.
12134 (all-lib, am--refresh): New targets.
12135 (memmem.o): Remove target.
12136 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12137 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12138 (AC_REPLACE_FUNCS): Remove memmem.
12139 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12140 (AC_OUTPUT): Generate Makefile in gnulib/.
12141 * aclocal.m4, config.in, configure: Regenerated.
12143 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12145 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12147 2012-04-05 Pedro Alves <palves@redhat.com>
12149 -Werror=strict-aliasing
12151 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12154 2012-04-04 Pedro Alves <palves@redhat.com>
12156 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12157 (sparc_store_gregset_from_stack, sparc_store_gregset)
12158 (sparc_breakpoint_at): Fix formatting.
12160 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12162 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12164 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12165 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12166 * config.in: Regenerate.
12167 * configure: Likewise.
12169 2012-03-29 Pedro Alves <palves@redhat.com>
12171 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12172 Correct ptrace arguments.
12174 2012-03-28 Pedro Alves <palves@redhat.com>
12176 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12177 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12178 (IA64_FR1_REGNUM): New defines.
12179 (ia64_fetch_register): New.
12180 (the_low_target): Install it.
12181 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12183 * linux-low.c (linux_fetch_registers): Try the
12184 the_low_target.fetch_register hook first.
12186 * linux-arm-low.c (the_low_target): Adjust.
12187 * linux-bfin-low.c (the_low_target): Adjust.
12188 * linux-cris-low.c (the_low_target): Adjust.
12189 * linux-crisv32-low.c (the_low_target): Adjust.
12190 * linux-m32r-low.c (the_low_target): Adjust.
12191 * linux-m68k-low.c (the_low_target): Adjust.
12192 * linux-mips-low.c (the_low_target): Adjust.
12193 * linux-ppc-low.c (the_low_target): Adjust.
12194 * linux-s390-low.c (the_low_target): Adjust.
12195 * linux-sh-low.c (the_low_target): Adjust.
12196 * linux-sparc-low.c (the_low_target): Adjust.
12197 * linux-tic6x-low.c (the_low_target): Adjust.
12198 * linux-x86-low.c (the_low_target): Adjust.
12199 * linux-xtensa-low.c (the_low_target): Adjust.
12201 2012-03-26 Pedro Alves <palves@redhat.com>
12203 * server.c (handle_qxfer_libraries): Don't bail early if
12204 the_target->qxfer_libraries_svr4 is not NULL.
12206 2012-03-26 Pedro Alves <palves@redhat.com>
12208 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12210 2012-03-23 Pedro Alves <palves@redhat.com>
12212 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12213 "library-list-svr4" element's start tag when the the DSO list is
12216 2012-03-23 Pedro Alves <palves@redhat.com>
12218 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12219 a variable whose type size is the same as the inferior's pointer
12222 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12224 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12226 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12227 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12228 * linux-low.h: Include <signal.h>.
12229 (struct siginfo): Remove forward declaration.
12230 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12233 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12235 * .gitignore: Ignore more files.
12237 2012-03-19 Pedro Alves <palves@redhat.com>
12238 Jan Kratochvil <jan.kratochvil@redhat.com>
12240 * server.c (cont_thread, general_thread): Add describing comments.
12241 (start_inferior): Clear `cont_thread'.
12242 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12245 2012-03-15 Yao Qi <yao@codesourcery.com>
12247 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12249 (cmd_qtdp): ... here.
12251 2012-03-15 Yao Qi <yao@codesourcery.com>
12253 * tracepoint.c (struct tracepoint_action_ops): New.
12254 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12255 (m_tracepoint_action_download): New.
12256 (r_tracepoint_action_download): New.
12257 (x_tracepoint_action_download): New.
12258 (l_tracepoint_action_download): New.
12259 (add_tracepoint_action): Install `action->ops' according type.
12260 (download_tracepoint_1): Move code `download' function pointer
12261 of various tracepoint_action_ops.
12263 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12265 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12266 linux_ptrace_attach_warnings.
12268 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12270 * Makefile.in (linux-ptrace.o): New.
12271 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12272 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12273 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12274 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12275 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12277 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12279 2012-03-08 Yao Qi <yao@codesourcery.com>
12280 Pedro Alves <palves@redhat.com>
12282 Fix PR server/13392.
12283 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12284 offset of JMP insn.
12285 * tracepoint.c (remove_tracepoint): New.
12286 (cmd_qtdp): Call remove_tracepoint when failed to install.
12288 2012-03-07 Pedro Alves <palves@redhat.com>
12290 * linux-low.c (get_detach_signal): New.
12291 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12292 Pass on pending signals to PTRACE_DETACH. Check the result of the
12294 * server.c (program_signals, program_signals_p): New.
12295 (handle_general_set): Handle QProgramSignals.
12296 * server.h (program_signals, program_signals_p): Declare.
12298 2012-03-05 Pedro Alves <palves@redhat.com>
12299 Jan Kratochvil <jan.kratochvil@redhat.com>
12301 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12304 2012-03-03 Yao Qi <yao@codesourcery.com>
12306 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12307 agent_look_up_symbols.
12309 2012-03-03 Yao Qi <yao@codesourcery.com>
12311 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12312 (linux-x86-low.o): Likewise.
12313 * server.h: Remove in_process_agent_loaded.
12314 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12318 2012-03-03 Yao Qi <yao@codesourcery.com>
12320 * tracepoint.c (gdb_agent_capability): New global.
12321 (in_process_agent_loaded_ust): Renamed to
12322 `in_process_agent_supports_ust'.
12324 (in_process_agent_supports_ust): Call agent_capability_check.
12325 (clear_installed_tracepoints): Assert that agent supports
12328 2012-03-03 Yao Qi <yao@codesourcery.com>
12330 * linux-low.c (linux_supports_agent): New.
12331 (linux_target_ops): Initialize field `supports_agent' with
12332 linux_supports_agent.
12333 * target.h (struct target_ops) <supports_agent>: New.
12334 (target_supports_agent): New macro.
12335 * server.c (handle_general_set): Handle packet 'QAgent'.
12336 (handle_query): Send `QAgent+'.
12337 * Makefile.in (server.o): Depends on agent.h.
12339 2012-03-03 Yao Qi <yao@codesourcery.com>
12341 * Makefile.in (OBS): Add agent.o.
12342 Add new rule for agent.o.
12343 Track dependence of tracepoint.c on agent.h.
12344 * tracepoint.c (run_inferior_command_1):
12345 (run_inferior_command): Call agent_run_command.
12346 (gdb_ust_connect_sync_socket): Deleted. Move it to
12348 (resume_thread, stop_thread): Likewise.
12349 (gdb_ust_socket_init): Renamed to ...
12350 (gdb_agent_socket_init): ... New.
12351 (gdb_ust_thread): Renamed to ...
12352 (gdb_agent_helper_thread): ... New.
12353 (gdb_ust_init): Move some code to ...
12354 (gdb_agent_init): ... here. New.
12355 [HAVE_UST]: Call gdb_ust_init.
12356 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12357 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12358 * config.in, configure: Regenerated.
12360 2012-03-02 Pedro Alves <palves@redhat.com>
12362 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12363 * linux-low.c (struct simple_pid_list): New.
12364 (stopped_pids): New a struct simple_pid_list pointer.
12365 (add_to_pid_list, pull_pid_from_list): New.
12366 (handle_extended_wait): Don't assume the first signal new children
12367 report is SIGSTOP. Adjust call to pull_pid_from_list.
12368 (linux_wait_for_lwp): Adjust.
12370 2012-03-02 Yao Qi <yao@codesourcery.com>
12372 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12375 2012-03-02 Yao Qi <yao@codesourcery.com>
12377 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12378 `stop_pc' and `tpoint'. Update caller.
12380 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12382 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12383 * linux-low.c (use_linux_regsets): New macro.
12384 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12385 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12386 (linux_register_in_regsets): New function.
12387 (usr_fetch_inferior_registers): Skip registers covered by
12389 (usr_store_inferior_registers): Likewise.
12390 (usr_fetch_inferior_registers): New macro.
12391 (usr_store_inferior_registers): Likewise.
12392 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12393 (linux_store_registers): Likewise.
12394 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12396 (init_registers_mips64_dsp_linux): Likewise.
12397 (init_registers_mips_linux): New macro.
12398 (init_registers_mips_dsp_linux): Likewise.
12399 (mips_dsp_num_regs): Likewise.
12400 (DSP_BASE, DSP_CONTROL): New fallback macros.
12401 (mips_base_regs): New macro.
12402 (mips_regmap): Use it. Fix the size.
12403 (mips_dsp_regmap): New variable.
12404 (mips_dsp_regset_bitmap): Likewise.
12405 (mips_arch_setup): New function.
12406 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12408 (mips_cannot_store_register): Likewise.
12409 (the_low_target): Update .arch_setup, .num_regs and .regmap
12410 initializers. Add .regset_bitmap initializer.
12411 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12413 * linux-bfin-low.c (the_low_target): Likewise.
12414 * linux-cris-low.c (the_low_target): Likewise.
12415 * linux-crisv32-low.c (the_low_target): Likewise.
12416 * linux-ia64-low.c (the_low_target): Likewise.
12417 * linux-m32r-low.c (the_low_target): Likewise.
12418 * linux-m68k-low.c (the_low_target): Likewise.
12419 * linux-ppc-low.c (the_low_target): Likewise.
12420 * linux-s390-low.c (the_low_target): Likewise.
12421 * linux-sh-low.c (the_low_target): Likewise.
12422 * linux-sparc-low.c (the_low_target): Likewise.
12423 * linux-tic6x-low.c (the_low_target): Likewise.
12424 * linux-x86-low.c (the_low_target): Likewise.
12425 * linux-xtensa-low.c (the_low_target): Likewise.
12426 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12427 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12428 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12430 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12431 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12433 2012-02-29 Yao Qi <yao@codesourcery.com>
12434 Pedro Alves <palves@redhat.com>
12436 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12437 `step_over_finished' is true.
12439 2012-02-27 Pedro Alves <palves@redhat.com>
12441 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12442 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12444 2012-02-27 Pedro Alves <palves@redhat.com>
12447 * linux-low.c (pid_is_stopped): New.
12448 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12450 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12452 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12455 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12457 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12459 2012-02-24 Luis Machado <lgustavo@codesourcery>
12461 * server.c (handle_query): Advertise support for target-side
12462 breakpoint condition evaluation.
12463 (process_point_options): New function.
12464 (process_serial_event): When inserting a breakpoint, check for
12465 a target-side condition that should be evaluated.
12467 * mem-break.c: Include regcache.h and ax.h.
12468 (point_cond_list_t): New data structure.
12469 (breakpoint) <cond_list>: New field.
12470 (find_gdb_breakpoint_at): Make non-static.
12471 (delete_gdb_breakpoint_at): Clear any target-side
12473 (clear_gdb_breakpoint_conditions): New function.
12474 (add_condition_to_breakpoint): Likewise.
12475 (add_breakpoint_condition): Likewise.
12476 (gdb_condition_true_at_breakpoint): Likewise.
12477 (gdb_breakpoint_here): Return result directly instead
12478 of going through a local variable.
12480 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12481 (clear_gdb_breakpoint_conditions): Likewise.
12482 (add_breakpoint_condition): Likewise.
12483 (gdb_condition_true_at_breakpoint): Likewise.
12485 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12486 (need_step_over_p): Take target-side breakpoint condition into
12489 2012-02-24 Luis Machado <lgustavo@codesourcery>
12491 * server.h: Include tracepoint.h.
12492 (agent_mem_read, agent_get_trace_state_variable_value,
12493 agent_set_trace_state_variable_value,
12494 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12495 get_set_tsv_func_addr): New prototypes.
12497 * ax.h: New include file.
12498 * ax.c: New source file.
12500 * tracepoint.c: Include ax.h.
12501 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12502 agent_expr, eval_result_type): Move to ax.h.
12503 (parse_agent_expr): Rename to ...
12504 (gdb_parse_agent_expr): ... this, make it non-static and move
12506 (unparse_agent_expr) Rename to ...
12507 (gdb_unparse_agent_expr): ... this, make it non-static and move
12509 (eval_agent_expr): Rename to ...
12510 (eval_tracepoint_agent_expr): ... this.
12511 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12512 forward declarations.
12513 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12514 (agent_get_trace_state_variable_value): New function.
12515 (agent_set_trace_state_variable_value): New function.
12516 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12517 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12518 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12519 (condition_true_at_tracepoint): Likewise.
12520 (parse_agent_expr): Rename to ...
12521 (gdb_parse_agent_expr): ... this and move to ax.c.
12522 (unparse_agent_expr): Rename to ...
12523 (gdb_unparse_agent_expr): ... this and move to ax.c.
12524 (gdb_agent_op_name): Move to ax.c.
12525 (eval_agent_expr): Rename to ...
12526 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12528 (eval_tracepoint_agent_expr): New function.
12529 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12531 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12533 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12534 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12535 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12536 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12537 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12538 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12539 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12540 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12541 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12542 (compile_bytecodes): Remove forward declaration.
12543 (is_goto_target): Move to ax.c.
12544 (compile_bytecodes): Move to ax.c and call
12545 agent_get_trace_state_variable_value (...) and
12546 agent_set_trace_state_variable_value (...).
12548 * Makefile.in: Update ax.c and IPA dependencies.
12550 2012-02-24 Pedro Alves <palves@redhat.com>
12552 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12553 (cmd_bigqtbuffer_circular): ... this. Only handle
12554 'QTBuffer:circular:'.
12555 (handle_tracepoint_general_set): Adjust.
12557 2012-02-16 Yao Qi <yao@codesourcery.com>
12559 * inferiors.c: Move code to ...
12560 * dll.c: .... here. New.
12561 * server.h: Declare clear_dlls.
12562 * Makefile.in (SFILES): Add dll.c.
12566 2012-02-11 Yao Qi <yao@codesourcery.com>
12568 * server.c: (handle_monitor_command): Add a new parameter
12570 (handle_query): Update caller.
12572 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12574 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12575 * configure, config.in: Regenerate.
12576 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12579 2012-02-02 Pedro Alves <palves@redhat.com>
12581 Try SIGKILL first, then PTRACE_KILL.
12582 * linux-low.c (linux_kill_one_lwp): New.
12583 (linux_kill_one_lwp): Rename to ...
12584 (kill_one_lwp_callback): ... this. Use the new
12585 linux_kill_one_lwp.
12587 2012-02-02 Pedro Alves <palves@redhat.com>
12589 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12592 2012-01-27 Pedro Alves <palves@redhat.com>
12594 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12595 (elf_64_file_p): Make static.
12596 (linux_pid_exe_is_elf_64_file): New.
12597 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12598 Delete declarations.
12599 (linux_pid_exe_is_elf_64_file): Declare.
12600 * linux-x86-low.c (x86_arch_setup): Use
12601 linux_pid_exe_is_elf_64_file.
12603 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12605 * linux-low.c (linux_wait_for_event_1): Rename to ...
12606 (linux_wait_for_event): ... here and merge it with former
12607 linux_wait_for_event - new variable wait_ptid, use it.
12608 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12610 2012-01-23 Pedro Alves <palves@redhat.com>
12612 * server.c (main): Avoid yet another case of infinite loop while
12613 detaching/killing after a longjmp.
12615 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12618 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12620 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12622 * hostio.c (handle_readlink): New function.
12623 (handle_vFile): Call it to handle "vFile:readlink" packets.
12625 2012-01-20 Pedro Alves <palves@redhat.com>
12626 Ulrich Weigand <ulrich.weigand@linaro.org>
12628 * server.c (handle_v_requests): Only support vAttach and vRun to
12629 start multiple processes when in extended protocol mode.
12631 2012-01-17 Pedro Alves <palves@redhat.com>
12633 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12634 memalign plus mprotect to allocate the scratch buffer.
12636 2012-01-13 Pedro Alves <palves@redhat.com>
12638 * server.c (attach_inferior): Clear `cont_thread'.
12640 2012-01-13 Pedro Alves <palves@redhat.com>
12642 * server.c (main): Avoid infinite loop while detaching/killing
12645 2012-01-09 Doug Evans <dje@google.com>
12647 * server.c (start_inferior): Set last_ptid in --wrapper case.
12649 2012-01-06 Yao Qi <yao@codesourcery.com>
12651 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12653 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12655 2012-01-04 Yao Qi <yao@codesourcery.com>
12657 * tracepoint.c (cmd_qtdp): Print debug message
12658 for static tracepoint.
12660 2012-01-04 Yao Qi <yao@codesourcery.com>
12662 * tracepoint.c (trace_vdebug): Differentiate debug message
12663 between gdbserver and IPA.
12665 2012-01-03 Yao Qi <yao@codesourcery.com>
12667 * tracepoint.c (tracepoint_was_hit): Don't collect for
12670 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12672 * terminal.h: Reformat copyright header.
12674 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12676 * server.c (gdbserver_version): Update copyright year.
12677 * gdbreplay.c (gdbreplay_version): Likewise.
12679 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12681 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12684 2011-12-18 Hui Zhu <teawater@gmail.com>
12685 * linux-low.c (linux_create_inferior): Save return value to ret.
12687 2011-12-18 Hui Zhu <teawater@gmail.com>
12689 * linux-low.c (linux_create_inferior): Save return value to ret.
12691 2011-12-16 Doug Evans <dje@google.com>
12693 * linux-low.c (linux_create_inferior): If stdio connection,
12694 redirect stdin from /dev/null, stdout to stderr.
12695 * remote-utils.c (remote_is_stdio): New static global.
12696 (remote_connection_is_stdio): New function.
12697 (remote_prepare): Handle stdio connection.
12698 (remote_open): Ditto.
12699 (remote_close): Don't close stdin for stdio connections.
12700 (read_prim,write_prim): New functions. Replace all calls to
12701 read/write to these.
12702 * server.c (main): Watch for "-" argument. Move call to
12703 remote_prepare before start_inferior.
12704 * server.h (STDIO_CONNECTION_NAME): New macro.
12705 (remote_connection_is_stdio): Declare.
12707 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12708 in debugging output.
12710 2011-12-15 Yao Qi <yao@codesourcery.com>
12712 * tracepoint.c: Include sys/syscall.h.
12713 (gdb_ust_thread): Remove preprocessor conditional.
12715 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12717 * linux-low.c (linux_detach_one_lwp): Call
12718 the_low_target.prepare_to_resume before detaching.
12720 2011-12-14 Yao Qi <yao@codesourcery.com>
12722 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12725 2011-12-14 Yao Qi <yao@codesourcery.com>
12727 * i386-low.c (i386_low_stopped_data_address): Initialize local
12728 variable `control'.
12730 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12734 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12735 DR_CONTROL unless necessary. Extend comments.
12736 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12737 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12739 2011-12-13 Yao Qi <yao@codesourcery.com>
12741 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12743 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12745 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12747 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12748 Print new debug message for such case.
12750 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12752 Fix overlapping memcpy.
12753 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12754 the read_inferior_memory transfer.
12755 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12756 write_inferior_memory transfer.
12757 (set_fast_tracepoint_jump): New variable buf. Use it for the
12758 read_inferior_memory and write_inferior_memory transfers.
12759 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12760 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12761 Use it for the write_inferior_memory transfer.
12762 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12765 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12767 * linux-low.c (fetch_register, store_register): Make code
12768 consistent, fix formatting.
12770 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12772 * linux-low.c (usr_store_inferior_registers): Factor out code
12773 to handle individual registers into...
12774 (store_register): ... this new function.
12776 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12778 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12779 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12780 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12781 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12782 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12783 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12784 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12785 (srv_xmlfiles): Add new XML files.
12787 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12789 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12790 (init_registers_s390_linux32v1): Add prototype.
12791 (init_registers_s390_linux32v2): Likewise.
12792 (init_registers_s390_linux64v1): Likewise.
12793 (init_registers_s390_linux64v2): Likewise.
12794 (init_registers_s390x_linux64v1): Likewise.
12795 (init_registers_s390x_linux64v2): Likewise.
12796 (s390_num_regs): Increment to 52.
12797 (s390_regmap): Add orig_r2 register.
12798 (s390_num_regs_3264): Increment to 68.
12799 (s390_regmap_3264): Add orig_r2 register.
12800 (s390_collect_ptrace_register): Handle orig_r2 register.
12801 (s390_supply_ptrace_register): Likewise.
12802 (s390_fill_last_break): New function.
12803 (s390_store_last_break): Likewise.
12804 (s390_fill_system_call): New function.
12805 (s390_store_system_call): Likewise.
12806 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12808 (s390_check_regset): New function.
12809 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12810 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12811 Update target_regsets for available register sets.
12813 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12814 Jan Kratochvil <jan.kratochvil@redhat.com>
12816 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12817 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12819 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12820 * linux-low.h (struct process_info_private): New member r_debug.
12821 * server.c (handle_qxfer_libraries): Call
12822 the_target->qxfer_libraries_svr4.
12823 (handle_qxfer_libraries_svr4): New function.
12824 (qxfer_packets): New entry "libraries-svr4".
12825 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12826 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12827 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12828 PACKET_qXfer_libraries_svr4.
12830 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12832 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12833 PSW address/mask between 8-byte and 16-byte formats.
12834 (s390_supply_ptrace_register): Likewise.
12835 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12836 basic addressing mode bit.
12838 2011-11-24 Stan Shebs <stan@codesourcery.com>
12840 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12842 2011-11-17 Stan Shebs <stan@codesourcery.com>
12844 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12845 (tracing_start_time): New global.
12846 (tracing_stop_time): New global.
12847 (tracing_user_name): New global.
12848 (tracing_notes): New global.
12849 (tracing_stop_note): New global.
12850 (cmd_qtstart): Set traceframe_usage, start_time.
12851 (stop_tracing): Set stop_time.
12852 (cmd_qtstatus): Report additional status.
12853 (cmd_qtp): New function.
12854 (handle_tracepoint_query): Call it.
12855 (cmd_qtnotes): New function.
12856 (handle_tracepoint_general_set): Call it.
12857 (get_timestamp): Rename from tsv_get_timestamp.
12859 2011-11-14 Stan Shebs <stan@codesourcery.com>
12860 Kwok Cheung Yeung <kcy@codesourcery.com>
12862 * linux-x86-low.c (small_jump_insn): New.
12863 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12864 trampoline and error message, build a trampoline and issue a small
12865 jump instruction to it.
12866 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12867 trampoline and error message.
12868 (x86_get_min_fast_tracepoint_insn_len): New.
12869 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12870 * linux-low.h (struct linux_target_ops): Add arguments to
12871 install_fast_tracepoint_jump_pad operation, add new operation.
12872 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12874 (linux_get_min_fast_tracepoint_insn_len): New function.
12875 (linux_target_op): Add new operation.
12876 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12877 (gdb_trampoline_buffer_end): Ditto.
12878 (gdb_trampoline_buffer_error): Ditto.
12879 (struct ipa_sym_addresses): Add fields for new IPA variables.
12880 (symbol_list): Add entries for new IPA variables.
12881 (struct tracepoint): Add fields to hold the address range of the
12882 trampoline used by the tracepoint.
12883 (trampoline_buffer_head): New static variable.
12884 (trampoline_buffer_tail): Ditto.
12885 (claim_trampoline_space): New function.
12886 (have_fast_tracepoint_trampoline_buffer): New function.
12887 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12889 (install_fast_tracepoint): Ditto, also add error buffer argument.
12890 (cmd_qtminftpilen): New function.
12891 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12892 (fast_tracepoint_from_trampoline_address): New function.
12893 (fast_tracepoint_collecting): Handle trampoline as part of jump
12895 (set_trampoline_buffer_space): New function.
12896 (initialize_tracepoint): Initialize new IPA variables.
12897 * target.h (struct target_ops): Add arguments to
12898 install_fast_tracepoint_jump_pad operation, add new
12899 get_min_fast_tracepoint_insn_len operation.
12900 (target_get_min_fast_tracepoint_insn_len): New.
12901 (install_fast_tracepoint_jump_pad): Add arguments.
12902 * server.h (IPA_BUFSIZ): Define.
12903 * linux-i386-ipa.c: Include extra header files.
12904 (initialize_fast_tracepoint_trampoline_buffer): New function.
12905 (initialize_low_tracepoint): Call it.
12906 * server.h (set_trampoline_buffer_space): Declare.
12907 (claim_trampoline_space): Ditto.
12908 (have_fast_tracepoint_trampoline_buffer): Ditto.
12910 2011-11-14 Yao Qi <yao@codesourcery.com>
12912 * server.c (handle_query): Handle InstallInTrace for qSupported.
12913 * tracepoint.c (add_tracepoint): Sort list.
12914 (install_tracepoint, download_tracepoint): New.
12915 (cmd_qtdp): Call them to install and download tracepoints.
12916 (sort_tracepoints): Removed.
12917 (cmd_qtstart): Update.
12919 2011-11-14 Yao Qi <yao@codesourcery.com>
12921 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12922 * mem-break.h: Declare.
12923 * tracepoint.c (cmd_qtstart): Move some code to ...
12924 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12926 (download_tracepoints): Move some code to ...
12927 (download_tracepoint_1): ... here. New.
12929 2011-11-08 Yao Qi <yao@codesourcery.com>
12931 * remote-utils.c (relocate_instruction): A comment fix.
12933 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12935 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12936 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12937 dr_status_mirror and dr_control_mirror from debug_reg_state.
12938 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12939 (i386_initial_stuff): Remove use of deleted globals.
12940 (i386_get_thread_context, i386_set_thread_context,
12941 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12942 from debug_reg_state.
12944 2011-11-05 Yao Qi <yao@codesourcery.com>
12946 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12947 address as TPOINT's.
12949 2011-11-02 Stan Shebs <stan@codesourcery.com>
12951 * tracepoint.c (agent_mem_read_string): New function.
12952 (eval_agent_expr): Call it for tracenz.
12953 * server.c (handle_query): Report support for tracenz.
12955 2011-11-02 Yao Qi <yao@codesourcery.com>
12957 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12959 2011-11-02 Yao Qi <yao@codesourcery.com>
12961 * target.h: Fix a typo in comment.
12963 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12965 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12966 clobber the breakpoints' shadows with fast tracepoint jumps.
12967 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12968 * target.c (write_inferior_memory): Also pass MYADDR down to
12971 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12973 * configure.ac: Check support for personality routine.
12974 * configure: Regenerate.
12975 * config.in: Likewise.
12976 * linux-low.c: Include <sys/personality.h>.
12977 Define ADDR_NO_RANDOMIZE if necessary.
12978 (linux_create_inferior): Disable address space randomization when
12979 forking inferior, if requested.
12980 (linux_supports_disable_randomization): New function.
12981 (linux_target_ops): Install it.
12982 * server.h (disable_randomization): Declare.
12983 * server.c (disable_randomization): New global variable.
12984 (handle_general_set): Handle QDisableRandomization.
12985 (handle_query): Likewise for qSupported.
12986 (main): Support --disable-randomization and --no-disable-randomization
12987 command line arguments.
12988 * target.h (struct target_ops): Add supports_disable_randomization.
12989 (target_supports_disable_randomization): New macro.
12991 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12993 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12995 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12996 [!PT_GETDSBT] (target_loadmap): New definition.
12997 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12998 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12999 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13000 and PT_GETDSBT to LINUX_LOADMAP.
13001 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13002 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13004 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13006 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13007 (arm_linux_hwbp_cap): New static variable.
13008 (arm_linux_get_hwbp_cap): Replace by ...
13009 (arm_linux_init_hwbp_cap): ... this new function.
13010 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13011 (arm_linux_get_hw_watchpoint_count): Likewise.
13012 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13013 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13014 (arm_prepare_to_resume): Use perror_with_name instead of error.
13016 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13018 * linux-arm-low.c: Include <signal.h>.
13019 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13020 (struct arm_linux_hwbp_cap): New data type.
13021 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13022 (struct arm_linux_hw_breakpoint): New data type.
13023 (MAX_BPTS, MAX_WPTS): Define.
13024 (struct arch_process_info, struct arch_lwp_info): New data types.
13025 (arm_linux_get_hwbp_cap): New function.
13026 (arm_linux_get_hw_breakpoint_count): Likewise.
13027 (arm_linux_get_hw_watchpoint_count): Likewise.
13028 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13029 (arm_hwbp_control_initialize): Likewise.
13030 (arm_hwbp_control_is_enabled): Likewise.
13031 (arm_hwbp_control_is_initialized): Likewise.
13032 (arm_hwbp_control_disable): Likewise.
13033 (arm_linux_hw_breakpoint_equal): Likewise.
13034 (arm_linux_hw_point_initialize): Likewise.
13035 (struct update_registers_data): New data structure.
13036 (update_registers_callback: New function.
13037 (arm_insert_point): Likewise.
13038 (arm_remove_point): Likewise.
13039 (arm_stopped_by_watchpoint): Likewise.
13040 (arm_stopped_data_address): Likewise.
13041 (arm_new_process): Likewise.
13042 (arm_new_thread): Likewise.
13043 (arm_prepare_to_resume): Likewise.
13044 (the_low_target): Register arm_insert_point, arm_remove_point,
13045 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13046 arm_new_thread, and arm_prepare_to_resume.
13048 2011-09-15 Stan Shebs <stan@codesourcery.com>
13050 * server.h (struct emit_ops): Add compare-goto fields.
13051 * tracepoint.c (gdb_agent_op_sizes): New table.
13052 (emit_eq_goto): New function.
13053 (emit_ne_goto): New function.
13054 (emit_lt_goto): New function.
13055 (emit_le_goto): New function.
13056 (emit_gt_goto): New function.
13057 (emit_ge_goto): New function.
13058 (is_goto_target): New function.
13059 (compile_bytecodes): Recognize special cases of compare-goto
13060 combinations and call specialized emitters for them.
13061 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13062 (amd64_emit_ne_goto): New function.
13063 (amd64_emit_lt_goto): New function.
13064 (amd64_emit_le_goto): New function.
13065 (amd64_emit_gt_goto): New function.
13066 (amd64_emit_ge_goto): New function.
13067 (amd64_emit_ops): Add the new functions.
13068 (i386_emit_eq_goto): New function.
13069 (i386_emit_ne_goto): New function.
13070 (i386_emit_lt_goto): New function.
13071 (i386_emit_le_goto): New function.
13072 (i386_emit_gt_goto): New function.
13073 (i386_emit_ge_goto): New function.
13074 (i386_emit_ops): Add the new functions.
13076 2011-09-08 Stan Shebs <stan@codesourcery.com>
13078 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13079 (i386_emit_epilogue): Restore %ebx.
13081 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13083 * server.c (step_thread): Remove definition.
13084 (process_serial_event): Don't handle Hs.
13085 * server.h (step_thread): Remove declaration.
13086 * target.c (set_desired_inferior): Remove use of step_thread.
13088 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13090 * linux-low.c: Include linux-procfs.h.
13091 (linux_attach_lwp_1): Update comments.
13092 (linux_attach): Scan for existing threads when attaching to a
13093 process that is the tgid.
13094 * Makefile.in: Update dependencies.
13096 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13098 * configure.srv: Add linux-procfs.o dependencies.
13100 2011-08-14 Yao Qi <yao@codesourcery.com>
13102 * target.h (struct target_ops): Fix indent.
13103 * win32-low.c (win32_target_ops): Fix comment.
13105 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13106 Yao Qi <yao@codesourcery.com>
13108 * Makefile.in (clean): Remove tic6x-*.c files.
13109 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13110 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13111 (tic6x-c64xp-linux.c): Likewise.
13112 * configure.srv: Add support for tic6x-*-uclinux.
13113 * linux-tic6x-low.c: New.
13114 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13116 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13117 Yao Qi <yao@codesourcery.com>
13119 * target.h (struct target_ops): Add read_loadmap.
13120 * linux-low.c (struct target_loadseg): New type.
13121 (struct target_loadmap): New type.
13122 (linux_read_loadmap): New function.
13123 (linux_target_ops): Add linux_read_loadmap.
13124 * server.c (handle_query): Support qXfer:fdpic:read packet.
13125 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13128 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13130 * win32-low.c: Include <stdint.h>.
13132 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13134 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13135 to the inferior here.
13136 (i386_remove_aligned_watchpoint): Ditto.
13137 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13138 fit part of the watchpoint in the debug registers.
13139 (i386_update_inferior_debug_regs): New.
13140 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13141 registers, and only update the inferior on success.
13142 (i386_low_remove_watchpoint): Ditto.
13144 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13146 * linux-low.c (compare_ints, unique, list_threads, show_process,
13147 linux_core_of_thread): Delete.
13148 (linux_target_ops): Change linux_core_of_thread to
13149 linux_common_core_of_thread.
13150 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13151 * utils.c (malloc_failure): Change type of argument.
13152 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13153 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13154 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13155 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13156 (IPA_OBJS): Add common-utils-ipa.o.
13157 (ptid_h, linux_osdata_h): New macros.
13158 (server_h): Add common/common-utils.h, common/xml-utils.h,
13159 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13161 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13162 ptid.o, buffer.o): New rules.
13163 (linux-low.o): Add common/linux-osdata.h as a dependency.
13164 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13165 * configure.ac: Add AC_HEADER_DIRENT check.
13166 * config.in: Regenerate.
13167 * configure: Regenerate.
13168 * remote-utils.c (xml_escape_text): Delete.
13169 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13170 buffer_xml_printf): Move to common/buffer.c.
13171 * server.c (main): Remove call to initialize_inferiors.
13172 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13173 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13174 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13175 internal_error, gdb_assert, gdb_assert_fail): Delete.
13176 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13177 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13179 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13180 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13181 initialize_inferiors): Delete.
13183 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13185 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13188 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13190 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13192 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13194 2011-05-26 Yao Qi <yao@codesourcery.com>
13196 * Makefile.in (thread-db.o): Track dependence to
13197 common/gdb_thread_db.h.
13198 * thread-db.c: include gdb_thread_db.h from right place.
13200 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13202 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13203 __FILE__ and __LINE__ to internal_error.
13205 2011-05-13 Doug Evans <dje@google.com>
13207 * thread-db.c (try_thread_db_load_from_sdir): New function.
13208 (try_thread_db_load_from_dir): New function.
13209 (thread_db_load_search): Handle $sdir, ignore $pdir.
13210 Remove trying of system directories if search of
13211 libthread-db-search-path fails, that is now done via $sdir.
13213 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13215 * server.c (handle_query): Add EnableDisableTracepoints to the list
13216 of supported features.
13217 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13219 (cmd_qtenable_disable): New.
13220 (cmd_qtstart): Install tracepoints even if disabled.
13221 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13222 receiving a QTEnable or QTDisable packet.
13223 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13224 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13226 (gdb_probe): Skip data collection if static tracepoint is disabled.
13228 2011-05-10 Doug Evans <dje@google.com>
13230 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13232 2011-05-04 Doug Evans <dje@google.com>
13234 * linux-low.c (linux_join): Skip process lookup.
13235 * spu-low.c (spu_join): Ditto.
13236 * server.c (join_inferiors_callback): Delete.
13237 (process_serial_event): For 'D' packet (detach) call join_inferior
13240 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13242 * README: Don't mention xscale*-*-linux*.
13243 * configure.srv (xscale*-*-linux*): Don't handle target.
13245 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13247 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13249 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13250 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13251 (i386_emit_void_call_2): Likewise.
13253 2011-04-26 Yao Qi <yao@codesourcery.com>
13255 * linux-low.c: Move common macros to linux-ptrace.h.
13256 Include linux-ptrace.h.
13257 * Makefile.in (linux_ptrace_h): New.
13258 (linux-low.o): Depends on linux-ptrace.h.
13260 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13262 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13263 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13264 (remote_prepare): New function with most of the TCP code from ...
13265 (remote_open): ... here. Detect PORT here unconditionally. Move also
13266 setting transport_is_reliable.
13267 * server.c (run_once): New variable.
13268 (gdbserver_usage): Document it.
13269 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13270 the first run if RUN_ONCE.
13271 * server.h (run_once, remote_prepare): New declarations.
13273 2011-04-19 Tom Tromey <tromey@redhat.com>
13275 * win32-low.c (handle_load_dll): Remove duplicate "the".
13277 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13279 Remove support for old Cygwin 1.5 versions.
13280 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13281 function to avoid warning.
13282 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13285 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13287 * gdbserver/server.h (Macro _): Define it if not available.
13289 2011-03-14 Michael Snyder <msnyder@vmware.com>
13291 * hostio.c (handle_close): Remove unnecessary null test.
13293 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13295 * Makefile.in (maintainer-clean realclean distclean): Remove
13296 "make ... subdir_do" command.
13298 2011-03-10 Michael Snyder <msnyder@vmware.com>
13300 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13302 * server.c (handle_v_run): Free alloced buffer on early return.
13304 2011-03-09 Yao Qi <yao@codesourcery.com>
13307 2011-03-04 Yao Qi <yao@codesourcery.com>
13309 * Makefile.in: Remove GNU make feature --directory.
13311 2011-03-05 Yao Qi <yao@codesourcery.com>
13313 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13314 (subdir_do): New make target. Copied from gdb/Makefile.
13315 (maintainer-clean, realclean, distclean, clean): Call corresponding
13316 make targets in common/Makefile.
13318 2011-02-11 Yao Qi <yao@codesourcery.com>
13320 * configure.ac: Call AC_PROG_RANLIB.
13321 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13322 * configure: Regenerate.
13324 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13326 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13328 2011-03-06 Yao Qi <yao@codesourcery.com>
13330 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13332 2011-03-05 Yao Qi <yao@codesourcery.com>
13334 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13335 (subdir_do): New make target. Copied from gdb/Makefile.
13336 (maintainer-clean, realclean, distclean, clean): Call corresponding
13337 make targets in common/Makefile.
13339 2011-03-04 Yao Qi <yao@codesourcery.com>
13341 * Makefile.in: Remove GNU make feature --directory.
13343 2011-03-04 Michael Snyder <msnyder@vmware.com>
13345 * server.c (queue_stop_reply): Call xmalloc not malloc.
13347 2011-03-02 Michael Snyder <msnyder@vmware.com>
13349 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13351 2011-02-28 Michael Snyder <msnyder@vmware.com>
13353 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13354 (cmd_qtframe): Ditto.
13355 (cmd_qtbuffer): Ditto.
13356 (cmd_bigqtbuffer): Ditto.
13358 * utils.c (decimal2str): Initialize 'width' to nine, then
13359 don't mess with it.
13361 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13363 * hostio.c (require_data): Free *data, not data.
13365 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13367 * hostio.c (require_data): Use free, not xfree.
13369 2011-02-27 Michael Snyder <msnyder@vmware.com>
13371 * server.c (handle_query): Discard unused value.
13373 * hostio.c (require_data): Free malloc memory before returning
13376 2011-02-26 Michael Snyder <msnyder@vmware.com>
13378 * linux-low.c (list_threads): Call closedir for dirent.
13380 2011-02-27 Michael Snyder <msnyder@vmware.com>
13382 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13383 a case statement falls through.
13385 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13387 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13390 2011-02-26 Michael Snyder <msnyder@vmware.com>
13392 * utils.c (decimal2str): Eliminate dead code and dead param.
13393 (pulongest): Drop dead param from call to decimal2str.
13396 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13398 Revert the following patch (not approved yet):
13399 2011-02-21 Hui Zhu <teawater@gmail.com>
13400 * tracepoint.c (tp_printf): New function.
13401 (eval_agent_expr): Handle gdb_agent_op_printf.
13403 2011-02-21 Hui Zhu <teawater@gmail.com>
13405 * tracepoint.c (tp_printf): New function.
13406 (eval_agent_expr): Handle gdb_agent_op_printf.
13408 2011-02-18 Tom Tromey <tromey@redhat.com>
13410 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13411 (tracepoint.o): Likewise.
13412 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13413 (gdb_agent_op_names): Likewise.
13415 2011-02-18 Tom Tromey <tromey@redhat.com>
13417 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13418 gdb_agent_op_rot>: New constants.
13419 (gdb_agent_op_names): Add pick and roll.
13420 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13423 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13425 * aclocal.m4: Regenerated with aclocal-1.11.1.
13427 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13429 * server.c (handle_qxfer_traceframe_info): New.
13430 (qxfer_packets): Register "traceframe-info".
13431 (handle_query): Report support for qXfer:traceframe-info:read+.
13432 * tracepoint.c (match_blocktype): New.
13433 (traceframe_find_block_type): Rename to ...
13434 (traceframe_walk_blocks): ... this. Add callback filter argument,
13436 (traceframe_find_block_type): New, reimplemented on top of
13437 traceframe_walk_blocks.
13438 (build_traceframe_info_xml): New.
13439 (traceframe_read_info): New.
13440 * server.h (traceframe_read_info): Declare.
13442 2011-02-11 Yao Qi <yao@codesourcery.com>
13444 * configure.ac: Call AC_PROG_RANLIB.
13445 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13446 * configure: Regenerate.
13448 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13450 * server.c (gdb_read_memory): Change return semantics to allow
13452 (handle_search_memory_1): Adjust.
13453 (process_serial_event) <'m' packet>: Handle partial transfers.
13454 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13456 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13458 * regcache.c (init_register_cache): Initialize
13459 regcache->register_status.
13460 (free_register_cache): Release regcache->register_status.
13461 (regcache_cpy): Copy register_status.
13462 (registers_to_string): Print 'x's for unavailable registers.
13463 (supply_register): Mark the register's status valid or
13464 unavailable, depending on whether a buffer was passed in or not.
13465 (supply_register_zeroed): New.
13466 (supply_regblock): Mark the registers' status valid or
13467 unavailable, depending on whether a buffer was passed in or not.
13468 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13469 (struct regcache): New `register_status' field.
13470 (supply_register_zeroed): Declare.
13471 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13472 supply_register_zeroed, rather than passing a NULL buffer to
13474 * tracepoint.c (fetch_traceframe_registers): Update comment.
13476 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13478 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13481 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13483 * server.h (decode_xfer_write): Change prototype.
13484 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13485 and don't extract the annex here.
13486 * server.c (decode_xfer_read): Remove `annex' parameter,
13487 and don't extract the annex here.
13488 (decode_xfer): New.
13489 (struct qxfer): New.
13490 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13491 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13492 (handle_qxfer_statictrace): New functions, abstracted out from
13493 handle_query, and made to use the struct qxfer interface.
13494 (handle_threads_qxfer_proper): Rename to ...
13495 (handle_qxfer_threads_proper): ... this.
13496 (handle_threads_qxfer): Rename to ...
13497 (handle_qxfer_threads): ... this. Adjust.
13498 (qxfer_packets): New array.
13499 (handle_qxfer): New function.
13500 (handle_query): Use handle_qxfer.
13502 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13504 * gdbreplay.c: Shorten lines of >= 80 columns.
13505 * linux-low.c: Ditto.
13506 * linux-ppc-low.c: Ditto.
13507 * linux-s390-low.c: Ditto.
13508 * linux-sparc-low.c: Ditto.
13509 * linux-x86-low.c: Ditto.
13510 * linux-xtensa-low.c: Ditto.
13511 * mem-break.c: Ditto.
13512 * nto-low.c: Ditto.
13513 * regcache.h: Ditto.
13514 * remote-utils.c: Ditto.
13517 * thread-db.c: Ditto.
13518 * tracepoint.c: Ditto.
13520 * win32-low.h: Ditto.
13522 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13524 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13527 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13529 * server.c (gdbserver_version): Update copyright year in version
13531 * gdbreplay.c (gdbreplay_version): Ditto.
13533 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13535 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13536 * linux-bfin-low.c: New file.
13537 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13538 PT_DATA_ADDR for BFIN targets.
13539 * Makefile.in (SFILES): Add linux-bfin-low.c.
13540 (clean): Remove reg-bfin.c.
13541 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13542 * README: Mention supported Blackfin targets.
13544 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13546 * .gitignore: New file.
13548 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13550 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13552 2010-10-22 Jie Zhang <jie@codesourcery.com>
13554 * Makefile.in: Add FLAGS_TO_PASS variable.
13555 (install): Remove dependency of install-only and recursively
13556 invoke make for install-only.
13558 2010-10-04 Doug Evans <dje@google.com>
13560 * Makefile.in (uninstall): Use $(DESTDIR).
13562 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13566 * linux-x86-low.c (compat_siginfo_from_siginfo)
13567 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13568 si_code is < 0. Check for si_code == SI_TIMER before checking for
13571 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13573 * lynx-i386-low.c: New file.
13574 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13576 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13578 * lynx-low.c (ptrace_request_to_str): Remove handling for
13579 request values that have been removed in LynxOS 5.x.
13581 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13583 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13586 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13588 * configure.ac: Add --enable-inprocess-agent option.
13589 * configure: Rebuilt.
13591 2010-09-06 Yao Qi <yao@codesourcery.com>
13593 * linux-low.c (linux_kill): Remove unused variable.
13594 (linux_stabilize_threads): Likewise.
13595 * server.c (start_inferior): Likewise.
13596 (queue_stop_reply_callback): Likewise.
13597 * tracepoint.c (do_action_at_tracepoint): Likewise.
13599 2010-09-06 Yao Qi <yao@codesourcery.com>
13601 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13604 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13606 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13608 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13610 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13613 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13615 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13616 gdbserver/lynx-ppc-low.c: New files.
13617 * Makefile.in (lynx_low_h): New variable.
13618 (lynx-low.o, lynx-ppc-low.o): New rules.
13619 * configure.ac: On LynxOS, link with -lnetinet.
13620 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13621 * configure: regenerate.
13623 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13625 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13626 * configure.ac: Add check for vasprintf and vsnprintf.
13627 * configure, config.in: Regenerate.
13628 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13630 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13632 * gdbreplay.c: Move include of alloca.h up, next to include of
13634 * server.h: Add include of malloc.h.
13635 * mem-break.c: Remove include of malloc.h.
13636 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13638 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13640 * Makefile.in (memmem.o): Build with -Wno-error.
13642 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13644 * utils.c (xsnprintf): Make non-static.
13645 * server.h: Add xsnprintf declaration.
13646 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13647 replace calls to snprintf by calls to xsnprintf throughout.
13649 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13651 * configure.ac: Add configure check for alloca.
13652 * configure, config.in: Regenerate.
13653 * server.h: Include alloca.h if it exists.
13654 * gdbreplay.c: Include alloca.h if it exists.
13656 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13658 * linux-low.c (__SIGRTMIN): Define if not already defined.
13659 (linux_create_inferior): Check for __ANDROID__ rather than
13661 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13662 are already deferred.
13663 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13664 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13665 stopped and already has a pending signal to report.
13666 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13667 a pending signal to report or is moving out of a jump pad.
13668 (linux_init_signals): Check for __ANDROID__ rather than
13671 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13673 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13674 debug_threads check. Avoid a linear search when not doing debug
13677 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13679 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13680 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13681 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13682 (process_event): Change local fd's type to gdb_fildes_t.
13683 (create_file_handler): Adjust prototype.
13684 (delete_file_handler): Adjust prototype.
13685 (handle_file_event): Adjust prototype. Use pfildes.
13686 (create_file_event): Adjsut prototype.
13687 * remote-utils.c (remote_desc, listen_desc): Change type to
13689 * server.h: New gdb_fildes_t typedef.
13690 [USE_WIN32API]: Include winsock2.h.
13691 (delete_file_handler, add_file_handler): Adjust prototypes.
13692 (pfildes): Declare.
13693 * utils.c (pfildes): New.
13695 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13697 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13698 * configure: Regenerate.
13700 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13702 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13703 (linux_done_accessing_memory): ... this.
13704 (linux_target_ops): Adjust.
13705 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13706 * nto-low.c (nto_target_ops): Adjust comment.
13707 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13708 * spu-low.c (spu_target_ops): Adjust comment.
13709 * target.h (target_ops): Rename unprepare_to_access_memory field
13710 to done_accessing_memory.
13711 (unprepare_to_access_memory): Rename to ...
13712 (done_accessing_memory): ... this.
13714 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13716 * linux-low.c (linux_prepare_to_access_memory): New.
13717 (linux_unprepare_to_access_memory): New.
13718 (linux_target_ops): Install them.
13719 * server.c (read_memory): Rename to ...
13720 (gdb_read_memory): ... this. Use
13721 prepare_to_access_memory/prepare_to_access_memory.
13722 (write_memory): Rename to ...
13723 (gdb_write_memory): ... this. Use
13724 prepare_to_access_memory/prepare_to_access_memory.
13725 (handle_search_memory_1): Adjust.
13726 (process_serial_event): Adjust.
13727 * target.h (struct target_ops): New fields
13728 prepare_to_access_memory and unprepare_to_access_memory.
13729 (prepare_to_access_memory, unprepare_to_access_memory): New.
13730 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13731 prepare_to_access_memory/prepare_to_access_memory.
13732 * nto-low.c (nto_target_ops): Adjust.
13733 * spu-low.c (spu_target_ops): Adjust.
13734 * win32-low.c (win32_target_ops): Adjust.
13736 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13738 * Makefile.in (WARN_CFLAGS): Get it from configure.
13739 (WERROR_CFLAGS): New.
13740 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13741 * configure.ac: Introduce --enable-werror, which adds -Werror to
13742 the compiler command line. Enabled by default. Disable with
13743 --disable-werror. Add -Wdeclaration-after-statement
13744 Wpointer-arith and -Wformat-nonliteral to warning flags.
13745 * configure: Regenerate.
13747 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13749 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13751 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13753 * gdbreplay.c (remote_error): New.
13755 (expect): Use gdbchar. Check for error reading from GDB.
13756 Clarify sync error output.
13757 (play): Check for errors writing to GDB.
13758 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13759 * remote-utils.c (getpkt): Check for errors writing to the remote
13762 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13764 * linux-low.c (linux_wait_1): Move non-debugging code out of
13765 `debug_threads' control.
13767 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13769 * linux-low.c (linux_wait_1): Don't set last_status here.
13770 * server.c (push_event, queue_stop_reply_callback): Assert we're
13771 not pushing a TARGET_WAITKIND_IGNORE event.
13772 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13773 (myresume, handle_target_event): Set the thread's last_resume_kind
13774 and last_status from the target returned status.
13776 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13780 * linux-x86-low.c (update_debug_registers_callback): New.
13781 (i386_dr_low_set_addr): Use it.
13782 (i386_dr_low_get_addr): New.
13783 (i386_dr_low_set_control): Use update_debug_registers_callback.
13784 (i386_dr_low_get_control): New.
13785 (i386_dr_low_get_status): Adjust.
13786 * linux-low.c (linux_stop_lwp): New.
13787 * linux-low.h (linux_stop_lwp): Declare.
13789 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13790 argument instead of a i386_debug_reg_state.
13791 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13792 a i386_debug_reg_state.
13793 (i386_insert_aligned_watchpoint): Adjust.
13794 (i386_remove_aligned_watchpoint): Adjust.
13795 (i386_low_stopped_data_address): Read the debug registers from the
13796 inferior instead of from the mirrors.
13797 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13798 (i386_dr_low_get_addr): Declare.
13799 (i386_dr_low_get_control): Declare.
13800 (i386_dr_low_get_status): Change prototype.
13802 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13803 (i386_dr_low_get_addr): New.
13804 (i386_dr_low_get_control): New.
13805 (i386_dr_low_get_status): Adjust prototype. Return
13807 (i386_initial_stuff): Clear dr_status_mirror and
13809 (i386_get_thread_context): Adjust.
13810 (i386_set_thread_context): Adjust.
13811 (i386_thread_added): Adjust.
13813 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13815 * linux-low.h (linux_thread_area): Delete declaration.
13817 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13819 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13820 after its termination.
13822 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13824 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13825 (gdb_wants_all_stopped): Delete.
13826 (linux_wait_1): Don't call them.
13827 * server.c (handle_v_cont): Tag all threads as want-stopped.
13828 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13829 stopped as "client-wants-stopped".
13831 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13833 * Makefile.in (signals_h): New.
13834 (server_h): Depend on it.
13835 (server.o): Don't depend on $(signals_def).
13836 (signals.o): Depend on $(signals_def).
13838 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13840 * Makefile.in (signals_def): New.
13841 (server_h): Append include/gdb/signals.h and signals_def.
13842 (server.o): Append signals_def.
13844 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13846 * server.c (handle_target_event): Use target_signal_to_host for
13847 resume_info.sig initialization.
13848 * target.h (struct thread_resume) <sig>: New comment.
13850 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13852 * server.c (handle_query): strcpy() the returned string from paddress()
13853 instead of sprintf().
13854 * utils.c (paddress): Return phex_nz().
13856 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13858 * server.c (handle_v_cont): Call mourn_inferior if process
13860 (myresume): Likewise.
13862 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13864 Static tracepoints, and integration with UST.
13866 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13867 * mem-break.c (uninsert_all_breakpoints)
13868 (reinsert_all_breakpoints): New.
13869 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13870 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13871 (gdb_agent_ust_loaded, helper_thread_id)
13872 (gdb_agent_helper_thread_id): New macros.
13873 (struct ipa_sym_addresses): Add addr_ust_loaded,
13874 addr_helper_thread_id, addr_cmd_buf.
13875 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13876 (in_process_agent_loaded_ust): New.
13877 (write_e_ust_not_loaded): New.
13878 (maybe_write_ipa_ust_not_loaded): New.
13879 (struct collect_static_trace_data_action): New.
13880 (enum tracepoint_type) <static_tracepoint>: New.
13881 (struct tracepoint) <handle>: Mention static tracepoints.
13882 (struct static_tracepoint_ctx): New.
13883 (CMD_BUF_SIZE): New.
13884 (add_tracepoint_action): Handle static tracepoint actions.
13885 (unprobe_marker_at): New.
13886 (clear_installed_tracepoints): Handle static tracepoints.
13887 (cmd_qtdp): Handle static tracepoints.
13888 (probe_marker_at): New.
13889 (cmd_qtstart): Handle static tracepoints.
13890 (response_tracepoint): Handle static tracepoints.
13891 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13892 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13893 (get_context_regcache): Handle static tracepoints.
13894 (do_action_at_tracepoint): Handle static tracepoint actions.
13895 (traceframe_find_block_type): Handle static trace data blocks.
13896 (traceframe_read_sdata): New.
13897 (download_tracepoints): Download static tracepoint actions.
13898 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13899 (GDB_PROBE_NAME): New.
13901 (GET_UST_SYM): New.
13904 (ust_marker_to_static_tracepoint): New.
13906 (collect_ust_data_at_tracepoint): New.
13907 (gdb_ust_probe): New.
13908 (UNIX_PATH_MAX, SOCK_DIR): New.
13909 (gdb_ust_connect_sync_socket): New.
13910 (resume_thread, stop_thread): New.
13911 (run_inferior_command): New.
13912 (init_named_socket): New.
13913 (gdb_ust_socket_init): New.
13914 (cstr_to_hexstr): New.
13916 (first_marker, next_marker): New.
13917 (response_ust_marker): New.
13918 (cmd_qtfstm, cmd_qtsstm): New.
13919 (unprobe_marker_at, probe_marker_at): New.
13920 (cmd_qtstmat, gdb_ust_thread): New.
13921 (gdb_ust_init): New.
13922 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13923 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13924 (ST_REGENTRY): New.
13925 (x86_64_st_collect_regmap): New.
13926 (X86_64_NUM_ST_COLLECT_GREGS): New.
13927 (AMD64_RIP_REGNUM): New.
13928 (supply_static_tracepoint_registers): New.
13929 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13930 (ST_REGENTRY): New.
13931 (i386_st_collect_regmap): New.
13932 (i386_NUM_ST_COLLECT_GREGS): New.
13933 (supply_static_tracepoint_registers): New.
13934 * server.c (handle_query): Handle qXfer:statictrace:read.
13935 <qSupported>: Report support for StaticTracepoints, and
13936 qXfer:statictrace:read features.
13937 * server.h (traceframe_read_sdata)
13938 (supply_static_tracepoint_registers): Declare.
13939 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13940 (unpack_varlen_hex): Include in IPA build.
13941 * Makefile.in (ustlibs, ustinc): New.
13942 (IPA_OBJS): Add remote-utils-ipa.o.
13943 ($(IPA_LIB)): Link -ldl and -lpthread.
13945 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13946 * config.in, configure: Regenerate.
13948 2010-06-20 Ian Lance Taylor <iant@google.com>
13949 Pedro Alves <pedro@codesourcery.com>
13951 * linux-x86-low.c (always_true): Delete.
13952 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13953 trying to fool the compiler with always_true.
13955 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13957 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13958 conditions in gdbserver.
13960 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13962 * spu-low.c (spu_read_memory): Wrap around local store limit.
13963 (spu_write_memory): Likewise.
13965 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13967 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13968 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13970 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13972 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13973 uses with LONGEST uses.
13975 2010-06-14 Stan Shebs <stan@codesourcery.com>
13976 Pedro Alves <pedro@codesourcery.com>
13980 * linux-x86-low.c: Include limits.h.
13982 (always_true): New.
13985 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13986 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13987 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13988 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13989 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13990 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13991 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13992 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13993 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13994 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13995 (amd64_emit_void_call_2): New.
13996 (amd64_emit_ops): New.
13997 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13998 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13999 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14000 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14001 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14002 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14003 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14004 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14005 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14006 (i386_emit_stack_adjust, i386_emit_int_call_1)
14007 (i386_emit_void_call_2): New.
14008 (i386_emit_ops): New.
14009 (x86_emit_ops): New.
14010 (the_low_target): Install x86_emit_ops.
14011 * server.h (struct emit_ops): New.
14012 (get_raw_reg_func_addr): Declare.
14013 (current_insn_ptr, emit_error): Declare.
14014 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14015 (set_trace_state_variable_value): New defines.
14016 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14017 addr_get_trace_state_variable_value and
14018 addr_set_trace_state_variable_value.
14019 (symbol_list): New fields for get_raw_reg,
14020 get_trace_state_variable_value and set_trace_state_variable_value.
14021 (condfn): New typedef.
14022 (struct tracepoint): New field `compiled_cond'.
14023 (do_action_at_tracepoint): Clear compiled_cond.
14024 (get_trace_state_variable_value, set_trace_state_variable_value):
14026 (condition_true_at_tracepoint): If there's a compiled condition,
14028 (current_insn_ptr, emit_error): New globals.
14029 (struct bytecode_address): New.
14030 (get_raw_reg_func_addr): New.
14031 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14032 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14033 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14034 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14035 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14036 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14037 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14038 (compile_tracepoint_condition, compile_bytecodes): New.
14039 * target.h (emit_ops): Forward declare.
14040 (struct target_ops): New field emit_ops.
14041 (target_emit_ops): New.
14042 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14043 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14044 * linux-low.c (linux_emit_ops): New.
14045 (linux_target_ops): Install it.
14046 * linux-low.h (struct linux_target_ops): New field emit_ops.
14048 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14050 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14051 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14053 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14054 Stan Shebs <stan@codesourcery.com>
14056 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14057 (all): Depend on $(extra_libraries).
14058 (install-only): Install the IPA.
14059 (IPA_OBJS, IPA_LIB): New.
14060 (clean): Remove the IPA lib.
14061 (IPAGENT_CFLAGS): New.
14062 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14063 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14064 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14065 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14066 * configure.ac: Check for atomic builtins support in the compiler.
14067 (IPA_DEPFILES, extra_libraries): Define.
14068 * configure.srv (ipa_obj): Add description.
14069 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14070 (i[34567]86-*-linux*): Set ipa_obj.
14071 (x86_64-*-linux*): Set ipa_obj.
14072 * linux-low.c (stabilizing_threads): New.
14073 (supports_fast_tracepoints): New.
14074 (linux_detach): Stabilize threads before detaching.
14075 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14076 the lwp is either not stabilizing, or is moving out of a jump pad.
14077 (linux_fast_tracepoint_collecting): New.
14078 (maybe_move_out_of_jump_pad): New.
14079 (enqueue_one_deferred_signal): New.
14080 (dequeue_one_deferred_signal): New.
14081 (linux_wait_for_event_1): If moving out of a jump pad, defer
14082 pending signals to later.
14083 (linux_stabilize_threads): New.
14084 (linux_wait_1): Check if threads need moving out of jump pads, and
14086 (stuck_in_jump_pad_callback): New.
14087 (move_out_of_jump_pad_callback): New.
14088 (lwp_running): New.
14089 (linux_resume_one_lwp): Handle moving out of jump pads.
14090 (linux_set_resume_request): Dequeue deferred signals.
14091 (need_step_over_p): Also step over fast tracepoint jumps.
14092 (start_step_over): Also uninsert fast tracepoint jumps.
14093 (finish_step_over): Also reinsert fast tracepoint jumps.
14094 (linux_install_fast_tracepoint_jump): New.
14095 (linux_target_ops): Install linux_stabilize_threads and
14096 linux_install_fast_tracepoint_jump_pad.
14097 * linux-low.h (linux_target_ops) <get_thread_area,
14098 install_fast_tracepoint_jump_pad>: New fields.
14099 (struct lwp_info) <collecting_fast_tracepoint,
14100 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14101 (linux_get_thread_area): Declare.
14102 * linux-x86-low.c (jump_insn): New.
14103 (x86_get_thread_area): New.
14104 (append_insns): New.
14105 (push_opcode): New.
14106 (amd64_install_fast_tracepoint_jump_pad): New.
14107 (i386_install_fast_tracepoint_jump_pad): New.
14108 (x86_install_fast_tracepoint_jump_pad): New.
14109 (the_low_target): Install x86_get_thread_area and
14110 x86_install_fast_tracepoint_jump_pad.
14111 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14112 (struct fast_tracepoint_jump): New.
14113 (fast_tracepoint_jump_insn): New.
14114 (fast_tracepoint_jump_shadow): New.
14115 (find_fast_tracepoint_jump_at): New.
14116 (fast_tracepoint_jump_here): New.
14117 (delete_fast_tracepoint_jump): New.
14118 (set_fast_tracepoint_jump): New.
14119 (uninsert_fast_tracepoint_jumps_at): New.
14120 (reinsert_fast_tracepoint_jumps_at): New.
14121 (set_breakpoint_at): Use write_inferior_memory.
14122 (uninsert_raw_breakpoint): Use write_inferior_memory.
14123 (check_mem_read): Mask out fast tracepoint jumps.
14124 (check_mem_write): Mask out fast tracepoint jumps.
14125 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14126 (set_fast_tracepoint_jump): Declare.
14127 (delete_fast_tracepoint_jump)
14128 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14129 (reinsert_fast_tracepoint_jumps_at): Declare.
14130 * regcache.c: Don't compile many functions when building the
14131 in-process agent library.
14132 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14133 the register buffer in the heap.
14134 (free_register_cache): If the register buffer isn't owned by the
14135 regcache, don't free it.
14136 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14137 pre-existing register caches.
14138 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14140 (convert_ascii_to_int): : Constify `from' parameter type.
14141 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14142 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14143 the needed buffer in-place.
14144 (relocate_instruction): New.
14145 * server.c (handle_query) <qSymbols>: If the target supports
14146 tracepoints, give it a chance of looking up symbols. Report
14147 support for fast tracepoints.
14148 (handle_status): Stabilize threads.
14149 (process_serial_event): Adjust.
14150 * server.h (struct fast_tracepoint_jump): Forward declare.
14151 (struct process_info) <fast_tracepoint_jumps>: New field.
14152 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14153 (decode_X_packet, decode_M_packet): Adjust.
14154 (relocate_instruction): Declare.
14155 (in_process_agent_loaded): Declare.
14156 (tracepoint_look_up_symbols): Declare.
14157 (struct fast_tpoint_collect_status): Declare.
14158 (fast_tracepoint_collecting): Declare.
14159 (force_unlock_trace_buffer): Declare.
14160 (handle_tracepoint_bkpts): Declare.
14161 (initialize_low_tracepoint)
14162 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14163 * target.h (struct target_ops) <stabilize_threads,
14164 install_fast_tracepoint_jump_pad>: New fields.
14165 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14166 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14167 [HAVE_STDINT_H]: Include stdint.h.
14168 (trace_debug_1): Rename to ...
14169 (trace_vdebug): ... this.
14170 (trace_debug): Rename to ...
14171 (trace_debug_1): ... this. Add `level' parameter.
14172 (trace_debug): New.
14173 (ATTR_USED, ATTR_NOINLINE): New.
14174 (IP_AGENT_EXPORT): New.
14175 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14176 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14177 (about_to_request_buffer_space, trace_buffer_is_full)
14178 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14179 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14180 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14181 (traceframe_write_count, traceframes_created)
14182 (trace_state_variables)
14183 New renaming defines.
14184 (struct ipa_sym_addresses): New.
14185 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14186 (symbol_list): New.
14187 (ipa_sym_addrs): New.
14188 (all_tracepoint_symbols_looked_up): New.
14189 (in_process_agent_loaded): New.
14190 (write_e_ipa_not_loaded): New.
14191 (maybe_write_ipa_not_loaded): New.
14192 (tracepoint_look_up_symbols): New.
14193 (debug_threads) [IN_PROCESS_AGENT]: New.
14194 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14195 (UNKNOWN_SIDE_EFFECTS): New.
14196 (stop_tracing): New.
14197 (flush_trace_buffer): New.
14198 (stop_tracing_bkpt): New.
14199 (flush_trace_buffer_bkpt): New.
14200 (read_inferior_integer): New.
14201 (read_inferior_uinteger): New.
14202 (read_inferior_data_pointer): New.
14203 (write_inferior_data_pointer): New.
14204 (write_inferior_integer): New.
14205 (write_inferior_uinteger): New.
14206 (struct collect_static_trace_data_action): Delete.
14207 (enum tracepoint_type): New.
14208 (struct tracepoint) <type>: New field `type'.
14209 <actions_str, step_actions, step_actions_str>: Only include in
14211 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14212 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14213 (tracepoints): Use IP_AGENT_EXPORT.
14214 (last_tracepoint): Don't include in the IPA.
14215 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14216 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14217 (alloced_trace_state_variables): New.
14218 (trace_state_variables): Use IP_AGENT_EXPORT.
14219 (traceframe_t): Delete unused variable.
14220 (circular_trace_buffer): Don't include in the IPA.
14221 (trace_buffer_start): Delete.
14222 (struct trace_buffer_control): New.
14223 (trace_buffer_free): Delete.
14224 (struct ipa_trace_buffer_control): New.
14225 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14226 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14228 (trace_buffer_ctrl): New.
14229 (TRACE_BUFFER_CTRL_CURR): New.
14230 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14231 Reimplement as macros.
14232 (trace_buffer_wrap): Delete.
14233 (traceframe_write_count, traceframe_read_count)
14234 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14235 (struct tracepoint_hit_ctx) <type>: New field.
14236 (struct fast_tracepoint_ctx): New.
14237 (memory_barrier): New.
14239 (record_tracepoint_error): Update atomically in the IPA.
14240 (clear_inferior_trace_buffer): New.
14241 (about_to_request_buffer_space): New.
14242 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14243 updating the same buffer.
14244 (add_tracepoint): Default the tracepoint's type to trap
14245 tracepoint, and orig_size to -1.
14246 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14247 internal variables.
14248 (create_trace_state_variable): New parameter `gdb'. Handle it.
14249 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14250 (cmd_qtdp): Handle fast tracepoints.
14251 (cmd_qtdv): Adjust.
14252 (max_jump_pad_size): New.
14253 (gdb_jump_pad_head): New.
14254 (get_jump_space_head): New.
14255 (claim_jump_space): New.
14256 (sort_tracepoints): New.
14257 (MAX_JUMP_SIZE): New.
14258 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14260 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14261 support. Upload fast traceframes, and delete internal IPA
14263 (stop_tracing_handler): New.
14264 (flush_trace_buffer_handler): New.
14265 (cmd_qtstop): Upload fast tracepoints.
14266 (response_tracepoint): Handle fast tracepoints.
14267 (tracepoint_finished_step): Upload fast traceframes. Set the
14268 tracepoint hit context's tracepoint type.
14269 (handle_tracepoint_bkpts): New.
14270 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14271 type. Add comment about fast tracepoints.
14272 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14273 non-existing action_str field.
14274 (get_context_regcache): Handle fast tracepoints.
14275 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14277 (fast_tracepoint_from_jump_pad_address): New.
14278 (fast_tracepoint_from_ipa_tpoint_address): New.
14279 (collecting_t): New.
14280 (force_unlock_trace_buffer): New.
14281 (fast_tracepoint_collecting): New.
14283 (gdb_collect): New.
14284 (write_inferior_data_ptr): New.
14285 (target_tp_heap): New.
14286 (target_malloc): New.
14287 (download_agent_expr): New.
14289 (download_tracepoints): New.
14290 (download_trace_state_variables): New.
14291 (upload_fast_traceframes): New.
14292 (IPA_FIRST_TRACEFRAME): New.
14293 (IPA_NEXT_TRACEFRAME_1): New.
14294 (IPA_NEXT_TRACEFRAME): New.
14295 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14296 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14297 (gdb_jump_pad_buffer_end): New.
14298 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14299 (initialize_tracepoint): Adjust.
14300 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14301 buffer. Initialize the low module.
14302 * utils.c (PREFIX, TOOLNAME): New.
14303 (malloc_failure): Use PREFIX.
14304 (error): In the IPA, an error causes an exit.
14305 (fatal, warning): Use PREFIX.
14306 (internal_error): Use TOOLNAME.
14307 (NUMCELLS): Increase to 10.
14308 * configure, config.in: Regenerate.
14310 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14312 * server.c (handle_query) <qSupported>: Do two passes over the
14313 qSupported string to avoid nesting strtok.
14315 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14317 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14319 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14320 -Wl,--dynamic-list.
14321 * configure: Regenerate.
14322 * proc-service.list: New.
14324 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14326 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14329 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14331 * gdbreplay.c (remote_open): Check error return from socket() call by
14332 its equality to -1 not by it being negative.
14333 * remote-utils.c (remote_open): Likewise.
14335 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14337 * config.h: Regenerate.
14339 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14341 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14342 doesn't provide PTRACE_GET_THREAD_AREA.
14344 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14346 * linux-m68k-low.c: Include <asm/ptrace.h>
14347 (ps_get_thread_area): Implement.
14349 2010-05-03 Doug Evans <dje@google.com>
14351 * event-loop.c (struct callback_event): New struct.
14352 (callback_list): New global.
14353 (append_callback_event, delete_callback_event): New functions.
14354 (process_callback): New function.
14355 (start_event_loop): Call it.
14356 * remote-utils.c (NOT_SCHEDULED): Define.
14357 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14358 moved out of readchar.
14359 (readchar): Rewrite. Call reschedule before returning.
14360 (reset_readchar): New function.
14361 (remote_close): Call it.
14362 (process_remaining, reschedule): New functions.
14363 * server.h (callback_handler_func): New typedef.
14364 (append_callback_event, delete_callback_event): Declare.
14366 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14368 * proc-service.c (ps_pglobal_lookup): Use
14369 thread_db_look_up_one_symbol.
14370 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14371 parameter. Use it instead of all_symbols_looked_up.
14372 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14374 (all_symbols_looked_up): Don't declare.
14375 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14376 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14378 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14379 Set all_symbols_looked_up here.
14380 (thread_db_look_up_one_symbol): New.
14381 (thread_db_get_tls_address): Adjust.
14382 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14383 thread_db object on the heap, and tentatively set it in the
14385 (thread_db_init): Don't set all_symbols_looked_up here.
14386 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14388 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14390 * linux-low.c (linux_kill, linux_detach): Adjust.
14391 (status_pending_p_callback): Remove redundant statement. Check
14392 for !TARGET_WAITIKIND_IGNORE, instead of
14393 TARGET_WAITKIND_STOPPED.
14394 (handle_tracepoints): Make sure LWP is locked. Adjust.
14395 (linux_wait_for_event_1): Adjust.
14396 (linux_cancel_breakpoints): New.
14397 (unsuspend_one_lwp): New.
14398 (unsuspend_all_lwps): New.
14399 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14400 (send_sigstop_callback): Change return type to int, add new
14401 `except' parameter and handle it.
14402 (suspend_and_send_sigstop_callback): New.
14403 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14404 pass them down. If SUSPEND, also increment the lwp's suspend
14406 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14407 (need_step_over_p): Don't consider suspended LWPs.
14408 (start_step_over): Adjust.
14409 (proceed_one_lwp): Change return type to int, add new `except'
14410 parameter and handle it.
14411 (unsuspend_and_proceed_one_lwp): New.
14412 (proceed_all_lwps): Use find_inferior instead of
14414 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14415 also decrement the suspend count of LWPs. Pass `except' down,
14416 instead of hacking its suspend count.
14417 (linux_pause_all): Add `freeze' parameter. Adjust.
14418 (linux_unpause_all): New.
14419 (linux_target_ops): Install linux_unpause_all.
14420 * server.c (handle_status): Adjust.
14421 * target.h (struct target_ops): New fields `unpause_all' and
14422 `cancel_breakpoints'. Add new parameter to `pause_all'.
14423 (pause_all): Add new `freeze' parameter.
14424 (unpause_all): New.
14425 (cancel_breakpoints): New.
14426 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14427 cancel breakpoints.
14428 (cmd_qtstart): Pause threads.
14429 (stop_tracing): Pause threads, and cancel breakpoints.
14430 * win32-low.c (win32_target_ops): Adjust.
14432 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14434 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14435 the inferior right away from here...
14436 (linux_wait_1): ... to here, and adjust to check the thread's
14437 last_resume_kind instead of the lwp's step or stop_expected flags.
14439 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14441 * README: Use consistent `GDB' and `GDBserver' spellings.
14443 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14445 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14446 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14447 (linux_detach_one_lwp): Assume the lwp is stopped.
14448 (any_thread_of): Delete.
14449 (linux_detach): Stop all lwps here. Don't blindly delete all
14451 (delete_lwp_callback): New.
14452 (linux_mourn): Delete all lwps of the process that is gone.
14453 (linux_wait_1): Don't delete the last lwp of the process here.
14454 * mem-break.h (mark_breakpoints_out): Declare.
14455 * mem-break.c (mark_breakpoints_out): New.
14456 (free_all_breakpoints): Use it.
14457 * server.c (handle_target_event): If the process is gone, mark
14459 * thread-db.c (struct thread_db) <create_bp>: New field.
14460 (thread_db_enable_reporting): Fix prototype. Store a thread event
14461 breakpoint reference in the thread_db struct.
14462 (thread_db_load_search): Clear the thread_db object.
14463 (try_thread_db_load_1): Ditto.
14464 (switch_to_process): New.
14465 (disable_thread_event_reporting): Use it.
14466 (remove_thread_event_breakpoints): New.
14467 (thread_db_detach, thread_db_mourn): Use it.
14469 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14471 * linux-low.c (linux_enable_event_reporting): New.
14472 (linux_wait_for_event_1, handle_extended_wait): Use it.
14474 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14476 * linux-low.c (linux_kill_one_lwp, linux_kill)
14477 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14478 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14479 SIGSTOP even if the LWP is stopped.
14480 (send_sigstop_callback): New.
14481 (stop_all_lwps): Use send_sigstop_callback instead.
14482 (linux_resume_one_thread): Adjust.
14483 (proceed_one_lwp): Still proceed an LWP that the client has
14484 requested to stop, if we haven't reported it as stopped yet. Make
14485 sure that LWPs the client want stopped, have a pending SIGSTOP.
14487 2010-04-26 Doug Evans <dje@google.com>
14489 * server.c (handle_general_set): Make static.
14491 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14492 Print received char after testing for error/eof instead of before.
14493 (input_interrupt): Tweak comment.
14495 2010-04-23 Doug Evans <dje@google.com>
14497 * server.c (start_inferior): Print inferior argv if --debug.
14499 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14501 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14502 * nto-x86-low.c: Include server.h
14504 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14506 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14507 be consistent with other sources of this directory.
14508 (init_registers_amd64): Correct name of source file of this function
14511 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14513 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14514 64-bit executables.
14516 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14518 * win32-i386-low.c: Add 64-bit support.
14519 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14520 (init_registers_amd64): Declare.
14521 (mappings): Add 64-bit version of array.
14522 (init_windows_x86): New function.
14523 (the_low_target): Change init_arch field to init_windows_x86.
14525 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14527 * win32-low.c: Adapt to support also 64-bit architecture.
14528 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14529 (get_image_name): Use SIZE_T type for local variable `done'.
14530 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14531 (toolhelp_get_dll_name): Idem.
14532 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14533 Use uintptr_t typecast to avoid warning.
14534 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14535 (handle_exception): Use phex_nz to avoid warning.
14536 (win32_wait): Remove unused local variable `process'.
14538 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14540 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14543 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14545 * configure.ac: Use `ws2_32' library for srv_mingw.
14546 * configure: Regenerate.
14547 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14548 * remote-utils.c: Likewise.
14550 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14552 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14553 if __x86_64__ is defined.
14555 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14557 * configure: Regenerate.
14559 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14561 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14562 * target.h (target_ops): New get_tib_address field.
14563 * win32-low.h (win32_thread_info): Add thread_local_base field.
14564 * win32-low.c (child_add_thread): Add tlb argument.
14565 Set thread_local_base field to TLB.
14566 (get_child_debug_event): Adapt to child_add_thread change.
14567 (win32_get_tib_address): New function.
14568 (win32_target_ops): Set get_tib_address field to
14569 win32_get_tib_address.
14570 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14572 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14574 * linux-low.c (linux_mourn): Also remove the process.
14575 * server.c (handle_target_event): Don't remove the process here.
14576 * nto-low.c (nto_mourn): New.
14577 (nto_target_ops): Install it.
14578 * spu-low.c (spu_mourn): New.
14579 (spu_target_ops): Install it.
14580 * win32-low.c (win32_mourn): New.
14581 (win32_target_ops): Install it.
14583 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14585 * server.h (buffer_xml_printf): Remove redundant `;'.
14587 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14589 * regcache.c (set_register_cache): Invalidate regcaches before
14590 changing the register cache layout.
14591 (regcache_invalidate_one): Allow a NULL regcache.
14592 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14593 regcaches before changing the register cache layout or the target
14596 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14598 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14599 variable warning on Linux/x86-64.
14601 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14603 GDBserver disconnected tracing support.
14605 * linux-low.c (linux_remove_process): Delete.
14606 (add_lwp): Don't set last_resume_kind here.
14607 (linux_kill): Use `mourn'.
14608 (linux_detach): Use `thread_db_detach', and `mourn'.
14609 (linux_mourn): New.
14610 (linux_attach_lwp_1): Adjust comment.
14611 (linux_attach): last_resume_kind moved the thread_info; adjust.
14612 (status_pending_p_callback): Adjust.
14613 (linux_wait_for_event_1): Adjust.
14614 (count_events_callback, select_singlestep_lwp_callback)
14615 (select_event_lwp_callback, cancel_breakpoints_callback)
14616 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14617 (proceed_one_lwp): Adjust.
14618 (linux_async): Add debug output.
14619 (linux_thread_stopped): New.
14620 (linux_pause_all): New.
14621 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14623 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14624 (thread_db_free): Delete declaration.
14625 (thread_db_detach, thread_db_mourn): Declare.
14626 * thread-db.c (thread_db_init): Use thread_db_mourn.
14627 (thread_db_free): Delete, split in two.
14628 (disable_thread_event_reporting): New.
14629 (thread_db_detach): New.
14630 (thread_db_mourn): New.
14632 * server.h (struct thread_info) <last_resume_kind>: New field.
14633 <attached>: Add comment.
14634 <gdb_detached>: New field.
14635 (handler_func): Change return type to int.
14636 (handle_serial_event, handle_target_event): Ditto.
14637 (gdb_connected): Declare.
14639 (disconnected_tracing): Declare.
14640 (stop_tracing): Declare.
14642 * server.c (handle_query) <qSupported>: Report support for
14643 disconnected tracing.
14644 (queue_stop_reply_callback): Account for running threads.
14645 (gdb_wants_thread_stopped): New.
14646 (gdb_wants_all_threads_stopped): New.
14647 (gdb_reattached_process): New.
14648 (handle_status): Clear the `gdb_detached' flag of all processes.
14649 In all-stop, stop all threads.
14650 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14651 (process_serial_event): If the remote connection breaks, or if an
14652 exit was forced with "monitor exit", force an event loop exit.
14653 Handle disconnected tracing on detach.
14654 (handle_serial_event): Adjust.
14655 (handle_target_event): If GDB isn't connected, forward events back
14656 to the inferior, unless the last process exited, in which case,
14657 exit gdbserver. Adjust interface.
14659 * remote-utils.c (remote_open): Don't block in accept. Instead
14660 register an event loop source on the listen socket file
14661 descriptor. Refactor bits into ...
14662 (listen_desc): ... this new global.
14663 (gdb_connected): ... this new function.
14664 (enable_async_notification): ... this new function.
14665 (handle_accept_event): ... this new function.
14666 (remote_close): Clear remote_desc.
14668 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14670 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14672 (mourn_inferior): Define.
14673 (target_process_qsupported): Avoid the dangling else problem.
14674 (thread_stopped): Define.
14675 (pause_all): Define.
14676 (target_waitstatus_to_string): Declare.
14677 * target.c (target_waitstatus_to_string): New.
14679 * tracepoint.c (tracing): Make extern.
14680 (disconnected_tracing): New.
14681 (stop_tracing): Make extern. Handle tracing stops due to GDB
14683 (cmd_qtdisconnected): New.
14684 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14685 (handle_tracepoint_general_set): Handle QTDisconnected.
14687 * event-loop.c (event_handler_func): Change return type to int.
14688 (process_event): Bail out if the event handler wants the event
14690 (handle_file_event): Ditto.
14691 (start_event_loop): Bail out if the event handler wants the event
14694 * nto-low.c (nto_target_ops): Adjust.
14695 * spu-low.c (spu_wait): Don't remove the process here.
14696 (spu_target_ops): Adjust.
14697 * win32-low.c (win32_wait): Don't remove the process here.
14698 (win32_target_ops): Adjust.
14700 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14702 * regcache.c (realloc_register_cache): Invalidate inferior's
14703 regcache before recreating it.
14705 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14707 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14709 2010-04-09 Stan Shebs <stan@codesourcery.com>
14710 Pedro Alves <pedro@codesourcery.com>
14712 * server.h (LONGEST): New.
14713 (struct thread_info) <while_stepping>: New field.
14714 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14716 (initialize_tracepoint, handle_tracepoint_general_set)
14717 (handle_tracepoint_query, tracepoint_finished_step)
14718 (tracepoint_was_hit, release_while_stepping_state_list):
14719 (current_traceframe): Declare.
14720 * server.c (handle_general_set): Handle tracepoint packets.
14721 (read_memory): New.
14722 (write_memory): New.
14723 (handle_search_memory_1): Use read_memory.
14724 (handle_query): Report support for conditional tracepoints, trace
14725 state variables, and tracepoint sources. Handle tracepoint
14727 (main): Initialize the tracepoints module.
14728 (process_serial_event): Handle traceframe reads/writes.
14730 * linux-low.c (handle_tracepoints): New.
14731 (linux_wait_1): Call it.
14732 (linux_resume_one_lwp): Handle while-stepping.
14733 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14734 (linux_target_ops): Install them.
14735 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14737 * linux-x86-low.c (x86_supports_tracepoints): New.
14738 (the_low_target). Install it.
14740 * mem-break.h (delete_breakpoint): Declare.
14741 * mem-break.c (delete_breakpoint): Make external.
14743 * target.h (struct target_ops): Add `supports_tracepoints',
14744 `read_pc', and `write_pc' fields.
14745 (target_supports_tracepoints): Define.
14746 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14749 * regcache.h (struct regcache) <registers_owned>: New field.
14750 (init_register_cache, regcache_cpy): Declare.
14751 (regcache_read_pc, regcache_write_pc): Declare.
14752 (register_cache_size): Declare.
14753 (supply_regblock): Declare.
14754 * regcache.c (init_register_cache): New.
14755 (new_register_cache): Use it.
14756 (regcache_cpy): New.
14757 (register_cache_size): New.
14758 (supply_regblock): New.
14759 (regcache_read_pc, regcache_write_pc): New.
14761 * tracepoint.c: New.
14763 * Makefile.in (OBS): Add tracepoint.o.
14764 (tracepoint.o): New rule.
14766 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14768 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14770 (i386-mmx.c): Likewise.
14771 (i386-mmx-linux.o): Likewise.
14772 (i386-mmx-linux.c): Likewise.
14774 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14775 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14776 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14777 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14779 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14780 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14781 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14783 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14785 * Makefile.in (clean): Updated.
14787 (i386-avx.c): Likewise.
14788 (i386-avx-linux.o): Likewise.
14789 (i386-avx-linux.c): Likewise.
14790 (amd64-avx.o): Likewise.
14791 (amd64-avx.c): Likewise.
14792 (amd64-avx-linux.o): Likewise.
14793 (amd64-avx-linux.c): Likewise.
14795 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14796 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14797 (srv_amd64_regobj): Add amd64-avx.o.
14798 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14799 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14800 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14801 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14802 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14803 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14804 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14806 * i387-fp.c: Include "i386-xstate.h".
14808 (i387_cache_to_xsave): Likewise.
14809 (i387_xsave_to_cache): Likewise.
14810 (x86_xcr0): Likewise.
14812 * i387-fp.h (i387_cache_to_xsave): Likewise.
14813 (i387_xsave_to_cache): Likewise.
14814 (x86_xcr0): Likewise.
14816 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14817 * linux-crisv32-low.c (target_regsets): Likewise.
14818 * linux-m68k-low.c (target_regsets): Likewise.
14819 * linux-mips-low.c (target_regsets): Likewise.
14820 * linux-ppc-low.c (target_regsets): Likewise.
14821 * linux-s390-low.c (target_regsets): Likewise.
14822 * linux-sh-low.c (target_regsets): Likewise.
14823 * linux-sparc-low.c (target_regsets): Likewise.
14824 * linux-xtensa-low.c (target_regsets): Likewise.
14826 * linux-low.c: Include <sys/uio.h>.
14827 (regsets_fetch_inferior_registers): Support nt_type.
14828 (regsets_store_inferior_registers): Likewise.
14829 (linux_process_qsupported): New.
14830 (linux_target_ops): Add linux_process_qsupported.
14832 * linux-low.h (regset_info): Add nt_type.
14833 (linux_target_ops): Add process_qsupported.
14835 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14837 (init_registers_i386_avx_linux): New.
14838 (init_registers_amd64_avx_linux): Likewise.
14839 (xmltarget_i386_linux_no_xml): Likewise.
14840 (xmltarget_amd64_linux_no_xml): Likewise.
14841 (PTRACE_GETREGSET): Likewise.
14842 (PTRACE_SETREGSET): Likewise.
14843 (x86_fill_xstateregset): Likewise.
14844 (x86_store_xstateregset): Likewise.
14845 (use_xml): Likewise.
14846 (x86_linux_update_xmltarget): Likewise.
14847 (x86_linux_process_qsupported): Likewise.
14848 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14849 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14850 init_registers_i386_linux here. Call
14851 x86_linux_update_xmltarget.
14852 (the_low_target): Add x86_linux_process_qsupported.
14854 * server.c (handle_query): Call target_process_qsupported.
14856 * target.h (target_ops): Add process_qsupported.
14857 (target_process_qsupported): New.
14859 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14861 * inferiors.c (add_thread): Set last_status kind to
14862 TARGET_WAITKIND_IGNORE.
14863 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14864 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14865 (linux_wait_1): Move `thread' local definition to block that uses
14866 it. Don't NULL initialize `event_child'.
14867 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14868 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14869 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14871 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14873 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14874 an extended waitstatus, or by a watchpoint.
14875 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14876 thread was stepping or has been stopped by a watchpoint.
14878 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14880 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14881 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14882 of another, then delete the previous, and validate all
14884 (validate_inserted_breakpoint): New.
14885 (delete_disabled_breakpoints): New.
14886 (validate_breakpoints): New.
14887 (check_mem_read): Validate breakpoints before trusting their
14888 shadow. Delete disabled breakpoints.
14889 (check_mem_write): Validate breakpoints before trusting they
14890 should be inserted. Delete disabled breakpoints.
14891 * mem-break.h (validate_breakpoints):
14892 * server.c (handle_query): Validate breakpoints when we see a
14895 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14897 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14898 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14899 if we could tell there's a GDB breakpoint at stop_pc.
14900 (need_step_over_p): Don't do a step over if we find a GDB
14901 breakpoint at the resume PC.
14903 * mem-break.c (struct raw_breakpoint): New.
14904 (enum bkpt_type): New type `gdb_breakpoint'.
14905 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14906 fields. New field `raw'.
14907 (find_raw_breakpoint_at): New.
14908 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14909 breakpoint instead.
14910 (set_breakpoint_at): Adjust.
14911 (delete_raw_breakpoint): New.
14912 (release_breakpoint): New.
14913 (delete_breakpoint): Rename to...
14914 (delete_breakpoint_1): ... this. Add proc parameter. Use
14915 release_breakpoint. Return ENOENT.
14916 (delete_breakpoint): Reimplement.
14917 (find_breakpoint_at): Delete.
14918 (find_gdb_breakpoint_at): New.
14919 (delete_breakpoint_at): Delete.
14920 (set_gdb_breakpoint_at): New.
14921 (delete_gdb_breakpoint_at): New.
14922 (gdb_breakpoint_here): New.
14923 (set_reinsert_breakpoint): Use release_breakpoint.
14924 (uninsert_breakpoint): Rename to ...
14925 (uninsert_raw_breakpoint): ... this.
14926 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14927 (reinsert_raw_breakpoint): Change parameter type to
14929 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14931 (check_breakpoints): Adjust. Use release_breakpoint.
14932 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14933 (breakpoint_inserted_here): Ditto.
14934 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14935 Don't trust the breakpoint's shadow if it is not inserted.
14936 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14937 (delete_all_breakpoints): Adjust.
14938 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14939 use delete_breakpoint_1.
14941 * mem-break.h (breakpoints_supported): Delete declaration.
14942 (set_gdb_breakpoint_at): Declare.
14943 (gdb_breakpoint_here): Declare.
14944 (delete_breakpoint_at): Delete.
14945 (delete_gdb_breakpoint_at): Declare.
14947 * server.h (struct raw_breakpoint): Forward declare.
14948 (struct process_info): New field `raw_breakpoints'.
14950 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14953 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14955 * linux-low.c (status_pending_p_callback): Fix comment.
14956 (linux_wait_for_event_1): Move most of the internal breakpoint
14957 handling from here...
14958 (linux_wait_1): ... to here.
14959 (count_events_callback): New.
14960 (select_singlestep_lwp_callback): New.
14961 (select_event_lwp_callback): New.
14962 (cancel_breakpoints_callback): New.
14963 (select_event_lwp): New.
14964 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14965 priority to all LWPs that have had events that should be reported
14966 to the client. Cancel breakpoints when about to reporting the
14967 event to the client, not while stopping lwps. No longer cancel
14968 finished single-steps here.
14969 (cancel_finished_single_step): Delete.
14970 (cancel_finished_single_steps): Delete.
14972 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14974 * mem-break.c (enum bkpt_type): New.
14975 (struct breakpoint): New field `type'.
14976 (set_breakpoint_at): Change return type to struct breakpoint
14977 pointer. Set type to `other_breakpoint' by default.
14978 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14979 in the breakpoint list.
14980 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14981 (reinsert_breakpoint): Rename to ...
14982 (reinsert_raw_breakpoint): ... this.
14983 (reinsert_breakpoints_at): Adjust.
14984 * mem-break.h (struct breakpoint): Declare.
14985 (set_breakpoint_at): Change return type to struct breakpoint
14988 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14990 * server.c (handle_query): Assign, not compare.
14992 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14994 Teach linux gdbserver to step-over-breakpoints.
14996 * linux-low.c (can_hardware_single_step): New.
14997 (supports_breakpoints): New.
14998 (handle_extended_wait): If stopping threads, read the stop pc of
14999 the new cloned LWP.
15001 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15002 low target doesn't support retrieving the PC.
15003 (add_lwp): Set last_resume_kind to resume_continue.
15004 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15005 (linux_attach): Don't clear stop_expected. Set the lwp's
15006 last_resume_kind to resume_stop.
15007 (linux_detach_one_lwp): Don't check for removed breakpoints.
15008 (check_removed_breakpoint): Delete.
15009 (status_pending_p): Rename to ...
15010 (status_pending_p_callback): ... this. Don't check for removed
15011 breakpoints. Don't consider threads that are stopped from GDB's
15013 (linux_wait_for_lwp): Always read the stop_pc here.
15014 (cancel_breakpoint): New.
15015 (step_over_bkpt): New global.
15016 (linux_wait_for_event_1): Implement stepping over breakpoints.
15017 (gdb_wants_lwp_stopped): New.
15018 (gdb_wants_all_stopped): New.
15019 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15020 single-step traps here. Store the thread's last reported target
15022 (send_sigstop): Don't clear stop_expected. Always set it,
15024 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15025 (cancel_finished_single_step): New.
15026 (cancel_finished_single_steps): New.
15027 (wait_for_sigstop): Don't cancel finished single-step traps here.
15028 (linux_resume_one_lwp): Don't check for removed breakpoints.
15029 Don't set `step' on non-hardware step archs.
15030 (linux_set_resume_request): Ignore resume_stop requests if already
15031 stopping or stopped. Set the lwp's last_resume_kind.
15032 (resume_status_pending_p): Don't check for removed breakpoints.
15033 (need_step_over_p): New.
15034 (start_step_over): New.
15035 (finish_step_over): New.
15036 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15037 requests. Clear the thread's last reported target waitstatus.
15038 Don't use the `suspended' flag. Don't consider pending breakpoints.
15039 (linux_resume): Start a step-over if necessary.
15040 (proceed_one_lwp): New.
15041 (proceed_all_lwps): New.
15042 (unstop_all_lwps): New.
15043 * linux-low.h (struct lwp_info): Rewrite comment for the
15044 `suspended' flag. Add the `stop_pc' field. Delete the
15045 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15046 Add `'last_resume_kind' and `need_step_over' fields.
15047 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15048 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15049 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15050 (set_raw_breakpoint_at): New.
15051 (set_breakpoint_at): Rewrite to use it.
15052 (reinsert_breakpoint_handler): Delete.
15053 (set_reinsert_breakpoint): New.
15054 (reinsert_breakpoint_by_bp): Delete.
15055 (delete_reinsert_breakpoints): New.
15056 (uninsert_breakpoint): Rewrite.
15057 (uninsert_breakpoints_at): New.
15058 (reinsert_breakpoint): Rewrite.
15059 (reinsert_breakpoints_at): New.
15060 (check_breakpoints): Rewrite.
15061 (breakpoint_here): New.
15062 (breakpoint_inserted_here): New.
15063 (check_mem_read): Adjust.
15064 * mem-break.h (breakpoints_supported, breakpoint_here)
15065 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15066 (reinsert_breakpoint_by_bp): Delete declaration.
15067 (delete_reinsert_breakpoints): Declare.
15068 (reinsert_breakpoint): Delete declaration.
15069 (reinsert_breakpoints_at): Declare.
15070 (uninsert_breakpoint): Delete declaration.
15071 (uninsert_breakpoints_at): Declare.
15072 (check_breakpoints): Adjust prototype.
15073 * server.h: Adjust include order.
15074 (struct thread_info): Declare here. Add a `last_status' field.
15076 2010-03-23 Michael Snyder <msnyder@vmware.com>
15078 * server.c (crc32): New function.
15079 (handle_query): Add handling for 'qCRC:' request.
15081 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15083 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15084 lwp had been stopped by a watchpoint.
15086 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15088 * server.h (internal_error): Declare.
15089 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15090 * utils.c (internal_error): New function.
15092 2010-03-15 Andreas Schwab <schwab@redhat.com>
15094 * configure.srv: Fix typo setting srv_regobj.
15096 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15098 * linux-low.c (fetch_register): Avoid passing a non string literal
15100 (usr_store_inferior_registers): Ditto.
15102 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15104 * linux-low.c (linux_write_memory): Bail out early if peeking
15107 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15109 * linux-low.h (struct lwp_info): New fields
15110 `stopped_by_watchpoint' and `stopped_data_address'.
15111 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15112 here, and cache them in the lwp object.
15113 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15115 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15117 (linux_stopped_by_watchpoint): Rewrite.
15118 (linux_stopped_data_address): Rewrite.
15120 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15122 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15123 switching the current inferior, not before.
15125 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15127 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15128 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15129 i386-linux.c and amd64-linux.c.
15130 (reg-i386.o): Removed.
15131 (reg-i386.c): Likewise.
15132 (reg-i386-linux.o): Likewise.
15133 (reg-i386-linux.c): Likewise.
15134 (reg-x86-64.o): Likewise.
15135 (reg-x86-64.c): Likewise.
15136 (reg-x86-64-linux.o): Likewise.
15137 (reg-x86-64-linux.c): Likewise.
15139 (i386.c): Likewise.
15140 (i386-linux.o): Likewise.
15141 (i386-linux.c): Likewise.
15142 (amd64.o): Likewise.
15143 (amd64.c): Likewise.
15144 (amd64-linux.o): Likewise.
15145 (amd64-linux.c): Likewise.
15147 * configure.srv (srv_i386_regobj): New.
15148 (srv_i386_linux_regobj): Likewise.
15149 (srv_amd64_regobj): Likewise.
15150 (srv_amd64_linux_regobj): Likewise.
15151 (srv_i386_32bit_xmlfiles): Likewise.
15152 (srv_i386_64bit_xmlfiles): Likewise.
15153 (srv_i386_xmlfiles): Likewise.
15154 (srv_amd64_xmlfiles): Likewise.
15155 (srv_i386_linux_xmlfiles): Likewise.
15156 (srv_amd64_linux_xmlfiles): Likewise.
15157 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15158 srv_xmlfiles to $srv_i386_xmlfiles.
15159 (i[34567]86-*-mingw32ce*): Likewise.
15160 (i[34567]86-*-mingw*): Likewise.
15161 (i[34567]86-*-nto*): Likewise.
15162 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15163 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15164 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15165 (x86_64-*-linux*): Likewise.
15167 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15168 (init_registers_amd64_linux): New.
15169 (x86_arch_setup): Replace init_registers_x86_64_linux with
15170 init_registers_amd64_linux.
15172 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15174 * configure.ac: Check for libdl. If it is not available link against
15175 static libthread_db.
15176 * configure: Regenerate.
15178 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15182 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15183 handing a read watchpoint.
15184 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15186 2010-02-12 Doug Evans <dje@google.com>
15188 * linux-low.c (linux_supports_tracefork_flag): Document.
15189 (linux_look_up_symbols): Add comment.
15191 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15193 * regcache.c (supply_register): Clear regcache if buf is NULL.
15195 2010-02-02 Nicolas Roche <roche@sourceware.org>
15196 Joel Brobecker <brobecker@adacore.com>
15198 * inferiors.c (find_inferior): Add function documentation.
15199 (unloaded_dll): Handle the case where the unloaded dll has not
15200 been previously registered in the dll list.
15202 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15204 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15205 (thumb2_breakpoint): New.
15206 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15208 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15210 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15211 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15214 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15216 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15218 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15220 * linux-s390-low.c (s390_collect_ptrace_register)
15221 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15223 2010-01-21 Doug Evans <dje@google.com>
15225 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15226 (PTRACE_ARG4_TYPE): New macro.
15227 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15228 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15229 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15230 (usr_store_inferior_registers): Ditto.
15231 (linux_read_memory, linux_write_memory): Ditto.
15232 (linux_test_for_tracefork): Ditto.
15234 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15235 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15237 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15239 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15242 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15244 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15245 prototype to take a regcache. Adjust.
15247 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15249 * regcache.h (struct thread_info): Forward declare.
15250 (struct regcache): New.
15251 (new_register_cache): Adjust prototype.
15252 (get_thread_regcache): Declare.
15253 (free_register_cache): Adjust prototype.
15254 (registers_to_string, registers_from_string): Ditto.
15255 (supply_register, supply_register_by_name, collect_register)
15256 (collect_register_as_string, collect_register_by_name): Ditto.
15257 * regcache.c (struct inferior_regcache_data): Delete.
15258 (get_regcache): Rename to ...
15259 (get_thread_regcache): ... this. Adjust. Switch inferior before
15260 fetching registers.
15261 (regcache_invalidate_one): Adjust.
15262 (regcache_invalidate): Fix prototype.
15263 (new_register_cache): Return the new register cache.
15264 (free_register_cache): Change prototype.
15265 (realloc_register_cache): Adjust.
15266 (registers_to_string): Change prototype to take a regcache. Adjust.
15267 (registers_from_string): Ditto.
15268 (register_data): Ditto.
15269 (supply_register): Ditto.
15270 (supply_register_by_name): Ditto.
15271 (collect_register): Ditto.
15272 (collect_register_as_string): Ditto.
15273 (collect_register_by_name): Ditto.
15274 * server.c (process_serial_event): Adjust.
15275 * linux-low.h (regset_fill_func, regset_store_func): Change
15277 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15279 * linux-low.c (get_stop_pc): Adjust.
15280 (check_removed_breakpoint): Adjust.
15281 (linux_wait_for_event): Adjust.
15282 (linux_resume_one_lwp): Adjust.
15283 (fetch_register): Add regcache parameter. Adjust.
15284 (usr_store_inferior_registers): Ditto.
15285 (regsets_fetch_inferior_registers): Ditto.
15286 (regsets_store_inferior_registers): Ditto.
15287 (linux_fetch_registers, linux_store_registers): Ditto.
15288 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15290 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15292 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15293 prototype to take a regcache.
15294 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15295 * remote-utils.c (convert_ascii_to_int, outreg)
15296 (prepare_resume_reply): Change prototype to take a regcache.
15298 * target.h (struct target_ops) <fetch_registers, store_registers>:
15299 Change prototype to take a regcache.
15300 (fetch_inferior_registers, store_inferior_registers): Change
15301 prototype to take a regcache. Adjust.
15302 * proc-service.c (ps_lgetregs): Adjust.
15303 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15304 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15305 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15306 take a regcache. Adjust.
15307 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15308 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15309 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15310 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15311 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15312 (cris_cannot_fetch_register):
15313 (cris_breakpoint_at): Change prototype to take a regcache.
15315 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15316 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15317 to take a regcache. Adjust.
15318 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15320 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15321 take a regcache. Adjust.
15322 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15323 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15324 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15325 * linux-mips-low.c (mips_get_pc):
15326 (mips_set_pc): Change prototype to take a regcache. Adjust.
15327 (mips_reinsert_addr): Adjust.
15328 (mips_collect_register): Change prototype to take a regcache.
15330 (mips_supply_register):
15331 (mips_collect_register_32bit, mips_supply_register_32bit)
15332 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15333 (mips_store_fpregset): Ditto.
15334 * linux-ppc-low.c (ppc_supply_ptrace_register)
15335 (ppc_supply_ptrace_register): Ditto.
15336 (parse_spufs_run): Adjust.
15337 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15338 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15339 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15340 take a regcache. Adjust.
15341 * linux-s390-low.c (s390_collect_ptrace_register)
15342 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15343 (s390_set_pc): Change prototype to take a regcache. Adjust.
15344 (s390_arch_setup): Adjust.
15345 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15346 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15347 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15348 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15349 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15351 (sparc_breakpoint_at): Adjust.
15352 * linux-xtensa-low.c (xtensa_fill_gregset):
15353 (xtensa_store_gregset):
15354 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15355 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15356 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15357 prototype to take a regcache. Adjust.
15358 * win32-arm-low.c (arm_fetch_inferior_register)
15359 (arm_store_inferior_register): Change prototype to take a
15361 * win32-i386-low.c (i386_fetch_inferior_register)
15362 (i386_store_inferior_register): Change prototype to take a
15364 * win32-low.c (child_fetch_inferior_registers)
15365 (child_store_inferior_registers): Change prototype to take a
15367 (win32_wait): Adjust.
15368 (win32_fetch_inferior_registers): Change prototype to take a
15370 (win32_store_inferior_registers): Adjust.
15371 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15372 store_inferior_register>: Change prototype to take a regcache.
15374 2010-01-20 Doug Evans <dje@google.com>
15376 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15378 (linux_wait_for_event1, linux_init_signals): Ditto.
15379 (W_STOPCODE): Provide definition if missing.
15381 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15383 * linux-low.c (linux_core_of_thread): New.
15384 (compare_ints, show_process, list_threads): New.
15385 (linux_qxfer_osdata): Report threads and cores.
15386 (linux_target_op): Register linux_core_of_thread.
15387 * remote-utils.c (prepare_resume_reply): Report the core.
15388 (buffer_xml_printf): Support %d specifier.
15389 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15391 (handle_query): Handle qXfer:threads. Announce availability
15393 * target.h (struct target_ops): New field core_of_thread.
15395 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15397 * Makefile.in (clean): Remove new generated files.
15398 (reg-s390.o, reg-s390.c): Remove rules.
15399 (reg-s390x.o, reg-s390x.c): Likewise.
15400 (s390-linux32.o, s390-linux32.c): Add rules.
15401 (s390-linux64.o, s390-linux64.c): Likewise.
15402 (s390x-linux64.o, s390x-linux64.c): Likewise.
15403 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15404 * linux-s390-low.c: Include <elf.h>.
15405 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15406 (init_registers_s390): Remove prototype.
15407 (init_registers_s390x): Likewise.
15408 (init_registers_s390_linux32): Add prototype.
15409 (init_registers_s390_linux64): Likewise.
15410 (init_registers_s390x_linux64): Likewise.
15411 (s390_num_regs_3264): New define.
15412 (s390_regmap_3264): New global variable.
15413 (s390_cannot_fetch_register): Remove obsolete check.
15414 (s390_cannot_store_register): Likewise.
15415 (s390_collect_ptrace_register): Handle upper/lower register halves.
15416 (s390_supply_ptrace_register): Likewise.
15417 (s390_fill_gregset): Update to register number changes.
15418 (s390_get_hwcap): New routine.
15419 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15420 Install appropriate regmap and register set.
15422 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15424 * server.c (gdbserver_version): Update copyright year to 2010.
15425 * gdbreplay.c (gdbreplay_version): Likewise.
15427 2009-12-28 Doug Evans <dje@google.com>
15429 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15430 elf/external.h. Include <elf.h> instead but only if necessary.
15432 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15434 * linux-low.c (linux_remove_process): Remove `detaching'
15435 parameter. Don't release/detach from thread_db here.
15436 (linux_kill): Release/detach from thread_db here, ...
15437 (linux_detach): ... and here, before actually detaching.
15438 (linux_wait_1): ... and here, when a process exits.
15439 * thread-db.c (any_thread_of): New.
15440 (thread_db_free): Switch the current inferior to a thread of the
15443 2009-12-21 Doug Evans <dje@google.com>
15445 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15447 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15448 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15449 warning ifndef __NR_tkill. Move setting of errno there too.
15450 Delete unnecessary resetting of errno after syscall.
15451 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15453 * configure.ac: Check for dladdr.
15454 * config.in: Regenerate.
15455 * configure: Regenerate.
15456 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15457 (try_thread_db_load): Update.
15459 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15461 2009-12-18 Doug Evans <dje@google.com>
15463 * event-loop.c: Include unistd.h if it exists.
15465 * linux-low.c (my_waitpid): Move definition away from being in
15466 between linux_tracefork_child/linux_test_for_tracefork.
15468 * gdb_proc_service.h (psaddr_t): Fix type.
15469 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15470 signature to match glibc.
15472 2009-12-16 Doug Evans <dje@google.com>
15474 * linux-low.c (linux_read_memory): Fix argument to read.
15476 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15478 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15479 events, don't leave current_inferior pointing at null.
15481 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15483 * win32-low.c (LOG): Delete.
15484 (OUTMSG): Output to stderr.
15485 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15486 on compile time LOG macro.
15487 (win32_wait): Fix debug output.
15489 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15491 * win32-low.c (win32_add_one_solib): If the dll name is
15492 "ntdll.dll", prepend the system directory to the dll path.
15494 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15496 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15498 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15499 Vladimir Prus <vladimir@codesourcery.com>
15501 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15502 * configure.ac: Check for __mcoldfire__ and set
15503 gdb_cv_m68k_is_coldfire.
15504 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15505 reg-cf.o and reg-m68k.o.
15506 * configure: Regenerated.
15508 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15510 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15511 Pass it to thread_db_free.
15512 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15513 proper `detaching' argument to linux_remove_process.
15514 * linux-low.h (thread_db_free): Add `detaching' parameter.
15515 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15517 (thread_db_free): Add `detaching' parameter. Only
15518 call td_ta_clear_event if detaching from process.
15520 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15522 * thread-db.c (thread_db_free): Fix typo.
15524 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15527 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15529 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15531 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15532 with an i686 compiler.
15533 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15535 * configure: Rebuilt.
15537 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15541 * server.c (handle_search_memory_1): Correct read_addr initialization
15542 in loop for searching subsequent chunks.
15544 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15546 * configure.ac: New --with-libthread-db option.
15547 * thread-db.c: Allow direct dependence on libthread_db.
15548 (thread_db_free): Adjust.
15549 * config.in: Regenerate.
15550 * configure: Likewise.
15552 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15555 * thread-db.c (attach_thread): New function.
15556 (maybe_attach_thread): Return success/failure.
15557 (find_new_threads_callback): Adjust.
15558 (thread_db_find_new_threads): Loop until no new threads.
15560 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15562 * proc-service.c (ps_lgetregs): Formatting.
15564 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15566 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15567 * configure.ac: Adjust.
15568 * linux-low.h (struct process_info_private): Move members to struct
15570 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15571 * linux-low.c (linux_remove_process): Adjust.
15572 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15573 * server.c (handle_query): Move code ...
15574 (handle_monitor_command): ... here. New function.
15575 * target.h (struct target_ops): New member.
15576 * thread-db.c (struct thread_db): New.
15577 (libthread_db_search_path): New variable.
15578 (thread_db_create_event, thread_db_enable_reporting)
15579 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15580 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15581 (try_thread_db_load_1, dladdr_to_soname): New functions.
15582 (try_thread_db_load, thread_db_load_search): New functions.
15583 (thread_db_init): Search for libthread_db.
15584 (thread_db_free): New function.
15585 (thread_db_handle_monitor_command): Likewise.
15586 * config.in: Regenerate.
15587 * configure: Regenerate.
15589 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15591 * spu-low.c (spu_kill): Wait for inferior to terminate.
15592 Call clear_inferiors.
15593 (spu_detach): Call clear_inferiors.
15595 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15597 * aclocal.m4: Regenerate.
15598 * config.in: Likewise.
15599 * configure: Likewise.
15601 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15603 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15604 (parse_spufs_run): New function.
15605 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15606 (ppc_breakpoint_at): Handle SPU breakpoints.
15608 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15610 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15611 (SPUFS_MAGIC): Define.
15612 (spu_enumerate_spu_ids): New function.
15613 (linux_qxfer_spu): New function.
15614 (linux_target_ops): Install linux_qxfer_spu.
15616 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15618 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15619 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15620 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15621 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15622 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15623 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15624 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15625 (init_registers_powerpc_cell32l): Add prototype.
15626 (init_registers_powerpc_cell64l): Likewise.
15627 (ppc_arch_setup): Detect Cell/B.E. architecture.
15629 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15631 * Makefile.in (datarootdir): New variable.
15633 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15635 * linux-low.c (linux_write_memory): Update debugging output.
15636 * Makefile.in (clean): Add new descriptions.
15637 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15638 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15639 * configure.srv: Add new files for arm*-*-linux*.
15640 * linux-arm-low.c: Add new declarations.
15641 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15642 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15643 (HWCAP_VFPv3D16): New.
15644 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15645 instead of __IWMMXT__.
15646 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15647 (arm_arch_setup): New.
15648 (target_regsets): Remove #ifdef. Add VFP regset.
15649 (the_low_target): Use arm_arch_setup.
15651 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15653 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15654 the main thread again.
15656 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15658 Adding Neutrino gdbserver.
15659 * configure: Regenerated.
15660 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15661 * configure.srv (i[34567]86-*-nto*): New target.
15662 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15663 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15664 (nto_comctrl) [__QNX__]: New function.
15665 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15667 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15669 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15672 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15673 Pedro Alves <pedro@codesourcery.com>
15675 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15676 don't support CONTEXT_EXTENDED_REGISTERS.
15677 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15678 (the_low_target): Install them.
15679 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15680 failing with ERROR_PIPE_NOT_CONNECTED.
15682 2009-06-30 Doug Evans <dje@google.com>
15683 Pierre Muller <muller@ics.u-strasbg.fr>
15685 Add h/w watchpoint support to x86-linux, win32-i386.
15686 * Makefile.in (SFILES): Add i386-low.c
15687 (i386_low_h): Define.
15688 (i386-low.o): Add dependencies.
15689 (linux-x86-low.o): Add i386-low.h dependency.
15690 (win32-i386-low.o): Ditto.
15691 * i386-low.c: New file.
15692 * i386-low.h: New file.
15693 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15694 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15695 * linux-low.c (linux_add_process): Initialize arch_private.
15696 (linux_remove_process): Free arch_private.
15697 (add_lwp): Initialize arch_private.
15698 (delete_lwp): Free arch_private.
15699 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15701 * linux-low.h (process_info_private): New member arch_private.
15702 (lwp_info): New member arch_private.
15703 (linux_target_ops): New members new_process, new_thread,
15705 (ptid_of): New macro.
15706 * linux-x86-low.c: Include stddef.h, i386-low.h.
15707 (arch_process_info): New struct.
15708 (arch_lwp_info): New struct.
15709 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15710 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15711 (i386_dr_low_get_status): New function.
15712 (x86_insert_point, x86_remove_point): New functions.
15713 (x86_stopped_by_watchpoint): New function.
15714 (x86_stopped_data_address): New function.
15715 (x86_linux_new_process, x86_linux_new_thread): New functions.
15716 (x86_linux_prepare_to_resume): New function.
15717 (the_low_target): Add entries for insert_point, remove_point,
15718 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15720 * server.c (debug_hw_points): New global.
15721 (monitor_show_help): Document set debug-hw-points.
15722 (handle_query): Process "set debug-hw-points".
15723 * server.h (debug_hw_points): Declare.
15724 (paddress): Declare.
15725 * utils.c (NUMCELLS, CELLSIZE): New macros.
15726 (get_sell, xsnprintf, paddress): New functions.
15727 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15728 remove_point, stopped_by_watchpoint, stopped_data_address.
15729 * win32-i386-low.c: Include i386-low.h.
15730 (debug_reg_state): Replaces dr.
15731 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15732 (i386_dr_low_get_status): New function.
15733 (i386_insert_point, i386_remove_point): New functions.
15734 (i386_stopped_by_watchpoint): New function.
15735 (i386_stopped_data_address): New function.
15736 (i386_initial_stuff): Update.
15737 (get_thread_context,set_thread_context,i386_thread_added): Update.
15738 (the_low_target): Add entries for insert_point,
15739 remove_point, stopped_by_watchpoint, stopped_data_address.
15740 * win32-low.c (win32_insert_watchpoint): New function.
15741 (win32_remove_watchpoint): New function.
15742 (win32_stopped_by_watchpoint): New function.
15743 (win32_stopped_data_address): New function.
15744 (win32_target_ops): Add entries for insert_watchpoint,
15745 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15746 * win32-low.h (win32_target_ops): New members insert_point,
15747 remove_point, stopped_by_watchpoint, stopped_data_address.
15749 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15751 * server.c (process_serial_event): Re-return unsupported, not
15752 error, if the type isn't recognized. Re-allow supporting only
15753 insert or remove packets. Also call require_running for
15754 breakpoints. Add missing break statement to default case. Tidy.
15755 * target.h (struct target_ops): Rename insert_watchpoint to
15756 insert_point, and remove_watchpoint to remove_point.
15758 * linux-low.h (struct linux_target_ops): Likewise.
15759 * linux-low.c (linux_insert_watchpoint): Rename to ...
15760 (linux_insert_point): ... this. Adjust.
15761 (linux_remove_watchpoint): Rename to ...
15762 (linux_remove_point): ... this. Adjust.
15763 (linux_target_ops): Adjust.
15764 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15765 (cris_insert_point): ... this.
15766 (cris_remove_watchpoint): Rename to ...
15767 (cris_remove_point): ... this.
15768 (the_low_target): Adjust.
15770 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15772 * server.c (handle_v_kill): Pass signal_pid to
15773 kill_inferior if multi_process is zero.
15775 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15777 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15778 * target.h (target_ops): Comment for *_watchpoint to make it clear
15779 the functions can get types '0' and '1'.
15781 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15783 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15784 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15785 * regcache.c (get_regcache): Likewise.
15786 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15787 * win32-low.c (child_fetch_inferior_registers): Remove check for
15790 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15791 Pedro Alves <pedro@codesourcery.com>
15793 * target.h (struct target_ops) <supports_multi_process>: New
15795 (target_supports_multi_process): New.
15796 * server.c (handle_query): Even if GDB reports support, only
15797 enable multi-process if the target also supports it. Report
15798 multi-process support only if the target backend supports it.
15799 * linux-low.c (linux_supports_multi_process): New function.
15800 (linux_target_ops): Install it as target_supports_multi_process
15803 2009-05-24 Doug Evans <dje@google.com>
15805 Global renaming of find_thread_pid to find_thread_ptid.
15806 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15807 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15808 All callers updated.
15810 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15811 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15814 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15815 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15816 (linux_resume_one_lwp): Ditto.
15818 2009-05-23 Doug Evans <dje@google.com>
15820 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15821 from struct inferior_list_entry * to struct lwp_info *.
15822 All callers updated.
15824 2009-05-13 Doug Evans <dje@google.com>
15826 * linux-x86-low.c: Don't include assert.h.
15827 (x86_siginfo_fixup): Use fatal, not assert.
15828 (x86_arch_setup): Fix comment.
15830 2009-05-12 Doug Evans <dje@google.com>
15832 Biarch support for i386/amd64 gdbserver.
15833 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15834 Add linux-x86-low.c.
15835 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15836 (linux-x86-low.o): Add.
15837 * linux-x86-64-low.c: Delete.
15838 * linux-i386-low.c: Delete.
15839 * linux-x86-low.c: New file.
15840 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15842 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15844 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15845 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15846 (linux_child_pid_to_exec_file): New function.
15847 (elf_64_header_p, elf_64_file_p): New functions.
15848 (siginfo_fixup): New function.
15849 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15850 give target a chance to convert layout.
15851 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15852 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15854 2009-05-07 Doug Evans <dje@google.com>
15856 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15857 (regsets_store_inferior_registers): Ditto.
15859 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15863 * linux-low.c (must_set_ptrace_flags): Delete.
15864 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15866 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15867 `lwp->must_set_ptrace_flags' instead.
15868 (linux_wait_for_event_1): Set ptrace options here.
15869 (linux_wait_1): ... not here.
15871 2009-04-30 Doug Evans <dje@google.com>
15873 * inferiors.c (started_inferior_callback): New function.
15874 (attached_inferior_callback): New function.
15875 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15876 * server.c (print_started_pid, print_attached_pid): New functions.
15877 (detach_or_kill_for_exit): New function.
15878 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15879 * server.h (have_started_inferiors_p): Declare.
15880 (have_attached_inferiors_p): Declare.
15882 * inferiors.c (remove_process): Fix memory leak, free process.
15883 * linux-low.c (linux_remove_process): New function.
15884 (linux_kill): Call it instead of remove_process.
15885 (linux_detach, linux_wait_1): Ditto.
15887 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15889 * configure.srv: Add x86 Windows CE target.
15891 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15893 * inferiors.c (get_thread_process): Make global.
15894 * server.h (get_thread_process): Add prototype.
15895 * thread-db.c (find_one_thread): Use get_thread_process
15896 instead of current_process.
15897 (thread_db_get_tls_address): Do not crash if called when
15898 thread layer is not yet initialized.
15900 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15902 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15903 * spu-low.c (current_tid): Rename to ...
15904 (current_ptid): ... this.
15905 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15906 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15907 ptid_get_lwp (current_ptid) instead of current_tid.
15908 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15909 instead of current_tid. Use find_process_pid to verify pid
15910 argument is valid. Pass proper argument to remove_process.
15911 (spu_thread_alive): Compare current_ptid instead of current_tid.
15912 (spu_resume): Likewise.
15914 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15916 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15919 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15921 Implement the multiprocess extensions, and add linux multiprocess
15924 * server.h (ULONGEST): Declare.
15925 (struct ptid, ptid_t): New.
15926 (minus_one_ptid, null_ptid): Declare.
15927 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15928 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15929 (struct inferior_list_entry): Change `id' type from unsigned from
15931 (struct sym_cache, struct breakpoint, struct
15932 process_info_private): Forward declare.
15933 (struct process_info): Declare.
15934 (current_process): Declare.
15935 (all_processes): Declare.
15936 (initialize_inferiors): Declare.
15937 (add_thread): Adjust to use ptid_t.
15938 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15939 (add_process, remove_process, find_thread_pid): Declare.
15940 (find_inferior_id): Adjust to use ptid_t.
15941 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15942 (multi_process): Declare.
15943 (push_event): Adjust to use ptid_t.
15944 (read_ptid, write_ptid): Declare.
15945 (prepare_resume_reply): Adjust to use ptid_t.
15946 (clear_symbol_cache): Declare.
15947 * inferiors.c (all_processes): New.
15948 (null_ptid, minus_one_ptid): New.
15949 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15950 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15951 (add_thread): Change unsigned long to ptid. Remove gdb_id
15953 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15954 (gdb_id_to_thread): Rename to ...
15955 (find_thread_pid): ... this. Change unsigned long to ptid.
15956 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15957 (loaded_dll, pull_pid_from_list): Adjust.
15958 (add_process, remove_process, find_process_pid)
15959 (get_thread_process, current_process, initialize_inferiors): New.
15960 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15961 (struct target_waitstatus) <related_pid>: Ditto.
15962 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15963 return type to int.
15964 (struct target_ops) <join>: Add `pid' argument.
15965 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15966 (struct target_ops) <wait>: Add `ptid' field. Change return type
15968 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15969 (mywait): Add `ptid' argument. Change return type to ptid_t.
15970 (target_pid_to_str): Declare.
15971 * target.c (set_desired_inferior): Adjust to use ptids.
15972 (mywait): Add new `ptid' argument. Adjust.
15973 (target_pid_to_str): New.
15974 * mem-break.h (free_all_breakpoints): Declare.
15975 * mem-break.c (breakpoints): Delelete.
15976 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15977 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15978 to use per-process breakpoint list.
15979 (free_all_breakpoints): New.
15980 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15981 (symbol_cache, all_symbols_looked_up): Delete.
15983 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15985 (prepare_resume_reply): Change ptid argument's type from unsigned
15986 long to ptid_t. Adjust. Implement W;process and X;process.
15987 (free_sym_cache, clear_symbol_cache): New.
15988 (look_up_one_symbol): Adjust to per-process symbol cache. *
15989 * server.c (cont_thread, general_thread, step_thread): Change type
15991 (attached): Delete.
15992 (multi_process): New.
15993 (last_ptid): Change type to ptid_t.
15994 (struct vstop_notif) <ptid>: Change type to ptid_t.
15995 (queue_stop_reply, push_event): Change `ptid' argument's type to
15997 (discard_queued_stop_replies): Add `pid' argument.
15998 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15999 changes. Don't reference the `attached' global.
16000 (attach_inferior): Adjust to mywait interface changes.
16001 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16002 features. Handle and report "multiprocess+". Handle
16004 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16006 (handle_v_kill): New.
16007 (handle_v_stopped): Adjust to use target_pid_to_str.
16008 (handle_v_requests): Allow multiple attaches and runs when
16009 multiprocess extensions are in effect. Handle "vKill".
16010 (myresume): Adjust to use ptids.
16011 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16012 (handle_status): Adjust to discard_queued_stop_replies interface
16014 (first_thread_of, kill_inferior_callback)
16015 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16016 (main): Call initialize_inferiors. Adjust to use ptids, killing
16017 and detaching from all inferiors. Handle multiprocess packet
16019 * linux-low.h: Include gdb_proc_service.h.
16020 (struct process_info_private): New.
16021 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16022 <lwpid_of>: Use ptid_get_lwp.
16023 (get_lwp_thread): Adjust.
16024 (struct lwp_info): Add `dead' member.
16025 (find_lwp_pid): Declare.
16026 * linux-low.c (thread_db_active): Delete.
16027 (new_inferior): Adjust comment.
16028 (inferior_pid): Delete.
16029 (linux_add_process): New.
16030 (handle_extended_wait): Adjust.
16031 (add_lwp): Change unsigned long to ptid.
16032 (linux_create_inferior): Add process to processes table. Adjust
16033 to use ptids. Don't set new_inferior here.
16034 (linux_attach_lwp): Rename to ...
16035 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16036 it. Adjust to use ptids.
16037 (linux_attach_lwp): New.
16038 (linux_attach): Add process to processes table. Don't set
16040 (struct counter): New.
16041 (second_thread_of_pid_p, last_thread_of_process_p): New.
16042 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16043 multiple processes.
16044 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16045 processes. Remove process from process table.
16046 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16047 to multiple processes.
16048 (any_thread_of): New.
16049 (linux_detach): Add `pid' argument, and handle it. Remove process
16050 from processes table.
16051 (linux_join): Add `pid' argument. Handle it.
16052 (linux_thread_alive): Change unsighed long argument to ptid_t.
16053 Consider dead lwps as not being alive.
16054 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16055 threads we're not interested in.
16056 (same_lwp, find_lwp_pid): New.
16057 (linux_wait_for_lwp): Change `pid' argument's type from int to
16059 (linux_wait_for_event): Rename to ...
16060 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16061 from int to ptid_t. Adjust.
16062 (linux_wait_for_event): New.
16063 (linux_wait_1): Add `ptid' argument. Change return type to
16064 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16065 that exit from the process table.
16066 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16068 (mark_lwp_dead): New.
16069 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16070 stopping all threads, mark its main lwp as dead.
16071 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16073 (fetch_register, usr_store_inferior_registers)
16074 (regsets_fetch_inferior_registers)
16075 (regsets_store_inferior_registers, linux_read_memory)
16076 (linux_write_memory): Inline `inferior_pid'.
16077 (linux_look_up_symbols): Adjust to use per-process
16078 `thread_db_active'.
16079 (linux_request_interrupt): Adjust to use ptids.
16080 (linux_read_auxv): Inline `inferior_pid'.
16081 (initialize_low): Don't reference thread_db_active.
16082 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16083 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16084 (ps_getpid): Return the pid of the current inferior.
16085 * thread-db.c (proc_handle, thread_agent): Delete.
16086 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16088 (find_one_thread): Change argument type to ptid_t. Adjust to
16090 (maybe_attach_thread): Adjust to per-process data and ptids.
16091 (thread_db_find_new_threads): Ditto.
16092 (thread_db_init): Ditto.
16093 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16094 processes table. Adjust to use ptids.
16095 (spu_kill, spu_detach): Adjust interface. Remove process from
16097 (spu_join, spu_thread_alive): Adjust interface.
16098 (spu_wait): Adjust interface. Remove process from processes
16099 table. Adjust to use ptids.
16100 * win32-low.c (current_inferior_tid): Delete.
16101 (current_inferior_ptid): New.
16102 (debug_event_ptid): New.
16103 (thread_rec): Take a ptid. Adjust.
16104 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16105 (child_delete_thread): Ditto.
16106 (do_initial_child_stuff): Add `attached' argument. Add process to
16108 (child_fetch_inferior_registers, child_store_inferior_registers):
16110 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16111 (win32_attach): Pass 1 to do_initial_child_stuff.
16112 (win32_kill): Adjust interface. Remove process from processes
16114 (win32_detach): Ditto.
16115 (win32_join): Adjust interface.
16116 (win32_thread_alive): Take a ptid.
16117 (win32_resume): Adjust to use ptids.
16118 (get_child_debug_event): Ditto.
16119 (win32_wait): Adjust interface. Remove exiting process from
16122 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16124 Non-stop mode support.
16126 * server.h (non_stop): Declare.
16127 (gdb_client_data, handler_func): Declare.
16128 (delete_file_handler, add_file_handler, start_event_loop):
16130 (handle_serial_event, handle_target_event, push_event)
16131 (putpkt_notif): Declare.
16132 * target.h (enum resume_kind): New.
16133 (struct thread_resume): Replace `step' field by `kind' field.
16134 (TARGET_WNOHANG): Define.
16135 (struct target_ops) <wait>: Add `options' argument.
16136 <supports_non_stop, async, start_non_stop>: New fields.
16137 (target_supports_non_stop, target_async): New.
16138 (start_non_stop): Declare.
16139 (mywait): Add `options' argument.
16140 * target.c (mywait): Add `options' argument. Print child exit
16141 notifications here.
16142 (start_non_stop): New.
16143 * server.c (non_stop, own_buf, mem_buf): New globals.
16144 (struct vstop_notif): New.
16145 (notif_queue): New global.
16146 (queue_stop_reply, push_event, discard_queued_stop_replies)
16147 (send_next_stop_reply): New.
16148 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16150 (attach_inferior): In non-stop mode, don't wait for the target
16152 (handle_general_set): Handle QNonStop.
16153 (handle_query): When handling qC, return the current general
16154 thread, instead of the first thread of the list.
16155 (handle_query): If the backend supports non-stop mode, include
16156 QNonStop+ in the qSupported query response.
16157 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16159 (handle_v_attach, handle_v_run): Handle non-stop mode.
16160 (handle_v_stopped): New.
16161 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16162 (myresume): Adjust to use resume_kind. Handle non-stop.
16163 (queue_stop_reply_callback): New.
16164 (handle_status): Handle non-stop mode.
16165 (main): Clear non_stop flag on reconnection. Use the event-loop.
16166 Refactor serial protocol handling from here ...
16167 (process_serial_event): ... to this new function. When GDB
16168 selects any thread, select one here. In non-stop mode, wait until
16169 GDB acks all pending events before exiting.
16170 (handle_serial_event, handle_target_event): New.
16171 * remote-utils.c (remote_open): Install remote_desc in the event
16173 (remote_close): Remove remote_desc from the event loop.
16174 (putpkt_binary): Rename to...
16175 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16176 (putpkt_binary): New as wrapper around putpkt_binary_1.
16177 (putpkt_notif): New.
16178 (prepare_resume_reply): In non-stop mode, don't change the
16180 * event-loop.c: New.
16181 * Makefile.in (OBJ): Add event-loop.o.
16182 (event-loop.o): New rule.
16184 * linux-low.h (pid_of): Moved here.
16186 (get_lwp_thread): Use lwpid_of.
16187 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16188 * linux-low.c (pid_of): Delete.
16189 (inferior_pid): Use lwpid_of.
16190 (linux_event_pipe): New.
16191 (target_is_async_p): New.
16193 (handle_extended_wait): Use lwpid_of.
16194 (add_lwp): Don't set lwpid field.
16195 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16196 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16197 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16198 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16199 first. Adjust to linux_wait_for_event interface changes. Use
16201 (linux_detach): Don't delete the main lwp here.
16202 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16203 (status_pending_p): Don't consider explicitly suspended lwps.
16204 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16205 pointer. Add OPTIONS argument. Change return type to int. Use
16206 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16207 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16208 pointer. Add status pointer argument. Return a pid instead of a
16209 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16210 changes. In non-stop mode, don't switch to a random thread.
16211 (linux_wait): Rename to...
16212 (linux_wait_1): ... this. Add target_options argument, and handle
16213 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16214 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16215 clean exit and signal exit code. Don't stop all threads in
16216 non-stop mode. In all-stop mode, only stop all threads when
16217 reporting a stop to GDB. Handle explicit thread stop requests.
16218 (async_file_flush, async_file_mark): New.
16220 (send_sigstop): Use lwpid_of.
16221 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16222 interface changes. In non-stop mode, don't switch to a random
16224 (linux_resume_one_lwp): Use lwpid_of.
16225 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16226 (linux_resume_one_thread): ... this. Handle resume_stop. In
16227 non-stop mode, don't look for pending flag in all threads.
16228 (resume_status_pending_p): Don't consider explicitly suspended
16230 (my_waitpid): Reimplement. Emulate __WALL.
16231 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16233 (sigchld_handler, linux_supports_non_stop, linux_async)
16234 (linux_start_non_stop): New.
16235 (linux_target_ops): Register linux_supports_non_stop, linux_async
16236 and linux_start_non_stop.
16237 (initialize_low): Install SIGCHLD handler.
16238 * thread-db.c (thread_db_create_event, find_one_thread)
16239 (thread_db_get_tls_address): Use lwpid_of.
16240 * win32-low.c (win32_detach): Adjust to use resume_kind.
16241 (win32_wait): Add `options' argument.
16242 * spu-low.c (spu_resume): Adjust to use resume_kind.
16243 (spu_wait): Add `options' argument.
16245 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16247 Decouple target code from remote protocol.
16249 * target.h (enum target_waitkind): New.
16250 (struct target_waitstatus): New.
16251 (struct target_ops) <wait>: Return an unsigned long. Take a
16252 target_waitstatus pointer instead of a char pointer.
16253 (mywait): Likewise.
16254 * target.c (mywait): Change prototype to return an unsigned long.
16255 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16256 * server.h (thread_from_wait, old_thread_from_wait): Delete
16258 (prepare_resume_reply): Change prototype to take a
16260 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16261 (last_status, last_ptid): New.
16262 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16263 pid instead of a signal.
16264 (attach_inferior): Remove "status" and "signal" parameters.
16266 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16268 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16269 (handle_v_requests, myresume): Remove "status" and "signal"
16270 parameters. Adjust.
16271 (handle_status): New.
16272 (main): Delete local `status'. Adjust.
16273 * remote-utils.c: Include target.h.
16274 (prepare_resume_reply): Change prototype to take a
16275 target_waitstatus. Adjust.
16277 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16279 * spu-low.c (spu_wait): Adjust.
16280 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16282 (win32_wait): Adjust.
16284 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16286 * target.h (struct thread_resume): Delete leave_stopped member.
16287 (struct target_ops): Add a `n' argument to the `resume' callback.
16288 * server.c (start_inferior): Adjust.
16289 (handle_v_cont, myresume): Adjust.
16290 * linux-low.c (check_removed_breakpoint): Adjust to resume
16291 interface change, and to removed leave_stopped field.
16292 (resume_ptr): Delete.
16293 (struct thread_resume_array): New.
16294 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16295 resume interface change.
16296 (linux_continue_one_thread, linux_queue_one_thread)
16297 (resume_status_pending_p): Check if the resume field is NULL
16298 instead of checking the leave_stopped member.
16299 (linux_resume): Adjust to the target resume interface change.
16300 * spu-low.c (spu_resume): Adjust to the target resume interface
16302 * win32-low.c (win32_detach, win32_resume): Ditto.
16304 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16306 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16308 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16310 (linux_continue_one_thread): Only preserve the stepping flag if
16311 there's a pending breakpoint.
16313 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16315 * server.c (main): After the inferior having exited, call
16316 remote_close before exiting gdbserver.
16318 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16320 Fix size of FPSCR in Power 7 processors.
16321 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16322 (PPC_FEATURE_HAS_DFP): New #define.
16323 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16326 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16328 * server.c (handle_query) Whitespace and formatting.
16330 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16332 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16333 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16334 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16335 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16336 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16337 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16338 Makefile.in, configure.ac: Fix whitespace throughout.
16339 * configure: Regenerate.
16341 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16343 * inferiors.c (find_inferior): Make it safe for the callback
16344 function to delete the currently iterated inferior.
16346 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16348 * Makefile.in (linuw_low_h): Move higher.
16349 (thread-db.o): Depend on $(linux_low_h).
16351 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16353 Rename "process" to "lwp" throughout.
16355 * linux-low.c (all_processes): Rename to...
16356 (all_lwps): ... this.
16357 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16358 (add_process): Rename to ...
16359 (add_lwp): ... this. Adjust.
16360 (linux_create_inferior): Adjust.
16361 (linux_attach_lwp): Adjust.
16362 (linux_attach): Adjust.
16363 (linux_kill_one_process): Rename to ...
16364 (linux_kill_one_lwp): ... this. Adjust.
16365 (linux_kill): Adjust.
16366 (linux_detach_one_process): Rename to ...
16367 (linux_detach_one_lwp): ... this. Adjust.
16368 (linux_detach): Adjust.
16369 (check_removed_breakpoint): Adjust.
16370 (status_pending_p): Adjust.
16371 (linux_wait_for_process): Rename to ...
16372 (linux_wait_for_lwp): ... this. Adjust.
16373 (linux_wait_for_event): Adjust.
16374 (send_sigstop): Adjust.
16375 (wait_for_sigstop): Adjust.
16376 (stop_all_processes): Rename to ...
16377 (stop_all_lwps): ... this.
16378 (linux_resume_one_process): Rename to ...
16379 (linux_resume_one_lwp): ... this. Adjust.
16380 (linux_set_resume_request, linux_continue_one_thread)
16381 (linux_queue_one_thread, resume_status_pending_p)
16382 (usr_store_inferior_registers, regsets_store_inferior_registers)
16383 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16385 * linux-low.h (get_process): Rename to ...
16386 (get_lwp): ... this. Adjust.
16387 (get_thread_process): Rename to ...
16388 (get_thread_lwp): ... this. Adjust.
16389 (get_process_thread): Rename to ...
16390 (get_lwp_thread): ... this. Adjust.
16391 (struct process_info): Rename to ...
16392 (struct lwp_info): ... this.
16393 (all_processes): Rename to ...
16394 (all_lwps): ... this.
16395 * proc-service.c (ps_lgetregs): Adjust.
16396 * thread-db.c (thread_db_create_event, find_one_thread)
16397 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16399 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16401 * server.c (handle_query): Handle "qAttached".
16403 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16405 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16406 GPLv3, update license URL.
16408 2009-03-01 Doug Evans <dje@google.com>
16410 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16411 (server_h): Add gdb_signals.h.
16412 (signals.o): Update.
16413 * server.h (target_signal_from_host,target_signal_to_host_p)
16414 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16416 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16418 * remote-utils.c (getpkt): Also generate remote-debug
16419 information if noack_mode is set.
16421 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16423 * server.c (handle_query): Report qXfer:siginfo:read and
16424 qXfer:siginfo:write as supported and handle them.
16425 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16426 * linux-low.c (linux_xfer_siginfo): New.
16427 (linux_target_ops): Set it.
16429 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16431 * server.c (gdbserver_usage): Mention --remote-debug.
16432 (main): Accept '--remote-debug' switch.
16434 2009-01-18 Doug Evans <dje@google.com>
16436 * regcache.c (new_register_cache): No need to check result of xcalloc.
16437 * server.c (handle_search_memory): Back out calls to xmalloc,
16438 result is checked and error is returned to user upon failure.
16439 (handle_query): Ditto. Add more checks for result of malloc.
16440 (handle_v_cont): Check result of malloc, report error back to
16442 (handle_v_run): Ditto. Call freeargv.
16443 * server.h (freeargv): Declare.
16444 * utils.c (freeargv): New fn.
16446 2009-01-15 Doug Evans <dje@google.com>
16448 * gdbreplay.c (perror_with_name): Make arg const char *.
16449 * server.h (target_signal_to_name): Make return type const char *.
16450 * thread-db.c (thread_db_err_str): Make return type const char *.
16451 * utils.c (perror_with_name): Make arg const char *.
16453 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16455 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16456 when handling a EXIT_PROCESS_DEBUG_EVENT.
16458 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16460 * gdbreplay.c (gdbreplay_version): Update copyright year.
16461 * server.c (gdbserver_version): Likewise.
16463 2009-01-05 Doug Evans <dje@google.com>
16465 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16466 (handle_extended_wait): Improve comment.
16468 2008-12-13 Doug Evans <dje@google.com>
16470 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16471 * server.h (ATTR_MALLOC): New macro.
16472 (xmalloc,xcalloc,xstrdup): Declare.
16473 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16474 * inferiors.c: Ditto.
16475 * linux-low.c: Ditto.
16476 * mem-break.c: Ditto.
16477 * regcache.c: Ditto.
16478 * remote-utils.c: Ditto.
16481 * win32-low.c: Ditto.
16483 2008-12-12 Doug Evans <dje@google.com>
16485 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16486 in debugging printf.
16488 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16490 2008-12-09 Doug Evans <dje@google.com>
16492 * linux-low.h (struct process_info): Delete member tid, unused.
16493 * thread-db.c (find_one_thread): Update.
16494 (maybe_attach_thread): Update.
16496 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16498 * target.h (struct target_ops): Add qxfer_osdata member.
16499 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16501 (linux_qxfer_osdata): New functions.
16502 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16504 * server.c (handle_query): Handle "qXfer:osdata:read:".
16505 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16506 (buffer_xml_printf): New functions.
16507 * server.h (struct buffer): New.
16508 (buffer_grow_str, buffer_grow_str0): New macros.
16509 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16510 (buffer_xml_printf): Declare.
16512 2008-11-24 Doug Evans <dje@google.com>
16514 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16516 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16518 * server.c (handle_v_run): Always use the supplied argument list.
16520 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16522 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16523 (xtensa_regmap_table): Add entry for scompare1.
16525 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16527 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16528 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16529 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16530 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16531 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16532 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16533 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16534 XML target descriptions.
16535 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16536 when inferior is running on an ISA 2.05 or later processor. Add
16537 special case to return offset for full 64-bit slot of FPSCR when
16540 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16542 * Makefile.in (SFILES, clean): Added sparc64 files.
16543 (reg-sparc64.o, reg-sparc64.c): New.
16544 * configure.srv (sparc*-*-linux*): New configuration.
16545 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16546 syscall arguments for SPARC.
16547 (regsets_store_inferior_registers): Likewise.
16548 * linux-sparc-low.c: New file.
16550 2008-10-21 Doug Evans <dje@google.com>
16552 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16553 (READLINE_DIR,READLINE_DEP): Delete.
16554 (INTERNAL_CFLAGS): Update.
16555 (LINTFLAGS): Update.
16557 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16559 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16560 whole argv from the last run, not just argv[0].
16562 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16564 * regcache.c (new_register_cache): Return NULL if the register
16565 cache size isn't known yet.
16566 (free_register_cache): Avoid dereferencing a NULL regcache.
16568 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16570 * configure.srv: Merge MIPS and MIPS64.
16572 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16574 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16576 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16578 * Makefile.in: Add required vsx dependencies.
16580 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16581 Declare init_registers_powerpc_vsx32l.
16582 Declare init_registers_powerpc_vsx64l.
16583 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16584 (ppc_arch_setup): Check for VSX in hwcap.
16585 (ppc_fill_vsxregset): New function.
16586 (ppc_store_vsxregset): New function.
16587 Add new VSX entry in regset_info target_regsets.
16589 * configure.srv: Add new VSX dependencies.
16591 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16593 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16594 (remote_open): Set or clear transport_is_reliable.
16595 (putpkt_binary): Don't expect acks in noack mode.
16596 (getpkt): Don't send ack/nac in noack mode.
16597 * server.c (handle_general_set): Handle QStartNoAckMode.
16598 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16600 (main): Reset noack_mode on every connection.
16601 * server.h (noack_mode): Declare.
16603 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16605 * Makefile.in (GDBREPLAY_OBS): New variable.
16606 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16608 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16609 Daniel Jacobowitz <dan@codesourcery.com>
16611 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16612 (usr_store_inferior_registers): Likewise.
16613 (regsets_store_inferior_registers): Likewise.
16615 2008-07-31 Rolf Jansen <rj@surtec.com>
16616 Pedro Alves <pedro@codesourcery.com>
16618 * configure.ac: Check for memmem declaration.
16619 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16620 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16621 (disable_packet_qfThreadInfo): Unconditionally compile.
16622 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16623 * configure, config.in: Regenerate.
16625 2008-07-28 Doug Kwan <dougkwan@google.com>
16627 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16628 (linux_write_memory): Remove declaration of errno.
16630 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16632 * linux-low.c (handle_extended_wait): Do not use "status"
16633 variable uninitialized.
16635 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16637 * server.c (handle_v_attach): Inhibit reporting dll changes.
16639 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16641 * remote-utils.c (prepare_resume_reply): If requested, don't
16642 output "thread:TID" in the T stop reply.
16644 * server.c (disable_packet_vCont, disable_packet_Tthread)
16645 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16646 (handle_query): If requested, disable support for qC, qfThreadInfo
16648 (handle_v_requests): If requested, disable support for vCont.
16649 (gdbserver_show_disableable): New.
16650 (main): Handle --disable-packet and --disable-packet=LIST.
16652 * server.h (disable_packet_vCont, disable_packet_Tthread)
16653 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16655 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16657 * server.c (gdbserver_usage): Mention --version.
16659 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16661 * Makefile.in (gdbreplay.o): New rule.
16663 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16665 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16666 message, not gdbserver.
16668 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16669 Nathan Sidwell <nathan@codesourcery.com>
16670 Joseph Myers <joseph@codesourcery.com>
16672 * acinclude.m4: Include ../../config/acx.m4.
16673 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16674 * configure, config.in: Regenerate.
16675 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16676 * server.c (gdbserver_version): Print PKGVERSION.
16677 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16678 (main): Adjust gdbserver_usage calls.
16679 * gdbreplay.c (version, host_name): Add declarations.
16680 (gdbreplay_version, gdbreplay_usage): New.
16681 (main): Accept --version and --help options.
16683 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16685 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16686 (arm_breakpoint_at): Handle Thumb.
16687 (the_low_target): Add comment.
16689 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16691 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16693 2008-05-09 Doug Evans <dje@google.com>
16695 * server.h (decode_search_memory_packet): Declare.
16696 * remote-utils.c (decode_search_memory_packet): New fn.
16697 * server.c (handle_search_memory_1): New fn.
16698 (handle_search_memory): New fn.
16699 (handle_query): Process qSearch:memory packets.
16701 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16703 * regcache.c (registers_length): Remove.
16704 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16705 full register packet.
16706 * regcache.h (registers_length): Remove prototype.
16707 * server.h (PBUFSIZ): Define to 16384.
16709 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16711 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16712 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16713 powerpc-64l.o, and powerpc-altivec64l.o.
16714 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16715 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16716 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16717 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16718 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16721 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16722 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16723 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16724 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16725 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16726 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16727 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16728 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16729 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16730 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16733 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16734 (init_registers_powerpc_32l): ... this new prototype.
16735 (init_registers_powerpc_32): Remove, replace by ...
16736 (init_registers_powerpc_altivec32l): ... this new prototype.
16737 (init_registers_powerpc_e500): Remove, replace by ...
16738 (init_registers_powerpc_e500l): ... this new prototype.
16739 (init_registers_ppc64): Remove, replace by ...
16740 (init_registers_powerpc_64l): ... this new prototype.
16741 (init_registers_powerpc_64): Remove, replace by ...
16742 (init_registers_powerpc_altivec64l): ... this new prototype.
16743 (ppc_num_regs): Set to 73.
16744 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16745 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16746 (ppc_cannot_store_register): Handle orig_r3 and trap.
16747 (ppc_arch_setup): Update init_registers_... calls.
16748 (ppc_fill_gregset): Handle orig_r3 and trap.
16750 * inferiors.c (clear_inferiors): Reset current_inferior.
16752 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16754 * acinclude.m4: Add override.m4.
16755 * configure: Regenerate.
16757 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16759 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16760 initial call to init_register_ppc64.
16762 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16764 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16765 single powerpc*-*-linux* case.
16766 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16768 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16770 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16771 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16773 * linux-ppc-low.c: Include <elf.h>.
16774 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16775 (ppc_hwcap): New global variable.
16776 (ppc_regmap): Remove __SPE__ #ifdef sections.
16777 (ppc_regmap_e500): New global variable.
16778 (ppc_cannot_store_register): Update __SPE__ special case.
16779 (ppc_get_hwcap): New function.
16780 (ppc_arch_setup): Use it to determine whether inferior supports
16781 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16782 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16783 Do not access registers if target does not support AltiVec.
16784 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16785 Do not access registers if target does not support SPE.
16786 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16788 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16790 * linux-low.c (disabled_regsets, num_regsets): New.
16791 (use_regsets_p): Delete.
16792 (linux_wait_for_process): Clear disabled_regsets.
16793 (regsets_fetch_inferior_registers): Check and set it.
16794 (regsets_store_inferior_registers): Likewise.
16795 (linux_fetch_registers, linux_store_registers): Do not use
16797 (initialize_low): Allocate disabled_regsets.
16799 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16801 * Makefile.in (LIBOBJS): New.
16802 (OBS): Use LIBOBJS.
16803 (memmem.o): New rule.
16804 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16805 * configure: Regenerated.
16807 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16809 * server.c (handle_query): Never return "unsupported" for
16810 qXfer:features:read queries.
16812 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16814 * server.c (get_features_xml): Fix inverted condition.
16815 (handle_query): Always support qXfer:feature:read.
16817 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16819 * server.c (wrapper_argv): New.
16820 (start_inferior): Handle wrapper_argv. If set, expect an extra
16822 (gdbserver_usage): Document --wrapper.
16823 (main): Parse --wrapper.
16825 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16827 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16828 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16829 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16830 (ppc_set_pc): Likewise.
16831 (ppc_arch_setup): New function.
16832 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16833 of collect_register.
16834 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16836 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16838 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16839 instead of linux-ppc64-low.o.
16840 * linux-ppc64-low.c: Remove file.
16841 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16842 (linux-ppc64-low.o): Remove rule.
16844 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16845 (init_registers_powerpc_64): Likewise.
16846 (ppc_regmap): Conditionally define depending on __powerpc64__.
16847 (ppc_cannot_store_register): Do not special-case "fpscr" when
16848 compiled on __powerpc64__.
16849 (ppc_collect_ptrace_register): New function.
16850 (ppc_supply_ptrace_register): New function.
16851 (ppc_breakpoint): Change type to "unsigned int".
16852 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16853 (the_low_target): Conditionally provide initializers for the
16854 arch_setup member depending on __powerpc64__. Install
16855 collect_ptrace_register and supply_ptrace_register members.
16857 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16859 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16860 * server.c (gdbserver_xmltarget): Define.
16861 (get_features_xml): Use it to replace "target.xml" and arch_string.
16863 * configure.srv: Remove srv_xmltarget. Add XML files that were
16864 mentioned there to srv_xmlfiles instead. Remove conditional tests
16865 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16866 srv_xmlfiles and srv_regobj to include all possible choices.
16867 * configure.ac (srv_xmltarget): Remove.
16868 (srv_xmlfiles): Do not add "target.xml".
16869 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16870 checks for supplementary target information.
16871 * configure: Regenerate.
16872 * Makefile.in (XML_TARGET): Remove.
16873 (target.xml): Remove rule.
16874 (clean): Do not clean up target.xml.
16875 (.PRECIOUS): Do not mention target.xml.
16877 * target.h (struct target_ops): Remove arch_string member.
16878 * linux-low.c (linux_arch_string): Remove.
16879 (linux_target_ops): Remove arch_string initializer.
16880 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16881 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16882 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16883 * spu-low.c (spu_arch_string): Remove.
16884 (spu_target_ops): Remove arch_string initializer.
16885 * win32-low.c (win32_arch_string): Remove.
16886 (win32_target_ops): Remove arch_string initializer.
16887 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16888 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16889 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16891 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16893 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16894 by collect_ptrace_register and supply_ptrace_register hooks.
16895 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16896 instead of checking for the_low_target.left_pad_xfer.
16897 (usr_store_inferior_registers): Use collect_ptrace_register callback
16898 instead of checking for the_low_target.left_pad_xfer.
16900 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16901 (s390_supply_ptrace_register): Likewise.
16902 (s390_fill_gregset): Call s390_collect_ptrace_register.
16903 (the_low_target): Update.
16905 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16906 (ppc_supply_ptrace_register): Likewise.
16907 (the_low_target): Update.
16909 * linux-i386-low.c (the_low_target): Update.
16910 * linux-x86-64-low.c (the_low_target): Update.
16912 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16914 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16915 reg-s390.o and reg-s390x.o.
16917 * linux-low.c (new_inferior): New global variable.
16918 (linux_create_inferior, linux_attach): Set it.
16919 (linux_wait_for_process): Call the_low_target.arch_setup after the
16920 target has stopped for the first time.
16921 (initialize_low): Do not call the_low_target.arch_setup.
16923 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16924 (s390_set_pc): Likewise.
16925 (s390_arch_setup): New function.
16926 (the_low_target): Use s390_arch_setup as arch_setup routine.
16928 * regcache.c (realloc_register_cache): New function.
16929 (set_register_cache): Call it for each existing regcache.
16931 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16933 * server.h (init_registers): Remove prototype.
16935 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16936 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16937 instead of init_registers ().
16938 * linux-arm-low.c (init_registers_arm): Add prototype.
16939 (init_registers_arm_with_iwmmxt): Likewise.
16940 (the_low_target): Add initializer for arch_setup field.
16941 * linux-cris-low.c (init_registers_cris): Add prototype.
16942 (the_low_target): Add initializer for arch_setup field.
16943 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16944 (the_low_target): Add initializer for arch_setup field.
16945 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16946 (the_low_target): Add initializer for arch_setup field.
16947 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16948 (the_low_target): Add initializer for arch_setup field.
16949 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16950 (the_low_target): Add initializer for arch_setup field.
16951 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16952 (the_low_target): Add initializer for arch_setup field.
16953 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16954 (init_registers_mips64_linux): Likewise.
16955 (the_low_target): Add initializer for arch_setup field.
16956 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16957 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16958 (the_low_target): Add initializer for arch_setup field.
16959 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16960 (init_registers_powerpc_64): Likewise.
16961 (the_low_target): Add initializer for arch_setup field.
16962 * linux-s390-low.c (init_registers_s390): Add prototype.
16963 (init_registers_s390x): Likewise.
16964 (the_low_target): Add initializer for arch_setup field.
16965 * linux-sh-low.c (init_registers_sh): Add prototype.
16966 (the_low_target): Add initializer for arch_setup field.
16967 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16968 (the_low_target): Add initializer for arch_setup field.
16969 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16970 (the_low_target): Add initializer for arch_setup field.
16972 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16973 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16974 instead of init_registers ().
16975 * win32-arm-low.c (init_registers_arm): Add prototype.
16976 (the_low_target): Add initializer for arch_setup field.
16977 * win32-i386-low.c (init_registers_i386): Add prototype.
16978 (the_low_target): Add initializer for arch_setup field.
16980 * spu-low.c (init_registers_spu): Add prototype.
16981 (initialize_low): Call initialie_registers_spu () instead of
16982 initialize_registers ().
16984 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16986 * server.c (handle_v_requests): When handling the vRun and vAttach
16987 packets, if already debugging a process, don't kill it. Return an
16990 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16992 * server.c (handle_query): Correct length check.
16994 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16996 * win32-low.c (do_initial_child_stuff): Add process handle
16997 parameter. Set current_process_handle and current_process_id from the
16998 parameters. Clear globals.
16999 (win32_create_inferior): Don't set current_process_handle and
17000 current_process_id here. Instead pass them on the call to
17001 do_initial_child_stuff.
17002 (win32_attach): Likewise.
17003 (win32_clear_inferiors): New.
17004 (win32_kill): Don't close the current process handle or the
17005 current thread handle here. Instead call win32_clear_inferiors.
17006 (win32_detach): Don't open a new handle to the process. Call
17007 win32_clear_inferiors.
17008 (win32_join): Don't rely on current_process_handle; open a new
17009 handle using the process id.
17010 (win32_wait): Call win32_clear_inferiors when the inferior process
17013 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17015 * server.c (monitor_show_help): Add "exit".
17017 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17019 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17020 (clean): Add reg-xtensa.c.
17021 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17022 * configure.srv (xtensa*-*-linux*) New target.
17023 * linux-xtensa-low.c: New.
17024 * xtensa-xtregs.c: New.
17026 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17028 * hostio.c: Don't include errno.h.
17029 (errno_to_fileio_errno): Move to hostio-errno.
17030 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17031 error number outputting to the target->hostio_last_error callback.
17032 (hostio_packet_error): Use FILEIO_EINVAL directly.
17033 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17034 calls to hostio_error.
17035 * hostio-errno.c: New.
17036 * server.h (hostio_last_error_from_errno): Declare.
17037 * target.h (target_ops): Add hostio_last_error member.
17038 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17039 as hostio_last_error handler.
17040 * spu-low.c (spu_target_ops): Likewise.
17041 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17042 (wince_hostio_last_error): New functions.
17043 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17044 as hostio_last_error handler.
17045 (win32_target_ops) [!_WIN32_WCE]: Register
17046 hostio_last_error_from_errno as hostio_last_error handler.
17047 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17048 (hostio-errno.o): New rule.
17049 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17050 * configure.srv (srv_hostio_err_objs): New variable. Default to
17052 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17053 * configure: Regenerate.
17055 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17057 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17058 (linux_kill, linux_detach): Clean up the process list.
17059 * remote-utils.c (remote_open): Improve port number parsing.
17060 (putpkt_binary, input_interrupt): Only send interrupts if the target
17062 * server.c (extended_protocol): Make static.
17063 (attached): Define earlier.
17064 (exit_requested, response_needed, program_argv): New variables.
17065 (target_running): New.
17066 (start_inferior): Clear attached here.
17067 (attach_inferior): Set attached here.
17068 (require_running): Define.
17069 (handle_query): Use require_running and target_running. Implement
17071 (handle_v_attach, handle_v_run): New.
17072 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17073 (gdbserver_usage): Update.
17074 (main): Redo argument parsing. Handle --debug and --multi. Handle
17075 --attach along with other options or after the port. Save
17076 program_argv. Support no initial program. Resynchronize
17077 communication with GDB after an error. Handle "monitor exit".
17078 Use require_running and target_running. Always allow the extended
17079 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17080 restart in extended mode.
17081 * README: Refer to the GDB manual. Update --attach usage.
17083 2007-12-20 Andreas Schwab <schwab@suse.de>
17085 * linux-low.c (STACK_SIZE): Define.
17086 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17087 (linux_test_for_tracefork): Likewise.
17089 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17091 * linux-low.c (linux_wait_for_event): Update messages. Do not
17092 reinsert auto-delete breakpoints.
17093 * mem-break.c (struct breakpoint): Change return type of handler to
17095 (set_breakpoint_at): Update handler type.
17096 (reinsert_breakpoint_handler): Return 1 instead of calling
17098 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17100 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17101 * mem-break.h (set_breakpoint_at): Update handler type.
17102 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17103 * win32-low.c (auto_delete_breakpoint): New.
17104 (get_child_debug_event): Use it.
17106 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17108 * configure.ac: Check for pread and pwrite.
17109 * hostio.c (handle_pread): Fall back to lseek and read.
17110 (handle_pwrite): Fall back to lseek and write.
17111 * config.in, configure: Regenerated.
17113 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17115 * server.c (myresume): Add own_buf argument.
17116 (main): Update calls.
17118 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17120 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17121 * remote-utils.c (remote_open): Do not call disable_async_io.
17122 (block_async_io): Delete.
17123 (unblock_async_io): Make static.
17124 (initialize_async_io): New.
17125 * server.c (handle_v_cont): Handle async I/O here.
17126 (myresume): Likewise. Move other common resume tasks here...
17127 (main): ... from here. Call initialize_async_io. Disable async
17128 I/O before the main loop.
17129 * server.h (initialize_async_io): Declare.
17130 (block_async_io, unblock_async_io): Delete prototypes.
17131 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17133 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17135 * remote-utils.c (readchar): Allow binary data in received messages.
17137 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17139 * win32-low.c (attaching): New global.
17140 (win32_create_inferior): Clear the `attaching' global.
17141 (win32_attach): Set the `attaching' global.
17142 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17143 attaching. Only set a breakpoint at the entry point if not
17146 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17148 * server.c (main): Don't report dll events on the initial
17149 connection on attaches.
17151 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17153 * server.c (main): Relax numerical bases supported for the pid of
17154 the --attach command line argument.
17156 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17158 * win32-low.c (win32_attach): Call OpenProcess before
17159 DebugActiveProcess, not after. Add last error output to error
17162 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17164 * win32-low.c (win32_get_thread_context)
17165 (win32_set_thread_context): New functions.
17166 (thread_rec): Use win32_get_thread_context.
17167 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17168 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17171 2007-12-03 Leo Zayas
17172 Pedro Alves <pedro_alves@portugalmail.pt>
17174 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17176 (child_add_thread): Minor cleanup.
17177 (child_continue): Resume artificially suspended threads before
17178 calling ContinueDebugEvent.
17179 (suspend_one_thread): New.
17180 (fake_breakpoint_event): New.
17181 (get_child_debug_event): Change return type to int. Check here if
17182 gdb sent an interrupt request. If a soft interrupt was requested,
17183 fake a breakpoint event. Return 0 if there is no event to handle,
17185 (win32_wait): Don't check here if gdb sent an interrupt request.
17186 Ensure there is a valid event to handle.
17187 (win32_request_interrupt): Add soft interruption method as last
17190 2007-12-03 Leo Zayas
17191 Pedro Alves <pedro_alves@portugalmail.pt>
17193 * win32-low.h (win32_thread_info): Add descriptions to the
17194 structure members. Replace `suspend_count' counter by a
17196 * win32-low.c (thread_rec): Update condition of when to get the
17197 context from the inferior. Rely on ContextFlags being set if it
17198 has already been retrieved. Only suspend the inferior thread if
17199 we haven't already. Warn if that fails.
17200 (continue_one_thread): s/suspend_count/suspended/. Only call
17201 ResumeThread once. Warn if that fails.
17203 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17205 * win32-low.c (win32_wait): Don't read from the inferior when it
17206 has already exited.
17208 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17210 * Makefile.in (win32_low_h): New variable.
17211 (win32-low.o): Add dependency on $(win32_low_h).
17212 (win32-arm-low.o, win32-i386-low.o): New rules.
17214 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17216 * hostio.c: Correct copyright year.
17218 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17220 * Makefile.in (OBS): Add hostio.o.
17221 (hostio.o): New rule.
17222 * server.h (handle_vFile): Declare.
17223 * hostio.c: New file.
17224 * server.c (handle_v_requests): Take packet_len and new_packet_len
17225 for binary packets. Call handle_vFile.
17226 (main): Update call to handle_v_requests.
17228 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17230 * linux-low.c: Include <sched.h>.
17232 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17234 * linux-low.c (linux_tracefork_grandchild): New.
17235 (linux_tracefork_child): Use clone.
17236 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17238 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17240 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17242 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17244 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17246 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17248 * inferiors.c (change_inferior_id): Delete.
17249 (add_pid_to_list, pull_pid_from_list): New.
17250 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17251 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17252 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17253 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17254 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17255 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17256 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17257 (using_threads): Always set to 1.
17258 (handle_extended_wait): New.
17259 (add_process): Do not set TID.
17260 (linux_create_inferior): Set must_set_ptrace_flags.
17261 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17262 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17263 (linux_thread_alive): Rename TID argument to LWPID.
17264 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17265 (linux_wait_for_event): Do not use TID or check using_threads. Update
17266 call to dead_thread_notify. Call handle_extended_wait.
17267 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17268 (send_sigstop): Delete sigstop_sent.
17269 (wait_for_sigstop): Avoid TID.
17270 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17271 (linux_test_for_tracefork): New.
17272 (linux_lookup_signals): Use thread_db_active and
17273 linux_supports_tracefork_flag.
17274 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17275 * linux-low.h (get_process_thread): Avoid TID.
17276 (struct process_ifo): Move thread_known and tid to the end. Remove
17278 (linux_attach_lwp, thread_db_init): Update prototypes.
17279 * server.h (change_inferior_id): Delete prototype.
17280 (add_pid_to_list, pull_pid_from_list): New prototypes.
17281 * thread-db.c (thread_db_use_events): New.
17282 (find_first_thread): Rename to...
17283 (find_one_thread): ...this. Update callers and messages. Do not
17284 call fatal. Check thread_db_use_events. Do not call
17285 change_inferior_id or new_thread_notify.
17286 (maybe_attach_thread): Update. Do not call new_thread_notify.
17287 (thread_db_init): Set thread_db_use_events. Check use_events.
17288 * utils.c (fatal, warning): Correct message prefix.
17290 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17292 * Makefile.in (clean): Remove new files.
17293 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17294 (powerpc-64.o, powerpc-64.c): New rules.
17295 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17296 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17298 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17300 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17301 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17302 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17303 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17304 (target_regsets): Add AltiVec and SPE register sets.
17305 * configure.ac: Check for AltiVec and SPE.
17306 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17307 (ppc_fill_vrregset, ppc_store_vrregset): New.
17308 (target_regsets): Add AltiVec register set.
17309 * configure: Regenerated.
17311 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17313 * linux-low.c (O_LARGEFILE): Define.
17314 (linux_read_memory): Use /proc/PID/mem.
17315 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17316 * configure, config.in: Regenerated.
17318 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17320 * linux-low.c (linux_wait_for_event): Do not pass signals while
17323 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17325 * win32-low.c (create_process): New.
17326 (win32_create_inferior): Use create_process instead of
17327 CreateProcess. If create_process failed retry appending an ".exe"
17328 suffix. Store the GetLastError result immediatelly after
17329 create_process calls and use it on the call to error.
17331 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17333 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17335 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17337 * configure.ac: Switch license to GPLv3.
17339 2007-08-01 Michael Snyder <msnyder@access-company.com>
17341 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17343 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17345 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17347 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17348 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17349 CloseToolhelp32Snapshot.
17350 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17351 CloseToolhelp32Snapshot.
17353 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17355 * server.c (main): Check for inferior exit before main loop.
17357 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17359 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17360 instead of on tmp_desc.
17362 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17363 Daniel Jacobowitz <dan@codesourcery.com>
17365 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17366 (add_thread): Minor cleanups.
17367 (clear_inferiors): Move lower in the file. Clear the DLL
17369 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17370 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17371 (xml_escape_text): New.
17372 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17374 (handle_v_cont): Report errors.
17375 (gdbserver_version): Update.
17376 (main): Correct size of own_buf. Do not report initial DLL events.
17377 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17378 (unloaded_dll, xml_escape_text): New.
17379 * win32-low.c (enum target_waitkind): Update comments.
17380 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17381 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17382 (win32_EnumProcessModules, win32_GetModuleInformation)
17383 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17384 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17385 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17386 (win32_Module32First, win32_Module32Next, load_toolhelp)
17387 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17388 (get_child_debug_event): Handle DLL events.
17389 (win32_wait): Likewise.
17391 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17393 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17394 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17396 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17398 * win32-low.c (handle_output_debug_string): Ignore event if not
17401 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17403 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17405 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17407 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17409 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17411 * inferiors.c (change_inferior_id): Add comment.
17412 * linux-low.c (check_removed_breakpoint): Add an early
17413 prototype. Improve debug output.
17414 (linux_attach): Doc update.
17415 (linux_detach_one_process, linux_detach): Clean up before releasing
17417 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17418 * linux-low.h (struct process_info): Doc improvement.
17419 * mem-break.c (delete_all_breakpoints): New.
17420 * mem-break.h (delete_all_breakpoints): New prototype.
17421 * thread-db.c (find_first_thread): New.
17422 (thread_db_create_event): Call it instead of
17423 thread_db_find_new_threads. Clean up unused variables.
17424 (maybe_attach_thread): Remove first thread handling.
17425 (thread_db_find_new_threads): Use find_first_thread.
17426 (thread_db_get_tls_address): Likewise.
17428 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17430 * thread-db.c (thread_db_find_new_threads): Add prototype.
17431 (thread_db_create_event): Check for the main thread before adding
17433 (maybe_attach_thread): Only enable event reporting if TID == 0.
17434 (thread_db_get_tls_address): Check for new threads.
17436 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17438 * linux-low.c (linux_create_inferior): Try execv before execvp.
17439 * spu-low.c (spu_create_inferior): Likewise.
17441 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17443 * linux-low.c (linux_create_inferior): Change execv to execvp.
17444 * spu-low.c (spu_create_inferior): Likewies.
17446 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17448 * Makefile.in (clean): Clean new files instead of deleted ones.
17449 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17450 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17452 * configure.srv: Specify XML files and new regformats for MIPS and
17454 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17455 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17456 an entry for the restart register.
17457 (mips_cannot_fetch_register, mips_cannot_store_register)
17458 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17459 register names to match the XML descriptions.
17460 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17461 restart register instead of $0.
17463 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17464 Markus Deuling <deuling@de.ibm.com>
17466 * remote-utils.c (decode_xfer_write): New function.
17467 * server.h (decode_xfer_write): Add prototype.
17468 * server.c (handle_query): Add PACKET_LEN argument. Support
17469 qXfer:spu:read and qXfer:spu:write packets.
17470 (main): Pass packet_len to handle_query.
17471 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17472 * target.h (target_ops): Add qxfer_spu.
17474 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17476 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17477 accessing non-seekable spufs files.
17479 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17481 * server.c (handle_query): Add reply for qC packet.
17483 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17484 Leo Zayas <lerele@champenstudios@com>
17486 * server.h (check_remote_input_interrupt_request): New function.
17487 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17488 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17489 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17490 (check_remote_input_interrupt_request): New function.
17491 * server.h (check_remote_input_interrupt_request): Declare.
17492 * win32-low.c (winapi_DebugBreakProcess,
17493 winapi_GenerateConsoleCtrlEvent): New typedefs.
17494 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17496 (win32_wait): Check for remote interrupt request
17497 with check_remote_input_interrupt_request.
17498 (win32_request_interrupt): New function.
17499 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17501 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17503 * win32-low.c (debug_registers_changed,
17504 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17505 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17506 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17507 (thread_rec): Get context using the low target.
17508 (child_add_thread): Call thread_added on the low target,
17509 which does the same thing.
17511 (do_initial_child_stuff): Remove debug registers references.
17512 Set context using the low target. Resume threads after
17513 setting the contexts.
17514 (child_continue): Remove dead variable. Remove debug
17515 registers references.
17516 (child_fetch_inferior_registers): Go through the low target.
17517 (do_child_store_inferior_registers): Remove.
17518 (child_store_inferior_registers): Go through the low target.
17519 (win32_resume): Remove debug registers references.
17520 Set context using the low target.
17521 (handle_exception): Change return type to void. Don't record
17522 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17523 first chance exception.
17524 (get_child_debug_event): Change return type to void. Remove
17525 goto loop. Always return after waiting for debug event.
17526 (win32_wait): Convert to switch statement. Handle spurious
17529 * win32-i386-low.c (debug_registers_changed,
17530 debug_registers_used): New.
17531 (initial_stuff): Rename to ...
17532 (i386_initial_stuff): ... this. Clear debug registers
17534 (store_debug_registers): Delete.
17535 (i386_get_thread_context): New.
17536 (load_debug_registers): Delete.
17537 (i386_set_thread_context): New.
17538 (i386_thread_added): New.
17539 (single_step): Rename to ...
17540 (i386_single_step): ... this.
17541 (do_fetch_inferior_registers): Rename to ...
17542 (i386_fetch_inferior_register): ... this.
17543 (i386_store_inferior_register): New.
17544 (the_low_target): Adapt to new interface.
17546 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17547 (arm_get_thread_context): New.
17548 (arm_set_thread_context): New.
17550 (do_fetch_inferior_registers): Rename to ...
17551 (arm_fetch_inferior_register): ... this.
17552 (arm_store_inferior_register): New.
17553 (arm_wince_breakpoint): Reimplement as unsigned long.
17554 (arm_wince_breakpoint_len): Define.
17555 (the_low_target): Adapt to new interface.
17557 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17558 load_debug_registers. Add get_thread_context, set_thread_context,
17559 thread_added and store_inferior_register. Rename
17560 fetch_inferior_registers to fetch_inferior_register.
17561 (regptr): Remove declaration.
17563 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17565 * linux-low.c (linux_detach): Change return type to int. Return 0.
17566 * spu-low.c (spu_detach): Likewise.
17568 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17570 * target.h (target_ops): Change return type of detach to int.
17572 (join_inferior): New.
17573 * server.c (main): Don't skip detach support on mingw32.
17574 If the inferior doesn't support detaching return error.
17575 Call join_inferior instead of using waitpid.
17576 * linux-low.c (linux_join): New.
17577 (linux_target_op): Add linux_join.
17578 * spu-low.c (spu_join): New.
17579 (spu_target_ops): Add spu_join.
17580 * win32-low.c (win32_detach): Adapt to new interface.
17581 Reopen current_process_handle before detaching. Issue a child
17582 resume before detaching.
17584 (win32_target_op): Add win32_join.
17586 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17588 * win32-low.c (win32-attach): Fix return value.
17589 * target.h (target_ops): Describe ATTACH return values.
17591 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17593 * win32-low.c (GETPROCADDRESS): Define.
17594 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17595 (winapi_DebugSetProcessKillOnExit): Likewise.
17596 (win32_create_inferior): Force usage of ansi CreateProcessA.
17597 (win32_attach): Use GETPROCADDRESS.
17598 (win32_detach): Likewise.
17600 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17602 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17604 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17606 * win32-low.c: Commit leftover changes from 2007-03-29.
17608 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17610 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17611 fields short instead of int. Add explicit padding.
17612 (i387_cache_to_fsave): Remove unnecessary casts.
17613 (i387_fsave_to_cache): Doc fix.
17614 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17616 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17618 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17619 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17621 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17623 * configure.srv (arm*-*-mingw32ce*): Move near the other
17626 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17628 * configure.ac: Add errno checking.
17629 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17630 sys/file.h and malloc.h.
17631 (AC_CHECK_DECLS): Add perror.
17632 (srv_mingwce): Handle.
17633 * configure.srv (i[34567]86-*-cygwin*): Add
17634 win32-i386-low.o to srv_tgtobj.
17635 (i[34567]86-*-mingw*): Likewise.
17636 (arm*-*-mingw32ce*): Add case.
17637 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17638 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17639 [__MINGW32CE__] (strerror): New function.
17640 [__MINGW32CE__] (errno): Define to GetLastError.
17641 [__MINGW32CE__] (COUNTOF): New macro.
17642 (remote_open): Remove extra close call.
17643 * mem-break.c (delete_breakpoint_at): New function.
17644 * mem-break.h (delete_breakpoint_at): Declare.
17645 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17646 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17647 [USE_WIN32API] (read, write): Add char* casts.
17648 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17649 * server.h: Include wincecompat.h on Windows CE.
17650 [HAVE_ERRNO_H]: Check.
17651 (perror): Declare if not declared.
17652 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17653 (perror_with_name): Remove errno declaration.
17654 * wincecompat.h: New.
17655 * wincecompat.c: New.
17656 * win32-low.h: New.
17657 * win32-arm-low.c: New.
17658 * win32-i386-low.c: New.
17659 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17660 (OUTMSG2): Make it safe.
17662 (COUNTOF): New macro.
17663 (NUM_REGS): Get it from the low target.
17664 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17665 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17666 (thread_rec): Let low target handle debug registers.
17667 (child_add_thread): Likewise.
17668 (child_init_thread_list): Likewise.
17669 (continue_one_thread): Likewise.
17671 (do_child_fetch_inferior_registers): Move to ...
17672 * win32-i386-low.c: ... here, and rename to ...
17673 (do_fetch_inferior_registers): ... this.
17674 * win32-low.c (child_fetch_inferior_registers):
17675 Go through the low target.
17676 (do_child_store_inferior_registers): Use regptr.
17677 (strwinerror): New function.
17678 (win32_create_inferior): Handle Windows CE.
17679 Use strwinerror instead of strerror on Windows error
17680 codes. Add program to the error output.
17681 Don't close the main thread handle on Windows CE.
17682 (win32_attach): Use coredll.dll on Windows CE.
17683 (win32_kill): Close current process and current
17685 (win32_detach): Use coredll.dll on Windows CE.
17686 (win32_resume): Let low target handle debug registers, and
17688 (handle_exception): Add/Remove initial breakpoint. Avoid
17689 non-existant WSTOPSIG on Windows CE.
17690 (win32_read_inferior_memory): Cast to remove warning.
17691 (win32_arch_string): Go through the low target.
17692 (initialize_low): Call set_breakpoint_data with the low
17693 target's breakpoint.
17694 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17695 FOP_REGNUM, mappings): Move to ...
17696 * win32-i386-low.c: ... here.
17697 * win32-low.c (win32_thread_info): Move to ...
17698 * win32-low.h: ... here.
17699 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17700 win32-arm-low.c and wincecompat.c.
17701 (all:): Add $EXEEXT.
17702 (install-only:): Likewise.
17703 (gdbserver:): Likewise.
17704 (gdbreplay:): Likewise.
17705 * config.in: Regenerate.
17706 * configure: Regenerate.
17708 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17710 * win32-low.c: Rename typedef thread_info to
17711 win32_thread_info throughout.
17713 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17715 * win32-i386-low.c: Rename to ...
17716 * win32-low.c: ... this.
17717 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17718 * Makefile.in: Likewise.
17720 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17722 * remote-utils.c (monitor_output): Constify msg parameter.
17723 * server.h (monitor_output): Likewise.
17724 * win32-i386-low.c (handle_output_debug_string): New.
17725 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17726 handle_output_debug_string.
17727 (get_child_debug_event): Likewise.
17729 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17731 * server.c (main): Correct strtoul check.
17733 2007-03-27 Jon Ringle <jon@ringle.org>
17735 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17737 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17739 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17741 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17743 * terminal.h: Check HAVE_SGTTY_H.
17745 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17747 * remote-utils.c (remote_open): Print out the assigned port number.
17749 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17751 * remote-utils.c (monitor_output): New function.
17752 * server.c (debug_threads): Define here.
17753 (monitor_show_help): New function.
17754 (handle_query): Handle qRcmd.
17755 (main): Do not handle 'd' packet.
17756 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17757 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17760 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17762 * Makefile.in (EXEEXT): New.
17763 (clean): Use $(EXEEXT).
17765 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17767 * target.h (target_ops): Rename send_signal to request_interrupt,
17768 and remove enum target_signal parameter.
17769 * linux-low.c (linux_request_interrupt): Rename from
17770 linux_send_signal, and always send SIGINT.
17771 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17772 and always send SIGINT.
17773 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17775 (input_interrupt): Likewise.
17777 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17779 * server.c (get_features_xml): Check if target implemented
17781 * win32-i386-low.c (win32_arch_string): New.
17782 (win32_target_ops): Add win32_arch_string as arch_string member.
17784 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17786 * spu-low.c (spu_arch_string): New.
17787 (spu_target_ops): Add spu_arch_string.
17789 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17791 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17792 * configure.ac: Do not check for terminal.h.
17793 * configure, config.in: Regenerated.
17795 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17797 * Makefile.in (OBS): Add $(XML_BUILTIN).
17798 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17800 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17801 (arm-with-iwmmxt.c): New.
17802 * config.in, configure: Regenerate.
17803 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17804 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17805 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17806 (arm*-*-linux*): Add iWMMXt and regset support.
17807 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17808 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17809 (arm_store_wmmxregset, target_regsets): New.
17810 * server.c (get_features_xml): Take annex argument. Check builtin
17812 (handle_query): Handle multiple annexes.
17814 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17816 * remote-utils.c [USE_WIN32API] (read, write): Define.
17817 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17820 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17822 * linux-i386-low.c (the_low_target): Set arch_string.
17823 * linux-x86-64-low.c (the_low_target): Likewise.
17824 * linux-low.c (linux_arch_string): New.
17825 (linux_target_ops): Add it.
17826 * linux-low.h (struct linux_target_ops): Add arch_string.
17827 * server.c (write_qxfer_response): Use const void * for DATA.
17828 (get_features_xml): New.
17829 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17830 * target.h (struct target_ops): Add arch_string method.
17832 2007-01-03 Denis Pilat <denis.pilat@st.com>
17833 Daniel Jacobowitz <dan@codesourcery.com>
17835 * linux-low.c (linux_kill): Handle being called with no threads.
17836 * win32-i386-low.c (win32_kill): Likewise.
17837 (get_child_debug_event): Clear current_process_handle.
17839 2006-12-30 Denis PILAT <denis.pilat@st.com>
17840 Daniel Jacobowitz <dan@codesourcery.com>
17842 * remote-utils.c (remote_open): Check the type of specified
17843 serial port devices before opening them.
17844 * server.c (main): Kill the inferior if an error occurs during
17845 the first remote_open.
17847 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17849 * README: Update supported targets.
17851 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17853 * Makefile.in (clean): Remove reg-mips64.c.
17854 (reg-mips64.c, reg-mips64.o): New rules.
17855 * configure.srv: Handle mips64. Include regset support for mips.
17856 * linux-mips-low.c (union mips_register): New.
17857 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17858 (mips_breakpoint, mips_breakpoint_at): Use int.
17859 (mips_collect_register, mips_supply_register)
17860 (mips_collect_register_32bit, mips_supply_register_32bit)
17861 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17862 (mips_store_fpregset, target_regsets): New.
17863 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17865 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17867 * configure.srv: Add target "spu*-*-*".
17868 * Makefile.in (clean): Remove reg-spu.c.
17869 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17870 * spu-low.c: New file.
17872 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17874 * configure.ac: Correct td_thr_tls_get_addr test.
17875 * configure: Regenerated.
17877 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17879 * linux-low.c (linux_wait_for_event): Reformat. Use the
17880 pass_signals array.
17881 * remote-utils.c (decode_address_to_semicolon): New.
17882 * server.c (pass_signals, handle_general_set): New.
17883 (handle_query): Mention QPassSignals for qSupported.
17884 (main): Call handle_general_set.
17885 * server.h (pass_signals, decode_address_to_semicolon): New.
17887 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17889 * server.c (handle_query): Correct error handling for read_auxv.
17891 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17893 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17894 and srv_linux_thread_db to yes.
17895 * linux-s390-low.c (s390_fill_gregset): New function.
17896 (target_regsets): Define data structure.
17898 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17900 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17901 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17902 * config.in, configure: Regenerated.
17903 * inferiors.c (gdb_id_to_thread): New function.
17904 (gdb_id_to_thread_id): Use it.
17905 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17906 * linux-low.h (struct process_info): Add th member.
17907 (thread_db_get_tls_address): New prototype.
17908 * remote-utils.c (decode_address): Make non-static.
17909 * server.c (handle_query): Handle qGetTLSAddr.
17910 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17911 * target.h (struct target_ops): Add get_tls_address.
17912 * thread-db.c (maybe_attach_thread): Save the thread handle.
17913 (thread_db_get_tls_address): New.
17915 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17917 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17918 (linux_resume_one_process): Take a siginfo_t *. Update all
17919 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17920 (struct pending_signals): Add a siginfo_t.
17921 (linux_wait_for_process): Always set last_status.
17922 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17923 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17924 * linux-low.h (struct process_info): Add last_status.
17926 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17928 * remote-utils.c (try_rle): New function.
17929 (putpkt_binary): Use it.
17931 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17933 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17934 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17935 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17936 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17937 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17940 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17942 * server.c (terminal_fd): New variable.
17943 (old_foreground_pgrp): Likewise.
17944 (restore_old_foreground_pgrp): New function.
17945 (start_inferior): Record the terminal file descriptor in terminal_fd
17946 and its original foreground group in old_foreground_pgrp. Register
17947 restore_old_foreground_pgrp with atexit().
17949 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17951 * server.c (handle_query): Correct qPart to qXfer.
17953 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17955 * configure.ac: Check for more headers which are missing on
17956 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17957 * configure.srv: Add Cygwin and mingw32.
17958 * remote-utils.c: Don't include headers unconditionally which
17959 are missing on mingw32. Include <winsock.h> for mingw32.
17960 (remote_open): Adjust for mingw32 support. Flush
17961 standard error after writing to it.
17962 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17963 (unblock_async_io, enable_async_io, disable_async_io)
17964 (readchar, getpkt): Update for Winsock support.
17965 (prepare_resume_reply): Expect a protocol signal number.
17966 * server.c: Disable <sys/wait.h> on mingw32.
17967 (start_inferior): Adjust for mingw32 support. Flush
17968 standard error after writing to it.
17969 (attach_inferior): Likewise. Use protocol signal
17971 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17973 * win32-i386-low.c: New file.
17974 * Makefile.in (XM_CLIBS): Set.
17975 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17976 (win32-i386-low.o): New dependency rule.
17977 * linux-low.c (linux_wait): Use target signal numbers.
17978 * target.h (struct target_ops): Doc fix.
17979 * server.h (target_signal_to_name): New prototype.
17980 * gdbreplay.c: Don't include headers unconditionally which
17981 are missing on mingw32. Include <winsock.h> for mingw32.
17982 (remote_close, remote_open): Adjust for Winsock support.
17983 * configure, config.in: Regenerated.
17985 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17987 * server.c (decode_xfer_read, write_qxfer_response): New.
17988 (handle_query): Take a packet length argument. Handle
17989 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17990 the qSupported response.
17991 (main): Update call to handle_query.
17993 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17995 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17996 (putpkt_binary): Renamed from putpkt and adjusted for binary
17998 (putpkt): New wrapper for putpkt_binary.
17999 (readchar): Don't mask off the high bit.
18000 (decode_X_packet): New function.
18001 * server.c (main): Call putpkt_binary if a handler sets the packet
18002 length. Save the length of the incoming packet. Handle 'X'.
18003 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18005 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18007 * server.c (handle_query): Handle qSupported.
18009 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18011 * remote-utils.c (all_symbols_looked_up): New variable.
18012 (look_up_one_symbol): Check it.
18013 * server.h (look_up_one_symbol): New declaration.
18014 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18016 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18018 * Makefile.in (linux-arm-low.o): Update dependencies.
18019 * linux-arm-low.c: Include "gdb_proc_service.h".
18020 (PTRACE_GET_THREAD_AREA): Define.
18021 (ps_get_thread_area): New function.
18023 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18025 * configure.srv (m68k*-*-uclinux*): New target.
18026 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18027 (linux_resume_one_process): Remove extraneous cast.
18028 (linux_read_offsets): New.
18029 (linux_target_op): Add linux_read_offsets on mmuless systems.
18030 * server.c (handle_query): Add qOffsets logic.
18031 * target.h (struct target_ops): Add read_offsets.
18033 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18035 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18036 (PTRACE_GET_THREAD_AREA): Define.
18037 (ps_get_thread_area): New function.
18038 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18039 (linux-x86-64-low.o): Update.
18041 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18043 * configure.ac: Remove checks for prfpregset_t.
18044 * gdb_proc_service.h: New file.
18045 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18046 new "gdb_proc_service.h".
18047 * proc-service.c: Likewise.
18048 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18049 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18050 * Makefile.in (gdb_proc_service_h): Updated.
18051 * configure, config.in: Regenerated.
18053 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18055 * remote-utils.c (prepare_resume_reply): Move declaration
18056 of gdb_id_from_wait to the top of the block.
18058 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18060 * linux-low.c (regsets_store_inferior_registers): Read the regset
18061 from the target before filling it.
18063 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18065 * server.c (attach_inferior): Return SIGTRAP for a successful
18068 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18070 * Makefile.in (OBS): Add version.o.
18071 (STAGESTUFF): Delete.
18072 (version.o): Add dependencies.
18073 (version.c): Replace rule.
18074 (clean): Remove version.c.
18075 * server.c (gdbserver_version): New.
18076 (gdbserver_usage): Use printf.
18077 (main): Handle --version and --help.
18078 * server.h (version, host_name): Add declarations.
18080 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18092 * linux-x86-64-low.c:
18094 * linux-s390-low.c:
18095 * linux-ppc64-low.c:
18097 * linux-mips-low.c:
18098 * linux-m68k-low.c:
18099 * linux-m32r-low.c:
18102 * linux-ia64-low.c:
18103 * linux-i386-low.c:
18104 * linux-crisv32-low.c:
18116 * gdbserver.1: Add (C) after Copyright. Update the FSF
18119 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18121 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18122 (arm_breakpoint_at): Recognize both breakpoints.
18123 (the_low_target): Use the correct breakpoint instruction.
18125 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18127 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18128 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18129 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18130 (the_low_target): Update.
18132 2005-10-25 Andreas Schwab <schwab@suse.de>
18134 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18136 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18137 (ia64_num_regs): Reduce to 462.
18139 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18141 * acinclude.m4: Correct quoting.
18142 * aclocal.m4: Regenerated.
18144 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18145 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18146 (thread_db_init): Call thread_db_err_str.
18147 * configure.ac: Check for TD_VERSION.
18148 * config.in, configure: Regenerated.
18150 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18152 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18154 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18156 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18157 is not available. Define HAVE_PTRACE_GETREGS if it is.
18158 * config.in, configure: Regenerated.
18159 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18160 * linux-i386-low.c, linux-m68k-low.c: Update to use
18161 HAVE_PTRACE_GETREGS.
18162 * linux-low.c (regsets_fetch_inferior_registers)
18163 (regsets_store_inferior_registers): Only return 0 if we processed
18165 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18166 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18168 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18170 * inferiors.c (struct thread_info): Add gdb_id.
18171 (add_thread): Add gdb_id argument.
18172 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18173 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18174 calls to add_thread.
18175 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18176 * server.c (handle_query): Use thread_to_gdb_id.
18177 (handle_v_cont, main): Use gdb_id_to_thread_id.
18178 * server.h (add_thread): Update prototype.
18179 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18182 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18184 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18185 left-padded registers.
18186 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18187 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18189 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18191 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18192 * configure: Regenerate.
18193 * config.in: Regenerate.
18194 * server.h (NEED_DECLARATION_STRERROR):
18195 Replace with !HAVE_DECL_STRERROR.
18197 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18199 * linux-low.c (linux_wait, linux_send_signal): Don't test
18200 an unsigned long variable for > 0 if it could be MAX_ULONG.
18201 * server.c (myresume): Likewise.
18202 * target.c (set_desired_inferior): Likewise.
18204 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18206 * configure.ac: Simplify and improve check for socklen_t.
18207 * configure, config.in: Regenerate.
18209 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18211 * acconfig.h: Remove.
18212 * configure.ac: Add a test for socklen_t. Use three-argument
18213 AC_DEFINE throughout.
18214 * config.in: Regenerated using autoheader 2.59.
18215 * configure: Regenerated.
18217 * gdbreplay.c (socklen_t): Provide a default.
18218 (remote_open): Use socklen_t.
18219 * remote-utils.c (socklen_t): Provide a default.
18220 (remote_open): Use socklen_t.
18221 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18224 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18226 * linux-low.c (linux_read_memory, linux_write_memory)
18227 (linux_read_auxv): Likewise.
18228 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18229 (check_mem_write): Likewise.
18230 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18232 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18233 (registers_from_string, register_data): Likewise.
18234 * server.c (handle_query, main): Likewise.
18235 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18236 (decode_M_packet): Likewise.
18237 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18238 * target.h (struct target_ops): Update read_memory, write_memory,
18240 (read_inferior_memory, write_inferior_memory): Update.
18241 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18242 to unsigned char *.
18243 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18244 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18245 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18246 linux-s390-low.c, linux-sh-low.c: Update for changes in
18247 read_inferior_memory and the_low_target->breakpoint.
18249 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18251 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18252 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18253 * configure.srv: Add powerpc64-*-linux*.
18254 * linux-ppc64-low.c: New file.
18256 2005-05-23 Orjan Friberg <orjanf@axis.com>
18258 * linux-cris-low.c: New file with support for CRIS.
18259 * linux-crisv32-low.c: Ditto for CRISv32.
18260 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18261 (clean): Add reg-cris.c and reg-crisv32.c.
18262 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18263 reg-crisv32.o, and reg-crisv32.c to make rules.
18264 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18265 recognized targets.
18267 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18269 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18270 of sizeof (PTRACE_XFER_TYPE).
18271 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18273 2005-05-12 Orjan Friberg <orjanf@axis.com>
18275 * target.h (struct target_ops): Add insert_watchpoint,
18276 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18277 pointers for hardware watchpoint support.
18278 * linux-low.h (struct linux_target_ops): Ditto.
18279 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18280 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18281 to linux_target_ops.
18282 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18284 * server.c (main): Recognize 'Z' and 'z' packets.
18286 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18288 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18289 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18290 (the_low_target): Add new members.
18292 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18294 * proc-service.c (ps_lgetregs): Search all_processes instead of
18297 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18299 * server.c (start_inferior): Change return type to int.
18300 (attach_inferior): Change sigptr to int *.
18301 (handle_v_cont, handle_v_requests): Change signal to int *.
18302 (main): Change signal to int.
18304 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18306 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18307 * configure.srv: Add m32r*-*-linux*.
18308 * linux-m32r-low.c: New file.
18310 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18312 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18314 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18316 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18317 Take unsigned long arguments for PIDs.
18318 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18319 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18320 (wait_for_sigstop, linux_resume_one_process)
18321 (regsets_fetch_inferior_registers, linux_send_signal)
18322 (linux_read_auxv): Likewise. Update the types of variables holding
18323 PIDs. Update format string specifiers.
18324 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18325 * remote-utils.c (prepare_resume_reply): Likewise.
18326 * server.c (cont_thread, general_thread, step_thread)
18327 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18329 (handle_query): Update format specifiers.
18330 (handle_v_cont, main): Use strtoul for thread IDs.
18331 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18332 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18333 (general_thread, step_thread, thread_from_wait)
18334 (old_thread_from_wait): Update.
18335 * target.h (struct thread_resume): Use unsigned long for THREAD.
18336 (struct target_ops): Use unsigned long for arguments to attach and
18339 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18341 * acinclude.m4: Include bfd/bfd.m4 directly.
18342 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18343 <agriffis@toolchain.org>.
18344 * aclocal.m4, configure: Regenerated.
18346 2005-01-07 Andrew Cagney <cagney@gnu.org>
18348 * configure.ac: Rename configure.in, require autoconf 2.59.
18349 * configure: Re-generate.
18351 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18353 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18354 LIBS when finished.
18355 * aclocal.m4: Regenerated.
18356 * configure: Regenerated.
18358 2004-11-21 Andreas Schwab <schwab@suse.de>
18360 * linux-m68k-low.c (m68k_num_gregs): Define.
18361 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18362 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18363 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18364 (m68k_breakpoint_at): New. Add to the_low_target.
18366 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18367 srv_linux_thread_db to yes.
18369 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18371 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18372 (ARCH_SET_FS): Likewise.
18373 (ARCH_GET_FS): Likewise.
18374 (ARCH_GET_GS): Likewise.
18376 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18378 * linux-i386-low.c (ps_get_thread_area): New.
18379 * linux-x86-64-low.c (ps_get_thread_area): New.
18380 * linux-low.c: Include <sys/syscall.h>.
18381 (linux_kill_one_process): Don't kill the first thread here.
18382 (linux_kill): Kill the first thread here.
18383 (kill_lwp): New function.
18384 (send_sigstop, linux_send_signal): Use it.
18385 * proc-service.c: Clean up #ifdefs.
18386 (fpregset_info): Delete.
18387 (ps_lgetregs): Update and enable implementation.
18388 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18390 * remote-utils.c (struct sym_cache, symbol_cache): New.
18391 (input_interrupt): Print a clearer message.
18392 (async_io_enabled): New variable.
18393 (enable_async_io, disable_async_io): Use it. Update comments.
18394 (look_up_one_symbol): Use the symbol cache.
18395 * thread-db.c (thread_db_look_up_symbols): New function.
18396 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18398 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18400 * configure.in: Test for -rdynamic.
18401 * configure: Regenerated.
18402 * Makefile (INTERNAL_LDFLAGS): New.
18403 (gdbserver, gdbreplay): Use it.
18405 2004-09-02 Andrew Cagney <cagney@gnu.org>
18407 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18409 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18411 * linux-low.c (linux_wait): Clear all_processes list also.
18413 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18415 * linux-low.c: Include <errno.h>. Remove extern declaration of
18418 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18420 * gdbreplay.c, server.h, utils.c: Update copyright years.
18422 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18424 * server.c (main): Print child status or termination signal from
18425 variable 'signal', not 'sig'.
18427 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18429 * linux-low.c (linux_read_memory): Change return type to
18430 int. Check for and return error from ptrace().
18431 * target.c (read_inferior_memory): Change return type to int. Pass
18432 back return status from the_target->read_memory().
18433 * target.h (struct target_ops): Adapt *read_memory() prototype.
18435 (read_inferior_memory): Adapt prototype.
18436 * server.c (main): Return an error packet if
18437 read_inferior_memory() returns an error.
18439 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18441 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18442 Unify with other clean targets.
18444 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18446 * server.c (handle_v_cont): Call set_desired_inferior.
18448 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18450 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18452 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18454 * linux-low.c (linux_wait): Unblock async I/O.
18455 (linux_resume): Block and enable async I/O.
18456 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18457 * server.h (block_async_io, unblock_async_io): Add prototypes.
18459 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18461 * remote-utils.c (remote_open): Print a status notice after
18462 opening a TCP port.
18463 * server.c (attach_inferior): Print a status notice after
18466 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18468 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18470 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18472 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18474 * server.c, target.h: Update copyright years.
18476 2004-02-25 Roland McGrath <roland@redhat.com>
18478 * target.h (struct target_ops): New member `read_auxv'.
18479 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18480 * linux-low.c (linux_read_auxv): New function.
18481 (linux_target_ops): Initialize `read_auxv' member to that.
18483 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18485 Committed by Jim Blandy <jimb@redhat.com>.
18487 * linux-s390-low.c (s390_num_regs): Update.
18488 (s390_regmap): Remove control registers. Use __s390x__ predefine
18489 instead of GPR_SIZE to distiguish s390 and s390x targets.
18491 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18493 * linux-low.c: Update copyright year.
18494 (check_removed_breakpoint): Clear pending_is_breakpoint.
18495 (linux_set_resume_request, linux_queue_one_thread)
18496 (resume_status_pending_p): New functions.
18497 (linux_continue_one_thread): Use process->resume.
18498 (linux_resume): Only resume threads if there are no pending events.
18499 * linux-low.h (struct process_info): Add resume request
18502 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18504 * regcache.c (new_register_cache): Clear the allocated register
18505 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18507 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18509 * linux-low.c (linux_resume): Take a struct thread_resume *
18511 (linux_wait): Update call.
18512 (resume_ptr): New static variable.
18513 (linux_continue_one_thread): Renamed from
18514 linux_continue_one_process. Use resume_ptr.
18515 (linux_resume): Use linux_continue_one_thread.
18516 * server.c (handle_v_cont, handle_v_requests): New functions.
18517 (myresume): New function.
18518 (main): Handle 'v' case.
18519 * target.h (struct thread_resume): New type.
18520 (struct target_ops): Change argument of "resume" to struct
18522 (myresume): Delete macro.
18524 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18526 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18527 (uninstall): Support DESTDIR.
18529 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18531 * configure.srv: Add xscale*linux copy of arm*linux entry.
18533 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18535 * linux-arm-low.c (arm_reinsert_addr): New function.
18536 (the_low_target): Add arm_reinsert_addr.
18538 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18540 * mem-break.c: Remove whitespace at end of file.
18542 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18544 * configure.in: Check whether we need to prototype strerror.
18545 * server.h: Optionally prototype strerror.
18546 * gdbreplay.c (perror_with_name): Use strerror.
18547 * linux-low.c (linux_attach_lwp): Use strerror.
18548 * utils.c (perror_with_name): Use strerror.
18549 * config.in, configure: Regenerated.
18551 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18553 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18554 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18556 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18558 * Makefile.in (SFILES): Update.
18559 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18560 low-sun3.c: Remove files.
18562 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18564 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18565 (linux_detach_one_process, linux_detach): New functions.
18566 (linux_target_ops): Add linux_detach.
18567 * server.c (main): Handle 'D' packet.
18568 * target.h (struct target_ops): Add "detach" member.
18569 (detach_inferior): Define.
18571 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18573 From Kelley Cook <kelleycook@wideopenwest.com>:
18574 * configure.srv: Accept i[34567]86 variants.
18576 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18578 * linux-low.c (linux_wait_for_event): Correct comment typos.
18579 (linux_resume_one_process): Call check_removed_breakpoint.
18580 (linux_send_signal): New function.
18581 (linux_target_ops): Add linux_send_signal.
18582 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18584 * target.h (struct target_ops): Add send_signal.
18586 2003-05-29 Jim Blandy <jimb@redhat.com>
18588 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18589 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18590 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18591 away part of the register's value.
18593 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18595 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18596 (linux_wait_for_event, linux_init_signals): Likewise.
18598 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18600 * configure.in: Check for stdlib.h.
18601 * configure: Regenerated.
18602 * config.in: Regenerated.
18604 2003-01-04 Andreas Schwab <schwab@suse.de>
18606 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18608 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18610 * Makefile.in: Remove obsolete code.
18612 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18614 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18615 defined(PT_FPR0_HI).
18617 2002-11-17 Stuart Hughes <seh@zee2.com>
18619 * linux-arm-low.c (arm_num_regs): Increase.
18620 (arm_regmap): Include status register.
18622 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18624 * linux-low.c (register_addr): Remove incorrect -1 check.
18626 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18628 * linux-low.c (linux_create_inferior): Call setpgid. Return
18630 (unstopped_p, linux_signal_pid): Remove.
18631 (linux_target_ops): Remove linux_signal_pid.
18632 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18633 global instead of target method.
18634 * target.h (struct target_ops): Remove signal_pid. Update comment
18635 for create_inferior.
18636 * server.c (signal_pid): New variable.
18637 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18638 gdbserver. Set the child to be the foreground process group.
18639 (attach_inferior): Set signal_pid.
18641 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18643 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18645 2002-08-20 Jim Blandy <jimb@redhat.com>
18647 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18650 2002-08-01 Andrew Cagney <cagney@redhat.com>
18652 * Makefile.in: Make chill references obsolete.
18654 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18656 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18657 * configure: Regenerate.
18658 * config.in: Regenerate.
18660 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18662 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18663 (perror_with_name, remote_close, remote_open, expect, play): Static.
18665 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18667 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18668 byte offsets instead of an array of indexes.
18669 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18671 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18673 * regcache.c: Add comment.
18675 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18677 * thread-db.c: New file.
18678 * proc-service.c: New file.
18679 * acinclude.m4: New file.
18680 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18681 proc-service.o, and thread-db.o.
18682 (linux-low.o): Add USE_THREAD_DB.
18683 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18684 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18685 * aclocal.m4: Regenerated.
18686 * config.in: Regenerated.
18687 * configure: Regenerated.
18688 * configure.in: Check for proc_service.h, sys/procfs.h,
18689 thread_db.h, and linux/elf.h headrs.
18690 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18691 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18692 Check for -lthread_db and thread support.
18693 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18694 PowerPC, and SuperH.
18695 * i387-fp.c: Constify arguments.
18696 * i387-fp.h: Likewise.
18697 * inferiors.c: (struct thread_info): Renamed from
18698 `struct inferior_info'. Remove PID member. Use generic inferior
18699 list header. All uses updated.
18700 (inferiors, signal_pid): Removed.
18701 (all_threads): New variable.
18702 (get_thread): Define.
18703 (add_inferior_to_list): New function.
18704 (for_each_inferior): New function.
18705 (change_inferior_id): New function.
18706 (add_inferior): Removed.
18707 (remove_inferior): New function.
18708 (add_thread): New function.
18709 (free_one_thread): New function.
18710 (remove_thread): New function.
18711 (clear_inferiors): Use for_each_inferior and free_one_thread.
18712 (find_inferior): New function.
18713 (find_inferior_id): New function.
18714 (inferior_target_data): Update argument type.
18715 (set_inferior_target_data): Likewise.
18716 (inferior_regcache_data): Likewise.
18717 (set_inferior_regcache_data): Likewise.
18718 * linux-low.c (linux_bp_reinsert): Remove.
18719 (all_processes, stopping_threads, using_thrads)
18720 (struct pending_signals, debug_threads, pid_of): New.
18721 (inferior_pid): Replace with macro.
18722 (struct inferior_linux_data): Remove.
18723 (get_stop_pc, add_process): New functions.
18724 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18725 Use add_process and add_thread.
18726 (linux_attach_lwp): New function, based on old linux_attach. Use
18727 add_process and add_thread. Set stop_expected for new threads.
18728 (linux_attach): New function.
18729 (linux_kill_one_process): New function.
18730 (linux_kill): Kill all LWPs.
18731 (linux_thread_alive): Use find_inferior_id.
18732 (check_removed_breakpoints, status_pending_p): New functions.
18733 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18734 Update. Use WNOHANG. Wait for cloned processes also. Update process
18735 struct for the found process.
18736 (linux_wait_for_event): New function.
18737 (linux_wait): Use it. Support LWPs.
18738 (send_sigstop, wait_for_sigstop, stop_all_processes)
18739 (linux_resume_one_process, linux_continue_one_process): New functions.
18740 (linux_resume): Support LWPs.
18741 (REGISTER_RAW_SIZE): Remove.
18742 (fetch_register): Use register_size instead. Call supply_register.
18743 (usr_store_inferior_registers): Likewise. Call collect_register.
18744 Fix recursive case.
18745 (regsets_fetch_inferior_registers): Improve error message.
18746 (regsets_store_inferior_registers): Add debugging.
18747 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18748 (unstopped_p, linux_signal_pid): New functions.
18749 (linux_target_ops): Add linux_signal_pid.
18750 (linux_init_signals): New function.
18751 (initialize_low): Call it. Initialize using_threads.
18752 * regcache.c (inferior_regcache_data): Add valid
18754 (get_regcache): Fetch registers lazily. Add fetch argument
18755 and update all callers.
18756 (regcache_invalidate_one, regcache_invalidate): New
18758 (new_register_cache): Renamed from create_register_cache.
18759 Return the new regcache.
18760 (free_register_cache): Change argument to a void *.
18761 (registers_to_string, registers_from_string): Call get_regcache
18762 with fetch flag set.
18763 (register_data): Make static. Pass fetch flag to get_regcache.
18764 (supply_register): Call get_regcache with fetch flag clear.
18765 (collect_register): Call get_regcache with fetch flag set.
18766 (collect_register_as_string): New function.
18767 * regcache.h: Update.
18768 * remote-utils.c (putpkt): Flush after debug output and use
18770 Handle input interrupts while waiting for an ACK.
18771 (input_interrupt): Use signal_pid method.
18772 (getpkt): Flush after debug output and use stderr.
18773 (outreg): Use collect_register_as_string.
18774 (new_thread_notify, dead_thread_notify): New functions.
18775 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18776 and general_thread.
18777 (look_up_one_symbol): Flush after debug output.
18778 * server.c (step_thread, server_waiting): New variables.
18779 (start_inferior): Don't use signal_pid. Update call to mywait.
18780 (attach_inferior): Update call to mywait.
18781 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18782 (main): Don't fetch/store registers explicitly. Use
18783 set_desired_inferior. Support proposed ``Hs'' packet. Update
18785 * server.h: Update.
18786 (struct inferior_list, struct_inferior_list_entry): New.
18787 * target.c (set_desired_inferior): New.
18788 (write_inferior_memory): Constify.
18789 (mywait): New function.
18790 * target.h: Update.
18791 (struct target_ops): New signal_pid method.
18792 (mywait): Removed macro, added prototype.
18794 * linux-low.h (regset_func): Removed.
18795 (regset_fill_func, regset_store_func): New.
18796 (enum regset_type): New.
18797 (struct regset_info): Add type field. Use new operation types.
18798 (struct linux_target_ops): stop_pc renamed to get_pc.
18799 Add decr_pc_after_break and breakpoint_at.
18800 (get_process, get_thread_proess, get_process_thread)
18801 (strut process_info, all_processes, linux_attach_lwp)
18802 (thread_db_init): New.
18804 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18805 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18806 (the_low_target): Add new members.
18807 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18808 (i386_store_fpxregset): Constify.
18809 (target_regsets): Add new kind identifier.
18810 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18811 (i386_set_pc): Add debugging.
18812 (i386_breakpoint_at): New function.
18813 (the_low_target): Add new members.
18814 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18815 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18816 (mips_breakpoint_at): New.
18817 (the_low_target): Add new members.
18818 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18819 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18820 (the_low_target): Add new members.
18821 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18822 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18823 (the_low_target): Add new members.
18824 * linux-x86-64-low.c (target_regsets): Add new kind
18827 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18829 From Martin Pool <mbp@samba.org>:
18830 * server.c (gdbserver_usage): New function.
18833 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18835 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18836 stop_at -> stop_pc.
18838 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18840 * Makefile.in: Remove obsolete code.
18842 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18844 * linux-low.c (regsets_fetch_inferior_registers),
18845 (regsets_store_inferior_registers): Removed cast to int from
18847 * regcache.h: Added declaration of struct inferior_info.
18849 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18851 * inferiors.c (struct inferior_info): Add regcache_data.
18852 (add_inferior): Call create_register_cache.
18853 (clear_inferiors): Call free_register_cache.
18854 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18855 * regcache.c (struct inferior_regcache_data): New.
18856 (registers): Remove.
18857 (get_regcache): New function.
18858 (create_register_cache, free_register_cache): New functions.
18859 (set_register_cache): Don't initialize the register cache here.
18860 (registers_to_string, registers_from_string, register_data): Call
18862 * regcache.h: Add prototypes.
18863 * server.h: Likewise.
18865 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18867 * mem-break.c: New file.
18868 * mem-break.h: New file.
18869 * Makefile.in: Add mem-break.o rule; update server.h
18871 * inferiors.c (struct inferior_info): Add target_data
18873 (clear_inferiors): Free target_data member if set.
18874 (inferior_target_data, set_inferior_target_data): New functions.
18875 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18876 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18877 * linux-low.c (linux_bp_reinsert): New variable.
18878 (struct inferior_linux_data): New.
18879 (linux_create_inferior): Use set_inferior_target_data.
18880 (linux_attach): Likewise. Call add_inferior.
18881 (linux_wait_for_one_inferior): New function.
18882 (linux_wait): Call it.
18883 (linux_write_memory): Add const.
18884 (initialize_low): Call set_breakpoint_data.
18885 * linux-low.h (struct linux_target_ops): Add breakpoint
18887 * server.c (attach_inferior): Remove extra add_inferior
18889 * server.h: Include mem-break.h. Update inferior.c
18891 * target.c (read_inferior_memory)
18892 (write_inferior_memory): New functions.
18893 * target.h (read_inferior_memory)
18894 (write_inferior_memory): Change macros to prototypes.
18895 (struct target_ops): Update comments. Add const to write_memory
18898 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18900 * linux-low.c (usr_store_inferior_registers): Support
18901 registers which are allowed to fail to store.
18902 * linux-low.h (linux_target_ops): Likewise.
18903 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18904 (ppc_cannot_store_register): FPSCR may not be storable.
18906 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18908 * server.h: Include <string.h> if HAVE_STRING_H.
18909 * ChangeLog: Correct paths in last ChangeLog entry.
18911 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18913 * linux-low.h: Remove obsolete prototypes.
18914 (struct linux_target_ops): New.
18915 (extern the_low_target): New.
18916 * linux-low.c (num_regs, regmap): Remove declarations.
18917 (register_addr): Use the_low_target explicitly.
18918 (fetch_register): Likewise.
18919 (usr_fetch_inferior_registers): Likewise.
18920 (usr_store_inferior_registers): Likewise.
18921 * linux-arm-low.c (num_regs): Remove.
18922 (arm_num_regs): Define.
18923 (arm_regmap): Renamed from regmap, made static.
18924 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18926 (arm_cannot_store_register): Renamed from cannot_store_register,
18928 (the_low_target): New.
18929 * linux-i386-low.c (num_regs): Remove.
18930 (i386_num_regs): Define.
18931 (i386_regmap): Renamed from regmap, made static.
18932 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18934 (i386_cannot_store_register): Renamed from cannot_store_register,
18936 (the_low_target): New.
18937 * linux-ia64-low.c (num_regs): Remove.
18938 (ia64_num_regs): Define.
18939 (ia64_regmap): Renamed from regmap, made static.
18940 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18942 (ia64_cannot_store_register): Renamed from cannot_store_register,
18944 (the_low_target): New.
18945 * linux-m68k-low.c (num_regs): Remove.
18946 (m68k_num_regs): Define.
18947 (m68k_regmap): Renamed from regmap, made static.
18948 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18950 (m68k_cannot_store_register): Renamed from cannot_store_register,
18952 (the_low_target): New.
18953 * linux-mips-low.c (num_regs): Remove.
18954 (mips_num_regs): Define.
18955 (mips_regmap): Renamed from regmap, made static.
18956 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18958 (mips_cannot_store_register): Renamed from cannot_store_register,
18960 (the_low_target): New.
18961 * linux-ppc-low.c (num_regs): Remove.
18962 (ppc_num_regs): Define.
18963 (ppc_regmap): Renamed from regmap, made static.
18964 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18966 (ppc_cannot_store_register): Renamed from cannot_store_register,
18968 (the_low_target): New.
18969 * linux-s390-low.c (num_regs): Remove.
18970 (s390_num_regs): Define.
18971 (s390_regmap): Renamed from regmap, made static.
18972 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18974 (s390_cannot_store_register): Renamed from cannot_store_register,
18976 (the_low_target): New.
18977 * linux-sh-low.c (num_regs): Remove.
18978 (sh_num_regs): Define.
18979 (sh_regmap): Renamed from regmap, made static.
18980 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18982 (sh_cannot_store_register): Renamed from cannot_store_register,
18984 (the_low_target): New.
18985 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18986 (the_low_target): New.
18988 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18990 * Makefile.in: Add stamp-h target.
18991 * configure.in: Create stamp-h.
18992 * configure: Regenerated.
18994 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18996 * inferiors.c: New file.
18997 * target.c: New file.
18998 * target.h: New file.
18999 * Makefile.in: Add target.o and inferiors.o. Update
19001 * linux-low.c (inferior_pid): New static variable,
19002 moved from server.c.
19003 (linux_create_inferior): Renamed from create_inferior.
19004 Call add_inferior. Return 0 on success instead of a PID.
19005 (linux_attach): Renamed from myattach.
19006 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19007 (linux_thread_alive): Renamed from mythread_alive.
19008 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19010 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19011 (regsets_store_inferior_registers): Correct error message.
19012 Add missing ``return 0''.
19013 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19014 (linux_store_registers): Renamed from store_inferior_registers.
19015 (linux_read_memory): Renamed from read_inferior_memory.
19016 (linux_write_memory): Renamed from write_inferior_memory.
19017 (linux_target_ops): New structure.
19018 (initialize_low): Call set_target_ops ().
19019 * remote-utils.c (unhexify): New function.
19020 (hexify): New function.
19021 (input_interrupt): Send signals to ``signal_pid''.
19022 * server.c (inferior_pid): Remove.
19023 (start_inferior): Update create_inferior call.
19024 (attach_inferior): Call add_inferior.
19025 (handle_query): New function.
19026 (main): Call handle_query for `q' packets.
19027 * server.h: Include "target.h". Remove obsolete prototypes.
19028 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19030 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19032 * Makefile.in: Add WARN_CFLAGS. Update configury
19034 * configure.in: Check for <string.h>
19035 * configure: Regenerate.
19036 * config.in: Regenerate.
19037 * gdbreplay.c: Include needed system headers.
19038 (remote_open): Remove strchr prototype.
19039 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19040 * regcache.c (supply_register): Change buf argument to const void *.
19041 (supply_register_by_name): Likewise.
19042 (collect_register): Change buf argument to void *.
19043 (collect_register_by_name): Likewise.
19044 * regcache.h: Add missing prototypes.
19045 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19046 * server.c (handle_query): New function.
19047 (attached): New static variable, moved out of main.
19048 (main): Quiet longjmp clobber warnings.
19049 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19050 * utils.c (error): Remove NORETURN.