1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's supports_range_stepping op into a
4 method of process_target.
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_supports_range_stepping): Update the macro.
9 * target.cc (process_target::supports_range_stepping): Define.
11 Update the derived classes and callers below.
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_range_stepping): Turn into ...
15 (linux_process_target::supports_range_stepping): ... 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 btrace-related ops (enable_btrace,
24 disable_btrace, read_btrace, read_btrace_conf) into methods of
27 * target.h (struct process_stratum_target): Remove the target ops.
28 (class process_target): Add the target ops.
29 (target_enable_btrace): Update.
30 (target_disable_btrace): Update.
31 (target_read_btrace): Update.
32 (target_read_btrace_conf): Update.
33 * target.cc (process_target::enable_btrace): Define.
34 (process_target::disable_btrace): Define.
35 (process_target::read_btrace): Define.
36 (process_target::read_btrace_conf): Define.
38 Update the derived classes and callers below.
40 * linux-low.cc (linux_target_ops): Update.
41 (linux_process_target:enable_btrace): Define as a wrapper around
43 (linux_low_disable_btrace): Turn into ...
44 (linux_process_target::disable_btrace): ... this.
45 (linux_low_read_btrace): Turn into ...
46 (linux_process_target::read_btrace): ... this.
47 (linux_low_btrace_conf): Turn into ...
48 (linux_process_target::read_btrace_conf): ... this.
49 * linux-low.h (class linux_process_target): Update.
50 * lynx-low.cc (lynx_target_ops): Update.
51 * nto-low.cc (nto_target_ops): Update.
52 * win32-low.cc (win32_target_ops): Update.
54 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
56 Turn process_stratum_target's supports_agent op into a method of
59 * target.h (struct process_stratum_target): Remove the target op.
60 (class process_target): Add the target op.
61 (target_supports_agent): Update the macro.
62 * target.cc (process_target::supports_agent): Define.
64 Update the derived classes and callers below.
66 * linux-low.cc (linux_target_ops): Update.
67 (linux_supports_agent): Turn into ...
68 (linux_process_target::supports_agent): ... this.
69 * linux-low.h (class linux_process_target): Update.
70 * lynx-low.cc (lynx_target_ops): Update.
71 * nto-low.cc (nto_target_ops): Update.
72 * win32-low.cc (win32_target_ops): Update.
74 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
76 Turn process_stratum_target's qxfer_libraries_svr4 op into a
77 method of process_target.
79 * target.h (struct process_stratum_target): Remove the target op.
80 (class process_target): Add the target op. Also add
81 'supports_qxfer_libraries_svr4'.
82 * target.cc (process_target::qxfer_libraries_svr4): Define.
83 (process_target::supports_qxfer_libraries_svr4): Define.
85 Update the derived classes and callers below.
87 * server.cc (handle_qxfer_libraries_svr4): Update.
88 (handle_query): Update.
89 * linux-low.cc (linux_target_ops): Update.
90 (linux_process_target::supports_qxfer_libraries_svr4): Define.
91 (linux_qxfer_libraries_svr4): Turn into ...
92 (linux_process_target::qxfer_libraries_svr4): ... this.
93 * linux-low.h (class linux_process_target): Update.
94 * lynx-low.cc (lynx_target_ops): Update.
95 * nto-low.cc (nto_target_ops): Update.
96 * win32-low.cc (win32_target_ops): Update.
98 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
100 Turn process_stratum_target's supports_disable_randomization op
101 into a method of process_target.
103 * target.h (struct process_stratum_target): Remove the target op.
104 (class process_target): Add the target op.
105 (target_supports_disable_randomization): Update the macro.
106 * target.cc (process_target::supports_disable_randomization): Define.
108 Update the derived classes and callers below.
110 * linux-low.cc (linux_target_ops): Update.
111 (linux_supports_disable_randomization): Turn into ...
112 (linux_process_target::supports_disable_randomization): ... this.
113 * linux-low.h (class linux_process_target): Update.
114 * lynx-low.cc (lynx_target_ops): Update.
115 * nto-low.cc (nto_target_ops): Update.
116 * win32-low.cc (win32_target_ops): Update.
118 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
120 Turn process_stratum_target's emit_ops op into a method of
123 * target.h (struct process_stratum_target): Remove the target op.
124 (class process_target): Add the target op.
125 (target_emit_ops): Update the macro.
126 * target.cc (process_target::emit_ops): Define.
128 Update the derived classes and callers below.
130 * linux-low.cc (linux_target_ops): Update.
131 (linux_emit_ops): Turn into ...
132 (linux_process_target::emit_ops): ... this.
133 * linux-low.h (class linux_process_target): Update.
134 * lynx-low.cc (lynx_target_ops): Update.
135 * nto-low.cc (nto_target_ops): Update.
136 * win32-low.cc (win32_target_ops): Update.
138 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
140 Turn process_stratum_target's install_fast_tracepoint_jump_pad
141 and get_min_fast_tracepoint_insn_len ops into methods of
144 * target.h (struct process_stratum_target): Remove the target ops.
145 (class process_target): Add the target ops. Also add
146 'supports_fast_tracepoints'.
147 (target_supports_fast_tracepoints): Update the macro.
148 (target_get_min_fast_tracepoint_insn_len): Update the macro.
149 (install_fast_tracepoint_jump_pad): Update and rename the macro
151 (target_install_fast_tracepoint_jump_pad): ... this.
152 * target.cc (process_target::supports_fast_tracepoints): Define.
153 (process_target::install_fast_tracepoint_jump_pad): Define.
154 (process_target::get_min_fast_tracepoint_insn_len): Define.
156 Update the derived classes and callers below.
158 * tracepoint.cc (install_fast_tracepoint): Update.
159 * linux-low.cc (linux_target_ops): Update.
160 (linux_process_target::supports_fast_tracepoints): Define.
161 (linux_install_fast_tracepoint_jump_pad): Turn into ...
162 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
163 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
164 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
165 * linux-low.h (class linux_process_target): Update.
166 * lynx-low.cc (lynx_target_ops): Update.
167 * nto-low.cc (nto_target_ops): Update.
168 * win32-low.cc (win32_target_ops): Update.
170 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
172 Turn process_stratum_target's stabilize_threads op into a
173 method of process_target.
175 * target.h (struct process_stratum_target): Remove the target op.
176 (class process_target): Add the target op.
177 (target_stabilize_threads): Update the macro.
178 * target.cc (process_target::stabilize_threads): Define.
180 Update the derived classes and callers below.
182 * server.cc (handle_status): Update.
183 * tracepoint.cc (cmd_qtdp): Update.
184 (cmd_qtstart): Update.
185 * linux-low.cc (linux_target_ops): Update.
186 (linux_stabilize_threads): Turn into ...
187 (linux_process_target::stabilize_threads): ... this.
188 (linux_wait_1): Update.
189 * linux-low.h (class linux_process_target): Update.
190 * lynx-low.cc (lynx_target_ops): Update.
191 * nto-low.cc (nto_target_ops): Update.
192 * win32-low.cc (win32_target_ops): Update.
194 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
196 Turn process_stratum_target's pause_all and unpause_all ops
197 into methods of process_target.
199 * target.h (struct process_stratum_target): Remove the target ops.
200 (class process_target): Add the target ops.
201 (pause_all): Update the macro and rename to...
202 (target_pause_all): ... this.
203 (unpause_all): Update the macro and rename to...
204 (target_unpause_all): ... this.
205 * target.cc (process_target::pause_all): Define.
206 (process_target::unpause_all): Define.
208 Update the derived classes and callers below.
210 * server.cc (handle_status): Update.
211 * tracepoint.cc (clear_installed_tracepoints): Update.
213 (cmd_qtstart): Update.
214 (stop_tracing): Update.
215 (cmd_qtstatus): Update.
216 (upload_fast_traceframes): Update.
217 (run_inferior_command): Update.
218 * linux-low.cc (linux_target_ops): Update.
219 (linux_pause_all): Turn into ...
220 (linux_process_target::pause_all): ... this.
221 (linux_unpause_all): Turn into ...
222 (linux_process_target::unpause_all): ... this.
223 (linux_process_target::prepare_to_access_memory): Update.
224 (linux_process_target::done_accessing_memory): Update.
225 * linux-low.h (class linux_process_target): Update.
226 * lynx-low.cc (lynx_target_ops): Update.
227 * nto-low.cc (nto_target_ops): Update.
228 * win32-low.cc (win32_target_ops): Update.
230 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
232 Turn process_stratum_target's get_tib_address op into a method of
235 * target.h (struct process_stratum_target): Remove the target op.
236 (class process_target): Add the target op. Also add
237 'supports_get_tib_address'.
238 * target.cc (process_target::get_tib_address): Define.
239 (process_target::supports_get_tib_address): Define.
241 Update the derived classes and callers below.
243 * server.cc (handle_query): Update.
244 * linux-low.cc (win32_target_ops): Update.
245 * lynx-low.cc (lynx_target_ops): Update.
246 * nto-low.cc (nto_target_ops): Update.
247 * win32-low.cc (win32_target_ops): Update.
248 (win32_process_target::supports_get_tib_address): Define.
249 (win32_get_tib_address): Turn into ...
250 (win32_process_target::get_tib_address): ... this.
251 * win32-low.h (class win32_process_target): Update.
253 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
255 Turn process_stratum_target's thread_stopped op into a method of
258 * target.h (struct process_stratum_target): Remove the target op.
259 (class process_target): Add the target op. Also add
260 'supports_thread_stopped'.
261 (target_thread_stopped): Update the macro.
262 * target.cc (process_target::thread_stopped): Define.
263 (process_target::supports_thread_stopped): Define.
264 (prepare_to_access_memory): Update.
266 Update the derived classes and callers below.
268 * server.cc (queue_stop_reply_callback): Update.
269 * linux-low.cc (linux_target_ops): Update.
270 (linux_process_target::supports_thread_stopped): Define.
271 (linux_thread_stopped): Turn into ...
272 (linux_process_target::thread_stopped): ... this.
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_pc and write_pc ops into
281 methods of process_target.
283 * target.h (struct process_stratum_target): Remove the target ops.
284 (class process_target): Add the target ops.
285 * target.cc (process_target::read_pc): Define.
286 (process_target::write_pc): Define.
288 Update the derived classes and callers below.
290 * regcache.cc (regcache_read_pc): Update.
291 (regcache_write_pc): Update.
292 * linux-low.cc (linux_target_ops): Update.
293 (linux_read_pc): Turn into ...
294 (linux_process_target::read_pc): ... this.
295 (linux_write_pc): Turn into ...
296 (linux_process_target::write_pc): ... 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 supports_tracepoints op into a
305 method of process_target.
307 * target.h (struct process_stratum_target): Remove the target op.
308 (class process_target): Add the target op.
309 (target_supports_tracepoints): Update the macro.
310 * target.cc (process_target::supports_tracepoints): Define.
312 Update the derived classes and callers below.
314 * linux-low.cc (linux_target_ops): Update.
315 (linux_supports_tracepoints): Turn into ...
316 (linux_process_target::supports_tracepoints): ... this.
317 * linux-low.h (class linux_process_target): Update.
318 * lynx-low.cc (lynx_target_ops): Update.
319 * nto-low.cc (nto_target_ops): Update.
320 * win32-low.cc (win32_target_ops): Update.
322 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
324 Turn process_stratum_target's process_qsupported op into a method
327 * target.h (struct process_stratum_target): Remove the target op.
328 (class process_target): Add the target op.
329 (target_process_qsupported): Update the macro.
330 * target.cc (process_target::process_qsupported): Define.
332 Update the derived classes and callers below.
334 * linux-low.cc (linux_target_ops): Update.
335 (linux_process_qsupported): Turn into ...
336 (linux_process_target::process_qsupported): ... this.
337 * linux-low.h (class linux_process_target): Update.
338 * lynx-low.cc (lynx_target_ops): Update.
339 * nto-low.cc (nto_target_ops): Update.
340 * win32-low.cc (win32_target_ops): Update.
342 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
344 Turn process_stratum_target's read_loadmap op into a method of
347 * target.h (struct process_stratum_target): Remove the target op.
348 (class process_target): Add the target op. Also add
349 'supports_read_loadmap'.
350 * target.cc (process_target::read_loadmap): Define.
351 (process_target::supports_read_loadmap): Define.
353 Update the derived classes and callers below.
355 * server.cc (handle_qxfer_fdpic): Update.
356 (handle_query): Update.
357 * linux-low.cc (linux_target_ops): Update.
358 (linux_process_target::supports_read_loadmap): Define.
359 (linux_read_loadmap): Turn into ...
360 (linux_process_target::read_loadmap): ... this.
361 * linux-low.h (class linux_process_target): Update.
362 * lynx-low.cc (lynx_target_ops): Update.
363 * nto-low.cc (nto_target_ops): Update.
364 * win32-low.cc (win32_target_ops): Update.
366 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
368 Turn process_stratum_target's core_of_thread op into a method of
371 * target.h (struct process_stratum_target): Remove the target op.
372 (class process_target): Add the target op.
373 (target_core_of_thread): Update the macro.
374 * target.cc (process_target::core_of_thread): Define.
376 Update the derived classes and callers below.
378 * linux-low.cc (linux_target_ops): Update.
379 (linux_process_target::core_of_thread): Define.
380 * linux-low.h (class linux_process_target): Update.
381 * lynx-low.cc (lynx_target_ops): Update.
382 * nto-low.cc (nto_target_ops): Update.
383 * win32-low.cc (win32_target_ops): Update.
385 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
387 Turn process_stratum_target's handle_monitor_command op into a
388 method of process_target.
390 * target.h (struct process_stratum_target): Remove the target op.
391 (class process_target): Add the target op.
392 (target_handle_monitor_command): Update the macro.
393 * target.cc (process_target::handle_monitor_command): Define.
395 Update the derived classes and callers below.
397 * server.cc (handle_query): Update.
398 * linux-low.cc (linux_target_ops): Update.
399 (linux_process_target::handle_monitor_command): Define.
400 * linux-low.h (class linux_process_target): Update.
401 * lynx-low.cc (lynx_target_ops): Update.
402 * nto-low.cc (nto_target_ops): Update.
403 * win32-low.cc (win32_target_ops): Update.
405 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
407 Turn process_stratum_target's handle_new_gdb_connection op into a
408 method of process_target.
410 * target.h (struct process_stratum_target): Remove the target op.
411 (class process_target): Add the target op.
412 (target_handle_new_gdb_connection): Update the macro.
413 * target.cc (process_target::handle_new_gdb_connection): Define.
415 Update the derived classes and callers below.
417 * linux-low.cc (linux_target_ops): Update.
418 (linux_handle_new_gdb_connection): Turn into ...
419 (linux_process_target::handle_new_gdb_connection): ... this.
420 * linux-low.h (class linux_process_target): Update.
421 * lynx-low.cc (lynx_target_ops): Update.
422 * nto-low.cc (nto_target_ops): Update.
423 * win32-low.cc (win32_target_ops): Update.
425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
427 Turn process_stratum_target's supports_fork_events,
428 supports_vfork_events, and supports_exec_events ops into methods
431 * target.h (struct process_stratum_target): Remove the target ops.
432 (class process_target): Add the target ops.
433 (target_supports_fork_events): Update the macro.
434 (target_supports_vfork_events): Update the macro.
435 (target_supports_exec_events): Update the macro.
436 * target.cc (process_target::supports_fork_events): Define.
437 (process_target::supports_vfork_events): Define.
438 (process_target::supports_exec_events): Define.
440 Update the derived classes and callers below.
442 * linux-low.cc (linux_target_ops): Update.
443 (linux_supports_fork_events): Turn into ...
444 (linux_process_target::supports_fork_events): ... this.
445 (linux_supports_vfork_events): Turn into ...
446 (linux_process_target::supports_vfork_events): ... this.
447 (linux_supports_exec_events): Turn into ...
448 (linux_process_target::supports_exec_events): ... this.
449 * linux-low.h (class linux_process_target): Update.
450 * lynx-low.cc (lynx_target_ops): Update.
451 * nto-low.cc (nto_target_ops): Update.
452 * win32-low.cc (win32_target_ops): Update.
454 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
456 Turn process_stratum_target's supports_multi_process op into a
457 method of process_target.
459 * target.h (struct process_stratum_target): Remove the target op.
460 (class process_target): Add the target op.
461 * target.cc (process_target::supports_multi_process): Define.
462 (target_supports_multi_process): Update.
464 Update the derived classes and callers below.
466 * linux-low.cc (linux_target_ops): Update.
467 (linux_supports_multi_process): Turn into ...
468 (linux_process_target::supports_multi_process): ... this.
469 * linux-low.h (class linux_process_target): Update.
470 * lynx-low.cc (lynx_target_ops): Update.
471 * nto-low.cc (nto_target_ops): Update.
472 * win32-low.cc (win32_target_ops): Update.
474 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
476 Turn process_stratum_target's supports_non_stop, async, and
477 start_non_stop ops into methods of process_target.
479 * target.h (struct process_stratum_target): Remove the target ops.
480 (class process_target): Add the target ops.
481 (target_supports_non_stop): Update the macro.
482 (target_async): Update the macro.
483 (start_non_stop): Remove declaration.
484 * target.cc (process_target::supports_non_stop): Define.
485 (process_target::async): Define.
486 (process_target::start_non_stop): Define.
487 (start_non_stop): Remove.
489 Update the derived classes and callers below.
491 * server.cc (handle_qxfer_siginfo): Update.
492 (handle_query): Update.
493 * linux-low.cc (linux_target_ops): Update.
494 (linux_supports_non_stop): Turn into ...
495 (linux_process_target::supports_non_stop): ... this.
496 (linux_async): Turn into ...
497 (linux_process_target::async): ... this.
498 (linux_start_non_stop): Turn into ...
499 (linux_process_target::start_non_stop): ... this.
500 * linux-low.h (class linux_process_target): Update.
501 * lynx-low.cc (lynx_target_ops): Update.
502 * nto-low.cc (nto_target_ops): Update.
503 (nto_supports_non_stop): Remove; rely on the default behavior
505 * win32-low.cc (win32_target_ops): Update.
507 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
509 Turn process_stratum_target's qxfer_siginfo op into a method of
512 * target.h (struct process_stratum_target): Remove the target op.
513 (class process_target): Add the target op. Also add
514 'supports_qxfer_siginfo'.
515 * target.cc (process_target::qxfer_siginfo): Define.
516 (process_target::supports_qxfer_siginfo): Define.
518 Update the derived classes and callers below.
520 * server.cc (handle_qxfer_siginfo): Update.
521 (handle_query): Update.
522 * linux-low.cc (linux_target_ops): Update.
523 (linux_process_target::supports_qxfer_siginfo): Define.
524 (linux_xfer_siginfo): Turn into ...
525 (linux_process_target::qxfer_siginfo): ... this.
526 * linux-low.h (class linux_process_target): Update.
527 * lynx-low.cc (lynx_target_ops): Update.
528 * nto-low.cc (nto_target_ops): Update.
529 * win32-low.cc (win32_target_ops): Update.
531 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
533 Turn process_stratum_target's qxfer_osdata op into a method of
536 * target.h (struct process_stratum_target): Remove the target op.
537 (class process_target): Add the target op. Also add
538 'supports_qxfer_osdata'.
539 * target.cc (process_target::qxfer_osdata): Define.
540 (process_target::supports_qxfer_osdata): Define.
542 Update the derived classes and callers below.
544 * server.cc (handle_qxfer_osdata): Update.
545 (handle_query): Update.
546 * linux-low.cc (linux_target_ops): Update.
547 (linux_process_target::supports_qxfer_osdata): Define.
548 (linux_qxfer_osdata): Turn into ...
549 (linux_process_target::qxfer_osdata): ... this.
550 * linux-low.h (class linux_process_target): Update.
551 * lynx-low.cc (lynx_target_ops): Update.
552 * nto-low.cc (nto_target_ops): Update.
553 * win32-low.cc (win32_target_ops): Update.
555 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
557 Turn process_stratum_target's hostio_last_error op into a
558 method of process_target.
560 * target.h (struct process_stratum_target): Remove the target op.
561 (class process_target): Add the target op.
562 * target.cc: Add "hostio.h" to includes.
563 (process_target::hostio_last_error): Define.
565 Update the derived classes and callers below.
567 * hostio.cc (hostio_error): Update.
568 * linux-low.cc: Remove "hostio.h" from includes.
569 (linux_target_ops): Update.
570 * lynx-low.cc (lynx_target_ops): Update.
571 * nto-low.cc (nto_target_ops): Update.
572 * win32-low.h (class win32_process_target): Update.
573 * win32-low.cc (win32_target_ops): Update.
574 (wince_hostio_last_error): Turn into ...
575 (win32_process_target::hostio_last_error): ... this.
577 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
579 Turn process_stratum_target's get_tls_address op into a method of
582 * target.h (struct process_stratum_target): Remove the target op.
583 (class process_target): Add the target op. Also add
584 'supports_get_tls_address'.
585 * target.cc (process_target::get_tls_address): Define.
586 (process_target::supports_get_tls_address): Define.
588 Update the derived classes and callers below.
590 * server.cc (handle_query): Update.
591 * linux-low.cc (linux_target_ops): Update.
592 (linux_process_target::supports_get_tls_address): Define.
593 (linux_process_target::get_tls_address): Define.
594 * linux-low.h (class linux_process_target): Update.
595 * lynx-low.cc (lynx_target_ops): Update.
596 * nto-low.cc (nto_target_ops): Update.
597 * win32-low.cc (win32_target_ops): Update.
599 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
601 Turn process_stratum_target's read_offsets op into a method of
604 * target.h (struct process_stratum_target): Remove the target op.
605 (class process_target): Add the target op. Also add
606 'supports_read_offsets'.
607 * target.cc (process_target::read_offsets): Define.
608 (process_target::supports_read_offsets): Define.
610 Update the derived classes and callers below.
612 * server.cc (handle_query): Update.
613 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
614 (linux_target_ops): Update.
615 (linux_process_target::supports_read_offsets): Define.
616 (linux_read_offsets): Turn into ...
617 (linux_process_target::read_offsets): ... this.
618 * linux-low.h (class linux_process_target): Update.
619 * lynx-low.cc (lynx_target_ops): Update.
620 * nto-low.cc (nto_target_ops): Update.
621 * win32-low.cc (win32_target_ops): Update.
623 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
625 Turn process_stratum_target's stopped_by_watchpoint and
626 stopped_data_address ops into methods of process_target.
628 * target.h (struct process_stratum_target): Remove the target ops.
629 (class process_target): Add the target ops.
630 * target.cc (process_target::stopped_by_watchpoint): Define.
631 (process_target::stopped_data_address): Define.
633 Update the derived classes and callers below.
635 * remote-utils.cc (prepare_resume_reply): Update.
636 * linux-low.cc (linux_target_ops): Update.
637 (linux_stopped_by_watchpoint): Turn into ...
638 (linux_process_target::stopped_by_watchpoint): ... this.
639 (linux_stopped_data_address): Turn into ...
640 (linux_process_target::stopped_data_address): ... this.
641 * linux-low.h (class linux_process_target): Update.
642 * lynx-low.cc (lynx_target_ops): Update.
643 * nto-low.cc (nto_target_ops): Update.
644 (nto_stopped_by_watchpoint): Turn into ...
645 (nto_process_target::stopped_by_watchpoint): ... this.
646 (nto_stopped_data_address): Turn into ...
647 (nto_process_target::stopped_data_address): ... this.
648 * nto-low.h (class nto_process_target): Update.
649 * win32-low.cc (win32_target_ops): Update.
650 (win32_stopped_by_watchpoint): Turn into ...
651 (win32_process_target::stopped_by_watchpoint): ... this.
652 (win32_stopped_data_address): Turn into ...
653 (win32_process_target::stopped_data_address): ... this.
654 * win32-low.h (class win32_process_target): Update.
656 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
658 Turn process_stratum_target's supports_hardware_single_step op into
659 a method of process_target.
661 * target.h (struct process_stratum_target): Remove the target op.
662 (class process_target): Add the target op.
663 (target_supports_hardware_single_step): Update the macro.
664 (target_can_do_hardware_single_step): Remove declaration.
665 * target.cc (process_target::supports_hardware_single_step): Define.
666 (target_can_do_hardware_single_step): Remove.
668 Update the derived classes and callers below.
670 * linux-low.h (class linux_process_target): Update.
671 * linux-low.cc (linux_target_ops): Update.
672 (linux_supports_hardware_single_step): Turn into ...
673 (linux_process_target::supports_hardware_single_step): ... this.
674 * lynx-low.h (class lynx_process_target): Update.
675 * lynx-low.cc (lynx_target_ops): Update.
676 (lynx_process_target::supports_hardware_single_step): Define.
677 * nto-low.h (class nto_process_target): Update.
678 * nto-low.cc (nto_target_ops): Update.
679 (nto_process_target::supports_hardware_single_step): Define.
680 * win32-low.h (class win32_process_target): Update.
681 * win32-low.cc (win32_target_ops): Update.
682 (win32_process_target::supports_hardware_single_step): Define.
684 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
686 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
687 ops into methods of process_target.
689 * target.h (struct process_stratum_target): Remove the target ops.
690 (class process_target): Add the target ops.
691 (target_stopped_by_hw_breakpoint): Update the macro.
692 (target_supports_stopped_by_hw_breakpoint): Update the macro.
693 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
694 (process_target::supports_stopped_by_hw_breakpoint): Define.
696 Update the derived classes and callers below.
698 * linux-low.cc (linux_target_ops): Update.
699 (linux_stopped_by_hw_breakpoint): Turn into ...
700 (linux_process_target::stopped_by_hw_breakpoint): ... this.
701 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
702 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
703 * linux-low.h (class linux_process_target): Update.
704 * lynx-low.cc (lynx_target_ops): Update.
705 * nto-low.cc (nto_target_ops): Update.
706 * win32-low.cc (win32_target_ops): Update.
708 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
710 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
711 ops into methods of process_target.
713 * target.h (struct process_stratum_target): Remove the target ops.
714 (class process_target): Add the target ops.
715 (target_stopped_by_sw_breakpoint): Update the macro.
716 (target_supports_stopped_by_sw_breakpoint): Update the macro.
717 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
718 (process_target::supports_stopped_by_sw_breakpoint): Define.
720 Update the derived classes and callers below.
722 * linux-low.cc (linux_target_ops): Update.
723 (linux_stopped_by_sw_breakpoint): Turn into ...
724 (linux_process_target::stopped_by_sw_breakpoint): ... this.
725 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
726 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
727 * linux-low.h (class linux_process_target): Update.
728 * lynx-low.cc (lynx_target_ops): Update.
729 * nto-low.cc (nto_target_ops): Update.
730 * win32-low.cc (win32_target_ops): Update.
732 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
734 Turn process_stratum_target's insert_point and remove_point ops
735 into methods of process_target.
737 * target.h (struct process_stratum_target): Remove the target ops.
738 (class process_target): Add the target ops.
739 * target.cc (process_target::insert_point): Define.
740 (process_target::remove_point): Define.
742 Update the derived classes and callers below.
744 * mem-break.cc (set_raw_breakpoint_at): Update.
745 (delete_raw_breakpoint): Update.
746 (uninsert_raw_breakpoint): Update.
747 (reinsert_raw_breakpoint): Update.
748 * linux-low.cc (linux_target_ops): Update.
749 (linux_insert_point): Turn into ...
750 (linux_process_target::insert_point): ... this.
751 (linux_remove_point): Turn into ...
752 (linux_process_target::remove_point): ... this.
753 * linux-low.h (class linux_process_target): Update.
754 * lynx-low.cc (lynx_target_ops): Update.
755 * nto-low.cc (nto_target_ops): Update.
756 (nto_insert_point): Turn into ...
757 (nto_process_target::insert_point): ... this.
758 (nto_remove_point): Turn into ...
759 (nto_process_target::remove_point): ... this.
760 * nto-low.h (class nto_process_target): Update.
761 * win32-low.cc (win32_target_ops): Update.
762 (win32_insert_point): Turn into ...
763 (win32_process_target::insert_point): ... this.
764 (win32_remove_point): Turn into ...
765 (win32_process_target::remove_point): ... this.
766 * win32-low.h (class win32_process_target): Update.
768 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
770 Turn process_stratum_target's supports_z_point_type op into a
771 method of process_target.
773 * target.h (struct process_stratum_target): Remove the target op.
774 (class process_target): Add the target op.
775 * target.cc (process_target::supports_z_point_type): Define.
777 Update the derived classes and callers below.
779 * mem-break.cc (z_type_supported): Update.
780 * linux-low.cc (linux_target_ops): Update.
781 (linux_supports_z_point_type): Turn into ...
782 (linux_process_target::supports_z_point_type): ... this.
783 * linux-low.h (class linux_process_target): Update.
784 * lynx-low.cc (lynx_target_ops): Update.
785 * nto-low.cc (nto_target_ops): Update.
786 (nto_supports_z_point_type): Turn into ...
787 (nto_process_target::supports_z_point_type): ... this.
788 * nto-low.h (class nto_process_target): Update.
789 * win32-low.cc (win32_target_ops): Update.
790 (win32_supports_z_point_type): Turn into ...
791 (win32_process_target::supports_z_point_type): ... this.
792 * win32-low.h (class win32_process_target): Update.
794 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
796 Turn process_stratum_target's read_auxv op into a method of
799 * target.h (class process_stratum_target): Remove the target op.
800 (struct process_target): Add the target op. Also add
801 'supports_read_auxv'.
802 * target.cc (process_target::read_auxv): Define.
803 (process_target::supports_read_auxv): Define.
805 Update the derived classes and callers below.
807 * server.cc (handle_qxfer_auxv): Update.
808 (handle_query): Update.
809 * linux-low.cc (linux_target_ops): Update.
810 (linux_process_target::supports_read_auxv): Define.
811 (linux_read_auxv): Turn into ...
812 (linux_process_target::read_auxv): ... this.
813 * linux-low.h (class linux_process_target): Update.
814 * lynx-low.cc (lynx_target_ops): Update.
815 * nto-low.cc (nto_target_ops): Update.
816 (nto_process_target::supports_read_auxv): Define.
817 (nto_read_auxv): Turn into ...
818 (nto_process_target::read_auxv): ... this.
819 * nto-low.h (class nto_process_target): Update.
820 * win32-low.cc (win32_target_ops): Update.
822 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
824 Turn process_stratum_target's request_interrupt op into a method of
827 * target.h (struct process_stratum_target): Remove the target op.
828 (class process_target): Add the target op.
830 Update the derived classes and callers below.
832 * remote-utils.cc (putpkt_binary_1): Update.
833 (input_interrupt): Update.
835 * server.cc (handle_v_requests): Update.
836 * linux-low.cc (linux_target_ops): Update.
837 (linux_request_interrupt): Turn into ...
838 (linux_process_target::request_interrupt): ... this.
839 * linux-low.h (class linux_process_target): Update.
840 * lynx-low.cc (lynx_target_ops): Update.
841 (lynx_request_interrupt): Turn into ...
842 (lynx_process_target::request_interrupt): ... this.
843 * lynx-low.h (class lynx_process_target): Update.
844 * nto-low.cc (nto_target_ops): Update.
845 (nto_request_interrupt): Turn into ...
846 (nto_process_target::request_interrupt): ... this.
847 * nto-low.h (class nto_process_target): Update.
848 * win32-low.cc (win32_target_ops): Update.
849 (win32_request_interrupt): Turn into ...
850 (win32_process_target::request_interrupt): ... this.
851 * win32-low.h (class win32_process_target): Update.
853 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
855 Turn process_stratum_target's look_up_symbols op into a method of
858 * target.h (struct process_stratum_target): Remove the target op.
859 (class process_target): Add the target op.
860 * target.cc (process_target::look_up_symbols): Define.
862 Update the derived classes and callers below.
864 * server.cc (handle_query): Update.
865 * linux-low.cc (linux_target_ops): Update.
866 (linux_look_up_symbols): Turn into ...
867 (linux_process_target::look_up_symbols): ... this.
868 * linux-low.h (class linux_process_target): Update.
869 * lynx-low.cc (lynx_target_ops): Update.
870 * nto-low.cc (nto_target_ops): Update.
871 * win32-low.cc (win32_target_ops): Update.
873 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
875 Turn process_stratum_target's read_memory and write_memory
876 ops into methods of process_target.
878 * target.h (struct process_stratum_target): Remove the target ops.
879 (class process_target): Add the target ops.
881 Update the derived classes and callers below.
883 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
884 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
885 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
886 (arm_get_syscall_trapinfo): Update.
887 * linux-cris-low.cc (cris_breakpoint_at): Update.
888 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
889 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
890 * linux-mips-low.cc (mips_breakpoint_at): Update.
891 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
892 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
893 * linux-sh-low.cc (sh_breakpoint_at): Update.
894 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
895 (sparc_store_gregset_from_stack): Update.
896 (sparc_breakpoint_at): Update.
897 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
898 * linux-tile-low.cc (tile_breakpoint_at): Update.
899 * linux-x86-low.cc (x86_breakpoint_at): Update.
900 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
901 * mem-brea.cc (insert_memory_breakpoint): Update.
902 (validate_inserted_breakpoint): Update.
903 * target.cc (read_inferior_memory): Update.
904 (target_write_memory): Update.
905 * linux-low.cc (linux_target_ops): Update.
906 (linux_read_memory): Make a wrapper around the read_memory target
908 (linux_process_target::read_memory): Rename from linux_read_memory.
909 (linux_write_memory): Turn into ...
910 (linux_process_target::write_memory): ... this.
911 * linux-low.h (class linux_process_target): Update.
912 * lynx-low.cc (lynx_target_ops): Update.
913 (lynx_read_memory): Turn into ...
914 (lynx_process_target::read_memory): ... this.
915 (lynx_write_memory): Turn into ...
916 (lynx_process_target::write_memory): ... this.
917 * lynx-low.h (class lynx_process_target): Update.
918 * nto-low.cc (nto_target_ops): Update.
919 (nto_read_memory): Turn into ...
920 (nto_process_target::read_memory): ... this.
921 (nto_write_memory): Turn into ...
922 (nto_process_target::write_memory): ... this.
923 * nto-low.h (class nto_process_target): Update.
924 * win32-low.cc (win32_target_ops): Update.
925 (win32_read_inferior_memory): Turn into ...
926 (win32_process_target::read_memory): ... this.
927 (win32_write_inferior_memory): Turn into ...
928 (win32_process_target::write_memory): ... this.
929 * win32-low.h (class win32_process_target): Update.
931 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
933 Turn process_stratum_target's prepare_to_access_memory and
934 done_accessing_memory ops into methods of process_target.
936 * target.h (struct process_stratum_target): Remove the target ops.
937 (class process_target): Add the target ops.
938 * target.cc (process_target::prepare_to_access_memory): Define.
939 (process_target::done_accessing_memory): Define.
940 (prepare_to_access_memory): Update.
941 (done_accessing_memory): Update.
943 Update the derived classes and callers below.
945 * linux-low.cc (linux_target_ops): Update.
946 (linux_prepare_to_access_memory): Turn into ...
947 (linux_process_target::prepare_to_access_memory): ... this.
948 (linux_done_accessing_memory): Turn into ...
949 (linux_process_target::done_accessing_memory): ... this.
950 * linux-low.h (class linux_process_target): Update.
951 * lynx-low.cc (lynx_target_ops): Update.
952 * nto-low.cc (nto_target_ops): Update.
953 * win32-low.cc (win32_target_ops): Update.
955 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
957 Turn process_stratum_target's fetch_registers and store_registers
958 ops into methods of process_target.
960 * target.h (struct process_stratum_target): Remove the target ops.
961 (class process_target): Add the target ops.
962 (fetch_inferior_registers): Update the macro.
963 (store_inferior_registers): Update the macro.
965 Update the derived classes and callers below.
967 * linux-low.cc (linux_target_ops): Update.
968 (linux_fetch_registers): Turn into ...
969 (linux_process_target::fetch_registers): ... this.
970 (linux_store_registers): Turn into ...
971 (linux_process_target::store_registers): ... this.
972 * linux-low.h (class linux_process_target): Update.
973 * lynx-low.cc (lynx_target_ops): Update.
974 (lynx_fetch_registers): Turn into ...
975 (lynx_process_target::fetch_registers): ... this.
976 (lynx_store_registers): Turn into ...
977 (lynx_process_target::store_registers): ... this.
978 * lynx-low.h (class lynx_process_target): Update.
979 * nto-low.cc (nto_target_ops): Update.
980 (nto_fetch_registers): Turn into ...
981 (nto_process_target::fetch_registers): ... this.
982 (nto_store_registers): Turn into ...
983 (nto_process_target::store_registers): ... this.
984 * nto-low.h (class nto_process_target): Update.
985 * win32-low.cc (win32_target_ops): Update.
986 (win32_fetch_inferior_registers): Turn into ...
987 (win32_process_target::fetch_registers): ... this.
988 (win32_store_inferior_registers): Turn into ...
989 (win32_process_target::store_registers): ... this.
990 * win32-low.h (class win32_process_target): Update.
992 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
994 Turn process_stratum_target's wait op into a method of
997 * target.h (struct process_stratum_target): Remove the target op.
998 (class process_target): Add the target op.
1000 Update the derived classes and callers below.
1002 * target.cc (target_wait): Update.
1003 * linux-low.cc (linux_target_ops): Update.
1004 (linux_wait): Turn into ...
1005 (linux_process_target::wait): ... this.
1006 * linux-low.h (class linux_process_target): Update.
1007 * lynx-low.cc (lynx_target_ops): Update.
1008 (lynx_wait): Turn into ...
1009 (lynx_process_target::wait): ... this.
1010 * lynx-low.h (class lynx_process_target): Update.
1011 * nto-low.cc (nto_target_ops): Update.
1012 (nto_wait): Turn into ...
1013 (nto_process_target::wait): ... this.
1014 * nto-low.h (class nto_process_target): Update.
1015 * win32-low.cc (win32_target_ops): Update.
1016 (win32_wait): Turn into ...
1017 (win32_process_target::wait): ... this.
1018 (do_initial_child_stuff): Update.
1019 * win32-low.h (class win32_process_target): Update.
1021 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1023 Turn process_stratum_target's resume op into a method of
1026 * target.h (struct process_stratum_target): Remove the target op.
1027 (class process_target): Add the target op.
1029 Update the derived classes and callers below.
1031 * server.cc (resume): Update.
1032 * target.cc (target_stop_and_wait): Update.
1033 (target_continue_no_signal): Update.
1034 (target_continue): Update.
1035 * linux-low.cc (linux_target_ops): Update.
1036 (linux_resume): Turn into ...
1037 (linux_process_target::resume): ... this.
1038 * linux-low.h (class linux_process_target): Update.
1039 * lynx-low.cc (lynx_target_ops): Update.
1040 (lynx_resume): Turn into ...
1041 (lynx_process_target::resume): ... this.
1042 * lynx-low.h (class lynx_process_target): Update.
1043 * nto-low.cc (nto_target_ops): Update.
1044 (nto_resume): Turn into ...
1045 (nto_process_target::resume): ... this.
1046 * nto-low.h (class nto_process_target): Update.
1047 * win32-low.cc (win32_target_ops): Update.
1048 (win32_resume): Turn into ...
1049 (win32_process_target::resume): ... this.
1050 (win32_process_target::detach): Update.
1051 (do_initial_child_stuff): Update.
1052 * win32-low.h (class win32_process_target): Update.
1054 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1056 Turn process_stratum_target's thread_alive op into a method of
1059 * target.h (struct process_stratum_target): Remove the target op.
1060 (class process_target): Add the target op.
1061 (mythread_alive): Update the macro.
1063 Update the derived classes and callers below.
1065 * linux-low.cc (linux_target_ops): Update.
1066 (linux_thread_alive): Turn into ...
1067 (linux_process_target::thread_alive): ... this.
1068 (wait_for_sigstop): Update.
1069 * linux-low.h (class linux_process_target): Update.
1070 * lynx-low.cc (lynx_target_ops): Update.
1071 (lynx_thread_alive): Turn into ...
1072 (lynx_process_target::thread_alive): ... this.
1073 * lynx-low.h (class lynx_process_target): Update.
1074 * nto-low.cc (nto_target_ops): Update.
1075 (nto_thread_alive): Turn into ...
1076 (nto_process_target::thread_alive): ... this.
1077 * nto-low.h (class nto_process_target): Update.
1078 * win32-low.cc (win32_target_ops): Update.
1079 (win32_thread_alive): Turn into ...
1080 (win32_process_target::thread_alive): ... this.
1081 * win32-low.h (class win32_process_target): Update.
1083 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1085 Turn process_stratum_target's join op into a method of
1088 * target.h (struct process_stratum_target): Remove the target op.
1089 (class process_target): Add the target op.
1090 (join_inferior): Update the macro.
1092 Update the derived classes and callers below.
1094 * linux-low.cc (linux_target_ops): Update.
1095 (linux_join): Turn into ...
1096 (linux_process_target::join): ... this.
1097 * linux-low.h (class linux_process_target): Update.
1098 * lynx-low.cc (lynx_target_ops): Update.
1099 (lynx_join): Turn into ...
1100 (lynx_process_target::join): ... this.
1101 * lynx-low.h (class lynx_process_target): Update.
1102 * nto-low.cc (nto_target_ops): Update.
1103 (nto_process_target::join): Define.
1104 * nto-low.h (class nto_process_target): Update.
1105 * win32-low.cc (win32_target_ops): Update.
1106 (win32_join): Turn into ...
1107 (win32_process_target::join): ... this.
1108 * win32-low.h (class win32_process_target): Update.
1110 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1112 Turn process_stratum_target's mourn op into a method of
1115 * target.h (struct process_stratum_target): Remove the target op.
1116 (class process_target): Add the target op.
1118 Update the derived classes and callers below.
1120 * target.cc (target_mourn_inferior): Update.
1121 * linux-low.cc (linux_target_ops): Update.
1122 (linux_mourn): Turn into ...
1123 (linux_process_target::mourn): ... this.
1124 (handle_extended_wait): Update.
1125 (linux_process_target::kill): Update.
1126 (linux_process_target::detach): Update.
1127 * linux-low.h (class linux_process_target): Update.
1128 * lynx-low.cc (lynx_target_ops): Update.
1129 (lynx_mourn): Turn into ...
1130 (lynx_process_target::mourn): ... this.
1131 * lynx-low.h (class lynx_process_target): Update.
1132 * nto-low.cc (nto_target_ops): Update.
1133 (nto_mourn): Turn into ...
1134 (nto_process_target::mourn): ... this.
1135 * nto-low.h (class nto_process_target): Update.
1136 * win32-low.cc (win32_target_ops): Update.
1137 (win32_mourn): Turn into ...
1138 (win32_process_target::mourn): ... this.
1139 * win32-low.h (class win32_process_target): Update.
1141 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1143 Turn process_stratum_target's detach op into a method of
1146 * target.h (struct process_stratum_target): Remove the target op.
1147 (class process_target): Add the target op.
1148 (detach_inferior): Update the macro.
1150 Update the derived classes and callers below.
1152 * linux-low.cc (linux_target_ops): Update.
1153 (linux_detach): Turn into ...
1154 (linux_process_target::detach): ... this.
1155 * linux-low.h (class linux_process_target): Update.
1156 * lynx-low.cc (lynx_target_ops): Update.
1157 (lynx_detach): Turn into ...
1158 (lynx_process_target::detach): ... this.
1159 * lynx-low.h (class lynx_process_target): Update.
1160 * nto-low.cc (nto_target_ops): Update.
1161 (nto_detach): Turn into ...
1162 (nto_process_target::detach): ... this.
1163 * nto-low.h (class nto_process_target): Update.
1164 * win32-low.cc (win32_target_ops): Update.
1165 (win32_detach): Turn into ...
1166 (win32_process_target::detach): ... this.
1167 * win32-low.h (class win32_process_target): Update.
1169 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1171 Turn process_stratum_target's kill op into a method of
1174 * target.h (struct process_stratum_target): Remove the target op.
1175 (class process_target): Add the target op.
1177 Update the derived classes and callers below.
1179 * target.cc (kill_inferior): Update.
1180 * linux-low.cc (linux_target_ops): Update.
1181 (linux_kill): Turn into ...
1182 (linux_process_target::kill): ... this.
1183 * linux-low.h (class linux_process_target): Update.
1184 * lynx-low.cc (lynx_target_ops): Update.
1185 (lynx_kill): Turn into ...
1186 (lynx_process_target::kill): ... this.
1187 * lynx-low.h (class lynx_process_target): Update.
1188 * nto-low.cc (nto_target_ops): Update.
1189 (nto_kill): Turn into ...
1190 (nto_process_target::kill): ... this.
1191 * nto-low.h (class nto_process_target): Update.
1192 * win32-low.cc (win32_target_ops): Update.
1193 (win32_kill): Turn into ...
1194 (win32_process_target::kill): ... this.
1195 * win32-low.h (class win32_process_target): Update.
1197 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1199 Turn process_stratum_target's attach op into a method of
1202 * target.h (struct process_stratum_target): Remove the target op.
1203 (class process_target): Add the target op.
1204 (myattach): Update the macro.
1206 Update the derived classes and callers below.
1208 * linux-low.cc (linux_target_ops): Update.
1209 (linux_attach): Turn into ...
1210 (linux_process_target::attach): ... this.
1211 * linux-low.h (class linux_process_target): Update.
1212 * lynx-low.cc (lynx_target_ops): Update.
1213 (lynx_attach): Turn into ...
1214 (lynx_process_target::attach): ... this.
1215 * lynx-low.h (class lynx_process_target): Update.
1216 * nto-low.cc (nto_target_ops): Update.
1217 (nto_attach): Turn into ...
1218 (nto_process_target::attach): ... this.
1219 * nto-low.h (class nto_process_target): Update.
1220 * win32-low.cc (win32_target_ops): Update.
1221 (win32_attach): Turn into ...
1222 (win32_process_target::attach): ... this.
1223 * win32-low.h (class win32_process_target): Update.
1225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1227 Turn process_stratum_target's post_create_inferior op into a method
1230 * target.h (struct process_stratum_target): Remove the target op.
1231 (class process_target): Add the target op.
1232 (target_post_create_inferior): Update the macro.
1233 * target.cc (process_target::post_create_inferior): Define.
1235 Update the derived classes and callers below.
1237 * linux-low.cc (linux_target_ops): Update.
1238 (linux_post_create_inferior): Turn into ...
1239 (linux_process_target::post_create_inferior): ... this.
1240 * linux-low.h (class linux_process_target): Update.
1241 * lynx-low.cc (lynx_target_ops): Update.
1242 * nto-low.cc (nto_target_ops): Update.
1243 * win32-low.cc (win32_target_ops): Update.
1245 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1247 Turn process_stratum_target's create_inferior op into a method of
1250 * target.h (struct process_stratum_target): Remove the target op.
1251 (class process_target): Add the target op.
1252 (create_inferior): Rename the macro to ...
1253 (target_create_inferior): ... this.
1255 Update the derived classes and callers below.
1257 * server.cc (handle_v_run): Update.
1258 (captured_main): Update.
1259 (process_serial_event): Update.
1260 * linux-low.cc (linux_target_ops): Update.
1261 (linux_create_inferior): Turn into ...
1262 (linux_process_target::create_inferior): ... this.
1263 * linux-low.h (class linux_process_target): Update.
1264 * lynx-low.cc (lynx_target_ops): Update.
1265 (lynx_create_inferior): Turn into ...
1266 (lynx_process_target::create_inferior): ... this.
1267 * lynx-low.h (class lynx_process_target): Update.
1268 * nto-low.cc (nto_target_ops): Update.
1269 (nto_create_inferior): Turn into ...
1270 (nto_process_target::create_inferior): ... this.
1271 * nto-low.h (class nto_process_target): Update.
1272 * win32-low.cc (win32_target_ops): Update.
1273 (win32_create_inferior): Turn into ...
1274 (win32_process_target::create_inferior): ... this.
1275 * win32-low.h (class win32_process_target): Update.
1277 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1279 * target.h (class process_target): New class definition.
1280 (struct process_stratum_target) <pt>: New field with type
1282 * linux-low.h (class linux_process_target): Define as a derived
1283 class of 'process_target'.
1284 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1286 * lynx-low.h (class lynx_process_target): Define as a derived
1287 class of 'process_target'.
1288 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1290 * nto-low.h (class nto_process_target): Define as a derived
1291 class of 'process_target'.
1292 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1294 * win32-low.h (class win32_process_target): Define as a derived
1295 class of 'process_target'.
1296 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1299 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1301 * configure: Regenerate.
1303 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1304 Andrew Burgess <andrew.burgess@embecosm.com>
1306 * linux-riscv-low.cc: New file.
1307 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1308 and nat/riscv-linux-tdesc.c.
1309 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1310 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1313 2020-02-14 Tom Tromey <tom@tromey.com>
1315 * acinclude.m4: Don't include acx_configure_dir.m4.
1316 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1317 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1318 (all, install-only, uninstall, clean-info, clean)
1319 (maintainer-clean): Don't recurse.
1320 (subdir_do, all-lib): Remove.
1321 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1323 (generated_files): Update.
1324 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1325 * configure: Rebuild.
1326 * configure.ac: Don't configure gnulib or libiberty.
1329 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1331 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1332 preparing the command line for CreateProcess.
1333 (win32_create_inferior): Reflect the program name in debugging
1334 output that shows the process and its command line.
1336 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1338 * Makefile.in: Rename source files from .c to .cc.
1339 * %.c: Rename to %.cc.
1340 * configure.ac: Rename server.c to server.cc.
1341 * configure: Re-generate.
1343 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1345 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1347 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1349 * win32-low.c (win32_create_inferior): Set signal_pid.
1351 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1352 Pedro Alves <palves@redhat.com>
1354 Skip building gdbserver in a cross-configuration.
1355 * configure.srv: Set $gdbserver_host depending on whether $target
1356 is $host. Use $gdbserver_host instead of $host.
1358 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1360 * configure: Re-generate.
1362 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1364 * configure: Re-generate.
1366 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1368 * acinclude.m4: Update warning.m4 path.
1370 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1372 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1373 (handle_exception): Set siginfo_er.
1374 (win32_xfer_siginfo): New function.
1376 2020-02-07 Tom Tromey <tom@tromey.com>
1377 Pedro Alves <palves@redhat.com>
1379 * README: Update build documentation.
1380 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1382 * configure.ac: Update paths.
1383 * configure: Rebuild.
1384 * acinclude.m4: Update paths.
1385 * Makefile.in: Update include paths.
1386 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1387 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1388 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1389 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1390 (%-generated.c): Update paths.
1391 * Move entire directory from ../gdb/gdbserver.
1393 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1395 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1397 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1399 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1400 assignment instead of srv_linux_obj.
1402 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1404 * server.c (handle_qxfer_libraries): Write segment-address with
1407 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1409 * Makefile.in (install-strip): New target.
1410 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1411 * aclocal.m4: Regenerate.
1412 * configure: Regenerate.
1413 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1415 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1417 * Makefile.in (SFILES): Adjust paths to point to real files.
1418 (OBS): Move waitstatus.o to target/waitstatus.o.
1419 (TAGS): Transform paths appropriately.
1421 (nat/%.o): ... this pattern rule.
1423 (target/%.o): ... this pattern rule.
1424 * configure.srv: Adjust paths throughout to include nat/ prefix
1425 with the revant files.
1426 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1427 * configure: Regenerate.
1429 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1431 * Makefile.in (TAGS): Remove config files from the recipe.
1433 2020-01-14 Tom Tromey <tom@tromey.com>
1435 * configure: Rebuild.
1436 * configure.ac: Remove any checks that were added to common.m4.
1437 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1440 2020-01-14 Tom Tromey <tom@tromey.com>
1442 * server.h: Include config.h.
1443 * gdbreplay.c: Include config.h.
1444 * configure: Rebuild.
1445 * configure.ac: Don't source common.host.
1446 * acinclude.m4: Update path.
1447 * Makefile.in (INCSUPPORT): New variable.
1448 (INCLUDE_CFLAGS): Add INCSUPPORT.
1449 (SFILES): Update paths.
1450 (version-generated.c): Update path to create-version.sh.
1451 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1453 2020-01-14 Tom Tromey <tom@tromey.com>
1455 * configure.ac (LIBS): Use WIN32APILIBS.
1456 (USE_WIN32API): Don't define.
1457 * configure: Rebuild.
1459 2020-01-14 Tom Tromey <tom@tromey.com>
1461 * configure: Rebuild.
1463 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1465 * Makefile.in (%-generated.c): Remove rule for files from
1468 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1470 * configure: Re-generate.
1472 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1474 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1476 * tracepoint.c (stop_tracing, flush_trace_buffer,
1477 about_to_request_buffer_space, get_trace_state_variable_value,
1478 set_trace_state_variable_value, gdb_collect): Add declaration.
1480 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1482 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1483 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1484 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1485 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1486 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1489 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1491 * inferiors.c: Include gdbsupport/common-inferior.h.
1493 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1495 * hostio-errno.c: Include hostio.h.
1497 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1499 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1502 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1504 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1505 * linux-arm-tdesc.h: Include arch/arm.h.
1507 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1509 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1511 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1513 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1514 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1516 2020-01-10 Pedro Alves <palves@redhat.com>
1518 * fork-child.c (post_fork_inferior): Pass target down to
1520 * inferiors.c (switch_to_thread): Add process_stratum_target
1522 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1523 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1524 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1525 * remote-utils.c (prepare_resume_reply): Pass the target to
1527 * target.c (the_target): Now a process_stratum_target.
1528 (done_accessing_memory): Pass the target to switch_to_thread.
1529 (set_target_ops): Ajust to use process_stratum_target.
1530 * target.h (struct target_ops): Rename to ...
1531 (struct process_stratum_target): ... this.
1532 (the_target, set_target_ops): Adjust.
1533 (prepare_to_access_memory): Adjust comment.
1534 * win32-low.c (child_xfer_memory): Adjust to use
1535 process_stratum_target.
1536 (win32_target_ops): Now a process_stratum_target.
1538 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1539 Pedro Alves <palves@redhat.com>
1541 * win32-low.c (get_child_debug_event): Extract the fatal exception
1542 from the exit status and convert to the equivalent Posix signal
1544 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1545 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1547 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1549 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1551 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1553 * server.c (gdbserver_version): Change copyright year to 2020.
1554 * gdbreplay.c (gdbreplay_version): Likewise.
1556 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1558 * configure: Regenerate.
1559 * configure.ac: Quote variable arguments of test.
1561 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1563 * Makefile.in: Fix build with GNU Make 3.81
1565 2019-12-16 Tom Tromey <tromey@adacore.com>
1567 * server.c (get_exec_file): Constify result.
1569 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1571 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1572 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1573 * config.in: Regenerate.
1574 * configure: Regenerate.
1575 * configure.ac: Don't check for strerror.
1576 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1577 Call safe_strerror instead of strerror.
1578 * server.h (strerror): Remove this now-unnecessary declaration.
1579 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1581 (gdb_agent_helper_thread): Likewise.
1582 * utils.c (perror_with_name): Likewise.
1584 2019-11-26 Tom Tromey <tom@tromey.com>
1586 * configure, config.in: Rebuild.
1588 2019-11-26 Tom Tromey <tom@tromey.com>
1590 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1591 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1593 * configure, config.in: Rebuild.
1595 2019-11-26 Tom Tromey <tom@tromey.com>
1597 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1598 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1599 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1600 * acinclude.m4: Include ax_pthread.m4.
1601 * config.in, configure: Rebuild.
1603 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1605 * debug.c (debug_set_output): Call safe_strerror instead of
1607 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1608 (linux_kill_one_lwp): Likewise.
1609 (linux_detach_one_lwp): Likewise.
1610 (linux_wait_for_event_filtered): Likewise.
1611 (store_register): Likewise.
1612 * lynx-low.c (lynx_attach): Likewise.
1613 * mem-break.c (insert_memory_breakpoint): Likewise.
1614 (remove_memory_breakpoint): Likewise.
1615 (delete_fast_tracepoint_jump): Likewise.
1616 (set_fast_tracepoint_jump): Likewise.
1617 (uninsert_fast_tracepoint_jumps_at): Likewise.
1618 (reinsert_fast_tracepoint_jumps_at): Likewise.
1619 * nto-low.c (nto_xfer_memory): Likewise.
1620 (nto_resume): Likewise.
1622 2019-11-20 Luis Machado <luis.machado@linaro.org>
1624 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1625 instead of register count.
1626 * tdesc.c (tdesc_contains_feature): New function.
1627 * tdesc.h (tdesc_contains_feature): New prototype.
1629 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1631 * Makefile.in: Add safe-strerror.c.
1632 * configure: Regenerate.
1633 * configure.ac: Don't source common.host.
1635 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1637 * config.in: Regenerate.
1638 * configure: Regenerate.
1640 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1642 * ax.c (ax_printf): Handle size_t_arg.
1644 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1646 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1647 * mi/mi-main.c (output_cores): Likewise.
1648 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1649 (linux_xfer_osdata_modules): Likewise.
1650 * remote.c (register_remote_support_xml): Likewise.
1651 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1652 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1654 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1656 * configure: Regenerate.
1657 * configure.ac: Remove check for strerror_r.
1659 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1661 * config.in: Regenerate.
1662 * configure: Regenerate.
1663 * configure.ac: Also check for strerror_r.
1665 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1667 * ax.h (debug_agent): Remove duplicate declaration.
1669 2019-10-26 Tom de Vries <tdevries@suse.de>
1671 * linux-aarch64-low.c: Fix typos in comments.
1672 * linux-arm-low.c: Same.
1673 * linux-low.c: Same.
1674 * linux-ppc-low.c: Same.
1675 * proc-service.c: Same.
1678 * tracepoint.c: Same.
1679 * win32-low.c: Same.
1681 2019-10-25 Tom Tromey <tromey@adacore.com>
1683 * utils.c (xstrdup): Remove.
1685 2019-10-23 Tom Tromey <tom@tromey.com>
1687 * configure, config.in: Rebuild.
1689 2019-10-23 Tom Tromey <tom@tromey.com>
1691 * configure: Rebuild.
1692 * acinclude.m4: Use m4_include, not sinclude.
1694 2019-10-17 Tom Tromey <tromey@adacore.com>
1696 * configure: Rebuild.
1697 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1698 in AC_CONFIG_FILES invocation.
1699 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1702 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1704 * server.c: Include xml-builtin.h.
1705 (get_xml_features): Don't declare xml_builtins here.
1707 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1709 * Makefile.in: Remove references to vec-ipa.o.
1711 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1713 * Makefile.in: Remove references to vec.c.
1715 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1717 * server.c (server_waiting): Change to bool.
1718 (extended_protocol): Likewise.
1719 (response_needed): Likewise.
1720 (exit_requested): Likewise.
1721 (run_once): Likewise.
1722 (report_no_resumed): Likewise.
1723 (non_stop): Likewise.
1724 (disable_packet_vCont): Likewise.
1725 (disable_packet_Tthread): Likewise.
1726 (disable_packet_qC): Likewise.
1727 (disable_packet_qfThreadInfo): Likewise.
1728 (handle_general_set): Update.
1729 (handle_detach): Update.
1730 (handle_monitor_command): Update.
1731 (handle_query): Update.
1732 (captured_main): Update.
1733 (process_serial_event): Update.
1734 * server.h (server_waiting): Change to bool.
1735 (disable_packet_vCont): Likewise.
1736 (disable_packet_Tthread): Likewise.
1737 (disable_packet_qC): Likewise.
1738 (disable_packet_qfThreadInfo): Likewise.
1739 (run_once): Likewise.
1740 (non_stop): Likewise.
1741 * target.c (target_stop_and_wait): Update.
1743 2019-10-02 Tom Tromey <tromey@adacore.com>
1745 * Makefile.in (SFILES): Add common-inferior.c.
1746 (OBS): Add common-inferior.o.
1747 * server.c (startup_with_shell): Don't define.
1749 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1751 * linux-low.c (linux_low_read_btrace): Update for change to
1754 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1756 * debug.c (debug_threads): Remove comment in favor of the header.
1757 * debug.h (using_threads): Add declaration.
1758 (debug_threads): Add comment.
1759 * linux-aarch64-low.c: Include debug.h and remove declaration of
1761 * nto-low.c: Likewise.
1762 * remote-utils.c: Likewise.
1763 * thread-db.c: Likewise.
1765 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1767 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1768 and powerpc-cell64l-ipa.o.
1769 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1770 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1771 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1774 * spu-low.c: Remove file.
1776 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1777 (parse_spufs_run): Remove.
1778 (ppc_get_pc): Remove Cell/B.E. support.
1779 (ppc_set_pc): Likewise.
1780 (ppc_breakpoint_at): Likewise.
1781 (ppc_arch_setup): Likewise.
1782 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1783 tdesc_powerpc_cell32l.
1784 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1785 or init_registers_powerpc_cell32l.
1786 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1787 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1788 or init_registers_powerpc_cell32l.
1789 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1790 (init_registers_powerpc_cell32l): Remove prototype.
1791 (init_registers_powerpc_cell64l): Likewise.
1793 * target.h (struct target_ops): Remove qxfer_spu member.
1794 * server.c (handle_qxfer_spu): Remove.
1795 (qxfer_packets): Remove entry for "spu".
1796 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1797 * linux-low.c (SPUFS_MAGIC): Remove.
1798 (spu_enumerate_spu_ids): Remove.
1799 (linux_qxfer_spu): Remove.
1800 (linux_target_ops): Remove qxfer_spu member.
1801 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1802 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1803 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1805 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1807 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1808 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1809 * config.in: Regenerate.
1810 * configure: Regenerate.
1812 2019-08-15 Tom Tromey <tromey@adacore.com>
1814 * target.c (target_write_memory): Use gdb::byte_vector.
1816 2019-08-15 Tom Tromey <tromey@adacore.com>
1818 * tracepoint.c (write_inferior_data_pointer)
1819 (write_inferior_integer, write_inferior_int8)
1820 (write_inferior_uinteger, m_tracepoint_action_download)
1821 (r_tracepoint_action_download, x_tracepoint_action_download)
1822 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1823 (download_agent_expr, download_tracepoint_1)
1824 (download_trace_state_variables, upload_fast_traceframes): Update.
1825 * server.c (gdb_write_memory): Update.
1826 * remote-utils.c (relocate_instruction): Update.
1827 * proc-service.c (ps_pdwrite): Update.
1828 * mem-break.c (remove_memory_breakpoint)
1829 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1830 (uninsert_fast_tracepoint_jumps_at)
1831 (reinsert_fast_tracepoint_jumps_at): Update.
1832 * linux-x86-low.c (append_insns)
1833 (i386_install_fast_tracepoint_jump_pad)
1834 (amd64_write_goto_address, i386_write_goto_address): Update.
1835 * linux-s390-low.c (append_insns, s390_write_goto_address):
1837 * linux-ppc-low.c (ppc_relocate_instruction)
1838 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1839 (ppc_write_goto_address): Update.
1840 * linux-aarch64-low.c (append_insns): Update.
1841 * target.h (struct target_ops): Update.
1842 (write_inferior_memory): Don't declare.
1843 * target.c (target_write_memory): Rename from
1844 write_inferior_memory. Remove old target_write_memory.
1846 2019-08-15 Tom Tromey <tromey@adacore.com>
1848 * target.c (write_inferior_memory): Use std::vector.
1850 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1853 * configure.ac: Drop enable-libmcheck support.
1854 * configure, config.in: Rebuild.
1855 * acinclude.m4: Don't include it.
1857 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1859 * configure.srv: Remove Arm xml files.
1861 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1863 * configure.srv: Add new files. Remove xml generated files.
1864 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1866 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1867 * linux-aarch32-tdesc.c: New file.
1868 * linux-aarch32-tdesc.h: New file.
1869 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1870 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1871 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1872 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1873 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1874 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1875 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1876 (arm_read_description): Call arm_linux_read_description.
1877 (initialize_low_arch): Don't init registers.
1878 * linux-arm-tdesc.c: New file.
1879 * linux-arm-tdesc.h: New file.
1881 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1883 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1884 Move counter inside for.
1885 (arm_read_description): Check ptrace earlier.
1886 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1888 2019-07-09 Tom Tromey <tom@tromey.com>
1890 * configure: Rebuild.
1891 * configure.ac: Change common to gdbsupport.
1892 * acinclude.m4: Change common to gdbsupport.
1893 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1894 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1895 common to gdbsupport.
1896 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1897 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1898 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1899 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1900 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1901 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1902 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1903 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1904 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1905 common to gdbsupport.
1907 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1909 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1911 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1913 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1915 * configure.srv: Remove legacy xml.
1916 * linux-aarch64-low.c (initialize_low_arch): Remove
1917 initialize_low_tdesc call.
1918 * linux-aarch64-tdesc-selftest.c: Remove file.
1919 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1920 * linux-x86-low.c (initialize_low_arch): Remove
1921 initialize_low_tdesc call.
1922 * linux-x86-tdesc-selftest.c: Remove file.
1923 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1925 2019-06-20 Tom de Vries <tdevries@suse.de>
1927 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1928 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1930 2019-06-19 Tom de Vries <tdevries@suse.de>
1932 * debug.h (debug_write): Change return type to ssize_t.
1933 * debug.c (debug_write): Same.
1935 2019-06-14 Tom Tromey <tom@tromey.com>
1937 * configure.ac: Use new path to gnulib.
1938 * configure: Rebuild.
1939 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1942 2019-06-11 Tom Tromey <tom@tromey.com>
1944 * Makefile.in (SFILES): Add alloc.c.
1946 (IPA_OBJS): Add alloc-ipa.o.
1947 (alloc-ipa.o): New target.
1948 (%.o: ../%.c): New pattern rule.
1950 2019-06-10 Tom Tromey <tromey@adacore.com>
1952 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1953 end warning with a newline.
1954 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1956 * thread-db.c (attach_thread): Don't end warning with a newline.
1957 (thread_db_notice_clone): Likewise.
1958 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1960 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1961 end warning with a newline.
1963 2019-06-04 Pedro Alves <palves@redhat.com>
1965 * server.c (captured_main): Use make_unique_xstrdup.
1967 2019-06-02 Tom Tromey <tom@tromey.com>
1969 * gdbreplay.c (fromhex): Remove.
1970 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1972 2019-05-29 Tom Tromey <tromey@adacore.com>
1974 * configure: Rebuild.
1976 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1978 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1979 sign extension code on 32-bit builds.
1981 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1984 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1986 2019-04-19 Tom Tromey <tom@tromey.com>
1988 * server.c (struct vstop_notif): Derive from notif_event.
1990 (queue_stop_reply): Update.
1991 (remove_all_on_match_ptid): Change type. Rewrite.
1992 (discard_queued_stop_replies): Rewrite.
1993 (in_queued_stop_replies_ptid): Change type.
1994 (in_queued_stop_replies): Rewrite.
1995 (notif_stop): Update.
1996 (queue_stop_reply_callback): Update.
1997 (captured_main): Don't call initialize_notif.
1998 (push_stop_notification): Update.
1999 * notif.c (notif_write_event, handle_notif_ack)
2000 (notif_event_enque, notif_push): Update.
2001 (notif_event_xfree, initialize_notif): Remove.
2002 * notif.h (struct notif_event): Include <list>, not
2004 (struct notif_server) <queue>: Now a std::list.
2005 (notif_event_p): Remove typedef.
2006 (initialize_notif): Don't declare.
2007 (struct notif_event): Add virtual destructor.
2009 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2011 * ax.c (ax_vdebug): Call debug_printf.
2012 * debug.c (debug_write): New function.
2013 * debug.h (debug_write): New declaration.
2014 * linux-low.c (sigchld_handler): Call debug_write.
2016 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2018 * debug.c (debug_set_output): New function.
2019 (debug_vprintf): Send output to debug_file.
2020 (debug_flush): Likewise.
2021 * debug.h (debug_set_output): New declaration.
2022 * server.c (handle_monitor_command): Add debug-file option.
2023 (captured_main): Likewise.
2025 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2027 * debug.c (remote_debug): Add definition.
2028 * debug.h (remote_debug): Add declaration.
2029 * hostio.c (remote_debug): Remove declaration.
2030 * remote-utils.c (struct ui_file): Likewise.
2031 (remote_debug): Likewise.
2032 * remote-utils.h (remote_debug): Likewise,
2033 * server.c (remote_debug): Remove definition.
2035 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2037 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2038 when using a 64-bit gdbserver.
2040 2019-04-09 Tom Tromey <tromey@adacore.com>
2042 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2044 2019-04-08 Tom Tromey <tom@tromey.com>
2046 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2048 (linux_resume_one_lwp): Likewise.
2050 2019-04-08 Tom Tromey <tom@tromey.com>
2052 * gdbreplay.c: Update.
2053 * linux-low.c: Update.
2056 2019-04-08 Tom Tromey <tom@tromey.com>
2058 * server.c: Use C++ exception handling.
2059 * linux-low.c: Use C++ exception handling.
2060 * gdbreplay.c: Use C++ exception handling.
2062 2019-04-08 Tom Tromey <tom@tromey.com>
2064 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2065 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2066 (captured_main, main): Update.
2067 * gdbreplay.c (main): Update.
2069 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2071 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2072 value in argument pointer, return 1 if the entry is found and 0
2073 otherwise. Move comment.
2074 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2075 * linux-low.h (linux_get_auxv): Declare.
2076 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2078 2019-04-05 Tom Tromey <tromey@adacore.com>
2080 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2083 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2085 * linux-low.c (AT_HWCAP2): Add define if not already included.
2087 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2089 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2090 (aarch64_arch_setup): Call linux_get_hwcap.
2091 * linux-arm-low.c (arm_get_hwcap): Remove function.
2092 (arm_read_description): Call linux_get_hwcap.
2093 * linux-low.c (linux_get_auxv): New function.
2094 (linux_get_hwcap): Likewise.
2095 (linux_get_hwcap2): Likewise.
2096 * linux-low.h (linux_get_hwcap): New declaration.
2097 (linux_get_hwcap2): Likewise.
2098 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2099 (ppc_arch_setup): Call linux_get_hwcap.
2100 * linux-s390-low.c (s390_get_hwcap): Remove function.
2101 (s390_arch_setup): Call linux_get_hwcap.
2103 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2104 Jiong Wang <jiong.wang@arm.com>
2106 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2107 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2109 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2111 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2112 Jiong Wang <jiong.wang@arm.com>
2114 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2115 (aarch64_get_hwcap): New function.
2116 (aarch64_arch_setup): Read APIA hwcap.
2118 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2119 Jiong Wang <jiong.wang@arm.com>
2121 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2122 (initialize_low_tracepoint): Likewise.
2123 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2124 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2125 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2126 (aarch64_linux_read_description): Likewise.
2127 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2129 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2131 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2132 i386_create_target_description for 'segments' parameter.
2133 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2134 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2135 * win32-i386-low.c (i386_arch_setup): Likewise.
2137 2019-03-12 Tom Tromey <tromey@adacore.com>
2139 * linux-low.c (iterate_over_lwps): Update.
2141 2019-03-06 Tom Tromey <tom@tromey.com>
2143 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2144 (captured_main): Use SCOPE_EXIT.
2146 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2148 * configure.srv: Use '$enable_unittest' instead of '$development'
2149 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2152 2019-02-27 Tom Tromey <tromey@adacore.com>
2154 * gdbreplay.c (logchar): Handle \r\n.
2156 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2158 * linux-low.c (linux_attach): Add process before lwp.
2159 * server.c (attach_inferior): Check if already attached.
2161 2019-02-07 Tom Tromey <tom@tromey.com>
2163 * x86-tdesc.h: Rename include guard.
2164 * x86-low.h: Add include guard.
2165 * wincecompat.h: Rename include guard.
2166 * win32-low.h: Add include guard.
2167 * utils.h: Rename include guard.
2168 * tracepoint.h: Rename include guard.
2169 * tdesc.h: Rename include guard.
2170 * target.h: Rename include guard.
2171 * server.h: Rename include guard.
2172 * remote-utils.h: Rename include guard.
2173 * regcache.h: Rename include guard.
2174 * nto-low.h: Rename include guard.
2175 * notif.h: Add include guard.
2176 * mem-break.h: Rename include guard.
2177 * lynx-low.h: Add include guard.
2178 * linux-x86-tdesc.h: Add include guard.
2179 * linux-s390-tdesc.h: Add include guard.
2180 * linux-ppc-tdesc-init.h: Add include guard.
2181 * linux-low.h: Add include guard.
2182 * linux-aarch64-tdesc.h: Add include guard.
2183 * linux-aarch32-low.h: Add include guard.
2184 * inferiors.h: Rename include guard.
2185 * i387-fp.h: Rename include guard.
2186 * hostio.h: Rename include guard.
2187 * gdbthread.h: Rename include guard.
2188 * gdb_proc_service.h: Rename include guard.
2189 * event-loop.h: Rename include guard.
2190 * dll.h: Rename include guard.
2191 * debug.h: Rename include guard.
2192 * ax.h: Rename include guard.
2194 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2197 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2198 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2200 2019-01-25 Tom Tromey <tom@tromey.com>
2202 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2204 2019-01-25 Tom Tromey <tom@tromey.com>
2206 * win32-low.c: Fix common/ includes.
2207 * win32-i386-low.c: Fix common/ includes.
2208 * tracepoint.c: Fix common/ includes.
2209 * thread-db.c: Fix common/ includes.
2210 * target.h: Fix common/ includes.
2211 * symbol.c: Fix common/ includes.
2212 * spu-low.c: Fix common/ includes.
2213 * server.h: Fix common/ includes.
2214 * server.c: Fix common/ includes.
2215 * remote-utils.c: Fix common/ includes.
2216 * regcache.h: Fix common/ includes.
2217 * regcache.c: Fix common/ includes.
2218 * nto-x86-low.c: Fix common/ includes.
2219 * notif.h: Fix common/ includes.
2220 * mem-break.h: Fix common/ includes.
2221 * lynx-low.c: Fix common/ includes.
2222 * lynx-i386-low.c: Fix common/ includes.
2223 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2224 * linux-x86-low.c: Fix common/ includes.
2225 * linux-low.c: Fix common/ includes.
2226 * inferiors.h: Fix common/ includes.
2227 * i387-fp.c: Fix common/ includes.
2228 * hostio.c: Fix common/ includes.
2229 * hostio-errno.c: Fix common/ includes.
2230 * gdbthread.h: Fix common/ includes.
2231 * gdbreplay.c: Fix common/ includes.
2232 * fork-child.c: Fix common/ includes.
2233 * event-loop.c: Fix common/ includes.
2235 (enum gdb_agent_op): Fix common/ includes.
2237 2019-01-21 Tom Tromey <tom@tromey.com>
2239 * tracepoint.c: Fix includes.
2240 * remote-utils.c: Fix includes.
2241 * linux-x86-low.c: Fix includes.
2243 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2245 * gdbreplay.c (gdbreplay_version): Update copyright year in
2247 * server.c (gdbserver_version): Likewise.
2249 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2251 * linux-low.c (add_lwp): Switch ordering.
2253 2018-11-29 Tom Tromey <tom@tromey.com>
2255 * win32-low.c (win32_join): Take pid, not process.
2256 * target.h (struct target_ops) <join>: Change argument type.
2257 (join_inferior): Change argument name.
2258 * spu-low.c (spu_join): Take pid, not process.
2259 * server.c (handle_detach): Preserve pid before destroying
2261 * lynx-low.c (lynx_join): Take pid, not process.
2262 * linux-low.c (linux_join): Take pid, not process.
2264 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2266 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2267 (aarch64_cannot_fetch_register): Likewise.
2268 (struct linux_target_ops): Update references.
2270 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2272 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2274 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2276 * configure.srv (ipa_ppc_linux_regobj): Add
2277 powerpc-isa207-htm-vsx32l-ipa.o and
2278 powerpc-isa207-htm-vsx64l-ipa.o.
2279 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2280 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2281 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2282 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2283 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2284 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2285 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2286 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2287 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2288 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2289 (init_registers_powerpc_isa207_htm_vsx32l)
2290 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2291 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2292 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2293 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2294 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2295 (ppc_store_tm_ctarregset): New functions.
2296 (ppc_regsets): Add entries for HTM regsets.
2297 (ppc_arch_setup): Set htm in features struct when needed. Set
2298 sizes for the HTM regsets.
2299 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2300 (initialize_low_arch): Call
2301 init_registers_powerpc_isa207_htm_vsx32l and
2302 init_registers_powerpc_isa207_htm_vsx64l.
2303 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2304 PPC_TDESC_ISA207_HTM_VSX.
2305 (initialize_low_tracepoint): Call
2306 init_registers_powerpc_isa207_htm_vsx32l and
2307 init_registers_powerpc_isa207_htm_vsx64l.
2309 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2311 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2312 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2313 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2314 (ppc_store_pmuregset): New functions.
2315 (ppc_regsets): Add entries for ebb and pmu regsets.
2316 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2317 pmu regsets are available. Set sizes for these regsets.
2319 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2321 * configure.srv (ipa_ppc_linux_regobj): Add
2322 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2323 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2324 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2325 rs6000/powerpc-isa207-vsx32l.xml, and
2326 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2327 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2328 <PPC_TDESC_ISA207_VSX>: New enum value.
2329 (init_registers_powerpc_isa207_vsx32l): Declare.
2330 (init_registers_powerpc_isa207_vsx64l): Declare.
2331 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2332 (ppc_store_tarregset): New function.
2333 (ppc_regsets): Add entry for the TAR regset.
2334 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2335 size for the TAR regsets.
2336 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2337 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2338 and init_registers_powerpc_isa207_vsx64l.
2339 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2340 (initialize_low_tracepoint): Call
2341 init_registers_powerpc_isa207_vsx32l and
2342 init_registers_powerpc_isa207_vsx64l.
2344 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2345 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2347 * configure.srv (ipa_ppc_linux_regobj): Add
2348 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2349 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2350 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2351 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2352 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2353 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2354 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2355 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2356 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2357 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2358 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2359 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2360 (ppc_hwcap): Add comment.
2361 (ppc_hwcap2): New global.
2362 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2363 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2364 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2365 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2366 when needed. Set sizes for the the DSCR and PPR regsets.
2367 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2368 (initialize_low_arch): Call
2369 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2370 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2371 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2372 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2373 (initialize_low_tracepoint): Call
2374 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2375 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2377 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2379 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2381 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2382 Simon Marchi <simark@simark.ca>
2384 * acinclude.m4: Include "../selftest.m4".
2385 * configure: Regenerate.
2386 * configure.ac: Use "GDB_AC_SELFTEST".
2387 * configure.srv: Use "$enable_unittests" instead of
2388 "$development" when checking whether unit tests have been
2390 * server.c (captured_main): Update message informing that
2391 selftests have been disabled.
2393 2018-10-04 Tom Tromey <tom@tromey.com>
2395 * configure: Rebuild.
2397 2018-10-04 Tom Tromey <tom@tromey.com>
2399 * server.c (handle_status): Rename inner "thread".
2400 (process_serial_event): Declare "res" in 'm' case.
2401 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2402 (iterate_over_lwps): Rename inner "thread".
2403 (linux_qxfer_libraries_svr4): Rename inner "len".
2404 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2406 2018-10-01 Gary Benson <gbenson@redhat.com>
2408 * gdb_proc_service.h: Moved common code to
2409 common/gdb_proc_service.h.
2411 2018-10-01 Gary Benson <gbenson@redhat.com>
2413 * gdb_proc_service.h: Synchronize comments and whitespace with
2414 GDB's version of this file.
2416 2018-09-25 Tom Tromey <tom@tromey.com>
2418 * configure: Rebuild.
2419 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2421 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2423 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2424 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2425 ($(IPA_LIB)): Sort IPA_OBJS.
2427 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2429 * Makefile.in: Remove references to $(ADD_DEPS).
2431 2018-09-16 Tom Tromey <tom@tromey.com>
2433 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2435 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2438 2018-09-05 Tom Tromey <tom@tromey.com>
2440 * configure: Rebuild.
2442 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2445 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2447 2018-08-27 Tom Tromey <tom@tromey.com>
2450 * configure: Rebuild.
2452 2018-08-27 Tom Tromey <tom@tromey.com>
2454 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2455 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2456 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2457 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2458 (s390x_emit_stack_adjust): Add casts to unsigned char.
2460 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2464 * server.h (struct client_state) <disable_randomization>:
2467 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2469 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2471 (mips_supply_ptrace_register): Likewise.
2473 2018-07-22 Tom Tromey <tom@tromey.com>
2475 * configure: Rebuild.
2477 2018-07-22 Tom Tromey <tom@tromey.com>
2479 * win32-low.c (win32_create_inferior): Remove unused variables.
2480 * gdbreplay.c (remote_open): Remove unused variable.
2481 * remote-utils.c (remote_prepare): Remove unused variable.
2482 * x86-tdesc.h (X86_TDESC_H): Define.
2483 (amd64_expedite_regs): Define conditionally.
2484 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2485 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2486 * remote-utils.c (readchar): Remove unused variable.
2488 2018-07-13 Pedro Alves <palves@redhat.com>
2490 * linux-low.c (linux_kill): Change parameter to process_info
2491 pointer instead of pid. Adjust.
2492 * lynx-low.c (lynx_kill): Likewise.
2493 * nto-low.c (nto_kill): Likewise.
2494 * spu-low.c (spu_kill): Likewise.
2495 * win32-low.c (win32_kill): Likewise.
2496 * server.c (handle_v_kill, kill_inferior_callback)
2497 (detach_or_kill_for_exit): Adjust.
2498 * target.c (kill_inferior): Change parameter to process_info
2499 pointer instead of pid. Adjust.
2500 * target.h (struct target_ops) <kill>: Change parameter to
2501 process_info pointer instead of pid. Adjust all implementations
2503 (kill_inferior): Likewise.
2505 2018-07-13 Pedro Alves <palves@redhat.com>
2507 * linux-low.c (linux_detach, linux_join): Change parameter to
2508 process_info pointer instead of pid. Adjust.
2509 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2510 * nto-low.c (nto_detach): Likewise.
2511 * spu-low.c (spu_detach, spu_join): Likewise.
2512 * win32-low.c (win32_detach, win32_join): Likewise.
2513 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2514 * target.h (struct target_ops) <detach, join>: Change parameter to
2515 process_info pointer instead of pid. Adjust all implementations
2517 (detach_inferior, join_inferior): Rename 'pid' parameter to
2520 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2521 Jan Kratochvil <jan.kratochvil@redhat.com>
2522 Paul Fertser <fercerpav@gmail.com>
2523 Tsutomu Seki <sekiriki@gmail.com>
2525 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2526 (OBS): Add 'common/netstuff.o'.
2527 (GDBREPLAY_OBS): Likewise.
2528 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2529 (remote_open): Implement support for IPv6
2531 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2533 (handle_accept_event): Accept connections from IPv6 sources.
2534 (remote_prepare): Handle IPv6-style hostnames; implement
2535 support for IPv6 connections.
2536 (remote_open): Implement support for printing connections from
2539 2018-07-11 Pedro Alves <palves@redhat.com>
2542 * mem-break.c (any_persistent_commands): Add process_info
2543 parameter and use it instead of relying on the current process.
2544 Change return type to bool.
2545 * mem-break.h (any_persistent_commands): Add process_info
2546 parameter and change return type to bool.
2547 * server.c (handle_detach): Remove require_running_or_return call.
2548 Look up the process_info for the process we're about to detach.
2549 If not found, return back error to GDB. Adjust
2550 any_persistent_commands call to pass down a process pointer.
2552 2018-07-11 Pedro Alves <palves@redhat.com>
2554 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2555 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2556 instead of collect_register_by_name.
2557 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2558 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2560 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2561 Pedro Alves <palves@redhat.com>
2563 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2565 2018-07-03 Tom Tromey <tom@tromey.com>
2567 * linux-low.c: Update.
2568 * lynx-low.c: Update.
2569 * mem-break.c: Update.
2570 * nto-low.c: Update.
2571 * remote-utils.c: Update.
2573 * spu-low.c: Update.
2575 * win32-low.c: Update.
2577 2018-07-03 Tom Tromey <tom@tromey.com>
2581 2018-07-03 Tom Tromey <tom@tromey.com>
2583 * linux-low.c: Update.
2585 2018-07-03 Tom Tromey <tom@tromey.com>
2589 2018-07-03 Tom Tromey <tom@tromey.com>
2591 * linux-low.c: Update.
2592 * linux-mips-low.c: Update.
2593 * lynx-low.c: Update.
2594 * nto-low.c: Update.
2595 * remote-utils.c: Update.
2597 * spu-low.c: Update.
2599 * thread-db.c: Update.
2601 2018-07-03 Tom Tromey <tom@tromey.com>
2603 * linux-low.c: Update.
2604 * linux-mips-low.c: Update.
2605 * lynx-low.c: Update.
2606 * mem-break.c: Update.
2607 * nto-low.c: Update.
2608 * remote-utils.c: Update.
2610 * spu-low.c: Update.
2612 * tracepoint.c: Update.
2614 2018-07-03 Tom Tromey <tom@tromey.com>
2616 * linux-low.c: Update.
2617 * linux-ppc-low.c: Update.
2618 * linux-x86-low.c: Update.
2619 * proc-service.c: Update.
2621 * spu-low.c: Update.
2622 * thread-db.c: Update.
2623 * win32-low.c: Update.
2625 2018-07-03 Tom Tromey <tom@tromey.com>
2627 * linux-low.c: Update.
2628 * lynx-low.c: Update.
2629 * nto-low.c: Update.
2630 * remote-utils.c: Update.
2631 * spu-low.c: Update.
2632 * thread-db.c: Update.
2633 * win32-low.c: Update.
2635 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2637 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2638 parameter in call to 'amd64_create_target_description'.
2640 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2642 * x86-tdesc.h: Remove executable permission flag.
2644 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2646 * configure.ac: Remove AC_PREREQ, add missing quoting.
2647 * configure: Re-generate.
2648 * config.in: Re-generate.
2649 * aclocal.m4: Re-generate.
2651 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2653 * tracepoint.h (current_traceframe): Remove declaration.
2655 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2657 * linux-aarch64-low.c (is_sve_tdesc): New function.
2658 (aarch64_sve_regs_copy_to_regcache): Likewise.
2659 (aarch64_sve_regs_copy_from_regcache): Likewise.
2660 (aarch64_regs_info): Add SVE checks.
2661 (initialize_low_arch): Initialize SVE.
2663 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2665 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2667 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2669 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2670 (initialize_low_tracepoint): Likewise
2671 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2672 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2674 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2676 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2678 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2680 * server.h (PBUFSIZ): Increase size
2682 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2684 * regcache.c (regcache::raw_compare): New function.
2685 * regcache.h (regcache::raw_compare): New declaration.
2687 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2689 * regcache.c (new_register_cache): Use new.
2690 (free_register_cache): Use delete.
2691 (register_data): Use const.
2692 (supply_register): Move body inside regcache.
2693 (regcache::raw_supply): New override function.
2694 (collect_register): Move body inside regcache.
2695 (regcache::raw_collect): New override function.
2696 (regcache::get_register_status): New override function.
2697 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2699 2018-06-09 Tom Tromey <tom@tromey.com>
2701 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2703 (event_queue): Use std::queue.
2704 (gdb_event_xfree): Remove.
2705 (initialize_event_loop, process_event, wait_for_event): Update.
2707 2018-06-08 Stan Cox <scox@redhat.com>
2709 * win32-low.c (win32_create_inferior): last_ptid and last_status
2710 moved to client_state.
2712 2018-06-08 Pedro Alves <palves@redhat.com>
2714 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2715 common/common-exceptions.o, common/common-utils.o,
2716 common/errors.o, common/print-utils.o and utils.o.
2717 * gdbreplay.c: Include "common-defs.h" instead of the two
2718 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2719 string.h or alloca.h.
2720 (perror_with_name): Delete.
2721 (remote_open): Use xstrdup instead of strdup.
2722 (main): Rename to ...
2723 (captured_main): ... this.
2726 2018-06-08 Tom Tromey <tom@tromey.com>
2728 * linux-low.c (linux_low_read_btrace): Update.
2730 2018-06-04 Stan Cox <scox@redhat.com>
2732 * server.h (struct client_state): New.
2733 * server.c (cont_thread, general_thread, multi_process)
2734 (report_fork_events, report_vfork_events, report_exec_events)
2735 (report_thread_events, swbreak_feature, hwbreak_feature)
2736 (vCont_supported, disable_randomization, pass_signals)
2737 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2738 Moved to client_state.
2739 * remote-utils.c (remote_debug, noack_mode)
2740 (transport_is_reliable): Moved to client_state.
2741 * tracepoint.c (current_traceframe): Moved to client_state.
2744 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2745 linux-low.c, remote-utils.h, target.c: Use client_state.
2747 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2749 * configure.srv: Add new c/h file.
2751 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2753 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2756 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2758 * gdb.arch/mips-fpregset-core.exp: New test.
2759 * gdb.arch/mips-fpregset-core.c: New test source.
2761 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2764 * hostio.c (require_int): Do not report overflow for integers
2765 between 0xfffffff and 0x7fffffff.
2767 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2769 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2770 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2771 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2773 (the_low_target): Wire them.
2775 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2777 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2778 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2779 mode. Call collect_register_by_name with vscr using
2780 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2781 (ppc_store_vrregset): Add and set vscr_offset variable as in
2782 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2785 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2787 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2788 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2789 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2791 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2793 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2794 (ppc_store_vsxregset): Likewise.
2795 (ppc_fill_vrregset): Likewise.
2796 (ppc_store_vrregset): Likewise.
2797 (ppc_fill_evrregset): Likewise.
2798 (ppc_store_evrregset): Likewise.
2799 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2800 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2803 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2805 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2806 wordsize of the inferior. Call ppc_linux_target_wordsize.
2808 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2810 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2811 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2812 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2813 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2814 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2815 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2816 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2817 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2818 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2819 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2820 (tdesc_powerpc_e500l): Remove.
2821 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2822 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2823 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2824 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2826 (ppc_arch_setup): Remove target description matching code. Fill a
2827 ppc_linux_features struct and call ppc_linux_match_description
2830 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2832 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2833 width of the requested register exceeds the width of the
2835 (mips_cannot_store_register): Likewise.
2837 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2839 * linux-mips-low.c (mips_fetch_register): New function. Update
2841 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2842 (the_low_target): Wire `mips_fetch_register'.
2844 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2846 * lynx-i386-low.c (LYNXOS_178): New macro.
2847 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2848 the layout on LynxOS-178.
2849 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2850 handle floating point registers that are not supported by
2853 2018-05-10 Tom Tromey <tom@tromey.com>
2855 * configure: Rebuild.
2857 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2860 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2861 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2862 Use it to set the expedite_regs field in the given tdesc.
2863 * x86-tdesc.h: New file.
2864 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2865 Adjust following the addition of the new expedite_regs parameter
2866 to init_target_desc.
2867 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2868 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2869 (i386_linux_read_description, amd64_linux_read_description):
2870 Adjust following the addition of the new expedite_regs parameter
2871 to init_target_desc.
2872 * lynx-i386-low.c: #include "x86-tdesc.h".
2873 (lynx_i386_arch_setup): Adjust following the addition of the new
2874 expedite_regs parameter to init_target_desc.
2875 * nto-x86-low.c: #include "x86-tdesc.h".
2876 (nto_x86_arch_setup): Adjust following the addition of the new
2877 expedite_regs parameter to init_target_desc.
2878 * win32-i386-low.c: #include "x86-tdesc.h".
2879 (i386_arch_setup): Adjust following the addition of the new
2880 expedite_regs parameter to init_target_desc.
2882 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2885 * win32-low.c (win32_create_inferior): Add call to my_wait
2886 setting last_status global.
2888 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2891 * win32-low.c (create_process): Only call gdb_tilde_expand if
2892 inferior_cwd is not NULL.
2894 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2896 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2897 registers to the cache if their values have changed.
2898 (i387_xsave_to_cache): Provide default values for x87 control
2899 registers when these features are available, but disabled.
2900 * regcache.c (supply_register_by_name_zeroed): New function.
2901 * regcache.h (supply_register_by_name_zeroed): Declare new
2904 2018-05-07 Tom Tromey <tom@tromey.com>
2906 * configure: Rebuild.
2908 2018-05-04 Tom Tromey <tom@tromey.com>
2910 * configure: Rebuild.
2912 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2913 Pedro Alves <palves@redhat.com>
2915 * linux-aarch64-low.c (aarch64_stopped_data_address):
2918 2018-04-27 Tom Tromey <tom@tromey.com>
2920 * configure: Rebuild.
2922 2018-04-23 Tom Tromey <tom@tromey.com>
2924 * configure: Rebuild.
2926 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2928 * Makefile.in (depcomp): Add "..".
2929 (all_deps_files): New and use it.
2931 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2933 * configure.srv (aarch64*-*-linux*): Don't include xml.
2934 (i[34567]86-*-cygwin*): Likewise.
2935 (i[34567]86-*-linux*): Likewise.
2936 (i[34567]86-*-lynxos*): Likewise.
2937 (i[34567]86-*-mingw32ce*): Likewise.
2938 (i[34567]86-*-mingw*): Likewise.
2939 (i[34567]86-*-nto*): Likewise.
2940 (tic6x-*-uclinux): Likewise.
2941 (x86_64-*-linux*): Likewise.
2942 (x86_64-*-mingw*): Likewise.
2943 (x86_64-*-cygwin*): Likewise.
2945 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2947 * tdesc.c: Remove xml parameter.
2949 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2951 * server.c (get_features_xml): Remove cast.
2952 * tdesc.c (void target_desc::accept): Fill in function.
2953 (tdesc_get_features_xml): Remove old xml creation.
2954 (print_xml_feature::visit_pre): Add xml vistor.
2955 * tdesc.h (struct target_desc): Make xmltarget mutable.
2956 (tdesc_get_features_xml): Remove declaration.
2958 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2960 * tdesc.c (tdesc_architecture_name): Add new function.
2961 (tdesc_osabi_name): Likewise.
2962 (tdesc_get_features_xml): Use new functions.
2964 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2966 * tdesc.c (tdesc_create_flags): Remove.
2967 (tdesc_add_flag): Likewise.
2968 (tdesc_named_type): Likewise.
2969 (tdesc_create_union): Likewise.
2970 (tdesc_create_struct): Likewise.
2971 (tdesc_create_vector): Likewise.
2972 (tdesc_add_bitfield): Likewise.
2973 (tdesc_add_field): Likewise.
2974 (tdesc_set_struct_size): Likewise.
2976 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2978 * tdesc.c (~target_desc): Remove implictly deleted items.
2979 (init_target_desc): Iterate all features.
2980 (tdesc_get_features_xml): Use vector.
2981 (tdesc_create_feature): Create feature.
2982 * tdesc.h (tdesc_feature) Remove
2983 (target_desc): Add features.
2985 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2987 * Makefile.in: Add common/tdesc.c
2988 * tdesc.c (init_target_desc): init all reg_defs from register
2990 (tdesc_create_reg): Create tdesc_reg.
2991 * tdesc.h (tdesc_feature): Add register vector.
2993 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2995 * tdesc.h (struct target_desc) <features>: Change type to
2996 std::vector<std::string>.
2997 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2999 (tdesc_get_features_xml): Likewise.
3000 (tdesc_create_feature): Likewise.
3002 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3004 * regcache.c (find_register_by_number): Return a ref.
3005 (find_regno): Use references.
3006 (register_size): Likewise.
3007 (register_data): Likewise.
3008 * tdesc.c (target_desc::~target_desc): Remove free calls.
3009 (target_desc::operator==): Use std::vector compare.
3010 (init_target_desc): Use reference.
3011 (tdesc_create_reg): Use reg constructors.
3012 * tdesc.h (struct target_desc): Replace pointer with object.
3014 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3016 * regcache.c (find_register_by_number): Make static.
3017 (find_regno): Use find_register_by_number
3018 * regcache.h (struct reg): Remove declaration.
3020 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3022 * tdesc.c (target_desc::~target_desc): Move to here.
3023 (target_desc::operator==): Likewise.
3024 * tdesc.h (target_desc::~target_desc): Move from here.
3025 (target_desc::operator==): Likewise.
3027 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3029 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3031 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3033 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3035 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3036 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3037 and init_registers_s390_gs_linux64.
3039 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3041 * linux-s390-low.c (s390_fill_gs): Remove function.
3042 (s390_fill_gsbc): Remove function.
3043 (s390_regsets): Set fill functions for the guarded storage regsets
3046 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3048 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3049 the word size. Add comment.
3050 (s390_get_wordsize): New function.
3051 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3052 pswm with it. Instead, use s390_get_wordsize to determine the
3053 word size first and derive the correct tdesc from that directly.
3055 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3057 * Makefile.in: Include silent-rules.mk.
3058 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3059 (COMPILE): Add ECHO_CXX.
3060 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3061 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3062 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3063 (version-generated.c): Add ECHO_GEN.
3064 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3065 (IPAGENT_COMPILE): Add ECHO_CXX.
3066 (%-generated.c): Add ECHO_REGDAT.
3068 2018-03-14 Tom Tromey <tom@tromey.com>
3071 * ax.c (ax_printf): Special case for NULL.
3073 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3075 * linux-low.c (linux_qxfer_libraries_svr4): Use
3076 xml_escape_text_append.
3078 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3080 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3082 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3084 * server.c (handle_general_set): Remove unnecessary xstrdup.
3086 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3088 * server.c (parse_debug_format_options): Adjust to
3089 delim_string_to_char_ptr_vec changes.
3090 * thread-db.c (thread_db_load_search): Adjust to
3091 dirnames_to_char_ptr_vec changes.
3093 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3095 * target.h (target_enable_btrace, target_disable_btrace)
3096 (target_read_btrace, target_read_btrace_conf): Turn macro into
3097 inline function. Throw error if target method is not defined.
3098 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3099 check for btrace target method. Be prepared to handle exceptions
3100 from btrace target methods.
3102 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3104 * server.c (captured_main): Change order of error message printed
3105 when the current working directory cannot be found.
3107 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3109 * server.c: Include "filenames.h" and "pathstuff.h".
3110 (program_name): Delete variable.
3111 (program_path): New anonymous class.
3112 (get_exec_wrapper): Use "program_path" instead of
3114 (handle_v_run): Likewise.
3115 (captured_main): Likewise.
3116 (process_serial_event): Likewise.
3118 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3120 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3121 (OBJS): Add "pathstuff.o".
3122 * server.c (current_directory): New global variable.
3123 (captured_main): Initialize "current_directory".
3125 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3127 * tdesc.c: Use common/tdesc.h.
3128 * tdesc.h: Likewise.
3130 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3131 Simon Marchi <simon.marchi@ericsson.com>
3133 * Makefile.in: Switch order of make rules.
3135 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3137 * Makefile.in: Add common directory in build.
3138 * configure.ac: Add common reference.
3139 * configure: Regenerate.
3141 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3143 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3144 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3145 * spu-low.c (spu_target_ops): Likewise.
3146 * win32-low.c (win32_target_ops): Likewise.
3147 * server.c (supported_btrace_packets): Report packets unconditionally.
3148 * target.h (target_ops) <supports_btrace>: Remove.
3149 (target_supports_btrace): Remove.
3151 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3153 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3154 (handle_btrace_disable): Change return type to void. Use exceptions
3156 (handle_btrace_general_set): Catch exception and copy message to
3159 2018-02-08 Tom Tromey <tom@tromey.com>
3161 * linux-low.c (install_software_single_step_breakpoints): Use
3162 make_scoped_restore.
3163 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3164 (do_restore_current_thread_cleanup): Remove.
3165 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3168 2018-02-08 Tom Tromey <tom@tromey.com>
3170 * mem-break.c (set_raw_breakpoint_at): Use
3171 gdb::unique_xmalloc_ptr.
3173 2018-01-30 Pedro Alves <palves@redhat.com>
3176 * target.c (target_terminal::terminal_state): Rename to ...
3177 (target_terminal::m_terminal_state): ... this.
3179 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3181 * linux-low.c (handle_extended_wait): Surround call to
3182 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3184 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3186 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3187 linux_ptrace_attach_fail_reason_string now returning an
3189 (linux_attach): Likewise.
3190 * thread-db.c (attach_thread): Likewise.
3192 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3195 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3196 checking for fs_base/gs_base fields in struct user_regs_struct.
3197 * configure: Regenerate.
3199 2018-01-16 Yao Qi <yao.qi@linaro.org>
3202 * linux-low.c (fetch_register): Call supply_register instead of
3205 2018-01-08 Yao Qi <yao.qi@linaro.org>
3206 Simon Marchi <simon.marchi@ericsson.com>
3208 * Makefile.in (OBS): Remove selftest.o.
3209 * configure.ac: Set srv_selftest_objs if $development is true.
3210 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3211 * configure: Re-generated.
3212 * server.c (captured_main): Wrap variable selftest_filter with
3215 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3217 * server.c (parse_debug_format_options): Return std::string.
3218 (handle_monitor_command, captured_main): Adjust.
3220 2018-01-05 Pedro Alves <palves@redhat.com>
3223 * server.c (captured_main): Pass quiet=false to
3224 save_original_signals_state.
3226 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3228 * gdbreplay.c (gdbreplay_version): Update copyright year in
3230 * server.c (gdbserver_version): Likewise.
3232 2017-12-08 Tom Tromey <tom@tromey.com>
3234 * ax.c (ax_printf): Update.
3236 2017-12-07 Yao Qi <yao.qi@linaro.org>
3238 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3239 aarch64_linux_read_description.
3240 * linux-amd64-ipa.c (idx2mask): New array.
3241 (get_ipa_tdesc): Move idx2mask out.
3242 (initialize_low_tracepoint): Initialize target descriptions.
3243 * linux-i386-ipa.c (idx2mask): New array.
3244 (get_ipa_tdesc): Move idx2mask out.
3245 (initialize_low_tracepoint): Initialize target descriptions.
3247 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3249 * tdesc.c (struct tdesc_type): Change return type.
3250 (tdesc_add_flag): Change parameter type.
3251 (tdesc_add_bitfield): Likewise.
3252 (tdesc_add_field): Likewise.
3253 (tdesc_set_struct_size): Likewise.
3255 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3257 * regcache.c (registers_to_string): Remove unused variable.
3259 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3261 * inferiors.c (for_each_inferior_with_data): Remove.
3262 * inferiors.h (for_each_inferior_with_data): Remove.
3263 * server.c (handle_qxfer_threads_worker): Change parameter type.
3264 (handle_qxfer_threads_proper): Use for_each_thread.
3266 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3268 * inferiors.c (for_each_inferior): Remove.
3269 (clear_inferiors): Use for_each_thread.
3270 * inferiors.h (for_each_inferior): Remove.
3271 * linux-low.c (linux_wait_for_event_filtered): Use
3273 (linux_stabilize_threads): Likewise.
3274 * regcache.c (regcache_release): Likewise.
3275 * server.c (gdb_wants_all_threads_stopped): Likewise.
3276 (clear_pending_status_callback): Remove.
3277 (handle_status): Use for_each_thread.
3278 (captured_main): Likewise.
3279 * win32-low.c (child_init_thread_list): Likewise.
3280 (win32_clear_inferiors): Likewise.
3281 (fake_breakpoint_event): Likewise.
3283 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3285 * inferiors.h (find_inferior): Remove.
3286 * inferiors.c (find_inferior): Remove.
3288 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3290 * linux-low.c (resume_status_pending_p): Update comment.
3291 (need_step_over_p): Update comment.
3293 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3295 * linux-low.c (proceed_one_lwp): Return void, change parameter
3297 (unsuspend_and_proceed_one_lwp): Likewise.
3298 (proceed_all_lwps): Use for_each_thread.
3299 (unstop_all_lwps): Likewise.
3301 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3303 * linux-low.c (linux_resume_one_thread): Return void, take
3305 (linux_resume): Use for_each_thread.
3307 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3309 * linux-low.c (send_sigstop_callback): Return void, change
3310 parameter type. Rename to...
3311 (send_sigstop): ... this.
3312 (suspend_and_send_sigstop_callback): Return void, change parameter
3314 (suspend_and_send_sigstop): ... this.
3315 (stop_all_lwps): Use for_each_thread.
3317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3319 * linux-low.c (lwp_running): Return bool, remove unused
3321 (linux_stabilize_threads): Use find_thread.
3323 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3325 * linux-low.c (select_singlestep_lwp_callback): Remove.
3326 (count_events_callback): Remove.
3327 (select_event_lwp_callback): Remove.
3328 (select_event_lwp): Use find_thread/for_each_thread.
3330 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3332 * linux-low.c (not_stopped_callback): Return bool, take filter
3334 (linux_wait_for_event_filtered): Use find_thread.
3335 (linux_wait_1): Likewise.
3337 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3339 * linux-low.c (same_lwp): Remove.
3340 (find_lwp_pid): Use find_thread.
3342 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3344 * linux-low.c (delete_lwp_callback): Remove.
3345 (linux_mourn): Use for_each_thread.
3347 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3349 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3350 args parameter, don't check for pid.
3351 (linux_detach): Use for_each_thread.
3353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3355 * linux-low.c (struct counter): Remove.
3356 (second_thread_of_pid_p): Remove.
3357 (last_thread_of_process_p): Use find_thread.
3359 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3361 * inferiors.c (find_inferior_in_random): Remove.
3362 * inferiors.h (find_inferior_in_random): Remove.
3363 * linux-low.c (status_pending_p_callback): Return bool, accept
3364 parameter ptid directly.
3365 (linux_wait_for_event_filtered): Use find_thread_in_random.
3366 (linux_wait_1): Likewise.
3368 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3370 * inferiors.c (find_inferior_id): Remove.
3371 (find_thread_ptid): Move implemention from find_inferior_id to
3373 * inferiors.h (find_inferior_id): Remove.
3374 * server.c (handle_status): Use find_thread_ptid.
3375 (process_serial_event): Likewise.
3376 * thread-db.c (find_one_thread): Likewise.
3377 (thread_db_thread_handle): Likewise.
3378 * win32-low.c (thread_rec): Likewise.
3379 (child_delete_thread): Likewise.
3380 (win32_thread_alive): Likewise.
3381 (get_child_debug_event): Likewise.
3383 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3385 * linux-mips-low.c (update_watch_registers_callback): Return
3386 void, remove pid_p parameter, don't check for pid.
3387 (mips_insert_point, mips_remove_point): Use for_each_thread.
3389 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3391 * lynx.low (lynx_delete_thread_callback): Remove.
3392 (lynx_mourn): Use for_each_thread.
3394 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3396 * regcache.c (regcache_invalidate_one): Remove.
3397 (regcache_invalidate_pid): use for_each_thread.
3399 2017-11-26 Tom Tromey <tom@tromey.com>
3401 * linux-low.c (linux_create_inferior): Update.
3403 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3405 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3407 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3409 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3410 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3411 * linux-aarch64-tdesc-selftest.c: New file.
3412 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3414 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3416 * configure.srv: Add new file.
3417 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3418 * linux-aarch64-tdesc-selftest.c: New file.
3419 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3421 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3423 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3424 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3425 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3427 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3429 * configure.srv: Add new files.
3430 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3431 aarch64_linux_read_description.
3432 * linux-aarch64-low.c (aarch64_linux_read_description):
3433 Merge with aarch64_arch_setup.
3434 (aarch64_arch_setup): Call aarch64_linux_read_description.
3435 * linux-aarch64-tdesc.c: New file.
3436 * linux-aarch64-tdesc.h: New file.
3438 2017-11-24 Yao Qi <yao.qi@linaro.org>
3440 * configure.srv: Set $srv_regobj for tic6x-linux.
3441 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3442 (tic6x_read_description): Move some code to tic6x_arch_setup.
3443 (tic6x_tdesc_test): New function.
3444 (initialize_low_arch): Call selftests::register_test.
3446 2017-11-22 Yao Qi <yao.qi@linaro.org>
3448 * remote-utils.c (prepare_resume_reply): Use memcpy.
3450 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3452 * linux-low.c (kill_one_lwp_callback): Return void, take
3453 argument directly, don't filter on pid.
3454 (linux_kill): Use for_each_thread.
3456 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3458 * linux-low.c (need_step_over_p): Return bool, remove dummy
3460 (linux_resume, proceed_all_lwps): Use find_thread.
3462 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3464 * linux-low.c (resume_status_pending_p): Return bool, remove
3466 (linux_resume): Use find_thread.
3468 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3470 * linux-low.c (struct thread_resume_array): Remove.
3471 (linux_set_resume_request): Return void, take arguments
3473 (linux_resume): Use for_each_thread.
3475 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3477 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3478 return bool, remove data argument.
3479 (linux_stabilize_threads): Use find_thread.
3481 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3483 * linux-low.c (unsuspend_one_lwp): Remove.
3484 (unsuspend_all_lwps): Use for_each_thread, inline code from
3487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3489 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3490 * linux-low.c (struct iterate_over_lwps_args): Remove.
3491 (iterate_over_lwps_filter): Remove.
3492 (iterate_over_lwps): Use find_thread.
3494 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3496 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3497 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3498 code from reset_lwp_ptrace_options_callback.
3500 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3502 * linux-arm-low.c (struct update_registers_data): Remove.
3503 (update_registers_callback): Return void, take arguments
3504 directly, don't check thread's pid.
3505 (arm_insert_point, arm_remove_point): Use for_each_thread.
3507 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3509 * win32-low.c (continue_one_thread): Return void, take argument
3511 (child_continue): Use for_each_thread.
3513 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3515 * win32-i386-low.c (update_debug_registers_callback): Rename
3517 (update_debug_registers): ... this, return void, remove pid_p arg.
3518 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3520 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3522 * inferiors.h (struct process_info): Add constructor, initialize
3524 <syscalls_to_catch>: Change type to std::vector<int>.
3525 * inferiors.c (add_process): Allocate process_info with new.
3526 (remove_process): Free process_info with delete.
3527 * linux-low.c (handle_extended_wait): Adjust.
3528 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3529 * server.c (handle_general_set): Adjust.
3531 2017-11-16 Pedro Alves <palves@redhat.com>
3533 * remote-utils.c (remote_close): Block SIGIO signals instead of
3534 uninstalling the SIGIO handler.
3536 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3538 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3540 2017-11-16 Yao Qi <yao.qi@linaro.org>
3542 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3543 (tic6x_store_gregset): Likewise.
3544 (tic6x_usrregs_info): Move it up.
3546 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3548 * Makefile.in: Update arch rules.
3549 * configure.srv: Explicitly mark arch/ files.
3551 2017-11-13 Andreas Schwab <schwab@suse.de>
3553 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3555 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3557 2017-11-06 Pedro Alves <palves@redhat.com>
3559 * config.in, configure: Regenerate.
3561 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3563 * target.c (struct thread_search): Remove.
3564 (thread_search_callback): Remove.
3565 (prepare_to_access_memory): Use for_each_thread instead of
3566 find_inferior. Inline code from thread_search_callback.
3568 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3570 * server.c (struct visit_actioned_threads_data): Remove.
3571 (visit_actioned_threads): Change prototype to take arguments
3573 (resume): Use find_thread instead of find_inferior.
3575 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3577 * server.c (queue_stop_reply_callback): Change prototype, return
3579 (find_status_pending_thread_callback): Remove.
3580 (handle_status): Replace find_inferior with find_thread and
3583 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3585 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3587 (aarch64_store_gregset): Likewise.
3588 (aarch64_fill_fpregset): Likewise.
3589 (aarch64_store_fpregset): Likewise.
3591 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3593 * gdbthread.h (find_thread, for_each_thread): New functions.
3594 * inferiors.c (thread_of_pid): Remove.
3595 (find_any_thread_of_pid): Use find_thread.
3596 * linux-low.c (num_lwps): Use for_each_thread.
3598 2017-10-17 Yao Qi <yao.qi@linaro.org>
3600 * Makefile.in: Remove one rule.
3601 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3603 2017-10-17 Yao Qi <yao.qi@linaro.org>
3605 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3606 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3608 2017-10-17 Yao Qi <yao.qi@linaro.org>
3610 * configure.srv: Rename arm.o with arch/arm.o.
3612 2017-10-17 Yao Qi <yao.qi@linaro.org>
3614 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3615 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3616 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3617 (arch-i386.o, arch-amd64.o): Remove rules.
3618 (arch/%.o): New rule.
3619 Update POSTCOMPILE and COMPILE.pre.
3620 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3621 * configure: Re-generated.
3622 * configure.srv: Replace arch-i386.o with arch/i386.o.
3623 Replace arch-amd64.o with arch/amd64.o.
3625 2017-10-16 Yao Qi <yao.qi@linaro.org>
3627 * configure: Regenerated.
3629 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3631 * inferiors.h: (struct inferior_list): Remove.
3632 (struct inferior_list_entry); Remove.
3633 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3634 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3635 get_first_inferior): Remove.
3636 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3637 find_inferior_id, find_inferior_in_random): Change signature.
3638 * inferiors.c (all_threads): Change type to
3639 std::list<thread_info *>.
3640 (get_thread): Remove macro.
3641 (find_inferior, find_inferior_id): Change signature, implement
3643 (find_inferior_in_random): Change signature, implement using
3644 find_thread_in_random.
3645 (for_each_inferior, for_each_inferior_with_data): Change
3646 signature, implement using for_each_thread.
3647 (add_inferior_to_list, remove_inferior): Remove.
3648 (add_thread, get_first_thread, thread_of_pid,
3649 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3650 (get_first_inferior, one_inferior_p, clear_inferior_list):
3652 (clear_inferiors, get_thread_process): Update.
3653 * gdbthread.h: Include <list>.
3654 (struct thread_info) <entry>: Remove field.
3656 (all_threads): Change type to std::list<thread_info *>.
3657 (get_first_inferior): Add doc.
3658 (find_thread, for_each_thread, find_thread_in_random): New
3660 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3661 * linux-arm-low.c (update_registers_callback): Update.
3662 * linux-low.c (second_thread_of_pid_p): Update.
3663 (kill_one_lwp_callback, linux_detach_lwp_callback,
3664 delete_lwp_callback, status_pending_p_callback, same_lwp,
3665 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3666 iterate_over_lwps, not_stopped_callback,
3667 resume_stopped_resumed_lwps, count_events_callback,
3668 select_singlestep_lwp_callback, select_event_lwp_callback,
3669 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3670 suspend_and_send_sigstop_callback, wait_for_sigstop,
3671 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3672 lwp_running, linux_set_resume_request, resume_status_pending_p,
3673 need_step_over_p, start_step_over, linux_resume_one_thread,
3674 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3675 reset_lwp_ptrace_options_callback): Update.
3676 * linux-mips-low.c (update_watch_registers_callback): Update.
3677 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3679 (free_register_cache_thread_one): Remove.
3680 (regcache_release): Update.
3681 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3682 handle_qxfer_threads_worker): Update.
3683 (handle_query): Update, use list iterator.
3684 (visit_actioned_threads, handle_pending_status,
3685 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3686 clear_pending_status_callback, set_pending_status_callback,
3687 find_status_pending_thread_callback, handle_status,
3688 process_serial_event): Update.
3689 * target.c (thread_search_callback): Update.
3690 * thread-db.c (thread_db_get_tls_address): Update.
3691 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3693 * win32-i386-low.c (update_debug_registers_callback): Update.
3694 * win32-low.c (delete_thread_info, child_delete_thread,
3695 continue_one_thread, suspend_one_thread,
3696 get_child_debug_event): Adjust.
3698 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3700 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3701 * inferiors.h: Include <list>.
3702 (struct process_info) <entry>: Remove field.
3704 (pid_of): Change macro to function.
3705 (ptid_of, lwpid_of): Remove macro.
3706 (all_processes): Change type to std::list<process_info *>.
3707 (ALL_PROCESSES): Remove macro.
3708 (for_each_process, find_process): New function.
3709 * inferiors.c (all_processes): Change type to
3710 std::list<process_info *>.
3711 (find_thread_process): Adjust.
3712 (add_process): Likewise.
3713 (remove_process): Likewise.
3714 (find_process_pid): Likewise.
3715 (get_first_process): Likewise.
3716 (started_inferior_callback): Remove.
3717 (have_started_inferiors_p): Adjust.
3718 (attached_inferior_callback): Remove.
3719 (have_attached_inferiors_p): Adjust.
3720 * linux-low.c (check_zombie_leaders): Likewise.
3721 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3722 (x86_linux_update_xmltarget): Adjust.
3723 * server.c (handle_query): Likewise.
3724 (gdb_reattached_process): Remove.
3725 (handle_status): Adjust.
3726 (kill_inferior_callback): Likewise.
3727 (detach_or_kill_inferior): Remove.
3728 (print_started_pid): Likewise.
3729 (print_attached_pid): Likewise.
3730 (detach_or_kill_for_exit): Update.
3731 (process_serial_event): Likewise.
3732 * linux-arm-low.c (arm_new_fork): Likewise.
3734 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3736 * dll.h: Include <list>.
3737 (struct dll_info): Add constructor.
3738 <entry>: Remove field.
3739 (all_dlls): Change type to std::list<dll_info>.
3740 * dll.c: Include <algorithm>.
3741 (get_dll): Remove macro.
3742 (all_dlls): Change type to std::list<dll_info *>.
3743 (free_one_dll): Remove.
3744 (match_dll): Likewise.
3745 (loaded_dll): Adjust.
3746 (unloaded_dll): Adjust to all_dlls type change, use
3747 std::find_if. Inline code from match_dll.
3748 (clear_dlls): Adjust to all_dlls type change.
3749 * server.c (emit_dll_description): Remove.
3750 (handle_qxfer_libraries): Adjust to all_dlls type change,
3751 integrate emit_dll_description's functionality.
3753 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3755 * linux-low.h (struct linux_target_ops) <delete_process>: New
3757 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3758 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3759 (struct linux_target_ops): Add delete_process callback.
3760 * linux-arm-low.c (arm_delete_process): New.
3761 (struct linux_target_ops): Add delete_process callback.
3762 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3763 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3764 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3765 * linux-mips-low.c (mips_linux_delete_process): New.
3766 (struct linux_target_ops): Add delete_process callback.
3767 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3768 * linux-s390-low.c (struct linux_target_ops): Likewise.
3769 * linux-sh-low.c (struct linux_target_ops): Likewise.
3770 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3771 * linux-tile-low.c (struct linux_target_ops): Likewise.
3772 * linux-x86-low.c (x86_linux_delete_process): New.
3773 (struct linux_target_ops): Add delete_process callback.
3774 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3776 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3778 * linux-aarch64-low.c (the_low_target): Add thread delete
3780 * linux-arm-low.c (arm_delete_thread): New function.
3781 (the_low_target): Add thread delete callback.
3782 * linux-bfin-low.c (the_low_target): Likewise.
3783 * linux-crisv32-low.c (the_low_target): Likewise.
3784 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3786 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3788 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3789 * linux-mips-low.c (mips_linux_delete_thread): New function.
3790 (the_low_target): Add thread delete callback.
3791 * linux-ppc-low.c (the_low_target): Likewise.
3792 * linux-s390-low.c (the_low_target): Likewise.
3793 * linux-sh-low.c (the_low_target): Likewise.
3794 * linux-tic6x-low.c (the_low_target): Likewise.
3795 * linux-tile-low.c (the_low_target): Likewise.
3796 * linux-x86-low.c (the_low_target): Likewise.
3797 * linux-xtensa-low.c (the_low_target): Likewise.
3799 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3801 * win32-low.c: Include "common-inferior.h".
3803 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3805 * inferiors.c (set_inferior_cwd): New function.
3806 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3807 (handle_query): Inform that QSetWorkingDir is supported.
3808 * win32-low.c (create_process): Pass the inferior's cwd to
3811 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3813 * inferiors.c (current_inferior_cwd): New global variable.
3814 (get_inferior_cwd): New function.
3815 * inferiors.h (struct process_info) <cwd>: New field.
3817 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3819 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3820 (OBS): Add gdb_tilde_expand.o.
3822 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3824 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3825 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3827 2017-09-29 Pedro Alves <palves@redhat.com>
3829 * ax.c (gdb_parse_agent_expr): Constify.
3830 * ax.h (gdb_parse_agent_expr): Constify.
3831 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3833 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3834 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3835 * remote-utils.h (read_ptid): Constify.
3836 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3837 (process_point_options, process_serial_event): Constify.
3838 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3839 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3840 (cmd_qtbuffer): Constify.
3842 2017-09-29 Pedro Alves <palves@redhat.com>
3844 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3847 2017-09-29 Pedro Alves <palves@redhat.com>
3849 * linux-low.c (handle_extended_wait): Pass parent thread instead
3850 of process to thread_db_notice_clone.
3851 * linux-low.h (thread_db_notice_clone): Replace parent process
3852 parameter with parent thread parameter.
3853 * thread-db.c (find_one_thread): Add comment.
3854 (thread_db_notice_clone): Replace parent process parameter with
3855 parent thread parameter. Temporarily switch to the parent thread.
3857 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3859 * gdbthread.h: Include "common-gdbthread.h".
3860 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3861 "if" when validating the ptid.
3862 * remote-utils.c: Include "gdbthread.h".
3863 (prepare_resume_reply): Use "switch_to_thread".
3864 * target.c (done_accessing_memory): Likewise.
3866 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3868 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3869 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3870 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3871 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3872 s390x-gs-linux64-ipa.o to ipa_obj.
3873 * linux-s390-low.c (HWCAP_S390_GS): New define.
3874 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3876 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3877 (s390_arch_setup): Check for guarded-storage support and choose
3879 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3880 init_registers_s390x_gs_linux64.
3881 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3883 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3884 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3886 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3888 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3890 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3892 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3893 (thread_db_thread_handle): Declare.
3894 * linux-low.c (linux_target_ops): Initialize thread_handle.
3895 * server.c (handle_qxfer_threads_worker): Add support for
3897 * target.h (struct target_ops): Add new function pointer,
3899 (target_thread_handle): Define.
3900 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3902 (thread_db_thread_handle): New function.
3904 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3906 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3907 * linux-low.h (thread_db_notice_clone): Declare.
3908 * thread-db.c (thread_db_notice_clone): New function.
3910 2017-09-21 Pedro Alves <palves@redhat.com>
3912 * server.c (gdb_read_memory, handle_status, process_serial_event)
3913 (handle_serial_event, handle_target_event): Adjust to
3914 set_desired_thread prototype change.
3915 * target.c (set_desired_thread): Remove 'use_general' parameter
3917 * target.h (set_desired_thread): Remove 'use_general' parameter.
3919 2017-09-20 Tom Tromey <tom@tromey.com>
3921 * target.c (target_terminal::terminal_state): Define.
3922 (target_terminal::init): Rename from target_terminal_init.
3923 (target_terminal::inferior): Rename from
3924 target_terminal_inferior.
3925 (target_terminal::ours): Rename from target_terminal_ours.
3926 (target_terminal::ours_for_output, target_terminal::info): New.
3928 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3930 * server.c (accumulate_file_name_length): Remove.
3931 (emit_dll_description): Adjust to std::string change.
3932 (handle_qxfer_libraries): Use std::string to hold document.
3934 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3936 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3937 return type of xml_escape_text.
3938 * server.c (emit_dll_description): Likewise.
3940 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3942 * server.c (captured_main): Accept argument for --selftest.
3943 Update run_tests call.
3944 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3945 when registering selftests.
3947 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3949 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3950 instead of "VEC" for "target_desc.reg_defs".
3951 (regcache_cpy): Likewise.
3952 (registers_to_string): Likewise.
3953 (registers_from_string): Likewise.
3954 (find_regno): Likewise.
3955 (supply_regblock): Likewise.
3956 (regcache_raw_read_unsigned): Likewise.
3957 * tdesc.c (init_target_desc): Likewise.
3958 (tdesc_create_reg): Likewise.
3959 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3960 (struct target_desc) <reg_defs>: Convert to "std::vector".
3961 (target_desc): Do not initialize "reg_defs".
3962 (~target_desc): Update code to use "std::vector" instead of "VEC"
3963 for "target_desc.reg_defs".
3964 (operator==): Likewise.
3966 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3968 * inferiors.h (thread_to_gdb_id): Remove.
3969 * inferiors.c (thread_to_gdb_id): Remove.
3970 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3971 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3972 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3974 * nto-low.c (nto_fetch_registers, nto_store_registers,
3975 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3977 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3979 * inferiors.h (gdb_id_to_thread_id): Remove.
3980 * inferiors.c (gdb_id_to_thread_id): Remove.
3981 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3982 removal. Move pid declaration closer to where it's used.
3984 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3986 * server.c (handle_detach): New function.
3987 (process_serial_event): Move code out, call handle_detach.
3989 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3991 * server.c (require_running): Rename to ...
3992 (require_running_or_return): ... this ...
3993 (require_running_or_break): ... and this.
3994 (handle_query, process_serial_event): Adjust.
3996 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3998 * linux-low.c (linux_set_resume_request): Remove unused
4001 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4003 * server.c (first_thread_of): Remove.
4004 (process_serial_event): Replace usage of first_thread_of with
4005 find_any_thread_of_pid.
4006 * tracepoint.c (same_process_p): Remove.
4007 (gdb_agent_about_to_close): Replace usage of same_process_p with
4008 find_any_thread_of_pid.
4009 * linux-x86-low.c (same_process_callback): Remove.
4010 (x86_arch_setup_process_callback): Replace usage of
4011 same_process_callback with find_any_thread_of_pid.
4012 * thread-db.c (any_thread_of): Remove.
4013 (switch_to_process): Replace usage of any_thread_of with
4014 find_any_thread_of_pid.
4015 * inferiors.c (thread_pid_matches_callback): Remove.
4016 (find_thread_process): Adjust to use find_any_thread_of_pid.
4018 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4020 * regcache.c (get_thread_regcache): Guard calls to "memset"
4023 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4025 * linux-low.c (handle_extended_wait): Use
4026 "allocate_target_description" instead of "XNEW".
4027 * linux-x86-low.c (initialize_low_arch): Likewise.
4029 2017-09-05 Yao Qi <yao.qi@linaro.org>
4031 * configure.srv (srv_i386_regobj): Remove.
4032 (srv_amd64_regobj): Remove.
4033 (srv_regobj): Set it to "" for x86 non-linux targets.
4034 * linux-x86-tdesc.c (i386_linux_read_description):
4035 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4036 (init_registers_i386): Remove the declaration.
4037 (tdesc_i386): Remove the declaration.
4038 (lynx_i386_arch_setup): Call i386_create_target_description.
4039 * nto-x86-low.c: Likewise.
4040 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4041 [!__x86_64__]: include arch/i386.h.
4042 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4044 2017-09-05 Yao Qi <yao.qi@linaro.org>
4046 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4047 i386/amd64-XXX-linux from it.
4049 2017-09-05 Yao Qi <yao.qi@linaro.org>
4051 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4053 (ipa_amd64_linux_regobj): Remove.
4054 (ipa_x32_linux_regobj): Remove.
4056 2017-09-05 Yao Qi <yao.qi@linaro.org>
4058 * Makefile.in (arch-amd64.o): New rule.
4059 * configure.srv: Append arch-amd64.o.
4060 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4061 (get_ipa_tdesc): Call amd64_linux_read_description.
4062 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4063 and init_registers_amd64_XXX.
4064 * linux-x86-low.c (x86_linux_read_description): Call
4065 amd64_linux_read_description.
4066 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4067 (initialize_low_arch): Don't call init_registers_x32_XXX and
4068 init_registers_amd64_XXX.
4069 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4070 and tdesc_amd64_XXX.
4071 [__x86_64__] (amd64_tdesc_test): New function.
4072 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4073 and init_registers_amd64_XXX.
4074 * linux-x86-tdesc.c: Include arch/amd64.h.
4075 (xcr0_to_tdesc_idx): New function.
4076 (i386_linux_read_description): New function.
4077 (amd64_get_ipa_tdesc_idx): New function.
4078 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4079 (amd64_get_ipa_tdesc): Declare.
4081 2017-09-05 Yao Qi <yao.qi@linaro.org>
4083 * configure.srv (srv_i386_linux_xmlfiles): Remove
4084 i386/i386-XXX-linux.xml from it.
4086 2017-09-05 Yao Qi <yao.qi@linaro.org>
4088 * configure.srv: Set srv_i386_linux_regobj empty if $development
4090 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4091 initialize_low_tdesc.
4092 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4093 with #if initialize_low_tdesc.
4094 * linux-x86-tdesc-selftest.c: New file.
4095 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4097 2017-09-05 Yao Qi <yao.qi@linaro.org>
4099 * Makefile.in (arch-i386.o): New rule.
4100 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4101 (x86_64-*-linux*): Likewise.
4102 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4103 include arch/i386.h.
4104 (i386_linux_read_description): Remove code and call
4105 i386_create_target_description.
4106 * tdesc.c (allocate_target_description): New function.
4107 * tdesc.h (set_tdesc_architecture): Remove declaration.
4108 (set_tdesc_osabi): Likewise.
4110 2017-09-05 Yao Qi <yao.qi@linaro.org>
4112 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4113 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4114 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4116 * server.c (get_features_xml): Call tdesc_get_features_xml.
4117 * tdesc.c (set_tdesc_architecture): New function.
4118 (set_tdesc_osabi): New function.
4119 (tdesc_get_features_xml): New function.
4120 (tdesc_create_feature): Add an argument.
4121 * tdesc.h (struct target_desc) <features>: New field.
4122 <arch, osabi>: New field.
4123 (~target_desc): xfree features, arch, and osabi.
4124 (target_desc::oerator==): Don't compare .xmltarget.
4125 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4126 (set_tdesc_osabi): Likewise.
4127 (tdesc_get_features_xml): Likewise.
4129 2017-09-05 Yao Qi <yao.qi@linaro.org>
4131 * linux-x86-tdesc.c: Include selftest.h.
4132 (i386_tdesc_test): New function.
4133 (initialize_low_tdesc): Call selftests::register_test.
4134 * tdesc.h: Include regdef.h.
4135 (target_desc): Override operator == and !=.
4137 2017-09-05 Yao Qi <yao.qi@linaro.org>
4139 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4140 (ipa_obj): Likewise.
4141 * linux-i386-ipa.c: Include common/x86-xstate.h
4142 (get_ipa_tdesc): Call i386_linux_read_description.
4143 (initialize_low_tracepoint): Don't call init_registers_XXX
4144 functions, call initialize_low_tdesc instead.
4145 * linux-x86-low.c (x86_linux_read_description): Call
4146 i386_linux_read_description.
4147 (initialize_low_arch): Don't call init_registers_i386_XXX
4148 functions, call initialize_low_tdesc.
4149 * linux-x86-tdesc.c: New file.
4150 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4151 (i386_get_ipa_tdesc_idx): Declare.
4152 (i386_get_ipa_tdesc): Declare.
4153 (initialize_low_tdesc): Declare.
4155 2017-09-05 Yao Qi <yao.qi@linaro.org>
4157 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4160 2017-09-05 Yao Qi <yao.qi@linaro.org>
4162 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4163 * regcache.c (get_thread_regcache): Use VEC_length.
4164 (init_register_cache): Likewise.
4165 (regcache_cpy): Likewise.
4166 (registers_to_string): Iterate reg_defs via VEC_iterate.
4167 (find_regno): Likewise.
4168 (find_register_by_number): Use VEC_index.
4169 (register_size): Call find_register_by_number.
4170 (register_data): Call find_register_by_number.
4171 (supply_regblock): Use VEC_length.
4172 (regcache_raw_read_unsigned): Likewise.
4173 * tdesc.c (init_target_desc): Iterate reg_defs via
4175 (default_description): Update initializer.
4176 (copy_target_description): Don't update field num_registers.
4177 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4178 <num_registers>: Remove.
4180 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4182 * Makefile.in (.SECONDARY): Define target.
4184 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4186 * linux-low.c (linux_wait_1): Adjust.
4187 * server.c (queue_stop_reply_callback): Adjust.
4189 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4191 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4192 QEnvironmentUnset and QEnvironmentReset packets.
4193 (handle_query): Inform remote that QEnvironmentHexEncoded,
4194 QEnvironmentUnset and QEnvironmentReset are supported.
4196 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4198 * inferiors.h (inferior_target_data): Rename to ...
4199 (thread_target_data): ... this.
4200 (inferior_regcache_data): Rename to ...
4201 (thread_regcache_data): ... this.
4202 (set_inferior_regcache_data): Rename to ...
4203 (set_thread_regcache_data): ... this.
4204 * inferiors.c (inferior_target_data): Rename to ...
4205 (thread_target_data): ... this.
4206 (inferior_regcache_data): Rename to ...
4207 (thread_regcache_data): ... this.
4208 (set_inferior_regcache_data): Rename to ...
4209 (set_thread_regcache_data): ... this.
4210 (free_one_thread): Update.
4211 * linux-low.h (get_thread_lwp): Update.
4212 * regcache.c (get_thread_regcache): Update.
4213 (regcache_invalidate_thread): Update.
4214 (free_register_cache_thread): Update.
4215 * win32-i386-low.c (update_debug_registers_callback): Update.
4216 (win32_get_current_dr): Update.
4217 * win32-low.c (thread_rec): Update.
4218 (delete_thread_info): Update.
4219 (continue_one_thread): Update.
4220 (suspend_one_thread): Update.
4222 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4224 * inferiors.c (set_inferior_target_data): Remove.
4225 * inferiors.h (set_inferior_target_data): Remove.
4227 2017-08-18 Yao Qi <yao.qi@linaro.org>
4229 * Makefile.in (OBS): Add selftest.o.
4230 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4231 * configure, config.in: Re-generated.
4232 * server.c: Include common/sefltest.h.
4233 (captured_main): Handle option --selftest.
4235 2017-08-09 Yao Qi <yao.qi@linaro.org>
4237 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4238 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4239 i386-avx-mpx.o and i386-mmx.o.
4240 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4241 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4242 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4243 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4244 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4245 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4246 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4247 i386/amd64-avx-mpx.xml.
4249 2017-08-09 Yao Qi <yao.qi@linaro.org>
4251 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4252 and x32-avx-avx512.o.
4253 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4254 i386/x32-avx-avx512.xml.
4256 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4258 * tracepoint.h (enum class fast_tpoint_collect_result): New
4260 (fast_tracepoint_collecting): Change return type to
4261 fast_tpoint_collect_result.
4262 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4263 * linux-low.h: Include tracepoint.h.
4264 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4265 fast_tpoint_collect_result.
4266 * linux-low.c (handle_tracepoints): Adjust.
4267 (linux_fast_tracepoint_collecting): Change return type to
4268 fast_tpoint_collect_result.
4269 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4270 linux_wait_1, stuck_in_jump_pad_callback,
4271 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4272 proceed_one_lwp): Adjust to type change.
4274 2017-07-10 Yao Qi <yao.qi@linaro.org>
4276 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4278 2017-06-29 Yao Qi <yao.qi@linaro.org>
4280 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4282 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4284 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4286 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4288 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4290 * linux-low.c (linux_create_inferior): Adjust code to access the
4291 environment information via 'gdb_environ' class.
4292 * lynx-low.c (lynx_create_inferior): Likewise.
4293 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4294 (get_environ): Return a pointer to 'our_environ'.
4295 (captured_main): Initialize 'our_environ'.
4296 * server.h (get_environ): Adjust prototype.
4297 * spu-low.c (spu_create_inferior): Adjust code to access the
4298 environment information via 'gdb_environ' class.
4300 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4302 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4303 usage of "register" keyword.
4305 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4307 * configure: Re-generate.
4309 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4311 * configure: Re-generate.
4313 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4315 * Makefile.in (COMPILE.pre): Add "-x c++".
4317 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4319 * fork-child.c: Conditionally include <signal.h>.
4321 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4323 * server.c (handle_general_set): Handle new packet
4324 "QStartupWithShell".
4325 (handle_query): Add "QStartupWithShell" to the list of supported
4327 (gdbserver_usage): Add help text explaining the
4328 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4330 (captured_main): Recognize and act upon the presence of the new
4333 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4334 Pedro Alves <palves@redhat.com>
4336 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4337 * configure: Regenerate.
4338 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4340 (i[34567]86-*-lynxos*): Likewise.
4341 (spu*-*-*): Likewise.
4342 * fork-child.c: New file.
4343 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4345 (linux_ptrace_fun): New function.
4346 (linux_create_inferior): Adjust function prototype to reflect
4347 change on "target.h". Adjust function code to use
4349 (linux_request_interrupt): Delete "signal_pid".
4350 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4351 (lynx_ptrace_fun): New function.
4352 (lynx_create_inferior): Adjust function prototype to reflect
4353 change on "target.h". Adjust function code to use
4355 * nto-low.c (nto_create_inferior): Adjust function prototype and
4356 code to reflect change on "target.h". Update comments.
4357 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4358 "common-terminal.h" and "environ.h".
4359 (terminal_fd): Moved to fork-child.c.
4360 (old_foreground_pgrp): Likewise.
4361 (restore_old_foreground_pgrp): Likewise.
4362 (last_status): Make it global.
4363 (last_ptid): Likewise.
4364 (our_environ): New variable.
4365 (startup_with_shell): Likewise.
4366 (program_name): Likewise.
4367 (program_argv): Rename to...
4368 (program_args): ...this.
4369 (wrapper_argv): New variable.
4370 (start_inferior): Delete function.
4371 (get_exec_wrapper): New function.
4372 (get_exec_file): Likewise.
4373 (get_environ): Likewise.
4374 (prefork_hook): Likewise.
4375 (post_fork_inferior): Likewise.
4376 (postfork_hook): Likewise.
4377 (postfork_child_hook): Likewise.
4378 (handle_v_run): Update code to deal with arguments coming from the
4379 remote host. Update calls from "start_inferior" to
4381 (captured_main): Likewise. Initialize environment variable. Call
4383 * server.h (post_fork_inferior): New prototype.
4384 (get_environ): Likewise.
4385 (last_status): Declare.
4386 (last_ptid): Likewise.
4387 (signal_pid): Likewise.
4388 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4389 (spu_ptrace_fun): New function.
4390 (spu_create_inferior): Adjust function prototype to reflect change
4391 on "target.h". Adjust function code to use "fork_inferior".
4392 * target.c (target_terminal_init): New function.
4393 (target_terminal_inferior): Likewise.
4394 (target_terminal_ours): Likewise.
4395 * target.h: Include <vector>.
4396 (struct target_ops) <create_inferior>: Update prototype.
4397 (create_inferior): Update macro.
4398 * utils.c (gdb_flush_out_err): New function.
4399 * win32-low.c (win32_create_inferior): Adjust function prototype
4400 and code to reflect change on "target.h".
4402 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4404 * inferiors.c (switch_to_thread): New function.
4406 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4408 * Makefile.in (SFILE): Add "common/job-control.c".
4409 (OBS): Add "job-control.o".
4411 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4413 * Makefile: Remove "@host_makefile_frag@".
4415 2017-05-05 Pedro Alves <palves@redhat.com>
4417 * configure: Regenerate.
4419 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4421 * configure: Regenerate.
4423 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4425 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4426 software_single_step change of return type to
4427 std::vector<CORE_ADDR>.
4428 * linux-low.c (install_software_single_step_breakpoints):
4430 * linux-low.h (install_software_single_step_breakpoints):
4433 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4435 * remote-utils.c: Include "gdb_termios.h" instead of
4437 * terminal.h: Delete file.
4439 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4441 * server.c: Include <vector>.
4442 <program_argv, wrapper_argv>: Convert to std::vector.
4443 (start_inferior): Rewrite function to use C++.
4444 (handle_v_run): Likewise. Update code that calculates the argv
4445 based on the vRun packet; use C++.
4446 (captured_main): Likewise.
4448 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4450 * server.c (handle_v_cont): Initialize thread_resume::thread
4453 2017-04-05 Pedro Alves <palves@redhat.com>
4455 * configure: Regenerate.
4457 2017-04-05 Pedro Alves <palves@redhat.com>
4459 * gdbreplay.c (sync_error): Constify.
4460 * linux-x86-low.c (push_opcode): Constify.
4462 2017-04-05 Pedro Alves <palves@redhat.com>
4464 * win32-low.c (get_child_debug_event)
4465 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4466 Report TARGET_WAITKIND_SPURIOUS instead.
4468 2017-04-05 Pedro Alves <palves@redhat.com>
4470 * remote-utils.c (remote_prepare, remote_open): Constify.
4471 * remote-utils.h (remote_prepare, remote_open): Constify.
4472 * server.c (captured_main): Constify 'port' handling.
4474 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4476 * Makefile.in (clean): Clear .deps.
4478 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4480 * .gitignore: Remove generated files, replace with wildcard.
4481 * (clean): Replace removal of generated files with wildcard.
4482 (version.c): Replace with...
4483 (version-generated.c): ...this.
4484 (xml-builtin.c): Replace with...
4485 (xml-builtin-generated.c): ...this.
4486 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4487 (%.c: *regformats*): Replace with...
4488 (%-generated.c: *regformats*): ...this.
4490 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4492 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4493 (xtensa_fill_gregset): Call collect_register_by_name for
4495 (xtensa_store_gregset): Call supply_register_by_name for
4498 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4500 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4501 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4502 (xtensa_store_gregset): Call supply_register for all registers in
4503 a0_regnum..a0_regnum + C0_NREGS range.
4505 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4507 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4508 (ax-ipa.o: ax.c): Remove.
4509 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4510 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4511 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4512 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4513 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4515 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4517 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4518 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4519 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4520 (errors-ipa.o: ../common/errors.c): Remove.
4521 (format-ipa.o: ../common/format.c): Remove.
4522 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4524 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4526 * Makefile.in (%-ipa.o: %.c): New rule.
4527 (tracepoint-ipa.o: tracepoint.c): Remove.
4528 (utils-ipa.o: utils.c): Remove.
4529 (remote-utils-ipa.o: remote-utils.c): Remove.
4530 (regcache-ipa.o: regcache.c): Remove.
4531 (i386-linux-ipa.o: i386-linux.c): Remove.
4532 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4533 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4534 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4535 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4536 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4537 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4538 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4539 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4540 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4541 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4542 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4543 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4544 (aarch64-ipa.o: aarch64.c): Remove.
4545 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4546 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4547 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4548 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4549 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4550 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4551 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4552 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4553 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4554 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4555 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4556 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4557 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4558 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4559 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4560 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4561 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4562 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4563 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4564 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4565 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4566 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4567 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4568 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4569 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4570 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4571 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4572 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4573 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4574 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4575 (tdesc-ipa.o: tdesc.c): Remove.
4576 (x32-linux-ipa.o: x32-linux.c): Remove.
4577 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4578 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4580 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4582 * Makefile.in (%.o: ../arch/%.c): New rule.
4583 (arm.o: ../arch/arm.c): Remove.
4584 (arm-linux.o: ../arch/arm-linux.c): Remove.
4585 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4586 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4588 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4590 * Makefile.in (%.o: ../nat/%.c): New rule.
4591 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4592 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4593 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4594 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4595 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4596 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4597 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4598 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4599 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4600 (linux-personality.o: ../nat/linux-personality.c): Remove.
4601 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4602 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4603 (x86-linux.o: ../nat/x86-linux.c): Remove.
4604 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4605 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4607 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4609 * Makefile.in (%.o: ../common/%.c): New rule.
4610 (signals.o: ../common/signals.c): Remove.
4611 (print-utils.o: ../common/print-utils.c): Remove.
4612 (rsp-low.o: ../common/rsp-low.c): Remove.
4613 (common-utils.o: ../common/common-utils.c): Remove.
4614 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4615 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4616 (vec.o: ../common/vec.c): Remove.
4617 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4618 (xml-utils.o: ../common/xml-utils.c): Remove.
4619 (ptid.o: ../common/ptid.c): Remove.
4620 (buffer.o: ../common/buffer.c): Remove.
4621 (format.o: ../common/format.c): Remove.
4622 (filestuff.o: ../common/filestuff.c): Remove.
4623 (agent.o: ../common/agent.c): Remove.
4624 (errors.o: ../common/errors.c): Remove.
4625 (environ.o: ../common/environ.c): Remove.
4626 (common-debug.o: ../common/common-debug.c): Remove.
4627 (cleanups.o: ../common/cleanups.c): Remove.
4628 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4629 (fileio.o: ../common/fileio.c): Remove.
4630 (common-regcache.o: ../common/common-regcache.c): Remove.
4631 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4632 (new-op.o: ../common/new-op.c): Remove.
4633 (btrace-common.o: ../common/btrace-common.c): Remove.
4635 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4637 * Makefile.in (%.o: ../target/%.c): New rule.
4638 (waitstatus.o: ../target/waitstatus.c): Remove.
4640 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4643 (%.c: ../regformats/%.dat,
4644 (%.c: ../regformats/arm/%.dat,
4645 (%.c: ../regformats/i386/%.dat,
4646 (%.c: ../regformats/rs6000/%.dat): New rules.
4647 (aarch64.c): Remove.
4648 (reg-arm.c): Remove.
4649 (arm-with-iwmmxt.c): Remove.
4650 (arm-with-vfpv2.c): Remove.
4651 (arm-with-vfpv3.c): Remove.
4652 (arm-with-neon.c): Remove.
4653 (reg-bfin.c): Remove.
4654 (reg-cris.c): Remove.
4655 (reg-crisv32.c): Remove.
4657 (i386-linux.c): Remove.
4658 (i386-avx.c): Remove.
4659 (i386-avx-linux.c): Remove.
4660 (i386-avx-avx512.c): Remove.
4661 (i386-avx-avx512-linux.c): Remove.
4662 (i386-mpx.c): Remove.
4663 (i386-mpx-linux.c): Remove.
4664 (i386-avx-mpx-avx512-pku.c): Remove.
4665 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4666 (i386-avx-mpx.c): Remove.
4667 (i386-avx-mpx-linux.c): Remove.
4668 (i386-mmx.c): Remove.
4669 (i386-mmx-linux.c): Remove.
4670 (reg-ia64.c): Remove.
4671 (reg-m32r.c): Remove.
4672 (reg-m68k.c): Remove.
4674 (mips-linux.c): Remove.
4675 (mips-dsp-linux.c): Remove.
4676 (mips64-linux.c): Remove.
4677 (mips64-dsp-linux.c): Remove.
4678 (nios2-linux.c): Remove.
4679 (powerpc-32.c): Remove.
4680 (powerpc-32l.c): Remove.
4681 (powerpc-altivec32l.c): Remove.
4682 (powerpc-cell32l.c): Remove.
4683 (powerpc-vsx32l.c): Remove.
4684 (powerpc-isa205-32l.c): Remove.
4685 (powerpc-isa205-altivec32l.c): Remove.
4686 (powerpc-isa205-vsx32l.c): Remove.
4687 (powerpc-e500l.c): Remove.
4688 (powerpc-64l.c): Remove.
4689 (powerpc-altivec64l.c): Remove.
4690 (powerpc-cell64l.c): Remove.
4691 (powerpc-vsx64l.c): Remove.
4692 (powerpc-isa205-64l.c): Remove.
4693 (powerpc-isa205-altivec64l.c): Remove.
4694 (powerpc-isa205-vsx64l.c): Remove.
4695 (s390-linux32.c): Remove.
4696 (s390-linux32v1.c): Remove.
4697 (s390-linux32v2.c): Remove.
4698 (s390-linux64.c): Remove.
4699 (s390-linux64v1.c): Remove.
4700 (s390-linux64v2.c): Remove.
4701 (s390-te-linux64.c): Remove.
4702 (s390-vx-linux64.c): Remove.
4703 (s390-tevx-linux64.c): Remove.
4704 (s390x-linux64.c): Remove.
4705 (s390x-linux64v1.c): Remove.
4706 (s390x-linux64v2.c): Remove.
4707 (s390x-te-linux64.c): Remove.
4708 (s390x-vx-linux64.c): Remove.
4709 (s390x-tevx-linux64.c): Remove.
4710 (tic6x-c64xp-linux.c): Remove.
4711 (tic6x-c64x-linux.c): Remove.
4712 (tic6x-c62x-linux.c): Remove.
4714 (reg-sparc64.c): Remove.
4715 (reg-spu.c): Remove.
4717 (amd64-linux.c): Remove.
4718 (amd64-avx.c): Remove.
4719 (amd64-avx-linux.c): Remove.
4720 (amd64-avx-avx512.c): Remove.
4721 (amd64-avx-avx512-linux.c): Remove.
4722 (amd64-mpx.c): Remove.
4723 (amd64-mpx-linux.c): Remove.
4724 (amd64-avx-mpx-avx512-pku.c): Remove.
4725 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4726 (amd64-avx-mpx.c): Remove.
4727 (amd64-avx-mpx-linux.c): Remove.
4729 (x32-linux.c): Remove.
4730 (x32-avx.c): Remove.
4731 (x32-avx-linux.c): Remove.
4732 (x32-avx-avx512.c): Remove.
4733 (x32-avx-avx512-linux.c): Remove.
4734 (reg-xtensa.c): Remove.
4735 (reg-tilegx.c): Remove.
4736 (reg-tilegx32.c): Remove.
4738 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4740 * Makefile.in (SFILES): Add "common/environ.c".
4741 (OBJS): Add "common/environ.h".
4743 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4745 * configure.ac: Check if the fs_base and gs_base members of
4746 `struct user_regs_struct' exist.
4747 * config.in: Regenerated.
4748 * configure: Likewise.
4750 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4752 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4754 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4755 (get_next_pcs_syscall_next_pc): Likewise.
4757 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4759 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4760 * nto-x86-low.c: Likewise.
4762 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4764 * Makefile.in: Include disable-implicit-rules.mk.
4766 2016-11-23 Pedro Alves <palves@redhat.com>
4768 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4769 (debug_vprintf): Use std::chrono::steady_clock instead of
4770 gettimeofday. Use '.' instead of ':'.
4771 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4772 (get_timestamp): Use std::chrono::steady_clock instead of
4775 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4777 * Makefile.in: Fix whitespace formatting.
4779 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4781 * Makefile.in (SFILES, OBS): Flatten list and order
4784 2016-11-23 Pedro Alves <palves@redhat.com>
4786 * event-loop.c (handle_file_event): Use warning.
4787 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4788 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4791 2016-11-23 Pedro Alves <palves@redhat.com>
4793 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4795 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4796 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4797 debug_printf and debug_flush for debug output.
4798 * server.c (handle_general_set): Likewise.
4799 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4802 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4804 * Makefile.in (.c.o): Replace rule with ...
4805 (%.o: %.c): ... this one.
4807 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4809 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4810 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4812 * configure.ac: Remove checks for the make program.
4813 * configure: Re-generate.
4815 2016-10-28 Pedro Alves <palves@redhat.com>
4817 * Makefile.in (CXX_DIALECT): Get from configure.
4818 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4819 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4820 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4821 * config.in: Regenerate.
4822 * configure: Regenerate.
4824 2016-10-27 Yao Qi <yao.qi@linaro.org>
4826 * linux-low.c (linux_supports_range_stepping): Return true if
4827 can_software_single_step return true.
4829 2016-10-27 Yao Qi <yao.qi@linaro.org>
4831 * inferiors.c (find_inferior_in_random): New function.
4832 * inferiors.h (find_inferior_in_random): Declare.
4833 * linux-low.c (linux_wait_for_event_filtered): Call
4834 find_inferior_in_random instead of find_inferior.
4836 2016-10-27 Yao Qi <yao.qi@linaro.org>
4838 * linux-low.c (linux_wait_1): If single-step breakpoints are
4839 inserted, remove them.
4841 2016-10-26 Pedro Alves <palves@redhat.com>
4843 * linux-low.c (handle_extended_wait): Link parent/child fork
4845 (linux_wait_1): Unlink them.
4846 (linux_set_resume_request): Ignore resume requests for
4847 already-resumed and unhandled fork child threads.
4848 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4849 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4851 (handle_v_requests) <vCont>: Don't call require_running.
4852 * server.h (in_queued_stop_replies): New declaration.
4854 2016-10-24 Yao Qi <yao.qi@linaro.org>
4857 * linux-aarch64-low.c (append_insns): Cast the return value to
4860 2016-10-10 Yao Qi <yao.qi@linaro.org>
4862 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4864 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4866 * target.c (target_supports_multi_process): New function, moved
4868 * target.h (target_supports_multi_process): ... here. Remove
4871 2016-10-05 Tom Tromey <tom@tromey.com>
4874 * tracepoint.c (handle_tracepoint_bkpts): Check
4875 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4877 2016-10-05 Yao Qi <yao.qi@linaro.org>
4879 * configure.srv: Update the path of arm-*.xml files.
4881 2016-10-05 Terry Guo <terry.guo@arm.com>
4882 Yao Qi <yao.qi@linaro.org>
4884 * Makefile.in: Adjust the path of rules.
4885 * configure.srv: Update the path of xml files.
4886 * regformats/arm-with-iwmmxt.dat: Regenerated.
4887 * regformats/arm-with-neon.dat: Likewise.
4888 * regformats/arm-with-vfpv2.dat: Likewise.
4889 * regformats/arm-with-vfpv3.dat Likewise.
4891 2016-09-30 Yao Qi <yao.qi@linaro.org>
4894 * target.c (target_stop_and_wait): Don't call
4895 target_continue_no_signal, use resume_stop instead.
4897 2016-09-26 Yao Qi <yao.qi@linaro.org>
4899 * linux-low.c (linux_wait_1): Call debug_exit.
4901 2016-09-23 Pedro Alves <palves@redhat.com>
4903 * Makefile.in (SFILES): Add common/new-op.c.
4904 (OBS): Add common/new-op.o.
4905 (new-op.o): New rule.
4907 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4909 * .gitinore: Ignore more files.
4911 2016-09-21 Yao Qi <yao.qi@linaro.org>
4913 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4916 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4918 * server.c (start_inferior): Call target_mourn_inferior instead of
4919 mourn_inferior; pass ptid_t argument to it.
4921 (handle_target_event): Likewise.
4922 * target.c (target_mourn_inferior): New function.
4923 * target.h (mourn_inferior): Delete macro.
4925 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4927 * linux-low.c (lwp_is_stepping): New function.
4929 2016-09-06 Carl Love <cel@us.ibm.com>
4931 * server.c (start_inferior): Fixed comment, requested comment change
4932 didn't get updated correctly. Removed reference to ptrace () call as
4933 it is only true on Linux systems.
4935 2016-09-06 Carl Love <cel@us.ibm.com>
4937 * server.c (start_inferior): Do not call
4938 function target_post_create_inferior () if the
4939 inferior process has already exited.
4941 2016-09-05 Pedro Alves <palves@redhat.com>
4943 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4944 (COMPILE.pre, CC_LD): Use CXX directly.
4945 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4946 * acinclude.m4: Don't include build-with-cxx.m4.
4947 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4948 * configure: Regenerate.
4950 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4953 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4954 call writing data to own_buf.
4956 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4958 * target.c (mywait): Call target_wait instead of
4960 (target_wait): New function.
4962 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4964 * server.c (start_inferior): New variable 'ptid'. Replace calls
4965 to the_target->resume by target_continue{,_no_signal}, depending
4967 * target.c (target_stop_and_wait): Call target_continue_no_signal
4968 instead of the_target->resume.
4969 (target_continue): New function.
4971 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4973 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4975 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4978 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4980 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4981 * linux-arm-low.c (ps_get_thread_area): Likewise.
4982 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4983 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4984 * linux-mips-low.c (ps_get_thread_area): Likewise.
4985 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4986 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4987 * linux-x86-low.c (ps_get_thread_area): Likewise.
4988 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4990 2016-08-19 Pedro Alves <palves@redhat.com>
4992 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4994 2016-08-19 Pedro Alves <palves@redhat.com>
4996 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4997 comment. Use memcpy instead of casting through unsigned long.
4999 2016-08-19 Pedro Alves <palves@redhat.com>
5001 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5002 allocating around 0x80000000.
5004 2016-08-19 Pedro Alves <palves@redhat.com>
5007 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5008 (x32-avx512-linux-ipa.o): New rules.
5009 * configure.ac (x86_64-*-linux*): New x32 check.
5010 * configure.srv (ipa_x32_linux_regobj): New.
5011 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5012 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5014 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5016 * configure: Regenerate.
5018 2016-08-09 Pedro Alves <palves@redhat.com>
5021 * Makefile.in (OBS): Add signals-state-save-restore.o.
5022 (signals-state-save-restore.o): New rule.
5023 * config.in: Regenerate.
5024 * configure: Regenerate.
5025 * linux-low.c: Include "signals-state-save-restore.h".
5026 (linux_create_inferior): Call
5027 restore_original_signals_state.
5028 * server.c: Include "dispositions-save-restore.h".
5029 (captured_main): Call save_original_signals_state.
5031 2016-08-05 Pedro Alves <palves@redhat.com>
5033 * configure: Regenerate.
5035 2016-08-04 Yao Qi <yao.qi@linaro.org>
5037 * linux-low.c (regsets_fetch_inferior_registers): Check
5038 errno is ESRCH or not.
5040 2016-08-02 Yao Qi <yao.qi@linaro.org>
5042 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5043 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5044 (thread_db_load_search): Update.
5045 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5046 td_ta_set_event and td_ta_event_getmsg.
5048 2016-07-26 Pedro Alves <palves@redhat.com>
5051 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5052 of unsigned long for 64-bit registers and use uint32_t instead of
5053 unsigned int for 32-bit registers.
5055 2016-07-26 Pedro Alves <palves@redhat.com>
5057 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5060 2016-07-21 Tom Tromey <tom@tromey.com>
5062 * configure: Rebuild.
5064 2016-07-21 Yao Qi <yao.qi@linaro.org>
5066 * mem-break.c (find_gdb_breakpoint): Cast bp to
5067 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5069 2016-07-21 Yao Qi <yao.qi@linaro.org>
5071 * server.c (handle_v_requests): Support s and S actions
5072 if target_supports_software_single_step return true.
5074 2016-07-21 Yao Qi <yao.qi@linaro.org>
5076 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5077 is resume_step, call maybe_hw_step.
5078 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5080 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5082 (proceed_one_lwp): If resume request is resume_step, install
5083 reinsert breakpoints and call maybe_hw_step.
5085 2016-07-21 Yao Qi <yao.qi@linaro.org>
5087 * linux-low.c (proceed_one_lwp): Declare.
5088 (linux_resume_one_thread): Remove local variable 'step'.
5089 Lift code enqueue signal. Call proceed_one_lwp instead of
5090 linux_resume_one_lwp.
5092 2016-07-21 Yao Qi <yao.qi@linaro.org>
5094 * linux-low.c (linux_resume_one_thread): Call
5095 enqueue_pending_signal.
5097 2016-07-21 Yao Qi <yao.qi@linaro.org>
5099 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5100 * inferiors.c (do_restore_current_thread_cleanup): New function.
5101 (make_cleanup_restore_current_thread): Likewise.
5102 * linux-low.c (install_software_single_step_breakpoints): Call
5103 make_cleanup_restore_current_thread. Switch current_thread to
5106 2016-07-21 Yao Qi <yao.qi@linaro.org>
5108 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5109 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5110 (clone_one_breakpoint): Likewise.
5111 (delete_reinsert_breakpoints): Change parameter to thread.
5113 (has_reinsert_breakpoints): Likewise.
5114 (uninsert_reinsert_breakpoints): Likewise.
5115 (reinsert_reinsert_breakpoints): Likewise.
5116 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5117 (delete_reinsert_breakpoints): Likewise.
5118 (reinsert_reinsert_breakpoints): Likewise.
5119 (uninsert_reinsert_breakpoints): Likewise.
5120 (has_reinsert_breakpoints): Likewise.
5122 2016-07-21 Yao Qi <yao.qi@linaro.org>
5124 * inferiors.c (get_thread_process): Make parameter const.
5125 * inferiors.h (get_thread_process): Update declaration.
5126 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5127 Add new parameters child_thread and parent_thread. Callers
5129 * mem-break.h (clone_all_breakpoints): Update declaration.
5131 2016-07-21 Yao Qi <yao.qi@linaro.org>
5133 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5134 <command_list, handler>: Remove.
5135 (struct gdb_breakpoint): New.
5136 (struct other_breakpoint): New.
5137 (struct reinsert_breakpoint): New.
5138 (is_gdb_breakpoint): New function.
5139 (any_persistent_commands): Update command_list if
5140 is_gdb_breakpoint returns true.
5141 (set_breakpoint): Create breakpoints according to their types.
5142 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5143 (set_gdb_breakpoint_1): Likewise.
5144 (set_gdb_breakpoint): Likewise.
5145 (clear_breakpoint_conditions): Change parameter type to
5146 'struct gdb_breakpoint *'.
5147 (clear_breakpoint_commands): Likewise.
5148 (clear_breakpoint_conditions_and_commands): Likewise.
5149 (add_condition_to_breakpoint): Likewise.
5150 (add_breakpoint_condition): Likewise.
5151 (add_commands_to_breakpoint): Likewise.
5152 (check_breakpoints): Check other_breakpoint.
5153 (clone_one_breakpoint): Clone breakpopint according to its type.
5154 * mem-break.h (struct gdb_breakpoint): Declare.
5155 (set_gdb_breakpoint): Update declaration.
5156 (clear_breakpoint_conditions_and_commands): Likewise.
5157 (add_breakpoint_condition): Likewise.
5158 (add_breakpoint_commands): Likewise.
5159 * server.c (process_point_options): Change parameter type to
5160 'struct gdb_breakpoint *'.
5162 2016-07-21 Yao Qi <yao.qi@linaro.org>
5164 * mem-break.c (set_breakpoint_at): Rename it to ...
5165 (set_breakpoint_type_at): ... it.
5166 (set_breakpoint_at): Call set_breakpoint_type_at.
5167 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5168 * mem-break.h (set_breakpoint_at): Update comments.
5170 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5172 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5174 (nios2_store_gregset): Likewise.
5176 2016-07-01 Pedro Alves <palves@redhat.com>
5177 Antoine Tremblay <antoine.tremblay@ericsson.com>
5179 * linux-low.c: Change interface to take the target lwp_info
5180 pointer directly and return void. Handle detaching from a zombie
5182 (linux_detach_lwp_callback): New function.
5183 (linux_detach): Detach from the leader thread after detaching from
5186 2016-06-28 Yao Qi <yao.qi@linaro.org>
5188 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5189 for variable new_offset.
5190 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5191 (aarch64_ftrace_insn_reloc_cb): Likewise.
5192 (aarch64_ftrace_insn_reloc_tb): Likewise.
5193 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5194 PRIx64 instead of PRIx32.
5196 2016-06-28 Yao Qi <yao.qi@linaro.org>
5198 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5199 (the_low_target): Install arm_get_syscall_trapinfo.
5201 2016-06-28 Yao Qi <yao.qi@linaro.org>
5203 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5205 (the_low_target): Install aarch64_get_syscall_trapinfo.
5207 2016-06-28 Yao Qi <yao.qi@linaro.org>
5209 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5211 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5212 Remove parameter sysno.
5213 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5216 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5218 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5219 (s390_emit_ne_goto): Likewise.
5220 (s390_emit_lt_goto): Likewise.
5221 (s390_emit_le_goto): Likewise.
5222 (s390_emit_gt_goto): Likewise.
5223 (s390_emit_ge_goto): Likewise.
5224 (s390x_emit_eq_goto): Likewise.
5225 (s390x_emit_ne_goto): Likewise.
5226 (s390x_emit_lt_goto): Likewise.
5227 (s390x_emit_le_goto): Likewise.
5228 (s390x_emit_gt_goto): Likewise.
5229 (s390x_emit_ge_goto): Likewise.
5230 (s390_emit_ops_impl): Mark variable static.
5231 (s390x_emit_ops): Likewise.
5233 2016-06-17 Yao Qi <yao.qi@linaro.org>
5235 * linux-low.c (handle_extended_wait): Call
5236 uninsert_reinsert_breakpoints for the parent process. Remove
5237 reinsert breakpoints from the child process. Reinsert them to
5238 the parent process when vfork is done.
5239 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5240 (reinsert_reinsert_breakpoints): New function.
5241 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5242 (reinsert_reinsert_breakpoints): Declare.
5244 2016-06-17 Yao Qi <yao.qi@linaro.org>
5246 * linux-low.c (handle_extended_wait): If the parent is doing
5247 step-over, remove the reinsert breakpoints from the forked child.
5249 2016-06-17 Yao Qi <yao.qi@linaro.org>
5251 * linux-low.c (unsuspend_all_lwps): Declare.
5252 (linux_low_filter_event): If thread exited, call finish_step_over.
5253 If step-over is finished, unsuspend other threads.
5255 2016-06-17 Yao Qi <yao.qi@linaro.org>
5257 * linux-low.c (linux_resume_one_lwp_throw): Assert
5258 has_reinsert_breakpoints returns false.
5259 * mem-break.c (delete_disabled_breakpoints): Assert
5260 bp type isn't reinsert_breakpoint.
5262 2016-06-17 Yao Qi <yao.qi@linaro.org>
5264 * linux-low.c (maybe_hw_step): New function.
5265 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5266 (finish_step_over): Switch current_thread to lwp temporarily,
5267 and assert has_reinsert_breakpoints returns true.
5268 (proceed_one_lwp): Call maybe_hw_step.
5269 * mem-break.c (has_reinsert_breakpoints): New function.
5270 * mem-break.h (has_reinsert_breakpoints): Declare.
5272 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5274 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5276 2016-05-17 Yao Qi <yao.qi@linaro.org>
5278 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5279 instead of find_inferior.
5281 2016-05-05 Yao Qi <yao.qi@linaro.org>
5283 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5284 Initialize res to zero.
5286 2016-05-05 Yao Qi <yao.qi@linaro.org>
5288 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5291 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5293 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5294 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5295 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5297 2016-04-28 Par Olsson <par.olsson@windriver.com>
5298 Simon Marchi <simon.marchi@ericsson.com>
5300 * tracepoint.c (write_inferior_int8): New function.
5301 (cmd_qtenable_disable): Write enable flag using
5302 write_inferior_int8.
5304 2016-04-25 Yao Qi <yao.qi@linaro.org>
5306 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5307 (need_step_over_p): Return zero if the LWP has pending signals
5308 can be delivered on software single step target.
5310 2016-04-25 Yao Qi <yao.qi@linaro.org>
5312 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5313 return instead of error.
5315 2016-04-22 Yao Qi <yao.qi@linaro.org>
5317 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5320 2016-04-22 Yao Qi <yao.qi@linaro.org>
5322 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5323 signal when stepping over breakpoint with software single
5326 2016-04-21 Pedro Alves <palves@redhat.com>
5328 * linux-s390-low.c (s390_collect_ptrace_register)
5329 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5331 (s390_check_regset): Use void * instead of gdb_byte *.
5333 2016-04-20 Pedro Alves <palves@redhat.com>
5335 * configure: Renegerate.
5337 2016-04-20 Yao Qi <yao.qi@linaro.org>
5339 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5340 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5342 (arm_store_gregset): Likewise.
5344 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5346 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5347 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5348 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5349 (amd64-avx-mpx-linux.c): New rules.
5350 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5351 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5352 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5353 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5354 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5355 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5356 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5357 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5358 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5359 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5360 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5361 * linux-x86-low.c (x86_linux_read_description): Add case for
5362 X86_XSTATE_AVX_MPX_MASK.
5363 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5364 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5365 init_registers_i386_avx_mpx_linux.
5366 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5367 (initialize_low_tracepoint): Call
5368 init_registers_i386_avx_mpx_linux.
5369 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5370 (initialize_low_tracepoint): Call
5371 init_registers_amd64_avx_mpx_linux.
5372 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5373 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5374 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5377 2016-04-18 Pedro Alves <palves@redhat.com>
5379 * configure: Regenerate.
5381 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5383 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5384 (aarch64_emit_sub): Likewise.
5386 2016-04-12 Pedro Alves <palves@redhat.com>
5388 * utils.c (prepare_to_throw_exception): Delete.
5390 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5392 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5394 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5396 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5398 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5400 * linux-aarch64-ipa.c: Add <elf.h> include.
5401 * linux-ppc-ipa.c: Add <elf.h> include.
5402 * linux-s390-ipa.c: Add <elf.h> include.
5404 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5406 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5407 (get_raw_reg_ptr): Likewise.
5408 (get_trace_state_variable_value_ptr): Likewise.
5409 (set_trace_state_variable_value_ptr): Likewise.
5410 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5413 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5414 Marcin Kościelnicki <koriakin@0x04.net>
5417 * linux-ppc-low.c (emit_insns): New function.
5418 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5419 (ppc_emit_prologue): New function.
5420 (ppc_emit_epilogue): New function.
5421 (ppc_emit_add): New function.
5422 (ppc_emit_sub): New function.
5423 (ppc_emit_mul): New function.
5424 (ppc_emit_lsh): New function.
5425 (ppc_emit_rsh_signed): New function.
5426 (ppc_emit_rsh_unsigned): New function.
5427 (ppc_emit_ext): New function.
5428 (ppc_emit_zero_ext): New function.
5429 (ppc_emit_log_not): New function.
5430 (ppc_emit_bit_and): New function.
5431 (ppc_emit_bit_or): New function.
5432 (ppc_emit_bit_xor): New function.
5433 (ppc_emit_bit_not): New function.
5434 (ppc_emit_equal): New function.
5435 (ppc_emit_less_signed): New function.
5436 (ppc_emit_less_unsigned): New function.
5437 (ppc_emit_ref): New function.
5438 (ppc_emit_const): New function.
5439 (ppc_emit_reg): New function.
5440 (ppc_emit_pop): New function.
5441 (ppc_emit_stack_flush): New function.
5442 (ppc_emit_swap): New function.
5443 (ppc_emit_stack_adjust): New function.
5444 (ppc_emit_call): New function.
5445 (ppc_emit_int_call_1): New function.
5446 (ppc_emit_void_call_2): New function.
5447 (ppc_emit_if_goto): New function.
5448 (ppc_emit_goto): New function.
5449 (ppc_emit_eq_goto): New function.
5450 (ppc_emit_ne_goto): New function.
5451 (ppc_emit_lt_goto): New function.
5452 (ppc_emit_le_goto): New function.
5453 (ppc_emit_gt_goto): New function.
5454 (ppc_emit_ge_goto): New function.
5455 (ppc_write_goto_address): New function.
5456 (ppc_emit_ops_impl): New static variable.
5457 (ppc64v1_emit_prologue): New function.
5458 (ppc64v2_emit_prologue): New function.
5459 (ppc64_emit_epilogue): New function.
5460 (ppc64_emit_add): New function.
5461 (ppc64_emit_sub): New function.
5462 (ppc64_emit_mul): New function.
5463 (ppc64_emit_lsh): New function.
5464 (ppc64_emit_rsh_signed): New function.
5465 (ppc64_emit_rsh_unsigned): New function.
5466 (ppc64_emit_ext): New function.
5467 (ppc64_emit_zero_ext): New function.
5468 (ppc64_emit_log_not): New function.
5469 (ppc64_emit_bit_and): New function.
5470 (ppc64_emit_bit_or): New function.
5471 (ppc64_emit_bit_xor): New function.
5472 (ppc64_emit_bit_not): New function.
5473 (ppc64_emit_equal): New function.
5474 (ppc64_emit_less_signed): New function.
5475 (ppc64_emit_less_unsigned): New function.
5476 (ppc64_emit_ref): New function.
5477 (ppc64_emit_const): New function.
5478 (ppc64v1_emit_reg): New function.
5479 (ppc64v2_emit_reg): New function.
5480 (ppc64_emit_pop): New function.
5481 (ppc64_emit_stack_flush): New function.
5482 (ppc64_emit_swap): New function.
5483 (ppc64v1_emit_call): New function.
5484 (ppc64v2_emit_call): New function.
5485 (ppc64v1_emit_int_call_1): New function.
5486 (ppc64v2_emit_int_call_1): New function.
5487 (ppc64v1_emit_void_call_2): New function.
5488 (ppc64v2_emit_void_call_2): New function.
5489 (ppc64_emit_if_goto): New function.
5490 (ppc64_emit_eq_goto): New function.
5491 (ppc64_emit_ne_goto): New function.
5492 (ppc64_emit_lt_goto): New function.
5493 (ppc64_emit_le_goto): New function.
5494 (ppc64_emit_gt_goto): New function.
5495 (ppc64_emit_ge_goto): New function.
5496 (ppc64v1_emit_ops_impl): New static variable.
5497 (ppc64v2_emit_ops_impl): New static variable.
5498 (ppc_emit_ops): New function.
5499 (linux_low_target): Wire in ppc_emit_ops.
5501 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5502 Marcin Kościelnicki <koriakin@0x04.net>
5505 * Makefile.in: Add powerpc-*-ipa.o
5506 * configure.srv: Add ipa_obj for powerpc*-linux.
5507 * linux-ppc-ipa.c: New file.
5508 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5510 (PPC_FIELD): New macro.
5511 (PPC_SEXT): New macro.
5512 (PPC_OP6): New macro.
5513 (PPC_BO): New macro.
5514 (PPC_LI): New macro.
5515 (PPC_BD): New macro.
5516 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5517 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5518 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5519 (ppc_get_thread_area): New function.
5520 (is_elfv2_inferior): New function.
5521 (gen_ds_form): New function.
5522 (GEN_STD): New macro.
5523 (GEN_STDU): New macro.
5524 (GEN_LD): New macro.
5525 (GEN_LDU): New macro.
5526 (gen_d_form): New function.
5527 (GEN_ADDI): New macro.
5528 (GEN_ADDIS): New macro.
5529 (GEN_LI): New macro.
5530 (GEN_LIS): New macro.
5531 (GEN_ORI): New macro.
5532 (GEN_ORIS): New macro.
5533 (GEN_LWZ): New macro.
5534 (GEN_STW): New macro.
5535 (GEN_STWU): New macro.
5536 (gen_xfx_form): New function.
5537 (GEN_MFSPR): New macro.
5538 (GEN_MTSPR): New macro.
5539 (GEN_MFCR): New macro.
5540 (GEN_MTCR): New macro.
5541 (GEN_SYNC): New macro.
5542 (GEN_LWSYNC): New macro.
5543 (gen_x_form): New function.
5544 (GEN_OR): New macro.
5545 (GEN_MR): New macro.
5546 (GEN_LWARX): New macro.
5547 (GEN_STWCX): New macro.
5548 (GEN_CMPW): New macro.
5549 (gen_md_form): New function.
5550 (GEN_RLDICL): New macro.
5551 (GEN_RLDICR): New macro.
5552 (gen_i_form): New function.
5554 (GEN_BL): New macro.
5555 (gen_b_form): New function.
5556 (GEN_BNE): New macro.
5557 (GEN_LOAD): New macro.
5558 (GEN_STORE): New macro.
5559 (gen_limm): New function.
5560 (gen_atomic_xchg): New function.
5561 (gen_call): New function.
5562 (ppc_relocate_instruction): New function.
5563 (ppc_install_fast_tracepoint_jump_pad): New function.
5564 (ppc_get_min_fast_tracepoint_insn_len): New function.
5565 (ppc_get_ipa_tdesc_idx): New function.
5566 (the_low_target): Wire in the new functions.
5567 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5569 * linux-ppc-tdesc.h: New file.
5571 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5573 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5574 (alloc_jump_pad_buffer): New function.
5575 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5576 (alloc_jump_pad_buffer): New function.
5577 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5578 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5579 (alloc_jump_pad_buffer): New function.
5580 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5581 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5582 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5583 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5585 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5587 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5588 * linux-amd64-ipa.c: Likewise.
5589 * linux-i386-ipa.c: Likewise.
5590 * linux-s390-ipa.c: Likewise.
5591 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5592 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5593 set_trace_state_variable_value_ptr.
5594 (struct ipa_sym_addresses): Likewise.
5595 (symbol_list): Likewise.
5596 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5597 accessing gdb_collect directly.
5598 (gdb_collect_ptr_type): New typedef.
5599 (get_raw_reg_ptr_type): New typedef.
5600 (get_trace_state_variable_value_ptr_type): New typedef.
5601 (set_trace_state_variable_value_ptr_type): New typedef.
5602 (gdb_collect_ptr): New global.
5603 (get_raw_reg_ptr): New global.
5604 (get_trace_state_variable_value_ptr): New global.
5605 (set_trace_state_variable_value_ptr): New global.
5606 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5607 accessing get_raw_reg directly.
5608 (get_get_tsv_func_addr): Likewise for
5609 get_trace_state_variable_value_ptr.
5610 (get_set_tsv_func_addr): Likewise for
5611 set_trace_state_variable_value_ptr.
5612 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5614 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5616 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5618 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5620 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5622 (relocate_instruction): Remove own_buf.
5623 * server.c (own_buf): Make global.
5624 (handle_v_requests): Make global.
5625 * server.h (own_buf): New declaration.
5626 (handle_v_requests): New prototype.
5628 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5631 * linux-s390-low.c (add_insns): New function.
5632 (s390_emit_prologue): New function.
5633 (s390_emit_epilogue): New function.
5634 (s390_emit_add): New function.
5635 (s390_emit_sub): New function.
5636 (s390_emit_mul): New function.
5637 (s390_emit_lsh): New function.
5638 (s390_emit_rsh_signed): New function.
5639 (s390_emit_rsh_unsigned): New function.
5640 (s390_emit_ext): New function.
5641 (s390_emit_log_not): New function.
5642 (s390_emit_bit_and): New function.
5643 (s390_emit_bit_or): New function.
5644 (s390_emit_bit_xor): New function.
5645 (s390_emit_bit_not): New function.
5646 (s390_emit_equal): New function.
5647 (s390_emit_less_signed): New function.
5648 (s390_emit_less_unsigned): New function.
5649 (s390_emit_ref): New function.
5650 (s390_emit_if_goto): New function.
5651 (s390_emit_goto): New function.
5652 (s390_write_goto_address): New function.
5653 (s390_emit_litpool): New function.
5654 (s390_emit_const): New function.
5655 (s390_emit_call): New function.
5656 (s390_emit_reg): New function.
5657 (s390_emit_pop): New function.
5658 (s390_emit_stack_flush): New function.
5659 (s390_emit_zero_ext): New function.
5660 (s390_emit_swap): New function.
5661 (s390_emit_stack_adjust): New function.
5662 (s390_emit_set_r2): New function.
5663 (s390_emit_int_call_1): New function.
5664 (s390_emit_void_call_2): New function.
5665 (s390_emit_eq_goto): New function.
5666 (s390_emit_ne_goto): New function.
5667 (s390_emit_lt_goto): New function.
5668 (s390_emit_le_goto): New function.
5669 (s390_emit_gt_goto): New function.
5670 (s390_emit_ge_goto): New function.
5671 (s390x_emit_prologue): New function.
5672 (s390x_emit_epilogue): New function.
5673 (s390x_emit_add): New function.
5674 (s390x_emit_sub): New function.
5675 (s390x_emit_mul): New function.
5676 (s390x_emit_lsh): New function.
5677 (s390x_emit_rsh_signed): New function.
5678 (s390x_emit_rsh_unsigned): New function.
5679 (s390x_emit_ext): New function.
5680 (s390x_emit_log_not): New function.
5681 (s390x_emit_bit_and): New function.
5682 (s390x_emit_bit_or): New function.
5683 (s390x_emit_bit_xor): New function.
5684 (s390x_emit_bit_not): New function.
5685 (s390x_emit_equal): New function.
5686 (s390x_emit_less_signed): New function.
5687 (s390x_emit_less_unsigned): New function.
5688 (s390x_emit_ref): New function.
5689 (s390x_emit_if_goto): New function.
5690 (s390x_emit_const): New function.
5691 (s390x_emit_call): New function.
5692 (s390x_emit_reg): New function.
5693 (s390x_emit_pop): New function.
5694 (s390x_emit_stack_flush): New function.
5695 (s390x_emit_zero_ext): New function.
5696 (s390x_emit_swap): New function.
5697 (s390x_emit_stack_adjust): New function.
5698 (s390x_emit_int_call_1): New function.
5699 (s390x_emit_void_call_2): New function.
5700 (s390x_emit_eq_goto): New function.
5701 (s390x_emit_ne_goto): New function.
5702 (s390x_emit_lt_goto): New function.
5703 (s390x_emit_le_goto): New function.
5704 (s390x_emit_gt_goto): New function.
5705 (s390x_emit_ge_goto): New function.
5706 (s390_emit_ops): New function.
5707 (struct linux_target_ops): Fill in emit_ops hook.
5709 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5712 * Makefile.in: Add s390 IPA files.
5713 * configure.srv: Build IPA for s390.
5714 * linux-s390-ipa.c: New file.
5715 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5716 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5717 (tdesc_s390_linux32): Likewise.
5718 (init_registers_s390_linux32v1): Likewise.
5719 (tdesc_s390_linux32v1): Likewise.
5720 (init_registers_s390_linux32v2): Likewise.
5721 (tdesc_s390_linux32v2): Likewise.
5722 (init_registers_s390_linux64): Likewise.
5723 (tdesc_s390_linux64): Likewise.
5724 (init_registers_s390_linux64v1): Likewise.
5725 (tdesc_s390_linux64v1): Likewise.
5726 (init_registers_s390_linux64v2): Likewise.
5727 (tdesc_s390_linux64v2): Likewise.
5728 (init_registers_s390_te_linux64): Likewise.
5729 (tdesc_s390_te_linux64): Likewise.
5730 (init_registers_s390_vx_linux64): Likewise.
5731 (tdesc_s390_vx_linux64): Likewise.
5732 (init_registers_s390_tevx_linux64): Likewise.
5733 (tdesc_s390_tevx_linux64): Likewise.
5734 (init_registers_s390x_linux64): Likewise.
5735 (tdesc_s390x_linux64): Likewise.
5736 (init_registers_s390x_linux64v1): Likewise.
5737 (tdesc_s390x_linux64v1): Likewise.
5738 (init_registers_s390x_linux64v2): Likewise.
5739 (tdesc_s390x_linux64v2): Likewise.
5740 (init_registers_s390x_te_linux64): Likewise.
5741 (tdesc_s390x_te_linux64): Likewise.
5742 (init_registers_s390x_vx_linux64): Likewise.
5743 (tdesc_s390x_vx_linux64): Likewise.
5744 (init_registers_s390x_tevx_linux64): Likewise.
5745 (tdesc_s390x_tevx_linux64): Likewise.
5746 (have_hwcap_s390_vx): New static variable.
5747 (s390_arch_setup): Fill have_hwcap_s390_vx.
5748 (s390_get_thread_area): New function.
5749 (s390_ft_entry_gpr_esa): New const.
5750 (s390_ft_entry_gpr_zarch): New const.
5751 (s390_ft_entry_misc): New const.
5752 (s390_ft_entry_fr): New const.
5753 (s390_ft_entry_vr): New const.
5754 (s390_ft_main_31): New const.
5755 (s390_ft_main_64): New const.
5756 (s390_ft_exit_fr): New const.
5757 (s390_ft_exit_vr): New const.
5758 (s390_ft_exit_misc): New const.
5759 (s390_ft_exit_gpr_esa): New const.
5760 (s390_ft_exit_gpr_zarch): New const.
5761 (append_insns): New function.
5762 (s390_relocate_instruction): New function.
5763 (s390_install_fast_tracepoint_jump_pad): New function.
5764 (s390_get_min_fast_tracepoint_insn_len): New function.
5765 (s390_get_ipa_tdesc_idx): New function.
5766 (struct linux_target_ops): Wire in the above functions.
5767 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5768 * linux-s390-tdesc.h: New file.
5770 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5772 * linux-s390-low.c (s390_supports_tracepoints): New function.
5773 (struct linux_target_ops): Fill supports_tracepoints hook.
5775 2016-03-18 Yao Qi <yao.qi@linaro.org>
5777 * linux-low.c (lwp_signal_can_be_delivered): New function.
5778 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5780 2016-03-18 Yao Qi <yao.qi@linaro.org>
5782 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5783 0 if signal is enqueued. Remove 'signal' from one debugging
5784 message. Move one debugging message to some lines below.
5785 Remove code setting 'signal' to 0.
5787 2016-03-18 Yao Qi <yao.qi@linaro.org>
5789 * linux-low.c (linux_low_filter_event): Remove redundant
5790 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5792 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5794 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5795 (struct linux_target_ops): Wire in the above.
5797 2016-03-03 Yao Qi <yao.qi@linaro.org>
5799 * linux-low.c: Update comments to start_step_over.
5801 2016-03-03 Yao Qi <yao.qi@linaro.org>
5804 * linux-low.c (handle_extended_wait): Set child suspended
5805 if event_lwp->bp_reinsert isn't zero.
5807 2016-03-02 Yao Qi <yao.qi@linaro.org>
5809 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5810 enqueue_pending_signal.
5812 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5814 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5817 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5819 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5820 (s390_regmap_3264) [!__s390x__]: New global.
5821 (s390_collect_ptrace_register): Skip map entries containing -1.
5822 (s390_supply_ptrace_register): Ditto.
5823 (s390_fill_gprs_high): New function.
5824 (s390_store_gprs_high): New function.
5825 (s390_regsets): Add NT_S390_HIGH_GPRS.
5826 (s390_get_hwcap): Enable on 31-bit.
5827 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5828 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5829 Detect NT_S390_HIGH_GPRS.
5830 (s390_usrregs_info_3264): Enable on 31-bit.
5831 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5832 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5834 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5837 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5838 * configure.srv: Ditto.
5839 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5840 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5841 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5842 (init_registers_amd64_linux): Remove prototype.
5843 (tdesc_amd64_linux): Remove declaration.
5844 (get_ipa_tdesc): New function.
5845 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5846 initialize remaining tdescs.
5847 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5848 (init_registers_i386_linux): Remove prototype.
5849 (tdesc_i386_linux): Remove declaration.
5850 (get_ipa_tdesc): New function.
5851 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5852 initialize remaining tdescs.
5853 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5854 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5855 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5856 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5857 (x86_get_ipa_tdesc_idx): New function.
5858 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5859 * linux-x86-tdesc.h: New file.
5860 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5861 (target_get_ipa_tdesc_idx): New macro.
5862 * tracepoint.c (ipa_tdesc_idx): New macro.
5863 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5864 (symbol_list): Add ipa_tdesc_idx.
5865 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5866 (ipa_tdesc): Remove.
5867 (ipa_tdesc_idx): New variable.
5868 (get_context_regcache): Use get_ipa_tdesc.
5869 (gdb_collect): Ditto.
5871 * tracepoint.h (get_ipa_tdesc): New prototype.
5872 (ipa_tdesc): Remove.
5874 2016-02-24 Pedro Alves <palves@redhat.com>
5876 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5877 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5878 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5879 Factor out common code between the USE_SIGTRAP_SIGINFO and
5880 !USE_SIGTRAP_SIGINFO blocks.
5881 (linux_low_filter_event): Call save_stop_reason instead of
5882 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5884 (linux_wait_1): Update comments.
5886 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5888 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5889 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5890 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5891 ppc_insert_point, ppc_remove_point.
5893 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5895 * linux-s390-low.c (s390_supports_z_point_type): New function.
5896 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5898 2016-02-16 Yao Qi <yao.qi@linaro.org>
5900 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5901 PC. Get pc from regcache_read_pc.
5903 2016-02-12 Yao Qi <yao.qi@linaro.org>
5905 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5906 or linux_get_pc_32bit.
5907 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5909 2016-02-12 Yao Qi <yao.qi@linaro.org>
5911 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5912 arm_linux_get_next_pcs_fixup.
5914 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5916 * tracepoint.c (x_tracepoint_action_download): Change
5917 write_inferior_data_ptr to write_inferior_data_pointer.
5918 (cmd_qtstart): Likewise.
5919 (write_inferior_data_ptr): Remove.
5920 (download_agent_expr): Change write_inferior_data_ptr to
5921 write_inferior_data_pointer.
5922 (download_tracepoint_1): Likewise.
5923 (download_tracepoint): Likewise.
5924 (download_trace_state_variables): Likewise.
5926 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5927 Marcin Kościelnicki <koriakin@0x04.net>
5929 * tracepoint.c (struct tracepoint_action_ops): Remove.
5930 (struct tracepoint_action): Remove ops.
5931 (m_tracepoint_action_download, r_tracepoint_action_download)
5932 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5933 size and offset accordingly.
5934 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5935 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5936 (tracepoint_action_send, tracepoint_action_download): New functions.
5937 Helpers for trace action handlers.
5938 (add_tracepoint_action): Remove setup actions ops.
5939 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5941 2016-02-10 Yao Qi <yao.qi@linaro.org>
5943 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5945 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5947 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5949 * configure: Regenerate.
5951 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5953 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5954 void * to gdb_byte *.
5955 * linux-low.c (siginfo_fixup): Likewise.
5956 (linux_xfer_siginfo): Likewise.
5957 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5959 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5961 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5963 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5965 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5967 * linux-x86-low.c [__x86_64__]: Include
5968 "nat/amd64-linux-siginfo.h".
5969 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5970 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5971 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5972 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5973 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5974 (cpt_si_fd, si_timerid, si_overrun): Move from
5975 nat/amd64-linux-siginfo.c.
5976 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5978 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5980 * server.c (skip_to_semicolon): Remove.
5981 (process_point_options): Use strchrnul instead of
5984 2016-01-26 Yao Qi <yao.qi@linaro.org>
5986 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5987 * linux-low.c (install_software_single_step_breakpoints): Don't
5988 call regcache_read_pc.
5989 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5992 2016-01-26 Yao Qi <yao.qi@linaro.org>
5994 * linux-low.c (install_software_single_step_breakpoints): Call
5995 regcache_read_pc instead of get_pc.
5997 2016-01-26 Yao Qi <yao.qi@linaro.org>
5999 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6000 (unblock_async_io): Rename to ...
6001 (block_unblock_async_io): ... it. New function.
6002 (enable_async_io): Don't install SIGIO handler. Unblock it
6004 (disable_async_io): Don't ignore SIGIO. Block it instead.
6005 (initialize_async_io): Install SIGIO handler. Don't call
6008 2016-01-26 Yao Qi <yao.qi@linaro.org>
6010 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6011 first character is '\003', call *the_target->request_interrupt.
6013 2016-01-25 Yao Qi <yao.qi@linaro.org>
6015 * remote-utils.c (new_thread_notify): Remove.
6016 (dead_thread_notify): Likewise.
6017 * remote-utils.h (new_thread_notify): Remove declaration.
6018 (dead_thread_notify): Likewise.
6020 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6022 * gdb.trace/pending.exp: Fix expected message on continue.
6024 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6026 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6027 it works properly on big-endian machines where sizeof (CORE_ADDR)
6030 2016-01-21 Pedro Alves <palves@redhat.com>
6032 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6033 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6034 * configure: Regenerate.
6036 2016-01-21 Yao Qi <yao.qi@linaro.org>
6038 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6039 is_thumb and set it according to CPSR saved on the stack.
6040 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6041 arm_sigreturn_next_pc.
6043 2016-01-18 Yao Qi <yao.qi@linaro.org>
6045 * linux-low.c (linux_set_pc_64bit): New function.
6046 (linux_get_pc_64bit): New function.
6047 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6049 * linux-sparc-low.c (debug_threads): Remove declaration.
6050 (sparc_get_pc): Remove.
6051 (the_low_target): Use linux_get_pc_64bit instead of
6053 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6054 (the_low_target): Use linux_get_pc_64bit and
6057 2016-01-18 Yao Qi <yao.qi@linaro.org>
6059 * linux-arm-low.c (debug_threads): Remove declaration.
6060 (arm_get_pc, arm_set_pc): Remove.
6061 (the_low_target): Use linux_get_pc_32bit and
6063 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6064 (the_low_target): Use linux_get_pc_32bit and
6066 * linux-cris-low.c (debug_threads): Remove declaration.
6067 (cris_get_pc, cris_set_pc,): Remove.
6068 (the_low_target): Use linux_get_pc_32bit and
6070 * linux-crisv32-low.c (debug_threads): Remove declaration.
6071 (cris_get_pc, cris_set_pc): Remove.
6072 (the_low_target): Use linux_get_pc_32bit and
6074 * linux-low.c: Include inttypes.h.
6075 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6076 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6077 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6078 (the_low_target): Use linux_get_pc_32bit and
6080 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6081 (the_low_target): Use linux_get_pc_32bit and
6083 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6084 (the_low_target): Use linux_get_pc_32bit and
6086 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6087 (the_low_target): Use linux_get_pc_32bit and
6089 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6090 (the_low_target): Use linux_get_pc_32bit and
6093 2016-01-18 Gary Benson <gbenson@redhat.com>
6095 * configure.ac (AC_FUNC_FORK): New check.
6096 * config.in: Regenerate.
6097 * configure: Likewise.
6099 2016-01-14 Yao Qi <yao.qi@linaro.org>
6101 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6102 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6103 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6104 arm_get_next_pcs_ctor.
6106 2016-01-12 Josh Stone <jistone@redhat.com>
6107 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6109 * inferiors.h: Include "gdb_vecs.h".
6110 (struct process_info): Add syscalls_to_catch.
6111 * inferiors.c (remove_process): Free syscalls_to_catch.
6112 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6113 syscall_return stops.
6114 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6115 * server.c (handle_general_set): Handle QCatchSyscalls.
6116 (handle_query): Report support for QCatchSyscalls.
6117 * target.h (struct target_ops): Add supports_catch_syscall.
6118 (target_supports_catch_syscall): New macro.
6119 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6120 (struct lwp_info): Add syscall_state.
6121 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6122 Maintain syscall_state and syscalls_to_catch across exec.
6123 (get_syscall_trapinfo): New function, proxy to the_low_target.
6124 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6125 (linux_low_filter_event): Toggle syscall_state entry/return for
6126 syscall traps, and set it ignored for all others.
6127 (gdb_catching_syscalls_p): New function.
6128 (gdb_catch_this_syscall_p): New function.
6129 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6130 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6131 (linux_supports_catch_syscall): New function.
6132 (linux_target_ops): Install it.
6133 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6134 (the_low_target): Install it.
6136 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6138 * acinclude.m4: Include new ../warning.m4 file.
6139 * configure: Regenerated.
6140 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6142 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6144 * ax.c (is_goto_target): Mark static.
6145 * linux-low.c (register_addr): Likewise.
6146 (linux_fetch_registers, linux_store_registers): Likewise.
6147 * mem-break.c (any_persistent_commands): Fix old prototype.
6148 (add_commands_to_breakpoint): Mark static.
6149 * regcache.c (find_register_by_name): Delete unused func.
6150 * remote-utils.c (hex_or_minus_one): Mark static.
6151 * server.c (monitor_show_help): Mark static.
6152 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6153 handle_v_requests): Likewise.
6155 2016-01-12 Pedro Alves <palves@redhat.com>
6157 Remove use of the registered trademark symbol throughout.
6159 2016-01-08 Yao Qi <yao.qi@linaro.org>
6161 * remote-utils.c (getpkt): If c is '\003', call target hook
6164 2016-01-06 Yao Qi <yao.qi@linaro.org>
6166 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6167 linux-aarch32-low.c.
6168 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6169 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6170 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6171 (thumb2_breakpoint): Declare.
6172 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6173 linux-aarch32-low.h.
6174 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6175 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6176 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6178 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6180 * gdbreplay.c (gdbreplay_version): Change copyright year in
6182 * server.c (gdbserver_version): Likewise.
6184 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6186 * server.c (crc32_table): Delete.
6187 (crc32): Use libiberty's xcrc32 function.
6189 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6191 * lynx-low.c (lynx_delete_thread_callback): New function.
6192 (lynx_mourn): Properly delete our process and all of its
6193 threads. Remove call to clear_inferiors.
6195 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6197 * target.c (thread_search_callback): Add check that
6198 the thread_stopped target callback is not NULL before
6201 2015-12-21 Yao Qi <yao.qi@linaro.org>
6203 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6206 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6208 * server.c (handle_query): Call target_supports_software_single_step.
6210 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6212 * linux-low.c (single_step): New function.
6213 (linux_resume_one_lwp_throw): Call single_step.
6214 (start_step_over): Likewise.
6216 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6218 * Makefile.in (SFILES): Append arch/arm-linux.c,
6219 arch/arm-get-next-pcs.c.
6220 (arm-linux.o): New rule.
6221 (arm-get-next-pcs.o): New rule.
6222 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6224 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6225 to linux-aarch32-low.c.
6226 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6227 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6228 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6229 (thumb2_breakpoint_len): Likewise.
6230 (arm_is_thumb_mode): Make non-static.
6231 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6232 from linux-aarch32-low.c.
6233 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6234 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6235 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6236 (thumb2_breakpoint_len): Likewise.
6237 (arm_is_thumb_mode): New declaration.
6238 * linux-arm-low.c: Include arch/arm-linux.h
6239 aarch/arm-get-next-pcs.h, sys/syscall.h.
6240 (get_next_pcs_ops): New struct.
6241 (get_next_pcs_addr_bits_remove): New function.
6242 (get_next_pcs_is_thumb): New function.
6243 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6244 (arm_sigreturn_next_pc): Likewise.
6245 (get_next_pcs_syscall_next_pc): Likewise.
6246 (arm_gdbserver_get_next_pcs): Likewise.
6247 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6249 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6250 * server.h: Include gdb_vecs.h.
6252 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6254 * Makefile.in (SFILES): Append common/common-regcache.c.
6255 (OBS): Append common-regcache.o.
6256 (common-regcache.o): New rule.
6257 * regcache.c (init_register_cache): Initialize cache to
6259 (regcache_raw_read_unsigned): New function.
6260 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6261 register_status enum.
6263 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6265 * linux-aarch64-low.c (the_low_targets): Rename
6266 breakpoint_reinsert_addr to get_next_pcs.
6267 * linux-arm-low.c (the_low_targets): Likewise.
6268 * linux-bfin-low.c (the_low_targets): Likewise.
6269 * linux-cris-low.c (the_low_targets): Likewise.
6270 * linux-crisv32-low.c (the_low_targets): Likewise.
6271 * linux-low.c (can_software_single_step): Likewise.
6272 (install_software_single_step_breakpoints): New function.
6273 (start_step_over): Use install_software_single_step_breakpoints.
6274 * linux-low.h: New CORE_ADDR vector.
6275 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6277 * linux-mips-low.c (the_low_targets): Likewise.
6278 * linux-nios2-low.c (the_low_targets): Likewise.
6279 * linux-sparc-low.c (the_low_targets): Likewise.
6281 2015-12-17 Pedro Alves <palves@redhat.com>
6283 * linux-low.c (linux_kill_one_lwp): Remove references to
6285 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6287 (linux_init_signals): Delete.
6288 (initialize_low): Adjust.
6289 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6291 2015-12-16 Pedro Alves <palves@redhat.com>
6293 * configure.ac (compiler warning flags): When testing a
6294 -Wno-foo option, check whether -Wfoo works instead.
6295 * configure: Regenerate.
6297 2015-12-11 Don Breazeal <donb@codesourcery.com>
6299 * server.c (process_serial_event): Don't exit from gdbserver
6300 in remote mode if there are still active inferiors.
6302 2015-12-11 Yao Qi <yao.qi@linaro.org>
6304 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6305 arm_breakpoint_at if the process is 32-bit.
6307 2015-12-11 Yao Qi <yao.qi@linaro.org>
6309 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6312 2015-12-07 Yao Qi <yao.qi@linaro.org>
6314 * configure.srv: Append arm.o to srv_tgtobj for
6315 aarch64*-*-linux* target.
6316 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6317 from linux-arm-low.c.
6318 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6319 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6320 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6321 (thumb2_breakpoint_len): Likewise.
6322 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6323 (arm_breakpoint_kinds): Likewise.
6324 (arm_breakpoint_kind_from_pc): Likewise.
6325 (arm_sw_breakpoint_from_kind): Likewise.
6326 (arm_breakpoint_kind_from_current_state): Likewise.
6327 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6328 (arm_sw_breakpoint_from_kind): Declare.
6329 (arm_breakpoint_kind_from_current_state): Declare.
6330 (arm_breakpoint_at): Declare.
6331 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6332 arm_sw_breakpoint_from_kind if process is 32-bit.
6333 (aarch64_breakpoint_kind_from_pc): New function.
6334 (aarch64_breakpoint_kind_from_current_state): New function.
6335 (the_low_target): Initialize fields breakpoint_kind_from_pc
6336 and breakpoint_kind_from_current_state.
6337 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6338 linux-aarch32-low.c.
6339 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6340 (arm_breakpoint, arm_breakpoint_len): Likewise.
6341 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6342 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6343 (arm_is_thumb_mode): Likewise.
6344 (arm_breakpoint_at): Likewise.
6345 (arm_breakpoint_kind_from_pc): Likewise.
6346 (arm_sw_breakpoint_from_kind): Likewise.
6347 (arm_breakpoint_kind_from_current_state): Likewise.
6350 2015-08-04 Yao Qi <yao.qi@linaro.org>
6352 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6353 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6354 * server.c (extended_protocol): Remove "static".
6355 * server.h (extended_protocol): Declare it.
6357 2015-12-04 Josh Stone <jistone@redhat.com>
6359 * target.h (struct target_ops) <arch_setup>: Rename to ...
6360 (struct target_ops) <post_create_inferior>: ... this.
6361 (target_arch_setup): Rename to ...
6362 (target_post_create_inferior): ... this, calling post_create_inferior.
6363 * server.c (start_inferior): Update target_arch_setup calls to
6364 target_post_create_inferior.
6365 * linux-low.c (linux_low_ptrace_options): Forward declare.
6366 (linux_arch_setup): Update its comment for general use.
6367 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6368 (struct linux_target_ops): Use linux_post_create_inferior.
6369 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6370 to post_create_inferior.
6371 * nto-low.c (struct nto_target_ops): Likewise.
6372 * spu-low.c (struct spu_target_ops): Likewise.
6373 * win32-low.c (struct win32_target_ops): Likewise.
6375 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6377 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6379 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6381 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6382 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6383 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6384 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6385 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6386 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6387 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6388 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6389 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6390 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6391 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6392 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6394 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6396 * linux-low.c (linux_look_up_symbols): Don't call
6397 linux_supports_traceclone.
6398 * linux-low.h (thread_db_init): Remove use_events argument.
6399 * thread-db.c (thread_db_use_event): Remove global variable.
6400 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6401 (struct thread_db) <td_create_bp>: Remove field.
6402 (thread_db_create_event): Remove function.
6403 (thread_db_enable_reporting): Likewise.
6404 (find_one_thread): Don't check for thread_db_use_events.
6405 (attach_thread): Likewise.
6406 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6407 (try_thread_db_load_1): Don't check for thread_db_use_events.
6408 (thread_db_init): Remove use_events argument and thread events
6410 (remove_thread_event_breakpoints): Remove function.
6411 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6413 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6415 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6417 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6418 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6420 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6421 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6423 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6425 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6426 * linux-low.c (can_hardware_single_step): Use
6427 supports_hardware_single_step.
6428 (can_software_single_step): New function.
6429 (start_step_over): Call can_software_single_step.
6430 (linux_supports_hardware_single_step): New function.
6431 (struct target_ops) <supports_software_single_step>: Initialize.
6432 * linux-low.h (struct linux_target_ops)
6433 <supports_hardware_single_step>: Initialize.
6434 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6435 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6436 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6437 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6438 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6439 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6440 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6441 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6442 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6443 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6445 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6446 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6448 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6449 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6450 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6452 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6453 * target.h (struct target_ops): <supports_software_single_step>:
6455 (target_supports_software_single_step): New macro.
6457 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6459 * linux-low.c (linux_wait_1): Fix pc advance condition.
6460 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6461 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6463 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6465 * linux-arm-low.c (arm_is_thumb_mode): New function.
6466 (arm_breakpoint_at): Use arm_is_thumb_mode.
6467 (arm_breakpoint_kind_from_current_state): New function.
6468 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6470 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6471 (linux_breakpoint_kind_from_current_state): New function.
6472 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6473 * linux-low.h (struct linux_target_ops)
6474 <breakpoint_kind_from_current_state>: New field.
6475 * target.h (struct target_ops): Likewise.
6476 (target_breakpoint_kind_from_current_state): New macro.
6478 2015-11-30 Pedro Alves <palves@redhat.com>
6480 * linux-low.c (linux_resume): Wake up the event loop before
6483 2015-11-30 Pedro Alves <palves@redhat.com>
6485 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6487 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6489 * target.c (struct thread_search): New structure.
6490 (thread_search_callback): New function.
6491 (prev_general_thread): New global.
6492 (prepare_to_access_memory, done_accessing_memory): New functions.
6493 * target.h (prepare_to_access_memory, done_accessing_memory):
6494 Replace macros with function declarations.
6496 2015-11-30 Pedro Alves <palves@redhat.com>
6499 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6500 report TARGET_WAITKIND_NO_RESUMED.
6501 * remote-utils.c (prepare_resume_reply): Handle
6502 TARGET_WAITKIND_NO_RESUMED.
6503 * server.c (report_no_resumed): New global.
6504 (handle_query) <qSupported>: Handle "no-resumed+". Report
6505 "no-resumed+" support.
6506 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6507 return error if the client doesn't support no-resumed events.
6508 (push_stop_notification): New function.
6509 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6510 events if the client supports them.
6512 2015-11-30 Pedro Alves <palves@redhat.com>
6514 * linux-low.c (thread_still_has_status_pending_p): Don't check
6516 (lwp_resumed): New function.
6517 (status_pending_p_callback): Return early if the LWP is not
6518 supposed to be resumed.
6520 2015-11-30 Pedro Alves <palves@redhat.com>
6522 * linux-low.c (handle_extended_wait): Assert that the LWP's
6523 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6524 thread create events, leave the new child's status pending.
6525 (linux_low_filter_event): If GDB wants to hear about thread exit
6526 events, leave the LWP marked dead and don't delete it.
6527 (linux_wait_for_event_filtered): Don't check for thread exit.
6528 (filter_exit_event): New function.
6529 (linux_wait_1): Use it, when returning an exit event.
6530 (linux_resume_one_lwp_throw): Assert that the LWP's
6531 waitstatus is TARGET_WAITKIND_IGNORE.
6532 * remote-utils.c (prepare_resume_reply): Handle
6533 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6534 * server.c (report_thread_events): New global.
6535 (handle_general_set): Handle QThreadEvents.
6536 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6537 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6538 TARGET_WAITKIND_THREAD_EXITED.
6539 * server.h (report_thread_events): Declare.
6541 2015-11-30 Pedro Alves <palves@redhat.com>
6543 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6544 the thread's last_resume_kind was resume_stop.
6546 2015-11-30 Pedro Alves <palves@redhat.com>
6548 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6551 2015-11-30 Pedro Alves <palves@redhat.com>
6553 * server.c (handle_v_requests): Handle vCtrlC.
6555 2015-11-30 Pedro Alves <palves@redhat.com>
6557 * gdbthread.h (find_any_thread_of_pid): Declare.
6558 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6560 * server.c (handle_query): If current_thread is NULL, look for
6561 another thread of the selected process.
6563 2015-11-26 Daniel Colascione <dancol@dancol.org>
6564 Simon Marchi <simon.marchi@ericsson.com>
6566 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6567 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6569 * target.h (struct target_ops) <thread_name>: New field.
6570 (target_thread_name): New macro.
6572 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6574 * regcache.h (regcache_invalidate_pid): Add declaration.
6575 * regcache.c (regcache_invalidate_pid): New function, extracted
6576 from regcache_invalidate.
6577 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6578 Add trivial documentation comment.
6579 * lynx-low.c: Use regcache_invalidate_pid instead of
6580 regcache_invalidate.
6582 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6584 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6585 and Elf64_auxv_t if the target is Android.
6587 2015-11-22 Doug Evans <xdje42@gmail.com>
6589 * target.h: #include <sys/types.h>.
6591 2015-11-19 Pedro Alves <palves@redhat.com>
6593 * linux-low.c (linux_process_qsupported): Change prototype.
6595 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6597 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6598 and adjust to loop over all features.
6599 * server.c (handle_query) <qSupported>: Adjust to call
6600 target_process_qsupported once, passing it a vector of unprocessed
6602 * target.h (struct target_ops) <process_qsupported>: Change
6604 (target_process_qsupported): Adjust.
6606 2015-11-19 Pedro Alves <palves@redhat.com>
6608 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6610 * configure: Regenerate.
6612 2015-11-19 Pedro Alves <palves@redhat.com>
6614 * configure: Regenerate.
6616 2015-11-19 Yao Qi <yao.qi@linaro.org>
6618 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6621 2015-11-19 Yao Qi <yao.qi@linaro.org>
6623 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6624 (struct aarch64_operand): Move enum out.
6626 2015-11-19 Yao Qi <yao.qi@linaro.org>
6628 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6629 struct user_fpsimd_state *.
6630 (aarch64_store_fpregset): Likewise.
6632 2015-11-19 Yao Qi <yao.qi@linaro.org>
6634 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6635 struct user_pt_regs *.
6636 (aarch64_store_gregset): Likewise.
6638 2015-11-18 Pedro Alves <palves@redhat.com>
6640 * Makefile.in (all_object_files): Add $IPA_OBJS.
6642 2015-11-17 Pedro Alves <palves@redhat.com>
6644 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6645 GDB_SIGNAL_0 and gdb_signal_to_string.
6647 2015-11-17 Pedro Alves <palves@redhat.com>
6649 * win32-low.c (handle_output_debug_string): Remove parameter.
6650 (win32_kill): Remove our_status local and adjust call to
6651 handle_output_debug_string.
6652 (get_child_debug_event): Adjust call to
6653 handle_output_debug_string.
6655 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6657 * linux-mips-low.c (mips_fill_gregset): Add cast.
6658 (mips_store_gregset): Likewise.
6659 (mips_fill_fpregset): Likewise.
6660 (mips_store_fpregset): Likewise.
6662 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6664 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6667 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6669 * linux-mips-low.c (mips_linux_new_thread): Change type of
6670 watch_type to enum target_hw_bp_type.
6672 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6674 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6675 Change return type to arm_hwbp_type.
6677 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6679 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6680 (arm_store_gregset): Likewise.
6681 * linux-arm-low.c (arm_get_hwcap): Likewise.
6682 (arm_read_description): Likewise.
6684 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6686 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6688 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6690 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6691 (ppc_fill_vsxregset): Likewise.
6692 (ppc_store_vsxregset): Likewise.
6693 (ppc_fill_vrregset): Likewise.
6694 (ppc_store_vrregset): Likewise.
6695 (ppc_fill_evrregset): Likewise.
6696 (ppc_store_evrregset): Likewise.
6698 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6700 * linux-ppc-low.c (ppc_usrregs_info): Remove
6701 forward-declaration.
6702 (ppc_arch_setup): Move lower in file.
6704 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6706 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6707 (ps_pdwrite): Likewise.
6709 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6711 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6712 to after assert checks.
6714 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6716 * proc-service.c (ps_pdread): Add/adjust casts.
6717 (ps_pdwrite): Add/adjust casts.
6719 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6721 * server.c (handle_search_memory_1): Cast return value of
6724 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6726 * server.c (write_qxfer_response): Change type of data to
6729 2015-10-29 Pedro Alves <palves@redhat.com>
6731 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6733 2015-10-29 Pedro Alves <palves@redhat.com>
6735 * tracepoint.c (clear_installed_tracepoints): Add casts.
6737 2015-10-29 Pedro Alves <palves@redhat.com>
6739 * server.c (handle_v_cont, process_serial_event): Add enum
6740 gdb_signal casts to signal parsing code.
6742 2015-10-29 Pedro Alves <palves@redhat.com>
6744 * linux-low.h (NULL_REGSET): Define.
6745 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6746 * linux-arm-low.c (arm_regsets): Likewise.
6747 * linux-crisv32-low.c (cris_regsets): Likewise.
6748 * linux-m68k-low.c (m68k_regsets): Likewise.
6749 * linux-mips-low.c (mips_regsets): Likewise.
6750 * linux-nios2-low.c (nios2_regsets): Likewise.
6751 * linux-ppc-low.c (ppc_regsets): Likewise.
6752 * linux-s390-low.c (s390_regsets): Likewise.
6753 * linux-sh-low.c (sh_regsets): Likewise.
6754 * linux-sparc-low.c (sparc_regsets): Likewise.
6755 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6756 * linux-tile-low.c (tile_regsets): Likewise.
6757 * linux-x86-low.c (x86_regsets): Likewise.
6758 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6760 2015-10-29 Pedro Alves <palves@redhat.com>
6762 * linux-low.h (NULL_REGSET): Define.
6763 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6764 * linux-arm-low.c (arm_regsets): Likewise.
6765 * linux-crisv32-low.c (cris_regsets): Likewise.
6766 * linux-m68k-low.c (m68k_regsets): Likewise.
6767 * linux-mips-low.c (mips_regsets): Likewise.
6768 * linux-nios2-low.c (nios2_regsets): Likewise.
6769 * linux-ppc-low.c (ppc_regsets): Likewise.
6770 * linux-s390-low.c (s390_regsets): Likewise.
6771 * linux-sh-low.c (sh_regsets): Likewise.
6772 * linux-sparc-low.c (sparc_regsets): Likewise.
6773 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6774 * linux-tile-low.c (tile_regsets): Likewise.
6775 * linux-x86-low.c (x86_regsets): Likewise.
6776 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6778 2015-10-26 Doug Evans <dje@google.com>
6780 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6782 2015-10-26 Doug Evans <dje@google.com>
6784 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6786 2015-10-26 Doug Evans <dje@google.com>
6788 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6790 (attach_thread, find_new_threads_callback): Ditto.
6792 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6794 * mem-break.h (set_breakpoint_data): Remove.
6796 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6798 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6799 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6800 (initialize_low): Remove set_breakpoint_data call.
6801 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6802 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6803 (initialize_low): Remove set_breakpoint_data call.
6804 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6805 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6806 (initialize_low): Remove set_breakpoint_data call.
6808 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6810 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6811 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6812 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6813 * target.h (target_breakpoint_kind_from_pc): New macro.
6815 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6817 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6818 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6819 the default breakpoint kind.
6821 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6823 * linux-arm-low.c (arm_supports_z_point_type): Add software
6826 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6828 * linux-arm-low.c: Refactor breakpoint definitions.
6829 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6830 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6832 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6834 * Makefile.in: Add arm.c/o.
6835 * configure.srv: Likewise.
6836 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6837 (arm_breakpoint_kind_from_pc): New function.
6838 (arm_sw_breakpoint_from_kind): Return proper kind.
6839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6841 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6843 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6845 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6846 (struct raw_breakpoint) <size>: Remove.
6847 (struct raw_breakpoint) <kind>: Add.
6848 (bp_size): New function.
6849 (bp_opcode): Likewise.
6850 (find_raw_breakpoint_at): Adjust for kind.
6851 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6852 (remove_memory_breakpoint): Adjust for kind call bp_size.
6853 (set_raw_breakpoint_at): Adjust for kind.
6854 (set_breakpoint): Likewise.
6855 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6856 (delete_raw_breakpoint): Adjust for kind.
6857 (delete_breakpoint): Likewise.
6858 (find_gdb_breakpoint): Likewise.
6859 (set_gdb_breakpoint_1): Likewise.
6860 (set_gdb_breakpoint): Likewise.
6861 (delete_gdb_breakpoint_1): Likewise.
6862 (delete_gdb_breakpoint): Likewise.
6863 (uninsert_raw_breakpoint): Likewise.
6864 (reinsert_raw_breakpoint): Likewise.
6865 (set_breakpoint_data): Remove.
6866 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6867 (check_mem_read): Adjust for kind call bp_size.
6868 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6869 (clone_one_breakpoint): Adjust for kind.
6870 * mem-break.h (set_gdb_breakpoint): Likewise.
6871 (delete_gdb_breakpoint): Likewise.
6872 * server.c (process_serial_event): Likewise.
6874 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6876 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6877 (struct linux_target_ops) <breakpoint>: Remove.
6878 (struct linux_target_ops) <breakpoint_len>: Remove.
6879 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6880 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6881 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6882 (arm_sw_breakpoint_from_kind): New function.
6883 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6884 (struct linux_target_ops) <breakpoint>: Remove.
6885 (struct linux_target_ops) <breakpoint_len>: Remove.
6886 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6888 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6889 (struct linux_target_ops) <breakpoint>: Remove.
6890 (struct linux_target_ops) <breakpoint_len>: Remove.
6891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6893 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6894 (struct linux_target_ops) <breakpoint>: Remove.
6895 (struct linux_target_ops) <breakpoint_len>: Remove.
6896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6898 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6899 and sw_breakpoint_from_kind to increment the pc.
6900 (linux_breakpoint_kind_from_pc): New function.
6901 (linux_sw_breakpoint_from_kind): New function.
6902 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6903 (initialize_low): Call breakpoint_kind_from_pc and
6904 sw_breakpoint_from_kind to replace breakpoint_data/len.
6905 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6908 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6909 (struct linux_target_ops) <breakpoint>: Remove.
6910 (struct linux_target_ops) <breakpoint_len>: Remove.
6911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6913 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6914 (struct linux_target_ops) <breakpoint>: Remove.
6915 (struct linux_target_ops) <breakpoint_len>: Remove.
6916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6918 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6919 (struct linux_target_ops) <breakpoint>: Remove.
6920 (struct linux_target_ops) <breakpoint_len>: Remove.
6921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6923 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6924 (struct linux_target_ops) <breakpoint>: Remove.
6925 (struct linux_target_ops) <breakpoint_len>: Remove.
6926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6928 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6929 (struct linux_target_ops) <breakpoint>: Remove.
6930 (struct linux_target_ops) <breakpoint_len>: Remove.
6931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6933 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6934 (struct linux_target_ops) <breakpoint>: Remove.
6935 (struct linux_target_ops) <breakpoint_len>: Remove.
6936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6938 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6939 (struct linux_target_ops) <breakpoint>: Remove.
6940 (struct linux_target_ops) <breakpoint_len>: Remove.
6941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6943 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6944 (struct linux_target_ops) <breakpoint>: Remove.
6945 (struct linux_target_ops) <breakpoint_len>: Remove.
6946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6948 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6949 (struct linux_target_ops) <breakpoint>: Remove.
6950 (struct linux_target_ops) <breakpoint_len>: Remove.
6951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6953 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6954 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6955 (struct linux_target_ops) <breakpoint>: Remove.
6956 (struct linux_target_ops) <breakpoint_len>: Remove.
6957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6959 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6960 (struct linux_target_ops) <breakpoint>: Remove.
6961 (struct linux_target_ops) <breakpoint_len>: Remove.
6962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6965 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6967 * linux-cris-low.c (cris_get_pc): Remove void arg.
6969 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6971 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6974 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6976 * inferiors.c (thread_pid_matches_callback): New function.
6977 (find_thread_process): New function.
6978 (remove_thread): Reset current_thread.
6979 (remove_process): Assert threads have been removed first.
6981 2015-10-15 Yao Qi <yao.qi@linaro.org>
6983 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6985 (aarch64_remove_point): Likewise.
6986 * regcache.c (regcache_register_size): New function.
6988 2015-10-12 Yao Qi <yao.qi@linaro.org>
6990 * linux-aarch64-low.c: Update all callers as emit_load_store
6991 is renamed to aarch64_emit_load_store.
6993 2015-10-12 Yao Qi <yao.qi@linaro.org>
6995 * linux-aarch64-low.c: Update all callers of function renaming
6996 from emit_insn to aarch64_emit_insn.
6998 2015-10-12 Yao Qi <yao.qi@linaro.org>
7000 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7001 arch/aarch64-insn.h.
7002 (struct aarch64_memory_operand): Likewise.
7004 (emit_insn): Move to arch/aarch64-insn.c.
7005 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7006 (emit_load_store): Move to arch/aarch64-insn.c.
7007 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7008 (can_encode_int32): Remove.
7010 2015-10-12 Yao Qi <yao.qi@linaro.org>
7012 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7013 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7014 (aarch64_relocate_instruction): Likewise.
7015 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7016 (struct aarch64_insn_visitor): Likewise.
7018 2015-10-12 Yao Qi <yao.qi@linaro.org>
7020 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7021 (struct aarch64_insn_visitor): New.
7022 (struct aarch64_insn_relocation_data): New.
7023 (aarch64_ftrace_insn_reloc_b): New function.
7024 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7025 (aarch64_ftrace_insn_reloc_cb): Likewise.
7026 (aarch64_ftrace_insn_reloc_tb): Likewise.
7027 (aarch64_ftrace_insn_reloc_adr): Likewise.
7028 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7029 (aarch64_ftrace_insn_reloc_others): Likewise.
7031 (aarch64_relocate_instruction): Use visitor.
7033 2015-10-12 Yao Qi <yao.qi@linaro.org>
7035 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7036 int. Add argument buf.
7037 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7038 aarch64_relocate_instruction.
7040 2015-10-12 Yao Qi <yao.qi@linaro.org>
7042 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7043 argument insn. Remove local variable insn. Don't call
7045 (aarch64_install_fast_tracepoint_jump_pad): Call
7048 2015-09-30 Yao Qi <yao.qi@linaro.org>
7050 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7051 (emit_load_store_pair): Likewise.
7053 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7055 * dll.c (match_dll): Add cast(s).
7056 (unloaded_dll): Likewise.
7057 * linux-low.c (second_thread_of_pid_p): Likewise.
7058 (delete_lwp_callback): Likewise.
7059 (count_events_callback): Likewise.
7060 (select_event_lwp_callback): Likewise.
7061 (linux_set_resume_request): Likewise.
7062 * server.c (accumulate_file_name_length): Likewise.
7063 (emit_dll_description): Likewise.
7064 (handle_qxfer_threads_worker): Likewise.
7065 (visit_actioned_threads): Likewise.
7066 * thread-db.c (any_thread_of): Likewise.
7067 * tracepoint.c (same_process_p): Likewise.
7068 (match_blocktype): Likewise.
7069 (build_traceframe_info_xml): Likewise.
7071 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7073 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7075 (gdb_unparse_agent_expr): Likewise.
7076 * hostio.c (require_data): Likewise.
7077 (handle_pread): Likewise.
7078 * linux-low.c (disable_regset): Likewise.
7079 (fetch_register): Likewise.
7080 (store_register): Likewise.
7081 (get_dynamic): Likewise.
7082 (linux_qxfer_libraries_svr4): Likewise.
7083 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7084 (set_fast_tracepoint_jump): Likewise.
7085 (uninsert_fast_tracepoint_jumps_at): Likewise.
7086 (reinsert_fast_tracepoint_jumps_at): Likewise.
7087 (validate_inserted_breakpoint): Likewise.
7088 (clone_agent_expr): Likewise.
7089 * regcache.c (init_register_cache): Likewise.
7090 * remote-utils.c (putpkt_binary_1): Likewise.
7091 (decode_M_packet): Likewise.
7092 (decode_X_packet): Likewise.
7093 (look_up_one_symbol): Likewise.
7094 (relocate_instruction): Likewise.
7095 (monitor_output): Likewise.
7096 * server.c (handle_search_memory): Likewise.
7097 (handle_qxfer_exec_file): Likewise.
7098 (handle_qxfer_libraries): Likewise.
7099 (handle_qxfer): Likewise.
7100 (handle_query): Likewise.
7101 (handle_v_cont): Likewise.
7102 (handle_v_run): Likewise.
7103 (captured_main): Likewise.
7104 * target.c (write_inferior_memory): Likewise.
7105 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7106 * tracepoint.c (init_trace_buffer): Likewise.
7107 (add_tracepoint_action): Likewise.
7108 (add_traceframe): Likewise.
7109 (add_traceframe_block): Likewise.
7110 (cmd_qtdpsrc): Likewise.
7111 (cmd_qtdv): Likewise.
7112 (cmd_qtstatus): Likewise.
7113 (response_source): Likewise.
7114 (response_tsv): Likewise.
7115 (cmd_qtnotes): Likewise.
7116 (gdb_collect): Likewise.
7117 (initialize_tracepoint): Likewise.
7119 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7121 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7122 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7123 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7125 (enum aarch64_condition_codes): New enum.
7126 (w0): New static global.
7129 (struct aarch64_memory_operand) <type>: New
7130 MEMORY_OPERAND_POSTINDEX type.
7131 (postindex_memory_operand): New helper function.
7132 (emit_ret): New function.
7133 (emit_load_store_pair): New function, factored out of emit_stp
7134 with support for MEMORY_OPERAND_POSTINDEX.
7135 (emit_stp): Rewrite using emit_load_store_pair.
7136 (emit_ldp): New function.
7137 (emit_load_store): Likewise.
7138 (emit_ldr): Mention post-index instruction in comment.
7139 (emit_ldrh): New function.
7140 (emit_ldrb): New function.
7141 (emit_ldrsw): Mention post-index instruction in comment.
7142 (emit_str): Likewise.
7143 (emit_subs): New function.
7144 (emit_cmp): Likewise.
7145 (emit_and): Likewise.
7146 (emit_orr): Likewise.
7147 (emit_orn): Likewise.
7148 (emit_eor): Likewise.
7149 (emit_mvn): Likewise.
7150 (emit_lslv): Likewise.
7151 (emit_lsrv): Likewise.
7152 (emit_asrv): Likewise.
7153 (emit_mul): Likewise.
7154 (emit_sbfm): Likewise.
7155 (emit_sbfx): Likewise.
7156 (emit_ubfm): Likewise.
7157 (emit_ubfx): Likewise.
7158 (emit_csinc): Likewise.
7159 (emit_cset): Likewise.
7160 (emit_nop): Likewise.
7161 (emit_ops_insns): New helper function.
7162 (emit_pop): Likewise.
7163 (emit_push): Likewise.
7164 (aarch64_emit_prologue): New function.
7165 (aarch64_emit_epilogue): Likewise.
7166 (aarch64_emit_add): Likewise.
7167 (aarch64_emit_sub): Likewise.
7168 (aarch64_emit_mul): Likewise.
7169 (aarch64_emit_lsh): Likewise.
7170 (aarch64_emit_rsh_signed): Likewise.
7171 (aarch64_emit_rsh_unsigned): Likewise.
7172 (aarch64_emit_ext): Likewise.
7173 (aarch64_emit_log_not): Likewise.
7174 (aarch64_emit_bit_and): Likewise.
7175 (aarch64_emit_bit_or): Likewise.
7176 (aarch64_emit_bit_xor): Likewise.
7177 (aarch64_emit_bit_not): Likewise.
7178 (aarch64_emit_equal): Likewise.
7179 (aarch64_emit_less_signed): Likewise.
7180 (aarch64_emit_less_unsigned): Likewise.
7181 (aarch64_emit_ref): Likewise.
7182 (aarch64_emit_if_goto): Likewise.
7183 (aarch64_emit_goto): Likewise.
7184 (aarch64_write_goto_address): Likewise.
7185 (aarch64_emit_const): Likewise.
7186 (aarch64_emit_call): Likewise.
7187 (aarch64_emit_reg): Likewise.
7188 (aarch64_emit_pop): Likewise.
7189 (aarch64_emit_stack_flush): Likewise.
7190 (aarch64_emit_zero_ext): Likewise.
7191 (aarch64_emit_swap): Likewise.
7192 (aarch64_emit_stack_adjust): Likewise.
7193 (aarch64_emit_int_call_1): Likewise.
7194 (aarch64_emit_void_call_2): Likewise.
7195 (aarch64_emit_eq_goto): Likewise.
7196 (aarch64_emit_ne_goto): Likewise.
7197 (aarch64_emit_lt_goto): Likewise.
7198 (aarch64_emit_le_goto): Likewise.
7199 (aarch64_emit_gt_goto): Likewise.
7200 (aarch64_emit_ge_got): Likewise.
7201 (aarch64_emit_ops_impl): New static global variable.
7202 (aarch64_emit_ops): New target function, return
7203 &aarch64_emit_ops_impl.
7204 (struct linux_target_ops): Install it.
7206 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7208 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7209 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7211 * linux-aarch64-ipa.c: New file.
7212 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7214 (aarch64_get_thread_area): New target method.
7215 (extract_signed_bitfield): New helper function.
7216 (aarch64_decode_ldr_literal): New function.
7217 (enum aarch64_opcodes): New enum.
7218 (struct aarch64_register): New struct.
7219 (struct aarch64_operand): New struct.
7220 (x0): New static global.
7229 (aarch64_register): New helper function.
7230 (register_operand): Likewise.
7231 (immediate_operand): Likewise.
7232 (struct aarch64_memory_operand): New struct.
7233 (offset_memory_operand): New helper function.
7234 (preindex_memory_operand): Likewise.
7235 (enum aarch64_system_control_registers): New enum.
7236 (ENCODE): New macro.
7237 (emit_insn): New helper function.
7238 (emit_b): New function.
7239 (emit_bcond): Likewise.
7240 (emit_cb): Likewise.
7241 (emit_tb): Likewise.
7242 (emit_blr): Likewise.
7243 (emit_stp): Likewise.
7244 (emit_ldp_q_offset): Likewise.
7245 (emit_stp_q_offset): Likewise.
7246 (emit_load_store): Likewise.
7247 (emit_ldr): Likewise.
7248 (emit_ldrsw): Likewise.
7249 (emit_str): Likewise.
7250 (emit_ldaxr): Likewise.
7251 (emit_stxr): Likewise.
7252 (emit_stlr): Likewise.
7253 (emit_data_processing_reg): Likewise.
7254 (emit_data_processing): Likewise.
7255 (emit_add): Likewise.
7256 (emit_sub): Likewise.
7257 (emit_mov): Likewise.
7258 (emit_movk): Likewise.
7259 (emit_mov_addr): Likewise.
7260 (emit_mrs): Likewise.
7261 (emit_msr): Likewise.
7262 (emit_sevl): Likewise.
7263 (emit_wfe): Likewise.
7264 (append_insns): Likewise.
7265 (can_encode_int32_in): New helper function.
7266 (aarch64_relocate_instruction): New function.
7267 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7268 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7269 (struct linux_target_ops): Install aarch64_get_thread_area,
7270 aarch64_install_fast_tracepoint_jump_pad and
7271 aarch64_get_min_fast_tracepoint_insn_len.
7273 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7275 * Makefile.in (aarch64-insn.o): New rule.
7276 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7278 2015-09-21 Yao Qi <yao.qi@linaro.org>
7280 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7282 2015-09-21 Yao Qi <yao.qi@linaro.org>
7284 * tracepoint.c (max_jump_pad_size): Remove.
7286 2015-09-18 Yao Qi <yao.qi@linaro.org>
7288 * linux-aarch64-low.c: Don't include sys/uio.h.
7289 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7291 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7293 * tracepoint.c (eval_result_type): Change prototype.
7294 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7296 2015-09-15 Pedro Alves <palves@redhat.com>
7298 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7299 Check whether to report exec events instead of checking whether
7300 multiprocess is enabled.
7302 2015-09-15 Pedro Alves <palves@redhat.com>
7305 * remote-utils.c (prepare_resume_reply): Merge
7306 TARGET_WAITKIND_VFORK_DONE switch case with the
7307 TARGET_WAITKIND_FORKED case.
7309 2015-09-15 Yao Qi <yao.qi@linaro.org>
7311 * server.c (handle_query): Check string comparison using
7312 "else if" instead of "if".
7314 2015-09-15 Yao Qi <yao.qi@linaro.org>
7316 * server.c (vCont_supported): New global variable.
7317 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7318 matches. Append ";vContSupported+" to own_buf.
7319 (handle_v_requests): Append ";s;S" to own_buf if target supports
7320 hardware single step or vCont_supported is false.
7321 (capture_main): Set vCont_supported to zero.
7323 2015-09-15 Yao Qi <yao.qi@linaro.org>
7325 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7327 (linux_supports_hardware_single_step): ... New function.
7328 (linux_target_ops): Update.
7329 * lynx-low.c (lynx_target_ops): Set field
7330 supports_hardware_single_step to target_can_do_hardware_single_step.
7331 * nto-low.c (nto_target_ops): Likewise.
7332 * spu-low.c (spu_target_ops): Likewise.
7333 * win32-low.c (win32_target_ops): Likewise.
7334 * target.c (target_can_do_hardware_single_step): New function.
7335 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7336 Remove. <supports_hardware_single_step>: New field.
7337 (target_supports_conditional_breakpoints): Remove.
7338 (target_supports_hardware_single_step): New macro.
7339 (target_can_do_hardware_single_step): Declare.
7340 * server.c (handle_query): Use target_supports_hardware_single_step
7341 instead of target_supports_conditional_breakpoints.
7343 2015-09-15 Yao Qi <yao.qi@linaro.org>
7345 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7347 (struct linux_target_ops the_low_target): Install
7348 aarch64_linux_siginfo_fixup.
7350 2015-09-11 Don Breazeal <donb@codesourcery.com>
7351 Luis Machado <lgustavo@codesourcery.com>
7353 * linux-low.c (linux_mourn): Static declaration.
7354 (linux_arch_setup): Move in front of
7355 handle_extended_wait.
7356 (linux_arch_setup_thread): New function.
7357 (handle_extended_wait): Handle exec events. Call
7358 linux_arch_setup_thread. Make event_lwp argument a
7359 pointer-to-a-pointer.
7360 (check_zombie_leaders): Do not check stopped threads.
7361 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7362 (linux_low_filter_event): Add lwp and thread for exec'ing
7363 non-leader thread if leader thread has been deleted.
7364 Refactor code into linux_arch_setup_thread and call it.
7365 Pass child lwp pointer by reference to handle_extended_wait.
7366 (linux_wait_for_event_filtered): Update comment.
7367 (linux_wait_1): Prevent clobbering exec event status.
7368 (linux_supports_exec_events): New function.
7369 (linux_target_ops) <supports_exec_events>: Initialize new member.
7370 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7372 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7373 * server.c (report_exec_events): New global variable.
7374 (handle_query): Handle qSupported query for exec-events feature.
7375 (captured_main): Initialize report_exec_events.
7376 * server.h (report_exec_events): Declare new global variable.
7377 * target.h (struct target_ops) <supports_exec_events>: New
7379 (target_supports_exec_events): New macro.
7380 * win32-low.c (win32_target_ops) <supports_exec_events>:
7381 Initialize new member.
7383 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7385 * linux-low.c (linux_low_enable_btrace): Remove.
7386 (linux_target_ops): Replace linux_low_enable_btrace with
7387 linux_enable_btrace.
7389 2015-09-03 Yao Qi <yao.qi@linaro.org>
7391 * linux-aarch64-low.c (aarch64_insert_point): Call
7392 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7395 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7397 * linux-low.c (check_stopped_by_breakpoint): Use
7398 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7400 2015-08-27 Pedro Alves <palves@redhat.com>
7402 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7404 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7406 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7407 the XNEW-family equivalent.
7408 (compile_bytecodes): Likewise.
7409 * dll.c (loaded_dll): Likewise.
7410 * event-loop.c (append_callback_event): Likewise.
7411 (create_file_handler): Likewise.
7412 (create_file_event): Likewise.
7413 * hostio.c (handle_open): Likewise.
7414 * inferiors.c (add_thread): Likewise.
7415 (add_process): Likewise.
7416 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7417 * linux-arm-low.c (arm_new_process): Likewise.
7418 (arm_new_thread): Likewise.
7419 * linux-low.c (add_to_pid_list): Likewise.
7420 (linux_add_process): Likewise.
7421 (handle_extended_wait): Likewise.
7422 (add_lwp): Likewise.
7423 (enqueue_one_deferred_signal): Likewise.
7424 (enqueue_pending_signal): Likewise.
7425 (linux_resume_one_lwp_throw): Likewise.
7426 (linux_resume_one_thread): Likewise.
7427 (linux_read_memory): Likewise.
7428 (linux_write_memory): Likewise.
7429 * linux-mips-low.c (mips_linux_new_process): Likewise.
7430 (mips_linux_new_thread): Likewise.
7431 (mips_add_watchpoint): Likewise.
7432 * linux-x86-low.c (initialize_low_arch): Likewise.
7433 * lynx-low.c (lynx_add_process): Likewise.
7434 * mem-break.c (set_raw_breakpoint_at): Likewise.
7435 (set_breakpoint): Likewise.
7436 (add_condition_to_breakpoint): Likewise.
7437 (add_commands_to_breakpoint): Likewise.
7438 (clone_agent_expr): Likewise.
7439 (clone_one_breakpoint): Likewise.
7440 * regcache.c (new_register_cache): Likewise.
7441 * remote-utils.c (look_up_one_symbol): Likewise.
7442 * server.c (queue_stop_reply): Likewise.
7443 (start_inferior): Likewise.
7444 (queue_stop_reply_callback): Likewise.
7445 (handle_target_event): Likewise.
7446 * spu-low.c (fetch_ppc_memory): Likewise.
7447 (store_ppc_memory): Likewise.
7448 * target.c (set_target_ops): Likewise.
7449 * thread-db.c (thread_db_load_search): Likewise.
7450 (try_thread_db_load_1): Likewise.
7451 * tracepoint.c (add_tracepoint): Likewise.
7452 (add_tracepoint_action): Likewise.
7453 (create_trace_state_variable): Likewise.
7454 (cmd_qtdpsrc): Likewise.
7455 (cmd_qtro): Likewise.
7456 (add_while_stepping_state): Likewise.
7457 * win32-low.c (child_add_thread): Likewise.
7458 (get_image_name): Likewise.
7460 2015-08-25 Yao Qi <yao.qi@linaro.org>
7462 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7464 2015-08-25 Yao Qi <yao.qi@linaro.org>
7466 * Makefile.in (aarch64-linux.o): New rule.
7467 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7469 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7470 (aarch64_init_debug_reg_state): Make it extern.
7471 (aarch64_linux_prepare_to_resume): Remove.
7473 2015-08-25 Yao Qi <yao.qi@linaro.org>
7475 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7476 lwp_arch_private_info and ptid_of_lwp.
7478 2015-08-25 Yao Qi <yao.qi@linaro.org>
7480 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7481 Find proc_info by find_process_pid. All callers updated.
7483 2015-08-25 Yao Qi <yao.qi@linaro.org>
7485 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7487 (debug_reg_change_callback): Remove.
7488 (aarch64_notify_debug_reg_change): Remove.
7490 2015-08-25 Yao Qi <yao.qi@linaro.org>
7492 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7493 Call current_lwp_ptid.
7495 2015-08-25 Yao Qi <yao.qi@linaro.org>
7497 * linux-aarch64-low.c (debug_reg_change_callback): Use
7500 2015-08-25 Yao Qi <yao.qi@linaro.org>
7502 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7504 2015-08-25 Yao Qi <yao.qi@linaro.org>
7506 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7508 2015-08-25 Yao Qi <yao.qi@linaro.org>
7510 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7513 2015-08-25 Yao Qi <yao.qi@linaro.org>
7515 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7517 (debug_reg_change_callback): Remove argument entry and add argument
7518 lwp. Remove local variable thread. Don't print thread id in the
7519 debugging output. Don't check whether pid of thread equals to pid.
7520 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7521 iterate_over_lwps instead find_inferior.
7523 2015-08-24 Pedro Alves <palves@redhat.com>
7525 * inferiors.c (get_first_process): New function.
7526 * inferiors.h (get_first_process): New declaration.
7527 * remote-utils.c (read_ptid): Default to the first process in the
7528 list, instead of to the current thread's process.
7530 2015-08-24 Pedro Alves <palves@redhat.com>
7532 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7533 * event-loop.c: Likewise.
7534 * remote-utils.c: Likewise.
7535 * tracepoint.c: Likewise.
7537 2015-08-24 Pedro Alves <palves@redhat.com>
7539 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7542 2015-08-21 Pedro Alves <palves@redhat.com>
7544 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7545 instead of literal 1.
7547 2015-08-21 Pedro Alves <palves@redhat.com>
7549 * tdesc.c (default_description): Explicitly zero-initialize.
7551 2015-08-21 Pedro Alves <palves@redhat.com>
7554 * inferiors.c (remove_thread): Discard any pending stop reply for
7556 * server.c (remove_all_on_match_pid): Rename to ...
7557 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7559 (discard_queued_stop_replies): Change parameter to a ptid. Now
7561 (handle_v_kill, kill_inferior_callback, captured_main)
7562 (process_serial_event): Adjust.
7563 * server.h (discard_queued_stop_replies): Declare.
7565 2015-08-21 Pedro Alves <palves@redhat.com>
7567 * linux-low.c (wait_for_sigstop): Always switch to no thread
7568 selected if the previously current thread dies.
7569 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7570 process instead of the current thread's.
7571 * remote-utils.c (input_interrupt): Don't check if there's no
7573 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7574 current thread to the general thread fails, error out.
7575 (handle_qxfer_auxv, handle_qxfer_libraries)
7576 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7577 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7578 (handle_query): Check if there's a thread selected instead of
7579 checking whether there's any thread in the thread list.
7580 (handle_qxfer_threads, handle_qxfer_btrace)
7581 (handle_qxfer_btrace_conf): Don't error out early if there's no
7582 thread in the thread list.
7583 (handle_v_cont, myresume): Don't set the current thread to the
7585 (process_serial_event) <Hg handling>: Also set thread_id if the
7586 previous general thread is still alive.
7587 (process_serial_event) <g/G handling>: If setting the current
7588 thread to the general thread fails, error out.
7589 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7590 thread's lwp instead of the current thread's.
7591 * target.c (set_desired_thread): If the desired thread was not
7592 found, leave the current thread pointing to NULL. Return an int
7593 (boolean) indicating success.
7594 * target.h (set_desired_thread): Change return type to int.
7596 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7598 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7599 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7601 (ps_get_thread_area): New function.
7603 2015-08-19 Gary Benson <gbenson@redhat.com>
7605 * hostio.c (handle_pread): Do not attempt to read more data
7606 than hostio_reply_with_data can fit in a packet.
7608 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7610 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7612 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7614 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7616 2015-08-06 Pedro Alves <palves@redhat.com>
7618 * tracepoint.c (expr_eval_result): Now an int.
7620 2015-08-06 Pedro Alves <palves@redhat.com>
7622 * gdbthread.h (struct regcache): Forward declare.
7623 (struct thread_info) <regcache_data>: Now a struct regcache
7625 * inferiors.c (inferior_regcache_data)
7626 (set_inferior_regcache_data): Now work with struct regcache
7628 * inferiors.h (struct regcache): Forward declare.
7629 (inferior_regcache_data, set_inferior_regcache_data): Now work
7630 with struct regcache pointers.
7631 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7632 (free_register_cache_thread): Remove struct regcache pointer
7635 2015-08-06 Pedro Alves <palves@redhat.com>
7637 * server.c (captured_main): On error, print the exception message
7638 to stderr, and if run_once is set, throw a quit.
7640 2015-08-06 Pedro Alves <palves@redhat.com>
7642 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7645 2015-08-06 Pedro Alves <palves@redhat.com>
7647 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7648 reading beyond the passed in buffer length.
7650 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7652 * tracepoint.c (symbol_list) <required>: Remove.
7654 2015-08-06 Pedro Alves <palves@redhat.com>
7656 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7657 count if stopping and suspending threads.
7658 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7659 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7660 (linux_detach): Complete an ongoing step-over.
7661 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7663 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7664 (linux_wait_1): If passing a signal to the inferior after
7665 finishing a step-over, unsuspend and re-resume all lwps. If we
7666 see a single-step event but the thread should be continuing, don't
7667 pass the trap to gdb.
7668 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7669 internal_error instead of gdb_assert.
7670 (enqueue_pending_signal): New function.
7671 (check_ptrace_stopped_lwp_gone): Add debug output.
7672 (start_step_over): Use internal_error instead of gdb_assert.
7673 (complete_ongoing_step_over): New function.
7674 (linux_resume_one_thread): Don't resume a suspended thread.
7675 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7678 2015-08-06 Pedro Alves <palves@redhat.com>
7680 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7681 (linux_thread_alive): Use lwp_is_marked_dead.
7682 (extended_event_reported): Delete.
7683 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7684 instead of extended_event_reported.
7685 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7687 (lwp_is_marked_dead): New function.
7688 (lwp_running): Use lwp_is_marked_dead.
7689 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7692 2015-08-06 Pedro Alves <palves@redhat.com>
7694 * linux-low.c (linux_wait_1): Move fork event output out of the
7695 !report_to_gdb check. Pass event_child->waitstatus to
7696 target_waitstatus_to_string instead of ourstatus.
7698 2015-08-04 Yao Qi <yao.qi@linaro.org>
7700 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7701 if current_thread is 32 bit.
7703 2015-08-04 Yao Qi <yao.qi@linaro.org>
7705 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7706 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7707 * server.c (extended_protocol): Remove "static".
7708 * server.h (extended_protocol): Declare it.
7710 2015-08-04 Yao Qi <yao.qi@linaro.org>
7712 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7713 both aarch64 and aarch32.
7714 (aarch64_set_pc): Likewise.
7716 2015-08-04 Yao Qi <yao.qi@linaro.org>
7718 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7719 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7720 arm-with-neon.xml to srv_xmlfiles.
7721 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7722 (is_64bit_tdesc): New function.
7723 (aarch64_linux_read_description): New function.
7724 (aarch64_arch_setup): Call aarch64_linux_read_description.
7725 (regs_info): Rename to regs_info_aarch64.
7726 (aarch64_regs_info): Return right regs_info.
7727 (initialize_low_arch): Call initialize_low_arch_aarch32.
7729 2015-08-04 Yao Qi <yao.qi@linaro.org>
7731 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7732 * linux-aarch32-low.c: New file.
7733 * linux-aarch32-low.h: New file.
7734 * linux-arm-low.c (arm_fill_gregset): Move it to
7735 linux-aarch32-low.c.
7736 (arm_store_gregset): Likewise.
7737 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7738 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7739 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7740 (regs_info): Rename to regs_info_arm.
7741 (arm_regs_info): Return regs_info_aarch32 if
7742 have_ptrace_getregset is 1 and target description is
7743 arm_with_neon or arm_with_vfpv3.
7744 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7745 Call initialize_low_arch_aarch32 instead.
7747 2015-08-04 Yao Qi <yao.qi@linaro.org>
7749 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7750 * linux-low.c: ... here.
7751 * linux-low.h (have_ptrace_getregset): Declare it.
7753 2015-08-04 Pedro Alves <palves@redhat.com>
7755 * thread-db.c (struct thread_db): Use new typedefs.
7756 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7758 (disable_thread_event_reporting): Cast result of dlsym to
7759 destination function pointer type.
7760 (thread_db_mourn): Use td_ta_delete_ftype.
7762 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7764 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7766 (CDX_BREAKPOINT): Define for R2.
7767 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7768 (the_low_target): Add comments.
7770 2015-07-30 Yao Qi <yao.qi@linaro.org>
7772 * linux-arm-low.c (arm_hwcap): Remove it.
7773 (arm_read_description): New local variable arm_hwcap. Don't
7774 set arm_hwcap to zero.
7776 2015-07-30 Yao Qi <yao.qi@linaro.org>
7778 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7779 Use regcache->tdesc instead.
7780 (arm_store_wmmxregset): Likewise.
7781 (arm_fill_vfpregset): Likewise.
7782 (arm_store_vfpregset): Likewise.
7784 2015-07-30 Yao Qi <yao.qi@linaro.org>
7786 * linux-arm-low.c: Include arch/arm.h.
7787 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7788 (arm_store_gregset): Likewise.
7790 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7792 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7793 ptrace's 4th parameter.
7795 2015-07-27 Yao Qi <yao.qi@linaro.org>
7797 * configure.srv (case aarch64*-*-linux*): Don't set
7800 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7802 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7804 * linux-arm-low.c: Likewise.
7805 * linux-cris-low.c: Likewise.
7806 * linux-crisv32-low.c: Likewise.
7807 * linux-low.c: Likewise.
7808 * linux-m68k-low.c: Likewise.
7809 * linux-mips-low.c: Likewise.
7810 * linux-nios2-low.c: Likewise.
7811 * linux-s390-low.c: Likewise.
7812 * linux-sparc-low.c: Likewise.
7813 * linux-tic6x-low.c: Likewise.
7814 * linux-tile-low.c: Likewise.
7815 * linux-x86-low.c: Likewise.
7817 2015-07-24 Pedro Alves <palves@redhat.com>
7819 * config.in: Regenerate.
7820 * configure: Regenerate.
7822 2015-07-24 Pedro Alves <palves@redhat.com>
7824 * acinclude.m4: Include ../ptrace.m4.
7825 * configure.ac: Call GDB_AC_PTRACE.
7826 * config.in, configure: Regenerate.
7828 2015-07-24 Yao Qi <yao.qi@linaro.org>
7830 * linux-low.c (linux_create_inferior): Remove setting to
7831 proc->priv->new_inferior.
7832 (linux_attach): Likewise.
7833 (linux_low_filter_event): Likewise.
7834 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7836 2015-07-24 Yao Qi <yao.qi@linaro.org>
7838 * linux-low.c (linux_arch_setup): New function.
7839 (linux_low_filter_event): If proc->tdesc is NULL and
7840 proc->attached is true, call the_low_target.arch_setup.
7841 Otherwise, keep status pending, and return.
7842 (linux_resume_one_lwp_throw): Don't call get_pc if
7843 thread->while_stepping isn't NULL. Don't call
7844 get_thread_regcache if proc->tdesc is NULL.
7845 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7846 (linux_target_ops): Install arch_setup.
7847 * server.c (start_inferior): Call the_target->arch_setup.
7848 * target.h (struct target_ops) <arch_setup>: New field.
7849 (target_arch_setup): New marco.
7850 * lynx-low.c (lynx_target_ops): Update.
7851 * nto-low.c (nto_target_ops): Update.
7852 * spu-low.c (spu_target_ops): Update.
7853 * win32-low.c (win32_target_ops): Update.
7855 2015-07-24 Yao Qi <yao.qi@linaro.org>
7857 * linux-low.c (linux_add_process): Don't set
7858 proc->priv->new_inferior.
7859 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7860 (linux_attach): Likewise.
7862 2015-07-24 Yao Qi <yao.qi@linaro.org>
7864 * server.c (start_inferior): Code refactor.
7866 2015-07-24 Yao Qi <yao.qi@linaro.org>
7868 * server.c (process_serial_event): Set general_thread.
7870 2015-07-21 Yao Qi <yao.qi@linaro.org>
7872 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7873 aarch64_linux_get_debug_reg_capacity.
7875 2015-07-17 Yao Qi <yao.qi@linaro.org>
7877 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7878 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7879 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7880 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7881 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7882 (AARCH64_HWP_ALIGNMENT): Likewise.
7883 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7884 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7885 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7886 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7887 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7888 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7889 (struct aarch64_debug_reg_state): Likewise.
7890 (struct arch_lwp_info): Likewise.
7891 (aarch64_align_watchpoint): Likewise.
7892 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7893 (aarch64_watchpoint_length): Likewise.
7894 (aarch64_point_encode_ctrl_reg): Likewise
7895 (aarch64_point_is_aligned): Likewise.
7896 (aarch64_align_watchpoint): Likewise.
7897 (aarch64_linux_set_debug_regs):
7898 (aarch64_dr_state_insert_one_point): Likewise.
7899 (aarch64_dr_state_remove_one_point): Likewise.
7900 (aarch64_handle_breakpoint): Likewise.
7901 (aarch64_handle_aligned_watchpoint): Likewise.
7902 (aarch64_handle_unaligned_watchpoint): Likewise.
7903 (aarch64_handle_watchpoint): Likewise.
7905 2015-07-17 Yao Qi <yao.qi@linaro.org>
7907 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7908 and don't aarch64_get_debug_reg_state. All callers update.
7909 (aarch64_handle_aligned_watchpoint): Likewise.
7910 (aarch64_handle_unaligned_watchpoint): Likewise.
7911 (aarch64_handle_watchpoint): Likewise.
7912 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7913 (aarch64_remove_point): Likewise.
7915 2015-07-17 Yao Qi <yao.qi@linaro.org>
7917 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7919 (aarch64_handle_unaligned_watchpoint): Likewise.
7921 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7923 Revert the previous 3 commits:
7924 Move gdb_regex* to common/
7925 Move linux_find_memory_regions_full & co.
7926 gdbserver build-id attribute generator
7928 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7929 Jan Kratochvil <jan.kratochvil@redhat.com>
7931 gdbserver build-id attribute generator.
7932 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7933 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7934 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7936 (get_dynamic): Use find_pdhr to traverse program headers.
7937 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7938 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7939 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7940 (get_hex_build_id): New.
7941 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7942 to reply XML document.
7944 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7945 Jan Kratochvil <jan.kratochvil@redhat.com>
7947 * target.c: Include target/target-utils.h and fcntl.h.
7948 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7949 (target_fileio_read_stralloc): New functions.
7951 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7953 * Makefile.in (OBS): Add gdb_regex.o.
7955 * config.in: Rebuilt.
7956 * configure: Rebuilt.
7958 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7959 Jan Kratochvil <jan.kratochvil@redhat.com>
7961 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7962 * Makefile.in (OBS): Add target-utils.o.
7963 (linux-maps.o, target-utils.o): New.
7964 * configure.srv (srv_linux_obj): Add linux-maps.o.
7966 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7968 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7970 (the_low_target): Install it.
7972 2015-07-14 Pedro Alves <palves@redhat.com>
7974 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7975 Instead, ignore ECHILD, and throw an error for other errnos.
7977 2015-07-10 Pedro Alves <palves@redhat.com>
7979 * event-loop.c (struct callback_event) <data>: Change type to
7980 gdb_client_data instance instead of gdb_client_data pointer.
7981 (append_callback_event): Adjust.
7983 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7985 * linux-aarch64-low.c: Add comments for each linux_target_ops
7986 method. Remove comments already covered in target_ops and
7987 linux_target_ops definitions.
7988 (the_low_target): Add comments for each unimplemented method.
7990 2015-07-09 Yao Qi <yao.qi@linaro.org>
7992 * linux-aarch64-low.c (aarch64_regmap): Remove.
7993 (aarch64_usrregs_info): Remove.
7994 (regs_info): Set field usrregs to NULL.
7996 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7998 * linux-low.c: Include "rsp-low.h"
7999 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8000 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8001 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8002 (handle_btrace_enable_pt): New.
8003 (handle_btrace_general_set): Support "pt".
8004 (handle_btrace_conf_general_set): Support "pt:size".
8006 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8008 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8011 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8013 * linux-aarch64-low.c: Remove comment about endianness.
8014 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8015 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8018 2015-06-24 Gary Benson <gbenson@redhat.com>
8020 * linux-i386-ipa.c (stdint.h): Do not include.
8021 * lynx-i386-low.c (stdint.h): Likewise.
8022 * lynx-ppc-low.c (stdint.h): Likewise.
8023 * mem-break.c (stdint.h): Likewise.
8024 * thread-db.c (stdint.h): Likewise.
8025 * tracepoint.c (stdint.h): Likewise.
8026 * win32-low.c (stdint.h): Likewise.
8028 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8030 * server.c (write_qxfer_response): Update call to
8031 remote_escape_output.
8033 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8034 Jan Kratochvil <jan.kratochvil@redhat.com>
8036 Merge multiple hex conversions.
8037 * gdbreplay.c (tohex): Rename to 'fromhex'.
8038 (logchar): Use fromhex.
8040 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8042 * server.c (handle_qxfer_libraries): Set `version' attribute for
8045 2015-06-10 Gary Benson <gbenson@redhat.com>
8047 * target.h (struct target_ops) <multifs_open>: New field.
8048 <multifs_unlink>: Likewise.
8049 <multifs_readlink>: Likewise.
8050 * linux-low.c (nat/linux-namespaces.h): New include.
8051 (linux_target_ops): Initialize the_target->multifs_open,
8052 the_target->multifs_unlink and the_target->multifs_readlink.
8053 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8054 * hostio.c (hostio_fs_pid): New static variable.
8055 (hostio_handle_new_gdb_connection): New function.
8056 (handle_setfs): Likewise.
8057 (handle_open): Use the_target->multifs_open as appropriate.
8058 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8059 (handle_readlink): Use the_target->multifs_readlink as
8061 (handle_vFile): Handle vFile:setfs packets.
8062 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8063 after target_handle_new_gdb_connection.
8065 2015-06-10 Gary Benson <gbenson@redhat.com>
8067 * configure.ac (AC_CHECK_FUNCS): Add setns.
8068 * config.in: Regenerate.
8069 * configure: Likewise.
8070 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8071 (linux-namespaces.o): New rule.
8072 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8074 2015-06-09 Gary Benson <gbenson@redhat.com>
8076 * hostio.c (handle_open): Process mode argument with
8077 fileio_to_host_mode.
8079 2015-06-01 Yao Qi <yao.qi@linaro.org>
8081 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8082 * linux-x86-low.c: Likewise.
8084 2015-05-28 Don Breazeal <donb@codesourcery.com>
8086 * linux-low.c (handle_extended_wait): Initialize
8087 thread_info.last_resume_kind for new fork children.
8089 2015-05-15 Pedro Alves <palves@redhat.com>
8091 * target.h (target_handle_new_gdb_connection): Rewrite using if
8092 wrapped in do/while.
8094 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8096 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8097 * configure, config.in: Regenerate.
8098 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8101 2015-05-12 Don Breazeal <donb@codesourcery.com>
8103 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8104 PTRACE_EVENT_VFORK_DONE.
8105 (linux_low_ptrace_options, extended_event_reported): Add vfork
8107 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8108 and "vforkdone" for RSP 'T' Stop Reply Packet.
8109 * server.h (report_vfork_events): Declare
8112 2015-05-12 Don Breazeal <donb@codesourcery.com>
8114 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8115 (the_low_target) <new_fork>: Initialize new member.
8116 * linux-arm-low.c (arm_new_fork): New function.
8117 (the_low_target) <new_fork>: Initialize new member.
8118 * linux-low.c (handle_extended_wait): Call new target function
8120 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8121 * linux-mips-low.c (mips_add_watchpoint): New function
8122 extracted from mips_insert_point.
8123 (the_low_target) <new_fork>: Initialize new member.
8124 (mips_linux_new_fork): New function.
8125 (mips_insert_point): Call mips_add_watchpoint.
8126 * linux-x86-low.c (x86_linux_new_fork): New function.
8127 (the_low_target) <new_fork>: Initialize new member.
8129 2015-05-12 Don Breazeal <donb@codesourcery.com>
8131 * linux-low.c (handle_extended_wait): Implement return value,
8132 rename argument 'event_child' to 'event_lwp', handle
8133 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8134 (linux_low_ptrace_options): New function.
8135 (linux_low_filter_event): Call linux_low_ptrace_options,
8136 use different argument fo linux_enable_event_reporting,
8137 use return value from handle_extended_wait.
8138 (extended_event_reported): New function.
8139 (linux_wait_1): Call extended_event_reported and set
8140 status to report fork events.
8141 (linux_write_memory): Add pid to debug message.
8142 (reset_lwp_ptrace_options_callback): New function.
8143 (linux_handle_new_gdb_connection): New function.
8144 (linux_target_ops): Initialize new structure member.
8145 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8146 * lynx-low.c: Initialize new structure member.
8147 * remote-utils.c (prepare_resume_reply): Implement stop reason
8148 "fork" for "T" stop message.
8149 * server.c (handle_query): Call handle_new_gdb_connection.
8150 * server.h (report_fork_events): Declare global flag.
8151 * target.h (struct target_ops) <handle_new_gdb_connection>:
8153 (target_handle_new_gdb_connection): New macro.
8154 * win32-low.c: Initialize new structure member.
8156 2015-05-12 Don Breazeal <donb@codesourcery.com>
8158 * mem-break.c (APPEND_TO_LIST): Define macro.
8159 (clone_agent_expr): New function.
8160 (clone_one_breakpoint): New function.
8161 (clone_all_breakpoints): New function.
8162 * mem-break.h: Declare new functions.
8164 2015-05-12 Don Breazeal <donb@codesourcery.com>
8166 * linux-low.c (linux_supports_fork_events): New function.
8167 (linux_supports_vfork_events): New function.
8168 (linux_target_ops): Initialize new structure members.
8169 (initialize_low): Call linux_check_ptrace_features.
8170 * lynx-low.c (lynx_target_ops): Initialize new structure
8172 * server.c (report_fork_events, report_vfork_events):
8174 (handle_query): Add new features to qSupported packet and
8176 (captured_main): Initialize new global variables.
8177 * target.h (struct target_ops) <supports_fork_events>:
8179 <supports_vfork_events>: New member.
8180 (target_supports_fork_events): New macro.
8181 (target_supports_vfork_events): New macro.
8182 * win32-low.c (win32_target_ops): Initialize new structure
8185 2015-05-12 Gary Benson <gbenson@redhat.com>
8187 * server.c (handle_qxfer_exec_file): Use current process
8190 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8192 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8193 Remove HAVE_PTRACE_GETREGS conditionals.
8194 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8195 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8197 2015-05-08 Yao Qi <yao.qi@linaro.org>
8199 * linux-low.c (linux_supports_conditional_breakpoints): New
8201 (linux_target_ops): Install new target method.
8202 * lynx-low.c (lynx_target_ops): Install NULL hook for
8203 supports_conditional_breakpoints.
8204 * nto-low.c (nto_target_ops): Likewise.
8205 * spu-low.c (spu_target_ops): Likewise.
8206 * win32-low.c (win32_target_ops): Likewise.
8207 * server.c (handle_query): Check
8208 target_supports_conditional_breakpoints.
8209 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8211 (target_supports_conditional_breakpoints): New macro.
8213 2015-05-06 Pedro Alves <palves@redhat.com>
8216 * server.c (start_inferior): If the process exits, mourn it.
8218 2015-04-21 Gary Benson <gbenson@redhat.com>
8220 * hostio.c (fileio_open_flags_to_host): Factored out to
8221 fileio_to_host_openflags in common/fileio.c. Single use
8224 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8226 * linux-xtensa-low.c (xtensa_fill_gregset)
8227 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8230 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8232 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8233 (regs_info): Replace usrregs pointer with NULL.
8235 2015-04-17 Gary Benson <gbenson@redhat.com>
8237 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8238 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8239 * server.c (handle_qxfer_exec_file): New function.
8240 (qxfer_packets): Add exec-file entry.
8241 (handle_query): Report qXfer:exec-file:read as supported packet.
8243 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8245 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8247 2015-04-09 Gary Benson <gbenson@redhat.com>
8249 * hostio-errno.c (errno_to_fileio_error): Remove function.
8250 Update caller to use remote_fileio_to_fio_error.
8252 2015-04-09 Yao Qi <yao.qi@linaro.org>
8254 * linux-low.c (linux_insert_point): Call
8255 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8256 (linux_remove_point): Call remove_memory_breakpoint if type is
8258 * linux-x86-low.c (x86_insert_point): Don't call
8259 insert_memory_breakpoint.
8260 (x86_remove_point): Don't call remove_memory_breakpoint.
8262 2015-04-01 Pedro Alves <palves@redhat.com>
8263 Cleber Rosa <crosa@redhat.com>
8265 * server.c (gdbserver_usage): Reorganize and extend the usage
8268 2015-03-24 Pedro Alves <palves@redhat.com>
8270 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8271 output. Also dump TRAP_TRACE.
8272 (linux_low_filter_event): In debug output, distinguish a
8273 resume_stop SIGSTOP from a delayed SIGSTOP.
8275 2015-03-24 Gary Benson <gbenson@redhat.com>
8277 * linux-x86-low.c (x86_linux_new_thread): Moved to
8279 (x86_linux_prepare_to_resume): Likewise.
8281 2015-03-24 Gary Benson <gbenson@redhat.com>
8283 * Makefile.in (x86-linux-dregs.o): New rule.
8284 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8285 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8286 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8287 (x86_linux_dr_get): Likewise.
8288 (x86_linux_dr_set): Likewise.
8289 (update_debug_registers_callback): Likewise.
8290 (x86_linux_dr_set_addr): Likewise.
8291 (x86_linux_dr_get_addr): Likewise.
8292 (x86_linux_dr_set_control): Likewise.
8293 (x86_linux_dr_get_control): Likewise.
8294 (x86_linux_dr_get_status): Likewise.
8295 (x86_linux_update_debug_registers): Likewise.
8297 2015-03-24 Gary Benson <gbenson@redhat.com>
8299 * linux-x86-low.c (x86_linux_update_debug_registers):
8300 New function, factored out from...
8301 (x86_linux_prepare_to_resume): ...this.
8303 2015-03-24 Gary Benson <gbenson@redhat.com>
8305 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8306 (x86_linux_dr_set): Likewise.
8307 (update_debug_registers_callback): Likewise.
8308 (x86_linux_dr_set_addr): Likewise.
8309 (x86_linux_dr_get_addr): Likewise.
8310 (x86_linux_dr_set_control): Likewise.
8311 (x86_linux_dr_get_control): Likewise.
8312 (x86_linux_dr_get_status): Likewise.
8313 (x86_linux_prepare_to_resume): Likewise.
8315 2015-03-24 Gary Benson <gbenson@redhat.com>
8317 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8318 Use perror_with_name. Pass string through gettext.
8319 (x86_linux_dr_set): Likewise.
8321 2015-03-24 Gary Benson <gbenson@redhat.com>
8323 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8324 (x86_linux_dr_set_addr): ...this.
8325 (x86_dr_low_get_addr): Rename to...
8326 (x86_linux_dr_get_addr): ...this.
8327 (x86_dr_low_set_control): Rename to...
8328 (x86_linux_dr_set_control): ...this.
8329 (x86_dr_low_get_control): Rename to...
8330 (x86_linux_dr_get_control): ...this.
8331 (x86_dr_low_get_status): Rename to...
8332 (x86_linux_dr_get_status): ...this.
8333 (x86_dr_low): Update with new function names.
8335 2015-03-24 Gary Benson <gbenson@redhat.com>
8337 * Makefile.in (x86-linux.o): New rule.
8338 * configure.srv: Add x86-linux.o to relevant targets.
8339 * linux-low.c (lwp_set_arch_private_info): New function.
8340 (lwp_arch_private_info): Likewise.
8341 * linux-x86-low.c: Include nat/x86-linux.h.
8342 (arch_lwp_info): Removed structure.
8343 (update_debug_registers_callback):
8344 Use lwp_set_debug_registers_changed.
8345 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8346 and lwp_set_debug_registers_changed.
8347 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8349 2015-03-24 Gary Benson <gbenson@redhat.com>
8351 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8352 * linux-arm-low.c (arm_new_thread): Likewise.
8353 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8354 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8355 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8356 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8358 2015-03-24 Gary Benson <gbenson@redhat.com>
8360 * linux-low.c (ptid_of_lwp): New function.
8361 (lwp_is_stopped): Likewise.
8362 (lwp_stop_reason): Likewise.
8363 * linux-x86-low.c (update_debug_registers_callback):
8365 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8368 2015-03-24 Gary Benson <gbenson@redhat.com>
8370 * linux-low.h (linux_stop_lwp): Remove declaration.
8372 2015-03-24 Gary Benson <gbenson@redhat.com>
8374 * linux-low.h: Include nat/linux-nat.h.
8375 * linux-low.c (iterate_over_lwps_args): New structure.
8376 (iterate_over_lwps_filter): New function.
8377 (iterate_over_lwps): Likewise.
8378 * linux-x86-low.c (update_debug_registers_callback):
8379 Update signature to what iterate_over_lwps expects.
8380 Remove PID check that iterate_over_lwps now performs.
8381 (x86_dr_low_set_addr): Use iterate_over_lwps.
8382 (x86_dr_low_set_control): Likewise.
8384 2015-03-24 Gary Benson <gbenson@redhat.com>
8386 * linux-x86-low.c (x86_debug_reg_state): New function.
8387 (x86_linux_prepare_to_resume): Use the above.
8389 2015-03-24 Gary Benson <gbenson@redhat.com>
8391 * linux-low.c (current_lwp_ptid): New function.
8392 * linux-x86-low.c: Include nat/linux-nat.h.
8393 (x86_dr_low_get_addr): Use current_lwp_ptid.
8394 (x86_dr_low_get_control): Likewise.
8395 (x86_dr_low_get_status): Likewise.
8397 2015-03-20 Pedro Alves <palves@redhat.com>
8399 * tracepoint.c (cmd_qtstatus): Make "str" const.
8401 2015-03-20 Pedro Alves <palves@redhat.com>
8403 * server.c (handle_general_set): Make "req_str" const.
8405 2015-03-19 Pedro Alves <palves@redhat.com>
8407 * linux-low.c (linux_resume_one_lwp): Rename to ...
8408 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8409 instead call perror_with_name.
8410 (check_ptrace_stopped_lwp_gone): New function.
8411 (linux_resume_one_lwp): Reimplement as wrapper around
8412 linux_resume_one_lwp_throw that swallows errors if the LWP is
8415 2015-03-19 Pedro Alves <palves@redhat.com>
8417 * linux-low.c (count_events_callback, select_event_lwp_callback):
8418 No longer check whether the thread has resume_stop as last resume
8421 2015-03-19 Pedro Alves <palves@redhat.com>
8423 * linux-low.c (count_events_callback, select_event_lwp_callback):
8424 Use the lwp's status_pending_p field, not the thread's.
8426 2015-03-19 Pedro Alves <palves@redhat.com>
8428 * linux-low.c (select_event_lwp_callback): Update comments to
8429 no longer mention SIGTRAP.
8431 2015-03-18 Gary Benson <gbenson@redhat.com>
8433 * server.c (handle_query): Do not report vFile:fstat as supported.
8435 2015-03-11 Gary Benson <gbenson@redhat.com>
8437 * hostio.c (sys/types.h): New include.
8438 (sys/stat.h): Likewise.
8439 (common-remote-fileio.h): Likewise.
8440 (handle_fstat): New function.
8441 (handle_vFile): Handle vFile:fstat packets.
8443 2015-03-11 Gary Benson <gbenson@redhat.com>
8445 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8446 struct stat.st_blocks and struct stat.st_blksize.
8447 * configure: Regenerate.
8448 * config.in: Likewise.
8449 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8450 (OBS): Add common-remote-fileio.o.
8451 (common-remote-fileio.o): New rule.
8453 2015-03-09 Pedro Alves <palves@redhat.com>
8455 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8456 'struct sockaddr' pointer in 'accept' call.
8458 2015-03-09 Pedro Alves <palves@redhat.com>
8461 2015-03-07 Pedro Alves <palves@redhat.com>
8462 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8463 or <winsock2.h> here. Instead include "gdb_socket.h".
8464 (remote_open): Use union gdb_sockaddr_u.
8465 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8466 or <winsock2.h> here. Instead include "gdb_socket.h".
8467 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8468 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8470 (init_named_socket, gdb_agent_helper_thread): Use union
8473 2015-03-07 Pedro Alves <palves@redhat.com>
8475 * configure.ac (build_warnings): Move
8476 -Wdeclaration-after-statement to the C-specific set.
8477 * configure: Regenerate.
8479 2015-03-07 Pedro Alves <palves@redhat.com>
8481 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8482 or <winsock2.h> here. Instead include "gdb_socket.h".
8483 (remote_open): Use union gdb_sockaddr_u.
8484 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8485 or <winsock2.h> here. Instead include "gdb_socket.h".
8486 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8487 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8489 (init_named_socket, gdb_agent_helper_thread): Use union
8492 2015-03-07 Pedro Alves <palves@redhat.com>
8494 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8497 2015-03-06 Yao Qi <yao.qi@linaro.org>
8499 * linux-aarch64-low.c (aarch64_insert_point): Use
8500 show_debug_regs as a boolean.
8501 (aarch64_remove_point): Likewise.
8503 2015-03-05 Pedro Alves <palves@redhat.com>
8505 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8506 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8507 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8508 * nto-low.c (nto_target_ops): Likewise.
8509 * spu-low.c (spu_target_ops): Likewise.
8510 * win32-low.c (win32_target_ops): Likewise.
8512 2015-03-04 Pedro Alves <palves@redhat.com>
8514 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8515 Decide whether a breakpoint triggered based on the SIGTRAP's
8517 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8518 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8519 (linux_low_filter_event): Check for breakpoints before checking
8521 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8523 (linux_stopped_by_sw_breakpoint)
8524 (linux_supports_stopped_by_sw_breakpoint)
8525 (linux_stopped_by_hw_breakpoint)
8526 (linux_supports_stopped_by_hw_breakpoint): New functions.
8527 (linux_target_ops): Install new target methods.
8529 2015-03-04 Pedro Alves <palves@redhat.com>
8531 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8532 * server.c (swbreak_feature, hwbreak_feature): New globals.
8533 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8534 (captured_main): Clear swbreak_feature and hwbreak_feature.
8535 * server.h (swbreak_feature, hwbreak_feature): Declare.
8536 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8537 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8538 supports_stopped_by_hw_breakpoint>: New fields.
8539 (target_supports_stopped_by_sw_breakpoint)
8540 (target_stopped_by_sw_breakpoint)
8541 (target_supports_stopped_by_hw_breakpoint)
8542 (target_stopped_by_hw_breakpoint): Declare.
8544 2015-03-04 Pedro Alves <palves@redhat.com>
8546 enum lwp_stop_reason -> enum target_stop_reason
8547 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8548 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8549 (linux_wait_1, stuck_in_jump_pad_callback)
8550 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8551 (linux_stopped_by_watchpoint):
8552 * linux-low.h (enum lwp_stop_reason): Delete.
8553 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8554 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8556 2015-03-04 Yao Qi <yao.qi@linaro.org>
8558 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8560 2015-03-03 Gary Benson <gbenson@redhat.com>
8562 * hostio.c (handle_vFile): Fix prefix lengths.
8564 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8566 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8569 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8571 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8572 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8573 (clean): Add "rm -f" for above C files.
8574 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8575 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8576 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8577 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8578 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8579 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8580 (init_registers_s390x_vx_linux64)
8581 (init_registers_s390x_tevx_linux64)
8582 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8583 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8585 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8586 (s390_store_vxrs_high): New functions.
8587 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8589 (s390_arch_setup): Add logic for selecting one of the new target
8590 descriptions. Activate the new vector regsets if applicable.
8591 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8592 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8593 and init_registers_s390x_tevx_linux64.
8595 2015-03-01 Pedro Alves <palves@redhat.com>
8597 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8600 2015-02-27 Pedro Alves <palves@redhat.com>
8602 * linux-x86-low.c (u_debugreg_offset): New function.
8603 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8605 2015-02-27 Pedro Alves <palves@redhat.com>
8607 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8608 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8609 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8610 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8611 (ps_lsetfpregs, ps_getpid)
8612 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8613 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8614 (ps_lsetxregs, ps_plog): Declare.
8616 2015-02-27 Pedro Alves <palves@redhat.com>
8618 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8619 IP_AGENT_EXPORT_FUNC.
8620 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8621 IP_AGENT_EXPORT_FUNC.
8622 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8623 (IP_AGENT_EXPORT): Delete.
8624 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8625 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8626 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8627 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8628 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8629 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8630 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8631 (traceframe_read_count, traceframe_write_count)
8632 (traceframes_created, trace_state_variables, get_raw_reg)
8633 (get_trace_state_variable_value, set_trace_state_variable_value)
8634 (ust_loaded, helper_thread_id, cmd_buf): Use
8635 IPA_SYM_EXPORTED_NAME.
8636 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8637 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8638 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8639 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8640 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8641 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8642 EXTERN_C_PUSH/EXTERN_C_POP.
8643 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8644 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8645 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8646 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8647 (traceframe_write_count, traceframe_read_count)
8648 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8649 (about_to_request_buffer_space, get_trace_state_variable_value)
8650 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8651 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8652 EXTERN_C_PUSH/EXTERN_C_POP.
8653 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8654 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8655 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8656 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8657 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8658 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8659 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8660 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8662 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8663 (IP_AGENT_EXPORT_VAR_DECL): Define.
8665 (gdb_agent_get_raw_reg): Declare.
8667 2015-02-27 Tom Tromey <tromey@redhat.com>
8668 Pedro Alves <palves@redhat.com>
8670 Rename symbols whose names are reserved C++ keywords throughout.
8672 2015-02-27 Pedro Alves <palves@redhat.com>
8674 * Makefile.in (COMPILER): New, get it from autoconf.
8675 (CXX): Get from autoconf instead.
8676 (COMPILE.pre): Use COMPILER.
8677 (CC-LD): Rename to ...
8678 (CC_LD): ... this. Use COMPILER.
8679 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8680 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8681 * acinclude.m4: Include build-with-cxx.m4.
8682 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8683 Disable -Werror by default if building in C++ mode.
8684 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8685 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8686 the C++ compiler. Save/restore CXXFLAGS too.
8687 * configure: Regenerate.
8689 2015-02-27 Pedro Alves <palves@redhat.com>
8691 * acinclude.m4: Include libiberty.m4.
8692 * configure.ac: Call libiberty_INIT.
8693 * config.in, configure: Regenerate.
8695 2015-02-26 Pedro Alves <palves@redhat.com>
8697 * linux-low.c (linux_wait_1): When incrementing the PC past a
8698 program breakpoint always use the_low_target.breakpoint_len as
8699 increment, rather than the maximum between that and
8700 the_low_target.decr_pc_after_break.
8702 2015-02-23 Pedro Alves <palves@redhat.com>
8704 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8705 thread was doing a step-over; always adjust the PC if
8706 we stepped over a permanent breakpoint.
8707 (linux_wait_1): If we stepped over breakpoint that was on top of a
8708 permanent breakpoint, manually advance the PC past it.
8710 2015-02-23 Pedro Alves <palves@redhat.com>
8712 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8714 (x86_fill_gregset, x86_store_gregset): Use it when handling
8717 2015-02-20 Pedro Alves <palves@redhat.com>
8719 * thread-db.c: Include "nat/linux-procfs.h".
8720 (thread_db_init): Skip listing new threads if the kernel supports
8721 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8723 2015-02-20 Pedro Alves <palves@redhat.com>
8725 * linux-low.c (status_pending_p_callback): Use ptid_match.
8727 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8729 PR breakpoints/16812
8730 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8731 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8732 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8734 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8736 PR breakpoints/15956
8737 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8739 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8741 * linux-low.c (linux_low_btrace_conf): Print size.
8742 * server.c (handle_btrace_conf_general_set): New.
8743 (hanle_general_set): Call handle_btrace_conf_general_set.
8744 (handle_query): Report Qbtrace-conf:bts:size as supported.
8746 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8748 * linux-low.c (linux_low_enable_btrace): Update parameters.
8749 (linux_low_btrace_conf): New.
8750 (linux_target_ops)<to_btrace_conf>: Initialize.
8751 * server.c (current_btrace_conf): New.
8752 (handle_btrace_enable): Rename to ...
8753 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8754 to target_enable_btrace. Update comment. Update users.
8755 (handle_qxfer_btrace_conf): New.
8756 (qxfer_packets): Add btrace-conf entry.
8757 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8758 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8759 (target_ops)<read_btrace_conf>: New.
8760 (target_enable_btrace): Update parameters.
8761 (target_read_btrace_conf): New.
8763 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8765 * server.c (handle_btrace_general_set): Remove call to
8766 target_supports_btrace.
8767 (supported_btrace_packets): New.
8768 (handle_query): Call supported_btrace_packets.
8769 * target.h: include btrace-common.h.
8770 (btrace_target_info): Removed.
8771 (supports_btrace, target_supports_btrace): Update parameters.
8773 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8775 * Makefile.in (SFILES): Add common/btrace-common.c.
8776 (OBS): Add common/btrace-common.o.
8777 (btrace-common.o): Add build rules.
8778 * linux-low: Include btrace-common.h.
8779 (linux_low_read_btrace): Use struct btrace_data. Call
8780 btrace_data_init and btrace_data_fini.
8782 2015-02-06 Pedro Alves <palves@redhat.com>
8784 * thread-db.c (find_new_threads_callback): Add debug output.
8786 2015-02-04 Pedro Alves <palves@redhat.com>
8788 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8789 (resume_stopped_resumed_lwps): New function.
8790 (linux_wait_for_event_filtered): Use it.
8792 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8794 * Makefile.in (SFILES): Add linux-personality.c.
8795 (linux-personality.o): New rule.
8796 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8797 list of objects to be built.
8798 * linux-low.c: Include nat/linux-personality.h.
8799 (linux_create_inferior): Remove code to disable address space
8800 randomization (moved to ../nat/linux-personality.c). Create
8801 cleanup to disable address space randomization.
8803 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8805 * Makefile.in (posix-strerror.o): New rule.
8806 (mingw-strerror.o): Likewise.
8807 * configure: Regenerated.
8808 * configure.ac: Source file ../common/common.host. Initialize new
8809 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8811 2015-01-14 Yao Qi <yao@codesourcery.com>
8813 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8814 (ppc-linux.o): New rule.
8815 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8816 * configure.ac: AC_CHECK_FUNCS(getauxval).
8817 * config.in: Re-generated.
8818 * configure: Re-generated.
8819 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8820 ppc64_64bit_inferior_p
8822 2015-01-14 Yao Qi <yao@codesourcery.com>
8824 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8825 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8826 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8827 (PT_ORIG_R3, PT_TRAP): Likewise.
8828 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8829 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8830 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8832 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8834 * i387-fp.c (i387_cache_to_xsave): In look over
8835 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8836 zmmh_low_space field by use of zmmh_high_space.
8838 2015-01-09 Pedro Alves <palves@redhat.com>
8840 * linux-low.c (step_over_bkpt): Move higher up in the file.
8841 (handle_extended_wait): Don't store the stop_pc here.
8842 (get_stop_pc): Adjust comments and rename to ...
8843 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8844 stopped for a software breakpoint or hardware breakpoint.
8845 (thread_still_has_status_pending_p): New function.
8846 (status_pending_p_callback): Use
8847 thread_still_has_status_pending_p. If the event is no longer
8848 interesting, resume the LWP.
8849 (handle_tracepoints): Add assert.
8850 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8851 (wstatus_maybe_breakpoint): New function.
8852 (cancel_breakpoint): Delete function.
8853 (check_stopped_by_watchpoint): New function, factored out from
8854 linux_low_filter_event.
8855 (lp_status_maybe_breakpoint): Delete function.
8856 (linux_low_filter_event): Remove filter_ptid argument.
8857 Leave thread group exits pending here. Store the LWP's stop PC.
8858 Always leave events pending.
8859 (linux_wait_for_event_filtered): Pull all events out of the
8860 kernel, and leave them all pending.
8861 (count_events_callback, select_event_lwp_callback): Consider all
8863 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8864 (select_event_lwp): Only give preference to the stepping LWP in
8865 all-stop mode. Adjust comments.
8866 (ignore_event): New function.
8867 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8868 references to cancel_breakpoints. Adjust to renames. Also give
8869 equal priority to all LWPs that have had events in non-stop mode.
8870 If reporting a software breakpoint event, unadjust the LWP's PC.
8871 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8872 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8874 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8875 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8876 (linux_stopped_by_watchpoint): Adjust.
8877 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8878 * linux-low.h (enum lwp_stop_reason): New.
8879 (struct lwp_info) <stop_pc>: Adjust comment.
8880 <stopped_by_watchpoint>: Delete field.
8881 <stop_reason>: New field.
8882 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8883 * mem-break.c (software_breakpoint_inserted_here)
8884 (hardware_breakpoint_inserted_here): New function.
8885 * mem-break.h (software_breakpoint_inserted_here)
8886 (hardware_breakpoint_inserted_here): Declare.
8887 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8888 (cancel_breakpoints): Delete.
8889 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8890 (upload_fast_traceframes): Remove references to
8893 2015-01-09 Pedro Alves <palves@redhat.com>
8895 * thread-db.c (find_new_threads_callback): Ignore thread if the
8896 kernel thread ID is -1.
8898 2015-01-09 Pedro Alves <palves@redhat.com>
8900 * linux-low.c (linux_attach_fail_reason_string): Move to
8901 nat/linux-ptrace.c, and rename.
8902 (linux_attach_lwp): Update comment.
8903 (attach_proc_task_lwp_callback): New function.
8904 (linux_attach): Adjust to rename and use
8905 linux_proc_attach_tgid_threads.
8906 (linux_attach_fail_reason_string): Delete declaration.
8908 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8910 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8911 * server.c (gdbserver_version): Likewise.
8913 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8915 * remote-utils.c: Include ctype.h.
8916 (input_interrupt): Explicitly handle the case when the char
8917 received is the NUL byte. Improve the printing of non-ASCII
8920 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8922 * linux-low.c (linux_low_filter_event): Update call to
8923 linux_enable_event_reporting following the addition of
8924 a new parameter to that function.
8926 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8929 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8930 (AARCH64_FPCR_REGNO): Likewise.
8931 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8932 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8933 (aarch64_store_fpregset): Likewise.
8935 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8937 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8938 Remove FIXME comment about assumption about N.
8940 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8942 * configure.ac: If large-file support is disabled in GDBserver,
8943 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8944 * configure: Regenerate.
8946 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8948 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8949 warning upon ENODATA from ptrace.
8950 * linux-s390-low.c (s390_store_tdb): New.
8951 (s390_regsets): Add regset for NT_S390_TDB.
8953 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8955 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8956 without a fill_function.
8957 * linux-s390-low.c (s390_fill_last_break): Remove.
8958 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8959 (s390_arch_setup): Use regset's size instead of fill_function for
8962 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8964 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8965 the regset's store function when ptrace returned an error.
8966 * regcache.c (get_thread_regcache): Invalidate register cache
8967 before fetching inferior's registers.
8969 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8971 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8972 while-loop as for-loop.
8973 (regsets_store_inferior_registers): Likewise.
8975 2014-11-28 Yao Qi <yao@codesourcery.com>
8977 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8978 * config.in, configure: Re-generate.
8979 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8982 2014-11-21 Yao Qi <yao@codesourcery.com>
8984 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8985 (AC_CHECK_HEADERS): Remove malloc.h.
8986 * configure: Re-generated.
8987 * config.in: Re-generated.
8988 * server.h: Don't include alloca.h and malloc.h.
8989 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8990 Don't include malloc.h.
8992 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8994 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8995 corresponding ERRNO check in same block.
8997 2014-11-12 Pedro Alves <palves@redhat.com>
8999 * server.c (cont_thread): Update comment.
9000 (start_inferior, attach_inferior): No longer clear cont_thread.
9001 (handle_v_cont): No longer set cont_thread.
9002 (captured_main): Clear cont_thread each time a GDB connects.
9004 2014-11-12 Pedro Alves <palves@redhat.com>
9006 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9007 thread, and don't resume all threads if the Hc thread has exited.
9009 2014-11-12 Pedro Alves <palves@redhat.com>
9011 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9012 the process group instead of to a specific LWP.
9014 2014-10-15 Pedro Alves <palves@redhat.com>
9017 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9019 (arm_set_thread_context): Delete.
9020 (the_low_target): Adjust.
9021 * win32-i386-low.c (debug_registers_changed)
9022 (debug_registers_used): Delete.
9023 (update_debug_registers_callback): New function.
9024 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9025 needing to update their debug registers.
9026 (win32_get_current_dr): New function.
9027 (x86_dr_low_get_addr, x86_dr_low_get_control)
9028 (x86_dr_low_get_status): Fetch the debug register from the thread
9030 (i386_initial_stuff): Adjust.
9031 (i386_get_thread_context): Remove current_event parameter. Don't
9032 clear debug_registers_changed nor copy DR values to
9034 (i386_set_thread_context): Delete.
9035 (i386_prepare_to_resume): New function.
9036 (i386_thread_added): Mark the thread as needing to update irs
9038 (the_low_target): Remove i386_set_thread_context and install
9039 i386_prepare_to_resume.
9040 * win32-low.c (win32_get_thread_context): Adjust.
9041 (win32_set_thread_context): Use SetThreadContext
9043 (win32_prepare_to_resume): New function.
9044 (win32_require_context): New function, factored out from ...
9045 (thread_rec): ... this.
9046 (continue_one_thread): Call win32_prepare_to_resume on each thread
9047 we're about to continue.
9048 (win32_resume): Call win32_prepare_to_resume on the event thread.
9049 * win32-low.h (struct win32_thread_info)
9050 <debug_registers_changed>: New field.
9051 (struct win32_target_ops): Change prototype of set_thread_context,
9052 delete set_thread_context and add prepare_to_resume.
9053 (win32_require_context): New declaration.
9055 2014-10-08 Gary Benson <gbenson@redhat.com>
9057 * server.h: Do not include common-exceptions.h.
9059 2014-10-08 Gary Benson <gbenson@redhat.com>
9061 * server.h: Do not include cleanups.h.
9063 2014-09-30 James Hogan <james.hogan@imgtec.com>
9065 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9068 2014-09-23 Yao Qi <yao@codesourcery.com>
9070 * linux-low.c (lp_status_maybe_breakpoint): New function.
9071 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9072 (count_events_callback): Likewise.
9073 (select_event_lwp_callback): Likewise.
9074 (cancel_breakpoints_callback): Likewise.
9076 2014-09-19 Don Breazeal <donb@codesourcery.com>
9078 * linux-low.c (handle_extended_wait): Call
9079 linux_ptrace_get_extended_event.
9080 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9081 linux_is_extended_waitstatus.
9083 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9085 * Makefile.in (CPPFLAGS): Define.
9086 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9087 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9089 2014-09-16 Gary Benson <gbenson@redhat.com>
9091 * inferiors.h (current_inferior): Renamed as...
9092 (current_thread): New variable. All uses updated.
9093 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9094 (maybe_move_out_of_jump_pad): Likewise.
9095 (cancel_breakpoint): Likewise.
9096 (linux_low_filter_event): Likewise.
9097 (wait_for_sigstop): Likewise.
9098 (linux_resume_one_lwp): Likewise.
9099 (need_step_over_p): Likewise.
9100 (start_step_over): Likewise.
9101 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9102 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9103 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9104 and save_inferior as saved_thread.
9105 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9107 (regcache_invalidate_thread): Likewise.
9108 * remote-utils.c (prepare_resume_reply): Likewise.
9109 * thread-db.c (thread_db_get_tls_address): Likewise.
9110 (disable_thread_event_reporting): Likewise.
9111 (remove_thread_event_breakpoints): Likewise.
9112 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9114 * target.h (set_desired_inferior): Renamed as...
9115 (set_desired_thread): New declaration. All uses updated.
9116 * server.c (myresume): Updated comment to reference thread instead
9118 (handle_serial_event): Likewise.
9119 (handle_target_event): Likewise.
9121 2014-09-12 Tom Tromey <tromey@redhat.com>
9122 Gary Benson <gbenson@redhat.com>
9124 * regcache.h: Include common-regcache.h.
9125 (regcache_read_pc): Don't declare.
9126 * regcache.c (get_thread_regcache_for_ptid): New function.
9128 2014-09-11 Tom Tromey <tromey@redhat.com>
9129 Gary Benson <gbenson@redhat.com>
9131 * symbol.c: New file.
9132 * Makefile.in (SFILES): Add symbol.c.
9133 (OBS): Add symbol.o.
9135 2014-09-11 Gary Benson <gbenson@redhat.com>
9137 * target.c (target_stop_ptid, target_continue_ptid): New
9140 2014-09-11 Tom Tromey <tromey@redhat.com>
9141 Gary Benson <gbenson@redhat.com>
9143 * target.h: Include target/target.h.
9144 * target.c (target_read_memory, target_read_uint32)
9145 (target_write_memory): New functions.
9147 2014-09-11 Gary Benson <gbenson@redhat.com>
9149 * server.h (debug_hw_points): Don't declare.
9150 * server.c (debug_hw_points): Don't define. Replace all uses
9151 with show_debug_regs.
9152 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9153 all uses with show_debug_regs.
9155 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9157 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9158 endianness into account.
9159 (ppc_supply_ptrace_register): Likewise.
9161 2014-09-03 James Hogan <james.hogan@imgtec.com>
9163 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9164 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9166 2014-09-03 Gary Benson <gbenson@redhat.com>
9168 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9169 ALL_DEBUG_ADDRESS_REGISTERS.
9171 2014-09-02 Gary Benson <gbenson@redhat.com>
9173 * i386-low.h: Renamed as...
9174 * x86-low.h: New file. All type, function and variable name
9175 prefixes changed from "i386_" to "x86_". All references updated.
9176 * i386-low.c: Renamed as...
9177 * x86-low.c: New file. All type, function and variable name
9178 prefixes changed from "i386_" to "x86_". All references updated.
9180 2014-09-02 Gary Benson <gbenson@redhat.com>
9182 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9183 (x86_linux_new_thread): Likewise.
9185 2014-08-29 Gary Benson <gbenson@redhat.com>
9187 * server.h (setjmp.h): Do not include.
9188 (toplevel): Do not declare.
9189 (common-exceptions.h): Include.
9190 (cleanups.h): Likewise.
9191 * server.c (toplevel): Do not define.
9192 (exit_code): New static global.
9193 (detach_or_kill_for_exit_cleanup): New function.
9194 (main): New function. Original main renamed to...
9195 (captured_main): New function.
9196 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9198 2014-08-29 Gary Benson <gbenson@redhat.com>
9200 * Makefile.in (SFILES): Add common/common-exceptions.c.
9201 (OBS): Add common-exceptions.o.
9202 (common-exceptions.o): New rule.
9203 * utils.c (prepare_to_throw_exception): New function.
9205 2014-08-29 Gary Benson <gbenson@redhat.com>
9207 * config.in: Regenerate.
9208 * configure: Likewise.
9210 2014-08-29 Gary Benson <gbenson@redhat.com>
9212 * Makefile.in (SFILES): Add common/cleanups.c.
9214 (cleanups.o): New rule.
9216 2014-08-29 Gary Benson <gbenson@redhat.com>
9218 * utils.c (internal_vwarning): New function.
9220 2014-08-28 Gary Benson <gbenson@redhat.com>
9222 * utils.h (fatal): Remove declaration.
9223 * utils.c (fatal): Remove function.
9225 2014-08-28 Gary Benson <gbenson@redhat.com>
9227 * tracepoint.c (gdb_agent_init): Replace fatal with
9229 (initialize_tracepoint): Likewise.
9231 2014-08-28 Gary Benson <gbenson@redhat.com>
9233 * remote-utils.c (remote_prepare): Replace fatal with error.
9235 2014-08-28 Gary Benson <gbenson@redhat.com>
9237 * linux-low.c (linux_async): Replace fatal with warning.
9239 (linux_start_non_stop): Return -1 if linux_async failed.
9241 2014-08-28 Gary Benson <gbenson@redhat.com>
9243 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9245 (i386_dr_low_get_addr): Remove vague comment.
9246 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9249 2014-08-28 Gary Benson <gbenson@redhat.com>
9251 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9252 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9254 (linux_resume_one_lwp): Likewise.
9255 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9257 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9258 with internal_error.
9259 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9260 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9261 (find_register_by_name): Replace fatal with internal_error.
9262 (find_regno): Likewise.
9263 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9264 * thread-db.c (thread_db_create_event): Likewise.
9265 (thread_db_load_search): Likewise.
9266 (try_thread_db_load_1): Likewise.
9267 * tracepoint.c (get_jump_space_head): Replace fatal with
9269 (claim_trampoline_space): Likewise.
9270 (have_fast_tracepoint_trampoline_buffer): Likewise.
9271 (cmd_qtstart): Likewise.
9272 (stop_tracing): Likewise.
9273 (fast_tracepoint_collecting): Likewise.
9274 (target_malloc): Likewise.
9275 (download_tracepoint): Likewise.
9276 (download_trace_state_variables): Replace check with gdb_assert.
9277 (upload_fast_traceframes): Replace fatal with internal_error.
9279 2014-08-19 Tom Tromey <tromey@redhat.com>
9280 Gary Benson <gbenson@redhat.com>
9282 * Makefile.in (SFILES): Add common/common-debug.c.
9283 (OBS): Add common-debug.o.
9284 (common-debug.o): New rule.
9285 * debug.h (debug_printf): Don't declare.
9286 * debug.c (debug_printf): Renamed and rewritten as...
9287 (debug_vprintf): New function.
9289 2014-08-19 Gary Benson <gbenson@redhat.com>
9291 * utils.h: Do not include print-utils.h.
9293 2014-08-19 Tom Tromey <tromey@redhat.com>
9294 Gary Benson <gbenson@redhat.com>
9296 * server.h: Add static assertion.
9297 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9299 2014-08-19 Tom Tromey <tromey@redhat.com>
9300 Gary Benson <gbenson@redhat.com>
9302 * Makefile.in (SFILES): Add common/errors.c.
9303 (OBS): Add errors.o.
9304 (IPA_OBS): Add errors-ipa.o.
9305 (errors.o): New rule.
9306 (errors-ipa.o): Likewise.
9307 * utils.h (perror_with_name, error, warning): Don't declare.
9308 * utils.c (warning): Renamed and rewritten as...
9309 (vwarning): New function.
9310 (error): Renamed and rewritten as...
9311 (verror): New function.
9312 (internal_error): Renamed and rewritten as...
9313 (internal_verror): New function.
9315 2014-08-07 Gary Benson <gbenson@redhat.com>
9317 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9318 * configure: Regenerate.
9319 * config.in: Likewise.
9320 * server.h: Do not include errno.h.
9321 * event-loop.c: Likewise.
9322 * hostio-errno.c: Likewise.
9323 * linux-low.c: Likewise.
9324 * remote-utils.c: Likewise.
9325 * spu-low.c: Likewise.
9326 * utils.c: Likewise.
9327 * gdbreplay.c: Unconditionally include errno.h.
9329 2014-08-07 Gary Benson <gbenson@redhat.com>
9331 * server.h: Do not include string.h.
9332 * event-loop.c: Likewise.
9333 * linux-low.c: Likewise.
9334 * regcache.c: Likewise.
9335 * remote-utils.c: Likewise.
9336 * spu-low.c: Likewise.
9337 * utils.c: Likewise.
9339 2014-08-07 Gary Benson <gbenson@redhat.com>
9341 * server.h: Do not include gdb_assert.h.
9343 2014-08-07 Gary Benson <gbenson@redhat.com>
9345 * server.h: Do not include common-utils.h.
9347 2014-08-07 Gary Benson <gbenson@redhat.com>
9349 * server.h: Do not include ptid.h.
9350 * notif.h: Likewise.
9352 2014-08-07 Gary Benson <gbenson@redhat.com>
9354 * server.h: Do not include gdb_locale.h.
9356 2014-08-07 Gary Benson <gbenson@redhat.com>
9358 * server.h: Do not include gdb/signals.h.
9359 * win32-low.c: Likewise.
9361 2014-08-07 Gary Benson <gbenson@redhat.com>
9363 * server.h: Do not include pathmax.h.
9365 2014-08-07 Gary Benson <gbenson@redhat.com>
9367 * server.h: Do not include libiberty.h.
9368 * linux-bfin-low.c: Likewise.
9370 2014-08-07 Gary Benson <gbenson@redhat.com>
9372 * server.h: Do not include ansidecl.h.
9374 2014-08-07 Gary Benson <gbenson@redhat.com>
9376 * linux-x86-low.c: Do not include stddef.h.
9377 * lynx-ppc-low.c: Likewise.
9378 * tracepoint.c: Likewise.
9380 2014-08-07 Gary Benson <gbenson@redhat.com>
9382 * server.h: Do not include stdarg.h.
9383 * nto-low.c: Likewise.
9385 2014-08-07 Gary Benson <gbenson@redhat.com>
9387 * server.h: Do not include stdlib.h.
9388 * inferiors.c: Likewise.
9389 * linux-low.c: Likewise.
9390 * regcache.c: Likewise.
9391 * spu-low.c: Likewise.
9392 * tracepoint.c: Likewise.
9393 * utils.c: Likewise.
9395 2014-08-07 Gary Benson <gbenson@redhat.com>
9397 * server.h: Do not include stdio.h.
9398 * linux-low.c: Likewise.
9399 * remote-utils.c: Likewise.
9400 * spu-low.c: Likewise.
9401 * utils.c: Likewise.
9402 * wincecompat.c: Likewise.
9404 2014-08-06 Gary Benson <gbenson@redhat.com>
9406 * regcache.c (init_register_cache): Move conditionals inside if.
9408 2014-08-06 Gary Benson <gbenson@redhat.com>
9410 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9412 2014-07-31 Gary Benson <gbenson@redhat.com>
9414 * ax.h: Do not include server.h.
9415 * gdbthread.h: Likewise.
9416 * lynx-low.h: Likewise.
9417 * notif.h: Likewise.
9419 2014-07-30 Gary Benson <gbenson@redhat.com>
9421 * server.h: Include common-defs.h.
9422 Do not include config.h or build-gnulib-gdbserver/config.h.
9424 2014-07-30 Gary Benson <gbenson@redhat.com>
9426 * hostio-errno.c: Move server.h to top of includes list.
9427 * inferiors.c: Likewise.
9428 * linux-x86-low.c: Likewise.
9429 * notif.c: Include server.h.
9431 2014-07-24 Tom Tromey <tromey@redhat.com>
9432 Gary Benson <gbenson@redhat.com>
9434 * server.h (CORE_ADDR): Now unsigned.
9436 2014-07-16 Pedro Alves <palves@redhat.com>
9438 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9440 2014-07-15 Pedro Alves <palves@redhat.com>
9442 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9445 2014-07-11 Pedro Alves <palves@redhat.com>
9447 * linux-low.c (kill_wait_lwp): New function, based on
9448 kill_one_lwp_callback, but use my_waitpid directly.
9449 (kill_one_lwp_callback, linux_kill): Use it.
9451 2014-06-23 Pedro Alves <palves@redhat.com>
9453 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9454 before setting DR0..DR3.
9456 2014-06-20 Gary Benson <gbenson@redhat.com>
9458 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9459 * configure: Regenerated.
9460 * config.in: Likewise.
9462 2014-06-20 Gary Benson <gbenson@redhat.com>
9464 * Makefile.in (SFILES): Update locations for files moved
9466 (object file files): Reordered.
9468 2014-06-20 Gary Benson <gbenson@redhat.com>
9470 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9471 (i386_dr_low_set_addr): Likewise.
9472 (i386_dr_low_get_addr): Likewise.
9473 (i386_dr_low_can_set_control): Likewise.
9474 (i386_dr_low_set_control): Likewise.
9475 (i386_dr_low_get_control): Likewise.
9476 (i386_dr_low_get_status): Likewise.
9477 (i386_get_debug_register_length): Likewise.
9478 * linux-x86-low.c (i386_dr_low_set_addr):
9479 Changed signature. Made static.
9480 (i386_dr_low_get_addr): Likewise.
9481 (i386_dr_low_set_control): Likewise.
9482 (i386_dr_low_get_control): Likewise.
9483 (i386_dr_low_get_status): Likewise.
9484 (i386_dr_low): New global variable.
9485 * win32-i386-low.c (i386_dr_low_set_addr):
9486 Changed signature. Made static.
9487 (i386_dr_low_get_addr): Likewise.
9488 (i386_dr_low_set_control): Likewise.
9489 (i386_dr_low_get_control): Likewise.
9490 (i386_dr_low_get_status): Likewise.
9491 (i386_dr_low): New global variable.
9493 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9495 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9496 * Makefile.in (AR, AR_FLAGS): Define.
9497 * configure: Regenerate.
9499 2014-06-19 Gary Benson <gbenson@redhat.com>
9501 * Makefile.in (i386-dregs.o): New rule.
9502 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9503 * i386-low.c (target.h): Remove include.
9504 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9505 (DR_CONTROL_SHIFT): Likewise.
9506 (DR_CONTROL_SIZE): Likewise.
9507 (DR_RW_EXECUTE): Likewise.
9508 (DR_RW_WRITE): Likewise.
9509 (DR_RW_READ): Likewise.
9510 (DR_RW_IORW): Likewise.
9511 (DR_LEN_1): Likewise.
9512 (DR_LEN_2): Likewise.
9513 (DR_LEN_4): Likewise.
9514 (DR_LEN_8): Likewise.
9515 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9516 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9517 (DR_ENABLE_SIZE): Likewise.
9518 (DR_LOCAL_SLOWDOWN): Likewise.
9519 (DR_GLOBAL_SLOWDOWN): Likewise.
9520 (DR_CONTROL_RESERVED): Likewise.
9521 (I386_DR_CONTROL_MASK): Likewise.
9522 (I386_DR_VACANT): Likewise.
9523 (I386_DR_LOCAL_ENABLE): Likewise.
9524 (I386_DR_GLOBAL_ENABLE): Likewise.
9525 (I386_DR_DISABLE): Likewise.
9526 (I386_DR_SET_RW_LEN): Likewise.
9527 (I386_DR_GET_RW_LEN): Likewise.
9528 (I386_DR_WATCH_HIT): Likewise.
9529 (i386_wp_op_t): Likewise.
9530 (i386_show_dr): Likewise.
9531 (i386_length_and_rw_bits): Likewise.
9532 (i386_insert_aligned_watchpoint): Likewise.
9533 (i386_remove_aligned_watchpoint): Likewise.
9534 (i386_handle_nonaligned_watchpoint): Likewise.
9535 i386_update_inferior_debug_regs(): Likewise.
9536 (i386_dr_insert_watchpoint): Likewise.
9537 (i386_dr_remove_watchpoint): Likewise.
9538 (i386_dr_region_ok_for_watchpoint): Likewise.
9539 (i386_dr_stopped_data_address): Likewise.
9540 (i386_dr_stopped_by_watchpoint): Likewise.
9542 2014-06-19 Gary Benson <gbenson@redhat.com>
9544 * i386-low.c (i386_dr_show): Renamed to
9545 i386_show_dr and made static. All uses updated.
9546 (i386_dr_length_and_rw_bits): Renamed to
9547 i386_length_and_rw_bits and made static.
9549 (i386_dr_insert_aligned_watchpoint): Renamed to
9550 i386_insert_aligned_watchpoint and made static.
9552 (i386_dr_remove_aligned_watchpoint): Renamed to
9553 i386_remove_aligned_watchpoint and made static.
9555 (i386_dr_update_inferior_debug_regs): Renamed to
9556 i386_update_inferior_debug_regs and made static.
9559 2014-06-18 Gary Benson <gbenson@redhat.com>
9561 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9562 (i386_dr_low_can_set_control): Likewise.
9563 (i386_get_debug_register_length): Likewise.
9564 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9565 (i386_dr_low_can_set_control): Likewise.
9566 (i386_get_debug_register_length): Likewise.
9568 2014-06-17 Gary Benson <gbenson@redhat.com>
9570 * i386-low.h (i386-dregs.h): New include.
9571 (DR_FIRSTADDR): Now in i386-dregs.h.
9572 (DR_LASTADDR): Likewise.
9573 (DR_NADDR): Likewise.
9574 (DR_STATUS): Likewise.
9575 (DR_CONTROL): Likewise.
9576 (i386_debug_reg_state): Likewise.
9577 (i386_dr_insert_watchpoint): Likewise.
9578 (i386_dr_remove_watchpoint): Likewise.
9579 (i386_dr_region_ok_for_watchpoint): Likewise.
9580 (i386_dr_stopped_data_address): Likewise.
9581 (i386_dr_stopped_by_watchpoint): Likewise.
9582 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9584 2014-06-18 Gary Benson <gbenson@redhat.com>
9586 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9587 i386_dr_insert_watchpoint.
9588 (i386_low_remove_watchpoint): Renamed to
9589 i386_dr_remove_watchpoint.
9590 (i386_low_region_ok_for_watchpoint): Renamed to
9591 i386_dr_region_ok_for_watchpoint.
9592 (i386_low_stopped_data_address): Renamed to
9593 i386_dr_stopped_data_address.
9594 (i386_low_stopped_by_watchpoint): Renamed to
9595 i386_dr_stopped_by_watchpoint.
9596 * i386-low.c (i386_show_dr): Renamed to
9597 i386_dr_show and made nonstatic. All uses updated.
9598 (i386_length_and_rw_bits): Renamed to
9599 i386_dr_length_and_rw_bits and made nonstatic.
9601 (i386_insert_aligned_watchpoint): Renamed to
9602 i386_dr_insert_aligned_watchpoint and made nonstatic.
9604 (i386_remove_aligned_watchpoint): Renamed to
9605 i386_dr_remove_aligned_watchpoint and made nonstatic.
9607 (i386_update_inferior_debug_regs): Renamed to
9608 i386_dr_update_inferior_debug_regs and made nonstatic.
9610 (i386_low_insert_watchpoint): Renamed to
9611 i386_dr_insert_watchpoint. All uses updated.
9612 (i386_low_remove_watchpoint): Renamed to
9613 i386_dr_remove_watchpoint. All uses updated.
9614 (i386_low_region_ok_for_watchpoint): Renamed to
9615 i386_dr_region_ok_for_watchpoint. All uses updated.
9616 (i386_low_stopped_data_address): Renamed to
9617 i386_dr_stopped_data_address. All uses updated.
9618 (i386_low_stopped_by_watchpoint): Renamed to
9619 i386_dr_stopped_by_watchpoint. All uses updated.
9621 2014-06-18 Gary Benson <gbenson@redhat.com>
9623 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9624 (i386_dr_low_can_set_control): Likewise.
9625 (i386_insert_aligned_watchpoint): New check.
9627 2014-06-18 Gary Benson <gbenson@redhat.com>
9629 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9632 2014-06-18 Gary Benson <gbenson@redhat.com>
9634 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9635 instead of fatal and error.
9636 (i386_handle_nonaligned_watchpoint): Likewise.
9638 2014-06-18 Gary Benson <gbenson@redhat.com>
9640 * i386-low.c (i386_get_debug_register_length): New macro.
9641 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9642 (i386_show_dr): Use debug_printf instead of fprintf. Use
9643 phex to format values.
9645 2014-06-18 Gary Benson <gbenson@redhat.com>
9647 * i386-low.h: Comment changes.
9648 * i386-low.c: Likewise.
9650 2014-06-18 Gary Benson <gbenson@redhat.com>
9652 * i386-low.c: Whitespace changes.
9654 2014-06-12 Tom Tromey <tromey@redhat.com>
9656 * utils.c (freeargv): Remove.
9658 2014-06-12 Tom Tromey <tromey@redhat.com>
9660 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9661 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9662 (parse_debug_format_options): Likewise.
9663 (gdbserver_usage): Likewise.
9664 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9665 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9666 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9668 ($(LIBGNU)): Depend on libiberty.
9669 (all-lib): Recurse into all subdirs.
9670 (install-only): Invoke "install" target in subdirs.
9671 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9673 * configure: Rebuild.
9674 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9675 for vasprintf, vsnprintf, or gettimeofday.
9676 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9679 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9681 * development.sh: Delete.
9682 * Makefile.in (config.status): Adjust dependency on development.sh.
9683 * configure.ac: Adjust development.sh source call.
9684 * configure: Regenerate.
9686 2014-06-02 Pedro Alves <palves@redhat.com>
9688 * ax.c (gdb_free_agent_expr): New function.
9689 * ax.h (gdb_free_agent_expr): New declaration.
9690 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9692 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9694 (clear_breakpoint_conditions_and_commands): New function.
9695 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9696 (clear_breakpoint_conditions_and_commands): New declaration.
9698 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9700 * linux-aarch64-low.c (asm/ptrace.h): Include.
9702 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9704 Fix TLS access for -static -pthread.
9705 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9706 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9707 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9709 2014-05-20 Pedro Alves <palves@redhat.com>
9711 * linux-aarch64-low.c (aarch64_insert_point)
9712 (aarch64_remove_point): No longer check whether the type is
9713 supported here. Adjust to new interface.
9714 (the_low_target): Install aarch64_supports_z_point_type as
9715 supports_z_point_type method.
9716 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9717 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9718 instead of a Z packet char. Adjust.
9719 (arm_supports_z_point_type): New function.
9720 (arm_insert_point, arm_remove_point): Adjust to new interface.
9721 (the_low_target): Install arm_supports_z_point_type.
9722 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9723 (cris_insert_point, cris_remove_point): Adjust to new interface.
9724 Don't check whether the type is supported here.
9725 (the_low_target): Install cris_supports_z_point_type.
9726 * linux-low.c (linux_supports_z_point_type): New function.
9727 (linux_insert_point, linux_remove_point): Adjust to new interface.
9728 * linux-low.h (struct linux_target_ops) <insert_point,
9729 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9730 raw_breakpoint pointer parameter.
9731 <supports_z_point_type>: New method.
9732 * linux-mips-low.c (mips_supports_z_point_type): New function.
9733 (mips_insert_point, mips_remove_point): Adjust to new interface.
9734 Use mips_supports_z_point_type.
9735 (the_low_target): Install mips_supports_z_point_type.
9736 * linux-ppc-low.c (the_low_target): Install NULL as
9737 supports_z_point_type method.
9738 * linux-s390-low.c (the_low_target): Install NULL as
9739 supports_z_point_type method.
9740 * linux-sparc-low.c (the_low_target): Install NULL as
9741 supports_z_point_type method.
9742 * linux-x86-low.c (x86_supports_z_point_type): New function.
9743 (x86_insert_point): Adjust to new insert_point interface. Use
9744 insert_memory_breakpoint. Adjust to new
9745 i386_low_insert_watchpoint interface.
9746 (x86_remove_point): Adjust to remove_point interface. Use
9747 remove_memory_breakpoint. Adjust to new
9748 i386_low_remove_watchpoint interface.
9749 (the_low_target): Install x86_supports_z_point_type.
9750 * lynx-low.c (lynx_target_ops): Install NULL as
9751 supports_z_point_type callback.
9752 * nto-low.c (nto_supports_z_point_type): New.
9753 (nto_insert_point, nto_remove_point): Adjust to new interface.
9754 (nto_target_ops): Install nto_supports_z_point_type.
9755 * mem-break.c: Adjust intro comment.
9756 (struct raw_breakpoint) <raw_type, size>: New fields.
9757 <inserted>: Update comment.
9758 <shlib_disabled>: Delete field.
9759 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9760 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9761 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9762 (raw_bkpt_type_to_target_hw_bp_type): New function.
9763 (find_enabled_raw_code_breakpoint_at): New function.
9764 (find_raw_breakpoint_at): New type and size parameters. Use them.
9765 (insert_memory_breakpoint): New function, based off
9766 set_raw_breakpoint_at.
9767 (remove_memory_breakpoint): New function.
9768 (set_raw_breakpoint_at): Reimplement.
9769 (set_breakpoint): New, based on set_breakpoint_at.
9770 (set_breakpoint_at): Reimplement.
9771 (delete_raw_breakpoint): Go through the_target->remove_point
9772 instead of assuming memory breakpoints.
9773 (find_gdb_breakpoint_at): Delete.
9774 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9775 (find_gdb_breakpoint): New function.
9776 (set_gdb_breakpoint_at): Delete.
9777 (z_type_supported): New function.
9778 (set_gdb_breakpoint_1): New function, loosely based off
9779 set_gdb_breakpoint_at.
9780 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9781 (delete_gdb_breakpoint_at): Delete.
9782 (delete_gdb_breakpoint_1): New function, loosely based off
9783 delete_gdb_breakpoint_at.
9784 (delete_gdb_breakpoint): New function.
9785 (clear_gdb_breakpoint_conditions): Rename to ...
9786 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9788 (add_condition_to_breakpoint): Make static.
9789 (add_breakpoint_condition): Take a struct breakpoint pointer
9790 instead of an address. Adjust.
9791 (gdb_condition_true_at_breakpoint): Rename to ...
9792 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9794 (gdb_condition_true_at_breakpoint): Reimplement.
9795 (add_breakpoint_commands): Take a struct breakpoint pointer
9796 instead of an address. Adjust.
9797 (gdb_no_commands_at_breakpoint): Rename to ...
9798 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9799 parameter. Return true if no breakpoint was found. Change debug
9801 (gdb_no_commands_at_breakpoint): Reimplement.
9802 (run_breakpoint_commands): Rename to ...
9803 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9804 and change return type to boolean.
9805 (run_breakpoint_commands): New function.
9806 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9807 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9808 breakpoint. Go through the_target->remove_point instead of
9809 assuming memory breakpoint.
9810 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9811 software and hardware breakpoints.
9812 (reinsert_raw_breakpoint): Go through the_target->insert_point
9813 instead of assuming memory breakpoint.
9814 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9815 software and hardware breakpoints.
9816 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9817 Check both software and hardware breakpoints.
9818 (validate_inserted_breakpoint): Assert the breakpoint is a
9819 software breakpoint. Set the inserted flag to -1 instead of
9820 setting shlib_disabled.
9821 (delete_disabled_breakpoints): Adjust.
9822 (validate_breakpoints): Only validate software breakpoints.
9823 Adjust to inserted flag change.
9824 (check_mem_read, check_mem_write): Skip breakpoint types other
9825 than software breakpoints. Adjust to inserted flag change.
9826 * mem-break.h (enum raw_bkpt_type): New enum.
9827 (raw_breakpoint, struct process_info): Forward declare.
9828 (Z_packet_to_target_hw_bp_type): Delete declaration.
9829 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9830 (set_gdb_breakpoint, delete_gdb_breakpoint)
9831 (clear_breakpoint_conditions): New declarations.
9832 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9833 (breakpoint_inserted_here): Update comment.
9834 (add_breakpoint_condition, add_breakpoint_commands): Replace
9835 address parameter with a breakpoint pointer parameter.
9836 (gdb_breakpoint_here): Update comment.
9837 (delete_gdb_breakpoint_at): Delete.
9838 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9839 * server.c (process_point_options): Take a struct breakpoint
9840 pointer instead of an address. Adjust.
9841 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9842 delete_gdb_breakpoint.
9843 * spu-low.c (spu_target_ops): Install NULL as
9844 supports_z_point_type method.
9845 * target.h: Include mem-break.h.
9846 (struct target_ops) <prepare_to_access_memory>: Update comment.
9847 <supports_z_point_type>: New field.
9848 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9849 instead of a char. Also take a raw breakpoint pointer.
9850 * win32-arm-low.c (the_low_target): Install NULL as
9851 supports_z_point_type.
9852 * win32-i386-low.c (i386_supports_z_point_type): New function.
9853 (i386_insert_point, i386_remove_point): Adjust to new interface.
9854 (the_low_target): Install i386_supports_z_point_type.
9855 * win32-low.c (win32_supports_z_point_type): New function.
9856 (win32_insert_point, win32_remove_point): Adjust to new interface.
9857 (win32_target_ops): Install win32_supports_z_point_type.
9858 * win32-low.h (struct win32_target_ops):
9859 <supports_z_point_type>: New method.
9860 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9861 instead of a char. Also take a raw breakpoint pointer.
9863 2014-05-20 Pedro Alves <palves@redhat.com>
9865 * mem-break.h: Include break-common.h.
9866 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9867 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9868 (Z_packet_to_target_hw_bp_type): New declaration.
9869 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9870 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9871 (Z_PACKET_ACCESS_WP): Delete macros.
9872 (Z_packet_to_hw_type): Delete function.
9873 * i386-low.h: Don't include break-common.h here.
9874 (Z_packet_to_hw_type): Delete declaration.
9875 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9876 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9877 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9878 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9879 * linux-aarch64-low.c: Don't include break-common.h here.
9880 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9881 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9882 (Z_packet_to_target_hw_bp_type): Delete function.
9883 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9885 (mips_insert_point, mips_remove_point): Use
9886 Z_packet_to_target_hw_bp_type.
9888 2014-05-20 Pedro Alves <palves@redhat.com>
9890 * linux-aarch64-low.c: Include break-common.h.
9891 (enum target_point_type): Delete.
9892 (Z_packet_to_point_type): Rename to ...
9893 (Z_packet_to_target_hw_bp_type): ... this, and return a
9894 target_hw_bp_type instead.
9895 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9896 instead of an enum target_point_type.
9897 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9899 (aarch64_dr_state_insert_one_point)
9900 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9901 (aarch64_handle_aligned_watchpoint)
9902 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9903 Take an enum target_hw_bp_type instead of an enum
9905 (aarch64_supports_z_point_type): New function.
9906 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9907 use Z_packet_to_target_hw_bp_type.
9909 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9911 * configure.ac: Only use -Werror by default when DEVELOPMENT
9913 * configure: Regenerate.
9915 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9917 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9918 * linux-x86-low.c (X86_64_USER_REGS): New.
9919 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9921 2014-04-28 Yao Qi <yao@codesourcery.com>
9923 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9926 2014-04-25 Pedro Alves <palves@redhat.com>
9929 * linux-low.c (linux_attach_fail_reason_string): New function.
9930 (linux_attach_lwp): Delete.
9931 (linux_attach_lwp_1): Rename to ...
9932 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9933 argument. Remove "initial" parameter. Return int instead of
9934 void. Don't error or warn here.
9935 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9936 failure to attach to the tgid. Call warning when failing to
9938 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9939 argument. Remove "initial" parameter. Return int instead of
9940 void. Don't error or warn here.
9941 (linux_attach_fail_reason_string): New declaration.
9942 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9943 interface change. Use linux_attach_fail_reason_string.
9945 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9946 Walfred Tedeschi <walfred.tedeschi@intel.com>
9948 * Makefile.in: Added rules to handle new files
9949 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9950 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9951 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9952 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9953 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9954 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9956 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9957 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9958 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9959 i386/x32-avx512.xml.
9960 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9961 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9962 i386/x32-avx512-linux.xml.
9963 * i387-fp.c (num_avx512_k_registers): New constant for number
9965 (num_avx512_zmmh_low_registers): New constant for number of
9966 lower ZMM registers (0-15).
9967 (num_avx512_zmmh_high_registers): New constant for number of
9968 higher ZMM registers (16-31).
9969 (num_avx512_ymmh_registers): New contant for number of higher
9970 YMM registers (ymm16-31 added by avx521 on x86_64).
9971 (num_avx512_xmm_registers): New constant for number of higher
9972 XMM registers (xmm16-31 added by AVX512 on x86_64).
9973 (struct i387_xsave): Add space for AVX512 registers.
9974 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9975 Add code to handle AVX512 registers.
9976 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9977 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9978 prototypei from generated file.
9979 (tdesc_amd64_avx512_linux): Likewise.
9980 (init_registers_x32_avx512_linux): Likewise.
9981 (tdesc_x32_avx512_linux): Likewise.
9982 (init_registers_i386_avx512_linux): Likewise.
9983 (tdesc_i386_avx512_linux): Likewise.
9984 (x86_64_regmap): Add AVX512 registers.
9985 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9987 (initialize_low_arch): Add code to initialize AVX512 registers.
9989 2014-04-23 Pedro Alves <palves@redhat.com>
9991 * mem-break.c (find_gdb_breakpoint_at): Make static.
9992 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9994 2014-04-23 Pedro Alves <palves@redhat.com>
9996 * i386-low.c: Don't include break-common.h here.
9997 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9998 prototype to take target_hw_bp_type as argument instead of a Z
10000 * i386-low.h: Include break-common.h here.
10001 (Z_packet_to_hw_type): Declare.
10002 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10004 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10005 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10006 (x86_remove_point): Convert the packet number to a
10007 target_hw_bp_type before calling i386_low_remove_watchpoint.
10008 * win32-i386-low.c (i386_insert_point): Convert the packet number
10009 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10010 (i386_remove_point): Convert the packet number to a
10011 target_hw_bp_type before calling i386_low_remove_watchpoint.
10013 2014-04-23 Pedro Alves <palves@redhat.com>
10015 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10017 2014-04-10 Pedro Alves <palves@redhat.com>
10019 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10020 Check if the condition or command is NULL before checking if the
10021 breakpoint is known. On success, return true.
10022 * mem-break.h (add_breakpoint_condition): Document return.
10023 (add_breakpoint_commands): Add describing comment.
10024 * server.c (skip_to_semicolon): New function.
10025 (process_point_options): Use it.
10027 2014-04-09 Pedro Alves <palves@redhat.com>
10029 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10032 2014-02-27 Pedro Alves <palves@redhat.com>
10035 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10037 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10039 (last_thread_of_process_p): Take a PID argument instead of a
10041 (linux_wait_for_lwp): Delete.
10042 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10044 (linux_low_filter_event): New function, party factored out from
10045 linux_wait_for_event.
10046 (linux_wait_for_event): Rename to ...
10047 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10048 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10049 sigsuspend. Check for zombie leaders.
10050 (linux_wait_for_event): Reimplement as wrapper around
10051 linux_wait_for_event_filtered.
10052 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10053 a normal or signal exit is seen, it's the whole process exiting.
10054 (wait_for_sigstop): No longer a for_each_inferior callback.
10055 Rewrite on top of linux_wait_for_event_filtered.
10056 (stop_all_lwps): Call wait_for_sigstop directly.
10057 * server.c (resume, handle_target_event): Handle
10058 TARGET_WAITKIND_NO_RESUMED.
10060 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10062 * win32-low.c (psapi_get_dll_name,
10063 * win32_CreateToolhelp32Snapshot): Delete.
10064 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10065 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10067 (handle_load_dll): Add function description.
10068 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10070 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10072 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10074 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10075 base address when calling win32_add_one_solib.
10076 (handle_load_dll): Delete local variable load_addr.
10077 Remove 0x1000 offset applied to DLL base address when calling
10078 win32_add_one_solib.
10079 (handle_unload_dll): Add comment.
10081 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10083 * win32-low.c (win32_add_all_dlls): Renames
10084 win32_ensure_ntdll_loaded. Rewrite function documentation.
10085 Adjust implementation to always load all DLLs.
10086 Add 0x1000 offset to DLL base address when calling
10087 win32_add_one_solib.
10088 (child_initialization_done): New static global.
10089 (do_initial_child_stuff): Set child_initialization_done to
10090 zero during child initialization, and 1 after. Replace call
10091 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10093 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10094 (handle_unload_dll): Add function documentation.
10095 (get_child_debug_event): Ignore load and unload DLL events
10096 during child initialization.
10098 2014-02-20 Doug Evans <dje@google.com>
10100 Remove global all_lwps.
10101 * inferiors.h (ptid_of): Move here from linux-low.h.
10102 (pid_of, lwpid_of): Ditto.
10103 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10104 parameter is a struct thread_info * now.
10105 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10106 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10107 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10109 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10110 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10111 * linux-arm-low.c (update_registers_callback): Update, "entry"
10112 parameter is a struct thread_info * now.
10113 Fetch lwpid from current_inferior directly.
10114 (arm_insert_point): Pass &all_threads to find_inferior instead of
10116 (arm_remove_point): Ditto.
10117 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10118 (arm_prepare_to_resume): Fetch pid from thread.
10119 (arm_read_description): Fetch lwpid from current_inferior directly.
10120 * linux-low.c (all_lwps): Delete.
10121 (delete_lwp): Delete call to remove_inferior.
10122 (handle_extended_wait): Fetch lwpid from thread.
10123 (add_lwp): Don't set lwp->entry.id. Remove call to
10124 add_inferior_to_list.
10125 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10126 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10127 (kill_one_lwp_callback): Ditto.
10128 (linux_kill): Don't dereference NULL pointer.
10129 Fetch ptid,lwpid from thread.
10130 (get_detach_signal): Fetch ptid from thread.
10131 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10132 Simplify call to regcache_invalidate_thread.
10133 (delete_lwp_callback): Update, "entry" parameter is a
10134 struct thread_info * now. Fetch pid from thread.
10135 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10136 (status_pending_p_callback): Update, "entry" parameter is a
10137 struct thread_info * now. Fetch ptid from thread.
10138 (find_lwp_pid): Update, "entry" parameter is a
10139 struct thread_info * now.
10140 (linux_wait_for_lwp): Fetch pid from thread.
10141 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10142 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10143 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10144 (dequeue_one_deferred_signal): Ditto.
10145 (cancel_breakpoint): Fetch ptid from current_inferior.
10146 (linux_wait_for_event): Pass &all_threads to find_inferior,
10147 not &all_lwps. Fetch ptid, lwpid from thread.
10148 (count_events_callback): Update, "entry" parameter is a
10149 struct thread_info * now.
10150 (select_singlestep_lwp_callback): Ditto.
10151 (select_event_lwp_callback): Ditto.
10152 (cancel_breakpoints_callback): Ditto.
10153 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10155 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10156 (unsuspend_one_lwp): Update, "entry" parameter is a
10157 struct thread_info * now.
10158 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10160 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10161 Fetch lwpid from thread, not lwp.
10162 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10163 Pass &all_threads to find_inferior, not &all_lwps.
10164 (send_sigstop): Fetch lwpid from thread, not lwp.
10165 (send_sigstop_callback): Update, "entry" parameter is a
10166 struct thread_info * now.
10167 (suspend_and_send_sigstop_callback): Ditto.
10168 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10169 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10170 struct thread_info * now.
10171 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10173 (lwp_running): Update, "entry" parameter is a
10174 struct thread_info * now.
10175 (stop_all_lwps): Fetch ptid from thread.
10176 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10177 (linux_resume_one_lwp): Fetch lwpid from thread.
10178 (linux_set_resume_request): Update, "entry" parameter is a
10179 struct thread_info * now. Fetch pid, lwpid from thread.
10180 (resume_status_pending_p): Update, "entry" parameter is a
10181 struct thread_info * now.
10182 (need_step_over_p): Ditto. Fetch lwpid from thread.
10183 (start_step_over): Fetch lwpid from thread.
10184 (linux_resume_one_thread): Update, "entry" parameter is a
10185 struct thread_info * now. Fetch lwpid from thread.
10186 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10187 (proceed_one_lwp): Update, "entry" parameter is a
10188 struct thread_info * now. Fetch lwpid from thread.
10189 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10190 struct thread_info * now.
10191 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10192 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10193 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10195 (regsets_store_inferior_registers): Ditto.
10196 (fetch_register, store_register): Ditto.
10197 (linux_read_memory, linux_write_memory): Ditto.
10198 (linux_request_interrupt): Ditto.
10199 (linux_read_auxv): Ditto.
10200 (linux_xfer_siginfo): Ditto.
10201 (linux_qxfer_spu): Ditto.
10202 (linux_qxfer_libraries_svr4): Ditto.
10203 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10204 moved to inferiors.h.
10206 (get_thread_lwp): Update.
10207 (struct lwp_info): Delete member "entry". Simplify comment for
10209 (all_lwps): Delete.
10210 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10211 current_inferior directly.
10212 (update_watch_registers_callback): Update, "entry" parameter is a
10213 struct thread_info * now. Fetch pid from thread.
10214 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10215 (mips_insert_point): Fetch lwpid from current_inferior.
10216 Pass &all_threads to find_inferior, not &all_lwps.
10217 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10218 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10220 (mips_stopped_data_address): Ditto.
10221 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10223 * linux-tile-low.c (tile_arch_setup): Ditto.
10224 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10225 (update_debug_registers_callback): Update, "entry" parameter is a
10226 struct thread_info * now. Fetch pid from thread.
10227 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10228 Pass &all_threads to find_inferior, not &all_lwps.
10229 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10230 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10231 Pass &all_threads to find_inferior, not &all_lwps.
10232 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10233 (i386_dr_low_get_status): Ditto.
10234 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10235 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10236 (x86_linux_read_description): Ditto.
10237 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10239 2014-02-20 Doug Evans <dje@google.com>
10241 * inferiors.c (get_first_inferior): Fix buglet.
10243 2014-02-19 Doug Evans <dje@google.com>
10245 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10246 * inferiors.c (add_thread): Change result type to struct thread_info *.
10247 All callers updated.
10248 (add_lwp): Call add_thread here instead of in callers.
10249 All callers updated.
10250 * linux-low.h (get_lwp_thread): Rewrite.
10251 (struct lwp_info): New member "thread".
10253 2014-02-19 Doug Evans <dje@google.com>
10255 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10256 All callers updated.
10258 2014-02-19 Doug Evans <dje@google.com>
10260 * inferiors.c (add_thread): Fix whitespace.
10262 2014-02-19 Doug Evans <dje@google.com>
10264 * dll.c (clear_dlls): Replace accessing list implemention details
10266 * gdbthread.h (get_first_thread): Declare.
10267 * inferiors.c (for_each_inferior_with_data): New function.
10268 (get_first_thread): New function.
10269 (find_thread_ptid): Simplify.
10270 (get_first_inferior): New function.
10271 (clear_list): Delete.
10272 (one_inferior_p): New function.
10273 (clear_inferior_list): New function.
10274 (clear_inferiors): Update.
10275 * inferiors.h (for_each_inferior_with_data): Declare.
10276 (clear_inferior_list): Declare.
10277 (one_inferior_p): Declare.
10278 (get_first_inferior): Declare.
10279 * linux-low.c (linux_wait_for_event): Replace accessing list
10280 implemention details with API function.
10281 * server.c (target_running): Ditto.
10282 (accumulate_file_name_length): New function.
10283 (emit_dll_description): New function.
10284 (handle_qxfer_libraries): Replace accessing list implemention
10285 details with API function.
10286 (handle_qxfer_threads_worker): New function.
10287 (handle_qxfer_threads_proper): Replace accessing list implemention
10288 details with API function.
10289 (handle_query): Ditto.
10290 (visit_actioned_threads_callback_ftype): New typedef.
10291 (visit_actioned_threads_data): New struct.
10292 (visit_actioned_threads): Rewrite to be find_inferior callback.
10293 (resume): Call find_inferior.
10294 (handle_status): Replace accessing list implemention
10295 details with API function.
10296 (process_serial_event): Replace accessing list implemention details
10298 * target.c (set_desired_inferior): Replace accessing list implemention
10299 details with API function.
10300 * tracepoint.c (same_process_p): New function.
10301 (gdb_agent_about_to_close): Replace accessing list implemention
10302 details with API function.
10303 * win32-low.c (child_delete_thread): Replace accessing list
10304 implemention details with API function.
10305 (match_dll_by_basename): New function.
10306 (dll_is_loaded_by_basename): New function.
10307 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10308 details call to dll_is_loaded_by_basename.
10310 2014-02-19 Doug Evans <dje@google.com>
10312 * dll.h (struct dll_info): Add comment.
10313 * gdbthread.h (struct thread_info): Add comment.
10314 (current_ptid): Simplify.
10315 * inferiors.c (add_process): Update.
10316 (remove_process): Update.
10317 * inferiors.h (struct process_info): Rename member "head" to "entry".
10318 * linux-low.c (delete_lwp): Update.
10320 (last_thread_of_process_p): Update.
10321 (kill_one_lwp_callback, linux_kill): Update.
10322 (status_pending_p_callback): Update.
10323 (wait_for_sigstop): Update. Simplify read of ptid.
10324 (start_step_over): Update.
10325 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10326 (get_lwp_thread): Update.
10327 (struct lwp_info): Rename member "head" to "entry".
10328 * regcache.h (inferior_list_entry): Delete.
10329 * server.c (kill_inferior_callback): Update.
10330 (detach_or_kill_inferior_callback): Update.
10331 (print_started_pid): Update.
10332 (print_attached_pid): Update.
10333 (process_serial_event): Simplify read of ptid.
10334 * thread-db.c (thread_db_create_event): Update.
10335 (thread_db_get_tls_address): Update.
10336 * win32-low.c (current_inferior_ptid): Simplify.
10338 2014-02-19 Tom Tromey <tromey@redhat.com>
10340 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10342 (target_supports_btrace): Update.
10344 2014-02-14 Yao Qi <yao@codesourcery.com>
10346 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10347 (rsp-low-ipa.o): New target.
10349 2014-02-12 Tom Tromey <tromey@redhat.com>
10351 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10352 convert_ascii_to_int.
10353 * regcache.c (registers_to_string): Likewise.
10354 * remote-utils.c (decode_M_packet): Likewise.
10355 * server.c (process_serial_event): Likewise.
10357 2014-02-12 Tom Tromey <tromey@redhat.com>
10359 * server.c (handle_query, handle_v_run): Use hex2bin, not
10361 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10363 2014-02-12 Tom Tromey <tromey@redhat.com>
10365 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10366 convert_int_to_ascii.
10367 * regcache.c (registers_to_string, collect_register_as_string):
10369 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10371 * server.c (process_serial_event): Likewise.
10372 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10373 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10375 2014-02-12 Tom Tromey <tromey@redhat.com>
10377 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10378 bin2hex, not hexify.
10379 * tracepoint.c (cmd_qtstatus): Likewise.
10381 2014-02-12 Tom Tromey <tromey@redhat.com>
10383 * remote-utils.c (monitor_output): Pass explicit length to
10386 2014-02-12 Tom Tromey <tromey@redhat.com>
10388 * tracepoint.c: Include rsp-low.h.
10389 * server.c: Include rsp-low.h.
10390 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10391 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10393 * remote-utils.c: Include rsp-low.h.
10394 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10395 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10396 (convert_int_to_ascii, convert_ascii_to_int): Move to
10398 * regcache.c: Include rsp-low.h.
10399 * ax.c: Include rsp-low.h.
10400 * Makefile.in (SFILES): Add common/rsp-low.c.
10401 (OBS): Add rsp-low.o.
10402 (rsp-low.o): New target.
10404 2014-02-12 Tom Tromey <tromey@redhat.com>
10406 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10407 Include print-utils.h.
10408 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10409 (plongest, thirty_two, phex_nz): Remove.
10410 * Makefile.in (SFILES): Add common/print-utils.c.
10411 (OBS): Add print-utils.o.
10412 (print-utils-ipa.o): New target.
10413 (print-utils.o): New target.
10414 (IPA_OBJS): Add print-utils-ipa.o.
10416 2014-02-06 Tom Tromey <tromey@redhat.com>
10418 * Makefile.in (SFILES): Fix indentation.
10420 2014-02-05 Doug Evans <dje@google.com>
10422 * linux-low.c (linux_wait_for_event): Improve comment.
10423 (linux_wait_1): Keep current_inferior in sync with event_child.
10425 2014-01-22 Doug Evans <dje@google.com>
10427 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10429 2014-01-22 Doug Evans <dje@google.com>
10431 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10432 * configure: Regenerate.
10433 * config.in: Regenerate.
10434 * Makefile.in (SFILES): Add debug.c.
10435 (OBS): Add debug.o.
10436 * debug.c: New file.
10437 * debug.h: New file.
10438 * linux-aarch64-low.c (*): Update all debugging printfs to use
10439 debug_printf instead of fprintf.
10440 * linux-arm-low.c (*): Ditto.
10441 * linux-cris-low.c (*): Ditto.
10442 * linux-crisv32-low.c (*): Ditto.
10443 * linux-m32r-low.c (*): Ditto.
10444 * linux-sparc-low.c (*): Ditto.
10445 * linux-x86.c (*): Ditto.
10446 * linux-low.c (*): Ditto.
10447 (linux_wait_1): Add calls to debug_enter, debug_exit.
10448 (linux_wait): Remove redundant debugging printf.
10449 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10450 (linux_resume, unstop_all_lwps): Ditto.
10451 * mem-break.c (*): Update all debugging printfs to use
10452 debug_printf instead of fprintf.
10453 * remote-utils.c (*): Ditto.
10454 * thread-db.c (*): Ditto.
10455 * server.c #include <ctype.h>, "gdb_vecs.h".
10456 (debug_threads): Moved to debug.c.
10457 (*): Update all debugging printfs to use debug_printf instead of
10459 (start_inferior): Replace call to fflush with call to debug_flush.
10460 (monitor_show_help): Mention set debug-format.
10461 (parse_debug_format_options): New function.
10462 (handle_monitor_command): Handle "monitor set debug-format".
10463 (gdbserver_usage): Mention --debug-format.
10464 (main): Parse --debug-format.
10465 * server.h (debug_threads): Declaration moved to debug.h.
10466 #include "debug.h".
10467 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10468 trace_debug_1 that uses debug_printf.
10469 (tracepoint_look_up_symbols): Update all debugging printfs to use
10470 debug_printf instead of fprintf.
10472 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10474 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10477 2014-01-17 Pedro Alves <palves@redhat.com>
10480 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10481 defined after including gdb_proc_service.h.
10483 2014-01-16 Doug Evans <dje@google.com>
10485 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10486 (match_dll): Use it.
10488 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10490 * target.h (target_ops) <read_btrace>: Change parameters and
10491 return type to allow error reporting.
10492 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10493 trace reading errors on.
10494 * linux-low.c (linux_low_read_btrace): Pass trace reading
10496 (linux_low_disable_btrace): New.
10498 2014-01-15 Doug Evans <dje@google.com>
10500 * inferiors.c (thread_id_to_gdb_id): Delete.
10501 * inferiors.h (thread_id_to_gdb_id): Delete.
10503 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10505 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10506 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10509 2014-01-08 Pedro Alves <palves@redhat.com>
10511 * server.c (handle_status): Don't discard previous queued stop
10512 replies or thread's pending status here.
10513 (main) <disconnection>: Do it here instead.
10515 2014-01-08 Pedro Alves <palves@redhat.com>
10517 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10518 * server.c (visit_actioned_threads, handle_pending_status): New
10520 (handle_v_cont): Factor out parts to ...
10521 (resume): ... this new function. If in all-stop, and a thread
10522 being resumed has a pending status, report it without actually
10524 (myresume): Adjust to use the new 'resume' function.
10525 (clear_pending_status_callback, set_pending_status_callback)
10526 (find_status_pending_thread_callback): New functions.
10527 (handle_status): Handle the case of multiple threads having
10528 interesting statuses to report. Report threads' real last signal
10529 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10530 with an interesting thread to report the status for, instead of
10531 always reporting the status of the first thread.
10533 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10535 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10536 * gdbreplay.c (gdbreplay_version): Likewise.
10538 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10540 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10541 iov.iov_len with the real length in use.
10543 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10545 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10546 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10547 for all targets that use win32-low.c.
10548 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10549 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10551 2013-12-13 Pedro Alves <palves@redhat.com>
10553 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10554 if equal to TARGET_WAITKIND_LOADED.
10555 * win32-low.c (cached_status): New static global.
10556 (win32_wait): Add declaration.
10557 (do_initial_child_stuff): Flush all initial pending debug events
10558 up to the initial breakpoint.
10559 (win32_wait): If CACHED_STATUS was set, return that instead
10560 of doing a real wait. Remove the code resuming the execution
10561 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10562 during the initial phase. Also remove the code changing
10563 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10564 TARGET_WAITKIND_STOPPED.
10566 2013-12-11 Yao Qi <yao@codesourcery.com>
10568 * notif.c (handle_notif_ack): Return 0 if no notification
10571 2013-11-20 Doug Evans <dje@google.com>
10573 * linux-low.c (linux_set_resume_request): Fix comment.
10575 2013-11-20 Doug Evans <dje@google.com>
10577 * linux-low.c (resume_status_pending_p): Tweak comment.
10579 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10581 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10582 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10583 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10584 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10585 (srv_amd64_regobj): Add amd64-mpx.o.
10586 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10587 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10588 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10589 * i387-fp.c (num_pl_bnd_register) Added constant.
10590 (num_pl_bnd_cfg_registers) Added constant.
10591 (struct i387_xsave) Added reserved area and MPX fields.
10592 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10593 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10595 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10596 (init_registers_amd64_mpx_linux): Declare new function.
10597 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10598 (x86_64_regmap): Add MPX registers.
10599 (x86_linux_read_description): Add MPX case.
10600 (initialize_low_arch): Initialize MPX targets.
10602 2013-11-18 Tom Tromey <tromey@redhat.com>
10604 * configure: Rebuild.
10605 * configure.ac: Don't check for stdlib.h.
10606 * gdbreplay.c: Unconditionally include stdlib.h.
10608 2013-11-18 Tom Tromey <tromey@redhat.com>
10610 * config.in: Rebuild.
10611 * configure: Rebuild.
10612 * configure.ac: Don't use AC_HEADER_DIRENT.
10614 2013-11-18 Tom Tromey <tromey@redhat.com>
10616 * server.h: Don't check HAVE_STRING_H.
10617 * gdbreplay.c: Don't check HAVE_STRING_H.
10618 * configure: Rebuild.
10620 2013-11-18 Tom Tromey <tromey@redhat.com>
10622 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10625 2013-11-08 Tom Tromey <tromey@redhat.com>
10627 * configure, config.in: Rebuild.
10628 * configure.ac: Remove unused configury.
10630 2013-11-08 Tom Tromey <tromey@redhat.com>
10632 * acinclude.m4: Include common.m4, codeset.m4.
10633 * configure, config.in: Rebuild.
10634 * configure.ac: Use GDB_AC_COMMON.
10636 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10638 * linux-s390-low.c (HWCAP_S390_TE): New define.
10639 (s390_arch_setup): Consider the TE field in the HWCAP for
10640 determining 'have_regset_tdb'.
10642 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10645 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10648 2013-10-02 Pedro Alves <palves@redhat.com>
10650 * server.c (process_serial_event): Don't output "GDBserver
10651 exiting" if GDB is connected through stdio.
10652 * target.c (mywait): Likewise, be silent if GDB is connected
10655 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10657 * lynx-low.c (lynx_add_threads_after_attach): New function.
10658 (lynx_attach): Remove call to add_thread. Add call to
10659 lynx_add_threads_after_attach instead.
10661 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10663 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10664 * config.in, configure: Regenerated.
10666 2013-09-18 Yao Qi <yao@codesourcery.com>
10669 * server.c (start_inferior): Clear 'resume_info'.
10671 2013-09-16 Jiong Wang <jiwang@tilera.com>
10673 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10676 2013-09-16 Jiong Wang <jiwang@tilera.com>
10678 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10679 linux-tile-low.o to srv_tgtobj.
10681 2013-09-16 Will Newton <will.newton@linaro.org>
10683 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10686 2013-09-06 Pedro Alves <palves@redhat.com>
10688 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10689 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10690 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10691 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10692 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10693 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10695 2013-09-06 Pedro Alves <palves@redhat.com>
10697 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10698 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10700 2013-09-06 Pedro Alves <palves@redhat.com>
10702 * linux-amd64-ipa.c: Include tracepoint.h.
10703 * linux-i386-ipa.c: Include tracepoint.h.
10705 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10707 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10708 (ps_get_thread_area): New function.
10710 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10712 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10713 (initialize_low_arch): Call init_registers_crisv32 rather than
10714 init_register_crisv32.
10716 2013-09-05 Pedro Alves <palves@redhat.com>
10718 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10720 * hostio.h: ... this new file.
10721 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10722 win32-low.c: Include hostio.h.
10724 2013-09-05 Pedro Alves <palves@redhat.com>
10726 * server.h (gdb_client_data, handler_func, callback_handler_func)
10727 (delete_file_handler, add_file_handler, append_callback_event)
10728 (delete_callback_event, start_event_loop, initialize_event_loop):
10729 Move to event-loop.h and include it.
10730 * event-loop.h: New file.
10732 2013-09-05 Pedro Alves <palves@redhat.com>
10734 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10735 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10736 (loaded_dll, unloaded_dll): Move to ...
10737 * dll.h: ... this new file.
10738 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10740 2013-09-05 Pedro Alves <palves@redhat.com>
10742 * server.h (current_process, get_thread_process, all_processes)
10743 (add_inferior_to_list, for_each_inferior, current_inferior)
10744 (remove_inferior, add_process, remove_process, find_process_pid)
10745 (have_started_inferiors_p, have_attached_inferiors_p)
10746 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10747 (clear_inferiors, find_inferior, find_inferior_id)
10748 (inferior_target_data, set_inferior_target_data)
10749 (inferior_regcache_data, set_inferior_regcache_data): Move to
10750 inferiors.h, and include it.
10751 * inferiors.h: New file.
10753 2013-09-05 Pedro Alves <palves@redhat.com>
10755 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10759 2013-09-05 Pedro Alves <palves@redhat.com>
10761 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10763 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10764 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10765 (handle_tracepoint_general_set, handle_tracepoint_query)
10766 (tracepoint_finished_step, tracepoint_was_hit)
10767 (release_while_stepping_state_list, current_traceframe)
10768 (in_readonly_region, traceframe_read_mem)
10769 (fetch_traceframe_registers, traceframe_read_sdata)
10770 (traceframe_read_info, struct fast_tpoint_collect_status)
10771 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10772 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10773 (supply_fast_tracepoint_registers)
10774 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10775 (ipa_tdesc, claim_trampoline_space)
10776 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10777 (agent_mem_read, agent_get_trace_state_variable_value)
10778 (agent_set_trace_state_variable_value, agent_tsv_read)
10779 (agent_mem_read_string, get_raw_reg_func_addr)
10780 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10781 * tracepoint.h: ... this new file.
10783 2013-09-05 Pedro Alves <palves@redhat.com>
10785 * server.h (perror_with_name, error, fatal, warning, paddress)
10786 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10788 * utils.h: New file.
10790 2013-09-05 Pedro Alves <palves@redhat.com>
10792 * server.h (remote_debug, noack_mode, transport_is_reliable)
10793 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10794 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10795 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10796 (write_enn, initialize_async_io, enable_async_io)
10797 (disable_async_io, check_remote_input_interrupt_request)
10798 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10799 (dead_thread_notify, prepare_resume_reply)
10800 (decode_address_to_semicolon, decode_address, decode_m_packet)
10801 (decode_M_packet, decode_X_packet, decode_xfer_write)
10802 (decode_search_memory_packet, unhexify, hexify)
10803 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10804 (look_up_one_symbol, relocate_instruction)
10805 (monitor_output): Move to remote-utils.h, and include it.
10806 * remote-utils.h: New file.
10808 2013-09-05 Pedro Alves <palves@redhat.com>
10810 * server.h (_): Delete.
10812 2013-09-02 Pedro Alves <palves@redhat.com>
10814 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10815 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10817 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10819 2013-09-02 Pierre Muller <muller@sourceware.org>
10821 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10822 or WriteProcessMemory complete successfully and handle
10823 ERROR_PARTIAL_COPY error.
10825 2013-09-02 Pedro Alves <palves@redhat.com>
10827 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10828 error instead of EIO.
10830 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10833 * linux-low.c: Include filestuff.h.
10834 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10835 * lynx-low.c: Include filestuff.h.
10836 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10837 * server.c: Include filestuff.h.
10838 (main): Call notice_open_fds.
10839 * spu-low.c: Include filestuff.h.
10840 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10842 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10844 * Makefile.in: Explain why ../target and ../nat are not
10845 listed as include file search paths.
10846 (linux-waitpid.o): New object file rule.
10847 * configure.srv (srv_native_linux_obj): New variable.
10848 Replace all occurrences of linux native object files with
10849 $srv_native_linux_obj.
10850 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10851 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10852 (linux_enable_event_reporting): Remove declaration.
10853 (my_waitpid): Moved to common/linux-waitpid.c.
10854 (linux_wait_for_event): Pass ptid when calling
10855 linux_enable_event_reporting.
10856 (linux_supports_tracefork_flag): Remove.
10857 (linux_enable_event_reporting): Likewise.
10858 (linux_tracefork_grandchild): Remove.
10859 (STACK_SIZE): Moved to common/linux-ptrace.c.
10860 (linux_tracefork_child): Remove.
10861 (linux_test_for_tracefork): Remove.
10862 (linux_look_up_symbols): Call linux_supports_traceclone.
10863 (initialize_low): Remove call to linux_test_for_tracefork.
10864 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10865 common/linux-ptrace.h.
10866 (PTRACE_TYPE_ARG4): Likewise.
10867 Include linux-ptrace.h.
10869 2013-08-21 Pedro Alves <palves@redhat.com>
10871 * config.in: Renegerate.
10873 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10875 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10876 (SFILES): Remove $(srcdir)/common/target-common.c and
10877 add $(srcdir)/target/waitstatus.c.
10878 (OBS): Remove target-common.o and add waitstatus.o.
10879 (server_h): Remove $(srcdir)/../common/target-common.h and
10880 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10881 and $(srcdir)/../target/waitstatus.h.
10882 (target-common.o): Remove.
10883 (waitstatus.o): New target object file.
10884 * target.h: Do not include target-common.h and
10885 include target/resume.h, target/wait.h and
10886 target/waitstatus.h.
10888 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10890 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10891 to PTRACE_TYPE_ARG3.
10892 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10893 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10895 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10896 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10898 2013-07-27 Jie Zhang <jie@codesourcery.com>
10899 Daniel Jacobowitz <dan@codesourcery.com>
10900 Yao Qi <yao@codesourcery.com>
10902 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10903 (mips-linux-watch.o): New rule.
10904 (mips_linux_watch_h): New variable.
10905 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10907 * linux-mips-low.c: Include mips-linux-watch.h.
10908 (struct arch_process_info, struct arch_lwp_info): New.
10909 (update_watch_registers_callback): New function.
10910 (mips_linux_new_process, mips_linux_new_thread) New functions.
10911 (mips_linux_prepare_to_resume, mips_insert_point): New
10913 (mips_remove_point, mips_stopped_by_watchpoint): New
10915 (rsp_bp_type_to_target_hw_bp_type): New function.
10916 (mips_stopped_data_address): New function.
10917 (the_low_target): Add watchpoint support functions.
10919 2013-07-27 Yao Qi <yao@codesourcery.com>
10921 * i386-low.c: Include break-common.h.
10922 (enum target_hw_bp_type): Remove.
10924 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10926 * Makefile.in (SFILES): /common/target-common.c.
10927 (OBS): Add target-common.o.
10928 (server_h): Add $(srcdir)/../common/target-common.h.
10929 (target-common.o): New target.
10930 * server.c (queue_stop_reply_callback): Free
10931 status string after use.
10932 * target.c (target_waitstatus_to_string): Remove.
10933 * target.h: Include target-common.h.
10934 (resume_kind): Likewise.
10935 (target_waitkind): Likewise.
10936 (target_waitstatus): Likewise.
10937 (TARGET_WNOHANG): Likewise.
10939 2013-07-04 Yao Qi <yao@codesourcery.com>
10941 * Makefile.in (host_alias): Use @host_noncanonical@.
10942 (target_alias): Use @target_noncanonical@.
10943 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10944 ACX_NONCANONICAL_HOST.
10945 * configure: Regenerated.
10948 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10950 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10951 * configure: Rebuild.
10952 * Makefile.in (version_host, version_target): Get from configure.
10953 (version.c): Use $(version_host) and $(version_target).
10955 2013-07-03 Pedro Alves <palves@redhat.com>
10957 * Makefile.in (config.status): Depend on development.sh.
10958 * acinclude.m4: Include libmcheck.m4.
10959 * configure: Regenerate.
10961 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10963 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10964 attribute inside the parentheses.
10965 (winapi_DebugSetProcessKillOnExit): Ditto.
10966 (winapi_DebugBreakProcess): Ditto.
10967 (winapi_GenerateConsoleCtrlEvent): Ditto.
10969 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10971 * notif.h (notif_event): Add a dummy member to avoid compiler
10974 2013-07-01 Pedro Alves <palves@redhat.com>
10976 * hostio.c (HOSTIO_PATH_MAX): Define.
10977 (require_filename, handle_open, handle_unlink, handle_readlink):
10980 2013-07-01 Pedro Alves <palves@redhat.com>
10982 * server.h: Include "pathmax.h".
10983 * linux-low.c: Don't include sys/param.h.
10984 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10986 * win32-low.c: Don't include sys/param.h.
10987 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10989 2013-07-01 Pedro Alves <palves@redhat.com>
10991 * event-loop.c: Don't check HAVE_UNISTD_H before including
10993 * gdbreplay.c: Likewise.
10994 * remote-utils.c: Likewise.
10995 * server.c: Likewise.
10996 * configure.ac: Don't check for unistd.h.
10997 * configure: Regenerate.
10999 2013-06-28 Tom Tromey <tromey@redhat.com>
11001 * Makefile.in (version.c): Use version.in, not
11004 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11006 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11007 * configure: Rebuild.
11008 * Makefile.in (version_host, version_target): Get from configure.
11009 (version.c): Use $(version_host) and $(version_target).
11011 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11013 Fix trace-status to output user name without trailing colon.
11014 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11016 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11018 Fix trace-status to output proper start-time and stop-time.
11019 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11020 output start time and stop time in hex as gdb expects.
11022 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11024 * tracepoint.c (build_traceframe_info_xml): Output trace state
11025 variables present in the trace buffer.
11027 2013-06-24 Tom Tromey <tromey@redhat.com>
11029 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11031 (version.o): Remove.
11032 * gdbreplay.c: Include version.h.
11033 (version, host_name): Don't declare.
11034 * server.h: Include version.h.
11035 (version, host_name): Don't declare.
11037 2013-06-12 Pedro Alves <palves@redhat.com>
11039 * linux-x86-low.c (linux_is_elf64): Delete global.
11040 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11041 with local linux_pid_exe_is_elf_64_file use.
11043 2013-06-11 Pedro Alves <palves@redhat.com>
11045 * linux-low.c (regset_disabled, disable_regset): New functions.
11046 (regsets_fetch_inferior_registers)
11047 (regsets_store_inferior_registers): Use them.
11048 (initialize_regsets_info); Don't allocate the disabled_regsets
11050 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11053 2013-06-11 Pedro Alves <palves@redhat.com>
11055 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11058 2013-06-11 Pedro Alves <palves@redhat.com>
11060 * linux-x86-low.c (initialize_low_arch): Call
11061 init_registers_x32_avx_linux.
11063 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11065 Fix compatibility with Android Bionic.
11066 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11069 2013-06-07 Pedro Alves <palves@redhat.com>
11072 * Makefile.in (OBS): Add tdesc.o.
11073 (IPA_OBJS): Add tdesc-ipa.o.
11074 (tdesc-ipa.o): New rule.
11075 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11077 * linux-low.c (new_inferior): Delete.
11078 (disabled_regsets, num_regsets): Delete.
11079 (linux_add_process): Adjust to set the new per-process
11081 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11082 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11083 was a stop. When calling arch_setup, switch the current inferior
11084 to the thread that got an event.
11085 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11086 (regsets_fetch_inferior_registers)
11087 (regsets_store_inferior_registers): New regsets_info parameter.
11089 (linux_register_in_regsets): New regs_info parameter. Adjust to
11091 (register_addr, fetch_register, store_register): New usrregs_info
11092 parameter. Adjust to use it.
11093 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11094 parameter regs_info. Adjust to use it.
11095 (linux_fetch_registers): Get the current inferior's regs_info, and
11097 (linux_store_registers): Ditto.
11098 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11099 (initialize_low): Don't initialize the target_regsets here. Call
11100 initialize_low_arch.
11101 * linux-low.h (target_regsets): Delete declaration.
11102 (struct regsets_info): New.
11103 (struct usrregs_info): New.
11104 (struct regs_info): New.
11105 (struct process_info_private) <new_inferior>: New field.
11106 (struct linux_target_ops): Delete the num_regs, regmap, and
11107 regset_bitmap fields. New field regs_info.
11108 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11109 * i387-fp.c (num_xmm_registers): Delete.
11110 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11111 calls to new interface.
11112 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11113 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11114 Infer the number of xmm registers from the regcache's target
11116 * i387-fp.h (num_xmm_registers): Delete.
11117 * inferiors.c (add_thread): Don't install the thread's regcache
11119 * proc-service.c (gregset_info): Fetch the current inferior's
11120 regs_info. Adjust to use it.
11121 * regcache.c: Include tdesc.h.
11122 (register_bytes, reg_defs, num_registers)
11123 (gdbserver_expedite_regs): Delete.
11124 (get_thread_regcache): If the thread doesn't have a regcache yet,
11125 create one, instead of aborting gdbserver.
11126 (regcache_invalidate_one): Rename to ...
11127 (regcache_invalidate_thread): ... this.
11128 (regcache_invalidate_one): New.
11129 (regcache_invalidate): Only invalidate registers of the current
11131 (init_register_cache): Add target_desc parameter, and use it.
11132 (new_register_cache): Ditto. Assert the target description has a
11133 non zero registers_size.
11134 (regcache_cpy): Add assertions. Adjust.
11135 (realloc_register_cache, set_register_cache): Delete.
11136 (registers_to_string, registers_from_string): Adjust.
11137 (find_register_by_name, find_regno, find_register_by_number)
11138 (register_cache_size): Add target_desc parameter, and use it.
11139 (free_register_cache_thread, free_register_cache_thread_one)
11140 (regcache_release, register_cache_size): New.
11141 (register_size): Add target_desc parameter, and use it.
11142 (register_data, supply_register, supply_register_zeroed)
11143 (supply_regblock, supply_register_by_name, collect_register)
11144 (collect_register_as_string, collect_register_by_name): Adjust.
11145 * regcache.h (struct target_desc): Forward declare.
11146 (struct regcache) <tdesc>: New field.
11147 (init_register_cache, new_register_cache): Add target_desc
11149 (regcache_invalidate_thread): Declare.
11150 (regcache_invalidate_one): Delete declaration.
11151 (regcache_release): Declare.
11152 (find_register_by_number, register_cache_size, register_size)
11153 (find_regno): Add target_desc parameter.
11154 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11156 * remote-utils.c: Include tdesc.h.
11157 (outreg, prepare_resume_reply): Adjust.
11158 * server.c: Include tdesc.h.
11159 (gdbserver_xmltarget): Delete declaration.
11160 (get_features_xml, process_serial_event): Adjust.
11161 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11163 (struct process_info) <tdesc>: New field.
11164 (ipa_tdesc): Declare.
11165 * tdesc.c: New file.
11166 * tdesc.h: New file.
11167 * tracepoint.c: Include tdesc.h.
11168 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11169 (get_context_regcache): Adjust to pass ipa_tdesc down.
11170 (do_action_at_tracepoint): Adjust to get the register cache size
11171 from the context regcache's description.
11172 (traceframe_walk_blocks): Adjust to get the register cache size
11173 from the current trace frame's description.
11174 (traceframe_get_pc): Adjust to get current trace frame's
11175 description and pass it down.
11176 (gdb_collect): Adjust to get the register cache size from the
11178 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11179 (gdbserver_xmltarget): Delete.
11180 (initialize_low_tracepoint): Set the ipa's target description.
11181 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11182 (initialize_low_tracepoint): Set the ipa's target description.
11183 * linux-x86-low.c: Include tdesc.h.
11184 [__x86_64__] (is_64bit_tdesc): New.
11185 (ps_get_thread_area, x86_get_thread_area): Use it.
11186 (i386_cannot_store_register): Rename to ...
11187 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11188 (i386_cannot_fetch_register): Rename to ...
11189 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11190 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11192 (target_regsets): Rename to ...
11193 (x86_regsets): ... this.
11194 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11196 (x86_siginfo_fixup): Use is_64bit_tdesc.
11197 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11198 (tdesc_x32_avx_linux, tdesc_x32_linux)
11199 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11201 (x86_linux_update_xmltarget): Delete.
11202 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11203 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11204 (AMD64_LINUX_USER64_CS): New.
11205 (x86_linux_read_description): New, based on
11206 x86_linux_update_xmltarget.
11207 (same_process_callback): New.
11208 (x86_arch_setup_process_callback): New.
11209 (x86_linux_update_xmltarget): New.
11210 (x86_regsets_info): New.
11211 (amd64_linux_regs_info): New.
11212 (i386_linux_usrregs_info): New.
11213 (i386_linux_regs_info): New.
11214 (x86_linux_regs_info): New.
11215 (x86_arch_setup): Reimplement.
11216 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11217 (x86_emit_ops): Ditto.
11218 (the_low_target): Adjust. Install x86_linux_regs_info,
11219 x86_cannot_fetch_register, and x86_cannot_store_register.
11220 (initialize_low_arch): New.
11221 * linux-ia64-low.c (tdesc_ia64): Declare.
11222 (ia64_fetch_register): Adjust.
11223 (ia64_usrregs_info, regs_info): New globals.
11224 (ia64_regs_info): New function.
11225 (the_low_target): Adjust.
11226 (initialize_low_arch): New function.
11227 * linux-sparc-low.c (tdesc_sparc64): Declare.
11228 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11230 (sparc_arch_setup): New function.
11231 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11232 (the_low_target): Adjust.
11233 (initialize_low_arch): New function.
11234 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11235 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11236 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11237 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11238 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11239 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11240 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11241 (tdesc_powerpc_isa205_vsx64l): Declare.
11242 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11243 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11244 (ppc_set_pc, ppc_get_hwcap): Adjust.
11245 (ppc_usrregs_info): Forward declare.
11246 (!__powerpc64__) ppc_regmap_adjusted: New global.
11247 (ppc_arch_setup): Adjust to the current process'es target
11249 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11250 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11251 (ppc_store_evrregset): Adjust.
11252 (target_regsets): Rename to ...
11253 (ppc_regsets): ... this, and make static.
11254 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11255 (ppc_regs_info): New function.
11256 (the_low_target): Adjust.
11257 (initialize_low_arch): New function.
11258 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11259 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11260 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11261 (tdesc_s390x_linux64v2): Declare.
11262 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11263 (s390_fill_gregset, s390_store_last_break): Adjust.
11264 (target_regsets): Rename to ...
11265 (s390_regsets): ... this, and make static.
11266 (s390_get_pc, s390_set_pc): Adjust.
11267 (s390_get_hwcap): New target_desc parameter, and use it.
11268 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11269 (s390_arch_setup): Adjust to set the current process'es target
11270 description. Don't adjust the regmap.
11271 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11272 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11273 (regs_info_3264): New globals.
11274 (s390_regs_info): New function.
11275 (the_low_target): Adjust.
11276 (initialize_low_arch): New function.
11277 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11278 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11279 [__mips64] (init_registers_mips_linux)
11280 (init_registers_mips_dsp_linux): Delete defines.
11281 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11282 (have_dsp): New global.
11283 (mips_read_description): New, based on mips_arch_setup.
11284 (mips_arch_setup): Reimplement.
11285 (get_usrregs_info): New function.
11286 (mips_cannot_fetch_register, mips_cannot_store_register)
11287 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11288 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11289 (target_regsets): Rename to ...
11290 (mips_regsets): ... this, and make static.
11291 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11292 (dsp_regs_info, regs_info): New globals.
11293 (mips_regs_info): New function.
11294 (the_low_target): Adjust.
11295 (initialize_low_arch): New function.
11296 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11297 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11299 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11300 (arm_read_description): New, with bits factored from
11302 (arm_arch_setup): Reimplement.
11303 (target_regsets): Rename to ...
11304 (arm_regsets): ... this, and make static.
11305 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11306 (arm_regs_info): New function.
11307 (the_low_target): Adjust.
11308 (initialize_low_arch): New function.
11309 * linux-m68k-low.c (tdesc_m68k): Declare.
11310 (target_regsets): Rename to ...
11311 (m68k_regsets): ... this, and make static.
11312 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11313 (m68k_regs_info): New function.
11314 (m68k_arch_setup): New function.
11315 (the_low_target): Adjust.
11316 (initialize_low_arch): New function.
11317 * linux-sh-low.c (tdesc_sharch): Declare.
11318 (target_regsets): Rename to ...
11319 (sh_regsets): ... this, and make static.
11320 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11321 (sh_regs_info, sh_arch_setup): New functions.
11322 (the_low_target): Adjust.
11323 (initialize_low_arch): New function.
11324 * linux-bfin-low.c (tdesc_bfin): Declare.
11325 (bfin_arch_setup): New function.
11326 (bfin_usrregs_info, regs_info): New globals.
11327 (bfin_regs_info): New function.
11328 (the_low_target): Adjust.
11329 (initialize_low_arch): New function.
11330 * linux-cris-low.c (tdesc_cris): Declare.
11331 (cris_arch_setup): New function.
11332 (cris_usrregs_info, regs_info): New globals.
11333 (cris_regs_info): New function.
11334 (the_low_target): Adjust.
11335 (initialize_low_arch): New function.
11336 * linux-cris-low.c (tdesc_crisv32): Declare.
11337 (cris_arch_setup): New function.
11338 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11339 (cris_regs_info): New function.
11340 (the_low_target): Adjust.
11341 (initialize_low_arch): New function.
11342 * linux-m32r-low.c (tdesc_m32r): Declare.
11343 (m32r_arch_setup): New function.
11344 (m32r_usrregs_info, regs_info): New globals.
11345 (m32r_regs_info): Adjust.
11346 (initialize_low_arch): New function.
11347 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11348 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11349 (tic6x_usrregs_info): Forward declare.
11350 (tic6x_read_description): New function, based on ...
11351 (tic6x_arch_setup): ... this. Reimplement.
11352 (target_regsets): Rename to ...
11353 (tic6x_regsets): ... this, and make static.
11354 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11355 (tic6x_regs_info): New function.
11356 (the_low_target): Adjust.
11357 (initialize_low_arch): New function.
11358 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11359 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11360 (target_regsets): Rename to ...
11361 (xtensa_regsets): ... this, and make static.
11362 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11364 (xtensa_arch_setup, xtensa_regs_info): New functions.
11365 (the_low_target): Adjust.
11366 (initialize_low_arch): New function.
11367 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11368 (nios2_arch_setup): Set the current process'es tdesc.
11369 (target_regsets): Rename to ...
11370 (nios2_regsets): ... this.
11371 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11372 (nios2_regs_info): New function.
11373 (the_low_target): Adjust.
11374 (initialize_low_arch): New function.
11375 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11376 (aarch64_arch_setup): Set the current process'es tdesc.
11377 (target_regsets): Rename to ...
11378 (aarch64_regsets): ... this.
11379 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11380 (aarch64_regs_info): New function.
11381 (the_low_target): Adjust.
11382 (initialize_low_arch): New function.
11383 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11385 (target_regsets): Rename to ...
11386 (tile_regsets): ... this.
11387 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11388 (tile_regs_info): New function.
11389 (tile_arch_setup): Set the current process'es tdesc.
11390 (the_low_target): Adjust.
11391 (initialize_low_arch): New function.
11392 * spu-low.c (tdesc_spu): Declare.
11393 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11394 * win32-arm-low.c (tdesc_arm): Declare.
11395 (arm_arch_setup): New function.
11396 (the_low_target): Install arm_arch_setup instead of
11397 init_registers_arm.
11398 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11399 (init_windows_x86): Rename to ...
11400 (i386_arch_setup): ... this. Set `win32_tdesc'.
11401 (the_low_target): Adjust.
11402 * win32-low.c (win32_tdesc): New global.
11403 (child_add_thread): Don't create the thread cache here.
11404 (do_initial_child_stuff): Set the new process'es tdesc.
11405 * win32-low.h (struct target_desc): Forward declare.
11406 (win32_tdesc): Declare.
11407 * lynx-i386-low.c (tdesc_i386): Declare global.
11408 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11409 * lynx-low.c (lynx_tdesc): New global.
11410 (lynx_add_process): Set the new process'es tdesc.
11411 * lynx-low.h (struct target_desc): Forward declare.
11412 (lynx_tdesc): Declare global.
11413 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11414 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11415 * nto-low.c (nto_tdesc): New global.
11416 (do_attach): Set the new process'es tdesc.
11417 * nto-low.h (struct target_desc): Forward declare.
11418 (nto_tdesc): Declare.
11419 * nto-x86-low.c (tdesc_i386): Declare.
11420 (nto_x86_arch_setup): Set `nto_tdesc'.
11422 2013-06-04 Gary Benson <gbenson@redhat.com>
11424 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11425 to qSupported response when appropriate.
11426 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11427 with nonzero-length annex.
11428 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11429 arguments supplied in annex.
11431 2013-05-31 Doug Evans <dje@google.com>
11434 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11435 64 bits in 64-cross-32 environment.
11437 2013-05-28 Pedro Alves <palves@redhat.com>
11439 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11440 (aarch64-without-fpu.c): Delete rule.
11441 * configure.srv (aarch64*-*-linux*): Remove references to
11442 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11443 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11446 2013-05-24 Pedro Alves <palves@redhat.com>
11448 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11449 instead of strchr/decode_address. Error if the range isn't split
11450 with a ','. Don't assume there's be a ':' in the action.
11452 2013-05-23 Yao Qi <yao@codesourcery.com>
11453 Pedro Alves <palves@redhat.com>
11455 * linux-low.c (lwp_in_step_range): New function.
11456 (linux_wait_1): If the thread was range stepping and stopped
11457 outside the stepping range, report the stop to GDB. Otherwise,
11458 continue stepping. Add range stepping debug output.
11459 (linux_set_resume_request): Copy the step range from the resume
11460 request to the lwp.
11461 (linux_supports_range_stepping): New.
11462 (linux_target_ops) <supports_range_stepping>: Set to
11463 linux_supports_range_stepping.
11464 * linux-low.h (struct linux_target_ops)
11465 <supports_range_stepping>: New field.
11466 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11467 * linux-x86-low.c (x86_supports_range_stepping): New.
11468 (the_low_target) <supports_range_stepping>: Set to
11469 x86_supports_range_stepping.
11470 * server.c (handle_v_cont): Handle 'r' action.
11471 (handle_v_requests): Append ";r" if the target supports range
11473 * target.h (struct thread_resume) <step_range_start,
11474 step_range_end>: New fields.
11475 (struct target_ops) <supports_range_stepping>:
11477 (target_supports_range_stepping): New macro.
11479 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11481 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11482 confusion in comment.
11484 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11486 * lynx-low.c (struct process_info_private): New type.
11487 (lynx_add_process): New function.
11488 (lynx_create_inferior, lynx_attach): Replace calls to
11489 add_process by calls to lynx_add_process.
11490 (lynx_resume): If PTID is null, then try using
11491 current_process()->private->last_wait_event_ptid.
11493 (lynx_clear_inferiors): Delete. The contents of that function
11494 has been inlined in lynx_mourn;
11495 (lynx_wait_1): Save the ptid in the process's private data.
11496 (lynx_mourn): Free the process' private data. Replace call
11497 to lynx_clear_inferiors by call to clear_inferiors.
11499 2013-05-17 Yao Qi <yao@codesourcery.com>
11501 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11504 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11506 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11507 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11508 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11509 PT_TEXT_END_ADDR guards. Update comments.
11510 (linux_target_op) <read_offsets>: Conditionally define to
11511 linux_read_offsets if the target is UCLIBC and if it defines
11512 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11514 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11515 Andrew Jenner <andrew@codesourcery.com>
11517 * Makefile.in (SFILES): Add linux-nios2-low.c.
11518 (clean): Add action to delete nios2-linux.c.
11519 (nios2-linux.c): New rule.
11520 * configure.srv: Add nios2*-*-linux*.
11521 * linux-nios2-low.c: New.
11523 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11525 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11527 2013-04-25 Hui Zhu <hui@codesourcery.com>
11530 * ax.c (ax_printf): Add fflush.
11532 2013-04-22 Tom Tromey <tromey@redhat.com>
11534 * Makefile.in (SFILES): Add filestuff.c.
11535 (OBS): Add filestuff.o.
11536 (filestuff.o): New target.
11537 * config.in, configure: Rebuild.
11538 * configure.ac: Check for fdwalk, pipe2.
11540 2013-04-17 Pedro Alves <palves@redhat.com>
11542 * configure.ac (USE_THREAD_DB): Delete variable.
11543 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11544 Don't AC_SUBST USE_THREAD_DB.
11545 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11546 * config.in, configure: Regenerate.
11548 2013-04-16 Pedro Alves <palves@redhat.com>
11550 * linux-low.h (struct lwp_info) <thread_known>: Move under
11551 the USE_THREAD_DB #ifdef.
11553 2013-04-16 Pedro Alves <palves@redhat.com>
11555 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11556 (linux-low.o): Delete rule.
11557 * linux-low.h: Always include "gdb_thread_db.h" instead of
11558 conditionally including thread_db.h.
11559 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11562 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11564 * Makefile.in (install-only): Fix make install regression.
11566 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11568 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11569 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11571 * gdbserver.1: Remove.
11573 2013-03-22 Pedro Alves <palves@redhat.com>
11575 * linux-low.c (handle_extended_wait): Don't call
11576 linux_enable_event_reporting.
11578 2013-03-15 Tony Theodore <tonyt@logyst.com>
11581 * Makefile.in (SHELL): Use @SHELL@.
11583 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11585 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11588 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11590 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11591 Remove extraneous NULL element.
11593 2013-03-13 Yao Qi <yao@codesourcery.com>
11595 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11596 'V' block in trace frame.
11598 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11600 * target.h (struct target_ops): Add btrace ops.
11601 (target_supports_btrace): New macro.
11602 (target_enable_btrace): New macro.
11603 (target_disable_btrace): New macro.
11604 (target_read_btrace): New macro.
11605 * gdbthread.h (struct thread_info): Add btrace field.
11606 * server.c: Include btrace-common.h.
11607 (handle_btrace_general_set): New function.
11608 (handle_btrace_enable): New function.
11609 (handle_btrace_disable): New function.
11610 (handle_general_set): Call handle_btrace_general_set.
11611 (handle_qxfer_btrace): New function.
11612 (struct qxfer qxfer_packets[]): Add btrace entry.
11613 * inferiors.c (remove_thread): Disable btrace.
11614 * linux-low: Include linux-btrace.h.
11615 (linux_low_enable_btrace): New function.
11616 (linux_low_read_btrace): New function.
11617 (linux_target_ops): Add btrace ops.
11618 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11619 Add srv_linux_btrace=yes.
11620 (x86_64-*-linux*): Add linux-btrace.o.
11621 Add srv_linux_btrace=yes.
11622 * configure.ac: Define HAVE_LINUX_BTRACE.
11623 * config.in: Regenerated.
11624 * configure: Regenerated.
11626 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11628 * server.c (handle_qxfer): Preserve error message if -3 is
11630 (qxfer): Document the -3 return value.
11632 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11634 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11635 (linux_btrace_h): New variable.
11636 (linux-btrace.o): New rule.
11638 2013-03-08 Stan Shebs <stan@codesourcery.com>
11639 Hafiz Abid Qadeer <abidh@codesourcery.com>
11641 * tracepoint.c (trace_buffer_size): New global.
11642 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11643 (init_trace_buffer): Change to one-argument function. Allocate
11644 trace buffer memory.
11645 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11646 handle QTBuffer:size packet.
11647 (cmd_bigqtbuffer_size): New function.
11648 (initialize_tracepoint): Call init_trace_buffer with
11649 DEFAULT_TRACE_BUFFER_SIZE.
11650 * server.c (handle_query): Add QTBuffer:size in the
11653 2013-03-07 Yao Qi <yao@codesourcery.com>
11655 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11656 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11658 (cmd_qtsp): Adjust condition. Do post increment.
11659 Set cur_action and cur_step_action back to 0.
11661 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11664 * linux-low.c (linux_write_memory): Return early success if LEN is
11667 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11669 * configure.srv: Add x86_64-*-cygwin* as target.
11671 2013-02-28 Tom Tromey <tromey@redhat.com>
11673 * configure.ac: Invoke AC_SYS_LARGEFILE.
11674 * configure, config.in: Rebuild.
11676 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11678 * win32-low.c: Throughout, fix format strings and casts of
11679 printf-like functions to avoid type related warnings on all
11681 (get_child_debug_event): Print dwDebugEventCode as hex since
11682 that's how it's usually documented.
11684 2013-02-28 Yao Qi <yao@codesourcery.com>
11686 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11689 2013-02-27 Jiong Wang <jiwang@tilera.com>
11691 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11692 (reg-tilegx32.c): New rule.
11693 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11694 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11695 different register info initializer according to elf class.
11696 (init_registers_tilgx32): New function. The tilegx32 register info
11698 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11699 (tile_store_gregset): Likewise.
11701 2013-02-27 Yao Qi <yao@codesourcery.com>
11703 * server.c (process_point_options): Print debug message when
11704 debug_threads is true.
11706 2013-02-26 Yao Qi <yao@codesourcery.com>
11708 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11710 2013-02-19 Pedro Alves <palves@redhat.com>
11711 Kai Tietz <ktietz@redhat.com>
11715 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11716 instead of strtoul to extract address from packet.
11717 (process_serial_event) <'z'>: Likewise.
11719 2013-02-18 Yao Qi <yao@codesourcery.com>
11721 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11723 2013-02-14 Pedro Alves <palves@redhat.com>
11727 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11728 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11730 2013-02-14 Pedro Alves <palves@redhat.com>
11732 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11734 2013-02-14 Pedro Alves <palves@redhat.com>
11736 * tracepoint.c (save_string): Delete.
11737 (add_tracepoint_action): Use savestring instead of save_string.
11739 2013-02-12 Pedro Alves <palves@redhat.com>
11741 * linux-xtensa-low.c: Ditto.
11742 * xtensa-xtregs.c: Ditto.
11744 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11746 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11749 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11751 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11752 aarch64_num_wp_regs and aarch64_num_bp_regs to
11753 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11755 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11757 * linux-aarch64-low.c (ps_get_thread_area): Replace
11758 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11760 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11761 Marcus Shawcroft <marcus.shawcroft@arm.com>
11762 Nigel Stephens <nigel.stephens@arm.com>
11763 Yufeng Zhang <yufeng.zhang@arm.com>
11765 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11766 (aarch64.c, aarch64-without-fpu.c): New targets.
11767 * configure.srv (aarch64*-*-linux*): New.
11768 * linux-aarch64-low.c: New file.
11770 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11772 * linux-low.c (handle_extended_wait, linux_create_inferior)
11773 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11774 (dequeue_one_deferred_signal, linux_resume_one_thread)
11775 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11776 (linux_tracefork_grandchild, linux_test_for_tracefork)
11777 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11778 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11779 where the argument is 0.
11781 2013-01-25 Yao Qi <yao@codesourcery.com>
11783 * event-loop.c: Include "queue.h".
11784 (gdb_event_p): New typedef.
11785 (struct gdb_event) <next_event>: Remove.
11786 (event_queue): Change to QUEUE(gdb_event_p).
11787 (async_queue_event): Remove.
11788 (gdb_event_xfree): New.
11789 (initialize_event_loop): New.
11790 (process_event): Use API from QUEUE.
11791 (wait_for_event): Likewise.
11792 * server.c (main): Call initialize_event_loop.
11793 * server.h (initialize_event_loop): Declare.
11795 2013-01-18 Yao Qi <yao@codesourcery.com>
11797 * ax.h (struct eval_agent_expr_context): New.
11798 (gdb_eval_agent_expr): Update declaration.
11799 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11800 TFRAME. Add new argument CTX.
11801 * server.h (struct eval_agent_expr_context): Declare.
11802 (agent_mem_read, agent_tsv_read): Update declaration.
11803 (agent_mem_read_string): Likewise.
11804 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11805 (add_traceframe_block): Add new argument TPOINT.
11806 Increase TPOINT->traceframe_usage.
11807 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11808 eval_tracepoint_agent_expr.
11809 (condition_true_at_tracepoint): Likewise.
11810 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11811 (agent_mem_read_string, agent_tsv_read): Likewise.
11813 2013-01-16 Yao Qi <yao@codesourcery.com>
11815 * linux-low.c (linux_resume_one_lwp): Don't check
11816 'lwp->bp_reinsert != 0'.
11818 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11819 Pedro Alves <palves@redhat.com>
11821 * lynx-low.c (ptrace_request_to_str): Define a temporary
11822 macro and use it to simplify this function's implementation.
11824 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11826 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11829 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11831 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11833 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11835 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11837 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11839 * lynx-low.c (lynx_resume): Use the resume_info parameter
11840 to determine the ptid for the lynx_ptrace call, unless
11841 it is equal to minus_one_ptid, in which case we use the
11842 ptid of the current_inferior.
11843 (lynx_wait_1): After having received a thread create/exit
11844 event, resume the inferior's execution using the signaling
11845 thread's ptid, rather than the old ptid.
11847 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11849 * lynx-low.c (lynx_resume): Delete variable ret.
11851 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11853 * gdbreplay.c (gdbreplay_version): Update copyright year.
11854 * server.c (gdbserver_version): Likewise.
11856 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11858 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11861 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11863 * lynx-low.c (ptrace_request_to_str): Add handling for
11864 PTRACE_GETTRACESIG.
11866 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11868 * lynx-low.c (lynx_attach): Delete variable new_process.
11870 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11872 * lynx-low.c (lynx_create_inferior): Delete variable
11875 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11877 * lynx-low.c (ptrace_request_to_str): Do not handle
11878 PTRACE_GETTHREADLIST if this macro does not exist.
11880 2012-12-15 Yao Qi <yao@codesourcery.com>
11882 * Makefile.in (OBS): Add notif.o.
11883 * notif.c, notif.h: New.
11884 * server.c: Include "notif.h".
11885 (struct vstop_notif) <next>: Remove.
11887 (queue_stop_reply): Update.
11888 (push_event, send_next_stop_reply): Remove.
11889 (discard_queued_stop_replies): Update.
11890 (notif_stop): New variable.
11891 (handle_v_stopped): Remove.
11892 (handle_v_requests): Don't call handle_v_stopped. Call
11893 handle_ack_notif instead.
11894 (queue_stop_reply_callback): Call notif_event_enque instead
11895 of queue_stop_reply.
11896 (handle_status): Don't call send_next_stop_reply, call
11897 notif_write_event instead.
11898 (kill_inferior_callback): Likewise.
11899 (detach_or_kill_inferior_callback): Likewise.
11900 (main): Call initialize_notif.
11901 (process_serial_event): Call QUEUE_is_empty.
11902 (handle_target_event): Call notif_push instead of push event.
11903 * server.h (push_event): Remove declaration.
11905 2012-12-10 Tom Tromey <tromey@redhat.com>
11907 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11908 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11911 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11912 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11913 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11914 (amd64-linux-ipa.o, ax.o): Rewrite.
11915 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11916 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11917 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11918 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11919 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11920 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11921 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11922 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11923 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11924 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11925 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11926 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11927 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11928 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11929 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11930 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11931 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11932 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11933 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11934 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11935 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11936 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11937 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11938 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11939 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11940 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11941 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11942 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11943 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11944 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11945 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11946 (reg-tilegx.o): Remove.
11947 (all_object_files): New macro.
11948 Include .deps files.
11949 * aclocal.m4, configure: Rebuild.
11950 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11951 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11952 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11954 2012-12-05 Tom Tromey <tromey@redhat.com>
11957 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11959 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11961 * configure.ac: Check for linux/perf_event.h.
11962 * config.in: Regenerated.
11963 * configure: Regenerated.
11965 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11967 * hostio.c (handle_readlink): Decrease buffer size
11968 parameter passed to readlink by one byte.
11970 2012-11-26 Yao Qi <yao@codesourcery.com>
11972 * configure.ac (build_warnings): Append '-Wempty-body'.
11973 * configure: Regenerated.
11974 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11977 2012-11-15 Pierre Muller <muller@sourceware.org>
11979 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11980 * config.in: Regenerate.
11981 * configure: Regenerate.
11982 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11983 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11984 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11985 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11987 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11988 instead of <sys/wait.h> header.
11989 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11991 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11993 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11994 (various make rules): Remove -DGDBSERVER
11996 2012-11-09 Yao Qi <yao@codesourcery.com>
11998 * spu-low.c (current_ptid): Move it to ..
11999 * gdbthread.h: ... here. New.
12000 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12001 * server.c (myresume, process_serial_event): Likewise.
12002 * thread-db.c (thread_db_find_new_threads): Likewise.
12003 * tracepoint.c (run_inferior_command): Likewise.
12005 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12007 * server.c (handle_search_memory_1): Include access length in
12010 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12012 * linux-crisv32-low.c: Fix compile errors.
12014 2012-09-04 Yao Qi <yao@codesourcery.com>
12016 * tracepoint.c (cmd_qtsv): Adjust debug message.
12017 Don't check CUR_TPOINT.
12019 2012-08-28 Yao Qi <yao@codesourcery.com>
12021 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12022 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12023 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12024 Remove declarations of xmalloc, xreallloc, xstrdup and
12026 * Makefile.in (libiberty_h): New.
12027 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12028 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12030 2012-08-23 Yao Qi <yao@codesourcery.com>
12032 * server.h: Remove declaration of 'xsnprintf'.
12034 2012-08-22 Keith Seitz <keiths@redhat.com>
12036 * server.h: Include build-gnulib-gbserver/config.h.
12037 * gdbreplay.c: Likewise.
12039 2012-08-08 Doug Evans <dje@google.com>
12041 * Makefile.in (SFILES): Add gdb_vecs.c.
12042 (OBS): Add gdb_vecs.o.
12043 (gdb_vecs_h, host_defs_h): New variables.
12044 (thread-db.o): Add $(gdb_vecs_h) dependency.
12045 (gdb_vecs.o): New rule.
12046 * thread-db.c: #include "gdb_vecs.h".
12047 (thread_db_load_search): Use a vector to iterate over path elements.
12048 Handle text appearing after "$pdir".
12050 * configure.ac: Add check for strstr.
12051 * config.in: Regenerate.
12052 * configure: Regenerate.
12054 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12056 * hostio.c (handle_pread): If pread fails, fall back to attempting
12058 (handle_pwrite): Likewise for pwrite.
12060 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12062 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12063 between unsupported TYPE and unimplementable ADDR/LEN combination.
12064 (arm_insert_point): Act on new return value.
12066 2012-07-31 Pedro Alves <palves@redhat.com>
12068 * server.c (process_point_options): Only skip tokens if we find
12069 one that is unrecognized. Don't treat 'X' specially while
12070 skipping unrecognized tokens.
12072 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12074 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12075 to 4-byte-align HW breakpoint addresses for Thumb.
12077 2012-07-27 Yao Qi <yao@codesourcery.com>
12081 * server.h: Declare gdb_agent_about_to_close.
12082 * target.c (kill_inferior): Include "agent.h".
12083 New. Send command 'kill'.
12084 * target.h (kill_inferior): Removed macro.
12085 * tracepoint.c (gdb_agent_about_to_close): New.
12086 (gdb_agent_helper_thread): Handle command 'close'.
12087 Wait endlessly until the inferior stops.
12088 Install gdb_agent_remove_socket to atexit hook.
12089 (agent_socket_name): New static variable.
12090 (gdb_agent_socket_init): Replace local variable 'name' with
12091 'agent_socket_name'.
12092 (gdb_agent_remove_socket): New.
12094 2012-07-27 Yao Qi <yao@codesourcery.com>
12096 * server.c (process_point_options): Stop at 'X' when parsing.
12098 2012-07-19 Michael Eager <eager@eagercon.com>
12100 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12102 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12103 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12104 hardware breakpoint.
12106 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12108 * gdbserver/linux-low.c (initialize_low): Call
12109 linux_ptrace_init_warnings.
12111 2012-07-02 Doug Evans <dje@google.com>
12113 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12116 2012-07-02 Stan Shebs <stan@codesourcery.com>
12118 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12119 (ax.o): Add it to build rule.
12121 (OBS): Add format.o.
12122 (IPA_OBS): Add format.o.
12123 * server.c (handle_query): Claim support for breakpoint commands.
12124 (process_point_options): Add command case.
12125 (process_serial_event): Leave running if there are printfs in
12127 * mem-break.h (any_persistent_commands): Declare.
12128 (add_breakpoint_commands): Declare.
12129 (gdb_no_commands_at_breakpoint): Declare.
12130 (run_breakpoint_commands): Declare.
12131 * mem-break.c (struct point_command_list): New struct.
12132 (struct breakpoint): New field command_list.
12133 (any_persistent_commands): New function.
12134 (add_commands_to_breakpoint): New function.
12135 (add_breakpoint_commands): New function.
12136 (gdb_no_commands_at_breakpoint): New function.
12137 (run_breakpoint_commands): New function.
12138 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12140 * ax.c: Include format.h.
12141 (ax_printf): New function.
12142 (gdb_eval_agent_expr): Add printf opcode.
12144 2012-06-13 Yao Qi <yao@codesourcery.com>
12146 * server.c (start_inferior): Remove duplicated writes to fields
12147 'last_resume_kind' and 'last_status' of 'current_inferior'.
12149 2012-06-12 Yao Qi <yao@codesourcery.com>
12150 Pedro Alves <palves@redhat.com>
12152 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12154 * server.c (handle_v_cont): Extend comment.
12156 2012-06-11 Yao Qi <yao@codesourcery.com>
12158 * linux-low.c (linux_attach): Add 'static'.
12160 2012-06-06 Yao Qi <yao@codesourcery.com>
12162 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12164 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12166 Fix gcc -flto compilation warning.
12167 * server.c (main): Make variable multi_mode and attach volatile.
12169 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12171 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12172 if the platform doesn't know about it.
12174 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12176 * Makefile.in (SFILES): Add linux-tile-low.c.
12177 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12178 * configure.srv: Handle tilegx-*-linux*.
12179 * linux-tile-low.c: New file.
12181 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12183 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12185 2012-05-24 Pedro Alves <palves@redhat.com>
12189 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12191 2012-05-24 Pedro Alves <palves@redhat.com>
12195 Replace target_signal with gdb_signal throughout.
12197 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12199 * linux-low.c (linux_store_registers): Avoid the copying sequence
12200 when no data has been retrieved by ptrace.
12202 2012-05-22 Will Deacon <will.deacon@arm.com>
12204 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12205 Include asm/ptrace.h.
12206 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12209 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12211 * linux-low.c (linux_store_registers): Don't re-retrieve data
12212 with ptrace that has already been obtained from /proc. Always
12213 copy any data retrieved with ptrace to the buffer supplied.
12215 2012-05-11 Yao Qi <yao@codesourcery.com>
12216 Pedro Alves <palves@redhat.com>
12218 * linux-low.c (enum stopping_threads_kind): New.
12219 (stopping_threads): Change type to `enum stopping_threads_kind'.
12220 (handle_extended_wait): If stopping and suspending threads, leave
12221 the new_lwp suspended too.
12222 (linux_wait_for_event): Adjust.
12223 (stop_all_lwps): Set `stopping_threads' to
12224 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12225 whether we're suspending threads or just stopping them. Assert no
12228 2012-04-29 Yao Qi <yao@codesourcery.com>
12230 * server.h: Move some code to ...
12231 * gdbthread.h: ... here. New.
12232 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12233 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12234 (nto-low.o, win32-low.o): Likewise.
12235 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12236 * regcache.c, remote-utils.c, server.c: Likewise.
12237 * target.c, tracepoint.c, win32-low.c: Likewise.
12239 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12241 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12242 (PTRACE_ARG4_TYPE): Likewise.
12243 (PTRACE_XFER_TYPE): Likewise.
12244 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12245 ptrace to PTRACE_ARG3_TYPE.
12246 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12247 (PTRACE_ARG4_TYPE): Likewise.
12248 (PTRACE_XFER_TYPE): Likewise.
12249 (linux_detach_one_lwp): Cast fourth argument of
12250 ptrace to long then PTRACE_ARG4_TYPE.
12251 (regsets_fetch_inferior_registers): Cast third argument of
12252 ptrace to long then PTRACE_ARG3_TYPE.
12253 (regsets_store_inferior_registers): Likewise.
12255 2012-04-20 Pedro Alves <palves@redhat.com>
12257 * configure: Regenerate.
12259 2012-04-19 Pedro Alves <palves@redhat.com>
12261 * Makefile.in (GNULIB_BUILDDIR): New.
12262 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12263 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12264 (all, install-only, uninstall, clean-info, all-lib, clean): No
12265 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12266 (maintainer-clean realclean distclean): Use subdir_do.
12268 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12269 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12270 * acinclude.m4: Include acx_configure_dir.m4.
12271 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12272 calls. Call AC_PROG_RANLIB. Configure gnulib using
12275 (GNULIB_STDINT_H): Adjust.
12276 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12277 * gdbreplay.c: Include build-gnulib/config.h.
12278 * server.h: Likewise.
12279 * aclocal.m4: Regenerate.
12280 * config.in: Regenerate.
12281 * configure: Regenerate.
12283 2012-04-19 Pedro Alves <palves@redhat.com>
12285 * Makefile.in (LIBGNU, INCGNU): Adjust.
12286 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12287 (all, install-only, uninstall, clean-info, all-lib, clean)
12288 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12289 * configure.ac: Adjust AC_OUTPUT output.
12290 * aclocal.m4: Regenerate.
12291 * configure: Regenerate.
12293 2012-04-19 Pedro Alves <palves@redhat.com>
12295 * Makefile.in (generated_files): New.
12296 (server_h): Remove the explicit dependency on config.h, and depend
12297 on $generated_files.
12299 2012-04-19 Pedro Alves <palves@redhat.com>
12301 * Makefile.in (INCGNU): Add -Ignulib.
12303 2012-04-19 Pedro Alves <palves@redhat.com>
12305 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12306 (INCGNU): ... this, and spell out -I here.
12307 (GNULIB_LIB): Rename to ...
12308 (LIBGNU): ... this.
12309 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12311 2012-04-19 Pedro Alves <palves@redhat.com>
12313 * config.in: Regenerate.
12315 2012-04-19 Pedro Alves <palves@redhat.com>
12317 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12318 * server.h (memmem): Remove declaration.
12319 * config.in: Regenerate.
12320 * configure: Regenerate.
12322 2012-04-19 Yao Qi <yao@codesourcery.com>
12324 * Makefile.in (SFILES): Add common/vec.c.
12328 2012-04-19 Yao Qi <yao@codesourcery.com>
12330 * remote-utils.c (prepare_resume_reply): Replace with macro
12331 target_core_of_thread.
12332 * server.c (handle_qxfer_threads_proper): Likewise.
12333 * target.h (traget_core_of_thread): New macro.
12335 2012-04-18 Pedro Alves <palves@redhat.com>
12337 * aclocal.m4: Regenerate.
12338 * configure: Regenerate.
12340 2012-04-16 Yao Qi <yao@codesourcery.com>
12342 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12343 duplicated on address.
12345 2012-04-16 Yao Qi <yao@codesourcery.com>
12347 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12348 (struct tracepoint_action_ops) <send>: New field.
12349 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12350 (agent_expr_send, x_tracepoint_action_send): New.
12351 (l_tracepoint_action_send): New.
12352 (cmd_qtdp): Download and install tracepoint
12353 according to `use_agent'.
12354 (run_inferior_command): Add one more parameter `len'.
12356 (tracepoint_send_agent): New.
12357 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12359 2012-04-16 Yao Qi <yao@codesourcery.com>
12361 * tracepoint.c (download_tracepoints): Moved to ...
12362 (cmd_qtstart): ... here.
12364 2012-04-14 Yao Qi <yao@codesourcery.com>
12366 * tracepoint.c: Include inttypes.h.
12367 (struct collect_memory_action): Use sized types.
12368 (struct tracepoint): Likewise.
12369 (cmd_qtdp, stop_tracing): Update print specifiers.
12370 (cmd_qtp, response_tracepoint): Likewise.
12371 (collect_data_at_tracepoint): Likewise.
12372 (collect_data_at_step): Likewise.
12374 2012-04-14 Yao Qi <yao@codesourcery.com>
12376 Import gnulib module inttypes.
12377 * aclocal.m4, config.in, configure: Regenerated.
12379 2012-04-14 Yao Qi <yao@codesourcery.com>
12381 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12382 Makefile and config.status at last.
12384 2012-04-13 Yao Qi <yao@codesourcery.com>
12386 * tracepoint.c: Include stdint.h unconditionally.
12388 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12390 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12391 on BFD_HAVE_SYS_PROCFS_TYPE.
12392 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12393 * configure: Regenerate.
12394 * config.in: Likewise.
12396 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12398 * Makefile.in (clean): Also remove x32.c x32-linux.c
12399 x32-avx.c x32-avx-linux.c.
12400 (x32.o): New target.
12402 (x32-linux.o): Likewise.
12403 (x32-linux.c): Likewise.
12404 (x32-avx.o): Likewise.
12405 (x32-avx.c): Likewise.
12406 (x32-avx-linux.o): Likewise.
12407 (x32-avx-linux.c): Likewise.
12409 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12410 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12411 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12412 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12413 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12414 i386/x32-avx-linux.xml.
12416 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12417 (init_registers_x32_avx_linux): Likwise.
12418 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12419 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12421 2012-04-13 Pedro Alves <palves@redhat.com>
12423 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12424 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12425 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12426 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12429 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12431 * linux-x86-low.c (compat_x32_clock_t): New.
12432 (compat_x32_siginfo_t): Likewise.
12433 (compat_x32_siginfo_from_siginfo): Likewise.
12434 (siginfo_from_compat_x32_siginfo): Likewise.
12435 (linux_is_elf64): Likewise.
12436 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12437 and siginfo_from_compat_x32_siginfo for x32.
12438 (x86_arch_setup): Set linux_is_elf64.
12440 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12443 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12445 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12446 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12447 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12448 compatible with process.
12450 2012-04-12 Yao Qi <yao@codesourcery.com>
12452 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12453 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12454 (install-only, install-info, clean): Handle sub dir gnulib.
12455 (all-lib, am--refresh): New targets.
12456 (memmem.o): Remove target.
12457 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12458 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12459 (AC_REPLACE_FUNCS): Remove memmem.
12460 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12461 (AC_OUTPUT): Generate Makefile in gnulib/.
12462 * aclocal.m4, config.in, configure: Regenerated.
12464 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12466 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12468 2012-04-05 Pedro Alves <palves@redhat.com>
12470 -Werror=strict-aliasing
12472 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12475 2012-04-04 Pedro Alves <palves@redhat.com>
12477 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12478 (sparc_store_gregset_from_stack, sparc_store_gregset)
12479 (sparc_breakpoint_at): Fix formatting.
12481 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12483 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12485 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12486 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12487 * config.in: Regenerate.
12488 * configure: Likewise.
12490 2012-03-29 Pedro Alves <palves@redhat.com>
12492 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12493 Correct ptrace arguments.
12495 2012-03-28 Pedro Alves <palves@redhat.com>
12497 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12498 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12499 (IA64_FR1_REGNUM): New defines.
12500 (ia64_fetch_register): New.
12501 (the_low_target): Install it.
12502 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12504 * linux-low.c (linux_fetch_registers): Try the
12505 the_low_target.fetch_register hook first.
12507 * linux-arm-low.c (the_low_target): Adjust.
12508 * linux-bfin-low.c (the_low_target): Adjust.
12509 * linux-cris-low.c (the_low_target): Adjust.
12510 * linux-crisv32-low.c (the_low_target): Adjust.
12511 * linux-m32r-low.c (the_low_target): Adjust.
12512 * linux-m68k-low.c (the_low_target): Adjust.
12513 * linux-mips-low.c (the_low_target): Adjust.
12514 * linux-ppc-low.c (the_low_target): Adjust.
12515 * linux-s390-low.c (the_low_target): Adjust.
12516 * linux-sh-low.c (the_low_target): Adjust.
12517 * linux-sparc-low.c (the_low_target): Adjust.
12518 * linux-tic6x-low.c (the_low_target): Adjust.
12519 * linux-x86-low.c (the_low_target): Adjust.
12520 * linux-xtensa-low.c (the_low_target): Adjust.
12522 2012-03-26 Pedro Alves <palves@redhat.com>
12524 * server.c (handle_qxfer_libraries): Don't bail early if
12525 the_target->qxfer_libraries_svr4 is not NULL.
12527 2012-03-26 Pedro Alves <palves@redhat.com>
12529 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12531 2012-03-23 Pedro Alves <palves@redhat.com>
12533 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12534 "library-list-svr4" element's start tag when the the DSO list is
12537 2012-03-23 Pedro Alves <palves@redhat.com>
12539 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12540 a variable whose type size is the same as the inferior's pointer
12543 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12545 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12547 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12548 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12549 * linux-low.h: Include <signal.h>.
12550 (struct siginfo): Remove forward declaration.
12551 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12554 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12556 * .gitignore: Ignore more files.
12558 2012-03-19 Pedro Alves <palves@redhat.com>
12559 Jan Kratochvil <jan.kratochvil@redhat.com>
12561 * server.c (cont_thread, general_thread): Add describing comments.
12562 (start_inferior): Clear `cont_thread'.
12563 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12566 2012-03-15 Yao Qi <yao@codesourcery.com>
12568 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12570 (cmd_qtdp): ... here.
12572 2012-03-15 Yao Qi <yao@codesourcery.com>
12574 * tracepoint.c (struct tracepoint_action_ops): New.
12575 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12576 (m_tracepoint_action_download): New.
12577 (r_tracepoint_action_download): New.
12578 (x_tracepoint_action_download): New.
12579 (l_tracepoint_action_download): New.
12580 (add_tracepoint_action): Install `action->ops' according type.
12581 (download_tracepoint_1): Move code `download' function pointer
12582 of various tracepoint_action_ops.
12584 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12586 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12587 linux_ptrace_attach_warnings.
12589 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12591 * Makefile.in (linux-ptrace.o): New.
12592 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12593 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12594 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12595 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12596 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12598 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12600 2012-03-08 Yao Qi <yao@codesourcery.com>
12601 Pedro Alves <palves@redhat.com>
12603 Fix PR server/13392.
12604 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12605 offset of JMP insn.
12606 * tracepoint.c (remove_tracepoint): New.
12607 (cmd_qtdp): Call remove_tracepoint when failed to install.
12609 2012-03-07 Pedro Alves <palves@redhat.com>
12611 * linux-low.c (get_detach_signal): New.
12612 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12613 Pass on pending signals to PTRACE_DETACH. Check the result of the
12615 * server.c (program_signals, program_signals_p): New.
12616 (handle_general_set): Handle QProgramSignals.
12617 * server.h (program_signals, program_signals_p): Declare.
12619 2012-03-05 Pedro Alves <palves@redhat.com>
12620 Jan Kratochvil <jan.kratochvil@redhat.com>
12622 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12625 2012-03-03 Yao Qi <yao@codesourcery.com>
12627 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12628 agent_look_up_symbols.
12630 2012-03-03 Yao Qi <yao@codesourcery.com>
12632 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12633 (linux-x86-low.o): Likewise.
12634 * server.h: Remove in_process_agent_loaded.
12635 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12639 2012-03-03 Yao Qi <yao@codesourcery.com>
12641 * tracepoint.c (gdb_agent_capability): New global.
12642 (in_process_agent_loaded_ust): Renamed to
12643 `in_process_agent_supports_ust'.
12645 (in_process_agent_supports_ust): Call agent_capability_check.
12646 (clear_installed_tracepoints): Assert that agent supports
12649 2012-03-03 Yao Qi <yao@codesourcery.com>
12651 * linux-low.c (linux_supports_agent): New.
12652 (linux_target_ops): Initialize field `supports_agent' with
12653 linux_supports_agent.
12654 * target.h (struct target_ops) <supports_agent>: New.
12655 (target_supports_agent): New macro.
12656 * server.c (handle_general_set): Handle packet 'QAgent'.
12657 (handle_query): Send `QAgent+'.
12658 * Makefile.in (server.o): Depends on agent.h.
12660 2012-03-03 Yao Qi <yao@codesourcery.com>
12662 * Makefile.in (OBS): Add agent.o.
12663 Add new rule for agent.o.
12664 Track dependence of tracepoint.c on agent.h.
12665 * tracepoint.c (run_inferior_command_1):
12666 (run_inferior_command): Call agent_run_command.
12667 (gdb_ust_connect_sync_socket): Deleted. Move it to
12669 (resume_thread, stop_thread): Likewise.
12670 (gdb_ust_socket_init): Renamed to ...
12671 (gdb_agent_socket_init): ... New.
12672 (gdb_ust_thread): Renamed to ...
12673 (gdb_agent_helper_thread): ... New.
12674 (gdb_ust_init): Move some code to ...
12675 (gdb_agent_init): ... here. New.
12676 [HAVE_UST]: Call gdb_ust_init.
12677 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12678 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12679 * config.in, configure: Regenerated.
12681 2012-03-02 Pedro Alves <palves@redhat.com>
12683 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12684 * linux-low.c (struct simple_pid_list): New.
12685 (stopped_pids): New a struct simple_pid_list pointer.
12686 (add_to_pid_list, pull_pid_from_list): New.
12687 (handle_extended_wait): Don't assume the first signal new children
12688 report is SIGSTOP. Adjust call to pull_pid_from_list.
12689 (linux_wait_for_lwp): Adjust.
12691 2012-03-02 Yao Qi <yao@codesourcery.com>
12693 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12696 2012-03-02 Yao Qi <yao@codesourcery.com>
12698 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12699 `stop_pc' and `tpoint'. Update caller.
12701 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12703 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12704 * linux-low.c (use_linux_regsets): New macro.
12705 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12706 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12707 (linux_register_in_regsets): New function.
12708 (usr_fetch_inferior_registers): Skip registers covered by
12710 (usr_store_inferior_registers): Likewise.
12711 (usr_fetch_inferior_registers): New macro.
12712 (usr_store_inferior_registers): Likewise.
12713 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12714 (linux_store_registers): Likewise.
12715 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12717 (init_registers_mips64_dsp_linux): Likewise.
12718 (init_registers_mips_linux): New macro.
12719 (init_registers_mips_dsp_linux): Likewise.
12720 (mips_dsp_num_regs): Likewise.
12721 (DSP_BASE, DSP_CONTROL): New fallback macros.
12722 (mips_base_regs): New macro.
12723 (mips_regmap): Use it. Fix the size.
12724 (mips_dsp_regmap): New variable.
12725 (mips_dsp_regset_bitmap): Likewise.
12726 (mips_arch_setup): New function.
12727 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12729 (mips_cannot_store_register): Likewise.
12730 (the_low_target): Update .arch_setup, .num_regs and .regmap
12731 initializers. Add .regset_bitmap initializer.
12732 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12734 * linux-bfin-low.c (the_low_target): Likewise.
12735 * linux-cris-low.c (the_low_target): Likewise.
12736 * linux-crisv32-low.c (the_low_target): Likewise.
12737 * linux-ia64-low.c (the_low_target): Likewise.
12738 * linux-m32r-low.c (the_low_target): Likewise.
12739 * linux-m68k-low.c (the_low_target): Likewise.
12740 * linux-ppc-low.c (the_low_target): Likewise.
12741 * linux-s390-low.c (the_low_target): Likewise.
12742 * linux-sh-low.c (the_low_target): Likewise.
12743 * linux-sparc-low.c (the_low_target): Likewise.
12744 * linux-tic6x-low.c (the_low_target): Likewise.
12745 * linux-x86-low.c (the_low_target): Likewise.
12746 * linux-xtensa-low.c (the_low_target): Likewise.
12747 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12748 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12749 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12751 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12752 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12754 2012-02-29 Yao Qi <yao@codesourcery.com>
12755 Pedro Alves <palves@redhat.com>
12757 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12758 `step_over_finished' is true.
12760 2012-02-27 Pedro Alves <palves@redhat.com>
12762 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12763 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12765 2012-02-27 Pedro Alves <palves@redhat.com>
12768 * linux-low.c (pid_is_stopped): New.
12769 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12771 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12773 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12776 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12778 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12780 2012-02-24 Luis Machado <lgustavo@codesourcery>
12782 * server.c (handle_query): Advertise support for target-side
12783 breakpoint condition evaluation.
12784 (process_point_options): New function.
12785 (process_serial_event): When inserting a breakpoint, check for
12786 a target-side condition that should be evaluated.
12788 * mem-break.c: Include regcache.h and ax.h.
12789 (point_cond_list_t): New data structure.
12790 (breakpoint) <cond_list>: New field.
12791 (find_gdb_breakpoint_at): Make non-static.
12792 (delete_gdb_breakpoint_at): Clear any target-side
12794 (clear_gdb_breakpoint_conditions): New function.
12795 (add_condition_to_breakpoint): Likewise.
12796 (add_breakpoint_condition): Likewise.
12797 (gdb_condition_true_at_breakpoint): Likewise.
12798 (gdb_breakpoint_here): Return result directly instead
12799 of going through a local variable.
12801 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12802 (clear_gdb_breakpoint_conditions): Likewise.
12803 (add_breakpoint_condition): Likewise.
12804 (gdb_condition_true_at_breakpoint): Likewise.
12806 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12807 (need_step_over_p): Take target-side breakpoint condition into
12810 2012-02-24 Luis Machado <lgustavo@codesourcery>
12812 * server.h: Include tracepoint.h.
12813 (agent_mem_read, agent_get_trace_state_variable_value,
12814 agent_set_trace_state_variable_value,
12815 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12816 get_set_tsv_func_addr): New prototypes.
12818 * ax.h: New include file.
12819 * ax.c: New source file.
12821 * tracepoint.c: Include ax.h.
12822 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12823 agent_expr, eval_result_type): Move to ax.h.
12824 (parse_agent_expr): Rename to ...
12825 (gdb_parse_agent_expr): ... this, make it non-static and move
12827 (unparse_agent_expr) Rename to ...
12828 (gdb_unparse_agent_expr): ... this, make it non-static and move
12830 (eval_agent_expr): Rename to ...
12831 (eval_tracepoint_agent_expr): ... this.
12832 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12833 forward declarations.
12834 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12835 (agent_get_trace_state_variable_value): New function.
12836 (agent_set_trace_state_variable_value): New function.
12837 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12838 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12839 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12840 (condition_true_at_tracepoint): Likewise.
12841 (parse_agent_expr): Rename to ...
12842 (gdb_parse_agent_expr): ... this and move to ax.c.
12843 (unparse_agent_expr): Rename to ...
12844 (gdb_unparse_agent_expr): ... this and move to ax.c.
12845 (gdb_agent_op_name): Move to ax.c.
12846 (eval_agent_expr): Rename to ...
12847 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12849 (eval_tracepoint_agent_expr): New function.
12850 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12852 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12854 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12855 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12856 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12857 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12858 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12859 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12860 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12861 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12862 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12863 (compile_bytecodes): Remove forward declaration.
12864 (is_goto_target): Move to ax.c.
12865 (compile_bytecodes): Move to ax.c and call
12866 agent_get_trace_state_variable_value (...) and
12867 agent_set_trace_state_variable_value (...).
12869 * Makefile.in: Update ax.c and IPA dependencies.
12871 2012-02-24 Pedro Alves <palves@redhat.com>
12873 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12874 (cmd_bigqtbuffer_circular): ... this. Only handle
12875 'QTBuffer:circular:'.
12876 (handle_tracepoint_general_set): Adjust.
12878 2012-02-16 Yao Qi <yao@codesourcery.com>
12880 * inferiors.c: Move code to ...
12881 * dll.c: .... here. New.
12882 * server.h: Declare clear_dlls.
12883 * Makefile.in (SFILES): Add dll.c.
12887 2012-02-11 Yao Qi <yao@codesourcery.com>
12889 * server.c: (handle_monitor_command): Add a new parameter
12891 (handle_query): Update caller.
12893 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12895 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12896 * configure, config.in: Regenerate.
12897 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12900 2012-02-02 Pedro Alves <palves@redhat.com>
12902 Try SIGKILL first, then PTRACE_KILL.
12903 * linux-low.c (linux_kill_one_lwp): New.
12904 (linux_kill_one_lwp): Rename to ...
12905 (kill_one_lwp_callback): ... this. Use the new
12906 linux_kill_one_lwp.
12908 2012-02-02 Pedro Alves <palves@redhat.com>
12910 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12913 2012-01-27 Pedro Alves <palves@redhat.com>
12915 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12916 (elf_64_file_p): Make static.
12917 (linux_pid_exe_is_elf_64_file): New.
12918 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12919 Delete declarations.
12920 (linux_pid_exe_is_elf_64_file): Declare.
12921 * linux-x86-low.c (x86_arch_setup): Use
12922 linux_pid_exe_is_elf_64_file.
12924 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12926 * linux-low.c (linux_wait_for_event_1): Rename to ...
12927 (linux_wait_for_event): ... here and merge it with former
12928 linux_wait_for_event - new variable wait_ptid, use it.
12929 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12931 2012-01-23 Pedro Alves <palves@redhat.com>
12933 * server.c (main): Avoid yet another case of infinite loop while
12934 detaching/killing after a longjmp.
12936 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12939 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12941 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12943 * hostio.c (handle_readlink): New function.
12944 (handle_vFile): Call it to handle "vFile:readlink" packets.
12946 2012-01-20 Pedro Alves <palves@redhat.com>
12947 Ulrich Weigand <ulrich.weigand@linaro.org>
12949 * server.c (handle_v_requests): Only support vAttach and vRun to
12950 start multiple processes when in extended protocol mode.
12952 2012-01-17 Pedro Alves <palves@redhat.com>
12954 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12955 memalign plus mprotect to allocate the scratch buffer.
12957 2012-01-13 Pedro Alves <palves@redhat.com>
12959 * server.c (attach_inferior): Clear `cont_thread'.
12961 2012-01-13 Pedro Alves <palves@redhat.com>
12963 * server.c (main): Avoid infinite loop while detaching/killing
12966 2012-01-09 Doug Evans <dje@google.com>
12968 * server.c (start_inferior): Set last_ptid in --wrapper case.
12970 2012-01-06 Yao Qi <yao@codesourcery.com>
12972 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12974 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12976 2012-01-04 Yao Qi <yao@codesourcery.com>
12978 * tracepoint.c (cmd_qtdp): Print debug message
12979 for static tracepoint.
12981 2012-01-04 Yao Qi <yao@codesourcery.com>
12983 * tracepoint.c (trace_vdebug): Differentiate debug message
12984 between gdbserver and IPA.
12986 2012-01-03 Yao Qi <yao@codesourcery.com>
12988 * tracepoint.c (tracepoint_was_hit): Don't collect for
12991 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12993 * terminal.h: Reformat copyright header.
12995 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12997 * server.c (gdbserver_version): Update copyright year.
12998 * gdbreplay.c (gdbreplay_version): Likewise.
13000 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13002 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13005 2011-12-18 Hui Zhu <teawater@gmail.com>
13006 * linux-low.c (linux_create_inferior): Save return value to ret.
13008 2011-12-18 Hui Zhu <teawater@gmail.com>
13010 * linux-low.c (linux_create_inferior): Save return value to ret.
13012 2011-12-16 Doug Evans <dje@google.com>
13014 * linux-low.c (linux_create_inferior): If stdio connection,
13015 redirect stdin from /dev/null, stdout to stderr.
13016 * remote-utils.c (remote_is_stdio): New static global.
13017 (remote_connection_is_stdio): New function.
13018 (remote_prepare): Handle stdio connection.
13019 (remote_open): Ditto.
13020 (remote_close): Don't close stdin for stdio connections.
13021 (read_prim,write_prim): New functions. Replace all calls to
13022 read/write to these.
13023 * server.c (main): Watch for "-" argument. Move call to
13024 remote_prepare before start_inferior.
13025 * server.h (STDIO_CONNECTION_NAME): New macro.
13026 (remote_connection_is_stdio): Declare.
13028 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13029 in debugging output.
13031 2011-12-15 Yao Qi <yao@codesourcery.com>
13033 * tracepoint.c: Include sys/syscall.h.
13034 (gdb_ust_thread): Remove preprocessor conditional.
13036 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13038 * linux-low.c (linux_detach_one_lwp): Call
13039 the_low_target.prepare_to_resume before detaching.
13041 2011-12-14 Yao Qi <yao@codesourcery.com>
13043 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13046 2011-12-14 Yao Qi <yao@codesourcery.com>
13048 * i386-low.c (i386_low_stopped_data_address): Initialize local
13049 variable `control'.
13051 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13055 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13056 DR_CONTROL unless necessary. Extend comments.
13057 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13058 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13060 2011-12-13 Yao Qi <yao@codesourcery.com>
13062 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13064 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13066 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13068 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13069 Print new debug message for such case.
13071 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13073 Fix overlapping memcpy.
13074 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13075 the read_inferior_memory transfer.
13076 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13077 write_inferior_memory transfer.
13078 (set_fast_tracepoint_jump): New variable buf. Use it for the
13079 read_inferior_memory and write_inferior_memory transfers.
13080 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13081 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13082 Use it for the write_inferior_memory transfer.
13083 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13086 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13088 * linux-low.c (fetch_register, store_register): Make code
13089 consistent, fix formatting.
13091 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13093 * linux-low.c (usr_store_inferior_registers): Factor out code
13094 to handle individual registers into...
13095 (store_register): ... this new function.
13097 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13099 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13100 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13101 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13102 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13103 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13104 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13105 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13106 (srv_xmlfiles): Add new XML files.
13108 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13110 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13111 (init_registers_s390_linux32v1): Add prototype.
13112 (init_registers_s390_linux32v2): Likewise.
13113 (init_registers_s390_linux64v1): Likewise.
13114 (init_registers_s390_linux64v2): Likewise.
13115 (init_registers_s390x_linux64v1): Likewise.
13116 (init_registers_s390x_linux64v2): Likewise.
13117 (s390_num_regs): Increment to 52.
13118 (s390_regmap): Add orig_r2 register.
13119 (s390_num_regs_3264): Increment to 68.
13120 (s390_regmap_3264): Add orig_r2 register.
13121 (s390_collect_ptrace_register): Handle orig_r2 register.
13122 (s390_supply_ptrace_register): Likewise.
13123 (s390_fill_last_break): New function.
13124 (s390_store_last_break): Likewise.
13125 (s390_fill_system_call): New function.
13126 (s390_store_system_call): Likewise.
13127 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13129 (s390_check_regset): New function.
13130 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13131 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13132 Update target_regsets for available register sets.
13134 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13135 Jan Kratochvil <jan.kratochvil@redhat.com>
13137 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13138 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13140 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13141 * linux-low.h (struct process_info_private): New member r_debug.
13142 * server.c (handle_qxfer_libraries): Call
13143 the_target->qxfer_libraries_svr4.
13144 (handle_qxfer_libraries_svr4): New function.
13145 (qxfer_packets): New entry "libraries-svr4".
13146 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13147 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13148 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13149 PACKET_qXfer_libraries_svr4.
13151 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13153 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13154 PSW address/mask between 8-byte and 16-byte formats.
13155 (s390_supply_ptrace_register): Likewise.
13156 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13157 basic addressing mode bit.
13159 2011-11-24 Stan Shebs <stan@codesourcery.com>
13161 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13163 2011-11-17 Stan Shebs <stan@codesourcery.com>
13165 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13166 (tracing_start_time): New global.
13167 (tracing_stop_time): New global.
13168 (tracing_user_name): New global.
13169 (tracing_notes): New global.
13170 (tracing_stop_note): New global.
13171 (cmd_qtstart): Set traceframe_usage, start_time.
13172 (stop_tracing): Set stop_time.
13173 (cmd_qtstatus): Report additional status.
13174 (cmd_qtp): New function.
13175 (handle_tracepoint_query): Call it.
13176 (cmd_qtnotes): New function.
13177 (handle_tracepoint_general_set): Call it.
13178 (get_timestamp): Rename from tsv_get_timestamp.
13180 2011-11-14 Stan Shebs <stan@codesourcery.com>
13181 Kwok Cheung Yeung <kcy@codesourcery.com>
13183 * linux-x86-low.c (small_jump_insn): New.
13184 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13185 trampoline and error message, build a trampoline and issue a small
13186 jump instruction to it.
13187 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13188 trampoline and error message.
13189 (x86_get_min_fast_tracepoint_insn_len): New.
13190 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13191 * linux-low.h (struct linux_target_ops): Add arguments to
13192 install_fast_tracepoint_jump_pad operation, add new operation.
13193 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13195 (linux_get_min_fast_tracepoint_insn_len): New function.
13196 (linux_target_op): Add new operation.
13197 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13198 (gdb_trampoline_buffer_end): Ditto.
13199 (gdb_trampoline_buffer_error): Ditto.
13200 (struct ipa_sym_addresses): Add fields for new IPA variables.
13201 (symbol_list): Add entries for new IPA variables.
13202 (struct tracepoint): Add fields to hold the address range of the
13203 trampoline used by the tracepoint.
13204 (trampoline_buffer_head): New static variable.
13205 (trampoline_buffer_tail): Ditto.
13206 (claim_trampoline_space): New function.
13207 (have_fast_tracepoint_trampoline_buffer): New function.
13208 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13210 (install_fast_tracepoint): Ditto, also add error buffer argument.
13211 (cmd_qtminftpilen): New function.
13212 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13213 (fast_tracepoint_from_trampoline_address): New function.
13214 (fast_tracepoint_collecting): Handle trampoline as part of jump
13216 (set_trampoline_buffer_space): New function.
13217 (initialize_tracepoint): Initialize new IPA variables.
13218 * target.h (struct target_ops): Add arguments to
13219 install_fast_tracepoint_jump_pad operation, add new
13220 get_min_fast_tracepoint_insn_len operation.
13221 (target_get_min_fast_tracepoint_insn_len): New.
13222 (install_fast_tracepoint_jump_pad): Add arguments.
13223 * server.h (IPA_BUFSIZ): Define.
13224 * linux-i386-ipa.c: Include extra header files.
13225 (initialize_fast_tracepoint_trampoline_buffer): New function.
13226 (initialize_low_tracepoint): Call it.
13227 * server.h (set_trampoline_buffer_space): Declare.
13228 (claim_trampoline_space): Ditto.
13229 (have_fast_tracepoint_trampoline_buffer): Ditto.
13231 2011-11-14 Yao Qi <yao@codesourcery.com>
13233 * server.c (handle_query): Handle InstallInTrace for qSupported.
13234 * tracepoint.c (add_tracepoint): Sort list.
13235 (install_tracepoint, download_tracepoint): New.
13236 (cmd_qtdp): Call them to install and download tracepoints.
13237 (sort_tracepoints): Removed.
13238 (cmd_qtstart): Update.
13240 2011-11-14 Yao Qi <yao@codesourcery.com>
13242 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13243 * mem-break.h: Declare.
13244 * tracepoint.c (cmd_qtstart): Move some code to ...
13245 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13247 (download_tracepoints): Move some code to ...
13248 (download_tracepoint_1): ... here. New.
13250 2011-11-08 Yao Qi <yao@codesourcery.com>
13252 * remote-utils.c (relocate_instruction): A comment fix.
13254 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13256 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13257 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13258 dr_status_mirror and dr_control_mirror from debug_reg_state.
13259 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13260 (i386_initial_stuff): Remove use of deleted globals.
13261 (i386_get_thread_context, i386_set_thread_context,
13262 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13263 from debug_reg_state.
13265 2011-11-05 Yao Qi <yao@codesourcery.com>
13267 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13268 address as TPOINT's.
13270 2011-11-02 Stan Shebs <stan@codesourcery.com>
13272 * tracepoint.c (agent_mem_read_string): New function.
13273 (eval_agent_expr): Call it for tracenz.
13274 * server.c (handle_query): Report support for tracenz.
13276 2011-11-02 Yao Qi <yao@codesourcery.com>
13278 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13280 2011-11-02 Yao Qi <yao@codesourcery.com>
13282 * target.h: Fix a typo in comment.
13284 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13286 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13287 clobber the breakpoints' shadows with fast tracepoint jumps.
13288 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13289 * target.c (write_inferior_memory): Also pass MYADDR down to
13292 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13294 * configure.ac: Check support for personality routine.
13295 * configure: Regenerate.
13296 * config.in: Likewise.
13297 * linux-low.c: Include <sys/personality.h>.
13298 Define ADDR_NO_RANDOMIZE if necessary.
13299 (linux_create_inferior): Disable address space randomization when
13300 forking inferior, if requested.
13301 (linux_supports_disable_randomization): New function.
13302 (linux_target_ops): Install it.
13303 * server.h (disable_randomization): Declare.
13304 * server.c (disable_randomization): New global variable.
13305 (handle_general_set): Handle QDisableRandomization.
13306 (handle_query): Likewise for qSupported.
13307 (main): Support --disable-randomization and --no-disable-randomization
13308 command line arguments.
13309 * target.h (struct target_ops): Add supports_disable_randomization.
13310 (target_supports_disable_randomization): New macro.
13312 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13314 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13316 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13317 [!PT_GETDSBT] (target_loadmap): New definition.
13318 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13319 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13320 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13321 and PT_GETDSBT to LINUX_LOADMAP.
13322 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13323 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13325 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13327 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13328 (arm_linux_hwbp_cap): New static variable.
13329 (arm_linux_get_hwbp_cap): Replace by ...
13330 (arm_linux_init_hwbp_cap): ... this new function.
13331 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13332 (arm_linux_get_hw_watchpoint_count): Likewise.
13333 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13334 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13335 (arm_prepare_to_resume): Use perror_with_name instead of error.
13337 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13339 * linux-arm-low.c: Include <signal.h>.
13340 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13341 (struct arm_linux_hwbp_cap): New data type.
13342 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13343 (struct arm_linux_hw_breakpoint): New data type.
13344 (MAX_BPTS, MAX_WPTS): Define.
13345 (struct arch_process_info, struct arch_lwp_info): New data types.
13346 (arm_linux_get_hwbp_cap): New function.
13347 (arm_linux_get_hw_breakpoint_count): Likewise.
13348 (arm_linux_get_hw_watchpoint_count): Likewise.
13349 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13350 (arm_hwbp_control_initialize): Likewise.
13351 (arm_hwbp_control_is_enabled): Likewise.
13352 (arm_hwbp_control_is_initialized): Likewise.
13353 (arm_hwbp_control_disable): Likewise.
13354 (arm_linux_hw_breakpoint_equal): Likewise.
13355 (arm_linux_hw_point_initialize): Likewise.
13356 (struct update_registers_data): New data structure.
13357 (update_registers_callback: New function.
13358 (arm_insert_point): Likewise.
13359 (arm_remove_point): Likewise.
13360 (arm_stopped_by_watchpoint): Likewise.
13361 (arm_stopped_data_address): Likewise.
13362 (arm_new_process): Likewise.
13363 (arm_new_thread): Likewise.
13364 (arm_prepare_to_resume): Likewise.
13365 (the_low_target): Register arm_insert_point, arm_remove_point,
13366 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13367 arm_new_thread, and arm_prepare_to_resume.
13369 2011-09-15 Stan Shebs <stan@codesourcery.com>
13371 * server.h (struct emit_ops): Add compare-goto fields.
13372 * tracepoint.c (gdb_agent_op_sizes): New table.
13373 (emit_eq_goto): New function.
13374 (emit_ne_goto): New function.
13375 (emit_lt_goto): New function.
13376 (emit_le_goto): New function.
13377 (emit_gt_goto): New function.
13378 (emit_ge_goto): New function.
13379 (is_goto_target): New function.
13380 (compile_bytecodes): Recognize special cases of compare-goto
13381 combinations and call specialized emitters for them.
13382 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13383 (amd64_emit_ne_goto): New function.
13384 (amd64_emit_lt_goto): New function.
13385 (amd64_emit_le_goto): New function.
13386 (amd64_emit_gt_goto): New function.
13387 (amd64_emit_ge_goto): New function.
13388 (amd64_emit_ops): Add the new functions.
13389 (i386_emit_eq_goto): New function.
13390 (i386_emit_ne_goto): New function.
13391 (i386_emit_lt_goto): New function.
13392 (i386_emit_le_goto): New function.
13393 (i386_emit_gt_goto): New function.
13394 (i386_emit_ge_goto): New function.
13395 (i386_emit_ops): Add the new functions.
13397 2011-09-08 Stan Shebs <stan@codesourcery.com>
13399 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13400 (i386_emit_epilogue): Restore %ebx.
13402 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13404 * server.c (step_thread): Remove definition.
13405 (process_serial_event): Don't handle Hs.
13406 * server.h (step_thread): Remove declaration.
13407 * target.c (set_desired_inferior): Remove use of step_thread.
13409 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13411 * linux-low.c: Include linux-procfs.h.
13412 (linux_attach_lwp_1): Update comments.
13413 (linux_attach): Scan for existing threads when attaching to a
13414 process that is the tgid.
13415 * Makefile.in: Update dependencies.
13417 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13419 * configure.srv: Add linux-procfs.o dependencies.
13421 2011-08-14 Yao Qi <yao@codesourcery.com>
13423 * target.h (struct target_ops): Fix indent.
13424 * win32-low.c (win32_target_ops): Fix comment.
13426 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13427 Yao Qi <yao@codesourcery.com>
13429 * Makefile.in (clean): Remove tic6x-*.c files.
13430 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13431 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13432 (tic6x-c64xp-linux.c): Likewise.
13433 * configure.srv: Add support for tic6x-*-uclinux.
13434 * linux-tic6x-low.c: New.
13435 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13437 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13438 Yao Qi <yao@codesourcery.com>
13440 * target.h (struct target_ops): Add read_loadmap.
13441 * linux-low.c (struct target_loadseg): New type.
13442 (struct target_loadmap): New type.
13443 (linux_read_loadmap): New function.
13444 (linux_target_ops): Add linux_read_loadmap.
13445 * server.c (handle_query): Support qXfer:fdpic:read packet.
13446 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13449 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13451 * win32-low.c: Include <stdint.h>.
13453 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13455 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13456 to the inferior here.
13457 (i386_remove_aligned_watchpoint): Ditto.
13458 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13459 fit part of the watchpoint in the debug registers.
13460 (i386_update_inferior_debug_regs): New.
13461 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13462 registers, and only update the inferior on success.
13463 (i386_low_remove_watchpoint): Ditto.
13465 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13467 * linux-low.c (compare_ints, unique, list_threads, show_process,
13468 linux_core_of_thread): Delete.
13469 (linux_target_ops): Change linux_core_of_thread to
13470 linux_common_core_of_thread.
13471 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13472 * utils.c (malloc_failure): Change type of argument.
13473 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13474 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13475 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13476 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13477 (IPA_OBJS): Add common-utils-ipa.o.
13478 (ptid_h, linux_osdata_h): New macros.
13479 (server_h): Add common/common-utils.h, common/xml-utils.h,
13480 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13482 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13483 ptid.o, buffer.o): New rules.
13484 (linux-low.o): Add common/linux-osdata.h as a dependency.
13485 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13486 * configure.ac: Add AC_HEADER_DIRENT check.
13487 * config.in: Regenerate.
13488 * configure: Regenerate.
13489 * remote-utils.c (xml_escape_text): Delete.
13490 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13491 buffer_xml_printf): Move to common/buffer.c.
13492 * server.c (main): Remove call to initialize_inferiors.
13493 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13494 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13495 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13496 internal_error, gdb_assert, gdb_assert_fail): Delete.
13497 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13498 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13500 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13501 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13502 initialize_inferiors): Delete.
13504 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13506 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13509 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13511 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13513 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13515 2011-05-26 Yao Qi <yao@codesourcery.com>
13517 * Makefile.in (thread-db.o): Track dependence to
13518 common/gdb_thread_db.h.
13519 * thread-db.c: include gdb_thread_db.h from right place.
13521 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13523 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13524 __FILE__ and __LINE__ to internal_error.
13526 2011-05-13 Doug Evans <dje@google.com>
13528 * thread-db.c (try_thread_db_load_from_sdir): New function.
13529 (try_thread_db_load_from_dir): New function.
13530 (thread_db_load_search): Handle $sdir, ignore $pdir.
13531 Remove trying of system directories if search of
13532 libthread-db-search-path fails, that is now done via $sdir.
13534 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13536 * server.c (handle_query): Add EnableDisableTracepoints to the list
13537 of supported features.
13538 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13540 (cmd_qtenable_disable): New.
13541 (cmd_qtstart): Install tracepoints even if disabled.
13542 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13543 receiving a QTEnable or QTDisable packet.
13544 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13545 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13547 (gdb_probe): Skip data collection if static tracepoint is disabled.
13549 2011-05-10 Doug Evans <dje@google.com>
13551 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13553 2011-05-04 Doug Evans <dje@google.com>
13555 * linux-low.c (linux_join): Skip process lookup.
13556 * spu-low.c (spu_join): Ditto.
13557 * server.c (join_inferiors_callback): Delete.
13558 (process_serial_event): For 'D' packet (detach) call join_inferior
13561 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13563 * README: Don't mention xscale*-*-linux*.
13564 * configure.srv (xscale*-*-linux*): Don't handle target.
13566 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13568 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13570 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13571 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13572 (i386_emit_void_call_2): Likewise.
13574 2011-04-26 Yao Qi <yao@codesourcery.com>
13576 * linux-low.c: Move common macros to linux-ptrace.h.
13577 Include linux-ptrace.h.
13578 * Makefile.in (linux_ptrace_h): New.
13579 (linux-low.o): Depends on linux-ptrace.h.
13581 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13583 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13584 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13585 (remote_prepare): New function with most of the TCP code from ...
13586 (remote_open): ... here. Detect PORT here unconditionally. Move also
13587 setting transport_is_reliable.
13588 * server.c (run_once): New variable.
13589 (gdbserver_usage): Document it.
13590 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13591 the first run if RUN_ONCE.
13592 * server.h (run_once, remote_prepare): New declarations.
13594 2011-04-19 Tom Tromey <tromey@redhat.com>
13596 * win32-low.c (handle_load_dll): Remove duplicate "the".
13598 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13600 Remove support for old Cygwin 1.5 versions.
13601 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13602 function to avoid warning.
13603 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13606 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13608 * gdbserver/server.h (Macro _): Define it if not available.
13610 2011-03-14 Michael Snyder <msnyder@vmware.com>
13612 * hostio.c (handle_close): Remove unnecessary null test.
13614 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13616 * Makefile.in (maintainer-clean realclean distclean): Remove
13617 "make ... subdir_do" command.
13619 2011-03-10 Michael Snyder <msnyder@vmware.com>
13621 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13623 * server.c (handle_v_run): Free alloced buffer on early return.
13625 2011-03-09 Yao Qi <yao@codesourcery.com>
13628 2011-03-04 Yao Qi <yao@codesourcery.com>
13630 * Makefile.in: Remove GNU make feature --directory.
13632 2011-03-05 Yao Qi <yao@codesourcery.com>
13634 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13635 (subdir_do): New make target. Copied from gdb/Makefile.
13636 (maintainer-clean, realclean, distclean, clean): Call corresponding
13637 make targets in common/Makefile.
13639 2011-02-11 Yao Qi <yao@codesourcery.com>
13641 * configure.ac: Call AC_PROG_RANLIB.
13642 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13643 * configure: Regenerate.
13645 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13647 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13649 2011-03-06 Yao Qi <yao@codesourcery.com>
13651 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13653 2011-03-05 Yao Qi <yao@codesourcery.com>
13655 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13656 (subdir_do): New make target. Copied from gdb/Makefile.
13657 (maintainer-clean, realclean, distclean, clean): Call corresponding
13658 make targets in common/Makefile.
13660 2011-03-04 Yao Qi <yao@codesourcery.com>
13662 * Makefile.in: Remove GNU make feature --directory.
13664 2011-03-04 Michael Snyder <msnyder@vmware.com>
13666 * server.c (queue_stop_reply): Call xmalloc not malloc.
13668 2011-03-02 Michael Snyder <msnyder@vmware.com>
13670 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13672 2011-02-28 Michael Snyder <msnyder@vmware.com>
13674 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13675 (cmd_qtframe): Ditto.
13676 (cmd_qtbuffer): Ditto.
13677 (cmd_bigqtbuffer): Ditto.
13679 * utils.c (decimal2str): Initialize 'width' to nine, then
13680 don't mess with it.
13682 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13684 * hostio.c (require_data): Free *data, not data.
13686 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13688 * hostio.c (require_data): Use free, not xfree.
13690 2011-02-27 Michael Snyder <msnyder@vmware.com>
13692 * server.c (handle_query): Discard unused value.
13694 * hostio.c (require_data): Free malloc memory before returning
13697 2011-02-26 Michael Snyder <msnyder@vmware.com>
13699 * linux-low.c (list_threads): Call closedir for dirent.
13701 2011-02-27 Michael Snyder <msnyder@vmware.com>
13703 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13704 a case statement falls through.
13706 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13708 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13711 2011-02-26 Michael Snyder <msnyder@vmware.com>
13713 * utils.c (decimal2str): Eliminate dead code and dead param.
13714 (pulongest): Drop dead param from call to decimal2str.
13717 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13719 Revert the following patch (not approved yet):
13720 2011-02-21 Hui Zhu <teawater@gmail.com>
13721 * tracepoint.c (tp_printf): New function.
13722 (eval_agent_expr): Handle gdb_agent_op_printf.
13724 2011-02-21 Hui Zhu <teawater@gmail.com>
13726 * tracepoint.c (tp_printf): New function.
13727 (eval_agent_expr): Handle gdb_agent_op_printf.
13729 2011-02-18 Tom Tromey <tromey@redhat.com>
13731 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13732 (tracepoint.o): Likewise.
13733 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13734 (gdb_agent_op_names): Likewise.
13736 2011-02-18 Tom Tromey <tromey@redhat.com>
13738 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13739 gdb_agent_op_rot>: New constants.
13740 (gdb_agent_op_names): Add pick and roll.
13741 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13744 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13746 * aclocal.m4: Regenerated with aclocal-1.11.1.
13748 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13750 * server.c (handle_qxfer_traceframe_info): New.
13751 (qxfer_packets): Register "traceframe-info".
13752 (handle_query): Report support for qXfer:traceframe-info:read+.
13753 * tracepoint.c (match_blocktype): New.
13754 (traceframe_find_block_type): Rename to ...
13755 (traceframe_walk_blocks): ... this. Add callback filter argument,
13757 (traceframe_find_block_type): New, reimplemented on top of
13758 traceframe_walk_blocks.
13759 (build_traceframe_info_xml): New.
13760 (traceframe_read_info): New.
13761 * server.h (traceframe_read_info): Declare.
13763 2011-02-11 Yao Qi <yao@codesourcery.com>
13765 * configure.ac: Call AC_PROG_RANLIB.
13766 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13767 * configure: Regenerate.
13769 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13771 * server.c (gdb_read_memory): Change return semantics to allow
13773 (handle_search_memory_1): Adjust.
13774 (process_serial_event) <'m' packet>: Handle partial transfers.
13775 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13777 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13779 * regcache.c (init_register_cache): Initialize
13780 regcache->register_status.
13781 (free_register_cache): Release regcache->register_status.
13782 (regcache_cpy): Copy register_status.
13783 (registers_to_string): Print 'x's for unavailable registers.
13784 (supply_register): Mark the register's status valid or
13785 unavailable, depending on whether a buffer was passed in or not.
13786 (supply_register_zeroed): New.
13787 (supply_regblock): Mark the registers' status valid or
13788 unavailable, depending on whether a buffer was passed in or not.
13789 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13790 (struct regcache): New `register_status' field.
13791 (supply_register_zeroed): Declare.
13792 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13793 supply_register_zeroed, rather than passing a NULL buffer to
13795 * tracepoint.c (fetch_traceframe_registers): Update comment.
13797 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13799 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13802 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13804 * server.h (decode_xfer_write): Change prototype.
13805 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13806 and don't extract the annex here.
13807 * server.c (decode_xfer_read): Remove `annex' parameter,
13808 and don't extract the annex here.
13809 (decode_xfer): New.
13810 (struct qxfer): New.
13811 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13812 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13813 (handle_qxfer_statictrace): New functions, abstracted out from
13814 handle_query, and made to use the struct qxfer interface.
13815 (handle_threads_qxfer_proper): Rename to ...
13816 (handle_qxfer_threads_proper): ... this.
13817 (handle_threads_qxfer): Rename to ...
13818 (handle_qxfer_threads): ... this. Adjust.
13819 (qxfer_packets): New array.
13820 (handle_qxfer): New function.
13821 (handle_query): Use handle_qxfer.
13823 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13825 * gdbreplay.c: Shorten lines of >= 80 columns.
13826 * linux-low.c: Ditto.
13827 * linux-ppc-low.c: Ditto.
13828 * linux-s390-low.c: Ditto.
13829 * linux-sparc-low.c: Ditto.
13830 * linux-x86-low.c: Ditto.
13831 * linux-xtensa-low.c: Ditto.
13832 * mem-break.c: Ditto.
13833 * nto-low.c: Ditto.
13834 * regcache.h: Ditto.
13835 * remote-utils.c: Ditto.
13838 * thread-db.c: Ditto.
13839 * tracepoint.c: Ditto.
13841 * win32-low.h: Ditto.
13843 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13845 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13848 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13850 * server.c (gdbserver_version): Update copyright year in version
13852 * gdbreplay.c (gdbreplay_version): Ditto.
13854 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13856 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13857 * linux-bfin-low.c: New file.
13858 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13859 PT_DATA_ADDR for BFIN targets.
13860 * Makefile.in (SFILES): Add linux-bfin-low.c.
13861 (clean): Remove reg-bfin.c.
13862 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13863 * README: Mention supported Blackfin targets.
13865 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13867 * .gitignore: New file.
13869 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13871 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13873 2010-10-22 Jie Zhang <jie@codesourcery.com>
13875 * Makefile.in: Add FLAGS_TO_PASS variable.
13876 (install): Remove dependency of install-only and recursively
13877 invoke make for install-only.
13879 2010-10-04 Doug Evans <dje@google.com>
13881 * Makefile.in (uninstall): Use $(DESTDIR).
13883 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13887 * linux-x86-low.c (compat_siginfo_from_siginfo)
13888 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13889 si_code is < 0. Check for si_code == SI_TIMER before checking for
13892 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13894 * lynx-i386-low.c: New file.
13895 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13897 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13899 * lynx-low.c (ptrace_request_to_str): Remove handling for
13900 request values that have been removed in LynxOS 5.x.
13902 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13904 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13907 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13909 * configure.ac: Add --enable-inprocess-agent option.
13910 * configure: Rebuilt.
13912 2010-09-06 Yao Qi <yao@codesourcery.com>
13914 * linux-low.c (linux_kill): Remove unused variable.
13915 (linux_stabilize_threads): Likewise.
13916 * server.c (start_inferior): Likewise.
13917 (queue_stop_reply_callback): Likewise.
13918 * tracepoint.c (do_action_at_tracepoint): Likewise.
13920 2010-09-06 Yao Qi <yao@codesourcery.com>
13922 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13925 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13927 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13929 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13931 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13934 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13936 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13937 gdbserver/lynx-ppc-low.c: New files.
13938 * Makefile.in (lynx_low_h): New variable.
13939 (lynx-low.o, lynx-ppc-low.o): New rules.
13940 * configure.ac: On LynxOS, link with -lnetinet.
13941 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13942 * configure: regenerate.
13944 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13946 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13947 * configure.ac: Add check for vasprintf and vsnprintf.
13948 * configure, config.in: Regenerate.
13949 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13951 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13953 * gdbreplay.c: Move include of alloca.h up, next to include of
13955 * server.h: Add include of malloc.h.
13956 * mem-break.c: Remove include of malloc.h.
13957 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13959 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13961 * Makefile.in (memmem.o): Build with -Wno-error.
13963 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13965 * utils.c (xsnprintf): Make non-static.
13966 * server.h: Add xsnprintf declaration.
13967 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13968 replace calls to snprintf by calls to xsnprintf throughout.
13970 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13972 * configure.ac: Add configure check for alloca.
13973 * configure, config.in: Regenerate.
13974 * server.h: Include alloca.h if it exists.
13975 * gdbreplay.c: Include alloca.h if it exists.
13977 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13979 * linux-low.c (__SIGRTMIN): Define if not already defined.
13980 (linux_create_inferior): Check for __ANDROID__ rather than
13982 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13983 are already deferred.
13984 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13985 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13986 stopped and already has a pending signal to report.
13987 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13988 a pending signal to report or is moving out of a jump pad.
13989 (linux_init_signals): Check for __ANDROID__ rather than
13992 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13994 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13995 debug_threads check. Avoid a linear search when not doing debug
13998 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14000 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14001 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14002 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14003 (process_event): Change local fd's type to gdb_fildes_t.
14004 (create_file_handler): Adjust prototype.
14005 (delete_file_handler): Adjust prototype.
14006 (handle_file_event): Adjust prototype. Use pfildes.
14007 (create_file_event): Adjsut prototype.
14008 * remote-utils.c (remote_desc, listen_desc): Change type to
14010 * server.h: New gdb_fildes_t typedef.
14011 [USE_WIN32API]: Include winsock2.h.
14012 (delete_file_handler, add_file_handler): Adjust prototypes.
14013 (pfildes): Declare.
14014 * utils.c (pfildes): New.
14016 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14018 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14019 * configure: Regenerate.
14021 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14023 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14024 (linux_done_accessing_memory): ... this.
14025 (linux_target_ops): Adjust.
14026 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14027 * nto-low.c (nto_target_ops): Adjust comment.
14028 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14029 * spu-low.c (spu_target_ops): Adjust comment.
14030 * target.h (target_ops): Rename unprepare_to_access_memory field
14031 to done_accessing_memory.
14032 (unprepare_to_access_memory): Rename to ...
14033 (done_accessing_memory): ... this.
14035 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14037 * linux-low.c (linux_prepare_to_access_memory): New.
14038 (linux_unprepare_to_access_memory): New.
14039 (linux_target_ops): Install them.
14040 * server.c (read_memory): Rename to ...
14041 (gdb_read_memory): ... this. Use
14042 prepare_to_access_memory/prepare_to_access_memory.
14043 (write_memory): Rename to ...
14044 (gdb_write_memory): ... this. Use
14045 prepare_to_access_memory/prepare_to_access_memory.
14046 (handle_search_memory_1): Adjust.
14047 (process_serial_event): Adjust.
14048 * target.h (struct target_ops): New fields
14049 prepare_to_access_memory and unprepare_to_access_memory.
14050 (prepare_to_access_memory, unprepare_to_access_memory): New.
14051 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14052 prepare_to_access_memory/prepare_to_access_memory.
14053 * nto-low.c (nto_target_ops): Adjust.
14054 * spu-low.c (spu_target_ops): Adjust.
14055 * win32-low.c (win32_target_ops): Adjust.
14057 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14059 * Makefile.in (WARN_CFLAGS): Get it from configure.
14060 (WERROR_CFLAGS): New.
14061 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14062 * configure.ac: Introduce --enable-werror, which adds -Werror to
14063 the compiler command line. Enabled by default. Disable with
14064 --disable-werror. Add -Wdeclaration-after-statement
14065 Wpointer-arith and -Wformat-nonliteral to warning flags.
14066 * configure: Regenerate.
14068 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14070 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14072 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14074 * gdbreplay.c (remote_error): New.
14076 (expect): Use gdbchar. Check for error reading from GDB.
14077 Clarify sync error output.
14078 (play): Check for errors writing to GDB.
14079 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14080 * remote-utils.c (getpkt): Check for errors writing to the remote
14083 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14085 * linux-low.c (linux_wait_1): Move non-debugging code out of
14086 `debug_threads' control.
14088 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14090 * linux-low.c (linux_wait_1): Don't set last_status here.
14091 * server.c (push_event, queue_stop_reply_callback): Assert we're
14092 not pushing a TARGET_WAITKIND_IGNORE event.
14093 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14094 (myresume, handle_target_event): Set the thread's last_resume_kind
14095 and last_status from the target returned status.
14097 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14101 * linux-x86-low.c (update_debug_registers_callback): New.
14102 (i386_dr_low_set_addr): Use it.
14103 (i386_dr_low_get_addr): New.
14104 (i386_dr_low_set_control): Use update_debug_registers_callback.
14105 (i386_dr_low_get_control): New.
14106 (i386_dr_low_get_status): Adjust.
14107 * linux-low.c (linux_stop_lwp): New.
14108 * linux-low.h (linux_stop_lwp): Declare.
14110 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14111 argument instead of a i386_debug_reg_state.
14112 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14113 a i386_debug_reg_state.
14114 (i386_insert_aligned_watchpoint): Adjust.
14115 (i386_remove_aligned_watchpoint): Adjust.
14116 (i386_low_stopped_data_address): Read the debug registers from the
14117 inferior instead of from the mirrors.
14118 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14119 (i386_dr_low_get_addr): Declare.
14120 (i386_dr_low_get_control): Declare.
14121 (i386_dr_low_get_status): Change prototype.
14123 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14124 (i386_dr_low_get_addr): New.
14125 (i386_dr_low_get_control): New.
14126 (i386_dr_low_get_status): Adjust prototype. Return
14128 (i386_initial_stuff): Clear dr_status_mirror and
14130 (i386_get_thread_context): Adjust.
14131 (i386_set_thread_context): Adjust.
14132 (i386_thread_added): Adjust.
14134 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14136 * linux-low.h (linux_thread_area): Delete declaration.
14138 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14140 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14141 after its termination.
14143 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14145 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14146 (gdb_wants_all_stopped): Delete.
14147 (linux_wait_1): Don't call them.
14148 * server.c (handle_v_cont): Tag all threads as want-stopped.
14149 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14150 stopped as "client-wants-stopped".
14152 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14154 * Makefile.in (signals_h): New.
14155 (server_h): Depend on it.
14156 (server.o): Don't depend on $(signals_def).
14157 (signals.o): Depend on $(signals_def).
14159 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14161 * Makefile.in (signals_def): New.
14162 (server_h): Append include/gdb/signals.h and signals_def.
14163 (server.o): Append signals_def.
14165 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14167 * server.c (handle_target_event): Use target_signal_to_host for
14168 resume_info.sig initialization.
14169 * target.h (struct thread_resume) <sig>: New comment.
14171 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14173 * server.c (handle_query): strcpy() the returned string from paddress()
14174 instead of sprintf().
14175 * utils.c (paddress): Return phex_nz().
14177 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14179 * server.c (handle_v_cont): Call mourn_inferior if process
14181 (myresume): Likewise.
14183 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14185 Static tracepoints, and integration with UST.
14187 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14188 * mem-break.c (uninsert_all_breakpoints)
14189 (reinsert_all_breakpoints): New.
14190 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14191 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14192 (gdb_agent_ust_loaded, helper_thread_id)
14193 (gdb_agent_helper_thread_id): New macros.
14194 (struct ipa_sym_addresses): Add addr_ust_loaded,
14195 addr_helper_thread_id, addr_cmd_buf.
14196 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14197 (in_process_agent_loaded_ust): New.
14198 (write_e_ust_not_loaded): New.
14199 (maybe_write_ipa_ust_not_loaded): New.
14200 (struct collect_static_trace_data_action): New.
14201 (enum tracepoint_type) <static_tracepoint>: New.
14202 (struct tracepoint) <handle>: Mention static tracepoints.
14203 (struct static_tracepoint_ctx): New.
14204 (CMD_BUF_SIZE): New.
14205 (add_tracepoint_action): Handle static tracepoint actions.
14206 (unprobe_marker_at): New.
14207 (clear_installed_tracepoints): Handle static tracepoints.
14208 (cmd_qtdp): Handle static tracepoints.
14209 (probe_marker_at): New.
14210 (cmd_qtstart): Handle static tracepoints.
14211 (response_tracepoint): Handle static tracepoints.
14212 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14213 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14214 (get_context_regcache): Handle static tracepoints.
14215 (do_action_at_tracepoint): Handle static tracepoint actions.
14216 (traceframe_find_block_type): Handle static trace data blocks.
14217 (traceframe_read_sdata): New.
14218 (download_tracepoints): Download static tracepoint actions.
14219 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14220 (GDB_PROBE_NAME): New.
14222 (GET_UST_SYM): New.
14225 (ust_marker_to_static_tracepoint): New.
14227 (collect_ust_data_at_tracepoint): New.
14228 (gdb_ust_probe): New.
14229 (UNIX_PATH_MAX, SOCK_DIR): New.
14230 (gdb_ust_connect_sync_socket): New.
14231 (resume_thread, stop_thread): New.
14232 (run_inferior_command): New.
14233 (init_named_socket): New.
14234 (gdb_ust_socket_init): New.
14235 (cstr_to_hexstr): New.
14237 (first_marker, next_marker): New.
14238 (response_ust_marker): New.
14239 (cmd_qtfstm, cmd_qtsstm): New.
14240 (unprobe_marker_at, probe_marker_at): New.
14241 (cmd_qtstmat, gdb_ust_thread): New.
14242 (gdb_ust_init): New.
14243 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14244 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14245 (ST_REGENTRY): New.
14246 (x86_64_st_collect_regmap): New.
14247 (X86_64_NUM_ST_COLLECT_GREGS): New.
14248 (AMD64_RIP_REGNUM): New.
14249 (supply_static_tracepoint_registers): New.
14250 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14251 (ST_REGENTRY): New.
14252 (i386_st_collect_regmap): New.
14253 (i386_NUM_ST_COLLECT_GREGS): New.
14254 (supply_static_tracepoint_registers): New.
14255 * server.c (handle_query): Handle qXfer:statictrace:read.
14256 <qSupported>: Report support for StaticTracepoints, and
14257 qXfer:statictrace:read features.
14258 * server.h (traceframe_read_sdata)
14259 (supply_static_tracepoint_registers): Declare.
14260 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14261 (unpack_varlen_hex): Include in IPA build.
14262 * Makefile.in (ustlibs, ustinc): New.
14263 (IPA_OBJS): Add remote-utils-ipa.o.
14264 ($(IPA_LIB)): Link -ldl and -lpthread.
14266 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14267 * config.in, configure: Regenerate.
14269 2010-06-20 Ian Lance Taylor <iant@google.com>
14270 Pedro Alves <pedro@codesourcery.com>
14272 * linux-x86-low.c (always_true): Delete.
14273 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14274 trying to fool the compiler with always_true.
14276 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14278 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14279 conditions in gdbserver.
14281 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14283 * spu-low.c (spu_read_memory): Wrap around local store limit.
14284 (spu_write_memory): Likewise.
14286 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14288 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14289 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14291 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14293 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14294 uses with LONGEST uses.
14296 2010-06-14 Stan Shebs <stan@codesourcery.com>
14297 Pedro Alves <pedro@codesourcery.com>
14301 * linux-x86-low.c: Include limits.h.
14303 (always_true): New.
14306 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14307 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14308 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14309 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14310 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14311 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14312 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14313 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14314 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14315 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14316 (amd64_emit_void_call_2): New.
14317 (amd64_emit_ops): New.
14318 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14319 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14320 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14321 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14322 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14323 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14324 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14325 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14326 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14327 (i386_emit_stack_adjust, i386_emit_int_call_1)
14328 (i386_emit_void_call_2): New.
14329 (i386_emit_ops): New.
14330 (x86_emit_ops): New.
14331 (the_low_target): Install x86_emit_ops.
14332 * server.h (struct emit_ops): New.
14333 (get_raw_reg_func_addr): Declare.
14334 (current_insn_ptr, emit_error): Declare.
14335 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14336 (set_trace_state_variable_value): New defines.
14337 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14338 addr_get_trace_state_variable_value and
14339 addr_set_trace_state_variable_value.
14340 (symbol_list): New fields for get_raw_reg,
14341 get_trace_state_variable_value and set_trace_state_variable_value.
14342 (condfn): New typedef.
14343 (struct tracepoint): New field `compiled_cond'.
14344 (do_action_at_tracepoint): Clear compiled_cond.
14345 (get_trace_state_variable_value, set_trace_state_variable_value):
14347 (condition_true_at_tracepoint): If there's a compiled condition,
14349 (current_insn_ptr, emit_error): New globals.
14350 (struct bytecode_address): New.
14351 (get_raw_reg_func_addr): New.
14352 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14353 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14354 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14355 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14356 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14357 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14358 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14359 (compile_tracepoint_condition, compile_bytecodes): New.
14360 * target.h (emit_ops): Forward declare.
14361 (struct target_ops): New field emit_ops.
14362 (target_emit_ops): New.
14363 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14364 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14365 * linux-low.c (linux_emit_ops): New.
14366 (linux_target_ops): Install it.
14367 * linux-low.h (struct linux_target_ops): New field emit_ops.
14369 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14371 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14372 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14374 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14375 Stan Shebs <stan@codesourcery.com>
14377 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14378 (all): Depend on $(extra_libraries).
14379 (install-only): Install the IPA.
14380 (IPA_OBJS, IPA_LIB): New.
14381 (clean): Remove the IPA lib.
14382 (IPAGENT_CFLAGS): New.
14383 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14384 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14385 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14386 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14387 * configure.ac: Check for atomic builtins support in the compiler.
14388 (IPA_DEPFILES, extra_libraries): Define.
14389 * configure.srv (ipa_obj): Add description.
14390 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14391 (i[34567]86-*-linux*): Set ipa_obj.
14392 (x86_64-*-linux*): Set ipa_obj.
14393 * linux-low.c (stabilizing_threads): New.
14394 (supports_fast_tracepoints): New.
14395 (linux_detach): Stabilize threads before detaching.
14396 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14397 the lwp is either not stabilizing, or is moving out of a jump pad.
14398 (linux_fast_tracepoint_collecting): New.
14399 (maybe_move_out_of_jump_pad): New.
14400 (enqueue_one_deferred_signal): New.
14401 (dequeue_one_deferred_signal): New.
14402 (linux_wait_for_event_1): If moving out of a jump pad, defer
14403 pending signals to later.
14404 (linux_stabilize_threads): New.
14405 (linux_wait_1): Check if threads need moving out of jump pads, and
14407 (stuck_in_jump_pad_callback): New.
14408 (move_out_of_jump_pad_callback): New.
14409 (lwp_running): New.
14410 (linux_resume_one_lwp): Handle moving out of jump pads.
14411 (linux_set_resume_request): Dequeue deferred signals.
14412 (need_step_over_p): Also step over fast tracepoint jumps.
14413 (start_step_over): Also uninsert fast tracepoint jumps.
14414 (finish_step_over): Also reinsert fast tracepoint jumps.
14415 (linux_install_fast_tracepoint_jump): New.
14416 (linux_target_ops): Install linux_stabilize_threads and
14417 linux_install_fast_tracepoint_jump_pad.
14418 * linux-low.h (linux_target_ops) <get_thread_area,
14419 install_fast_tracepoint_jump_pad>: New fields.
14420 (struct lwp_info) <collecting_fast_tracepoint,
14421 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14422 (linux_get_thread_area): Declare.
14423 * linux-x86-low.c (jump_insn): New.
14424 (x86_get_thread_area): New.
14425 (append_insns): New.
14426 (push_opcode): New.
14427 (amd64_install_fast_tracepoint_jump_pad): New.
14428 (i386_install_fast_tracepoint_jump_pad): New.
14429 (x86_install_fast_tracepoint_jump_pad): New.
14430 (the_low_target): Install x86_get_thread_area and
14431 x86_install_fast_tracepoint_jump_pad.
14432 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14433 (struct fast_tracepoint_jump): New.
14434 (fast_tracepoint_jump_insn): New.
14435 (fast_tracepoint_jump_shadow): New.
14436 (find_fast_tracepoint_jump_at): New.
14437 (fast_tracepoint_jump_here): New.
14438 (delete_fast_tracepoint_jump): New.
14439 (set_fast_tracepoint_jump): New.
14440 (uninsert_fast_tracepoint_jumps_at): New.
14441 (reinsert_fast_tracepoint_jumps_at): New.
14442 (set_breakpoint_at): Use write_inferior_memory.
14443 (uninsert_raw_breakpoint): Use write_inferior_memory.
14444 (check_mem_read): Mask out fast tracepoint jumps.
14445 (check_mem_write): Mask out fast tracepoint jumps.
14446 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14447 (set_fast_tracepoint_jump): Declare.
14448 (delete_fast_tracepoint_jump)
14449 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14450 (reinsert_fast_tracepoint_jumps_at): Declare.
14451 * regcache.c: Don't compile many functions when building the
14452 in-process agent library.
14453 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14454 the register buffer in the heap.
14455 (free_register_cache): If the register buffer isn't owned by the
14456 regcache, don't free it.
14457 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14458 pre-existing register caches.
14459 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14461 (convert_ascii_to_int): : Constify `from' parameter type.
14462 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14463 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14464 the needed buffer in-place.
14465 (relocate_instruction): New.
14466 * server.c (handle_query) <qSymbols>: If the target supports
14467 tracepoints, give it a chance of looking up symbols. Report
14468 support for fast tracepoints.
14469 (handle_status): Stabilize threads.
14470 (process_serial_event): Adjust.
14471 * server.h (struct fast_tracepoint_jump): Forward declare.
14472 (struct process_info) <fast_tracepoint_jumps>: New field.
14473 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14474 (decode_X_packet, decode_M_packet): Adjust.
14475 (relocate_instruction): Declare.
14476 (in_process_agent_loaded): Declare.
14477 (tracepoint_look_up_symbols): Declare.
14478 (struct fast_tpoint_collect_status): Declare.
14479 (fast_tracepoint_collecting): Declare.
14480 (force_unlock_trace_buffer): Declare.
14481 (handle_tracepoint_bkpts): Declare.
14482 (initialize_low_tracepoint)
14483 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14484 * target.h (struct target_ops) <stabilize_threads,
14485 install_fast_tracepoint_jump_pad>: New fields.
14486 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14487 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14488 [HAVE_STDINT_H]: Include stdint.h.
14489 (trace_debug_1): Rename to ...
14490 (trace_vdebug): ... this.
14491 (trace_debug): Rename to ...
14492 (trace_debug_1): ... this. Add `level' parameter.
14493 (trace_debug): New.
14494 (ATTR_USED, ATTR_NOINLINE): New.
14495 (IP_AGENT_EXPORT): New.
14496 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14497 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14498 (about_to_request_buffer_space, trace_buffer_is_full)
14499 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14500 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14501 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14502 (traceframe_write_count, traceframes_created)
14503 (trace_state_variables)
14504 New renaming defines.
14505 (struct ipa_sym_addresses): New.
14506 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14507 (symbol_list): New.
14508 (ipa_sym_addrs): New.
14509 (all_tracepoint_symbols_looked_up): New.
14510 (in_process_agent_loaded): New.
14511 (write_e_ipa_not_loaded): New.
14512 (maybe_write_ipa_not_loaded): New.
14513 (tracepoint_look_up_symbols): New.
14514 (debug_threads) [IN_PROCESS_AGENT]: New.
14515 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14516 (UNKNOWN_SIDE_EFFECTS): New.
14517 (stop_tracing): New.
14518 (flush_trace_buffer): New.
14519 (stop_tracing_bkpt): New.
14520 (flush_trace_buffer_bkpt): New.
14521 (read_inferior_integer): New.
14522 (read_inferior_uinteger): New.
14523 (read_inferior_data_pointer): New.
14524 (write_inferior_data_pointer): New.
14525 (write_inferior_integer): New.
14526 (write_inferior_uinteger): New.
14527 (struct collect_static_trace_data_action): Delete.
14528 (enum tracepoint_type): New.
14529 (struct tracepoint) <type>: New field `type'.
14530 <actions_str, step_actions, step_actions_str>: Only include in
14532 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14533 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14534 (tracepoints): Use IP_AGENT_EXPORT.
14535 (last_tracepoint): Don't include in the IPA.
14536 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14537 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14538 (alloced_trace_state_variables): New.
14539 (trace_state_variables): Use IP_AGENT_EXPORT.
14540 (traceframe_t): Delete unused variable.
14541 (circular_trace_buffer): Don't include in the IPA.
14542 (trace_buffer_start): Delete.
14543 (struct trace_buffer_control): New.
14544 (trace_buffer_free): Delete.
14545 (struct ipa_trace_buffer_control): New.
14546 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14547 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14549 (trace_buffer_ctrl): New.
14550 (TRACE_BUFFER_CTRL_CURR): New.
14551 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14552 Reimplement as macros.
14553 (trace_buffer_wrap): Delete.
14554 (traceframe_write_count, traceframe_read_count)
14555 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14556 (struct tracepoint_hit_ctx) <type>: New field.
14557 (struct fast_tracepoint_ctx): New.
14558 (memory_barrier): New.
14560 (record_tracepoint_error): Update atomically in the IPA.
14561 (clear_inferior_trace_buffer): New.
14562 (about_to_request_buffer_space): New.
14563 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14564 updating the same buffer.
14565 (add_tracepoint): Default the tracepoint's type to trap
14566 tracepoint, and orig_size to -1.
14567 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14568 internal variables.
14569 (create_trace_state_variable): New parameter `gdb'. Handle it.
14570 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14571 (cmd_qtdp): Handle fast tracepoints.
14572 (cmd_qtdv): Adjust.
14573 (max_jump_pad_size): New.
14574 (gdb_jump_pad_head): New.
14575 (get_jump_space_head): New.
14576 (claim_jump_space): New.
14577 (sort_tracepoints): New.
14578 (MAX_JUMP_SIZE): New.
14579 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14581 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14582 support. Upload fast traceframes, and delete internal IPA
14584 (stop_tracing_handler): New.
14585 (flush_trace_buffer_handler): New.
14586 (cmd_qtstop): Upload fast tracepoints.
14587 (response_tracepoint): Handle fast tracepoints.
14588 (tracepoint_finished_step): Upload fast traceframes. Set the
14589 tracepoint hit context's tracepoint type.
14590 (handle_tracepoint_bkpts): New.
14591 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14592 type. Add comment about fast tracepoints.
14593 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14594 non-existing action_str field.
14595 (get_context_regcache): Handle fast tracepoints.
14596 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14598 (fast_tracepoint_from_jump_pad_address): New.
14599 (fast_tracepoint_from_ipa_tpoint_address): New.
14600 (collecting_t): New.
14601 (force_unlock_trace_buffer): New.
14602 (fast_tracepoint_collecting): New.
14604 (gdb_collect): New.
14605 (write_inferior_data_ptr): New.
14606 (target_tp_heap): New.
14607 (target_malloc): New.
14608 (download_agent_expr): New.
14610 (download_tracepoints): New.
14611 (download_trace_state_variables): New.
14612 (upload_fast_traceframes): New.
14613 (IPA_FIRST_TRACEFRAME): New.
14614 (IPA_NEXT_TRACEFRAME_1): New.
14615 (IPA_NEXT_TRACEFRAME): New.
14616 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14617 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14618 (gdb_jump_pad_buffer_end): New.
14619 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14620 (initialize_tracepoint): Adjust.
14621 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14622 buffer. Initialize the low module.
14623 * utils.c (PREFIX, TOOLNAME): New.
14624 (malloc_failure): Use PREFIX.
14625 (error): In the IPA, an error causes an exit.
14626 (fatal, warning): Use PREFIX.
14627 (internal_error): Use TOOLNAME.
14628 (NUMCELLS): Increase to 10.
14629 * configure, config.in: Regenerate.
14631 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14633 * server.c (handle_query) <qSupported>: Do two passes over the
14634 qSupported string to avoid nesting strtok.
14636 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14638 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14640 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14641 -Wl,--dynamic-list.
14642 * configure: Regenerate.
14643 * proc-service.list: New.
14645 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14647 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14650 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14652 * gdbreplay.c (remote_open): Check error return from socket() call by
14653 its equality to -1 not by it being negative.
14654 * remote-utils.c (remote_open): Likewise.
14656 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14658 * config.h: Regenerate.
14660 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14662 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14663 doesn't provide PTRACE_GET_THREAD_AREA.
14665 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14667 * linux-m68k-low.c: Include <asm/ptrace.h>
14668 (ps_get_thread_area): Implement.
14670 2010-05-03 Doug Evans <dje@google.com>
14672 * event-loop.c (struct callback_event): New struct.
14673 (callback_list): New global.
14674 (append_callback_event, delete_callback_event): New functions.
14675 (process_callback): New function.
14676 (start_event_loop): Call it.
14677 * remote-utils.c (NOT_SCHEDULED): Define.
14678 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14679 moved out of readchar.
14680 (readchar): Rewrite. Call reschedule before returning.
14681 (reset_readchar): New function.
14682 (remote_close): Call it.
14683 (process_remaining, reschedule): New functions.
14684 * server.h (callback_handler_func): New typedef.
14685 (append_callback_event, delete_callback_event): Declare.
14687 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14689 * proc-service.c (ps_pglobal_lookup): Use
14690 thread_db_look_up_one_symbol.
14691 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14692 parameter. Use it instead of all_symbols_looked_up.
14693 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14695 (all_symbols_looked_up): Don't declare.
14696 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14697 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14699 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14700 Set all_symbols_looked_up here.
14701 (thread_db_look_up_one_symbol): New.
14702 (thread_db_get_tls_address): Adjust.
14703 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14704 thread_db object on the heap, and tentatively set it in the
14706 (thread_db_init): Don't set all_symbols_looked_up here.
14707 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14709 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14711 * linux-low.c (linux_kill, linux_detach): Adjust.
14712 (status_pending_p_callback): Remove redundant statement. Check
14713 for !TARGET_WAITIKIND_IGNORE, instead of
14714 TARGET_WAITKIND_STOPPED.
14715 (handle_tracepoints): Make sure LWP is locked. Adjust.
14716 (linux_wait_for_event_1): Adjust.
14717 (linux_cancel_breakpoints): New.
14718 (unsuspend_one_lwp): New.
14719 (unsuspend_all_lwps): New.
14720 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14721 (send_sigstop_callback): Change return type to int, add new
14722 `except' parameter and handle it.
14723 (suspend_and_send_sigstop_callback): New.
14724 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14725 pass them down. If SUSPEND, also increment the lwp's suspend
14727 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14728 (need_step_over_p): Don't consider suspended LWPs.
14729 (start_step_over): Adjust.
14730 (proceed_one_lwp): Change return type to int, add new `except'
14731 parameter and handle it.
14732 (unsuspend_and_proceed_one_lwp): New.
14733 (proceed_all_lwps): Use find_inferior instead of
14735 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14736 also decrement the suspend count of LWPs. Pass `except' down,
14737 instead of hacking its suspend count.
14738 (linux_pause_all): Add `freeze' parameter. Adjust.
14739 (linux_unpause_all): New.
14740 (linux_target_ops): Install linux_unpause_all.
14741 * server.c (handle_status): Adjust.
14742 * target.h (struct target_ops): New fields `unpause_all' and
14743 `cancel_breakpoints'. Add new parameter to `pause_all'.
14744 (pause_all): Add new `freeze' parameter.
14745 (unpause_all): New.
14746 (cancel_breakpoints): New.
14747 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14748 cancel breakpoints.
14749 (cmd_qtstart): Pause threads.
14750 (stop_tracing): Pause threads, and cancel breakpoints.
14751 * win32-low.c (win32_target_ops): Adjust.
14753 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14755 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14756 the inferior right away from here...
14757 (linux_wait_1): ... to here, and adjust to check the thread's
14758 last_resume_kind instead of the lwp's step or stop_expected flags.
14760 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14762 * README: Use consistent `GDB' and `GDBserver' spellings.
14764 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14766 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14767 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14768 (linux_detach_one_lwp): Assume the lwp is stopped.
14769 (any_thread_of): Delete.
14770 (linux_detach): Stop all lwps here. Don't blindly delete all
14772 (delete_lwp_callback): New.
14773 (linux_mourn): Delete all lwps of the process that is gone.
14774 (linux_wait_1): Don't delete the last lwp of the process here.
14775 * mem-break.h (mark_breakpoints_out): Declare.
14776 * mem-break.c (mark_breakpoints_out): New.
14777 (free_all_breakpoints): Use it.
14778 * server.c (handle_target_event): If the process is gone, mark
14780 * thread-db.c (struct thread_db) <create_bp>: New field.
14781 (thread_db_enable_reporting): Fix prototype. Store a thread event
14782 breakpoint reference in the thread_db struct.
14783 (thread_db_load_search): Clear the thread_db object.
14784 (try_thread_db_load_1): Ditto.
14785 (switch_to_process): New.
14786 (disable_thread_event_reporting): Use it.
14787 (remove_thread_event_breakpoints): New.
14788 (thread_db_detach, thread_db_mourn): Use it.
14790 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14792 * linux-low.c (linux_enable_event_reporting): New.
14793 (linux_wait_for_event_1, handle_extended_wait): Use it.
14795 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14797 * linux-low.c (linux_kill_one_lwp, linux_kill)
14798 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14799 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14800 SIGSTOP even if the LWP is stopped.
14801 (send_sigstop_callback): New.
14802 (stop_all_lwps): Use send_sigstop_callback instead.
14803 (linux_resume_one_thread): Adjust.
14804 (proceed_one_lwp): Still proceed an LWP that the client has
14805 requested to stop, if we haven't reported it as stopped yet. Make
14806 sure that LWPs the client want stopped, have a pending SIGSTOP.
14808 2010-04-26 Doug Evans <dje@google.com>
14810 * server.c (handle_general_set): Make static.
14812 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14813 Print received char after testing for error/eof instead of before.
14814 (input_interrupt): Tweak comment.
14816 2010-04-23 Doug Evans <dje@google.com>
14818 * server.c (start_inferior): Print inferior argv if --debug.
14820 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14822 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14823 * nto-x86-low.c: Include server.h
14825 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14827 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14828 be consistent with other sources of this directory.
14829 (init_registers_amd64): Correct name of source file of this function
14832 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14834 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14835 64-bit executables.
14837 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14839 * win32-i386-low.c: Add 64-bit support.
14840 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14841 (init_registers_amd64): Declare.
14842 (mappings): Add 64-bit version of array.
14843 (init_windows_x86): New function.
14844 (the_low_target): Change init_arch field to init_windows_x86.
14846 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14848 * win32-low.c: Adapt to support also 64-bit architecture.
14849 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14850 (get_image_name): Use SIZE_T type for local variable `done'.
14851 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14852 (toolhelp_get_dll_name): Idem.
14853 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14854 Use uintptr_t typecast to avoid warning.
14855 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14856 (handle_exception): Use phex_nz to avoid warning.
14857 (win32_wait): Remove unused local variable `process'.
14859 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14861 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14864 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14866 * configure.ac: Use `ws2_32' library for srv_mingw.
14867 * configure: Regenerate.
14868 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14869 * remote-utils.c: Likewise.
14871 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14873 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14874 if __x86_64__ is defined.
14876 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14878 * configure: Regenerate.
14880 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14882 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14883 * target.h (target_ops): New get_tib_address field.
14884 * win32-low.h (win32_thread_info): Add thread_local_base field.
14885 * win32-low.c (child_add_thread): Add tlb argument.
14886 Set thread_local_base field to TLB.
14887 (get_child_debug_event): Adapt to child_add_thread change.
14888 (win32_get_tib_address): New function.
14889 (win32_target_ops): Set get_tib_address field to
14890 win32_get_tib_address.
14891 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14893 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14895 * linux-low.c (linux_mourn): Also remove the process.
14896 * server.c (handle_target_event): Don't remove the process here.
14897 * nto-low.c (nto_mourn): New.
14898 (nto_target_ops): Install it.
14899 * spu-low.c (spu_mourn): New.
14900 (spu_target_ops): Install it.
14901 * win32-low.c (win32_mourn): New.
14902 (win32_target_ops): Install it.
14904 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14906 * server.h (buffer_xml_printf): Remove redundant `;'.
14908 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14910 * regcache.c (set_register_cache): Invalidate regcaches before
14911 changing the register cache layout.
14912 (regcache_invalidate_one): Allow a NULL regcache.
14913 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14914 regcaches before changing the register cache layout or the target
14917 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14919 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14920 variable warning on Linux/x86-64.
14922 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14924 GDBserver disconnected tracing support.
14926 * linux-low.c (linux_remove_process): Delete.
14927 (add_lwp): Don't set last_resume_kind here.
14928 (linux_kill): Use `mourn'.
14929 (linux_detach): Use `thread_db_detach', and `mourn'.
14930 (linux_mourn): New.
14931 (linux_attach_lwp_1): Adjust comment.
14932 (linux_attach): last_resume_kind moved the thread_info; adjust.
14933 (status_pending_p_callback): Adjust.
14934 (linux_wait_for_event_1): Adjust.
14935 (count_events_callback, select_singlestep_lwp_callback)
14936 (select_event_lwp_callback, cancel_breakpoints_callback)
14937 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14938 (proceed_one_lwp): Adjust.
14939 (linux_async): Add debug output.
14940 (linux_thread_stopped): New.
14941 (linux_pause_all): New.
14942 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14944 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14945 (thread_db_free): Delete declaration.
14946 (thread_db_detach, thread_db_mourn): Declare.
14947 * thread-db.c (thread_db_init): Use thread_db_mourn.
14948 (thread_db_free): Delete, split in two.
14949 (disable_thread_event_reporting): New.
14950 (thread_db_detach): New.
14951 (thread_db_mourn): New.
14953 * server.h (struct thread_info) <last_resume_kind>: New field.
14954 <attached>: Add comment.
14955 <gdb_detached>: New field.
14956 (handler_func): Change return type to int.
14957 (handle_serial_event, handle_target_event): Ditto.
14958 (gdb_connected): Declare.
14960 (disconnected_tracing): Declare.
14961 (stop_tracing): Declare.
14963 * server.c (handle_query) <qSupported>: Report support for
14964 disconnected tracing.
14965 (queue_stop_reply_callback): Account for running threads.
14966 (gdb_wants_thread_stopped): New.
14967 (gdb_wants_all_threads_stopped): New.
14968 (gdb_reattached_process): New.
14969 (handle_status): Clear the `gdb_detached' flag of all processes.
14970 In all-stop, stop all threads.
14971 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14972 (process_serial_event): If the remote connection breaks, or if an
14973 exit was forced with "monitor exit", force an event loop exit.
14974 Handle disconnected tracing on detach.
14975 (handle_serial_event): Adjust.
14976 (handle_target_event): If GDB isn't connected, forward events back
14977 to the inferior, unless the last process exited, in which case,
14978 exit gdbserver. Adjust interface.
14980 * remote-utils.c (remote_open): Don't block in accept. Instead
14981 register an event loop source on the listen socket file
14982 descriptor. Refactor bits into ...
14983 (listen_desc): ... this new global.
14984 (gdb_connected): ... this new function.
14985 (enable_async_notification): ... this new function.
14986 (handle_accept_event): ... this new function.
14987 (remote_close): Clear remote_desc.
14989 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14991 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14993 (mourn_inferior): Define.
14994 (target_process_qsupported): Avoid the dangling else problem.
14995 (thread_stopped): Define.
14996 (pause_all): Define.
14997 (target_waitstatus_to_string): Declare.
14998 * target.c (target_waitstatus_to_string): New.
15000 * tracepoint.c (tracing): Make extern.
15001 (disconnected_tracing): New.
15002 (stop_tracing): Make extern. Handle tracing stops due to GDB
15004 (cmd_qtdisconnected): New.
15005 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15006 (handle_tracepoint_general_set): Handle QTDisconnected.
15008 * event-loop.c (event_handler_func): Change return type to int.
15009 (process_event): Bail out if the event handler wants the event
15011 (handle_file_event): Ditto.
15012 (start_event_loop): Bail out if the event handler wants the event
15015 * nto-low.c (nto_target_ops): Adjust.
15016 * spu-low.c (spu_wait): Don't remove the process here.
15017 (spu_target_ops): Adjust.
15018 * win32-low.c (win32_wait): Don't remove the process here.
15019 (win32_target_ops): Adjust.
15021 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15023 * regcache.c (realloc_register_cache): Invalidate inferior's
15024 regcache before recreating it.
15026 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15028 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15030 2010-04-09 Stan Shebs <stan@codesourcery.com>
15031 Pedro Alves <pedro@codesourcery.com>
15033 * server.h (LONGEST): New.
15034 (struct thread_info) <while_stepping>: New field.
15035 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15037 (initialize_tracepoint, handle_tracepoint_general_set)
15038 (handle_tracepoint_query, tracepoint_finished_step)
15039 (tracepoint_was_hit, release_while_stepping_state_list):
15040 (current_traceframe): Declare.
15041 * server.c (handle_general_set): Handle tracepoint packets.
15042 (read_memory): New.
15043 (write_memory): New.
15044 (handle_search_memory_1): Use read_memory.
15045 (handle_query): Report support for conditional tracepoints, trace
15046 state variables, and tracepoint sources. Handle tracepoint
15048 (main): Initialize the tracepoints module.
15049 (process_serial_event): Handle traceframe reads/writes.
15051 * linux-low.c (handle_tracepoints): New.
15052 (linux_wait_1): Call it.
15053 (linux_resume_one_lwp): Handle while-stepping.
15054 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15055 (linux_target_ops): Install them.
15056 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15058 * linux-x86-low.c (x86_supports_tracepoints): New.
15059 (the_low_target). Install it.
15061 * mem-break.h (delete_breakpoint): Declare.
15062 * mem-break.c (delete_breakpoint): Make external.
15064 * target.h (struct target_ops): Add `supports_tracepoints',
15065 `read_pc', and `write_pc' fields.
15066 (target_supports_tracepoints): Define.
15067 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15070 * regcache.h (struct regcache) <registers_owned>: New field.
15071 (init_register_cache, regcache_cpy): Declare.
15072 (regcache_read_pc, regcache_write_pc): Declare.
15073 (register_cache_size): Declare.
15074 (supply_regblock): Declare.
15075 * regcache.c (init_register_cache): New.
15076 (new_register_cache): Use it.
15077 (regcache_cpy): New.
15078 (register_cache_size): New.
15079 (supply_regblock): New.
15080 (regcache_read_pc, regcache_write_pc): New.
15082 * tracepoint.c: New.
15084 * Makefile.in (OBS): Add tracepoint.o.
15085 (tracepoint.o): New rule.
15087 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15089 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15091 (i386-mmx.c): Likewise.
15092 (i386-mmx-linux.o): Likewise.
15093 (i386-mmx-linux.c): Likewise.
15095 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15096 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15097 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15098 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15100 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15101 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15102 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15104 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15106 * Makefile.in (clean): Updated.
15108 (i386-avx.c): Likewise.
15109 (i386-avx-linux.o): Likewise.
15110 (i386-avx-linux.c): Likewise.
15111 (amd64-avx.o): Likewise.
15112 (amd64-avx.c): Likewise.
15113 (amd64-avx-linux.o): Likewise.
15114 (amd64-avx-linux.c): Likewise.
15116 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15117 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15118 (srv_amd64_regobj): Add amd64-avx.o.
15119 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15120 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15121 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15122 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15123 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15124 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15125 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15127 * i387-fp.c: Include "i386-xstate.h".
15129 (i387_cache_to_xsave): Likewise.
15130 (i387_xsave_to_cache): Likewise.
15131 (x86_xcr0): Likewise.
15133 * i387-fp.h (i387_cache_to_xsave): Likewise.
15134 (i387_xsave_to_cache): Likewise.
15135 (x86_xcr0): Likewise.
15137 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15138 * linux-crisv32-low.c (target_regsets): Likewise.
15139 * linux-m68k-low.c (target_regsets): Likewise.
15140 * linux-mips-low.c (target_regsets): Likewise.
15141 * linux-ppc-low.c (target_regsets): Likewise.
15142 * linux-s390-low.c (target_regsets): Likewise.
15143 * linux-sh-low.c (target_regsets): Likewise.
15144 * linux-sparc-low.c (target_regsets): Likewise.
15145 * linux-xtensa-low.c (target_regsets): Likewise.
15147 * linux-low.c: Include <sys/uio.h>.
15148 (regsets_fetch_inferior_registers): Support nt_type.
15149 (regsets_store_inferior_registers): Likewise.
15150 (linux_process_qsupported): New.
15151 (linux_target_ops): Add linux_process_qsupported.
15153 * linux-low.h (regset_info): Add nt_type.
15154 (linux_target_ops): Add process_qsupported.
15156 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15158 (init_registers_i386_avx_linux): New.
15159 (init_registers_amd64_avx_linux): Likewise.
15160 (xmltarget_i386_linux_no_xml): Likewise.
15161 (xmltarget_amd64_linux_no_xml): Likewise.
15162 (PTRACE_GETREGSET): Likewise.
15163 (PTRACE_SETREGSET): Likewise.
15164 (x86_fill_xstateregset): Likewise.
15165 (x86_store_xstateregset): Likewise.
15166 (use_xml): Likewise.
15167 (x86_linux_update_xmltarget): Likewise.
15168 (x86_linux_process_qsupported): Likewise.
15169 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15170 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15171 init_registers_i386_linux here. Call
15172 x86_linux_update_xmltarget.
15173 (the_low_target): Add x86_linux_process_qsupported.
15175 * server.c (handle_query): Call target_process_qsupported.
15177 * target.h (target_ops): Add process_qsupported.
15178 (target_process_qsupported): New.
15180 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15182 * inferiors.c (add_thread): Set last_status kind to
15183 TARGET_WAITKIND_IGNORE.
15184 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15185 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15186 (linux_wait_1): Move `thread' local definition to block that uses
15187 it. Don't NULL initialize `event_child'.
15188 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15189 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15190 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15192 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15194 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15195 an extended waitstatus, or by a watchpoint.
15196 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15197 thread was stepping or has been stopped by a watchpoint.
15199 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15201 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15202 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15203 of another, then delete the previous, and validate all
15205 (validate_inserted_breakpoint): New.
15206 (delete_disabled_breakpoints): New.
15207 (validate_breakpoints): New.
15208 (check_mem_read): Validate breakpoints before trusting their
15209 shadow. Delete disabled breakpoints.
15210 (check_mem_write): Validate breakpoints before trusting they
15211 should be inserted. Delete disabled breakpoints.
15212 * mem-break.h (validate_breakpoints):
15213 * server.c (handle_query): Validate breakpoints when we see a
15216 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15218 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15219 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15220 if we could tell there's a GDB breakpoint at stop_pc.
15221 (need_step_over_p): Don't do a step over if we find a GDB
15222 breakpoint at the resume PC.
15224 * mem-break.c (struct raw_breakpoint): New.
15225 (enum bkpt_type): New type `gdb_breakpoint'.
15226 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15227 fields. New field `raw'.
15228 (find_raw_breakpoint_at): New.
15229 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15230 breakpoint instead.
15231 (set_breakpoint_at): Adjust.
15232 (delete_raw_breakpoint): New.
15233 (release_breakpoint): New.
15234 (delete_breakpoint): Rename to...
15235 (delete_breakpoint_1): ... this. Add proc parameter. Use
15236 release_breakpoint. Return ENOENT.
15237 (delete_breakpoint): Reimplement.
15238 (find_breakpoint_at): Delete.
15239 (find_gdb_breakpoint_at): New.
15240 (delete_breakpoint_at): Delete.
15241 (set_gdb_breakpoint_at): New.
15242 (delete_gdb_breakpoint_at): New.
15243 (gdb_breakpoint_here): New.
15244 (set_reinsert_breakpoint): Use release_breakpoint.
15245 (uninsert_breakpoint): Rename to ...
15246 (uninsert_raw_breakpoint): ... this.
15247 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15248 (reinsert_raw_breakpoint): Change parameter type to
15250 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15252 (check_breakpoints): Adjust. Use release_breakpoint.
15253 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15254 (breakpoint_inserted_here): Ditto.
15255 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15256 Don't trust the breakpoint's shadow if it is not inserted.
15257 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15258 (delete_all_breakpoints): Adjust.
15259 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15260 use delete_breakpoint_1.
15262 * mem-break.h (breakpoints_supported): Delete declaration.
15263 (set_gdb_breakpoint_at): Declare.
15264 (gdb_breakpoint_here): Declare.
15265 (delete_breakpoint_at): Delete.
15266 (delete_gdb_breakpoint_at): Declare.
15268 * server.h (struct raw_breakpoint): Forward declare.
15269 (struct process_info): New field `raw_breakpoints'.
15271 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15274 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15276 * linux-low.c (status_pending_p_callback): Fix comment.
15277 (linux_wait_for_event_1): Move most of the internal breakpoint
15278 handling from here...
15279 (linux_wait_1): ... to here.
15280 (count_events_callback): New.
15281 (select_singlestep_lwp_callback): New.
15282 (select_event_lwp_callback): New.
15283 (cancel_breakpoints_callback): New.
15284 (select_event_lwp): New.
15285 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15286 priority to all LWPs that have had events that should be reported
15287 to the client. Cancel breakpoints when about to reporting the
15288 event to the client, not while stopping lwps. No longer cancel
15289 finished single-steps here.
15290 (cancel_finished_single_step): Delete.
15291 (cancel_finished_single_steps): Delete.
15293 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15295 * mem-break.c (enum bkpt_type): New.
15296 (struct breakpoint): New field `type'.
15297 (set_breakpoint_at): Change return type to struct breakpoint
15298 pointer. Set type to `other_breakpoint' by default.
15299 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15300 in the breakpoint list.
15301 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15302 (reinsert_breakpoint): Rename to ...
15303 (reinsert_raw_breakpoint): ... this.
15304 (reinsert_breakpoints_at): Adjust.
15305 * mem-break.h (struct breakpoint): Declare.
15306 (set_breakpoint_at): Change return type to struct breakpoint
15309 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15311 * server.c (handle_query): Assign, not compare.
15313 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15315 Teach linux gdbserver to step-over-breakpoints.
15317 * linux-low.c (can_hardware_single_step): New.
15318 (supports_breakpoints): New.
15319 (handle_extended_wait): If stopping threads, read the stop pc of
15320 the new cloned LWP.
15322 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15323 low target doesn't support retrieving the PC.
15324 (add_lwp): Set last_resume_kind to resume_continue.
15325 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15326 (linux_attach): Don't clear stop_expected. Set the lwp's
15327 last_resume_kind to resume_stop.
15328 (linux_detach_one_lwp): Don't check for removed breakpoints.
15329 (check_removed_breakpoint): Delete.
15330 (status_pending_p): Rename to ...
15331 (status_pending_p_callback): ... this. Don't check for removed
15332 breakpoints. Don't consider threads that are stopped from GDB's
15334 (linux_wait_for_lwp): Always read the stop_pc here.
15335 (cancel_breakpoint): New.
15336 (step_over_bkpt): New global.
15337 (linux_wait_for_event_1): Implement stepping over breakpoints.
15338 (gdb_wants_lwp_stopped): New.
15339 (gdb_wants_all_stopped): New.
15340 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15341 single-step traps here. Store the thread's last reported target
15343 (send_sigstop): Don't clear stop_expected. Always set it,
15345 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15346 (cancel_finished_single_step): New.
15347 (cancel_finished_single_steps): New.
15348 (wait_for_sigstop): Don't cancel finished single-step traps here.
15349 (linux_resume_one_lwp): Don't check for removed breakpoints.
15350 Don't set `step' on non-hardware step archs.
15351 (linux_set_resume_request): Ignore resume_stop requests if already
15352 stopping or stopped. Set the lwp's last_resume_kind.
15353 (resume_status_pending_p): Don't check for removed breakpoints.
15354 (need_step_over_p): New.
15355 (start_step_over): New.
15356 (finish_step_over): New.
15357 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15358 requests. Clear the thread's last reported target waitstatus.
15359 Don't use the `suspended' flag. Don't consider pending breakpoints.
15360 (linux_resume): Start a step-over if necessary.
15361 (proceed_one_lwp): New.
15362 (proceed_all_lwps): New.
15363 (unstop_all_lwps): New.
15364 * linux-low.h (struct lwp_info): Rewrite comment for the
15365 `suspended' flag. Add the `stop_pc' field. Delete the
15366 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15367 Add `'last_resume_kind' and `need_step_over' fields.
15368 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15369 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15370 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15371 (set_raw_breakpoint_at): New.
15372 (set_breakpoint_at): Rewrite to use it.
15373 (reinsert_breakpoint_handler): Delete.
15374 (set_reinsert_breakpoint): New.
15375 (reinsert_breakpoint_by_bp): Delete.
15376 (delete_reinsert_breakpoints): New.
15377 (uninsert_breakpoint): Rewrite.
15378 (uninsert_breakpoints_at): New.
15379 (reinsert_breakpoint): Rewrite.
15380 (reinsert_breakpoints_at): New.
15381 (check_breakpoints): Rewrite.
15382 (breakpoint_here): New.
15383 (breakpoint_inserted_here): New.
15384 (check_mem_read): Adjust.
15385 * mem-break.h (breakpoints_supported, breakpoint_here)
15386 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15387 (reinsert_breakpoint_by_bp): Delete declaration.
15388 (delete_reinsert_breakpoints): Declare.
15389 (reinsert_breakpoint): Delete declaration.
15390 (reinsert_breakpoints_at): Declare.
15391 (uninsert_breakpoint): Delete declaration.
15392 (uninsert_breakpoints_at): Declare.
15393 (check_breakpoints): Adjust prototype.
15394 * server.h: Adjust include order.
15395 (struct thread_info): Declare here. Add a `last_status' field.
15397 2010-03-23 Michael Snyder <msnyder@vmware.com>
15399 * server.c (crc32): New function.
15400 (handle_query): Add handling for 'qCRC:' request.
15402 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15404 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15405 lwp had been stopped by a watchpoint.
15407 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15409 * server.h (internal_error): Declare.
15410 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15411 * utils.c (internal_error): New function.
15413 2010-03-15 Andreas Schwab <schwab@redhat.com>
15415 * configure.srv: Fix typo setting srv_regobj.
15417 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15419 * linux-low.c (fetch_register): Avoid passing a non string literal
15421 (usr_store_inferior_registers): Ditto.
15423 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15425 * linux-low.c (linux_write_memory): Bail out early if peeking
15428 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15430 * linux-low.h (struct lwp_info): New fields
15431 `stopped_by_watchpoint' and `stopped_data_address'.
15432 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15433 here, and cache them in the lwp object.
15434 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15436 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15438 (linux_stopped_by_watchpoint): Rewrite.
15439 (linux_stopped_data_address): Rewrite.
15441 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15443 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15444 switching the current inferior, not before.
15446 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15448 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15449 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15450 i386-linux.c and amd64-linux.c.
15451 (reg-i386.o): Removed.
15452 (reg-i386.c): Likewise.
15453 (reg-i386-linux.o): Likewise.
15454 (reg-i386-linux.c): Likewise.
15455 (reg-x86-64.o): Likewise.
15456 (reg-x86-64.c): Likewise.
15457 (reg-x86-64-linux.o): Likewise.
15458 (reg-x86-64-linux.c): Likewise.
15460 (i386.c): Likewise.
15461 (i386-linux.o): Likewise.
15462 (i386-linux.c): Likewise.
15463 (amd64.o): Likewise.
15464 (amd64.c): Likewise.
15465 (amd64-linux.o): Likewise.
15466 (amd64-linux.c): Likewise.
15468 * configure.srv (srv_i386_regobj): New.
15469 (srv_i386_linux_regobj): Likewise.
15470 (srv_amd64_regobj): Likewise.
15471 (srv_amd64_linux_regobj): Likewise.
15472 (srv_i386_32bit_xmlfiles): Likewise.
15473 (srv_i386_64bit_xmlfiles): Likewise.
15474 (srv_i386_xmlfiles): Likewise.
15475 (srv_amd64_xmlfiles): Likewise.
15476 (srv_i386_linux_xmlfiles): Likewise.
15477 (srv_amd64_linux_xmlfiles): Likewise.
15478 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15479 srv_xmlfiles to $srv_i386_xmlfiles.
15480 (i[34567]86-*-mingw32ce*): Likewise.
15481 (i[34567]86-*-mingw*): Likewise.
15482 (i[34567]86-*-nto*): Likewise.
15483 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15484 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15485 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15486 (x86_64-*-linux*): Likewise.
15488 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15489 (init_registers_amd64_linux): New.
15490 (x86_arch_setup): Replace init_registers_x86_64_linux with
15491 init_registers_amd64_linux.
15493 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15495 * configure.ac: Check for libdl. If it is not available link against
15496 static libthread_db.
15497 * configure: Regenerate.
15499 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15503 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15504 handing a read watchpoint.
15505 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15507 2010-02-12 Doug Evans <dje@google.com>
15509 * linux-low.c (linux_supports_tracefork_flag): Document.
15510 (linux_look_up_symbols): Add comment.
15512 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15514 * regcache.c (supply_register): Clear regcache if buf is NULL.
15516 2010-02-02 Nicolas Roche <roche@sourceware.org>
15517 Joel Brobecker <brobecker@adacore.com>
15519 * inferiors.c (find_inferior): Add function documentation.
15520 (unloaded_dll): Handle the case where the unloaded dll has not
15521 been previously registered in the dll list.
15523 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15525 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15526 (thumb2_breakpoint): New.
15527 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15529 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15531 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15532 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15535 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15537 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15539 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15541 * linux-s390-low.c (s390_collect_ptrace_register)
15542 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15544 2010-01-21 Doug Evans <dje@google.com>
15546 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15547 (PTRACE_ARG4_TYPE): New macro.
15548 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15549 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15550 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15551 (usr_store_inferior_registers): Ditto.
15552 (linux_read_memory, linux_write_memory): Ditto.
15553 (linux_test_for_tracefork): Ditto.
15555 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15556 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15558 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15560 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15563 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15565 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15566 prototype to take a regcache. Adjust.
15568 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15570 * regcache.h (struct thread_info): Forward declare.
15571 (struct regcache): New.
15572 (new_register_cache): Adjust prototype.
15573 (get_thread_regcache): Declare.
15574 (free_register_cache): Adjust prototype.
15575 (registers_to_string, registers_from_string): Ditto.
15576 (supply_register, supply_register_by_name, collect_register)
15577 (collect_register_as_string, collect_register_by_name): Ditto.
15578 * regcache.c (struct inferior_regcache_data): Delete.
15579 (get_regcache): Rename to ...
15580 (get_thread_regcache): ... this. Adjust. Switch inferior before
15581 fetching registers.
15582 (regcache_invalidate_one): Adjust.
15583 (regcache_invalidate): Fix prototype.
15584 (new_register_cache): Return the new register cache.
15585 (free_register_cache): Change prototype.
15586 (realloc_register_cache): Adjust.
15587 (registers_to_string): Change prototype to take a regcache. Adjust.
15588 (registers_from_string): Ditto.
15589 (register_data): Ditto.
15590 (supply_register): Ditto.
15591 (supply_register_by_name): Ditto.
15592 (collect_register): Ditto.
15593 (collect_register_as_string): Ditto.
15594 (collect_register_by_name): Ditto.
15595 * server.c (process_serial_event): Adjust.
15596 * linux-low.h (regset_fill_func, regset_store_func): Change
15598 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15600 * linux-low.c (get_stop_pc): Adjust.
15601 (check_removed_breakpoint): Adjust.
15602 (linux_wait_for_event): Adjust.
15603 (linux_resume_one_lwp): Adjust.
15604 (fetch_register): Add regcache parameter. Adjust.
15605 (usr_store_inferior_registers): Ditto.
15606 (regsets_fetch_inferior_registers): Ditto.
15607 (regsets_store_inferior_registers): Ditto.
15608 (linux_fetch_registers, linux_store_registers): Ditto.
15609 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15611 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15613 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15614 prototype to take a regcache.
15615 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15616 * remote-utils.c (convert_ascii_to_int, outreg)
15617 (prepare_resume_reply): Change prototype to take a regcache.
15619 * target.h (struct target_ops) <fetch_registers, store_registers>:
15620 Change prototype to take a regcache.
15621 (fetch_inferior_registers, store_inferior_registers): Change
15622 prototype to take a regcache. Adjust.
15623 * proc-service.c (ps_lgetregs): Adjust.
15624 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15625 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15626 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15627 take a regcache. Adjust.
15628 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15629 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15630 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15631 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15632 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15633 (cris_cannot_fetch_register):
15634 (cris_breakpoint_at): Change prototype to take a regcache.
15636 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15637 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15638 to take a regcache. Adjust.
15639 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15641 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15642 take a regcache. Adjust.
15643 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15644 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15645 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15646 * linux-mips-low.c (mips_get_pc):
15647 (mips_set_pc): Change prototype to take a regcache. Adjust.
15648 (mips_reinsert_addr): Adjust.
15649 (mips_collect_register): Change prototype to take a regcache.
15651 (mips_supply_register):
15652 (mips_collect_register_32bit, mips_supply_register_32bit)
15653 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15654 (mips_store_fpregset): Ditto.
15655 * linux-ppc-low.c (ppc_supply_ptrace_register)
15656 (ppc_supply_ptrace_register): Ditto.
15657 (parse_spufs_run): Adjust.
15658 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15659 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15660 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15661 take a regcache. Adjust.
15662 * linux-s390-low.c (s390_collect_ptrace_register)
15663 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15664 (s390_set_pc): Change prototype to take a regcache. Adjust.
15665 (s390_arch_setup): Adjust.
15666 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15667 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15668 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15669 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15670 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15672 (sparc_breakpoint_at): Adjust.
15673 * linux-xtensa-low.c (xtensa_fill_gregset):
15674 (xtensa_store_gregset):
15675 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15676 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15677 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15678 prototype to take a regcache. Adjust.
15679 * win32-arm-low.c (arm_fetch_inferior_register)
15680 (arm_store_inferior_register): Change prototype to take a
15682 * win32-i386-low.c (i386_fetch_inferior_register)
15683 (i386_store_inferior_register): Change prototype to take a
15685 * win32-low.c (child_fetch_inferior_registers)
15686 (child_store_inferior_registers): Change prototype to take a
15688 (win32_wait): Adjust.
15689 (win32_fetch_inferior_registers): Change prototype to take a
15691 (win32_store_inferior_registers): Adjust.
15692 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15693 store_inferior_register>: Change prototype to take a regcache.
15695 2010-01-20 Doug Evans <dje@google.com>
15697 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15699 (linux_wait_for_event1, linux_init_signals): Ditto.
15700 (W_STOPCODE): Provide definition if missing.
15702 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15704 * linux-low.c (linux_core_of_thread): New.
15705 (compare_ints, show_process, list_threads): New.
15706 (linux_qxfer_osdata): Report threads and cores.
15707 (linux_target_op): Register linux_core_of_thread.
15708 * remote-utils.c (prepare_resume_reply): Report the core.
15709 (buffer_xml_printf): Support %d specifier.
15710 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15712 (handle_query): Handle qXfer:threads. Announce availability
15714 * target.h (struct target_ops): New field core_of_thread.
15716 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15718 * Makefile.in (clean): Remove new generated files.
15719 (reg-s390.o, reg-s390.c): Remove rules.
15720 (reg-s390x.o, reg-s390x.c): Likewise.
15721 (s390-linux32.o, s390-linux32.c): Add rules.
15722 (s390-linux64.o, s390-linux64.c): Likewise.
15723 (s390x-linux64.o, s390x-linux64.c): Likewise.
15724 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15725 * linux-s390-low.c: Include <elf.h>.
15726 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15727 (init_registers_s390): Remove prototype.
15728 (init_registers_s390x): Likewise.
15729 (init_registers_s390_linux32): Add prototype.
15730 (init_registers_s390_linux64): Likewise.
15731 (init_registers_s390x_linux64): Likewise.
15732 (s390_num_regs_3264): New define.
15733 (s390_regmap_3264): New global variable.
15734 (s390_cannot_fetch_register): Remove obsolete check.
15735 (s390_cannot_store_register): Likewise.
15736 (s390_collect_ptrace_register): Handle upper/lower register halves.
15737 (s390_supply_ptrace_register): Likewise.
15738 (s390_fill_gregset): Update to register number changes.
15739 (s390_get_hwcap): New routine.
15740 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15741 Install appropriate regmap and register set.
15743 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15745 * server.c (gdbserver_version): Update copyright year to 2010.
15746 * gdbreplay.c (gdbreplay_version): Likewise.
15748 2009-12-28 Doug Evans <dje@google.com>
15750 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15751 elf/external.h. Include <elf.h> instead but only if necessary.
15753 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15755 * linux-low.c (linux_remove_process): Remove `detaching'
15756 parameter. Don't release/detach from thread_db here.
15757 (linux_kill): Release/detach from thread_db here, ...
15758 (linux_detach): ... and here, before actually detaching.
15759 (linux_wait_1): ... and here, when a process exits.
15760 * thread-db.c (any_thread_of): New.
15761 (thread_db_free): Switch the current inferior to a thread of the
15764 2009-12-21 Doug Evans <dje@google.com>
15766 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15768 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15769 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15770 warning ifndef __NR_tkill. Move setting of errno there too.
15771 Delete unnecessary resetting of errno after syscall.
15772 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15774 * configure.ac: Check for dladdr.
15775 * config.in: Regenerate.
15776 * configure: Regenerate.
15777 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15778 (try_thread_db_load): Update.
15780 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15782 2009-12-18 Doug Evans <dje@google.com>
15784 * event-loop.c: Include unistd.h if it exists.
15786 * linux-low.c (my_waitpid): Move definition away from being in
15787 between linux_tracefork_child/linux_test_for_tracefork.
15789 * gdb_proc_service.h (psaddr_t): Fix type.
15790 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15791 signature to match glibc.
15793 2009-12-16 Doug Evans <dje@google.com>
15795 * linux-low.c (linux_read_memory): Fix argument to read.
15797 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15799 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15800 events, don't leave current_inferior pointing at null.
15802 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15804 * win32-low.c (LOG): Delete.
15805 (OUTMSG): Output to stderr.
15806 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15807 on compile time LOG macro.
15808 (win32_wait): Fix debug output.
15810 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15812 * win32-low.c (win32_add_one_solib): If the dll name is
15813 "ntdll.dll", prepend the system directory to the dll path.
15815 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15817 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15819 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15820 Vladimir Prus <vladimir@codesourcery.com>
15822 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15823 * configure.ac: Check for __mcoldfire__ and set
15824 gdb_cv_m68k_is_coldfire.
15825 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15826 reg-cf.o and reg-m68k.o.
15827 * configure: Regenerated.
15829 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15831 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15832 Pass it to thread_db_free.
15833 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15834 proper `detaching' argument to linux_remove_process.
15835 * linux-low.h (thread_db_free): Add `detaching' parameter.
15836 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15838 (thread_db_free): Add `detaching' parameter. Only
15839 call td_ta_clear_event if detaching from process.
15841 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15843 * thread-db.c (thread_db_free): Fix typo.
15845 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15848 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15850 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15852 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15853 with an i686 compiler.
15854 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15856 * configure: Rebuilt.
15858 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15862 * server.c (handle_search_memory_1): Correct read_addr initialization
15863 in loop for searching subsequent chunks.
15865 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15867 * configure.ac: New --with-libthread-db option.
15868 * thread-db.c: Allow direct dependence on libthread_db.
15869 (thread_db_free): Adjust.
15870 * config.in: Regenerate.
15871 * configure: Likewise.
15873 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15876 * thread-db.c (attach_thread): New function.
15877 (maybe_attach_thread): Return success/failure.
15878 (find_new_threads_callback): Adjust.
15879 (thread_db_find_new_threads): Loop until no new threads.
15881 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15883 * proc-service.c (ps_lgetregs): Formatting.
15885 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15887 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15888 * configure.ac: Adjust.
15889 * linux-low.h (struct process_info_private): Move members to struct
15891 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15892 * linux-low.c (linux_remove_process): Adjust.
15893 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15894 * server.c (handle_query): Move code ...
15895 (handle_monitor_command): ... here. New function.
15896 * target.h (struct target_ops): New member.
15897 * thread-db.c (struct thread_db): New.
15898 (libthread_db_search_path): New variable.
15899 (thread_db_create_event, thread_db_enable_reporting)
15900 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15901 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15902 (try_thread_db_load_1, dladdr_to_soname): New functions.
15903 (try_thread_db_load, thread_db_load_search): New functions.
15904 (thread_db_init): Search for libthread_db.
15905 (thread_db_free): New function.
15906 (thread_db_handle_monitor_command): Likewise.
15907 * config.in: Regenerate.
15908 * configure: Regenerate.
15910 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15912 * spu-low.c (spu_kill): Wait for inferior to terminate.
15913 Call clear_inferiors.
15914 (spu_detach): Call clear_inferiors.
15916 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15918 * aclocal.m4: Regenerate.
15919 * config.in: Likewise.
15920 * configure: Likewise.
15922 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15924 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15925 (parse_spufs_run): New function.
15926 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15927 (ppc_breakpoint_at): Handle SPU breakpoints.
15929 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15931 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15932 (SPUFS_MAGIC): Define.
15933 (spu_enumerate_spu_ids): New function.
15934 (linux_qxfer_spu): New function.
15935 (linux_target_ops): Install linux_qxfer_spu.
15937 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15939 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15940 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15941 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15942 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15943 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15944 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15945 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15946 (init_registers_powerpc_cell32l): Add prototype.
15947 (init_registers_powerpc_cell64l): Likewise.
15948 (ppc_arch_setup): Detect Cell/B.E. architecture.
15950 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15952 * Makefile.in (datarootdir): New variable.
15954 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15956 * linux-low.c (linux_write_memory): Update debugging output.
15957 * Makefile.in (clean): Add new descriptions.
15958 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15959 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15960 * configure.srv: Add new files for arm*-*-linux*.
15961 * linux-arm-low.c: Add new declarations.
15962 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15963 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15964 (HWCAP_VFPv3D16): New.
15965 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15966 instead of __IWMMXT__.
15967 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15968 (arm_arch_setup): New.
15969 (target_regsets): Remove #ifdef. Add VFP regset.
15970 (the_low_target): Use arm_arch_setup.
15972 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15974 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15975 the main thread again.
15977 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15979 Adding Neutrino gdbserver.
15980 * configure: Regenerated.
15981 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15982 * configure.srv (i[34567]86-*-nto*): New target.
15983 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15984 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15985 (nto_comctrl) [__QNX__]: New function.
15986 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15988 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15990 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15993 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15994 Pedro Alves <pedro@codesourcery.com>
15996 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15997 don't support CONTEXT_EXTENDED_REGISTERS.
15998 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15999 (the_low_target): Install them.
16000 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16001 failing with ERROR_PIPE_NOT_CONNECTED.
16003 2009-06-30 Doug Evans <dje@google.com>
16004 Pierre Muller <muller@ics.u-strasbg.fr>
16006 Add h/w watchpoint support to x86-linux, win32-i386.
16007 * Makefile.in (SFILES): Add i386-low.c
16008 (i386_low_h): Define.
16009 (i386-low.o): Add dependencies.
16010 (linux-x86-low.o): Add i386-low.h dependency.
16011 (win32-i386-low.o): Ditto.
16012 * i386-low.c: New file.
16013 * i386-low.h: New file.
16014 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16015 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16016 * linux-low.c (linux_add_process): Initialize arch_private.
16017 (linux_remove_process): Free arch_private.
16018 (add_lwp): Initialize arch_private.
16019 (delete_lwp): Free arch_private.
16020 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16022 * linux-low.h (process_info_private): New member arch_private.
16023 (lwp_info): New member arch_private.
16024 (linux_target_ops): New members new_process, new_thread,
16026 (ptid_of): New macro.
16027 * linux-x86-low.c: Include stddef.h, i386-low.h.
16028 (arch_process_info): New struct.
16029 (arch_lwp_info): New struct.
16030 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16031 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16032 (i386_dr_low_get_status): New function.
16033 (x86_insert_point, x86_remove_point): New functions.
16034 (x86_stopped_by_watchpoint): New function.
16035 (x86_stopped_data_address): New function.
16036 (x86_linux_new_process, x86_linux_new_thread): New functions.
16037 (x86_linux_prepare_to_resume): New function.
16038 (the_low_target): Add entries for insert_point, remove_point,
16039 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16041 * server.c (debug_hw_points): New global.
16042 (monitor_show_help): Document set debug-hw-points.
16043 (handle_query): Process "set debug-hw-points".
16044 * server.h (debug_hw_points): Declare.
16045 (paddress): Declare.
16046 * utils.c (NUMCELLS, CELLSIZE): New macros.
16047 (get_sell, xsnprintf, paddress): New functions.
16048 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16049 remove_point, stopped_by_watchpoint, stopped_data_address.
16050 * win32-i386-low.c: Include i386-low.h.
16051 (debug_reg_state): Replaces dr.
16052 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16053 (i386_dr_low_get_status): New function.
16054 (i386_insert_point, i386_remove_point): New functions.
16055 (i386_stopped_by_watchpoint): New function.
16056 (i386_stopped_data_address): New function.
16057 (i386_initial_stuff): Update.
16058 (get_thread_context,set_thread_context,i386_thread_added): Update.
16059 (the_low_target): Add entries for insert_point,
16060 remove_point, stopped_by_watchpoint, stopped_data_address.
16061 * win32-low.c (win32_insert_watchpoint): New function.
16062 (win32_remove_watchpoint): New function.
16063 (win32_stopped_by_watchpoint): New function.
16064 (win32_stopped_data_address): New function.
16065 (win32_target_ops): Add entries for insert_watchpoint,
16066 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16067 * win32-low.h (win32_target_ops): New members insert_point,
16068 remove_point, stopped_by_watchpoint, stopped_data_address.
16070 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16072 * server.c (process_serial_event): Re-return unsupported, not
16073 error, if the type isn't recognized. Re-allow supporting only
16074 insert or remove packets. Also call require_running for
16075 breakpoints. Add missing break statement to default case. Tidy.
16076 * target.h (struct target_ops): Rename insert_watchpoint to
16077 insert_point, and remove_watchpoint to remove_point.
16079 * linux-low.h (struct linux_target_ops): Likewise.
16080 * linux-low.c (linux_insert_watchpoint): Rename to ...
16081 (linux_insert_point): ... this. Adjust.
16082 (linux_remove_watchpoint): Rename to ...
16083 (linux_remove_point): ... this. Adjust.
16084 (linux_target_ops): Adjust.
16085 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16086 (cris_insert_point): ... this.
16087 (cris_remove_watchpoint): Rename to ...
16088 (cris_remove_point): ... this.
16089 (the_low_target): Adjust.
16091 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16093 * server.c (handle_v_kill): Pass signal_pid to
16094 kill_inferior if multi_process is zero.
16096 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16098 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16099 * target.h (target_ops): Comment for *_watchpoint to make it clear
16100 the functions can get types '0' and '1'.
16102 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16104 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16105 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16106 * regcache.c (get_regcache): Likewise.
16107 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16108 * win32-low.c (child_fetch_inferior_registers): Remove check for
16111 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16112 Pedro Alves <pedro@codesourcery.com>
16114 * target.h (struct target_ops) <supports_multi_process>: New
16116 (target_supports_multi_process): New.
16117 * server.c (handle_query): Even if GDB reports support, only
16118 enable multi-process if the target also supports it. Report
16119 multi-process support only if the target backend supports it.
16120 * linux-low.c (linux_supports_multi_process): New function.
16121 (linux_target_ops): Install it as target_supports_multi_process
16124 2009-05-24 Doug Evans <dje@google.com>
16126 Global renaming of find_thread_pid to find_thread_ptid.
16127 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16128 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16129 All callers updated.
16131 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16132 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16135 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16136 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16137 (linux_resume_one_lwp): Ditto.
16139 2009-05-23 Doug Evans <dje@google.com>
16141 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16142 from struct inferior_list_entry * to struct lwp_info *.
16143 All callers updated.
16145 2009-05-13 Doug Evans <dje@google.com>
16147 * linux-x86-low.c: Don't include assert.h.
16148 (x86_siginfo_fixup): Use fatal, not assert.
16149 (x86_arch_setup): Fix comment.
16151 2009-05-12 Doug Evans <dje@google.com>
16153 Biarch support for i386/amd64 gdbserver.
16154 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16155 Add linux-x86-low.c.
16156 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16157 (linux-x86-low.o): Add.
16158 * linux-x86-64-low.c: Delete.
16159 * linux-i386-low.c: Delete.
16160 * linux-x86-low.c: New file.
16161 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16163 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16165 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16166 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16167 (linux_child_pid_to_exec_file): New function.
16168 (elf_64_header_p, elf_64_file_p): New functions.
16169 (siginfo_fixup): New function.
16170 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16171 give target a chance to convert layout.
16172 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16173 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16175 2009-05-07 Doug Evans <dje@google.com>
16177 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16178 (regsets_store_inferior_registers): Ditto.
16180 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16184 * linux-low.c (must_set_ptrace_flags): Delete.
16185 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16187 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16188 `lwp->must_set_ptrace_flags' instead.
16189 (linux_wait_for_event_1): Set ptrace options here.
16190 (linux_wait_1): ... not here.
16192 2009-04-30 Doug Evans <dje@google.com>
16194 * inferiors.c (started_inferior_callback): New function.
16195 (attached_inferior_callback): New function.
16196 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16197 * server.c (print_started_pid, print_attached_pid): New functions.
16198 (detach_or_kill_for_exit): New function.
16199 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16200 * server.h (have_started_inferiors_p): Declare.
16201 (have_attached_inferiors_p): Declare.
16203 * inferiors.c (remove_process): Fix memory leak, free process.
16204 * linux-low.c (linux_remove_process): New function.
16205 (linux_kill): Call it instead of remove_process.
16206 (linux_detach, linux_wait_1): Ditto.
16208 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16210 * configure.srv: Add x86 Windows CE target.
16212 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16214 * inferiors.c (get_thread_process): Make global.
16215 * server.h (get_thread_process): Add prototype.
16216 * thread-db.c (find_one_thread): Use get_thread_process
16217 instead of current_process.
16218 (thread_db_get_tls_address): Do not crash if called when
16219 thread layer is not yet initialized.
16221 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16223 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16224 * spu-low.c (current_tid): Rename to ...
16225 (current_ptid): ... this.
16226 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16227 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16228 ptid_get_lwp (current_ptid) instead of current_tid.
16229 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16230 instead of current_tid. Use find_process_pid to verify pid
16231 argument is valid. Pass proper argument to remove_process.
16232 (spu_thread_alive): Compare current_ptid instead of current_tid.
16233 (spu_resume): Likewise.
16235 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16237 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16240 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16242 Implement the multiprocess extensions, and add linux multiprocess
16245 * server.h (ULONGEST): Declare.
16246 (struct ptid, ptid_t): New.
16247 (minus_one_ptid, null_ptid): Declare.
16248 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16249 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16250 (struct inferior_list_entry): Change `id' type from unsigned from
16252 (struct sym_cache, struct breakpoint, struct
16253 process_info_private): Forward declare.
16254 (struct process_info): Declare.
16255 (current_process): Declare.
16256 (all_processes): Declare.
16257 (initialize_inferiors): Declare.
16258 (add_thread): Adjust to use ptid_t.
16259 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16260 (add_process, remove_process, find_thread_pid): Declare.
16261 (find_inferior_id): Adjust to use ptid_t.
16262 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16263 (multi_process): Declare.
16264 (push_event): Adjust to use ptid_t.
16265 (read_ptid, write_ptid): Declare.
16266 (prepare_resume_reply): Adjust to use ptid_t.
16267 (clear_symbol_cache): Declare.
16268 * inferiors.c (all_processes): New.
16269 (null_ptid, minus_one_ptid): New.
16270 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16271 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16272 (add_thread): Change unsigned long to ptid. Remove gdb_id
16274 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16275 (gdb_id_to_thread): Rename to ...
16276 (find_thread_pid): ... this. Change unsigned long to ptid.
16277 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16278 (loaded_dll, pull_pid_from_list): Adjust.
16279 (add_process, remove_process, find_process_pid)
16280 (get_thread_process, current_process, initialize_inferiors): New.
16281 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16282 (struct target_waitstatus) <related_pid>: Ditto.
16283 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16284 return type to int.
16285 (struct target_ops) <join>: Add `pid' argument.
16286 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16287 (struct target_ops) <wait>: Add `ptid' field. Change return type
16289 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16290 (mywait): Add `ptid' argument. Change return type to ptid_t.
16291 (target_pid_to_str): Declare.
16292 * target.c (set_desired_inferior): Adjust to use ptids.
16293 (mywait): Add new `ptid' argument. Adjust.
16294 (target_pid_to_str): New.
16295 * mem-break.h (free_all_breakpoints): Declare.
16296 * mem-break.c (breakpoints): Delelete.
16297 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16298 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16299 to use per-process breakpoint list.
16300 (free_all_breakpoints): New.
16301 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16302 (symbol_cache, all_symbols_looked_up): Delete.
16304 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16306 (prepare_resume_reply): Change ptid argument's type from unsigned
16307 long to ptid_t. Adjust. Implement W;process and X;process.
16308 (free_sym_cache, clear_symbol_cache): New.
16309 (look_up_one_symbol): Adjust to per-process symbol cache. *
16310 * server.c (cont_thread, general_thread, step_thread): Change type
16312 (attached): Delete.
16313 (multi_process): New.
16314 (last_ptid): Change type to ptid_t.
16315 (struct vstop_notif) <ptid>: Change type to ptid_t.
16316 (queue_stop_reply, push_event): Change `ptid' argument's type to
16318 (discard_queued_stop_replies): Add `pid' argument.
16319 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16320 changes. Don't reference the `attached' global.
16321 (attach_inferior): Adjust to mywait interface changes.
16322 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16323 features. Handle and report "multiprocess+". Handle
16325 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16327 (handle_v_kill): New.
16328 (handle_v_stopped): Adjust to use target_pid_to_str.
16329 (handle_v_requests): Allow multiple attaches and runs when
16330 multiprocess extensions are in effect. Handle "vKill".
16331 (myresume): Adjust to use ptids.
16332 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16333 (handle_status): Adjust to discard_queued_stop_replies interface
16335 (first_thread_of, kill_inferior_callback)
16336 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16337 (main): Call initialize_inferiors. Adjust to use ptids, killing
16338 and detaching from all inferiors. Handle multiprocess packet
16340 * linux-low.h: Include gdb_proc_service.h.
16341 (struct process_info_private): New.
16342 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16343 <lwpid_of>: Use ptid_get_lwp.
16344 (get_lwp_thread): Adjust.
16345 (struct lwp_info): Add `dead' member.
16346 (find_lwp_pid): Declare.
16347 * linux-low.c (thread_db_active): Delete.
16348 (new_inferior): Adjust comment.
16349 (inferior_pid): Delete.
16350 (linux_add_process): New.
16351 (handle_extended_wait): Adjust.
16352 (add_lwp): Change unsigned long to ptid.
16353 (linux_create_inferior): Add process to processes table. Adjust
16354 to use ptids. Don't set new_inferior here.
16355 (linux_attach_lwp): Rename to ...
16356 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16357 it. Adjust to use ptids.
16358 (linux_attach_lwp): New.
16359 (linux_attach): Add process to processes table. Don't set
16361 (struct counter): New.
16362 (second_thread_of_pid_p, last_thread_of_process_p): New.
16363 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16364 multiple processes.
16365 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16366 processes. Remove process from process table.
16367 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16368 to multiple processes.
16369 (any_thread_of): New.
16370 (linux_detach): Add `pid' argument, and handle it. Remove process
16371 from processes table.
16372 (linux_join): Add `pid' argument. Handle it.
16373 (linux_thread_alive): Change unsighed long argument to ptid_t.
16374 Consider dead lwps as not being alive.
16375 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16376 threads we're not interested in.
16377 (same_lwp, find_lwp_pid): New.
16378 (linux_wait_for_lwp): Change `pid' argument's type from int to
16380 (linux_wait_for_event): Rename to ...
16381 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16382 from int to ptid_t. Adjust.
16383 (linux_wait_for_event): New.
16384 (linux_wait_1): Add `ptid' argument. Change return type to
16385 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16386 that exit from the process table.
16387 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16389 (mark_lwp_dead): New.
16390 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16391 stopping all threads, mark its main lwp as dead.
16392 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16394 (fetch_register, usr_store_inferior_registers)
16395 (regsets_fetch_inferior_registers)
16396 (regsets_store_inferior_registers, linux_read_memory)
16397 (linux_write_memory): Inline `inferior_pid'.
16398 (linux_look_up_symbols): Adjust to use per-process
16399 `thread_db_active'.
16400 (linux_request_interrupt): Adjust to use ptids.
16401 (linux_read_auxv): Inline `inferior_pid'.
16402 (initialize_low): Don't reference thread_db_active.
16403 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16404 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16405 (ps_getpid): Return the pid of the current inferior.
16406 * thread-db.c (proc_handle, thread_agent): Delete.
16407 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16409 (find_one_thread): Change argument type to ptid_t. Adjust to
16411 (maybe_attach_thread): Adjust to per-process data and ptids.
16412 (thread_db_find_new_threads): Ditto.
16413 (thread_db_init): Ditto.
16414 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16415 processes table. Adjust to use ptids.
16416 (spu_kill, spu_detach): Adjust interface. Remove process from
16418 (spu_join, spu_thread_alive): Adjust interface.
16419 (spu_wait): Adjust interface. Remove process from processes
16420 table. Adjust to use ptids.
16421 * win32-low.c (current_inferior_tid): Delete.
16422 (current_inferior_ptid): New.
16423 (debug_event_ptid): New.
16424 (thread_rec): Take a ptid. Adjust.
16425 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16426 (child_delete_thread): Ditto.
16427 (do_initial_child_stuff): Add `attached' argument. Add process to
16429 (child_fetch_inferior_registers, child_store_inferior_registers):
16431 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16432 (win32_attach): Pass 1 to do_initial_child_stuff.
16433 (win32_kill): Adjust interface. Remove process from processes
16435 (win32_detach): Ditto.
16436 (win32_join): Adjust interface.
16437 (win32_thread_alive): Take a ptid.
16438 (win32_resume): Adjust to use ptids.
16439 (get_child_debug_event): Ditto.
16440 (win32_wait): Adjust interface. Remove exiting process from
16443 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16445 Non-stop mode support.
16447 * server.h (non_stop): Declare.
16448 (gdb_client_data, handler_func): Declare.
16449 (delete_file_handler, add_file_handler, start_event_loop):
16451 (handle_serial_event, handle_target_event, push_event)
16452 (putpkt_notif): Declare.
16453 * target.h (enum resume_kind): New.
16454 (struct thread_resume): Replace `step' field by `kind' field.
16455 (TARGET_WNOHANG): Define.
16456 (struct target_ops) <wait>: Add `options' argument.
16457 <supports_non_stop, async, start_non_stop>: New fields.
16458 (target_supports_non_stop, target_async): New.
16459 (start_non_stop): Declare.
16460 (mywait): Add `options' argument.
16461 * target.c (mywait): Add `options' argument. Print child exit
16462 notifications here.
16463 (start_non_stop): New.
16464 * server.c (non_stop, own_buf, mem_buf): New globals.
16465 (struct vstop_notif): New.
16466 (notif_queue): New global.
16467 (queue_stop_reply, push_event, discard_queued_stop_replies)
16468 (send_next_stop_reply): New.
16469 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16471 (attach_inferior): In non-stop mode, don't wait for the target
16473 (handle_general_set): Handle QNonStop.
16474 (handle_query): When handling qC, return the current general
16475 thread, instead of the first thread of the list.
16476 (handle_query): If the backend supports non-stop mode, include
16477 QNonStop+ in the qSupported query response.
16478 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16480 (handle_v_attach, handle_v_run): Handle non-stop mode.
16481 (handle_v_stopped): New.
16482 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16483 (myresume): Adjust to use resume_kind. Handle non-stop.
16484 (queue_stop_reply_callback): New.
16485 (handle_status): Handle non-stop mode.
16486 (main): Clear non_stop flag on reconnection. Use the event-loop.
16487 Refactor serial protocol handling from here ...
16488 (process_serial_event): ... to this new function. When GDB
16489 selects any thread, select one here. In non-stop mode, wait until
16490 GDB acks all pending events before exiting.
16491 (handle_serial_event, handle_target_event): New.
16492 * remote-utils.c (remote_open): Install remote_desc in the event
16494 (remote_close): Remove remote_desc from the event loop.
16495 (putpkt_binary): Rename to...
16496 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16497 (putpkt_binary): New as wrapper around putpkt_binary_1.
16498 (putpkt_notif): New.
16499 (prepare_resume_reply): In non-stop mode, don't change the
16501 * event-loop.c: New.
16502 * Makefile.in (OBJ): Add event-loop.o.
16503 (event-loop.o): New rule.
16505 * linux-low.h (pid_of): Moved here.
16507 (get_lwp_thread): Use lwpid_of.
16508 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16509 * linux-low.c (pid_of): Delete.
16510 (inferior_pid): Use lwpid_of.
16511 (linux_event_pipe): New.
16512 (target_is_async_p): New.
16514 (handle_extended_wait): Use lwpid_of.
16515 (add_lwp): Don't set lwpid field.
16516 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16517 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16518 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16519 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16520 first. Adjust to linux_wait_for_event interface changes. Use
16522 (linux_detach): Don't delete the main lwp here.
16523 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16524 (status_pending_p): Don't consider explicitly suspended lwps.
16525 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16526 pointer. Add OPTIONS argument. Change return type to int. Use
16527 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16528 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16529 pointer. Add status pointer argument. Return a pid instead of a
16530 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16531 changes. In non-stop mode, don't switch to a random thread.
16532 (linux_wait): Rename to...
16533 (linux_wait_1): ... this. Add target_options argument, and handle
16534 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16535 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16536 clean exit and signal exit code. Don't stop all threads in
16537 non-stop mode. In all-stop mode, only stop all threads when
16538 reporting a stop to GDB. Handle explicit thread stop requests.
16539 (async_file_flush, async_file_mark): New.
16541 (send_sigstop): Use lwpid_of.
16542 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16543 interface changes. In non-stop mode, don't switch to a random
16545 (linux_resume_one_lwp): Use lwpid_of.
16546 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16547 (linux_resume_one_thread): ... this. Handle resume_stop. In
16548 non-stop mode, don't look for pending flag in all threads.
16549 (resume_status_pending_p): Don't consider explicitly suspended
16551 (my_waitpid): Reimplement. Emulate __WALL.
16552 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16554 (sigchld_handler, linux_supports_non_stop, linux_async)
16555 (linux_start_non_stop): New.
16556 (linux_target_ops): Register linux_supports_non_stop, linux_async
16557 and linux_start_non_stop.
16558 (initialize_low): Install SIGCHLD handler.
16559 * thread-db.c (thread_db_create_event, find_one_thread)
16560 (thread_db_get_tls_address): Use lwpid_of.
16561 * win32-low.c (win32_detach): Adjust to use resume_kind.
16562 (win32_wait): Add `options' argument.
16563 * spu-low.c (spu_resume): Adjust to use resume_kind.
16564 (spu_wait): Add `options' argument.
16566 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16568 Decouple target code from remote protocol.
16570 * target.h (enum target_waitkind): New.
16571 (struct target_waitstatus): New.
16572 (struct target_ops) <wait>: Return an unsigned long. Take a
16573 target_waitstatus pointer instead of a char pointer.
16574 (mywait): Likewise.
16575 * target.c (mywait): Change prototype to return an unsigned long.
16576 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16577 * server.h (thread_from_wait, old_thread_from_wait): Delete
16579 (prepare_resume_reply): Change prototype to take a
16581 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16582 (last_status, last_ptid): New.
16583 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16584 pid instead of a signal.
16585 (attach_inferior): Remove "status" and "signal" parameters.
16587 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16589 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16590 (handle_v_requests, myresume): Remove "status" and "signal"
16591 parameters. Adjust.
16592 (handle_status): New.
16593 (main): Delete local `status'. Adjust.
16594 * remote-utils.c: Include target.h.
16595 (prepare_resume_reply): Change prototype to take a
16596 target_waitstatus. Adjust.
16598 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16600 * spu-low.c (spu_wait): Adjust.
16601 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16603 (win32_wait): Adjust.
16605 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16607 * target.h (struct thread_resume): Delete leave_stopped member.
16608 (struct target_ops): Add a `n' argument to the `resume' callback.
16609 * server.c (start_inferior): Adjust.
16610 (handle_v_cont, myresume): Adjust.
16611 * linux-low.c (check_removed_breakpoint): Adjust to resume
16612 interface change, and to removed leave_stopped field.
16613 (resume_ptr): Delete.
16614 (struct thread_resume_array): New.
16615 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16616 resume interface change.
16617 (linux_continue_one_thread, linux_queue_one_thread)
16618 (resume_status_pending_p): Check if the resume field is NULL
16619 instead of checking the leave_stopped member.
16620 (linux_resume): Adjust to the target resume interface change.
16621 * spu-low.c (spu_resume): Adjust to the target resume interface
16623 * win32-low.c (win32_detach, win32_resume): Ditto.
16625 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16627 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16629 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16631 (linux_continue_one_thread): Only preserve the stepping flag if
16632 there's a pending breakpoint.
16634 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16636 * server.c (main): After the inferior having exited, call
16637 remote_close before exiting gdbserver.
16639 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16641 Fix size of FPSCR in Power 7 processors.
16642 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16643 (PPC_FEATURE_HAS_DFP): New #define.
16644 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16647 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16649 * server.c (handle_query) Whitespace and formatting.
16651 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16653 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16654 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16655 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16656 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16657 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16658 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16659 Makefile.in, configure.ac: Fix whitespace throughout.
16660 * configure: Regenerate.
16662 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16664 * inferiors.c (find_inferior): Make it safe for the callback
16665 function to delete the currently iterated inferior.
16667 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16669 * Makefile.in (linuw_low_h): Move higher.
16670 (thread-db.o): Depend on $(linux_low_h).
16672 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16674 Rename "process" to "lwp" throughout.
16676 * linux-low.c (all_processes): Rename to...
16677 (all_lwps): ... this.
16678 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16679 (add_process): Rename to ...
16680 (add_lwp): ... this. Adjust.
16681 (linux_create_inferior): Adjust.
16682 (linux_attach_lwp): Adjust.
16683 (linux_attach): Adjust.
16684 (linux_kill_one_process): Rename to ...
16685 (linux_kill_one_lwp): ... this. Adjust.
16686 (linux_kill): Adjust.
16687 (linux_detach_one_process): Rename to ...
16688 (linux_detach_one_lwp): ... this. Adjust.
16689 (linux_detach): Adjust.
16690 (check_removed_breakpoint): Adjust.
16691 (status_pending_p): Adjust.
16692 (linux_wait_for_process): Rename to ...
16693 (linux_wait_for_lwp): ... this. Adjust.
16694 (linux_wait_for_event): Adjust.
16695 (send_sigstop): Adjust.
16696 (wait_for_sigstop): Adjust.
16697 (stop_all_processes): Rename to ...
16698 (stop_all_lwps): ... this.
16699 (linux_resume_one_process): Rename to ...
16700 (linux_resume_one_lwp): ... this. Adjust.
16701 (linux_set_resume_request, linux_continue_one_thread)
16702 (linux_queue_one_thread, resume_status_pending_p)
16703 (usr_store_inferior_registers, regsets_store_inferior_registers)
16704 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16706 * linux-low.h (get_process): Rename to ...
16707 (get_lwp): ... this. Adjust.
16708 (get_thread_process): Rename to ...
16709 (get_thread_lwp): ... this. Adjust.
16710 (get_process_thread): Rename to ...
16711 (get_lwp_thread): ... this. Adjust.
16712 (struct process_info): Rename to ...
16713 (struct lwp_info): ... this.
16714 (all_processes): Rename to ...
16715 (all_lwps): ... this.
16716 * proc-service.c (ps_lgetregs): Adjust.
16717 * thread-db.c (thread_db_create_event, find_one_thread)
16718 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16720 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16722 * server.c (handle_query): Handle "qAttached".
16724 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16726 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16727 GPLv3, update license URL.
16729 2009-03-01 Doug Evans <dje@google.com>
16731 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16732 (server_h): Add gdb_signals.h.
16733 (signals.o): Update.
16734 * server.h (target_signal_from_host,target_signal_to_host_p)
16735 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16737 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16739 * remote-utils.c (getpkt): Also generate remote-debug
16740 information if noack_mode is set.
16742 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16744 * server.c (handle_query): Report qXfer:siginfo:read and
16745 qXfer:siginfo:write as supported and handle them.
16746 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16747 * linux-low.c (linux_xfer_siginfo): New.
16748 (linux_target_ops): Set it.
16750 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16752 * server.c (gdbserver_usage): Mention --remote-debug.
16753 (main): Accept '--remote-debug' switch.
16755 2009-01-18 Doug Evans <dje@google.com>
16757 * regcache.c (new_register_cache): No need to check result of xcalloc.
16758 * server.c (handle_search_memory): Back out calls to xmalloc,
16759 result is checked and error is returned to user upon failure.
16760 (handle_query): Ditto. Add more checks for result of malloc.
16761 (handle_v_cont): Check result of malloc, report error back to
16763 (handle_v_run): Ditto. Call freeargv.
16764 * server.h (freeargv): Declare.
16765 * utils.c (freeargv): New fn.
16767 2009-01-15 Doug Evans <dje@google.com>
16769 * gdbreplay.c (perror_with_name): Make arg const char *.
16770 * server.h (target_signal_to_name): Make return type const char *.
16771 * thread-db.c (thread_db_err_str): Make return type const char *.
16772 * utils.c (perror_with_name): Make arg const char *.
16774 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16776 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16777 when handling a EXIT_PROCESS_DEBUG_EVENT.
16779 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16781 * gdbreplay.c (gdbreplay_version): Update copyright year.
16782 * server.c (gdbserver_version): Likewise.
16784 2009-01-05 Doug Evans <dje@google.com>
16786 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16787 (handle_extended_wait): Improve comment.
16789 2008-12-13 Doug Evans <dje@google.com>
16791 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16792 * server.h (ATTR_MALLOC): New macro.
16793 (xmalloc,xcalloc,xstrdup): Declare.
16794 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16795 * inferiors.c: Ditto.
16796 * linux-low.c: Ditto.
16797 * mem-break.c: Ditto.
16798 * regcache.c: Ditto.
16799 * remote-utils.c: Ditto.
16802 * win32-low.c: Ditto.
16804 2008-12-12 Doug Evans <dje@google.com>
16806 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16807 in debugging printf.
16809 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16811 2008-12-09 Doug Evans <dje@google.com>
16813 * linux-low.h (struct process_info): Delete member tid, unused.
16814 * thread-db.c (find_one_thread): Update.
16815 (maybe_attach_thread): Update.
16817 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16819 * target.h (struct target_ops): Add qxfer_osdata member.
16820 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16822 (linux_qxfer_osdata): New functions.
16823 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16825 * server.c (handle_query): Handle "qXfer:osdata:read:".
16826 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16827 (buffer_xml_printf): New functions.
16828 * server.h (struct buffer): New.
16829 (buffer_grow_str, buffer_grow_str0): New macros.
16830 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16831 (buffer_xml_printf): Declare.
16833 2008-11-24 Doug Evans <dje@google.com>
16835 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16837 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16839 * server.c (handle_v_run): Always use the supplied argument list.
16841 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16843 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16844 (xtensa_regmap_table): Add entry for scompare1.
16846 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16848 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16849 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16850 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16851 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16852 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16853 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16854 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16855 XML target descriptions.
16856 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16857 when inferior is running on an ISA 2.05 or later processor. Add
16858 special case to return offset for full 64-bit slot of FPSCR when
16861 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16863 * Makefile.in (SFILES, clean): Added sparc64 files.
16864 (reg-sparc64.o, reg-sparc64.c): New.
16865 * configure.srv (sparc*-*-linux*): New configuration.
16866 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16867 syscall arguments for SPARC.
16868 (regsets_store_inferior_registers): Likewise.
16869 * linux-sparc-low.c: New file.
16871 2008-10-21 Doug Evans <dje@google.com>
16873 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16874 (READLINE_DIR,READLINE_DEP): Delete.
16875 (INTERNAL_CFLAGS): Update.
16876 (LINTFLAGS): Update.
16878 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16880 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16881 whole argv from the last run, not just argv[0].
16883 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16885 * regcache.c (new_register_cache): Return NULL if the register
16886 cache size isn't known yet.
16887 (free_register_cache): Avoid dereferencing a NULL regcache.
16889 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16891 * configure.srv: Merge MIPS and MIPS64.
16893 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16895 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16897 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16899 * Makefile.in: Add required vsx dependencies.
16901 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16902 Declare init_registers_powerpc_vsx32l.
16903 Declare init_registers_powerpc_vsx64l.
16904 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16905 (ppc_arch_setup): Check for VSX in hwcap.
16906 (ppc_fill_vsxregset): New function.
16907 (ppc_store_vsxregset): New function.
16908 Add new VSX entry in regset_info target_regsets.
16910 * configure.srv: Add new VSX dependencies.
16912 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16914 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16915 (remote_open): Set or clear transport_is_reliable.
16916 (putpkt_binary): Don't expect acks in noack mode.
16917 (getpkt): Don't send ack/nac in noack mode.
16918 * server.c (handle_general_set): Handle QStartNoAckMode.
16919 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16921 (main): Reset noack_mode on every connection.
16922 * server.h (noack_mode): Declare.
16924 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16926 * Makefile.in (GDBREPLAY_OBS): New variable.
16927 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16929 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16930 Daniel Jacobowitz <dan@codesourcery.com>
16932 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16933 (usr_store_inferior_registers): Likewise.
16934 (regsets_store_inferior_registers): Likewise.
16936 2008-07-31 Rolf Jansen <rj@surtec.com>
16937 Pedro Alves <pedro@codesourcery.com>
16939 * configure.ac: Check for memmem declaration.
16940 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16941 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16942 (disable_packet_qfThreadInfo): Unconditionally compile.
16943 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16944 * configure, config.in: Regenerate.
16946 2008-07-28 Doug Kwan <dougkwan@google.com>
16948 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16949 (linux_write_memory): Remove declaration of errno.
16951 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16953 * linux-low.c (handle_extended_wait): Do not use "status"
16954 variable uninitialized.
16956 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16958 * server.c (handle_v_attach): Inhibit reporting dll changes.
16960 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16962 * remote-utils.c (prepare_resume_reply): If requested, don't
16963 output "thread:TID" in the T stop reply.
16965 * server.c (disable_packet_vCont, disable_packet_Tthread)
16966 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16967 (handle_query): If requested, disable support for qC, qfThreadInfo
16969 (handle_v_requests): If requested, disable support for vCont.
16970 (gdbserver_show_disableable): New.
16971 (main): Handle --disable-packet and --disable-packet=LIST.
16973 * server.h (disable_packet_vCont, disable_packet_Tthread)
16974 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16976 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16978 * server.c (gdbserver_usage): Mention --version.
16980 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16982 * Makefile.in (gdbreplay.o): New rule.
16984 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16986 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16987 message, not gdbserver.
16989 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16990 Nathan Sidwell <nathan@codesourcery.com>
16991 Joseph Myers <joseph@codesourcery.com>
16993 * acinclude.m4: Include ../../config/acx.m4.
16994 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16995 * configure, config.in: Regenerate.
16996 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16997 * server.c (gdbserver_version): Print PKGVERSION.
16998 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16999 (main): Adjust gdbserver_usage calls.
17000 * gdbreplay.c (version, host_name): Add declarations.
17001 (gdbreplay_version, gdbreplay_usage): New.
17002 (main): Accept --version and --help options.
17004 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17006 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17007 (arm_breakpoint_at): Handle Thumb.
17008 (the_low_target): Add comment.
17010 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17012 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17014 2008-05-09 Doug Evans <dje@google.com>
17016 * server.h (decode_search_memory_packet): Declare.
17017 * remote-utils.c (decode_search_memory_packet): New fn.
17018 * server.c (handle_search_memory_1): New fn.
17019 (handle_search_memory): New fn.
17020 (handle_query): Process qSearch:memory packets.
17022 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17024 * regcache.c (registers_length): Remove.
17025 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17026 full register packet.
17027 * regcache.h (registers_length): Remove prototype.
17028 * server.h (PBUFSIZ): Define to 16384.
17030 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17032 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17033 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17034 powerpc-64l.o, and powerpc-altivec64l.o.
17035 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17036 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17037 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17038 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17039 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17042 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17043 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17044 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17045 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17046 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17047 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17048 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17049 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17050 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17051 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17054 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17055 (init_registers_powerpc_32l): ... this new prototype.
17056 (init_registers_powerpc_32): Remove, replace by ...
17057 (init_registers_powerpc_altivec32l): ... this new prototype.
17058 (init_registers_powerpc_e500): Remove, replace by ...
17059 (init_registers_powerpc_e500l): ... this new prototype.
17060 (init_registers_ppc64): Remove, replace by ...
17061 (init_registers_powerpc_64l): ... this new prototype.
17062 (init_registers_powerpc_64): Remove, replace by ...
17063 (init_registers_powerpc_altivec64l): ... this new prototype.
17064 (ppc_num_regs): Set to 73.
17065 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17066 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17067 (ppc_cannot_store_register): Handle orig_r3 and trap.
17068 (ppc_arch_setup): Update init_registers_... calls.
17069 (ppc_fill_gregset): Handle orig_r3 and trap.
17071 * inferiors.c (clear_inferiors): Reset current_inferior.
17073 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17075 * acinclude.m4: Add override.m4.
17076 * configure: Regenerate.
17078 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17080 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17081 initial call to init_register_ppc64.
17083 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17085 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17086 single powerpc*-*-linux* case.
17087 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17089 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17091 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17092 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17094 * linux-ppc-low.c: Include <elf.h>.
17095 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17096 (ppc_hwcap): New global variable.
17097 (ppc_regmap): Remove __SPE__ #ifdef sections.
17098 (ppc_regmap_e500): New global variable.
17099 (ppc_cannot_store_register): Update __SPE__ special case.
17100 (ppc_get_hwcap): New function.
17101 (ppc_arch_setup): Use it to determine whether inferior supports
17102 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17103 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17104 Do not access registers if target does not support AltiVec.
17105 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17106 Do not access registers if target does not support SPE.
17107 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17109 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17111 * linux-low.c (disabled_regsets, num_regsets): New.
17112 (use_regsets_p): Delete.
17113 (linux_wait_for_process): Clear disabled_regsets.
17114 (regsets_fetch_inferior_registers): Check and set it.
17115 (regsets_store_inferior_registers): Likewise.
17116 (linux_fetch_registers, linux_store_registers): Do not use
17118 (initialize_low): Allocate disabled_regsets.
17120 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17122 * Makefile.in (LIBOBJS): New.
17123 (OBS): Use LIBOBJS.
17124 (memmem.o): New rule.
17125 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17126 * configure: Regenerated.
17128 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17130 * server.c (handle_query): Never return "unsupported" for
17131 qXfer:features:read queries.
17133 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17135 * server.c (get_features_xml): Fix inverted condition.
17136 (handle_query): Always support qXfer:feature:read.
17138 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17140 * server.c (wrapper_argv): New.
17141 (start_inferior): Handle wrapper_argv. If set, expect an extra
17143 (gdbserver_usage): Document --wrapper.
17144 (main): Parse --wrapper.
17146 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17148 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17149 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17150 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17151 (ppc_set_pc): Likewise.
17152 (ppc_arch_setup): New function.
17153 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17154 of collect_register.
17155 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17157 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17159 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17160 instead of linux-ppc64-low.o.
17161 * linux-ppc64-low.c: Remove file.
17162 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17163 (linux-ppc64-low.o): Remove rule.
17165 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17166 (init_registers_powerpc_64): Likewise.
17167 (ppc_regmap): Conditionally define depending on __powerpc64__.
17168 (ppc_cannot_store_register): Do not special-case "fpscr" when
17169 compiled on __powerpc64__.
17170 (ppc_collect_ptrace_register): New function.
17171 (ppc_supply_ptrace_register): New function.
17172 (ppc_breakpoint): Change type to "unsigned int".
17173 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17174 (the_low_target): Conditionally provide initializers for the
17175 arch_setup member depending on __powerpc64__. Install
17176 collect_ptrace_register and supply_ptrace_register members.
17178 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17180 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17181 * server.c (gdbserver_xmltarget): Define.
17182 (get_features_xml): Use it to replace "target.xml" and arch_string.
17184 * configure.srv: Remove srv_xmltarget. Add XML files that were
17185 mentioned there to srv_xmlfiles instead. Remove conditional tests
17186 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17187 srv_xmlfiles and srv_regobj to include all possible choices.
17188 * configure.ac (srv_xmltarget): Remove.
17189 (srv_xmlfiles): Do not add "target.xml".
17190 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17191 checks for supplementary target information.
17192 * configure: Regenerate.
17193 * Makefile.in (XML_TARGET): Remove.
17194 (target.xml): Remove rule.
17195 (clean): Do not clean up target.xml.
17196 (.PRECIOUS): Do not mention target.xml.
17198 * target.h (struct target_ops): Remove arch_string member.
17199 * linux-low.c (linux_arch_string): Remove.
17200 (linux_target_ops): Remove arch_string initializer.
17201 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17202 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17203 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17204 * spu-low.c (spu_arch_string): Remove.
17205 (spu_target_ops): Remove arch_string initializer.
17206 * win32-low.c (win32_arch_string): Remove.
17207 (win32_target_ops): Remove arch_string initializer.
17208 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17209 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17210 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17212 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17214 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17215 by collect_ptrace_register and supply_ptrace_register hooks.
17216 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17217 instead of checking for the_low_target.left_pad_xfer.
17218 (usr_store_inferior_registers): Use collect_ptrace_register callback
17219 instead of checking for the_low_target.left_pad_xfer.
17221 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17222 (s390_supply_ptrace_register): Likewise.
17223 (s390_fill_gregset): Call s390_collect_ptrace_register.
17224 (the_low_target): Update.
17226 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17227 (ppc_supply_ptrace_register): Likewise.
17228 (the_low_target): Update.
17230 * linux-i386-low.c (the_low_target): Update.
17231 * linux-x86-64-low.c (the_low_target): Update.
17233 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17235 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17236 reg-s390.o and reg-s390x.o.
17238 * linux-low.c (new_inferior): New global variable.
17239 (linux_create_inferior, linux_attach): Set it.
17240 (linux_wait_for_process): Call the_low_target.arch_setup after the
17241 target has stopped for the first time.
17242 (initialize_low): Do not call the_low_target.arch_setup.
17244 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17245 (s390_set_pc): Likewise.
17246 (s390_arch_setup): New function.
17247 (the_low_target): Use s390_arch_setup as arch_setup routine.
17249 * regcache.c (realloc_register_cache): New function.
17250 (set_register_cache): Call it for each existing regcache.
17252 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17254 * server.h (init_registers): Remove prototype.
17256 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17257 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17258 instead of init_registers ().
17259 * linux-arm-low.c (init_registers_arm): Add prototype.
17260 (init_registers_arm_with_iwmmxt): Likewise.
17261 (the_low_target): Add initializer for arch_setup field.
17262 * linux-cris-low.c (init_registers_cris): Add prototype.
17263 (the_low_target): Add initializer for arch_setup field.
17264 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17265 (the_low_target): Add initializer for arch_setup field.
17266 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17267 (the_low_target): Add initializer for arch_setup field.
17268 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17269 (the_low_target): Add initializer for arch_setup field.
17270 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17271 (the_low_target): Add initializer for arch_setup field.
17272 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17273 (the_low_target): Add initializer for arch_setup field.
17274 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17275 (init_registers_mips64_linux): Likewise.
17276 (the_low_target): Add initializer for arch_setup field.
17277 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17278 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17279 (the_low_target): Add initializer for arch_setup field.
17280 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17281 (init_registers_powerpc_64): Likewise.
17282 (the_low_target): Add initializer for arch_setup field.
17283 * linux-s390-low.c (init_registers_s390): Add prototype.
17284 (init_registers_s390x): Likewise.
17285 (the_low_target): Add initializer for arch_setup field.
17286 * linux-sh-low.c (init_registers_sh): Add prototype.
17287 (the_low_target): Add initializer for arch_setup field.
17288 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17289 (the_low_target): Add initializer for arch_setup field.
17290 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17291 (the_low_target): Add initializer for arch_setup field.
17293 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17294 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17295 instead of init_registers ().
17296 * win32-arm-low.c (init_registers_arm): Add prototype.
17297 (the_low_target): Add initializer for arch_setup field.
17298 * win32-i386-low.c (init_registers_i386): Add prototype.
17299 (the_low_target): Add initializer for arch_setup field.
17301 * spu-low.c (init_registers_spu): Add prototype.
17302 (initialize_low): Call initialie_registers_spu () instead of
17303 initialize_registers ().
17305 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17307 * server.c (handle_v_requests): When handling the vRun and vAttach
17308 packets, if already debugging a process, don't kill it. Return an
17311 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17313 * server.c (handle_query): Correct length check.
17315 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17317 * win32-low.c (do_initial_child_stuff): Add process handle
17318 parameter. Set current_process_handle and current_process_id from the
17319 parameters. Clear globals.
17320 (win32_create_inferior): Don't set current_process_handle and
17321 current_process_id here. Instead pass them on the call to
17322 do_initial_child_stuff.
17323 (win32_attach): Likewise.
17324 (win32_clear_inferiors): New.
17325 (win32_kill): Don't close the current process handle or the
17326 current thread handle here. Instead call win32_clear_inferiors.
17327 (win32_detach): Don't open a new handle to the process. Call
17328 win32_clear_inferiors.
17329 (win32_join): Don't rely on current_process_handle; open a new
17330 handle using the process id.
17331 (win32_wait): Call win32_clear_inferiors when the inferior process
17334 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17336 * server.c (monitor_show_help): Add "exit".
17338 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17340 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17341 (clean): Add reg-xtensa.c.
17342 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17343 * configure.srv (xtensa*-*-linux*) New target.
17344 * linux-xtensa-low.c: New.
17345 * xtensa-xtregs.c: New.
17347 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17349 * hostio.c: Don't include errno.h.
17350 (errno_to_fileio_errno): Move to hostio-errno.
17351 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17352 error number outputting to the target->hostio_last_error callback.
17353 (hostio_packet_error): Use FILEIO_EINVAL directly.
17354 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17355 calls to hostio_error.
17356 * hostio-errno.c: New.
17357 * server.h (hostio_last_error_from_errno): Declare.
17358 * target.h (target_ops): Add hostio_last_error member.
17359 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17360 as hostio_last_error handler.
17361 * spu-low.c (spu_target_ops): Likewise.
17362 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17363 (wince_hostio_last_error): New functions.
17364 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17365 as hostio_last_error handler.
17366 (win32_target_ops) [!_WIN32_WCE]: Register
17367 hostio_last_error_from_errno as hostio_last_error handler.
17368 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17369 (hostio-errno.o): New rule.
17370 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17371 * configure.srv (srv_hostio_err_objs): New variable. Default to
17373 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17374 * configure: Regenerate.
17376 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17378 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17379 (linux_kill, linux_detach): Clean up the process list.
17380 * remote-utils.c (remote_open): Improve port number parsing.
17381 (putpkt_binary, input_interrupt): Only send interrupts if the target
17383 * server.c (extended_protocol): Make static.
17384 (attached): Define earlier.
17385 (exit_requested, response_needed, program_argv): New variables.
17386 (target_running): New.
17387 (start_inferior): Clear attached here.
17388 (attach_inferior): Set attached here.
17389 (require_running): Define.
17390 (handle_query): Use require_running and target_running. Implement
17392 (handle_v_attach, handle_v_run): New.
17393 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17394 (gdbserver_usage): Update.
17395 (main): Redo argument parsing. Handle --debug and --multi. Handle
17396 --attach along with other options or after the port. Save
17397 program_argv. Support no initial program. Resynchronize
17398 communication with GDB after an error. Handle "monitor exit".
17399 Use require_running and target_running. Always allow the extended
17400 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17401 restart in extended mode.
17402 * README: Refer to the GDB manual. Update --attach usage.
17404 2007-12-20 Andreas Schwab <schwab@suse.de>
17406 * linux-low.c (STACK_SIZE): Define.
17407 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17408 (linux_test_for_tracefork): Likewise.
17410 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17412 * linux-low.c (linux_wait_for_event): Update messages. Do not
17413 reinsert auto-delete breakpoints.
17414 * mem-break.c (struct breakpoint): Change return type of handler to
17416 (set_breakpoint_at): Update handler type.
17417 (reinsert_breakpoint_handler): Return 1 instead of calling
17419 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17421 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17422 * mem-break.h (set_breakpoint_at): Update handler type.
17423 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17424 * win32-low.c (auto_delete_breakpoint): New.
17425 (get_child_debug_event): Use it.
17427 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17429 * configure.ac: Check for pread and pwrite.
17430 * hostio.c (handle_pread): Fall back to lseek and read.
17431 (handle_pwrite): Fall back to lseek and write.
17432 * config.in, configure: Regenerated.
17434 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17436 * server.c (myresume): Add own_buf argument.
17437 (main): Update calls.
17439 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17441 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17442 * remote-utils.c (remote_open): Do not call disable_async_io.
17443 (block_async_io): Delete.
17444 (unblock_async_io): Make static.
17445 (initialize_async_io): New.
17446 * server.c (handle_v_cont): Handle async I/O here.
17447 (myresume): Likewise. Move other common resume tasks here...
17448 (main): ... from here. Call initialize_async_io. Disable async
17449 I/O before the main loop.
17450 * server.h (initialize_async_io): Declare.
17451 (block_async_io, unblock_async_io): Delete prototypes.
17452 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17454 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17456 * remote-utils.c (readchar): Allow binary data in received messages.
17458 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17460 * win32-low.c (attaching): New global.
17461 (win32_create_inferior): Clear the `attaching' global.
17462 (win32_attach): Set the `attaching' global.
17463 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17464 attaching. Only set a breakpoint at the entry point if not
17467 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17469 * server.c (main): Don't report dll events on the initial
17470 connection on attaches.
17472 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17474 * server.c (main): Relax numerical bases supported for the pid of
17475 the --attach command line argument.
17477 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17479 * win32-low.c (win32_attach): Call OpenProcess before
17480 DebugActiveProcess, not after. Add last error output to error
17483 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17485 * win32-low.c (win32_get_thread_context)
17486 (win32_set_thread_context): New functions.
17487 (thread_rec): Use win32_get_thread_context.
17488 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17489 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17492 2007-12-03 Leo Zayas
17493 Pedro Alves <pedro_alves@portugalmail.pt>
17495 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17497 (child_add_thread): Minor cleanup.
17498 (child_continue): Resume artificially suspended threads before
17499 calling ContinueDebugEvent.
17500 (suspend_one_thread): New.
17501 (fake_breakpoint_event): New.
17502 (get_child_debug_event): Change return type to int. Check here if
17503 gdb sent an interrupt request. If a soft interrupt was requested,
17504 fake a breakpoint event. Return 0 if there is no event to handle,
17506 (win32_wait): Don't check here if gdb sent an interrupt request.
17507 Ensure there is a valid event to handle.
17508 (win32_request_interrupt): Add soft interruption method as last
17511 2007-12-03 Leo Zayas
17512 Pedro Alves <pedro_alves@portugalmail.pt>
17514 * win32-low.h (win32_thread_info): Add descriptions to the
17515 structure members. Replace `suspend_count' counter by a
17517 * win32-low.c (thread_rec): Update condition of when to get the
17518 context from the inferior. Rely on ContextFlags being set if it
17519 has already been retrieved. Only suspend the inferior thread if
17520 we haven't already. Warn if that fails.
17521 (continue_one_thread): s/suspend_count/suspended/. Only call
17522 ResumeThread once. Warn if that fails.
17524 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17526 * win32-low.c (win32_wait): Don't read from the inferior when it
17527 has already exited.
17529 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17531 * Makefile.in (win32_low_h): New variable.
17532 (win32-low.o): Add dependency on $(win32_low_h).
17533 (win32-arm-low.o, win32-i386-low.o): New rules.
17535 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17537 * hostio.c: Correct copyright year.
17539 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17541 * Makefile.in (OBS): Add hostio.o.
17542 (hostio.o): New rule.
17543 * server.h (handle_vFile): Declare.
17544 * hostio.c: New file.
17545 * server.c (handle_v_requests): Take packet_len and new_packet_len
17546 for binary packets. Call handle_vFile.
17547 (main): Update call to handle_v_requests.
17549 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17551 * linux-low.c: Include <sched.h>.
17553 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17555 * linux-low.c (linux_tracefork_grandchild): New.
17556 (linux_tracefork_child): Use clone.
17557 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17559 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17561 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17563 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17565 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17567 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17569 * inferiors.c (change_inferior_id): Delete.
17570 (add_pid_to_list, pull_pid_from_list): New.
17571 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17572 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17573 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17574 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17575 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17576 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17577 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17578 (using_threads): Always set to 1.
17579 (handle_extended_wait): New.
17580 (add_process): Do not set TID.
17581 (linux_create_inferior): Set must_set_ptrace_flags.
17582 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17583 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17584 (linux_thread_alive): Rename TID argument to LWPID.
17585 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17586 (linux_wait_for_event): Do not use TID or check using_threads. Update
17587 call to dead_thread_notify. Call handle_extended_wait.
17588 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17589 (send_sigstop): Delete sigstop_sent.
17590 (wait_for_sigstop): Avoid TID.
17591 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17592 (linux_test_for_tracefork): New.
17593 (linux_lookup_signals): Use thread_db_active and
17594 linux_supports_tracefork_flag.
17595 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17596 * linux-low.h (get_process_thread): Avoid TID.
17597 (struct process_ifo): Move thread_known and tid to the end. Remove
17599 (linux_attach_lwp, thread_db_init): Update prototypes.
17600 * server.h (change_inferior_id): Delete prototype.
17601 (add_pid_to_list, pull_pid_from_list): New prototypes.
17602 * thread-db.c (thread_db_use_events): New.
17603 (find_first_thread): Rename to...
17604 (find_one_thread): ...this. Update callers and messages. Do not
17605 call fatal. Check thread_db_use_events. Do not call
17606 change_inferior_id or new_thread_notify.
17607 (maybe_attach_thread): Update. Do not call new_thread_notify.
17608 (thread_db_init): Set thread_db_use_events. Check use_events.
17609 * utils.c (fatal, warning): Correct message prefix.
17611 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17613 * Makefile.in (clean): Remove new files.
17614 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17615 (powerpc-64.o, powerpc-64.c): New rules.
17616 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17617 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17619 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17621 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17622 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17623 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17624 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17625 (target_regsets): Add AltiVec and SPE register sets.
17626 * configure.ac: Check for AltiVec and SPE.
17627 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17628 (ppc_fill_vrregset, ppc_store_vrregset): New.
17629 (target_regsets): Add AltiVec register set.
17630 * configure: Regenerated.
17632 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17634 * linux-low.c (O_LARGEFILE): Define.
17635 (linux_read_memory): Use /proc/PID/mem.
17636 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17637 * configure, config.in: Regenerated.
17639 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17641 * linux-low.c (linux_wait_for_event): Do not pass signals while
17644 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17646 * win32-low.c (create_process): New.
17647 (win32_create_inferior): Use create_process instead of
17648 CreateProcess. If create_process failed retry appending an ".exe"
17649 suffix. Store the GetLastError result immediatelly after
17650 create_process calls and use it on the call to error.
17652 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17654 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17656 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17658 * configure.ac: Switch license to GPLv3.
17660 2007-08-01 Michael Snyder <msnyder@access-company.com>
17662 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17664 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17666 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17668 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17669 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17670 CloseToolhelp32Snapshot.
17671 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17672 CloseToolhelp32Snapshot.
17674 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17676 * server.c (main): Check for inferior exit before main loop.
17678 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17680 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17681 instead of on tmp_desc.
17683 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17684 Daniel Jacobowitz <dan@codesourcery.com>
17686 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17687 (add_thread): Minor cleanups.
17688 (clear_inferiors): Move lower in the file. Clear the DLL
17690 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17691 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17692 (xml_escape_text): New.
17693 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17695 (handle_v_cont): Report errors.
17696 (gdbserver_version): Update.
17697 (main): Correct size of own_buf. Do not report initial DLL events.
17698 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17699 (unloaded_dll, xml_escape_text): New.
17700 * win32-low.c (enum target_waitkind): Update comments.
17701 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17702 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17703 (win32_EnumProcessModules, win32_GetModuleInformation)
17704 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17705 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17706 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17707 (win32_Module32First, win32_Module32Next, load_toolhelp)
17708 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17709 (get_child_debug_event): Handle DLL events.
17710 (win32_wait): Likewise.
17712 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17714 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17715 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17717 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17719 * win32-low.c (handle_output_debug_string): Ignore event if not
17722 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17724 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17726 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17728 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17730 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17732 * inferiors.c (change_inferior_id): Add comment.
17733 * linux-low.c (check_removed_breakpoint): Add an early
17734 prototype. Improve debug output.
17735 (linux_attach): Doc update.
17736 (linux_detach_one_process, linux_detach): Clean up before releasing
17738 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17739 * linux-low.h (struct process_info): Doc improvement.
17740 * mem-break.c (delete_all_breakpoints): New.
17741 * mem-break.h (delete_all_breakpoints): New prototype.
17742 * thread-db.c (find_first_thread): New.
17743 (thread_db_create_event): Call it instead of
17744 thread_db_find_new_threads. Clean up unused variables.
17745 (maybe_attach_thread): Remove first thread handling.
17746 (thread_db_find_new_threads): Use find_first_thread.
17747 (thread_db_get_tls_address): Likewise.
17749 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17751 * thread-db.c (thread_db_find_new_threads): Add prototype.
17752 (thread_db_create_event): Check for the main thread before adding
17754 (maybe_attach_thread): Only enable event reporting if TID == 0.
17755 (thread_db_get_tls_address): Check for new threads.
17757 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17759 * linux-low.c (linux_create_inferior): Try execv before execvp.
17760 * spu-low.c (spu_create_inferior): Likewise.
17762 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17764 * linux-low.c (linux_create_inferior): Change execv to execvp.
17765 * spu-low.c (spu_create_inferior): Likewies.
17767 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17769 * Makefile.in (clean): Clean new files instead of deleted ones.
17770 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17771 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17773 * configure.srv: Specify XML files and new regformats for MIPS and
17775 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17776 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17777 an entry for the restart register.
17778 (mips_cannot_fetch_register, mips_cannot_store_register)
17779 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17780 register names to match the XML descriptions.
17781 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17782 restart register instead of $0.
17784 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17785 Markus Deuling <deuling@de.ibm.com>
17787 * remote-utils.c (decode_xfer_write): New function.
17788 * server.h (decode_xfer_write): Add prototype.
17789 * server.c (handle_query): Add PACKET_LEN argument. Support
17790 qXfer:spu:read and qXfer:spu:write packets.
17791 (main): Pass packet_len to handle_query.
17792 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17793 * target.h (target_ops): Add qxfer_spu.
17795 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17797 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17798 accessing non-seekable spufs files.
17800 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17802 * server.c (handle_query): Add reply for qC packet.
17804 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17805 Leo Zayas <lerele@champenstudios@com>
17807 * server.h (check_remote_input_interrupt_request): New function.
17808 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17809 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17810 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17811 (check_remote_input_interrupt_request): New function.
17812 * server.h (check_remote_input_interrupt_request): Declare.
17813 * win32-low.c (winapi_DebugBreakProcess,
17814 winapi_GenerateConsoleCtrlEvent): New typedefs.
17815 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17817 (win32_wait): Check for remote interrupt request
17818 with check_remote_input_interrupt_request.
17819 (win32_request_interrupt): New function.
17820 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17822 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17824 * win32-low.c (debug_registers_changed,
17825 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17826 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17827 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17828 (thread_rec): Get context using the low target.
17829 (child_add_thread): Call thread_added on the low target,
17830 which does the same thing.
17832 (do_initial_child_stuff): Remove debug registers references.
17833 Set context using the low target. Resume threads after
17834 setting the contexts.
17835 (child_continue): Remove dead variable. Remove debug
17836 registers references.
17837 (child_fetch_inferior_registers): Go through the low target.
17838 (do_child_store_inferior_registers): Remove.
17839 (child_store_inferior_registers): Go through the low target.
17840 (win32_resume): Remove debug registers references.
17841 Set context using the low target.
17842 (handle_exception): Change return type to void. Don't record
17843 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17844 first chance exception.
17845 (get_child_debug_event): Change return type to void. Remove
17846 goto loop. Always return after waiting for debug event.
17847 (win32_wait): Convert to switch statement. Handle spurious
17850 * win32-i386-low.c (debug_registers_changed,
17851 debug_registers_used): New.
17852 (initial_stuff): Rename to ...
17853 (i386_initial_stuff): ... this. Clear debug registers
17855 (store_debug_registers): Delete.
17856 (i386_get_thread_context): New.
17857 (load_debug_registers): Delete.
17858 (i386_set_thread_context): New.
17859 (i386_thread_added): New.
17860 (single_step): Rename to ...
17861 (i386_single_step): ... this.
17862 (do_fetch_inferior_registers): Rename to ...
17863 (i386_fetch_inferior_register): ... this.
17864 (i386_store_inferior_register): New.
17865 (the_low_target): Adapt to new interface.
17867 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17868 (arm_get_thread_context): New.
17869 (arm_set_thread_context): New.
17871 (do_fetch_inferior_registers): Rename to ...
17872 (arm_fetch_inferior_register): ... this.
17873 (arm_store_inferior_register): New.
17874 (arm_wince_breakpoint): Reimplement as unsigned long.
17875 (arm_wince_breakpoint_len): Define.
17876 (the_low_target): Adapt to new interface.
17878 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17879 load_debug_registers. Add get_thread_context, set_thread_context,
17880 thread_added and store_inferior_register. Rename
17881 fetch_inferior_registers to fetch_inferior_register.
17882 (regptr): Remove declaration.
17884 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17886 * linux-low.c (linux_detach): Change return type to int. Return 0.
17887 * spu-low.c (spu_detach): Likewise.
17889 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17891 * target.h (target_ops): Change return type of detach to int.
17893 (join_inferior): New.
17894 * server.c (main): Don't skip detach support on mingw32.
17895 If the inferior doesn't support detaching return error.
17896 Call join_inferior instead of using waitpid.
17897 * linux-low.c (linux_join): New.
17898 (linux_target_op): Add linux_join.
17899 * spu-low.c (spu_join): New.
17900 (spu_target_ops): Add spu_join.
17901 * win32-low.c (win32_detach): Adapt to new interface.
17902 Reopen current_process_handle before detaching. Issue a child
17903 resume before detaching.
17905 (win32_target_op): Add win32_join.
17907 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17909 * win32-low.c (win32-attach): Fix return value.
17910 * target.h (target_ops): Describe ATTACH return values.
17912 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17914 * win32-low.c (GETPROCADDRESS): Define.
17915 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17916 (winapi_DebugSetProcessKillOnExit): Likewise.
17917 (win32_create_inferior): Force usage of ansi CreateProcessA.
17918 (win32_attach): Use GETPROCADDRESS.
17919 (win32_detach): Likewise.
17921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17923 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17925 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17927 * win32-low.c: Commit leftover changes from 2007-03-29.
17929 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17931 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17932 fields short instead of int. Add explicit padding.
17933 (i387_cache_to_fsave): Remove unnecessary casts.
17934 (i387_fsave_to_cache): Doc fix.
17935 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17937 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17939 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17940 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17942 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17944 * configure.srv (arm*-*-mingw32ce*): Move near the other
17947 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17949 * configure.ac: Add errno checking.
17950 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17951 sys/file.h and malloc.h.
17952 (AC_CHECK_DECLS): Add perror.
17953 (srv_mingwce): Handle.
17954 * configure.srv (i[34567]86-*-cygwin*): Add
17955 win32-i386-low.o to srv_tgtobj.
17956 (i[34567]86-*-mingw*): Likewise.
17957 (arm*-*-mingw32ce*): Add case.
17958 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17959 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17960 [__MINGW32CE__] (strerror): New function.
17961 [__MINGW32CE__] (errno): Define to GetLastError.
17962 [__MINGW32CE__] (COUNTOF): New macro.
17963 (remote_open): Remove extra close call.
17964 * mem-break.c (delete_breakpoint_at): New function.
17965 * mem-break.h (delete_breakpoint_at): Declare.
17966 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17967 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17968 [USE_WIN32API] (read, write): Add char* casts.
17969 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17970 * server.h: Include wincecompat.h on Windows CE.
17971 [HAVE_ERRNO_H]: Check.
17972 (perror): Declare if not declared.
17973 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17974 (perror_with_name): Remove errno declaration.
17975 * wincecompat.h: New.
17976 * wincecompat.c: New.
17977 * win32-low.h: New.
17978 * win32-arm-low.c: New.
17979 * win32-i386-low.c: New.
17980 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17981 (OUTMSG2): Make it safe.
17983 (COUNTOF): New macro.
17984 (NUM_REGS): Get it from the low target.
17985 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17986 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17987 (thread_rec): Let low target handle debug registers.
17988 (child_add_thread): Likewise.
17989 (child_init_thread_list): Likewise.
17990 (continue_one_thread): Likewise.
17992 (do_child_fetch_inferior_registers): Move to ...
17993 * win32-i386-low.c: ... here, and rename to ...
17994 (do_fetch_inferior_registers): ... this.
17995 * win32-low.c (child_fetch_inferior_registers):
17996 Go through the low target.
17997 (do_child_store_inferior_registers): Use regptr.
17998 (strwinerror): New function.
17999 (win32_create_inferior): Handle Windows CE.
18000 Use strwinerror instead of strerror on Windows error
18001 codes. Add program to the error output.
18002 Don't close the main thread handle on Windows CE.
18003 (win32_attach): Use coredll.dll on Windows CE.
18004 (win32_kill): Close current process and current
18006 (win32_detach): Use coredll.dll on Windows CE.
18007 (win32_resume): Let low target handle debug registers, and
18009 (handle_exception): Add/Remove initial breakpoint. Avoid
18010 non-existant WSTOPSIG on Windows CE.
18011 (win32_read_inferior_memory): Cast to remove warning.
18012 (win32_arch_string): Go through the low target.
18013 (initialize_low): Call set_breakpoint_data with the low
18014 target's breakpoint.
18015 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18016 FOP_REGNUM, mappings): Move to ...
18017 * win32-i386-low.c: ... here.
18018 * win32-low.c (win32_thread_info): Move to ...
18019 * win32-low.h: ... here.
18020 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18021 win32-arm-low.c and wincecompat.c.
18022 (all:): Add $EXEEXT.
18023 (install-only:): Likewise.
18024 (gdbserver:): Likewise.
18025 (gdbreplay:): Likewise.
18026 * config.in: Regenerate.
18027 * configure: Regenerate.
18029 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18031 * win32-low.c: Rename typedef thread_info to
18032 win32_thread_info throughout.
18034 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18036 * win32-i386-low.c: Rename to ...
18037 * win32-low.c: ... this.
18038 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18039 * Makefile.in: Likewise.
18041 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18043 * remote-utils.c (monitor_output): Constify msg parameter.
18044 * server.h (monitor_output): Likewise.
18045 * win32-i386-low.c (handle_output_debug_string): New.
18046 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18047 handle_output_debug_string.
18048 (get_child_debug_event): Likewise.
18050 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18052 * server.c (main): Correct strtoul check.
18054 2007-03-27 Jon Ringle <jon@ringle.org>
18056 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18058 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18060 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18062 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18064 * terminal.h: Check HAVE_SGTTY_H.
18066 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18068 * remote-utils.c (remote_open): Print out the assigned port number.
18070 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18072 * remote-utils.c (monitor_output): New function.
18073 * server.c (debug_threads): Define here.
18074 (monitor_show_help): New function.
18075 (handle_query): Handle qRcmd.
18076 (main): Do not handle 'd' packet.
18077 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18078 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18081 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18083 * Makefile.in (EXEEXT): New.
18084 (clean): Use $(EXEEXT).
18086 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18088 * target.h (target_ops): Rename send_signal to request_interrupt,
18089 and remove enum target_signal parameter.
18090 * linux-low.c (linux_request_interrupt): Rename from
18091 linux_send_signal, and always send SIGINT.
18092 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18093 and always send SIGINT.
18094 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18096 (input_interrupt): Likewise.
18098 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18100 * server.c (get_features_xml): Check if target implemented
18102 * win32-i386-low.c (win32_arch_string): New.
18103 (win32_target_ops): Add win32_arch_string as arch_string member.
18105 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18107 * spu-low.c (spu_arch_string): New.
18108 (spu_target_ops): Add spu_arch_string.
18110 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18112 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18113 * configure.ac: Do not check for terminal.h.
18114 * configure, config.in: Regenerated.
18116 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18118 * Makefile.in (OBS): Add $(XML_BUILTIN).
18119 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18121 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18122 (arm-with-iwmmxt.c): New.
18123 * config.in, configure: Regenerate.
18124 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18125 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18126 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18127 (arm*-*-linux*): Add iWMMXt and regset support.
18128 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18129 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18130 (arm_store_wmmxregset, target_regsets): New.
18131 * server.c (get_features_xml): Take annex argument. Check builtin
18133 (handle_query): Handle multiple annexes.
18135 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18137 * remote-utils.c [USE_WIN32API] (read, write): Define.
18138 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18141 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18143 * linux-i386-low.c (the_low_target): Set arch_string.
18144 * linux-x86-64-low.c (the_low_target): Likewise.
18145 * linux-low.c (linux_arch_string): New.
18146 (linux_target_ops): Add it.
18147 * linux-low.h (struct linux_target_ops): Add arch_string.
18148 * server.c (write_qxfer_response): Use const void * for DATA.
18149 (get_features_xml): New.
18150 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18151 * target.h (struct target_ops): Add arch_string method.
18153 2007-01-03 Denis Pilat <denis.pilat@st.com>
18154 Daniel Jacobowitz <dan@codesourcery.com>
18156 * linux-low.c (linux_kill): Handle being called with no threads.
18157 * win32-i386-low.c (win32_kill): Likewise.
18158 (get_child_debug_event): Clear current_process_handle.
18160 2006-12-30 Denis PILAT <denis.pilat@st.com>
18161 Daniel Jacobowitz <dan@codesourcery.com>
18163 * remote-utils.c (remote_open): Check the type of specified
18164 serial port devices before opening them.
18165 * server.c (main): Kill the inferior if an error occurs during
18166 the first remote_open.
18168 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18170 * README: Update supported targets.
18172 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18174 * Makefile.in (clean): Remove reg-mips64.c.
18175 (reg-mips64.c, reg-mips64.o): New rules.
18176 * configure.srv: Handle mips64. Include regset support for mips.
18177 * linux-mips-low.c (union mips_register): New.
18178 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18179 (mips_breakpoint, mips_breakpoint_at): Use int.
18180 (mips_collect_register, mips_supply_register)
18181 (mips_collect_register_32bit, mips_supply_register_32bit)
18182 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18183 (mips_store_fpregset, target_regsets): New.
18184 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18186 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18188 * configure.srv: Add target "spu*-*-*".
18189 * Makefile.in (clean): Remove reg-spu.c.
18190 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18191 * spu-low.c: New file.
18193 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18195 * configure.ac: Correct td_thr_tls_get_addr test.
18196 * configure: Regenerated.
18198 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18200 * linux-low.c (linux_wait_for_event): Reformat. Use the
18201 pass_signals array.
18202 * remote-utils.c (decode_address_to_semicolon): New.
18203 * server.c (pass_signals, handle_general_set): New.
18204 (handle_query): Mention QPassSignals for qSupported.
18205 (main): Call handle_general_set.
18206 * server.h (pass_signals, decode_address_to_semicolon): New.
18208 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18210 * server.c (handle_query): Correct error handling for read_auxv.
18212 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18214 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18215 and srv_linux_thread_db to yes.
18216 * linux-s390-low.c (s390_fill_gregset): New function.
18217 (target_regsets): Define data structure.
18219 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18221 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18222 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18223 * config.in, configure: Regenerated.
18224 * inferiors.c (gdb_id_to_thread): New function.
18225 (gdb_id_to_thread_id): Use it.
18226 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18227 * linux-low.h (struct process_info): Add th member.
18228 (thread_db_get_tls_address): New prototype.
18229 * remote-utils.c (decode_address): Make non-static.
18230 * server.c (handle_query): Handle qGetTLSAddr.
18231 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18232 * target.h (struct target_ops): Add get_tls_address.
18233 * thread-db.c (maybe_attach_thread): Save the thread handle.
18234 (thread_db_get_tls_address): New.
18236 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18238 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18239 (linux_resume_one_process): Take a siginfo_t *. Update all
18240 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18241 (struct pending_signals): Add a siginfo_t.
18242 (linux_wait_for_process): Always set last_status.
18243 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18244 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18245 * linux-low.h (struct process_info): Add last_status.
18247 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18249 * remote-utils.c (try_rle): New function.
18250 (putpkt_binary): Use it.
18252 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18254 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18255 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18256 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18257 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18258 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18261 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18263 * server.c (terminal_fd): New variable.
18264 (old_foreground_pgrp): Likewise.
18265 (restore_old_foreground_pgrp): New function.
18266 (start_inferior): Record the terminal file descriptor in terminal_fd
18267 and its original foreground group in old_foreground_pgrp. Register
18268 restore_old_foreground_pgrp with atexit().
18270 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18272 * server.c (handle_query): Correct qPart to qXfer.
18274 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18276 * configure.ac: Check for more headers which are missing on
18277 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18278 * configure.srv: Add Cygwin and mingw32.
18279 * remote-utils.c: Don't include headers unconditionally which
18280 are missing on mingw32. Include <winsock.h> for mingw32.
18281 (remote_open): Adjust for mingw32 support. Flush
18282 standard error after writing to it.
18283 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18284 (unblock_async_io, enable_async_io, disable_async_io)
18285 (readchar, getpkt): Update for Winsock support.
18286 (prepare_resume_reply): Expect a protocol signal number.
18287 * server.c: Disable <sys/wait.h> on mingw32.
18288 (start_inferior): Adjust for mingw32 support. Flush
18289 standard error after writing to it.
18290 (attach_inferior): Likewise. Use protocol signal
18292 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18294 * win32-i386-low.c: New file.
18295 * Makefile.in (XM_CLIBS): Set.
18296 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18297 (win32-i386-low.o): New dependency rule.
18298 * linux-low.c (linux_wait): Use target signal numbers.
18299 * target.h (struct target_ops): Doc fix.
18300 * server.h (target_signal_to_name): New prototype.
18301 * gdbreplay.c: Don't include headers unconditionally which
18302 are missing on mingw32. Include <winsock.h> for mingw32.
18303 (remote_close, remote_open): Adjust for Winsock support.
18304 * configure, config.in: Regenerated.
18306 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18308 * server.c (decode_xfer_read, write_qxfer_response): New.
18309 (handle_query): Take a packet length argument. Handle
18310 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18311 the qSupported response.
18312 (main): Update call to handle_query.
18314 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18316 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18317 (putpkt_binary): Renamed from putpkt and adjusted for binary
18319 (putpkt): New wrapper for putpkt_binary.
18320 (readchar): Don't mask off the high bit.
18321 (decode_X_packet): New function.
18322 * server.c (main): Call putpkt_binary if a handler sets the packet
18323 length. Save the length of the incoming packet. Handle 'X'.
18324 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18326 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18328 * server.c (handle_query): Handle qSupported.
18330 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18332 * remote-utils.c (all_symbols_looked_up): New variable.
18333 (look_up_one_symbol): Check it.
18334 * server.h (look_up_one_symbol): New declaration.
18335 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18337 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18339 * Makefile.in (linux-arm-low.o): Update dependencies.
18340 * linux-arm-low.c: Include "gdb_proc_service.h".
18341 (PTRACE_GET_THREAD_AREA): Define.
18342 (ps_get_thread_area): New function.
18344 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18346 * configure.srv (m68k*-*-uclinux*): New target.
18347 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18348 (linux_resume_one_process): Remove extraneous cast.
18349 (linux_read_offsets): New.
18350 (linux_target_op): Add linux_read_offsets on mmuless systems.
18351 * server.c (handle_query): Add qOffsets logic.
18352 * target.h (struct target_ops): Add read_offsets.
18354 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18356 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18357 (PTRACE_GET_THREAD_AREA): Define.
18358 (ps_get_thread_area): New function.
18359 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18360 (linux-x86-64-low.o): Update.
18362 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18364 * configure.ac: Remove checks for prfpregset_t.
18365 * gdb_proc_service.h: New file.
18366 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18367 new "gdb_proc_service.h".
18368 * proc-service.c: Likewise.
18369 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18370 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18371 * Makefile.in (gdb_proc_service_h): Updated.
18372 * configure, config.in: Regenerated.
18374 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18376 * remote-utils.c (prepare_resume_reply): Move declaration
18377 of gdb_id_from_wait to the top of the block.
18379 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18381 * linux-low.c (regsets_store_inferior_registers): Read the regset
18382 from the target before filling it.
18384 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18386 * server.c (attach_inferior): Return SIGTRAP for a successful
18389 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18391 * Makefile.in (OBS): Add version.o.
18392 (STAGESTUFF): Delete.
18393 (version.o): Add dependencies.
18394 (version.c): Replace rule.
18395 (clean): Remove version.c.
18396 * server.c (gdbserver_version): New.
18397 (gdbserver_usage): Use printf.
18398 (main): Handle --version and --help.
18399 * server.h (version, host_name): Add declarations.
18401 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18413 * linux-x86-64-low.c:
18415 * linux-s390-low.c:
18416 * linux-ppc64-low.c:
18418 * linux-mips-low.c:
18419 * linux-m68k-low.c:
18420 * linux-m32r-low.c:
18423 * linux-ia64-low.c:
18424 * linux-i386-low.c:
18425 * linux-crisv32-low.c:
18437 * gdbserver.1: Add (C) after Copyright. Update the FSF
18440 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18442 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18443 (arm_breakpoint_at): Recognize both breakpoints.
18444 (the_low_target): Use the correct breakpoint instruction.
18446 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18448 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18449 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18450 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18451 (the_low_target): Update.
18453 2005-10-25 Andreas Schwab <schwab@suse.de>
18455 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18457 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18458 (ia64_num_regs): Reduce to 462.
18460 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18462 * acinclude.m4: Correct quoting.
18463 * aclocal.m4: Regenerated.
18465 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18466 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18467 (thread_db_init): Call thread_db_err_str.
18468 * configure.ac: Check for TD_VERSION.
18469 * config.in, configure: Regenerated.
18471 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18473 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18475 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18477 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18478 is not available. Define HAVE_PTRACE_GETREGS if it is.
18479 * config.in, configure: Regenerated.
18480 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18481 * linux-i386-low.c, linux-m68k-low.c: Update to use
18482 HAVE_PTRACE_GETREGS.
18483 * linux-low.c (regsets_fetch_inferior_registers)
18484 (regsets_store_inferior_registers): Only return 0 if we processed
18486 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18487 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18489 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18491 * inferiors.c (struct thread_info): Add gdb_id.
18492 (add_thread): Add gdb_id argument.
18493 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18494 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18495 calls to add_thread.
18496 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18497 * server.c (handle_query): Use thread_to_gdb_id.
18498 (handle_v_cont, main): Use gdb_id_to_thread_id.
18499 * server.h (add_thread): Update prototype.
18500 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18503 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18505 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18506 left-padded registers.
18507 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18508 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18510 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18512 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18513 * configure: Regenerate.
18514 * config.in: Regenerate.
18515 * server.h (NEED_DECLARATION_STRERROR):
18516 Replace with !HAVE_DECL_STRERROR.
18518 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18520 * linux-low.c (linux_wait, linux_send_signal): Don't test
18521 an unsigned long variable for > 0 if it could be MAX_ULONG.
18522 * server.c (myresume): Likewise.
18523 * target.c (set_desired_inferior): Likewise.
18525 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18527 * configure.ac: Simplify and improve check for socklen_t.
18528 * configure, config.in: Regenerate.
18530 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18532 * acconfig.h: Remove.
18533 * configure.ac: Add a test for socklen_t. Use three-argument
18534 AC_DEFINE throughout.
18535 * config.in: Regenerated using autoheader 2.59.
18536 * configure: Regenerated.
18538 * gdbreplay.c (socklen_t): Provide a default.
18539 (remote_open): Use socklen_t.
18540 * remote-utils.c (socklen_t): Provide a default.
18541 (remote_open): Use socklen_t.
18542 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18545 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18547 * linux-low.c (linux_read_memory, linux_write_memory)
18548 (linux_read_auxv): Likewise.
18549 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18550 (check_mem_write): Likewise.
18551 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18553 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18554 (registers_from_string, register_data): Likewise.
18555 * server.c (handle_query, main): Likewise.
18556 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18557 (decode_M_packet): Likewise.
18558 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18559 * target.h (struct target_ops): Update read_memory, write_memory,
18561 (read_inferior_memory, write_inferior_memory): Update.
18562 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18563 to unsigned char *.
18564 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18565 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18566 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18567 linux-s390-low.c, linux-sh-low.c: Update for changes in
18568 read_inferior_memory and the_low_target->breakpoint.
18570 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18572 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18573 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18574 * configure.srv: Add powerpc64-*-linux*.
18575 * linux-ppc64-low.c: New file.
18577 2005-05-23 Orjan Friberg <orjanf@axis.com>
18579 * linux-cris-low.c: New file with support for CRIS.
18580 * linux-crisv32-low.c: Ditto for CRISv32.
18581 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18582 (clean): Add reg-cris.c and reg-crisv32.c.
18583 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18584 reg-crisv32.o, and reg-crisv32.c to make rules.
18585 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18586 recognized targets.
18588 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18590 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18591 of sizeof (PTRACE_XFER_TYPE).
18592 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18594 2005-05-12 Orjan Friberg <orjanf@axis.com>
18596 * target.h (struct target_ops): Add insert_watchpoint,
18597 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18598 pointers for hardware watchpoint support.
18599 * linux-low.h (struct linux_target_ops): Ditto.
18600 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18601 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18602 to linux_target_ops.
18603 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18605 * server.c (main): Recognize 'Z' and 'z' packets.
18607 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18609 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18610 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18611 (the_low_target): Add new members.
18613 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18615 * proc-service.c (ps_lgetregs): Search all_processes instead of
18618 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18620 * server.c (start_inferior): Change return type to int.
18621 (attach_inferior): Change sigptr to int *.
18622 (handle_v_cont, handle_v_requests): Change signal to int *.
18623 (main): Change signal to int.
18625 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18627 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18628 * configure.srv: Add m32r*-*-linux*.
18629 * linux-m32r-low.c: New file.
18631 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18633 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18635 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18637 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18638 Take unsigned long arguments for PIDs.
18639 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18640 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18641 (wait_for_sigstop, linux_resume_one_process)
18642 (regsets_fetch_inferior_registers, linux_send_signal)
18643 (linux_read_auxv): Likewise. Update the types of variables holding
18644 PIDs. Update format string specifiers.
18645 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18646 * remote-utils.c (prepare_resume_reply): Likewise.
18647 * server.c (cont_thread, general_thread, step_thread)
18648 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18650 (handle_query): Update format specifiers.
18651 (handle_v_cont, main): Use strtoul for thread IDs.
18652 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18653 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18654 (general_thread, step_thread, thread_from_wait)
18655 (old_thread_from_wait): Update.
18656 * target.h (struct thread_resume): Use unsigned long for THREAD.
18657 (struct target_ops): Use unsigned long for arguments to attach and
18660 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18662 * acinclude.m4: Include bfd/bfd.m4 directly.
18663 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18664 <agriffis@toolchain.org>.
18665 * aclocal.m4, configure: Regenerated.
18667 2005-01-07 Andrew Cagney <cagney@gnu.org>
18669 * configure.ac: Rename configure.in, require autoconf 2.59.
18670 * configure: Re-generate.
18672 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18674 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18675 LIBS when finished.
18676 * aclocal.m4: Regenerated.
18677 * configure: Regenerated.
18679 2004-11-21 Andreas Schwab <schwab@suse.de>
18681 * linux-m68k-low.c (m68k_num_gregs): Define.
18682 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18683 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18684 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18685 (m68k_breakpoint_at): New. Add to the_low_target.
18687 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18688 srv_linux_thread_db to yes.
18690 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18692 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18693 (ARCH_SET_FS): Likewise.
18694 (ARCH_GET_FS): Likewise.
18695 (ARCH_GET_GS): Likewise.
18697 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18699 * linux-i386-low.c (ps_get_thread_area): New.
18700 * linux-x86-64-low.c (ps_get_thread_area): New.
18701 * linux-low.c: Include <sys/syscall.h>.
18702 (linux_kill_one_process): Don't kill the first thread here.
18703 (linux_kill): Kill the first thread here.
18704 (kill_lwp): New function.
18705 (send_sigstop, linux_send_signal): Use it.
18706 * proc-service.c: Clean up #ifdefs.
18707 (fpregset_info): Delete.
18708 (ps_lgetregs): Update and enable implementation.
18709 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18711 * remote-utils.c (struct sym_cache, symbol_cache): New.
18712 (input_interrupt): Print a clearer message.
18713 (async_io_enabled): New variable.
18714 (enable_async_io, disable_async_io): Use it. Update comments.
18715 (look_up_one_symbol): Use the symbol cache.
18716 * thread-db.c (thread_db_look_up_symbols): New function.
18717 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18719 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18721 * configure.in: Test for -rdynamic.
18722 * configure: Regenerated.
18723 * Makefile (INTERNAL_LDFLAGS): New.
18724 (gdbserver, gdbreplay): Use it.
18726 2004-09-02 Andrew Cagney <cagney@gnu.org>
18728 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18730 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18732 * linux-low.c (linux_wait): Clear all_processes list also.
18734 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18736 * linux-low.c: Include <errno.h>. Remove extern declaration of
18739 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18741 * gdbreplay.c, server.h, utils.c: Update copyright years.
18743 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18745 * server.c (main): Print child status or termination signal from
18746 variable 'signal', not 'sig'.
18748 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18750 * linux-low.c (linux_read_memory): Change return type to
18751 int. Check for and return error from ptrace().
18752 * target.c (read_inferior_memory): Change return type to int. Pass
18753 back return status from the_target->read_memory().
18754 * target.h (struct target_ops): Adapt *read_memory() prototype.
18756 (read_inferior_memory): Adapt prototype.
18757 * server.c (main): Return an error packet if
18758 read_inferior_memory() returns an error.
18760 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18762 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18763 Unify with other clean targets.
18765 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18767 * server.c (handle_v_cont): Call set_desired_inferior.
18769 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18771 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18773 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18775 * linux-low.c (linux_wait): Unblock async I/O.
18776 (linux_resume): Block and enable async I/O.
18777 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18778 * server.h (block_async_io, unblock_async_io): Add prototypes.
18780 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18782 * remote-utils.c (remote_open): Print a status notice after
18783 opening a TCP port.
18784 * server.c (attach_inferior): Print a status notice after
18787 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18789 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18791 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18793 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18795 * server.c, target.h: Update copyright years.
18797 2004-02-25 Roland McGrath <roland@redhat.com>
18799 * target.h (struct target_ops): New member `read_auxv'.
18800 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18801 * linux-low.c (linux_read_auxv): New function.
18802 (linux_target_ops): Initialize `read_auxv' member to that.
18804 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18806 Committed by Jim Blandy <jimb@redhat.com>.
18808 * linux-s390-low.c (s390_num_regs): Update.
18809 (s390_regmap): Remove control registers. Use __s390x__ predefine
18810 instead of GPR_SIZE to distiguish s390 and s390x targets.
18812 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18814 * linux-low.c: Update copyright year.
18815 (check_removed_breakpoint): Clear pending_is_breakpoint.
18816 (linux_set_resume_request, linux_queue_one_thread)
18817 (resume_status_pending_p): New functions.
18818 (linux_continue_one_thread): Use process->resume.
18819 (linux_resume): Only resume threads if there are no pending events.
18820 * linux-low.h (struct process_info): Add resume request
18823 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18825 * regcache.c (new_register_cache): Clear the allocated register
18826 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18828 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18830 * linux-low.c (linux_resume): Take a struct thread_resume *
18832 (linux_wait): Update call.
18833 (resume_ptr): New static variable.
18834 (linux_continue_one_thread): Renamed from
18835 linux_continue_one_process. Use resume_ptr.
18836 (linux_resume): Use linux_continue_one_thread.
18837 * server.c (handle_v_cont, handle_v_requests): New functions.
18838 (myresume): New function.
18839 (main): Handle 'v' case.
18840 * target.h (struct thread_resume): New type.
18841 (struct target_ops): Change argument of "resume" to struct
18843 (myresume): Delete macro.
18845 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18847 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18848 (uninstall): Support DESTDIR.
18850 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18852 * configure.srv: Add xscale*linux copy of arm*linux entry.
18854 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18856 * linux-arm-low.c (arm_reinsert_addr): New function.
18857 (the_low_target): Add arm_reinsert_addr.
18859 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18861 * mem-break.c: Remove whitespace at end of file.
18863 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18865 * configure.in: Check whether we need to prototype strerror.
18866 * server.h: Optionally prototype strerror.
18867 * gdbreplay.c (perror_with_name): Use strerror.
18868 * linux-low.c (linux_attach_lwp): Use strerror.
18869 * utils.c (perror_with_name): Use strerror.
18870 * config.in, configure: Regenerated.
18872 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18874 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18875 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18877 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18879 * Makefile.in (SFILES): Update.
18880 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18881 low-sun3.c: Remove files.
18883 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18885 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18886 (linux_detach_one_process, linux_detach): New functions.
18887 (linux_target_ops): Add linux_detach.
18888 * server.c (main): Handle 'D' packet.
18889 * target.h (struct target_ops): Add "detach" member.
18890 (detach_inferior): Define.
18892 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18894 From Kelley Cook <kelleycook@wideopenwest.com>:
18895 * configure.srv: Accept i[34567]86 variants.
18897 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18899 * linux-low.c (linux_wait_for_event): Correct comment typos.
18900 (linux_resume_one_process): Call check_removed_breakpoint.
18901 (linux_send_signal): New function.
18902 (linux_target_ops): Add linux_send_signal.
18903 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18905 * target.h (struct target_ops): Add send_signal.
18907 2003-05-29 Jim Blandy <jimb@redhat.com>
18909 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18910 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18911 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18912 away part of the register's value.
18914 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18916 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18917 (linux_wait_for_event, linux_init_signals): Likewise.
18919 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18921 * configure.in: Check for stdlib.h.
18922 * configure: Regenerated.
18923 * config.in: Regenerated.
18925 2003-01-04 Andreas Schwab <schwab@suse.de>
18927 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18929 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18931 * Makefile.in: Remove obsolete code.
18933 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18935 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18936 defined(PT_FPR0_HI).
18938 2002-11-17 Stuart Hughes <seh@zee2.com>
18940 * linux-arm-low.c (arm_num_regs): Increase.
18941 (arm_regmap): Include status register.
18943 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18945 * linux-low.c (register_addr): Remove incorrect -1 check.
18947 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18949 * linux-low.c (linux_create_inferior): Call setpgid. Return
18951 (unstopped_p, linux_signal_pid): Remove.
18952 (linux_target_ops): Remove linux_signal_pid.
18953 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18954 global instead of target method.
18955 * target.h (struct target_ops): Remove signal_pid. Update comment
18956 for create_inferior.
18957 * server.c (signal_pid): New variable.
18958 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18959 gdbserver. Set the child to be the foreground process group.
18960 (attach_inferior): Set signal_pid.
18962 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18964 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18966 2002-08-20 Jim Blandy <jimb@redhat.com>
18968 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18971 2002-08-01 Andrew Cagney <cagney@redhat.com>
18973 * Makefile.in: Make chill references obsolete.
18975 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18977 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18978 * configure: Regenerate.
18979 * config.in: Regenerate.
18981 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18983 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18984 (perror_with_name, remote_close, remote_open, expect, play): Static.
18986 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18988 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18989 byte offsets instead of an array of indexes.
18990 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18992 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18994 * regcache.c: Add comment.
18996 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18998 * thread-db.c: New file.
18999 * proc-service.c: New file.
19000 * acinclude.m4: New file.
19001 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19002 proc-service.o, and thread-db.o.
19003 (linux-low.o): Add USE_THREAD_DB.
19004 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19005 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19006 * aclocal.m4: Regenerated.
19007 * config.in: Regenerated.
19008 * configure: Regenerated.
19009 * configure.in: Check for proc_service.h, sys/procfs.h,
19010 thread_db.h, and linux/elf.h headrs.
19011 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19012 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19013 Check for -lthread_db and thread support.
19014 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19015 PowerPC, and SuperH.
19016 * i387-fp.c: Constify arguments.
19017 * i387-fp.h: Likewise.
19018 * inferiors.c: (struct thread_info): Renamed from
19019 `struct inferior_info'. Remove PID member. Use generic inferior
19020 list header. All uses updated.
19021 (inferiors, signal_pid): Removed.
19022 (all_threads): New variable.
19023 (get_thread): Define.
19024 (add_inferior_to_list): New function.
19025 (for_each_inferior): New function.
19026 (change_inferior_id): New function.
19027 (add_inferior): Removed.
19028 (remove_inferior): New function.
19029 (add_thread): New function.
19030 (free_one_thread): New function.
19031 (remove_thread): New function.
19032 (clear_inferiors): Use for_each_inferior and free_one_thread.
19033 (find_inferior): New function.
19034 (find_inferior_id): New function.
19035 (inferior_target_data): Update argument type.
19036 (set_inferior_target_data): Likewise.
19037 (inferior_regcache_data): Likewise.
19038 (set_inferior_regcache_data): Likewise.
19039 * linux-low.c (linux_bp_reinsert): Remove.
19040 (all_processes, stopping_threads, using_thrads)
19041 (struct pending_signals, debug_threads, pid_of): New.
19042 (inferior_pid): Replace with macro.
19043 (struct inferior_linux_data): Remove.
19044 (get_stop_pc, add_process): New functions.
19045 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19046 Use add_process and add_thread.
19047 (linux_attach_lwp): New function, based on old linux_attach. Use
19048 add_process and add_thread. Set stop_expected for new threads.
19049 (linux_attach): New function.
19050 (linux_kill_one_process): New function.
19051 (linux_kill): Kill all LWPs.
19052 (linux_thread_alive): Use find_inferior_id.
19053 (check_removed_breakpoints, status_pending_p): New functions.
19054 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19055 Update. Use WNOHANG. Wait for cloned processes also. Update process
19056 struct for the found process.
19057 (linux_wait_for_event): New function.
19058 (linux_wait): Use it. Support LWPs.
19059 (send_sigstop, wait_for_sigstop, stop_all_processes)
19060 (linux_resume_one_process, linux_continue_one_process): New functions.
19061 (linux_resume): Support LWPs.
19062 (REGISTER_RAW_SIZE): Remove.
19063 (fetch_register): Use register_size instead. Call supply_register.
19064 (usr_store_inferior_registers): Likewise. Call collect_register.
19065 Fix recursive case.
19066 (regsets_fetch_inferior_registers): Improve error message.
19067 (regsets_store_inferior_registers): Add debugging.
19068 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19069 (unstopped_p, linux_signal_pid): New functions.
19070 (linux_target_ops): Add linux_signal_pid.
19071 (linux_init_signals): New function.
19072 (initialize_low): Call it. Initialize using_threads.
19073 * regcache.c (inferior_regcache_data): Add valid
19075 (get_regcache): Fetch registers lazily. Add fetch argument
19076 and update all callers.
19077 (regcache_invalidate_one, regcache_invalidate): New
19079 (new_register_cache): Renamed from create_register_cache.
19080 Return the new regcache.
19081 (free_register_cache): Change argument to a void *.
19082 (registers_to_string, registers_from_string): Call get_regcache
19083 with fetch flag set.
19084 (register_data): Make static. Pass fetch flag to get_regcache.
19085 (supply_register): Call get_regcache with fetch flag clear.
19086 (collect_register): Call get_regcache with fetch flag set.
19087 (collect_register_as_string): New function.
19088 * regcache.h: Update.
19089 * remote-utils.c (putpkt): Flush after debug output and use
19091 Handle input interrupts while waiting for an ACK.
19092 (input_interrupt): Use signal_pid method.
19093 (getpkt): Flush after debug output and use stderr.
19094 (outreg): Use collect_register_as_string.
19095 (new_thread_notify, dead_thread_notify): New functions.
19096 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19097 and general_thread.
19098 (look_up_one_symbol): Flush after debug output.
19099 * server.c (step_thread, server_waiting): New variables.
19100 (start_inferior): Don't use signal_pid. Update call to mywait.
19101 (attach_inferior): Update call to mywait.
19102 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19103 (main): Don't fetch/store registers explicitly. Use
19104 set_desired_inferior. Support proposed ``Hs'' packet. Update
19106 * server.h: Update.
19107 (struct inferior_list, struct_inferior_list_entry): New.
19108 * target.c (set_desired_inferior): New.
19109 (write_inferior_memory): Constify.
19110 (mywait): New function.
19111 * target.h: Update.
19112 (struct target_ops): New signal_pid method.
19113 (mywait): Removed macro, added prototype.
19115 * linux-low.h (regset_func): Removed.
19116 (regset_fill_func, regset_store_func): New.
19117 (enum regset_type): New.
19118 (struct regset_info): Add type field. Use new operation types.
19119 (struct linux_target_ops): stop_pc renamed to get_pc.
19120 Add decr_pc_after_break and breakpoint_at.
19121 (get_process, get_thread_proess, get_process_thread)
19122 (strut process_info, all_processes, linux_attach_lwp)
19123 (thread_db_init): New.
19125 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19126 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19127 (the_low_target): Add new members.
19128 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19129 (i386_store_fpxregset): Constify.
19130 (target_regsets): Add new kind identifier.
19131 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19132 (i386_set_pc): Add debugging.
19133 (i386_breakpoint_at): New function.
19134 (the_low_target): Add new members.
19135 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19136 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19137 (mips_breakpoint_at): New.
19138 (the_low_target): Add new members.
19139 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19140 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19141 (the_low_target): Add new members.
19142 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19143 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19144 (the_low_target): Add new members.
19145 * linux-x86-64-low.c (target_regsets): Add new kind
19148 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19150 From Martin Pool <mbp@samba.org>:
19151 * server.c (gdbserver_usage): New function.
19154 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19156 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19157 stop_at -> stop_pc.
19159 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19161 * Makefile.in: Remove obsolete code.
19163 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19165 * linux-low.c (regsets_fetch_inferior_registers),
19166 (regsets_store_inferior_registers): Removed cast to int from
19168 * regcache.h: Added declaration of struct inferior_info.
19170 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19172 * inferiors.c (struct inferior_info): Add regcache_data.
19173 (add_inferior): Call create_register_cache.
19174 (clear_inferiors): Call free_register_cache.
19175 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19176 * regcache.c (struct inferior_regcache_data): New.
19177 (registers): Remove.
19178 (get_regcache): New function.
19179 (create_register_cache, free_register_cache): New functions.
19180 (set_register_cache): Don't initialize the register cache here.
19181 (registers_to_string, registers_from_string, register_data): Call
19183 * regcache.h: Add prototypes.
19184 * server.h: Likewise.
19186 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19188 * mem-break.c: New file.
19189 * mem-break.h: New file.
19190 * Makefile.in: Add mem-break.o rule; update server.h
19192 * inferiors.c (struct inferior_info): Add target_data
19194 (clear_inferiors): Free target_data member if set.
19195 (inferior_target_data, set_inferior_target_data): New functions.
19196 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19197 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19198 * linux-low.c (linux_bp_reinsert): New variable.
19199 (struct inferior_linux_data): New.
19200 (linux_create_inferior): Use set_inferior_target_data.
19201 (linux_attach): Likewise. Call add_inferior.
19202 (linux_wait_for_one_inferior): New function.
19203 (linux_wait): Call it.
19204 (linux_write_memory): Add const.
19205 (initialize_low): Call set_breakpoint_data.
19206 * linux-low.h (struct linux_target_ops): Add breakpoint
19208 * server.c (attach_inferior): Remove extra add_inferior
19210 * server.h: Include mem-break.h. Update inferior.c
19212 * target.c (read_inferior_memory)
19213 (write_inferior_memory): New functions.
19214 * target.h (read_inferior_memory)
19215 (write_inferior_memory): Change macros to prototypes.
19216 (struct target_ops): Update comments. Add const to write_memory
19219 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19221 * linux-low.c (usr_store_inferior_registers): Support
19222 registers which are allowed to fail to store.
19223 * linux-low.h (linux_target_ops): Likewise.
19224 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19225 (ppc_cannot_store_register): FPSCR may not be storable.
19227 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19229 * server.h: Include <string.h> if HAVE_STRING_H.
19230 * ChangeLog: Correct paths in last ChangeLog entry.
19232 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19234 * linux-low.h: Remove obsolete prototypes.
19235 (struct linux_target_ops): New.
19236 (extern the_low_target): New.
19237 * linux-low.c (num_regs, regmap): Remove declarations.
19238 (register_addr): Use the_low_target explicitly.
19239 (fetch_register): Likewise.
19240 (usr_fetch_inferior_registers): Likewise.
19241 (usr_store_inferior_registers): Likewise.
19242 * linux-arm-low.c (num_regs): Remove.
19243 (arm_num_regs): Define.
19244 (arm_regmap): Renamed from regmap, made static.
19245 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19247 (arm_cannot_store_register): Renamed from cannot_store_register,
19249 (the_low_target): New.
19250 * linux-i386-low.c (num_regs): Remove.
19251 (i386_num_regs): Define.
19252 (i386_regmap): Renamed from regmap, made static.
19253 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19255 (i386_cannot_store_register): Renamed from cannot_store_register,
19257 (the_low_target): New.
19258 * linux-ia64-low.c (num_regs): Remove.
19259 (ia64_num_regs): Define.
19260 (ia64_regmap): Renamed from regmap, made static.
19261 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19263 (ia64_cannot_store_register): Renamed from cannot_store_register,
19265 (the_low_target): New.
19266 * linux-m68k-low.c (num_regs): Remove.
19267 (m68k_num_regs): Define.
19268 (m68k_regmap): Renamed from regmap, made static.
19269 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19271 (m68k_cannot_store_register): Renamed from cannot_store_register,
19273 (the_low_target): New.
19274 * linux-mips-low.c (num_regs): Remove.
19275 (mips_num_regs): Define.
19276 (mips_regmap): Renamed from regmap, made static.
19277 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19279 (mips_cannot_store_register): Renamed from cannot_store_register,
19281 (the_low_target): New.
19282 * linux-ppc-low.c (num_regs): Remove.
19283 (ppc_num_regs): Define.
19284 (ppc_regmap): Renamed from regmap, made static.
19285 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19287 (ppc_cannot_store_register): Renamed from cannot_store_register,
19289 (the_low_target): New.
19290 * linux-s390-low.c (num_regs): Remove.
19291 (s390_num_regs): Define.
19292 (s390_regmap): Renamed from regmap, made static.
19293 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19295 (s390_cannot_store_register): Renamed from cannot_store_register,
19297 (the_low_target): New.
19298 * linux-sh-low.c (num_regs): Remove.
19299 (sh_num_regs): Define.
19300 (sh_regmap): Renamed from regmap, made static.
19301 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19303 (sh_cannot_store_register): Renamed from cannot_store_register,
19305 (the_low_target): New.
19306 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19307 (the_low_target): New.
19309 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19311 * Makefile.in: Add stamp-h target.
19312 * configure.in: Create stamp-h.
19313 * configure: Regenerated.
19315 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19317 * inferiors.c: New file.
19318 * target.c: New file.
19319 * target.h: New file.
19320 * Makefile.in: Add target.o and inferiors.o. Update
19322 * linux-low.c (inferior_pid): New static variable,
19323 moved from server.c.
19324 (linux_create_inferior): Renamed from create_inferior.
19325 Call add_inferior. Return 0 on success instead of a PID.
19326 (linux_attach): Renamed from myattach.
19327 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19328 (linux_thread_alive): Renamed from mythread_alive.
19329 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19331 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19332 (regsets_store_inferior_registers): Correct error message.
19333 Add missing ``return 0''.
19334 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19335 (linux_store_registers): Renamed from store_inferior_registers.
19336 (linux_read_memory): Renamed from read_inferior_memory.
19337 (linux_write_memory): Renamed from write_inferior_memory.
19338 (linux_target_ops): New structure.
19339 (initialize_low): Call set_target_ops ().
19340 * remote-utils.c (unhexify): New function.
19341 (hexify): New function.
19342 (input_interrupt): Send signals to ``signal_pid''.
19343 * server.c (inferior_pid): Remove.
19344 (start_inferior): Update create_inferior call.
19345 (attach_inferior): Call add_inferior.
19346 (handle_query): New function.
19347 (main): Call handle_query for `q' packets.
19348 * server.h: Include "target.h". Remove obsolete prototypes.
19349 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19351 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19353 * Makefile.in: Add WARN_CFLAGS. Update configury
19355 * configure.in: Check for <string.h>
19356 * configure: Regenerate.
19357 * config.in: Regenerate.
19358 * gdbreplay.c: Include needed system headers.
19359 (remote_open): Remove strchr prototype.
19360 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19361 * regcache.c (supply_register): Change buf argument to const void *.
19362 (supply_register_by_name): Likewise.
19363 (collect_register): Change buf argument to void *.
19364 (collect_register_by_name): Likewise.
19365 * regcache.h: Add missing prototypes.
19366 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19367 * server.c (handle_query): New function.
19368 (attached): New static variable, moved out of main.
19369 (main): Quiet longjmp clobber warnings.
19370 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19371 * utils.c (error): Remove NORETURN.