1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's qxfer_libraries_svr4 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. Also add
8 'supports_qxfer_libraries_svr4'.
9 * target.cc (process_target::qxfer_libraries_svr4): Define.
10 (process_target::supports_qxfer_libraries_svr4): Define.
12 Update the derived classes and callers below.
14 * server.cc (handle_qxfer_libraries_svr4): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_qxfer_libraries_svr4): Define.
18 (linux_qxfer_libraries_svr4): Turn into ...
19 (linux_process_target::qxfer_libraries_svr4): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 * win32-low.cc (win32_target_ops): Update.
25 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
27 Turn process_stratum_target's supports_disable_randomization op
28 into a method of process_target.
30 * target.h (struct process_stratum_target): Remove the target op.
31 (class process_target): Add the target op.
32 (target_supports_disable_randomization): Update the macro.
33 * target.cc (process_target::supports_disable_randomization): Define.
35 Update the derived classes and callers below.
37 * linux-low.cc (linux_target_ops): Update.
38 (linux_supports_disable_randomization): Turn into ...
39 (linux_process_target::supports_disable_randomization): ... this.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
45 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
47 Turn process_stratum_target's emit_ops op into a method of
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op.
52 (target_emit_ops): Update the macro.
53 * target.cc (process_target::emit_ops): Define.
55 Update the derived classes and callers below.
57 * linux-low.cc (linux_target_ops): Update.
58 (linux_emit_ops): Turn into ...
59 (linux_process_target::emit_ops): ... this.
60 * linux-low.h (class linux_process_target): Update.
61 * lynx-low.cc (lynx_target_ops): Update.
62 * nto-low.cc (nto_target_ops): Update.
63 * win32-low.cc (win32_target_ops): Update.
65 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
67 Turn process_stratum_target's install_fast_tracepoint_jump_pad
68 and get_min_fast_tracepoint_insn_len ops into methods of
71 * target.h (struct process_stratum_target): Remove the target ops.
72 (class process_target): Add the target ops. Also add
73 'supports_fast_tracepoints'.
74 (target_supports_fast_tracepoints): Update the macro.
75 (target_get_min_fast_tracepoint_insn_len): Update the macro.
76 (install_fast_tracepoint_jump_pad): Update and rename the macro
78 (target_install_fast_tracepoint_jump_pad): ... this.
79 * target.cc (process_target::supports_fast_tracepoints): Define.
80 (process_target::install_fast_tracepoint_jump_pad): Define.
81 (process_target::get_min_fast_tracepoint_insn_len): Define.
83 Update the derived classes and callers below.
85 * tracepoint.cc (install_fast_tracepoint): Update.
86 * linux-low.cc (linux_target_ops): Update.
87 (linux_process_target::supports_fast_tracepoints): Define.
88 (linux_install_fast_tracepoint_jump_pad): Turn into ...
89 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
90 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
91 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
92 * linux-low.h (class linux_process_target): Update.
93 * lynx-low.cc (lynx_target_ops): Update.
94 * nto-low.cc (nto_target_ops): Update.
95 * win32-low.cc (win32_target_ops): Update.
97 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
99 Turn process_stratum_target's stabilize_threads op into a
100 method of process_target.
102 * target.h (struct process_stratum_target): Remove the target op.
103 (class process_target): Add the target op.
104 (target_stabilize_threads): Update the macro.
105 * target.cc (process_target::stabilize_threads): Define.
107 Update the derived classes and callers below.
109 * server.cc (handle_status): Update.
110 * tracepoint.cc (cmd_qtdp): Update.
111 (cmd_qtstart): Update.
112 * linux-low.cc (linux_target_ops): Update.
113 (linux_stabilize_threads): Turn into ...
114 (linux_process_target::stabilize_threads): ... this.
115 (linux_wait_1): Update.
116 * linux-low.h (class linux_process_target): Update.
117 * lynx-low.cc (lynx_target_ops): Update.
118 * nto-low.cc (nto_target_ops): Update.
119 * win32-low.cc (win32_target_ops): Update.
121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
123 Turn process_stratum_target's pause_all and unpause_all ops
124 into methods of process_target.
126 * target.h (struct process_stratum_target): Remove the target ops.
127 (class process_target): Add the target ops.
128 (pause_all): Update the macro and rename to...
129 (target_pause_all): ... this.
130 (unpause_all): Update the macro and rename to...
131 (target_unpause_all): ... this.
132 * target.cc (process_target::pause_all): Define.
133 (process_target::unpause_all): Define.
135 Update the derived classes and callers below.
137 * server.cc (handle_status): Update.
138 * tracepoint.cc (clear_installed_tracepoints): Update.
140 (cmd_qtstart): Update.
141 (stop_tracing): Update.
142 (cmd_qtstatus): Update.
143 (upload_fast_traceframes): Update.
144 (run_inferior_command): Update.
145 * linux-low.cc (linux_target_ops): Update.
146 (linux_pause_all): Turn into ...
147 (linux_process_target::pause_all): ... this.
148 (linux_unpause_all): Turn into ...
149 (linux_process_target::unpause_all): ... this.
150 (linux_process_target::prepare_to_access_memory): Update.
151 (linux_process_target::done_accessing_memory): Update.
152 * linux-low.h (class linux_process_target): Update.
153 * lynx-low.cc (lynx_target_ops): Update.
154 * nto-low.cc (nto_target_ops): Update.
155 * win32-low.cc (win32_target_ops): Update.
157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
159 Turn process_stratum_target's get_tib_address op into a method of
162 * target.h (struct process_stratum_target): Remove the target op.
163 (class process_target): Add the target op. Also add
164 'supports_get_tib_address'.
165 * target.cc (process_target::get_tib_address): Define.
166 (process_target::supports_get_tib_address): Define.
168 Update the derived classes and callers below.
170 * server.cc (handle_query): Update.
171 * linux-low.cc (win32_target_ops): Update.
172 * lynx-low.cc (lynx_target_ops): Update.
173 * nto-low.cc (nto_target_ops): Update.
174 * win32-low.cc (win32_target_ops): Update.
175 (win32_process_target::supports_get_tib_address): Define.
176 (win32_get_tib_address): Turn into ...
177 (win32_process_target::get_tib_address): ... this.
178 * win32-low.h (class win32_process_target): Update.
180 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
182 Turn process_stratum_target's thread_stopped op into a method of
185 * target.h (struct process_stratum_target): Remove the target op.
186 (class process_target): Add the target op. Also add
187 'supports_thread_stopped'.
188 (target_thread_stopped): Update the macro.
189 * target.cc (process_target::thread_stopped): Define.
190 (process_target::supports_thread_stopped): Define.
191 (prepare_to_access_memory): Update.
193 Update the derived classes and callers below.
195 * server.cc (queue_stop_reply_callback): Update.
196 * linux-low.cc (linux_target_ops): Update.
197 (linux_process_target::supports_thread_stopped): Define.
198 (linux_thread_stopped): Turn into ...
199 (linux_process_target::thread_stopped): ... this.
200 * linux-low.h (class linux_process_target): Update.
201 * lynx-low.cc (lynx_target_ops): Update.
202 * nto-low.cc (nto_target_ops): Update.
203 * win32-low.cc (win32_target_ops): Update.
205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
207 Turn process_stratum_target's read_pc and write_pc ops into
208 methods of process_target.
210 * target.h (struct process_stratum_target): Remove the target ops.
211 (class process_target): Add the target ops.
212 * target.cc (process_target::read_pc): Define.
213 (process_target::write_pc): Define.
215 Update the derived classes and callers below.
217 * regcache.cc (regcache_read_pc): Update.
218 (regcache_write_pc): Update.
219 * linux-low.cc (linux_target_ops): Update.
220 (linux_read_pc): Turn into ...
221 (linux_process_target::read_pc): ... this.
222 (linux_write_pc): Turn into ...
223 (linux_process_target::write_pc): ... this.
224 * linux-low.h (class linux_process_target): Update.
225 * lynx-low.cc (lynx_target_ops): Update.
226 * nto-low.cc (nto_target_ops): Update.
227 * win32-low.cc (win32_target_ops): Update.
229 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
231 Turn process_stratum_target's supports_tracepoints op into a
232 method of process_target.
234 * target.h (struct process_stratum_target): Remove the target op.
235 (class process_target): Add the target op.
236 (target_supports_tracepoints): Update the macro.
237 * target.cc (process_target::supports_tracepoints): Define.
239 Update the derived classes and callers below.
241 * linux-low.cc (linux_target_ops): Update.
242 (linux_supports_tracepoints): Turn into ...
243 (linux_process_target::supports_tracepoints): ... this.
244 * linux-low.h (class linux_process_target): 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.
249 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
251 Turn process_stratum_target's process_qsupported op into a method
254 * target.h (struct process_stratum_target): Remove the target op.
255 (class process_target): Add the target op.
256 (target_process_qsupported): Update the macro.
257 * target.cc (process_target::process_qsupported): Define.
259 Update the derived classes and callers below.
261 * linux-low.cc (linux_target_ops): Update.
262 (linux_process_qsupported): Turn into ...
263 (linux_process_target::process_qsupported): ... this.
264 * linux-low.h (class linux_process_target): Update.
265 * lynx-low.cc (lynx_target_ops): Update.
266 * nto-low.cc (nto_target_ops): Update.
267 * win32-low.cc (win32_target_ops): Update.
269 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
271 Turn process_stratum_target's read_loadmap op into a method of
274 * target.h (struct process_stratum_target): Remove the target op.
275 (class process_target): Add the target op. Also add
276 'supports_read_loadmap'.
277 * target.cc (process_target::read_loadmap): Define.
278 (process_target::supports_read_loadmap): Define.
280 Update the derived classes and callers below.
282 * server.cc (handle_qxfer_fdpic): Update.
283 (handle_query): Update.
284 * linux-low.cc (linux_target_ops): Update.
285 (linux_process_target::supports_read_loadmap): Define.
286 (linux_read_loadmap): Turn into ...
287 (linux_process_target::read_loadmap): ... this.
288 * linux-low.h (class linux_process_target): Update.
289 * lynx-low.cc (lynx_target_ops): Update.
290 * nto-low.cc (nto_target_ops): Update.
291 * win32-low.cc (win32_target_ops): Update.
293 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
295 Turn process_stratum_target's core_of_thread op into a method of
298 * target.h (struct process_stratum_target): Remove the target op.
299 (class process_target): Add the target op.
300 (target_core_of_thread): Update the macro.
301 * target.cc (process_target::core_of_thread): Define.
303 Update the derived classes and callers below.
305 * linux-low.cc (linux_target_ops): Update.
306 (linux_process_target::core_of_thread): Define.
307 * linux-low.h (class linux_process_target): Update.
308 * lynx-low.cc (lynx_target_ops): Update.
309 * nto-low.cc (nto_target_ops): Update.
310 * win32-low.cc (win32_target_ops): Update.
312 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
314 Turn process_stratum_target's handle_monitor_command op into a
315 method of process_target.
317 * target.h (struct process_stratum_target): Remove the target op.
318 (class process_target): Add the target op.
319 (target_handle_monitor_command): Update the macro.
320 * target.cc (process_target::handle_monitor_command): Define.
322 Update the derived classes and callers below.
324 * server.cc (handle_query): Update.
325 * linux-low.cc (linux_target_ops): Update.
326 (linux_process_target::handle_monitor_command): Define.
327 * linux-low.h (class linux_process_target): Update.
328 * lynx-low.cc (lynx_target_ops): Update.
329 * nto-low.cc (nto_target_ops): Update.
330 * win32-low.cc (win32_target_ops): Update.
332 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
334 Turn process_stratum_target's handle_new_gdb_connection op into a
335 method of process_target.
337 * target.h (struct process_stratum_target): Remove the target op.
338 (class process_target): Add the target op.
339 (target_handle_new_gdb_connection): Update the macro.
340 * target.cc (process_target::handle_new_gdb_connection): Define.
342 Update the derived classes and callers below.
344 * linux-low.cc (linux_target_ops): Update.
345 (linux_handle_new_gdb_connection): Turn into ...
346 (linux_process_target::handle_new_gdb_connection): ... this.
347 * linux-low.h (class linux_process_target): Update.
348 * lynx-low.cc (lynx_target_ops): Update.
349 * nto-low.cc (nto_target_ops): Update.
350 * win32-low.cc (win32_target_ops): Update.
352 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
354 Turn process_stratum_target's supports_fork_events,
355 supports_vfork_events, and supports_exec_events ops into methods
358 * target.h (struct process_stratum_target): Remove the target ops.
359 (class process_target): Add the target ops.
360 (target_supports_fork_events): Update the macro.
361 (target_supports_vfork_events): Update the macro.
362 (target_supports_exec_events): Update the macro.
363 * target.cc (process_target::supports_fork_events): Define.
364 (process_target::supports_vfork_events): Define.
365 (process_target::supports_exec_events): Define.
367 Update the derived classes and callers below.
369 * linux-low.cc (linux_target_ops): Update.
370 (linux_supports_fork_events): Turn into ...
371 (linux_process_target::supports_fork_events): ... this.
372 (linux_supports_vfork_events): Turn into ...
373 (linux_process_target::supports_vfork_events): ... this.
374 (linux_supports_exec_events): Turn into ...
375 (linux_process_target::supports_exec_events): ... this.
376 * linux-low.h (class linux_process_target): Update.
377 * lynx-low.cc (lynx_target_ops): Update.
378 * nto-low.cc (nto_target_ops): Update.
379 * win32-low.cc (win32_target_ops): Update.
381 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
383 Turn process_stratum_target's supports_multi_process op into a
384 method of process_target.
386 * target.h (struct process_stratum_target): Remove the target op.
387 (class process_target): Add the target op.
388 * target.cc (process_target::supports_multi_process): Define.
389 (target_supports_multi_process): Update.
391 Update the derived classes and callers below.
393 * linux-low.cc (linux_target_ops): Update.
394 (linux_supports_multi_process): Turn into ...
395 (linux_process_target::supports_multi_process): ... this.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 * nto-low.cc (nto_target_ops): Update.
399 * win32-low.cc (win32_target_ops): Update.
401 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
403 Turn process_stratum_target's supports_non_stop, async, and
404 start_non_stop ops into methods of process_target.
406 * target.h (struct process_stratum_target): Remove the target ops.
407 (class process_target): Add the target ops.
408 (target_supports_non_stop): Update the macro.
409 (target_async): Update the macro.
410 (start_non_stop): Remove declaration.
411 * target.cc (process_target::supports_non_stop): Define.
412 (process_target::async): Define.
413 (process_target::start_non_stop): Define.
414 (start_non_stop): Remove.
416 Update the derived classes and callers below.
418 * server.cc (handle_qxfer_siginfo): Update.
419 (handle_query): Update.
420 * linux-low.cc (linux_target_ops): Update.
421 (linux_supports_non_stop): Turn into ...
422 (linux_process_target::supports_non_stop): ... this.
423 (linux_async): Turn into ...
424 (linux_process_target::async): ... this.
425 (linux_start_non_stop): Turn into ...
426 (linux_process_target::start_non_stop): ... this.
427 * linux-low.h (class linux_process_target): Update.
428 * lynx-low.cc (lynx_target_ops): Update.
429 * nto-low.cc (nto_target_ops): Update.
430 (nto_supports_non_stop): Remove; rely on the default behavior
432 * win32-low.cc (win32_target_ops): Update.
434 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
436 Turn process_stratum_target's qxfer_siginfo op into a method of
439 * target.h (struct process_stratum_target): Remove the target op.
440 (class process_target): Add the target op. Also add
441 'supports_qxfer_siginfo'.
442 * target.cc (process_target::qxfer_siginfo): Define.
443 (process_target::supports_qxfer_siginfo): Define.
445 Update the derived classes and callers below.
447 * server.cc (handle_qxfer_siginfo): Update.
448 (handle_query): Update.
449 * linux-low.cc (linux_target_ops): Update.
450 (linux_process_target::supports_qxfer_siginfo): Define.
451 (linux_xfer_siginfo): Turn into ...
452 (linux_process_target::qxfer_siginfo): ... this.
453 * linux-low.h (class linux_process_target): Update.
454 * lynx-low.cc (lynx_target_ops): Update.
455 * nto-low.cc (nto_target_ops): Update.
456 * win32-low.cc (win32_target_ops): Update.
458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
460 Turn process_stratum_target's qxfer_osdata op into a method of
463 * target.h (struct process_stratum_target): Remove the target op.
464 (class process_target): Add the target op. Also add
465 'supports_qxfer_osdata'.
466 * target.cc (process_target::qxfer_osdata): Define.
467 (process_target::supports_qxfer_osdata): Define.
469 Update the derived classes and callers below.
471 * server.cc (handle_qxfer_osdata): Update.
472 (handle_query): Update.
473 * linux-low.cc (linux_target_ops): Update.
474 (linux_process_target::supports_qxfer_osdata): Define.
475 (linux_qxfer_osdata): Turn into ...
476 (linux_process_target::qxfer_osdata): ... this.
477 * linux-low.h (class linux_process_target): Update.
478 * lynx-low.cc (lynx_target_ops): Update.
479 * nto-low.cc (nto_target_ops): Update.
480 * win32-low.cc (win32_target_ops): Update.
482 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
484 Turn process_stratum_target's hostio_last_error op into a
485 method of process_target.
487 * target.h (struct process_stratum_target): Remove the target op.
488 (class process_target): Add the target op.
489 * target.cc: Add "hostio.h" to includes.
490 (process_target::hostio_last_error): Define.
492 Update the derived classes and callers below.
494 * hostio.cc (hostio_error): Update.
495 * linux-low.cc: Remove "hostio.h" from includes.
496 (linux_target_ops): Update.
497 * lynx-low.cc (lynx_target_ops): Update.
498 * nto-low.cc (nto_target_ops): Update.
499 * win32-low.h (class win32_process_target): Update.
500 * win32-low.cc (win32_target_ops): Update.
501 (wince_hostio_last_error): Turn into ...
502 (win32_process_target::hostio_last_error): ... this.
504 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
506 Turn process_stratum_target's get_tls_address op into a method of
509 * target.h (struct process_stratum_target): Remove the target op.
510 (class process_target): Add the target op. Also add
511 'supports_get_tls_address'.
512 * target.cc (process_target::get_tls_address): Define.
513 (process_target::supports_get_tls_address): Define.
515 Update the derived classes and callers below.
517 * server.cc (handle_query): Update.
518 * linux-low.cc (linux_target_ops): Update.
519 (linux_process_target::supports_get_tls_address): Define.
520 (linux_process_target::get_tls_address): Define.
521 * linux-low.h (class linux_process_target): Update.
522 * lynx-low.cc (lynx_target_ops): Update.
523 * nto-low.cc (nto_target_ops): Update.
524 * win32-low.cc (win32_target_ops): Update.
526 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
528 Turn process_stratum_target's read_offsets op into a method of
531 * target.h (struct process_stratum_target): Remove the target op.
532 (class process_target): Add the target op. Also add
533 'supports_read_offsets'.
534 * target.cc (process_target::read_offsets): Define.
535 (process_target::supports_read_offsets): Define.
537 Update the derived classes and callers below.
539 * server.cc (handle_query): Update.
540 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
541 (linux_target_ops): Update.
542 (linux_process_target::supports_read_offsets): Define.
543 (linux_read_offsets): Turn into ...
544 (linux_process_target::read_offsets): ... this.
545 * linux-low.h (class linux_process_target): Update.
546 * lynx-low.cc (lynx_target_ops): Update.
547 * nto-low.cc (nto_target_ops): Update.
548 * win32-low.cc (win32_target_ops): Update.
550 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
552 Turn process_stratum_target's stopped_by_watchpoint and
553 stopped_data_address ops into methods of process_target.
555 * target.h (struct process_stratum_target): Remove the target ops.
556 (class process_target): Add the target ops.
557 * target.cc (process_target::stopped_by_watchpoint): Define.
558 (process_target::stopped_data_address): Define.
560 Update the derived classes and callers below.
562 * remote-utils.cc (prepare_resume_reply): Update.
563 * linux-low.cc (linux_target_ops): Update.
564 (linux_stopped_by_watchpoint): Turn into ...
565 (linux_process_target::stopped_by_watchpoint): ... this.
566 (linux_stopped_data_address): Turn into ...
567 (linux_process_target::stopped_data_address): ... this.
568 * linux-low.h (class linux_process_target): Update.
569 * lynx-low.cc (lynx_target_ops): Update.
570 * nto-low.cc (nto_target_ops): Update.
571 (nto_stopped_by_watchpoint): Turn into ...
572 (nto_process_target::stopped_by_watchpoint): ... this.
573 (nto_stopped_data_address): Turn into ...
574 (nto_process_target::stopped_data_address): ... this.
575 * nto-low.h (class nto_process_target): Update.
576 * win32-low.cc (win32_target_ops): Update.
577 (win32_stopped_by_watchpoint): Turn into ...
578 (win32_process_target::stopped_by_watchpoint): ... this.
579 (win32_stopped_data_address): Turn into ...
580 (win32_process_target::stopped_data_address): ... this.
581 * win32-low.h (class win32_process_target): Update.
583 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
585 Turn process_stratum_target's supports_hardware_single_step op into
586 a method of process_target.
588 * target.h (struct process_stratum_target): Remove the target op.
589 (class process_target): Add the target op.
590 (target_supports_hardware_single_step): Update the macro.
591 (target_can_do_hardware_single_step): Remove declaration.
592 * target.cc (process_target::supports_hardware_single_step): Define.
593 (target_can_do_hardware_single_step): Remove.
595 Update the derived classes and callers below.
597 * linux-low.h (class linux_process_target): Update.
598 * linux-low.cc (linux_target_ops): Update.
599 (linux_supports_hardware_single_step): Turn into ...
600 (linux_process_target::supports_hardware_single_step): ... this.
601 * lynx-low.h (class lynx_process_target): Update.
602 * lynx-low.cc (lynx_target_ops): Update.
603 (lynx_process_target::supports_hardware_single_step): Define.
604 * nto-low.h (class nto_process_target): Update.
605 * nto-low.cc (nto_target_ops): Update.
606 (nto_process_target::supports_hardware_single_step): Define.
607 * win32-low.h (class win32_process_target): Update.
608 * win32-low.cc (win32_target_ops): Update.
609 (win32_process_target::supports_hardware_single_step): Define.
611 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
613 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
614 ops into methods of process_target.
616 * target.h (struct process_stratum_target): Remove the target ops.
617 (class process_target): Add the target ops.
618 (target_stopped_by_hw_breakpoint): Update the macro.
619 (target_supports_stopped_by_hw_breakpoint): Update the macro.
620 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
621 (process_target::supports_stopped_by_hw_breakpoint): Define.
623 Update the derived classes and callers below.
625 * linux-low.cc (linux_target_ops): Update.
626 (linux_stopped_by_hw_breakpoint): Turn into ...
627 (linux_process_target::stopped_by_hw_breakpoint): ... this.
628 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
629 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
630 * linux-low.h (class linux_process_target): Update.
631 * lynx-low.cc (lynx_target_ops): Update.
632 * nto-low.cc (nto_target_ops): Update.
633 * win32-low.cc (win32_target_ops): Update.
635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
637 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
638 ops into methods of process_target.
640 * target.h (struct process_stratum_target): Remove the target ops.
641 (class process_target): Add the target ops.
642 (target_stopped_by_sw_breakpoint): Update the macro.
643 (target_supports_stopped_by_sw_breakpoint): Update the macro.
644 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
645 (process_target::supports_stopped_by_sw_breakpoint): Define.
647 Update the derived classes and callers below.
649 * linux-low.cc (linux_target_ops): Update.
650 (linux_stopped_by_sw_breakpoint): Turn into ...
651 (linux_process_target::stopped_by_sw_breakpoint): ... this.
652 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
653 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
654 * linux-low.h (class linux_process_target): Update.
655 * lynx-low.cc (lynx_target_ops): Update.
656 * nto-low.cc (nto_target_ops): Update.
657 * win32-low.cc (win32_target_ops): Update.
659 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
661 Turn process_stratum_target's insert_point and remove_point ops
662 into methods of process_target.
664 * target.h (struct process_stratum_target): Remove the target ops.
665 (class process_target): Add the target ops.
666 * target.cc (process_target::insert_point): Define.
667 (process_target::remove_point): Define.
669 Update the derived classes and callers below.
671 * mem-break.cc (set_raw_breakpoint_at): Update.
672 (delete_raw_breakpoint): Update.
673 (uninsert_raw_breakpoint): Update.
674 (reinsert_raw_breakpoint): Update.
675 * linux-low.cc (linux_target_ops): Update.
676 (linux_insert_point): Turn into ...
677 (linux_process_target::insert_point): ... this.
678 (linux_remove_point): Turn into ...
679 (linux_process_target::remove_point): ... this.
680 * linux-low.h (class linux_process_target): Update.
681 * lynx-low.cc (lynx_target_ops): Update.
682 * nto-low.cc (nto_target_ops): Update.
683 (nto_insert_point): Turn into ...
684 (nto_process_target::insert_point): ... this.
685 (nto_remove_point): Turn into ...
686 (nto_process_target::remove_point): ... this.
687 * nto-low.h (class nto_process_target): Update.
688 * win32-low.cc (win32_target_ops): Update.
689 (win32_insert_point): Turn into ...
690 (win32_process_target::insert_point): ... this.
691 (win32_remove_point): Turn into ...
692 (win32_process_target::remove_point): ... this.
693 * win32-low.h (class win32_process_target): Update.
695 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
697 Turn process_stratum_target's supports_z_point_type op into a
698 method of process_target.
700 * target.h (struct process_stratum_target): Remove the target op.
701 (class process_target): Add the target op.
702 * target.cc (process_target::supports_z_point_type): Define.
704 Update the derived classes and callers below.
706 * mem-break.cc (z_type_supported): Update.
707 * linux-low.cc (linux_target_ops): Update.
708 (linux_supports_z_point_type): Turn into ...
709 (linux_process_target::supports_z_point_type): ... this.
710 * linux-low.h (class linux_process_target): Update.
711 * lynx-low.cc (lynx_target_ops): Update.
712 * nto-low.cc (nto_target_ops): Update.
713 (nto_supports_z_point_type): Turn into ...
714 (nto_process_target::supports_z_point_type): ... this.
715 * nto-low.h (class nto_process_target): Update.
716 * win32-low.cc (win32_target_ops): Update.
717 (win32_supports_z_point_type): Turn into ...
718 (win32_process_target::supports_z_point_type): ... this.
719 * win32-low.h (class win32_process_target): Update.
721 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
723 Turn process_stratum_target's read_auxv op into a method of
726 * target.h (class process_stratum_target): Remove the target op.
727 (struct process_target): Add the target op. Also add
728 'supports_read_auxv'.
729 * target.cc (process_target::read_auxv): Define.
730 (process_target::supports_read_auxv): Define.
732 Update the derived classes and callers below.
734 * server.cc (handle_qxfer_auxv): Update.
735 (handle_query): Update.
736 * linux-low.cc (linux_target_ops): Update.
737 (linux_process_target::supports_read_auxv): Define.
738 (linux_read_auxv): Turn into ...
739 (linux_process_target::read_auxv): ... this.
740 * linux-low.h (class linux_process_target): Update.
741 * lynx-low.cc (lynx_target_ops): Update.
742 * nto-low.cc (nto_target_ops): Update.
743 (nto_process_target::supports_read_auxv): Define.
744 (nto_read_auxv): Turn into ...
745 (nto_process_target::read_auxv): ... this.
746 * nto-low.h (class nto_process_target): Update.
747 * win32-low.cc (win32_target_ops): Update.
749 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
751 Turn process_stratum_target's request_interrupt op into a method of
754 * target.h (struct process_stratum_target): Remove the target op.
755 (class process_target): Add the target op.
757 Update the derived classes and callers below.
759 * remote-utils.cc (putpkt_binary_1): Update.
760 (input_interrupt): Update.
762 * server.cc (handle_v_requests): Update.
763 * linux-low.cc (linux_target_ops): Update.
764 (linux_request_interrupt): Turn into ...
765 (linux_process_target::request_interrupt): ... this.
766 * linux-low.h (class linux_process_target): Update.
767 * lynx-low.cc (lynx_target_ops): Update.
768 (lynx_request_interrupt): Turn into ...
769 (lynx_process_target::request_interrupt): ... this.
770 * lynx-low.h (class lynx_process_target): Update.
771 * nto-low.cc (nto_target_ops): Update.
772 (nto_request_interrupt): Turn into ...
773 (nto_process_target::request_interrupt): ... this.
774 * nto-low.h (class nto_process_target): Update.
775 * win32-low.cc (win32_target_ops): Update.
776 (win32_request_interrupt): Turn into ...
777 (win32_process_target::request_interrupt): ... this.
778 * win32-low.h (class win32_process_target): Update.
780 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
782 Turn process_stratum_target's look_up_symbols op into a method of
785 * target.h (struct process_stratum_target): Remove the target op.
786 (class process_target): Add the target op.
787 * target.cc (process_target::look_up_symbols): Define.
789 Update the derived classes and callers below.
791 * server.cc (handle_query): Update.
792 * linux-low.cc (linux_target_ops): Update.
793 (linux_look_up_symbols): Turn into ...
794 (linux_process_target::look_up_symbols): ... this.
795 * linux-low.h (class linux_process_target): Update.
796 * lynx-low.cc (lynx_target_ops): Update.
797 * nto-low.cc (nto_target_ops): Update.
798 * win32-low.cc (win32_target_ops): Update.
800 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
802 Turn process_stratum_target's read_memory and write_memory
803 ops into methods of process_target.
805 * target.h (struct process_stratum_target): Remove the target ops.
806 (class process_target): Add the target ops.
808 Update the derived classes and callers below.
810 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
811 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
812 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
813 (arm_get_syscall_trapinfo): Update.
814 * linux-cris-low.cc (cris_breakpoint_at): Update.
815 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
816 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
817 * linux-mips-low.cc (mips_breakpoint_at): Update.
818 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
819 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
820 * linux-sh-low.cc (sh_breakpoint_at): Update.
821 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
822 (sparc_store_gregset_from_stack): Update.
823 (sparc_breakpoint_at): Update.
824 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
825 * linux-tile-low.cc (tile_breakpoint_at): Update.
826 * linux-x86-low.cc (x86_breakpoint_at): Update.
827 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
828 * mem-brea.cc (insert_memory_breakpoint): Update.
829 (validate_inserted_breakpoint): Update.
830 * target.cc (read_inferior_memory): Update.
831 (target_write_memory): Update.
832 * linux-low.cc (linux_target_ops): Update.
833 (linux_read_memory): Make a wrapper around the read_memory target
835 (linux_process_target::read_memory): Rename from linux_read_memory.
836 (linux_write_memory): Turn into ...
837 (linux_process_target::write_memory): ... this.
838 * linux-low.h (class linux_process_target): Update.
839 * lynx-low.cc (lynx_target_ops): Update.
840 (lynx_read_memory): Turn into ...
841 (lynx_process_target::read_memory): ... this.
842 (lynx_write_memory): Turn into ...
843 (lynx_process_target::write_memory): ... this.
844 * lynx-low.h (class lynx_process_target): Update.
845 * nto-low.cc (nto_target_ops): Update.
846 (nto_read_memory): Turn into ...
847 (nto_process_target::read_memory): ... this.
848 (nto_write_memory): Turn into ...
849 (nto_process_target::write_memory): ... this.
850 * nto-low.h (class nto_process_target): Update.
851 * win32-low.cc (win32_target_ops): Update.
852 (win32_read_inferior_memory): Turn into ...
853 (win32_process_target::read_memory): ... this.
854 (win32_write_inferior_memory): Turn into ...
855 (win32_process_target::write_memory): ... this.
856 * win32-low.h (class win32_process_target): Update.
858 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
860 Turn process_stratum_target's prepare_to_access_memory and
861 done_accessing_memory ops into methods of process_target.
863 * target.h (struct process_stratum_target): Remove the target ops.
864 (class process_target): Add the target ops.
865 * target.cc (process_target::prepare_to_access_memory): Define.
866 (process_target::done_accessing_memory): Define.
867 (prepare_to_access_memory): Update.
868 (done_accessing_memory): Update.
870 Update the derived classes and callers below.
872 * linux-low.cc (linux_target_ops): Update.
873 (linux_prepare_to_access_memory): Turn into ...
874 (linux_process_target::prepare_to_access_memory): ... this.
875 (linux_done_accessing_memory): Turn into ...
876 (linux_process_target::done_accessing_memory): ... this.
877 * linux-low.h (class linux_process_target): Update.
878 * lynx-low.cc (lynx_target_ops): Update.
879 * nto-low.cc (nto_target_ops): Update.
880 * win32-low.cc (win32_target_ops): Update.
882 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
884 Turn process_stratum_target's fetch_registers and store_registers
885 ops into methods of process_target.
887 * target.h (struct process_stratum_target): Remove the target ops.
888 (class process_target): Add the target ops.
889 (fetch_inferior_registers): Update the macro.
890 (store_inferior_registers): Update the macro.
892 Update the derived classes and callers below.
894 * linux-low.cc (linux_target_ops): Update.
895 (linux_fetch_registers): Turn into ...
896 (linux_process_target::fetch_registers): ... this.
897 (linux_store_registers): Turn into ...
898 (linux_process_target::store_registers): ... this.
899 * linux-low.h (class linux_process_target): Update.
900 * lynx-low.cc (lynx_target_ops): Update.
901 (lynx_fetch_registers): Turn into ...
902 (lynx_process_target::fetch_registers): ... this.
903 (lynx_store_registers): Turn into ...
904 (lynx_process_target::store_registers): ... this.
905 * lynx-low.h (class lynx_process_target): Update.
906 * nto-low.cc (nto_target_ops): Update.
907 (nto_fetch_registers): Turn into ...
908 (nto_process_target::fetch_registers): ... this.
909 (nto_store_registers): Turn into ...
910 (nto_process_target::store_registers): ... this.
911 * nto-low.h (class nto_process_target): Update.
912 * win32-low.cc (win32_target_ops): Update.
913 (win32_fetch_inferior_registers): Turn into ...
914 (win32_process_target::fetch_registers): ... this.
915 (win32_store_inferior_registers): Turn into ...
916 (win32_process_target::store_registers): ... this.
917 * win32-low.h (class win32_process_target): Update.
919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
921 Turn process_stratum_target's wait op into a method of
924 * target.h (struct process_stratum_target): Remove the target op.
925 (class process_target): Add the target op.
927 Update the derived classes and callers below.
929 * target.cc (target_wait): Update.
930 * linux-low.cc (linux_target_ops): Update.
931 (linux_wait): Turn into ...
932 (linux_process_target::wait): ... this.
933 * linux-low.h (class linux_process_target): Update.
934 * lynx-low.cc (lynx_target_ops): Update.
935 (lynx_wait): Turn into ...
936 (lynx_process_target::wait): ... this.
937 * lynx-low.h (class lynx_process_target): Update.
938 * nto-low.cc (nto_target_ops): Update.
939 (nto_wait): Turn into ...
940 (nto_process_target::wait): ... this.
941 * nto-low.h (class nto_process_target): Update.
942 * win32-low.cc (win32_target_ops): Update.
943 (win32_wait): Turn into ...
944 (win32_process_target::wait): ... this.
945 (do_initial_child_stuff): Update.
946 * win32-low.h (class win32_process_target): Update.
948 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
950 Turn process_stratum_target's resume op into a method of
953 * target.h (struct process_stratum_target): Remove the target op.
954 (class process_target): Add the target op.
956 Update the derived classes and callers below.
958 * server.cc (resume): Update.
959 * target.cc (target_stop_and_wait): Update.
960 (target_continue_no_signal): Update.
961 (target_continue): Update.
962 * linux-low.cc (linux_target_ops): Update.
963 (linux_resume): Turn into ...
964 (linux_process_target::resume): ... this.
965 * linux-low.h (class linux_process_target): Update.
966 * lynx-low.cc (lynx_target_ops): Update.
967 (lynx_resume): Turn into ...
968 (lynx_process_target::resume): ... this.
969 * lynx-low.h (class lynx_process_target): Update.
970 * nto-low.cc (nto_target_ops): Update.
971 (nto_resume): Turn into ...
972 (nto_process_target::resume): ... this.
973 * nto-low.h (class nto_process_target): Update.
974 * win32-low.cc (win32_target_ops): Update.
975 (win32_resume): Turn into ...
976 (win32_process_target::resume): ... this.
977 (win32_process_target::detach): Update.
978 (do_initial_child_stuff): Update.
979 * win32-low.h (class win32_process_target): Update.
981 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
983 Turn process_stratum_target's thread_alive op into a method of
986 * target.h (struct process_stratum_target): Remove the target op.
987 (class process_target): Add the target op.
988 (mythread_alive): Update the macro.
990 Update the derived classes and callers below.
992 * linux-low.cc (linux_target_ops): Update.
993 (linux_thread_alive): Turn into ...
994 (linux_process_target::thread_alive): ... this.
995 (wait_for_sigstop): Update.
996 * linux-low.h (class linux_process_target): Update.
997 * lynx-low.cc (lynx_target_ops): Update.
998 (lynx_thread_alive): Turn into ...
999 (lynx_process_target::thread_alive): ... this.
1000 * lynx-low.h (class lynx_process_target): Update.
1001 * nto-low.cc (nto_target_ops): Update.
1002 (nto_thread_alive): Turn into ...
1003 (nto_process_target::thread_alive): ... this.
1004 * nto-low.h (class nto_process_target): Update.
1005 * win32-low.cc (win32_target_ops): Update.
1006 (win32_thread_alive): Turn into ...
1007 (win32_process_target::thread_alive): ... this.
1008 * win32-low.h (class win32_process_target): Update.
1010 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1012 Turn process_stratum_target's join op into a method of
1015 * target.h (struct process_stratum_target): Remove the target op.
1016 (class process_target): Add the target op.
1017 (join_inferior): Update the macro.
1019 Update the derived classes and callers below.
1021 * linux-low.cc (linux_target_ops): Update.
1022 (linux_join): Turn into ...
1023 (linux_process_target::join): ... this.
1024 * linux-low.h (class linux_process_target): Update.
1025 * lynx-low.cc (lynx_target_ops): Update.
1026 (lynx_join): Turn into ...
1027 (lynx_process_target::join): ... this.
1028 * lynx-low.h (class lynx_process_target): Update.
1029 * nto-low.cc (nto_target_ops): Update.
1030 (nto_process_target::join): Define.
1031 * nto-low.h (class nto_process_target): Update.
1032 * win32-low.cc (win32_target_ops): Update.
1033 (win32_join): Turn into ...
1034 (win32_process_target::join): ... this.
1035 * win32-low.h (class win32_process_target): Update.
1037 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1039 Turn process_stratum_target's mourn op into a method of
1042 * target.h (struct process_stratum_target): Remove the target op.
1043 (class process_target): Add the target op.
1045 Update the derived classes and callers below.
1047 * target.cc (target_mourn_inferior): Update.
1048 * linux-low.cc (linux_target_ops): Update.
1049 (linux_mourn): Turn into ...
1050 (linux_process_target::mourn): ... this.
1051 (handle_extended_wait): Update.
1052 (linux_process_target::kill): Update.
1053 (linux_process_target::detach): Update.
1054 * linux-low.h (class linux_process_target): Update.
1055 * lynx-low.cc (lynx_target_ops): Update.
1056 (lynx_mourn): Turn into ...
1057 (lynx_process_target::mourn): ... this.
1058 * lynx-low.h (class lynx_process_target): Update.
1059 * nto-low.cc (nto_target_ops): Update.
1060 (nto_mourn): Turn into ...
1061 (nto_process_target::mourn): ... this.
1062 * nto-low.h (class nto_process_target): Update.
1063 * win32-low.cc (win32_target_ops): Update.
1064 (win32_mourn): Turn into ...
1065 (win32_process_target::mourn): ... this.
1066 * win32-low.h (class win32_process_target): Update.
1068 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1070 Turn process_stratum_target's detach op into a method of
1073 * target.h (struct process_stratum_target): Remove the target op.
1074 (class process_target): Add the target op.
1075 (detach_inferior): Update the macro.
1077 Update the derived classes and callers below.
1079 * linux-low.cc (linux_target_ops): Update.
1080 (linux_detach): Turn into ...
1081 (linux_process_target::detach): ... this.
1082 * linux-low.h (class linux_process_target): Update.
1083 * lynx-low.cc (lynx_target_ops): Update.
1084 (lynx_detach): Turn into ...
1085 (lynx_process_target::detach): ... this.
1086 * lynx-low.h (class lynx_process_target): Update.
1087 * nto-low.cc (nto_target_ops): Update.
1088 (nto_detach): Turn into ...
1089 (nto_process_target::detach): ... this.
1090 * nto-low.h (class nto_process_target): Update.
1091 * win32-low.cc (win32_target_ops): Update.
1092 (win32_detach): Turn into ...
1093 (win32_process_target::detach): ... this.
1094 * win32-low.h (class win32_process_target): Update.
1096 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1098 Turn process_stratum_target's kill op into a method of
1101 * target.h (struct process_stratum_target): Remove the target op.
1102 (class process_target): Add the target op.
1104 Update the derived classes and callers below.
1106 * target.cc (kill_inferior): Update.
1107 * linux-low.cc (linux_target_ops): Update.
1108 (linux_kill): Turn into ...
1109 (linux_process_target::kill): ... this.
1110 * linux-low.h (class linux_process_target): Update.
1111 * lynx-low.cc (lynx_target_ops): Update.
1112 (lynx_kill): Turn into ...
1113 (lynx_process_target::kill): ... this.
1114 * lynx-low.h (class lynx_process_target): Update.
1115 * nto-low.cc (nto_target_ops): Update.
1116 (nto_kill): Turn into ...
1117 (nto_process_target::kill): ... this.
1118 * nto-low.h (class nto_process_target): Update.
1119 * win32-low.cc (win32_target_ops): Update.
1120 (win32_kill): Turn into ...
1121 (win32_process_target::kill): ... this.
1122 * win32-low.h (class win32_process_target): Update.
1124 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1126 Turn process_stratum_target's attach op into a method of
1129 * target.h (struct process_stratum_target): Remove the target op.
1130 (class process_target): Add the target op.
1131 (myattach): Update the macro.
1133 Update the derived classes and callers below.
1135 * linux-low.cc (linux_target_ops): Update.
1136 (linux_attach): Turn into ...
1137 (linux_process_target::attach): ... this.
1138 * linux-low.h (class linux_process_target): Update.
1139 * lynx-low.cc (lynx_target_ops): Update.
1140 (lynx_attach): Turn into ...
1141 (lynx_process_target::attach): ... this.
1142 * lynx-low.h (class lynx_process_target): Update.
1143 * nto-low.cc (nto_target_ops): Update.
1144 (nto_attach): Turn into ...
1145 (nto_process_target::attach): ... this.
1146 * nto-low.h (class nto_process_target): Update.
1147 * win32-low.cc (win32_target_ops): Update.
1148 (win32_attach): Turn into ...
1149 (win32_process_target::attach): ... this.
1150 * win32-low.h (class win32_process_target): Update.
1152 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1154 Turn process_stratum_target's post_create_inferior op into a method
1157 * target.h (struct process_stratum_target): Remove the target op.
1158 (class process_target): Add the target op.
1159 (target_post_create_inferior): Update the macro.
1160 * target.cc (process_target::post_create_inferior): Define.
1162 Update the derived classes and callers below.
1164 * linux-low.cc (linux_target_ops): Update.
1165 (linux_post_create_inferior): Turn into ...
1166 (linux_process_target::post_create_inferior): ... this.
1167 * linux-low.h (class linux_process_target): Update.
1168 * lynx-low.cc (lynx_target_ops): Update.
1169 * nto-low.cc (nto_target_ops): Update.
1170 * win32-low.cc (win32_target_ops): Update.
1172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1174 Turn process_stratum_target's create_inferior op into a method of
1177 * target.h (struct process_stratum_target): Remove the target op.
1178 (class process_target): Add the target op.
1179 (create_inferior): Rename the macro to ...
1180 (target_create_inferior): ... this.
1182 Update the derived classes and callers below.
1184 * server.cc (handle_v_run): Update.
1185 (captured_main): Update.
1186 (process_serial_event): Update.
1187 * linux-low.cc (linux_target_ops): Update.
1188 (linux_create_inferior): Turn into ...
1189 (linux_process_target::create_inferior): ... this.
1190 * linux-low.h (class linux_process_target): Update.
1191 * lynx-low.cc (lynx_target_ops): Update.
1192 (lynx_create_inferior): Turn into ...
1193 (lynx_process_target::create_inferior): ... this.
1194 * lynx-low.h (class lynx_process_target): Update.
1195 * nto-low.cc (nto_target_ops): Update.
1196 (nto_create_inferior): Turn into ...
1197 (nto_process_target::create_inferior): ... this.
1198 * nto-low.h (class nto_process_target): Update.
1199 * win32-low.cc (win32_target_ops): Update.
1200 (win32_create_inferior): Turn into ...
1201 (win32_process_target::create_inferior): ... this.
1202 * win32-low.h (class win32_process_target): Update.
1204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1206 * target.h (class process_target): New class definition.
1207 (struct process_stratum_target) <pt>: New field with type
1209 * linux-low.h (class linux_process_target): Define as a derived
1210 class of 'process_target'.
1211 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1213 * lynx-low.h (class lynx_process_target): Define as a derived
1214 class of 'process_target'.
1215 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1217 * nto-low.h (class nto_process_target): Define as a derived
1218 class of 'process_target'.
1219 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1221 * win32-low.h (class win32_process_target): Define as a derived
1222 class of 'process_target'.
1223 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1226 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1228 * configure: Regenerate.
1230 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1231 Andrew Burgess <andrew.burgess@embecosm.com>
1233 * linux-riscv-low.cc: New file.
1234 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1235 and nat/riscv-linux-tdesc.c.
1236 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1237 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1240 2020-02-14 Tom Tromey <tom@tromey.com>
1242 * acinclude.m4: Don't include acx_configure_dir.m4.
1243 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1244 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1245 (all, install-only, uninstall, clean-info, clean)
1246 (maintainer-clean): Don't recurse.
1247 (subdir_do, all-lib): Remove.
1248 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1250 (generated_files): Update.
1251 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1252 * configure: Rebuild.
1253 * configure.ac: Don't configure gnulib or libiberty.
1256 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1258 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1259 preparing the command line for CreateProcess.
1260 (win32_create_inferior): Reflect the program name in debugging
1261 output that shows the process and its command line.
1263 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1265 * Makefile.in: Rename source files from .c to .cc.
1266 * %.c: Rename to %.cc.
1267 * configure.ac: Rename server.c to server.cc.
1268 * configure: Re-generate.
1270 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1272 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1274 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1276 * win32-low.c (win32_create_inferior): Set signal_pid.
1278 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1279 Pedro Alves <palves@redhat.com>
1281 Skip building gdbserver in a cross-configuration.
1282 * configure.srv: Set $gdbserver_host depending on whether $target
1283 is $host. Use $gdbserver_host instead of $host.
1285 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1287 * configure: Re-generate.
1289 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1291 * configure: Re-generate.
1293 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1295 * acinclude.m4: Update warning.m4 path.
1297 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1299 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1300 (handle_exception): Set siginfo_er.
1301 (win32_xfer_siginfo): New function.
1303 2020-02-07 Tom Tromey <tom@tromey.com>
1304 Pedro Alves <palves@redhat.com>
1306 * README: Update build documentation.
1307 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1309 * configure.ac: Update paths.
1310 * configure: Rebuild.
1311 * acinclude.m4: Update paths.
1312 * Makefile.in: Update include paths.
1313 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1314 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1315 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1316 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1317 (%-generated.c): Update paths.
1318 * Move entire directory from ../gdb/gdbserver.
1320 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1322 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1324 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1326 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1327 assignment instead of srv_linux_obj.
1329 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1331 * server.c (handle_qxfer_libraries): Write segment-address with
1334 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1336 * Makefile.in (install-strip): New target.
1337 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1338 * aclocal.m4: Regenerate.
1339 * configure: Regenerate.
1340 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1342 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1344 * Makefile.in (SFILES): Adjust paths to point to real files.
1345 (OBS): Move waitstatus.o to target/waitstatus.o.
1346 (TAGS): Transform paths appropriately.
1348 (nat/%.o): ... this pattern rule.
1350 (target/%.o): ... this pattern rule.
1351 * configure.srv: Adjust paths throughout to include nat/ prefix
1352 with the revant files.
1353 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1354 * configure: Regenerate.
1356 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1358 * Makefile.in (TAGS): Remove config files from the recipe.
1360 2020-01-14 Tom Tromey <tom@tromey.com>
1362 * configure: Rebuild.
1363 * configure.ac: Remove any checks that were added to common.m4.
1364 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1367 2020-01-14 Tom Tromey <tom@tromey.com>
1369 * server.h: Include config.h.
1370 * gdbreplay.c: Include config.h.
1371 * configure: Rebuild.
1372 * configure.ac: Don't source common.host.
1373 * acinclude.m4: Update path.
1374 * Makefile.in (INCSUPPORT): New variable.
1375 (INCLUDE_CFLAGS): Add INCSUPPORT.
1376 (SFILES): Update paths.
1377 (version-generated.c): Update path to create-version.sh.
1378 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1380 2020-01-14 Tom Tromey <tom@tromey.com>
1382 * configure.ac (LIBS): Use WIN32APILIBS.
1383 (USE_WIN32API): Don't define.
1384 * configure: Rebuild.
1386 2020-01-14 Tom Tromey <tom@tromey.com>
1388 * configure: Rebuild.
1390 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1392 * Makefile.in (%-generated.c): Remove rule for files from
1395 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1397 * configure: Re-generate.
1399 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1401 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1403 * tracepoint.c (stop_tracing, flush_trace_buffer,
1404 about_to_request_buffer_space, get_trace_state_variable_value,
1405 set_trace_state_variable_value, gdb_collect): Add declaration.
1407 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1409 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1410 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1411 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1412 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1413 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1416 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1418 * inferiors.c: Include gdbsupport/common-inferior.h.
1420 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1422 * hostio-errno.c: Include hostio.h.
1424 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1426 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1429 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1431 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1432 * linux-arm-tdesc.h: Include arch/arm.h.
1434 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1436 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1438 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1440 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1441 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1443 2020-01-10 Pedro Alves <palves@redhat.com>
1445 * fork-child.c (post_fork_inferior): Pass target down to
1447 * inferiors.c (switch_to_thread): Add process_stratum_target
1449 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1450 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1451 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1452 * remote-utils.c (prepare_resume_reply): Pass the target to
1454 * target.c (the_target): Now a process_stratum_target.
1455 (done_accessing_memory): Pass the target to switch_to_thread.
1456 (set_target_ops): Ajust to use process_stratum_target.
1457 * target.h (struct target_ops): Rename to ...
1458 (struct process_stratum_target): ... this.
1459 (the_target, set_target_ops): Adjust.
1460 (prepare_to_access_memory): Adjust comment.
1461 * win32-low.c (child_xfer_memory): Adjust to use
1462 process_stratum_target.
1463 (win32_target_ops): Now a process_stratum_target.
1465 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1466 Pedro Alves <palves@redhat.com>
1468 * win32-low.c (get_child_debug_event): Extract the fatal exception
1469 from the exit status and convert to the equivalent Posix signal
1471 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1472 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1474 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1476 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1478 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1480 * server.c (gdbserver_version): Change copyright year to 2020.
1481 * gdbreplay.c (gdbreplay_version): Likewise.
1483 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1485 * configure: Regenerate.
1486 * configure.ac: Quote variable arguments of test.
1488 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1490 * Makefile.in: Fix build with GNU Make 3.81
1492 2019-12-16 Tom Tromey <tromey@adacore.com>
1494 * server.c (get_exec_file): Constify result.
1496 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1498 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1499 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1500 * config.in: Regenerate.
1501 * configure: Regenerate.
1502 * configure.ac: Don't check for strerror.
1503 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1504 Call safe_strerror instead of strerror.
1505 * server.h (strerror): Remove this now-unnecessary declaration.
1506 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1508 (gdb_agent_helper_thread): Likewise.
1509 * utils.c (perror_with_name): Likewise.
1511 2019-11-26 Tom Tromey <tom@tromey.com>
1513 * configure, config.in: Rebuild.
1515 2019-11-26 Tom Tromey <tom@tromey.com>
1517 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1518 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1520 * configure, config.in: Rebuild.
1522 2019-11-26 Tom Tromey <tom@tromey.com>
1524 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1525 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1526 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1527 * acinclude.m4: Include ax_pthread.m4.
1528 * config.in, configure: Rebuild.
1530 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1532 * debug.c (debug_set_output): Call safe_strerror instead of
1534 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1535 (linux_kill_one_lwp): Likewise.
1536 (linux_detach_one_lwp): Likewise.
1537 (linux_wait_for_event_filtered): Likewise.
1538 (store_register): Likewise.
1539 * lynx-low.c (lynx_attach): Likewise.
1540 * mem-break.c (insert_memory_breakpoint): Likewise.
1541 (remove_memory_breakpoint): Likewise.
1542 (delete_fast_tracepoint_jump): Likewise.
1543 (set_fast_tracepoint_jump): Likewise.
1544 (uninsert_fast_tracepoint_jumps_at): Likewise.
1545 (reinsert_fast_tracepoint_jumps_at): Likewise.
1546 * nto-low.c (nto_xfer_memory): Likewise.
1547 (nto_resume): Likewise.
1549 2019-11-20 Luis Machado <luis.machado@linaro.org>
1551 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1552 instead of register count.
1553 * tdesc.c (tdesc_contains_feature): New function.
1554 * tdesc.h (tdesc_contains_feature): New prototype.
1556 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1558 * Makefile.in: Add safe-strerror.c.
1559 * configure: Regenerate.
1560 * configure.ac: Don't source common.host.
1562 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1564 * config.in: Regenerate.
1565 * configure: Regenerate.
1567 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1569 * ax.c (ax_printf): Handle size_t_arg.
1571 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1573 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1574 * mi/mi-main.c (output_cores): Likewise.
1575 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1576 (linux_xfer_osdata_modules): Likewise.
1577 * remote.c (register_remote_support_xml): Likewise.
1578 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1579 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1581 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1583 * configure: Regenerate.
1584 * configure.ac: Remove check for strerror_r.
1586 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1588 * config.in: Regenerate.
1589 * configure: Regenerate.
1590 * configure.ac: Also check for strerror_r.
1592 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1594 * ax.h (debug_agent): Remove duplicate declaration.
1596 2019-10-26 Tom de Vries <tdevries@suse.de>
1598 * linux-aarch64-low.c: Fix typos in comments.
1599 * linux-arm-low.c: Same.
1600 * linux-low.c: Same.
1601 * linux-ppc-low.c: Same.
1602 * proc-service.c: Same.
1605 * tracepoint.c: Same.
1606 * win32-low.c: Same.
1608 2019-10-25 Tom Tromey <tromey@adacore.com>
1610 * utils.c (xstrdup): Remove.
1612 2019-10-23 Tom Tromey <tom@tromey.com>
1614 * configure, config.in: Rebuild.
1616 2019-10-23 Tom Tromey <tom@tromey.com>
1618 * configure: Rebuild.
1619 * acinclude.m4: Use m4_include, not sinclude.
1621 2019-10-17 Tom Tromey <tromey@adacore.com>
1623 * configure: Rebuild.
1624 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1625 in AC_CONFIG_FILES invocation.
1626 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1629 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1631 * server.c: Include xml-builtin.h.
1632 (get_xml_features): Don't declare xml_builtins here.
1634 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1636 * Makefile.in: Remove references to vec-ipa.o.
1638 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1640 * Makefile.in: Remove references to vec.c.
1642 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1644 * server.c (server_waiting): Change to bool.
1645 (extended_protocol): Likewise.
1646 (response_needed): Likewise.
1647 (exit_requested): Likewise.
1648 (run_once): Likewise.
1649 (report_no_resumed): Likewise.
1650 (non_stop): Likewise.
1651 (disable_packet_vCont): Likewise.
1652 (disable_packet_Tthread): Likewise.
1653 (disable_packet_qC): Likewise.
1654 (disable_packet_qfThreadInfo): Likewise.
1655 (handle_general_set): Update.
1656 (handle_detach): Update.
1657 (handle_monitor_command): Update.
1658 (handle_query): Update.
1659 (captured_main): Update.
1660 (process_serial_event): Update.
1661 * server.h (server_waiting): Change to bool.
1662 (disable_packet_vCont): Likewise.
1663 (disable_packet_Tthread): Likewise.
1664 (disable_packet_qC): Likewise.
1665 (disable_packet_qfThreadInfo): Likewise.
1666 (run_once): Likewise.
1667 (non_stop): Likewise.
1668 * target.c (target_stop_and_wait): Update.
1670 2019-10-02 Tom Tromey <tromey@adacore.com>
1672 * Makefile.in (SFILES): Add common-inferior.c.
1673 (OBS): Add common-inferior.o.
1674 * server.c (startup_with_shell): Don't define.
1676 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1678 * linux-low.c (linux_low_read_btrace): Update for change to
1681 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1683 * debug.c (debug_threads): Remove comment in favor of the header.
1684 * debug.h (using_threads): Add declaration.
1685 (debug_threads): Add comment.
1686 * linux-aarch64-low.c: Include debug.h and remove declaration of
1688 * nto-low.c: Likewise.
1689 * remote-utils.c: Likewise.
1690 * thread-db.c: Likewise.
1692 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1694 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1695 and powerpc-cell64l-ipa.o.
1696 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1697 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1698 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1701 * spu-low.c: Remove file.
1703 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1704 (parse_spufs_run): Remove.
1705 (ppc_get_pc): Remove Cell/B.E. support.
1706 (ppc_set_pc): Likewise.
1707 (ppc_breakpoint_at): Likewise.
1708 (ppc_arch_setup): Likewise.
1709 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1710 tdesc_powerpc_cell32l.
1711 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1712 or init_registers_powerpc_cell32l.
1713 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1714 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1715 or init_registers_powerpc_cell32l.
1716 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1717 (init_registers_powerpc_cell32l): Remove prototype.
1718 (init_registers_powerpc_cell64l): Likewise.
1720 * target.h (struct target_ops): Remove qxfer_spu member.
1721 * server.c (handle_qxfer_spu): Remove.
1722 (qxfer_packets): Remove entry for "spu".
1723 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1724 * linux-low.c (SPUFS_MAGIC): Remove.
1725 (spu_enumerate_spu_ids): Remove.
1726 (linux_qxfer_spu): Remove.
1727 (linux_target_ops): Remove qxfer_spu member.
1728 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1729 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1730 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1732 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1734 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1735 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1736 * config.in: Regenerate.
1737 * configure: Regenerate.
1739 2019-08-15 Tom Tromey <tromey@adacore.com>
1741 * target.c (target_write_memory): Use gdb::byte_vector.
1743 2019-08-15 Tom Tromey <tromey@adacore.com>
1745 * tracepoint.c (write_inferior_data_pointer)
1746 (write_inferior_integer, write_inferior_int8)
1747 (write_inferior_uinteger, m_tracepoint_action_download)
1748 (r_tracepoint_action_download, x_tracepoint_action_download)
1749 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1750 (download_agent_expr, download_tracepoint_1)
1751 (download_trace_state_variables, upload_fast_traceframes): Update.
1752 * server.c (gdb_write_memory): Update.
1753 * remote-utils.c (relocate_instruction): Update.
1754 * proc-service.c (ps_pdwrite): Update.
1755 * mem-break.c (remove_memory_breakpoint)
1756 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1757 (uninsert_fast_tracepoint_jumps_at)
1758 (reinsert_fast_tracepoint_jumps_at): Update.
1759 * linux-x86-low.c (append_insns)
1760 (i386_install_fast_tracepoint_jump_pad)
1761 (amd64_write_goto_address, i386_write_goto_address): Update.
1762 * linux-s390-low.c (append_insns, s390_write_goto_address):
1764 * linux-ppc-low.c (ppc_relocate_instruction)
1765 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1766 (ppc_write_goto_address): Update.
1767 * linux-aarch64-low.c (append_insns): Update.
1768 * target.h (struct target_ops): Update.
1769 (write_inferior_memory): Don't declare.
1770 * target.c (target_write_memory): Rename from
1771 write_inferior_memory. Remove old target_write_memory.
1773 2019-08-15 Tom Tromey <tromey@adacore.com>
1775 * target.c (write_inferior_memory): Use std::vector.
1777 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1780 * configure.ac: Drop enable-libmcheck support.
1781 * configure, config.in: Rebuild.
1782 * acinclude.m4: Don't include it.
1784 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1786 * configure.srv: Remove Arm xml files.
1788 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1790 * configure.srv: Add new files. Remove xml generated files.
1791 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1793 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1794 * linux-aarch32-tdesc.c: New file.
1795 * linux-aarch32-tdesc.h: New file.
1796 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1797 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1798 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1799 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1800 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1801 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1802 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1803 (arm_read_description): Call arm_linux_read_description.
1804 (initialize_low_arch): Don't init registers.
1805 * linux-arm-tdesc.c: New file.
1806 * linux-arm-tdesc.h: New file.
1808 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1810 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1811 Move counter inside for.
1812 (arm_read_description): Check ptrace earlier.
1813 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1815 2019-07-09 Tom Tromey <tom@tromey.com>
1817 * configure: Rebuild.
1818 * configure.ac: Change common to gdbsupport.
1819 * acinclude.m4: Change common to gdbsupport.
1820 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1821 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1822 common to gdbsupport.
1823 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1824 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1825 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1826 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1827 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1828 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1829 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1830 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1831 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1832 common to gdbsupport.
1834 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1836 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1838 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1840 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1842 * configure.srv: Remove legacy xml.
1843 * linux-aarch64-low.c (initialize_low_arch): Remove
1844 initialize_low_tdesc call.
1845 * linux-aarch64-tdesc-selftest.c: Remove file.
1846 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1847 * linux-x86-low.c (initialize_low_arch): Remove
1848 initialize_low_tdesc call.
1849 * linux-x86-tdesc-selftest.c: Remove file.
1850 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1852 2019-06-20 Tom de Vries <tdevries@suse.de>
1854 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1855 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1857 2019-06-19 Tom de Vries <tdevries@suse.de>
1859 * debug.h (debug_write): Change return type to ssize_t.
1860 * debug.c (debug_write): Same.
1862 2019-06-14 Tom Tromey <tom@tromey.com>
1864 * configure.ac: Use new path to gnulib.
1865 * configure: Rebuild.
1866 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1869 2019-06-11 Tom Tromey <tom@tromey.com>
1871 * Makefile.in (SFILES): Add alloc.c.
1873 (IPA_OBJS): Add alloc-ipa.o.
1874 (alloc-ipa.o): New target.
1875 (%.o: ../%.c): New pattern rule.
1877 2019-06-10 Tom Tromey <tromey@adacore.com>
1879 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1880 end warning with a newline.
1881 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1883 * thread-db.c (attach_thread): Don't end warning with a newline.
1884 (thread_db_notice_clone): Likewise.
1885 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1887 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1888 end warning with a newline.
1890 2019-06-04 Pedro Alves <palves@redhat.com>
1892 * server.c (captured_main): Use make_unique_xstrdup.
1894 2019-06-02 Tom Tromey <tom@tromey.com>
1896 * gdbreplay.c (fromhex): Remove.
1897 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1899 2019-05-29 Tom Tromey <tromey@adacore.com>
1901 * configure: Rebuild.
1903 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1905 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1906 sign extension code on 32-bit builds.
1908 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1911 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1913 2019-04-19 Tom Tromey <tom@tromey.com>
1915 * server.c (struct vstop_notif): Derive from notif_event.
1917 (queue_stop_reply): Update.
1918 (remove_all_on_match_ptid): Change type. Rewrite.
1919 (discard_queued_stop_replies): Rewrite.
1920 (in_queued_stop_replies_ptid): Change type.
1921 (in_queued_stop_replies): Rewrite.
1922 (notif_stop): Update.
1923 (queue_stop_reply_callback): Update.
1924 (captured_main): Don't call initialize_notif.
1925 (push_stop_notification): Update.
1926 * notif.c (notif_write_event, handle_notif_ack)
1927 (notif_event_enque, notif_push): Update.
1928 (notif_event_xfree, initialize_notif): Remove.
1929 * notif.h (struct notif_event): Include <list>, not
1931 (struct notif_server) <queue>: Now a std::list.
1932 (notif_event_p): Remove typedef.
1933 (initialize_notif): Don't declare.
1934 (struct notif_event): Add virtual destructor.
1936 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1938 * ax.c (ax_vdebug): Call debug_printf.
1939 * debug.c (debug_write): New function.
1940 * debug.h (debug_write): New declaration.
1941 * linux-low.c (sigchld_handler): Call debug_write.
1943 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1945 * debug.c (debug_set_output): New function.
1946 (debug_vprintf): Send output to debug_file.
1947 (debug_flush): Likewise.
1948 * debug.h (debug_set_output): New declaration.
1949 * server.c (handle_monitor_command): Add debug-file option.
1950 (captured_main): Likewise.
1952 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1954 * debug.c (remote_debug): Add definition.
1955 * debug.h (remote_debug): Add declaration.
1956 * hostio.c (remote_debug): Remove declaration.
1957 * remote-utils.c (struct ui_file): Likewise.
1958 (remote_debug): Likewise.
1959 * remote-utils.h (remote_debug): Likewise,
1960 * server.c (remote_debug): Remove definition.
1962 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1964 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1965 when using a 64-bit gdbserver.
1967 2019-04-09 Tom Tromey <tromey@adacore.com>
1969 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1971 2019-04-08 Tom Tromey <tom@tromey.com>
1973 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1975 (linux_resume_one_lwp): Likewise.
1977 2019-04-08 Tom Tromey <tom@tromey.com>
1979 * gdbreplay.c: Update.
1980 * linux-low.c: Update.
1983 2019-04-08 Tom Tromey <tom@tromey.com>
1985 * server.c: Use C++ exception handling.
1986 * linux-low.c: Use C++ exception handling.
1987 * gdbreplay.c: Use C++ exception handling.
1989 2019-04-08 Tom Tromey <tom@tromey.com>
1991 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1992 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1993 (captured_main, main): Update.
1994 * gdbreplay.c (main): Update.
1996 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1998 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1999 value in argument pointer, return 1 if the entry is found and 0
2000 otherwise. Move comment.
2001 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2002 * linux-low.h (linux_get_auxv): Declare.
2003 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2005 2019-04-05 Tom Tromey <tromey@adacore.com>
2007 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2010 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2012 * linux-low.c (AT_HWCAP2): Add define if not already included.
2014 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2016 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2017 (aarch64_arch_setup): Call linux_get_hwcap.
2018 * linux-arm-low.c (arm_get_hwcap): Remove function.
2019 (arm_read_description): Call linux_get_hwcap.
2020 * linux-low.c (linux_get_auxv): New function.
2021 (linux_get_hwcap): Likewise.
2022 (linux_get_hwcap2): Likewise.
2023 * linux-low.h (linux_get_hwcap): New declaration.
2024 (linux_get_hwcap2): Likewise.
2025 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2026 (ppc_arch_setup): Call linux_get_hwcap.
2027 * linux-s390-low.c (s390_get_hwcap): Remove function.
2028 (s390_arch_setup): Call linux_get_hwcap.
2030 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2031 Jiong Wang <jiong.wang@arm.com>
2033 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2034 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2036 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2038 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2039 Jiong Wang <jiong.wang@arm.com>
2041 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2042 (aarch64_get_hwcap): New function.
2043 (aarch64_arch_setup): Read APIA hwcap.
2045 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2046 Jiong Wang <jiong.wang@arm.com>
2048 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2049 (initialize_low_tracepoint): Likewise.
2050 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2051 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2052 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2053 (aarch64_linux_read_description): Likewise.
2054 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2056 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2058 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2059 i386_create_target_description for 'segments' parameter.
2060 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2061 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2062 * win32-i386-low.c (i386_arch_setup): Likewise.
2064 2019-03-12 Tom Tromey <tromey@adacore.com>
2066 * linux-low.c (iterate_over_lwps): Update.
2068 2019-03-06 Tom Tromey <tom@tromey.com>
2070 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2071 (captured_main): Use SCOPE_EXIT.
2073 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2075 * configure.srv: Use '$enable_unittest' instead of '$development'
2076 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2079 2019-02-27 Tom Tromey <tromey@adacore.com>
2081 * gdbreplay.c (logchar): Handle \r\n.
2083 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2085 * linux-low.c (linux_attach): Add process before lwp.
2086 * server.c (attach_inferior): Check if already attached.
2088 2019-02-07 Tom Tromey <tom@tromey.com>
2090 * x86-tdesc.h: Rename include guard.
2091 * x86-low.h: Add include guard.
2092 * wincecompat.h: Rename include guard.
2093 * win32-low.h: Add include guard.
2094 * utils.h: Rename include guard.
2095 * tracepoint.h: Rename include guard.
2096 * tdesc.h: Rename include guard.
2097 * target.h: Rename include guard.
2098 * server.h: Rename include guard.
2099 * remote-utils.h: Rename include guard.
2100 * regcache.h: Rename include guard.
2101 * nto-low.h: Rename include guard.
2102 * notif.h: Add include guard.
2103 * mem-break.h: Rename include guard.
2104 * lynx-low.h: Add include guard.
2105 * linux-x86-tdesc.h: Add include guard.
2106 * linux-s390-tdesc.h: Add include guard.
2107 * linux-ppc-tdesc-init.h: Add include guard.
2108 * linux-low.h: Add include guard.
2109 * linux-aarch64-tdesc.h: Add include guard.
2110 * linux-aarch32-low.h: Add include guard.
2111 * inferiors.h: Rename include guard.
2112 * i387-fp.h: Rename include guard.
2113 * hostio.h: Rename include guard.
2114 * gdbthread.h: Rename include guard.
2115 * gdb_proc_service.h: Rename include guard.
2116 * event-loop.h: Rename include guard.
2117 * dll.h: Rename include guard.
2118 * debug.h: Rename include guard.
2119 * ax.h: Rename include guard.
2121 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2124 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2125 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2127 2019-01-25 Tom Tromey <tom@tromey.com>
2129 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2131 2019-01-25 Tom Tromey <tom@tromey.com>
2133 * win32-low.c: Fix common/ includes.
2134 * win32-i386-low.c: Fix common/ includes.
2135 * tracepoint.c: Fix common/ includes.
2136 * thread-db.c: Fix common/ includes.
2137 * target.h: Fix common/ includes.
2138 * symbol.c: Fix common/ includes.
2139 * spu-low.c: Fix common/ includes.
2140 * server.h: Fix common/ includes.
2141 * server.c: Fix common/ includes.
2142 * remote-utils.c: Fix common/ includes.
2143 * regcache.h: Fix common/ includes.
2144 * regcache.c: Fix common/ includes.
2145 * nto-x86-low.c: Fix common/ includes.
2146 * notif.h: Fix common/ includes.
2147 * mem-break.h: Fix common/ includes.
2148 * lynx-low.c: Fix common/ includes.
2149 * lynx-i386-low.c: Fix common/ includes.
2150 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2151 * linux-x86-low.c: Fix common/ includes.
2152 * linux-low.c: Fix common/ includes.
2153 * inferiors.h: Fix common/ includes.
2154 * i387-fp.c: Fix common/ includes.
2155 * hostio.c: Fix common/ includes.
2156 * hostio-errno.c: Fix common/ includes.
2157 * gdbthread.h: Fix common/ includes.
2158 * gdbreplay.c: Fix common/ includes.
2159 * fork-child.c: Fix common/ includes.
2160 * event-loop.c: Fix common/ includes.
2162 (enum gdb_agent_op): Fix common/ includes.
2164 2019-01-21 Tom Tromey <tom@tromey.com>
2166 * tracepoint.c: Fix includes.
2167 * remote-utils.c: Fix includes.
2168 * linux-x86-low.c: Fix includes.
2170 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2172 * gdbreplay.c (gdbreplay_version): Update copyright year in
2174 * server.c (gdbserver_version): Likewise.
2176 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2178 * linux-low.c (add_lwp): Switch ordering.
2180 2018-11-29 Tom Tromey <tom@tromey.com>
2182 * win32-low.c (win32_join): Take pid, not process.
2183 * target.h (struct target_ops) <join>: Change argument type.
2184 (join_inferior): Change argument name.
2185 * spu-low.c (spu_join): Take pid, not process.
2186 * server.c (handle_detach): Preserve pid before destroying
2188 * lynx-low.c (lynx_join): Take pid, not process.
2189 * linux-low.c (linux_join): Take pid, not process.
2191 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2193 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2194 (aarch64_cannot_fetch_register): Likewise.
2195 (struct linux_target_ops): Update references.
2197 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2199 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2201 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2203 * configure.srv (ipa_ppc_linux_regobj): Add
2204 powerpc-isa207-htm-vsx32l-ipa.o and
2205 powerpc-isa207-htm-vsx64l-ipa.o.
2206 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2207 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2208 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2209 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2210 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2211 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2212 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2213 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2214 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2215 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2216 (init_registers_powerpc_isa207_htm_vsx32l)
2217 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2218 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2219 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2220 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2221 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2222 (ppc_store_tm_ctarregset): New functions.
2223 (ppc_regsets): Add entries for HTM regsets.
2224 (ppc_arch_setup): Set htm in features struct when needed. Set
2225 sizes for the HTM regsets.
2226 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2227 (initialize_low_arch): Call
2228 init_registers_powerpc_isa207_htm_vsx32l and
2229 init_registers_powerpc_isa207_htm_vsx64l.
2230 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2231 PPC_TDESC_ISA207_HTM_VSX.
2232 (initialize_low_tracepoint): Call
2233 init_registers_powerpc_isa207_htm_vsx32l and
2234 init_registers_powerpc_isa207_htm_vsx64l.
2236 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2238 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2239 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2240 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2241 (ppc_store_pmuregset): New functions.
2242 (ppc_regsets): Add entries for ebb and pmu regsets.
2243 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2244 pmu regsets are available. Set sizes for these regsets.
2246 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2248 * configure.srv (ipa_ppc_linux_regobj): Add
2249 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2250 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2251 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2252 rs6000/powerpc-isa207-vsx32l.xml, and
2253 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2254 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2255 <PPC_TDESC_ISA207_VSX>: New enum value.
2256 (init_registers_powerpc_isa207_vsx32l): Declare.
2257 (init_registers_powerpc_isa207_vsx64l): Declare.
2258 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2259 (ppc_store_tarregset): New function.
2260 (ppc_regsets): Add entry for the TAR regset.
2261 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2262 size for the TAR regsets.
2263 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2264 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2265 and init_registers_powerpc_isa207_vsx64l.
2266 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2267 (initialize_low_tracepoint): Call
2268 init_registers_powerpc_isa207_vsx32l and
2269 init_registers_powerpc_isa207_vsx64l.
2271 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2272 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2274 * configure.srv (ipa_ppc_linux_regobj): Add
2275 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2276 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2277 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2278 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2279 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2280 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2281 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2282 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2283 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2284 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2285 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2286 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2287 (ppc_hwcap): Add comment.
2288 (ppc_hwcap2): New global.
2289 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2290 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2291 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2292 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2293 when needed. Set sizes for the the DSCR and PPR regsets.
2294 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2295 (initialize_low_arch): Call
2296 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2297 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2298 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2299 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2300 (initialize_low_tracepoint): Call
2301 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2302 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2304 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2306 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2308 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2309 Simon Marchi <simark@simark.ca>
2311 * acinclude.m4: Include "../selftest.m4".
2312 * configure: Regenerate.
2313 * configure.ac: Use "GDB_AC_SELFTEST".
2314 * configure.srv: Use "$enable_unittests" instead of
2315 "$development" when checking whether unit tests have been
2317 * server.c (captured_main): Update message informing that
2318 selftests have been disabled.
2320 2018-10-04 Tom Tromey <tom@tromey.com>
2322 * configure: Rebuild.
2324 2018-10-04 Tom Tromey <tom@tromey.com>
2326 * server.c (handle_status): Rename inner "thread".
2327 (process_serial_event): Declare "res" in 'm' case.
2328 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2329 (iterate_over_lwps): Rename inner "thread".
2330 (linux_qxfer_libraries_svr4): Rename inner "len".
2331 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2333 2018-10-01 Gary Benson <gbenson@redhat.com>
2335 * gdb_proc_service.h: Moved common code to
2336 common/gdb_proc_service.h.
2338 2018-10-01 Gary Benson <gbenson@redhat.com>
2340 * gdb_proc_service.h: Synchronize comments and whitespace with
2341 GDB's version of this file.
2343 2018-09-25 Tom Tromey <tom@tromey.com>
2345 * configure: Rebuild.
2346 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2348 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2350 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2351 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2352 ($(IPA_LIB)): Sort IPA_OBJS.
2354 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2356 * Makefile.in: Remove references to $(ADD_DEPS).
2358 2018-09-16 Tom Tromey <tom@tromey.com>
2360 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2362 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2365 2018-09-05 Tom Tromey <tom@tromey.com>
2367 * configure: Rebuild.
2369 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2372 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2374 2018-08-27 Tom Tromey <tom@tromey.com>
2377 * configure: Rebuild.
2379 2018-08-27 Tom Tromey <tom@tromey.com>
2381 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2382 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2383 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2384 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2385 (s390x_emit_stack_adjust): Add casts to unsigned char.
2387 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2391 * server.h (struct client_state) <disable_randomization>:
2394 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2396 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2398 (mips_supply_ptrace_register): Likewise.
2400 2018-07-22 Tom Tromey <tom@tromey.com>
2402 * configure: Rebuild.
2404 2018-07-22 Tom Tromey <tom@tromey.com>
2406 * win32-low.c (win32_create_inferior): Remove unused variables.
2407 * gdbreplay.c (remote_open): Remove unused variable.
2408 * remote-utils.c (remote_prepare): Remove unused variable.
2409 * x86-tdesc.h (X86_TDESC_H): Define.
2410 (amd64_expedite_regs): Define conditionally.
2411 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2412 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2413 * remote-utils.c (readchar): Remove unused variable.
2415 2018-07-13 Pedro Alves <palves@redhat.com>
2417 * linux-low.c (linux_kill): Change parameter to process_info
2418 pointer instead of pid. Adjust.
2419 * lynx-low.c (lynx_kill): Likewise.
2420 * nto-low.c (nto_kill): Likewise.
2421 * spu-low.c (spu_kill): Likewise.
2422 * win32-low.c (win32_kill): Likewise.
2423 * server.c (handle_v_kill, kill_inferior_callback)
2424 (detach_or_kill_for_exit): Adjust.
2425 * target.c (kill_inferior): Change parameter to process_info
2426 pointer instead of pid. Adjust.
2427 * target.h (struct target_ops) <kill>: Change parameter to
2428 process_info pointer instead of pid. Adjust all implementations
2430 (kill_inferior): Likewise.
2432 2018-07-13 Pedro Alves <palves@redhat.com>
2434 * linux-low.c (linux_detach, linux_join): Change parameter to
2435 process_info pointer instead of pid. Adjust.
2436 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2437 * nto-low.c (nto_detach): Likewise.
2438 * spu-low.c (spu_detach, spu_join): Likewise.
2439 * win32-low.c (win32_detach, win32_join): Likewise.
2440 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2441 * target.h (struct target_ops) <detach, join>: Change parameter to
2442 process_info pointer instead of pid. Adjust all implementations
2444 (detach_inferior, join_inferior): Rename 'pid' parameter to
2447 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2448 Jan Kratochvil <jan.kratochvil@redhat.com>
2449 Paul Fertser <fercerpav@gmail.com>
2450 Tsutomu Seki <sekiriki@gmail.com>
2452 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2453 (OBS): Add 'common/netstuff.o'.
2454 (GDBREPLAY_OBS): Likewise.
2455 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2456 (remote_open): Implement support for IPv6
2458 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2460 (handle_accept_event): Accept connections from IPv6 sources.
2461 (remote_prepare): Handle IPv6-style hostnames; implement
2462 support for IPv6 connections.
2463 (remote_open): Implement support for printing connections from
2466 2018-07-11 Pedro Alves <palves@redhat.com>
2469 * mem-break.c (any_persistent_commands): Add process_info
2470 parameter and use it instead of relying on the current process.
2471 Change return type to bool.
2472 * mem-break.h (any_persistent_commands): Add process_info
2473 parameter and change return type to bool.
2474 * server.c (handle_detach): Remove require_running_or_return call.
2475 Look up the process_info for the process we're about to detach.
2476 If not found, return back error to GDB. Adjust
2477 any_persistent_commands call to pass down a process pointer.
2479 2018-07-11 Pedro Alves <palves@redhat.com>
2481 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2482 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2483 instead of collect_register_by_name.
2484 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2485 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2487 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2488 Pedro Alves <palves@redhat.com>
2490 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2492 2018-07-03 Tom Tromey <tom@tromey.com>
2494 * linux-low.c: Update.
2495 * lynx-low.c: Update.
2496 * mem-break.c: Update.
2497 * nto-low.c: Update.
2498 * remote-utils.c: Update.
2500 * spu-low.c: Update.
2502 * win32-low.c: Update.
2504 2018-07-03 Tom Tromey <tom@tromey.com>
2508 2018-07-03 Tom Tromey <tom@tromey.com>
2510 * linux-low.c: Update.
2512 2018-07-03 Tom Tromey <tom@tromey.com>
2516 2018-07-03 Tom Tromey <tom@tromey.com>
2518 * linux-low.c: Update.
2519 * linux-mips-low.c: Update.
2520 * lynx-low.c: Update.
2521 * nto-low.c: Update.
2522 * remote-utils.c: Update.
2524 * spu-low.c: Update.
2526 * thread-db.c: Update.
2528 2018-07-03 Tom Tromey <tom@tromey.com>
2530 * linux-low.c: Update.
2531 * linux-mips-low.c: Update.
2532 * lynx-low.c: Update.
2533 * mem-break.c: Update.
2534 * nto-low.c: Update.
2535 * remote-utils.c: Update.
2537 * spu-low.c: Update.
2539 * tracepoint.c: Update.
2541 2018-07-03 Tom Tromey <tom@tromey.com>
2543 * linux-low.c: Update.
2544 * linux-ppc-low.c: Update.
2545 * linux-x86-low.c: Update.
2546 * proc-service.c: Update.
2548 * spu-low.c: Update.
2549 * thread-db.c: Update.
2550 * win32-low.c: Update.
2552 2018-07-03 Tom Tromey <tom@tromey.com>
2554 * linux-low.c: Update.
2555 * lynx-low.c: Update.
2556 * nto-low.c: Update.
2557 * remote-utils.c: Update.
2558 * spu-low.c: Update.
2559 * thread-db.c: Update.
2560 * win32-low.c: Update.
2562 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2564 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2565 parameter in call to 'amd64_create_target_description'.
2567 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2569 * x86-tdesc.h: Remove executable permission flag.
2571 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2573 * configure.ac: Remove AC_PREREQ, add missing quoting.
2574 * configure: Re-generate.
2575 * config.in: Re-generate.
2576 * aclocal.m4: Re-generate.
2578 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2580 * tracepoint.h (current_traceframe): Remove declaration.
2582 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2584 * linux-aarch64-low.c (is_sve_tdesc): New function.
2585 (aarch64_sve_regs_copy_to_regcache): Likewise.
2586 (aarch64_sve_regs_copy_from_regcache): Likewise.
2587 (aarch64_regs_info): Add SVE checks.
2588 (initialize_low_arch): Initialize SVE.
2590 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2592 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2594 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2596 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2597 (initialize_low_tracepoint): Likewise
2598 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2599 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2601 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2603 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2605 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2607 * server.h (PBUFSIZ): Increase size
2609 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2611 * regcache.c (regcache::raw_compare): New function.
2612 * regcache.h (regcache::raw_compare): New declaration.
2614 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2616 * regcache.c (new_register_cache): Use new.
2617 (free_register_cache): Use delete.
2618 (register_data): Use const.
2619 (supply_register): Move body inside regcache.
2620 (regcache::raw_supply): New override function.
2621 (collect_register): Move body inside regcache.
2622 (regcache::raw_collect): New override function.
2623 (regcache::get_register_status): New override function.
2624 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2626 2018-06-09 Tom Tromey <tom@tromey.com>
2628 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2630 (event_queue): Use std::queue.
2631 (gdb_event_xfree): Remove.
2632 (initialize_event_loop, process_event, wait_for_event): Update.
2634 2018-06-08 Stan Cox <scox@redhat.com>
2636 * win32-low.c (win32_create_inferior): last_ptid and last_status
2637 moved to client_state.
2639 2018-06-08 Pedro Alves <palves@redhat.com>
2641 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2642 common/common-exceptions.o, common/common-utils.o,
2643 common/errors.o, common/print-utils.o and utils.o.
2644 * gdbreplay.c: Include "common-defs.h" instead of the two
2645 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2646 string.h or alloca.h.
2647 (perror_with_name): Delete.
2648 (remote_open): Use xstrdup instead of strdup.
2649 (main): Rename to ...
2650 (captured_main): ... this.
2653 2018-06-08 Tom Tromey <tom@tromey.com>
2655 * linux-low.c (linux_low_read_btrace): Update.
2657 2018-06-04 Stan Cox <scox@redhat.com>
2659 * server.h (struct client_state): New.
2660 * server.c (cont_thread, general_thread, multi_process)
2661 (report_fork_events, report_vfork_events, report_exec_events)
2662 (report_thread_events, swbreak_feature, hwbreak_feature)
2663 (vCont_supported, disable_randomization, pass_signals)
2664 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2665 Moved to client_state.
2666 * remote-utils.c (remote_debug, noack_mode)
2667 (transport_is_reliable): Moved to client_state.
2668 * tracepoint.c (current_traceframe): Moved to client_state.
2671 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2672 linux-low.c, remote-utils.h, target.c: Use client_state.
2674 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2676 * configure.srv: Add new c/h file.
2678 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2680 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2683 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2685 * gdb.arch/mips-fpregset-core.exp: New test.
2686 * gdb.arch/mips-fpregset-core.c: New test source.
2688 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2691 * hostio.c (require_int): Do not report overflow for integers
2692 between 0xfffffff and 0x7fffffff.
2694 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2696 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2697 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2698 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2700 (the_low_target): Wire them.
2702 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2704 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2705 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2706 mode. Call collect_register_by_name with vscr using
2707 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2708 (ppc_store_vrregset): Add and set vscr_offset variable as in
2709 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2712 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2714 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2715 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2716 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2718 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2720 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2721 (ppc_store_vsxregset): Likewise.
2722 (ppc_fill_vrregset): Likewise.
2723 (ppc_store_vrregset): Likewise.
2724 (ppc_fill_evrregset): Likewise.
2725 (ppc_store_evrregset): Likewise.
2726 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2727 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2730 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2732 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2733 wordsize of the inferior. Call ppc_linux_target_wordsize.
2735 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2737 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2738 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2739 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2740 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2741 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2742 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2743 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2744 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2745 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2746 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2747 (tdesc_powerpc_e500l): Remove.
2748 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2749 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2750 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2751 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2753 (ppc_arch_setup): Remove target description matching code. Fill a
2754 ppc_linux_features struct and call ppc_linux_match_description
2757 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2759 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2760 width of the requested register exceeds the width of the
2762 (mips_cannot_store_register): Likewise.
2764 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2766 * linux-mips-low.c (mips_fetch_register): New function. Update
2768 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2769 (the_low_target): Wire `mips_fetch_register'.
2771 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2773 * lynx-i386-low.c (LYNXOS_178): New macro.
2774 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2775 the layout on LynxOS-178.
2776 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2777 handle floating point registers that are not supported by
2780 2018-05-10 Tom Tromey <tom@tromey.com>
2782 * configure: Rebuild.
2784 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2787 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2788 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2789 Use it to set the expedite_regs field in the given tdesc.
2790 * x86-tdesc.h: New file.
2791 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2792 Adjust following the addition of the new expedite_regs parameter
2793 to init_target_desc.
2794 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2795 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2796 (i386_linux_read_description, amd64_linux_read_description):
2797 Adjust following the addition of the new expedite_regs parameter
2798 to init_target_desc.
2799 * lynx-i386-low.c: #include "x86-tdesc.h".
2800 (lynx_i386_arch_setup): Adjust following the addition of the new
2801 expedite_regs parameter to init_target_desc.
2802 * nto-x86-low.c: #include "x86-tdesc.h".
2803 (nto_x86_arch_setup): Adjust following the addition of the new
2804 expedite_regs parameter to init_target_desc.
2805 * win32-i386-low.c: #include "x86-tdesc.h".
2806 (i386_arch_setup): Adjust following the addition of the new
2807 expedite_regs parameter to init_target_desc.
2809 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2812 * win32-low.c (win32_create_inferior): Add call to my_wait
2813 setting last_status global.
2815 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2818 * win32-low.c (create_process): Only call gdb_tilde_expand if
2819 inferior_cwd is not NULL.
2821 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2823 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2824 registers to the cache if their values have changed.
2825 (i387_xsave_to_cache): Provide default values for x87 control
2826 registers when these features are available, but disabled.
2827 * regcache.c (supply_register_by_name_zeroed): New function.
2828 * regcache.h (supply_register_by_name_zeroed): Declare new
2831 2018-05-07 Tom Tromey <tom@tromey.com>
2833 * configure: Rebuild.
2835 2018-05-04 Tom Tromey <tom@tromey.com>
2837 * configure: Rebuild.
2839 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2840 Pedro Alves <palves@redhat.com>
2842 * linux-aarch64-low.c (aarch64_stopped_data_address):
2845 2018-04-27 Tom Tromey <tom@tromey.com>
2847 * configure: Rebuild.
2849 2018-04-23 Tom Tromey <tom@tromey.com>
2851 * configure: Rebuild.
2853 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2855 * Makefile.in (depcomp): Add "..".
2856 (all_deps_files): New and use it.
2858 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2860 * configure.srv (aarch64*-*-linux*): Don't include xml.
2861 (i[34567]86-*-cygwin*): Likewise.
2862 (i[34567]86-*-linux*): Likewise.
2863 (i[34567]86-*-lynxos*): Likewise.
2864 (i[34567]86-*-mingw32ce*): Likewise.
2865 (i[34567]86-*-mingw*): Likewise.
2866 (i[34567]86-*-nto*): Likewise.
2867 (tic6x-*-uclinux): Likewise.
2868 (x86_64-*-linux*): Likewise.
2869 (x86_64-*-mingw*): Likewise.
2870 (x86_64-*-cygwin*): Likewise.
2872 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2874 * tdesc.c: Remove xml parameter.
2876 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2878 * server.c (get_features_xml): Remove cast.
2879 * tdesc.c (void target_desc::accept): Fill in function.
2880 (tdesc_get_features_xml): Remove old xml creation.
2881 (print_xml_feature::visit_pre): Add xml vistor.
2882 * tdesc.h (struct target_desc): Make xmltarget mutable.
2883 (tdesc_get_features_xml): Remove declaration.
2885 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2887 * tdesc.c (tdesc_architecture_name): Add new function.
2888 (tdesc_osabi_name): Likewise.
2889 (tdesc_get_features_xml): Use new functions.
2891 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2893 * tdesc.c (tdesc_create_flags): Remove.
2894 (tdesc_add_flag): Likewise.
2895 (tdesc_named_type): Likewise.
2896 (tdesc_create_union): Likewise.
2897 (tdesc_create_struct): Likewise.
2898 (tdesc_create_vector): Likewise.
2899 (tdesc_add_bitfield): Likewise.
2900 (tdesc_add_field): Likewise.
2901 (tdesc_set_struct_size): Likewise.
2903 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2905 * tdesc.c (~target_desc): Remove implictly deleted items.
2906 (init_target_desc): Iterate all features.
2907 (tdesc_get_features_xml): Use vector.
2908 (tdesc_create_feature): Create feature.
2909 * tdesc.h (tdesc_feature) Remove
2910 (target_desc): Add features.
2912 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2914 * Makefile.in: Add common/tdesc.c
2915 * tdesc.c (init_target_desc): init all reg_defs from register
2917 (tdesc_create_reg): Create tdesc_reg.
2918 * tdesc.h (tdesc_feature): Add register vector.
2920 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2922 * tdesc.h (struct target_desc) <features>: Change type to
2923 std::vector<std::string>.
2924 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2926 (tdesc_get_features_xml): Likewise.
2927 (tdesc_create_feature): Likewise.
2929 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2931 * regcache.c (find_register_by_number): Return a ref.
2932 (find_regno): Use references.
2933 (register_size): Likewise.
2934 (register_data): Likewise.
2935 * tdesc.c (target_desc::~target_desc): Remove free calls.
2936 (target_desc::operator==): Use std::vector compare.
2937 (init_target_desc): Use reference.
2938 (tdesc_create_reg): Use reg constructors.
2939 * tdesc.h (struct target_desc): Replace pointer with object.
2941 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2943 * regcache.c (find_register_by_number): Make static.
2944 (find_regno): Use find_register_by_number
2945 * regcache.h (struct reg): Remove declaration.
2947 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2949 * tdesc.c (target_desc::~target_desc): Move to here.
2950 (target_desc::operator==): Likewise.
2951 * tdesc.h (target_desc::~target_desc): Move from here.
2952 (target_desc::operator==): Likewise.
2954 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2956 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2958 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2960 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2962 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2963 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2964 and init_registers_s390_gs_linux64.
2966 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2968 * linux-s390-low.c (s390_fill_gs): Remove function.
2969 (s390_fill_gsbc): Remove function.
2970 (s390_regsets): Set fill functions for the guarded storage regsets
2973 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2975 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2976 the word size. Add comment.
2977 (s390_get_wordsize): New function.
2978 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2979 pswm with it. Instead, use s390_get_wordsize to determine the
2980 word size first and derive the correct tdesc from that directly.
2982 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2984 * Makefile.in: Include silent-rules.mk.
2985 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2986 (COMPILE): Add ECHO_CXX.
2987 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2988 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2989 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2990 (version-generated.c): Add ECHO_GEN.
2991 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2992 (IPAGENT_COMPILE): Add ECHO_CXX.
2993 (%-generated.c): Add ECHO_REGDAT.
2995 2018-03-14 Tom Tromey <tom@tromey.com>
2998 * ax.c (ax_printf): Special case for NULL.
3000 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3002 * linux-low.c (linux_qxfer_libraries_svr4): Use
3003 xml_escape_text_append.
3005 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3007 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3009 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3011 * server.c (handle_general_set): Remove unnecessary xstrdup.
3013 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3015 * server.c (parse_debug_format_options): Adjust to
3016 delim_string_to_char_ptr_vec changes.
3017 * thread-db.c (thread_db_load_search): Adjust to
3018 dirnames_to_char_ptr_vec changes.
3020 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3022 * target.h (target_enable_btrace, target_disable_btrace)
3023 (target_read_btrace, target_read_btrace_conf): Turn macro into
3024 inline function. Throw error if target method is not defined.
3025 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3026 check for btrace target method. Be prepared to handle exceptions
3027 from btrace target methods.
3029 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3031 * server.c (captured_main): Change order of error message printed
3032 when the current working directory cannot be found.
3034 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3036 * server.c: Include "filenames.h" and "pathstuff.h".
3037 (program_name): Delete variable.
3038 (program_path): New anonymous class.
3039 (get_exec_wrapper): Use "program_path" instead of
3041 (handle_v_run): Likewise.
3042 (captured_main): Likewise.
3043 (process_serial_event): Likewise.
3045 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3047 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3048 (OBJS): Add "pathstuff.o".
3049 * server.c (current_directory): New global variable.
3050 (captured_main): Initialize "current_directory".
3052 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3054 * tdesc.c: Use common/tdesc.h.
3055 * tdesc.h: Likewise.
3057 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3058 Simon Marchi <simon.marchi@ericsson.com>
3060 * Makefile.in: Switch order of make rules.
3062 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3064 * Makefile.in: Add common directory in build.
3065 * configure.ac: Add common reference.
3066 * configure: Regenerate.
3068 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3070 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3071 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3072 * spu-low.c (spu_target_ops): Likewise.
3073 * win32-low.c (win32_target_ops): Likewise.
3074 * server.c (supported_btrace_packets): Report packets unconditionally.
3075 * target.h (target_ops) <supports_btrace>: Remove.
3076 (target_supports_btrace): Remove.
3078 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3080 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3081 (handle_btrace_disable): Change return type to void. Use exceptions
3083 (handle_btrace_general_set): Catch exception and copy message to
3086 2018-02-08 Tom Tromey <tom@tromey.com>
3088 * linux-low.c (install_software_single_step_breakpoints): Use
3089 make_scoped_restore.
3090 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3091 (do_restore_current_thread_cleanup): Remove.
3092 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3095 2018-02-08 Tom Tromey <tom@tromey.com>
3097 * mem-break.c (set_raw_breakpoint_at): Use
3098 gdb::unique_xmalloc_ptr.
3100 2018-01-30 Pedro Alves <palves@redhat.com>
3103 * target.c (target_terminal::terminal_state): Rename to ...
3104 (target_terminal::m_terminal_state): ... this.
3106 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3108 * linux-low.c (handle_extended_wait): Surround call to
3109 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3111 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3113 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3114 linux_ptrace_attach_fail_reason_string now returning an
3116 (linux_attach): Likewise.
3117 * thread-db.c (attach_thread): Likewise.
3119 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3122 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3123 checking for fs_base/gs_base fields in struct user_regs_struct.
3124 * configure: Regenerate.
3126 2018-01-16 Yao Qi <yao.qi@linaro.org>
3129 * linux-low.c (fetch_register): Call supply_register instead of
3132 2018-01-08 Yao Qi <yao.qi@linaro.org>
3133 Simon Marchi <simon.marchi@ericsson.com>
3135 * Makefile.in (OBS): Remove selftest.o.
3136 * configure.ac: Set srv_selftest_objs if $development is true.
3137 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3138 * configure: Re-generated.
3139 * server.c (captured_main): Wrap variable selftest_filter with
3142 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3144 * server.c (parse_debug_format_options): Return std::string.
3145 (handle_monitor_command, captured_main): Adjust.
3147 2018-01-05 Pedro Alves <palves@redhat.com>
3150 * server.c (captured_main): Pass quiet=false to
3151 save_original_signals_state.
3153 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3155 * gdbreplay.c (gdbreplay_version): Update copyright year in
3157 * server.c (gdbserver_version): Likewise.
3159 2017-12-08 Tom Tromey <tom@tromey.com>
3161 * ax.c (ax_printf): Update.
3163 2017-12-07 Yao Qi <yao.qi@linaro.org>
3165 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3166 aarch64_linux_read_description.
3167 * linux-amd64-ipa.c (idx2mask): New array.
3168 (get_ipa_tdesc): Move idx2mask out.
3169 (initialize_low_tracepoint): Initialize target descriptions.
3170 * linux-i386-ipa.c (idx2mask): New array.
3171 (get_ipa_tdesc): Move idx2mask out.
3172 (initialize_low_tracepoint): Initialize target descriptions.
3174 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3176 * tdesc.c (struct tdesc_type): Change return type.
3177 (tdesc_add_flag): Change parameter type.
3178 (tdesc_add_bitfield): Likewise.
3179 (tdesc_add_field): Likewise.
3180 (tdesc_set_struct_size): Likewise.
3182 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3184 * regcache.c (registers_to_string): Remove unused variable.
3186 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3188 * inferiors.c (for_each_inferior_with_data): Remove.
3189 * inferiors.h (for_each_inferior_with_data): Remove.
3190 * server.c (handle_qxfer_threads_worker): Change parameter type.
3191 (handle_qxfer_threads_proper): Use for_each_thread.
3193 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3195 * inferiors.c (for_each_inferior): Remove.
3196 (clear_inferiors): Use for_each_thread.
3197 * inferiors.h (for_each_inferior): Remove.
3198 * linux-low.c (linux_wait_for_event_filtered): Use
3200 (linux_stabilize_threads): Likewise.
3201 * regcache.c (regcache_release): Likewise.
3202 * server.c (gdb_wants_all_threads_stopped): Likewise.
3203 (clear_pending_status_callback): Remove.
3204 (handle_status): Use for_each_thread.
3205 (captured_main): Likewise.
3206 * win32-low.c (child_init_thread_list): Likewise.
3207 (win32_clear_inferiors): Likewise.
3208 (fake_breakpoint_event): Likewise.
3210 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3212 * inferiors.h (find_inferior): Remove.
3213 * inferiors.c (find_inferior): Remove.
3215 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3217 * linux-low.c (resume_status_pending_p): Update comment.
3218 (need_step_over_p): Update comment.
3220 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3222 * linux-low.c (proceed_one_lwp): Return void, change parameter
3224 (unsuspend_and_proceed_one_lwp): Likewise.
3225 (proceed_all_lwps): Use for_each_thread.
3226 (unstop_all_lwps): Likewise.
3228 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3230 * linux-low.c (linux_resume_one_thread): Return void, take
3232 (linux_resume): Use for_each_thread.
3234 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3236 * linux-low.c (send_sigstop_callback): Return void, change
3237 parameter type. Rename to...
3238 (send_sigstop): ... this.
3239 (suspend_and_send_sigstop_callback): Return void, change parameter
3241 (suspend_and_send_sigstop): ... this.
3242 (stop_all_lwps): Use for_each_thread.
3244 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3246 * linux-low.c (lwp_running): Return bool, remove unused
3248 (linux_stabilize_threads): Use find_thread.
3250 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3252 * linux-low.c (select_singlestep_lwp_callback): Remove.
3253 (count_events_callback): Remove.
3254 (select_event_lwp_callback): Remove.
3255 (select_event_lwp): Use find_thread/for_each_thread.
3257 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3259 * linux-low.c (not_stopped_callback): Return bool, take filter
3261 (linux_wait_for_event_filtered): Use find_thread.
3262 (linux_wait_1): Likewise.
3264 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3266 * linux-low.c (same_lwp): Remove.
3267 (find_lwp_pid): Use find_thread.
3269 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3271 * linux-low.c (delete_lwp_callback): Remove.
3272 (linux_mourn): Use for_each_thread.
3274 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3276 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3277 args parameter, don't check for pid.
3278 (linux_detach): Use for_each_thread.
3280 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3282 * linux-low.c (struct counter): Remove.
3283 (second_thread_of_pid_p): Remove.
3284 (last_thread_of_process_p): Use find_thread.
3286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3288 * inferiors.c (find_inferior_in_random): Remove.
3289 * inferiors.h (find_inferior_in_random): Remove.
3290 * linux-low.c (status_pending_p_callback): Return bool, accept
3291 parameter ptid directly.
3292 (linux_wait_for_event_filtered): Use find_thread_in_random.
3293 (linux_wait_1): Likewise.
3295 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3297 * inferiors.c (find_inferior_id): Remove.
3298 (find_thread_ptid): Move implemention from find_inferior_id to
3300 * inferiors.h (find_inferior_id): Remove.
3301 * server.c (handle_status): Use find_thread_ptid.
3302 (process_serial_event): Likewise.
3303 * thread-db.c (find_one_thread): Likewise.
3304 (thread_db_thread_handle): Likewise.
3305 * win32-low.c (thread_rec): Likewise.
3306 (child_delete_thread): Likewise.
3307 (win32_thread_alive): Likewise.
3308 (get_child_debug_event): Likewise.
3310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3312 * linux-mips-low.c (update_watch_registers_callback): Return
3313 void, remove pid_p parameter, don't check for pid.
3314 (mips_insert_point, mips_remove_point): Use for_each_thread.
3316 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3318 * lynx.low (lynx_delete_thread_callback): Remove.
3319 (lynx_mourn): Use for_each_thread.
3321 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3323 * regcache.c (regcache_invalidate_one): Remove.
3324 (regcache_invalidate_pid): use for_each_thread.
3326 2017-11-26 Tom Tromey <tom@tromey.com>
3328 * linux-low.c (linux_create_inferior): Update.
3330 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3332 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3334 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3336 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3337 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3338 * linux-aarch64-tdesc-selftest.c: New file.
3339 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3341 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3343 * configure.srv: Add new file.
3344 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3345 * linux-aarch64-tdesc-selftest.c: New file.
3346 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3348 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3350 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3351 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3352 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3354 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3356 * configure.srv: Add new files.
3357 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3358 aarch64_linux_read_description.
3359 * linux-aarch64-low.c (aarch64_linux_read_description):
3360 Merge with aarch64_arch_setup.
3361 (aarch64_arch_setup): Call aarch64_linux_read_description.
3362 * linux-aarch64-tdesc.c: New file.
3363 * linux-aarch64-tdesc.h: New file.
3365 2017-11-24 Yao Qi <yao.qi@linaro.org>
3367 * configure.srv: Set $srv_regobj for tic6x-linux.
3368 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3369 (tic6x_read_description): Move some code to tic6x_arch_setup.
3370 (tic6x_tdesc_test): New function.
3371 (initialize_low_arch): Call selftests::register_test.
3373 2017-11-22 Yao Qi <yao.qi@linaro.org>
3375 * remote-utils.c (prepare_resume_reply): Use memcpy.
3377 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3379 * linux-low.c (kill_one_lwp_callback): Return void, take
3380 argument directly, don't filter on pid.
3381 (linux_kill): Use for_each_thread.
3383 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3385 * linux-low.c (need_step_over_p): Return bool, remove dummy
3387 (linux_resume, proceed_all_lwps): Use find_thread.
3389 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3391 * linux-low.c (resume_status_pending_p): Return bool, remove
3393 (linux_resume): Use find_thread.
3395 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3397 * linux-low.c (struct thread_resume_array): Remove.
3398 (linux_set_resume_request): Return void, take arguments
3400 (linux_resume): Use for_each_thread.
3402 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3404 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3405 return bool, remove data argument.
3406 (linux_stabilize_threads): Use find_thread.
3408 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3410 * linux-low.c (unsuspend_one_lwp): Remove.
3411 (unsuspend_all_lwps): Use for_each_thread, inline code from
3414 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3416 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3417 * linux-low.c (struct iterate_over_lwps_args): Remove.
3418 (iterate_over_lwps_filter): Remove.
3419 (iterate_over_lwps): Use find_thread.
3421 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3423 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3424 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3425 code from reset_lwp_ptrace_options_callback.
3427 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3429 * linux-arm-low.c (struct update_registers_data): Remove.
3430 (update_registers_callback): Return void, take arguments
3431 directly, don't check thread's pid.
3432 (arm_insert_point, arm_remove_point): Use for_each_thread.
3434 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3436 * win32-low.c (continue_one_thread): Return void, take argument
3438 (child_continue): Use for_each_thread.
3440 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3442 * win32-i386-low.c (update_debug_registers_callback): Rename
3444 (update_debug_registers): ... this, return void, remove pid_p arg.
3445 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3447 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3449 * inferiors.h (struct process_info): Add constructor, initialize
3451 <syscalls_to_catch>: Change type to std::vector<int>.
3452 * inferiors.c (add_process): Allocate process_info with new.
3453 (remove_process): Free process_info with delete.
3454 * linux-low.c (handle_extended_wait): Adjust.
3455 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3456 * server.c (handle_general_set): Adjust.
3458 2017-11-16 Pedro Alves <palves@redhat.com>
3460 * remote-utils.c (remote_close): Block SIGIO signals instead of
3461 uninstalling the SIGIO handler.
3463 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3465 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3467 2017-11-16 Yao Qi <yao.qi@linaro.org>
3469 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3470 (tic6x_store_gregset): Likewise.
3471 (tic6x_usrregs_info): Move it up.
3473 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3475 * Makefile.in: Update arch rules.
3476 * configure.srv: Explicitly mark arch/ files.
3478 2017-11-13 Andreas Schwab <schwab@suse.de>
3480 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3482 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3484 2017-11-06 Pedro Alves <palves@redhat.com>
3486 * config.in, configure: Regenerate.
3488 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3490 * target.c (struct thread_search): Remove.
3491 (thread_search_callback): Remove.
3492 (prepare_to_access_memory): Use for_each_thread instead of
3493 find_inferior. Inline code from thread_search_callback.
3495 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3497 * server.c (struct visit_actioned_threads_data): Remove.
3498 (visit_actioned_threads): Change prototype to take arguments
3500 (resume): Use find_thread instead of find_inferior.
3502 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3504 * server.c (queue_stop_reply_callback): Change prototype, return
3506 (find_status_pending_thread_callback): Remove.
3507 (handle_status): Replace find_inferior with find_thread and
3510 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3512 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3514 (aarch64_store_gregset): Likewise.
3515 (aarch64_fill_fpregset): Likewise.
3516 (aarch64_store_fpregset): Likewise.
3518 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3520 * gdbthread.h (find_thread, for_each_thread): New functions.
3521 * inferiors.c (thread_of_pid): Remove.
3522 (find_any_thread_of_pid): Use find_thread.
3523 * linux-low.c (num_lwps): Use for_each_thread.
3525 2017-10-17 Yao Qi <yao.qi@linaro.org>
3527 * Makefile.in: Remove one rule.
3528 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3530 2017-10-17 Yao Qi <yao.qi@linaro.org>
3532 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3533 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3535 2017-10-17 Yao Qi <yao.qi@linaro.org>
3537 * configure.srv: Rename arm.o with arch/arm.o.
3539 2017-10-17 Yao Qi <yao.qi@linaro.org>
3541 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3542 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3543 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3544 (arch-i386.o, arch-amd64.o): Remove rules.
3545 (arch/%.o): New rule.
3546 Update POSTCOMPILE and COMPILE.pre.
3547 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3548 * configure: Re-generated.
3549 * configure.srv: Replace arch-i386.o with arch/i386.o.
3550 Replace arch-amd64.o with arch/amd64.o.
3552 2017-10-16 Yao Qi <yao.qi@linaro.org>
3554 * configure: Regenerated.
3556 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3558 * inferiors.h: (struct inferior_list): Remove.
3559 (struct inferior_list_entry); Remove.
3560 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3561 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3562 get_first_inferior): Remove.
3563 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3564 find_inferior_id, find_inferior_in_random): Change signature.
3565 * inferiors.c (all_threads): Change type to
3566 std::list<thread_info *>.
3567 (get_thread): Remove macro.
3568 (find_inferior, find_inferior_id): Change signature, implement
3570 (find_inferior_in_random): Change signature, implement using
3571 find_thread_in_random.
3572 (for_each_inferior, for_each_inferior_with_data): Change
3573 signature, implement using for_each_thread.
3574 (add_inferior_to_list, remove_inferior): Remove.
3575 (add_thread, get_first_thread, thread_of_pid,
3576 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3577 (get_first_inferior, one_inferior_p, clear_inferior_list):
3579 (clear_inferiors, get_thread_process): Update.
3580 * gdbthread.h: Include <list>.
3581 (struct thread_info) <entry>: Remove field.
3583 (all_threads): Change type to std::list<thread_info *>.
3584 (get_first_inferior): Add doc.
3585 (find_thread, for_each_thread, find_thread_in_random): New
3587 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3588 * linux-arm-low.c (update_registers_callback): Update.
3589 * linux-low.c (second_thread_of_pid_p): Update.
3590 (kill_one_lwp_callback, linux_detach_lwp_callback,
3591 delete_lwp_callback, status_pending_p_callback, same_lwp,
3592 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3593 iterate_over_lwps, not_stopped_callback,
3594 resume_stopped_resumed_lwps, count_events_callback,
3595 select_singlestep_lwp_callback, select_event_lwp_callback,
3596 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3597 suspend_and_send_sigstop_callback, wait_for_sigstop,
3598 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3599 lwp_running, linux_set_resume_request, resume_status_pending_p,
3600 need_step_over_p, start_step_over, linux_resume_one_thread,
3601 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3602 reset_lwp_ptrace_options_callback): Update.
3603 * linux-mips-low.c (update_watch_registers_callback): Update.
3604 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3606 (free_register_cache_thread_one): Remove.
3607 (regcache_release): Update.
3608 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3609 handle_qxfer_threads_worker): Update.
3610 (handle_query): Update, use list iterator.
3611 (visit_actioned_threads, handle_pending_status,
3612 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3613 clear_pending_status_callback, set_pending_status_callback,
3614 find_status_pending_thread_callback, handle_status,
3615 process_serial_event): Update.
3616 * target.c (thread_search_callback): Update.
3617 * thread-db.c (thread_db_get_tls_address): Update.
3618 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3620 * win32-i386-low.c (update_debug_registers_callback): Update.
3621 * win32-low.c (delete_thread_info, child_delete_thread,
3622 continue_one_thread, suspend_one_thread,
3623 get_child_debug_event): Adjust.
3625 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3627 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3628 * inferiors.h: Include <list>.
3629 (struct process_info) <entry>: Remove field.
3631 (pid_of): Change macro to function.
3632 (ptid_of, lwpid_of): Remove macro.
3633 (all_processes): Change type to std::list<process_info *>.
3634 (ALL_PROCESSES): Remove macro.
3635 (for_each_process, find_process): New function.
3636 * inferiors.c (all_processes): Change type to
3637 std::list<process_info *>.
3638 (find_thread_process): Adjust.
3639 (add_process): Likewise.
3640 (remove_process): Likewise.
3641 (find_process_pid): Likewise.
3642 (get_first_process): Likewise.
3643 (started_inferior_callback): Remove.
3644 (have_started_inferiors_p): Adjust.
3645 (attached_inferior_callback): Remove.
3646 (have_attached_inferiors_p): Adjust.
3647 * linux-low.c (check_zombie_leaders): Likewise.
3648 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3649 (x86_linux_update_xmltarget): Adjust.
3650 * server.c (handle_query): Likewise.
3651 (gdb_reattached_process): Remove.
3652 (handle_status): Adjust.
3653 (kill_inferior_callback): Likewise.
3654 (detach_or_kill_inferior): Remove.
3655 (print_started_pid): Likewise.
3656 (print_attached_pid): Likewise.
3657 (detach_or_kill_for_exit): Update.
3658 (process_serial_event): Likewise.
3659 * linux-arm-low.c (arm_new_fork): Likewise.
3661 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3663 * dll.h: Include <list>.
3664 (struct dll_info): Add constructor.
3665 <entry>: Remove field.
3666 (all_dlls): Change type to std::list<dll_info>.
3667 * dll.c: Include <algorithm>.
3668 (get_dll): Remove macro.
3669 (all_dlls): Change type to std::list<dll_info *>.
3670 (free_one_dll): Remove.
3671 (match_dll): Likewise.
3672 (loaded_dll): Adjust.
3673 (unloaded_dll): Adjust to all_dlls type change, use
3674 std::find_if. Inline code from match_dll.
3675 (clear_dlls): Adjust to all_dlls type change.
3676 * server.c (emit_dll_description): Remove.
3677 (handle_qxfer_libraries): Adjust to all_dlls type change,
3678 integrate emit_dll_description's functionality.
3680 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3682 * linux-low.h (struct linux_target_ops) <delete_process>: New
3684 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3685 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3686 (struct linux_target_ops): Add delete_process callback.
3687 * linux-arm-low.c (arm_delete_process): New.
3688 (struct linux_target_ops): Add delete_process callback.
3689 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3690 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3691 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3692 * linux-mips-low.c (mips_linux_delete_process): New.
3693 (struct linux_target_ops): Add delete_process callback.
3694 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3695 * linux-s390-low.c (struct linux_target_ops): Likewise.
3696 * linux-sh-low.c (struct linux_target_ops): Likewise.
3697 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3698 * linux-tile-low.c (struct linux_target_ops): Likewise.
3699 * linux-x86-low.c (x86_linux_delete_process): New.
3700 (struct linux_target_ops): Add delete_process callback.
3701 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3703 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3705 * linux-aarch64-low.c (the_low_target): Add thread delete
3707 * linux-arm-low.c (arm_delete_thread): New function.
3708 (the_low_target): Add thread delete callback.
3709 * linux-bfin-low.c (the_low_target): Likewise.
3710 * linux-crisv32-low.c (the_low_target): Likewise.
3711 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3713 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3715 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3716 * linux-mips-low.c (mips_linux_delete_thread): New function.
3717 (the_low_target): Add thread delete callback.
3718 * linux-ppc-low.c (the_low_target): Likewise.
3719 * linux-s390-low.c (the_low_target): Likewise.
3720 * linux-sh-low.c (the_low_target): Likewise.
3721 * linux-tic6x-low.c (the_low_target): Likewise.
3722 * linux-tile-low.c (the_low_target): Likewise.
3723 * linux-x86-low.c (the_low_target): Likewise.
3724 * linux-xtensa-low.c (the_low_target): Likewise.
3726 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3728 * win32-low.c: Include "common-inferior.h".
3730 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3732 * inferiors.c (set_inferior_cwd): New function.
3733 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3734 (handle_query): Inform that QSetWorkingDir is supported.
3735 * win32-low.c (create_process): Pass the inferior's cwd to
3738 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3740 * inferiors.c (current_inferior_cwd): New global variable.
3741 (get_inferior_cwd): New function.
3742 * inferiors.h (struct process_info) <cwd>: New field.
3744 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3746 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3747 (OBS): Add gdb_tilde_expand.o.
3749 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3751 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3752 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3754 2017-09-29 Pedro Alves <palves@redhat.com>
3756 * ax.c (gdb_parse_agent_expr): Constify.
3757 * ax.h (gdb_parse_agent_expr): Constify.
3758 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3760 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3761 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3762 * remote-utils.h (read_ptid): Constify.
3763 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3764 (process_point_options, process_serial_event): Constify.
3765 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3766 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3767 (cmd_qtbuffer): Constify.
3769 2017-09-29 Pedro Alves <palves@redhat.com>
3771 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3774 2017-09-29 Pedro Alves <palves@redhat.com>
3776 * linux-low.c (handle_extended_wait): Pass parent thread instead
3777 of process to thread_db_notice_clone.
3778 * linux-low.h (thread_db_notice_clone): Replace parent process
3779 parameter with parent thread parameter.
3780 * thread-db.c (find_one_thread): Add comment.
3781 (thread_db_notice_clone): Replace parent process parameter with
3782 parent thread parameter. Temporarily switch to the parent thread.
3784 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3786 * gdbthread.h: Include "common-gdbthread.h".
3787 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3788 "if" when validating the ptid.
3789 * remote-utils.c: Include "gdbthread.h".
3790 (prepare_resume_reply): Use "switch_to_thread".
3791 * target.c (done_accessing_memory): Likewise.
3793 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3795 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3796 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3797 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3798 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3799 s390x-gs-linux64-ipa.o to ipa_obj.
3800 * linux-s390-low.c (HWCAP_S390_GS): New define.
3801 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3803 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3804 (s390_arch_setup): Check for guarded-storage support and choose
3806 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3807 init_registers_s390x_gs_linux64.
3808 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3810 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3811 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3813 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3815 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3817 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3819 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3820 (thread_db_thread_handle): Declare.
3821 * linux-low.c (linux_target_ops): Initialize thread_handle.
3822 * server.c (handle_qxfer_threads_worker): Add support for
3824 * target.h (struct target_ops): Add new function pointer,
3826 (target_thread_handle): Define.
3827 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3829 (thread_db_thread_handle): New function.
3831 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3833 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3834 * linux-low.h (thread_db_notice_clone): Declare.
3835 * thread-db.c (thread_db_notice_clone): New function.
3837 2017-09-21 Pedro Alves <palves@redhat.com>
3839 * server.c (gdb_read_memory, handle_status, process_serial_event)
3840 (handle_serial_event, handle_target_event): Adjust to
3841 set_desired_thread prototype change.
3842 * target.c (set_desired_thread): Remove 'use_general' parameter
3844 * target.h (set_desired_thread): Remove 'use_general' parameter.
3846 2017-09-20 Tom Tromey <tom@tromey.com>
3848 * target.c (target_terminal::terminal_state): Define.
3849 (target_terminal::init): Rename from target_terminal_init.
3850 (target_terminal::inferior): Rename from
3851 target_terminal_inferior.
3852 (target_terminal::ours): Rename from target_terminal_ours.
3853 (target_terminal::ours_for_output, target_terminal::info): New.
3855 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3857 * server.c (accumulate_file_name_length): Remove.
3858 (emit_dll_description): Adjust to std::string change.
3859 (handle_qxfer_libraries): Use std::string to hold document.
3861 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3863 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3864 return type of xml_escape_text.
3865 * server.c (emit_dll_description): Likewise.
3867 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3869 * server.c (captured_main): Accept argument for --selftest.
3870 Update run_tests call.
3871 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3872 when registering selftests.
3874 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3876 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3877 instead of "VEC" for "target_desc.reg_defs".
3878 (regcache_cpy): Likewise.
3879 (registers_to_string): Likewise.
3880 (registers_from_string): Likewise.
3881 (find_regno): Likewise.
3882 (supply_regblock): Likewise.
3883 (regcache_raw_read_unsigned): Likewise.
3884 * tdesc.c (init_target_desc): Likewise.
3885 (tdesc_create_reg): Likewise.
3886 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3887 (struct target_desc) <reg_defs>: Convert to "std::vector".
3888 (target_desc): Do not initialize "reg_defs".
3889 (~target_desc): Update code to use "std::vector" instead of "VEC"
3890 for "target_desc.reg_defs".
3891 (operator==): Likewise.
3893 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3895 * inferiors.h (thread_to_gdb_id): Remove.
3896 * inferiors.c (thread_to_gdb_id): Remove.
3897 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3898 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3899 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3901 * nto-low.c (nto_fetch_registers, nto_store_registers,
3902 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3904 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3906 * inferiors.h (gdb_id_to_thread_id): Remove.
3907 * inferiors.c (gdb_id_to_thread_id): Remove.
3908 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3909 removal. Move pid declaration closer to where it's used.
3911 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3913 * server.c (handle_detach): New function.
3914 (process_serial_event): Move code out, call handle_detach.
3916 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3918 * server.c (require_running): Rename to ...
3919 (require_running_or_return): ... this ...
3920 (require_running_or_break): ... and this.
3921 (handle_query, process_serial_event): Adjust.
3923 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3925 * linux-low.c (linux_set_resume_request): Remove unused
3928 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3930 * server.c (first_thread_of): Remove.
3931 (process_serial_event): Replace usage of first_thread_of with
3932 find_any_thread_of_pid.
3933 * tracepoint.c (same_process_p): Remove.
3934 (gdb_agent_about_to_close): Replace usage of same_process_p with
3935 find_any_thread_of_pid.
3936 * linux-x86-low.c (same_process_callback): Remove.
3937 (x86_arch_setup_process_callback): Replace usage of
3938 same_process_callback with find_any_thread_of_pid.
3939 * thread-db.c (any_thread_of): Remove.
3940 (switch_to_process): Replace usage of any_thread_of with
3941 find_any_thread_of_pid.
3942 * inferiors.c (thread_pid_matches_callback): Remove.
3943 (find_thread_process): Adjust to use find_any_thread_of_pid.
3945 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3947 * regcache.c (get_thread_regcache): Guard calls to "memset"
3950 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3952 * linux-low.c (handle_extended_wait): Use
3953 "allocate_target_description" instead of "XNEW".
3954 * linux-x86-low.c (initialize_low_arch): Likewise.
3956 2017-09-05 Yao Qi <yao.qi@linaro.org>
3958 * configure.srv (srv_i386_regobj): Remove.
3959 (srv_amd64_regobj): Remove.
3960 (srv_regobj): Set it to "" for x86 non-linux targets.
3961 * linux-x86-tdesc.c (i386_linux_read_description):
3962 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3963 (init_registers_i386): Remove the declaration.
3964 (tdesc_i386): Remove the declaration.
3965 (lynx_i386_arch_setup): Call i386_create_target_description.
3966 * nto-x86-low.c: Likewise.
3967 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3968 [!__x86_64__]: include arch/i386.h.
3969 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3971 2017-09-05 Yao Qi <yao.qi@linaro.org>
3973 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3974 i386/amd64-XXX-linux from it.
3976 2017-09-05 Yao Qi <yao.qi@linaro.org>
3978 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3980 (ipa_amd64_linux_regobj): Remove.
3981 (ipa_x32_linux_regobj): Remove.
3983 2017-09-05 Yao Qi <yao.qi@linaro.org>
3985 * Makefile.in (arch-amd64.o): New rule.
3986 * configure.srv: Append arch-amd64.o.
3987 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3988 (get_ipa_tdesc): Call amd64_linux_read_description.
3989 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3990 and init_registers_amd64_XXX.
3991 * linux-x86-low.c (x86_linux_read_description): Call
3992 amd64_linux_read_description.
3993 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3994 (initialize_low_arch): Don't call init_registers_x32_XXX and
3995 init_registers_amd64_XXX.
3996 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3997 and tdesc_amd64_XXX.
3998 [__x86_64__] (amd64_tdesc_test): New function.
3999 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4000 and init_registers_amd64_XXX.
4001 * linux-x86-tdesc.c: Include arch/amd64.h.
4002 (xcr0_to_tdesc_idx): New function.
4003 (i386_linux_read_description): New function.
4004 (amd64_get_ipa_tdesc_idx): New function.
4005 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4006 (amd64_get_ipa_tdesc): Declare.
4008 2017-09-05 Yao Qi <yao.qi@linaro.org>
4010 * configure.srv (srv_i386_linux_xmlfiles): Remove
4011 i386/i386-XXX-linux.xml from it.
4013 2017-09-05 Yao Qi <yao.qi@linaro.org>
4015 * configure.srv: Set srv_i386_linux_regobj empty if $development
4017 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4018 initialize_low_tdesc.
4019 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4020 with #if initialize_low_tdesc.
4021 * linux-x86-tdesc-selftest.c: New file.
4022 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4024 2017-09-05 Yao Qi <yao.qi@linaro.org>
4026 * Makefile.in (arch-i386.o): New rule.
4027 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4028 (x86_64-*-linux*): Likewise.
4029 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4030 include arch/i386.h.
4031 (i386_linux_read_description): Remove code and call
4032 i386_create_target_description.
4033 * tdesc.c (allocate_target_description): New function.
4034 * tdesc.h (set_tdesc_architecture): Remove declaration.
4035 (set_tdesc_osabi): Likewise.
4037 2017-09-05 Yao Qi <yao.qi@linaro.org>
4039 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4040 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4041 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4043 * server.c (get_features_xml): Call tdesc_get_features_xml.
4044 * tdesc.c (set_tdesc_architecture): New function.
4045 (set_tdesc_osabi): New function.
4046 (tdesc_get_features_xml): New function.
4047 (tdesc_create_feature): Add an argument.
4048 * tdesc.h (struct target_desc) <features>: New field.
4049 <arch, osabi>: New field.
4050 (~target_desc): xfree features, arch, and osabi.
4051 (target_desc::oerator==): Don't compare .xmltarget.
4052 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4053 (set_tdesc_osabi): Likewise.
4054 (tdesc_get_features_xml): Likewise.
4056 2017-09-05 Yao Qi <yao.qi@linaro.org>
4058 * linux-x86-tdesc.c: Include selftest.h.
4059 (i386_tdesc_test): New function.
4060 (initialize_low_tdesc): Call selftests::register_test.
4061 * tdesc.h: Include regdef.h.
4062 (target_desc): Override operator == and !=.
4064 2017-09-05 Yao Qi <yao.qi@linaro.org>
4066 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4067 (ipa_obj): Likewise.
4068 * linux-i386-ipa.c: Include common/x86-xstate.h
4069 (get_ipa_tdesc): Call i386_linux_read_description.
4070 (initialize_low_tracepoint): Don't call init_registers_XXX
4071 functions, call initialize_low_tdesc instead.
4072 * linux-x86-low.c (x86_linux_read_description): Call
4073 i386_linux_read_description.
4074 (initialize_low_arch): Don't call init_registers_i386_XXX
4075 functions, call initialize_low_tdesc.
4076 * linux-x86-tdesc.c: New file.
4077 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4078 (i386_get_ipa_tdesc_idx): Declare.
4079 (i386_get_ipa_tdesc): Declare.
4080 (initialize_low_tdesc): Declare.
4082 2017-09-05 Yao Qi <yao.qi@linaro.org>
4084 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4087 2017-09-05 Yao Qi <yao.qi@linaro.org>
4089 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4090 * regcache.c (get_thread_regcache): Use VEC_length.
4091 (init_register_cache): Likewise.
4092 (regcache_cpy): Likewise.
4093 (registers_to_string): Iterate reg_defs via VEC_iterate.
4094 (find_regno): Likewise.
4095 (find_register_by_number): Use VEC_index.
4096 (register_size): Call find_register_by_number.
4097 (register_data): Call find_register_by_number.
4098 (supply_regblock): Use VEC_length.
4099 (regcache_raw_read_unsigned): Likewise.
4100 * tdesc.c (init_target_desc): Iterate reg_defs via
4102 (default_description): Update initializer.
4103 (copy_target_description): Don't update field num_registers.
4104 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4105 <num_registers>: Remove.
4107 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4109 * Makefile.in (.SECONDARY): Define target.
4111 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4113 * linux-low.c (linux_wait_1): Adjust.
4114 * server.c (queue_stop_reply_callback): Adjust.
4116 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4118 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4119 QEnvironmentUnset and QEnvironmentReset packets.
4120 (handle_query): Inform remote that QEnvironmentHexEncoded,
4121 QEnvironmentUnset and QEnvironmentReset are supported.
4123 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4125 * inferiors.h (inferior_target_data): Rename to ...
4126 (thread_target_data): ... this.
4127 (inferior_regcache_data): Rename to ...
4128 (thread_regcache_data): ... this.
4129 (set_inferior_regcache_data): Rename to ...
4130 (set_thread_regcache_data): ... this.
4131 * inferiors.c (inferior_target_data): Rename to ...
4132 (thread_target_data): ... this.
4133 (inferior_regcache_data): Rename to ...
4134 (thread_regcache_data): ... this.
4135 (set_inferior_regcache_data): Rename to ...
4136 (set_thread_regcache_data): ... this.
4137 (free_one_thread): Update.
4138 * linux-low.h (get_thread_lwp): Update.
4139 * regcache.c (get_thread_regcache): Update.
4140 (regcache_invalidate_thread): Update.
4141 (free_register_cache_thread): Update.
4142 * win32-i386-low.c (update_debug_registers_callback): Update.
4143 (win32_get_current_dr): Update.
4144 * win32-low.c (thread_rec): Update.
4145 (delete_thread_info): Update.
4146 (continue_one_thread): Update.
4147 (suspend_one_thread): Update.
4149 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4151 * inferiors.c (set_inferior_target_data): Remove.
4152 * inferiors.h (set_inferior_target_data): Remove.
4154 2017-08-18 Yao Qi <yao.qi@linaro.org>
4156 * Makefile.in (OBS): Add selftest.o.
4157 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4158 * configure, config.in: Re-generated.
4159 * server.c: Include common/sefltest.h.
4160 (captured_main): Handle option --selftest.
4162 2017-08-09 Yao Qi <yao.qi@linaro.org>
4164 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4165 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4166 i386-avx-mpx.o and i386-mmx.o.
4167 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4168 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4169 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4170 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4171 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4172 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4173 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4174 i386/amd64-avx-mpx.xml.
4176 2017-08-09 Yao Qi <yao.qi@linaro.org>
4178 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4179 and x32-avx-avx512.o.
4180 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4181 i386/x32-avx-avx512.xml.
4183 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4185 * tracepoint.h (enum class fast_tpoint_collect_result): New
4187 (fast_tracepoint_collecting): Change return type to
4188 fast_tpoint_collect_result.
4189 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4190 * linux-low.h: Include tracepoint.h.
4191 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4192 fast_tpoint_collect_result.
4193 * linux-low.c (handle_tracepoints): Adjust.
4194 (linux_fast_tracepoint_collecting): Change return type to
4195 fast_tpoint_collect_result.
4196 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4197 linux_wait_1, stuck_in_jump_pad_callback,
4198 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4199 proceed_one_lwp): Adjust to type change.
4201 2017-07-10 Yao Qi <yao.qi@linaro.org>
4203 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4205 2017-06-29 Yao Qi <yao.qi@linaro.org>
4207 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4209 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4211 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4213 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4215 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4217 * linux-low.c (linux_create_inferior): Adjust code to access the
4218 environment information via 'gdb_environ' class.
4219 * lynx-low.c (lynx_create_inferior): Likewise.
4220 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4221 (get_environ): Return a pointer to 'our_environ'.
4222 (captured_main): Initialize 'our_environ'.
4223 * server.h (get_environ): Adjust prototype.
4224 * spu-low.c (spu_create_inferior): Adjust code to access the
4225 environment information via 'gdb_environ' class.
4227 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4229 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4230 usage of "register" keyword.
4232 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4234 * configure: Re-generate.
4236 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4238 * configure: Re-generate.
4240 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4242 * Makefile.in (COMPILE.pre): Add "-x c++".
4244 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4246 * fork-child.c: Conditionally include <signal.h>.
4248 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4250 * server.c (handle_general_set): Handle new packet
4251 "QStartupWithShell".
4252 (handle_query): Add "QStartupWithShell" to the list of supported
4254 (gdbserver_usage): Add help text explaining the
4255 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4257 (captured_main): Recognize and act upon the presence of the new
4260 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4261 Pedro Alves <palves@redhat.com>
4263 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4264 * configure: Regenerate.
4265 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4267 (i[34567]86-*-lynxos*): Likewise.
4268 (spu*-*-*): Likewise.
4269 * fork-child.c: New file.
4270 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4272 (linux_ptrace_fun): New function.
4273 (linux_create_inferior): Adjust function prototype to reflect
4274 change on "target.h". Adjust function code to use
4276 (linux_request_interrupt): Delete "signal_pid".
4277 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4278 (lynx_ptrace_fun): New function.
4279 (lynx_create_inferior): Adjust function prototype to reflect
4280 change on "target.h". Adjust function code to use
4282 * nto-low.c (nto_create_inferior): Adjust function prototype and
4283 code to reflect change on "target.h". Update comments.
4284 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4285 "common-terminal.h" and "environ.h".
4286 (terminal_fd): Moved to fork-child.c.
4287 (old_foreground_pgrp): Likewise.
4288 (restore_old_foreground_pgrp): Likewise.
4289 (last_status): Make it global.
4290 (last_ptid): Likewise.
4291 (our_environ): New variable.
4292 (startup_with_shell): Likewise.
4293 (program_name): Likewise.
4294 (program_argv): Rename to...
4295 (program_args): ...this.
4296 (wrapper_argv): New variable.
4297 (start_inferior): Delete function.
4298 (get_exec_wrapper): New function.
4299 (get_exec_file): Likewise.
4300 (get_environ): Likewise.
4301 (prefork_hook): Likewise.
4302 (post_fork_inferior): Likewise.
4303 (postfork_hook): Likewise.
4304 (postfork_child_hook): Likewise.
4305 (handle_v_run): Update code to deal with arguments coming from the
4306 remote host. Update calls from "start_inferior" to
4308 (captured_main): Likewise. Initialize environment variable. Call
4310 * server.h (post_fork_inferior): New prototype.
4311 (get_environ): Likewise.
4312 (last_status): Declare.
4313 (last_ptid): Likewise.
4314 (signal_pid): Likewise.
4315 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4316 (spu_ptrace_fun): New function.
4317 (spu_create_inferior): Adjust function prototype to reflect change
4318 on "target.h". Adjust function code to use "fork_inferior".
4319 * target.c (target_terminal_init): New function.
4320 (target_terminal_inferior): Likewise.
4321 (target_terminal_ours): Likewise.
4322 * target.h: Include <vector>.
4323 (struct target_ops) <create_inferior>: Update prototype.
4324 (create_inferior): Update macro.
4325 * utils.c (gdb_flush_out_err): New function.
4326 * win32-low.c (win32_create_inferior): Adjust function prototype
4327 and code to reflect change on "target.h".
4329 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4331 * inferiors.c (switch_to_thread): New function.
4333 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4335 * Makefile.in (SFILE): Add "common/job-control.c".
4336 (OBS): Add "job-control.o".
4338 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4340 * Makefile: Remove "@host_makefile_frag@".
4342 2017-05-05 Pedro Alves <palves@redhat.com>
4344 * configure: Regenerate.
4346 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4348 * configure: Regenerate.
4350 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4352 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4353 software_single_step change of return type to
4354 std::vector<CORE_ADDR>.
4355 * linux-low.c (install_software_single_step_breakpoints):
4357 * linux-low.h (install_software_single_step_breakpoints):
4360 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4362 * remote-utils.c: Include "gdb_termios.h" instead of
4364 * terminal.h: Delete file.
4366 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4368 * server.c: Include <vector>.
4369 <program_argv, wrapper_argv>: Convert to std::vector.
4370 (start_inferior): Rewrite function to use C++.
4371 (handle_v_run): Likewise. Update code that calculates the argv
4372 based on the vRun packet; use C++.
4373 (captured_main): Likewise.
4375 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4377 * server.c (handle_v_cont): Initialize thread_resume::thread
4380 2017-04-05 Pedro Alves <palves@redhat.com>
4382 * configure: Regenerate.
4384 2017-04-05 Pedro Alves <palves@redhat.com>
4386 * gdbreplay.c (sync_error): Constify.
4387 * linux-x86-low.c (push_opcode): Constify.
4389 2017-04-05 Pedro Alves <palves@redhat.com>
4391 * win32-low.c (get_child_debug_event)
4392 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4393 Report TARGET_WAITKIND_SPURIOUS instead.
4395 2017-04-05 Pedro Alves <palves@redhat.com>
4397 * remote-utils.c (remote_prepare, remote_open): Constify.
4398 * remote-utils.h (remote_prepare, remote_open): Constify.
4399 * server.c (captured_main): Constify 'port' handling.
4401 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4403 * Makefile.in (clean): Clear .deps.
4405 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4407 * .gitignore: Remove generated files, replace with wildcard.
4408 * (clean): Replace removal of generated files with wildcard.
4409 (version.c): Replace with...
4410 (version-generated.c): ...this.
4411 (xml-builtin.c): Replace with...
4412 (xml-builtin-generated.c): ...this.
4413 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4414 (%.c: *regformats*): Replace with...
4415 (%-generated.c: *regformats*): ...this.
4417 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4419 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4420 (xtensa_fill_gregset): Call collect_register_by_name for
4422 (xtensa_store_gregset): Call supply_register_by_name for
4425 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4427 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4428 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4429 (xtensa_store_gregset): Call supply_register for all registers in
4430 a0_regnum..a0_regnum + C0_NREGS range.
4432 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4434 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4435 (ax-ipa.o: ax.c): Remove.
4436 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4437 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4438 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4439 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4440 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4442 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4444 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4445 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4446 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4447 (errors-ipa.o: ../common/errors.c): Remove.
4448 (format-ipa.o: ../common/format.c): Remove.
4449 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4451 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4453 * Makefile.in (%-ipa.o: %.c): New rule.
4454 (tracepoint-ipa.o: tracepoint.c): Remove.
4455 (utils-ipa.o: utils.c): Remove.
4456 (remote-utils-ipa.o: remote-utils.c): Remove.
4457 (regcache-ipa.o: regcache.c): Remove.
4458 (i386-linux-ipa.o: i386-linux.c): Remove.
4459 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4460 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4461 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4462 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4463 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4464 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4465 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4466 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4467 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4468 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4469 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4470 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4471 (aarch64-ipa.o: aarch64.c): Remove.
4472 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4473 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4474 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4475 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4476 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4477 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4478 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4479 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4480 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4481 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4482 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4483 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4484 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4485 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4486 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4487 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4488 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4489 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4490 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4491 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4492 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4493 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4494 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4495 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4496 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4497 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4498 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4499 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4500 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4501 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4502 (tdesc-ipa.o: tdesc.c): Remove.
4503 (x32-linux-ipa.o: x32-linux.c): Remove.
4504 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4505 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4507 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4509 * Makefile.in (%.o: ../arch/%.c): New rule.
4510 (arm.o: ../arch/arm.c): Remove.
4511 (arm-linux.o: ../arch/arm-linux.c): Remove.
4512 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4513 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4515 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4517 * Makefile.in (%.o: ../nat/%.c): New rule.
4518 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4519 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4520 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4521 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4522 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4523 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4524 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4525 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4526 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4527 (linux-personality.o: ../nat/linux-personality.c): Remove.
4528 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4529 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4530 (x86-linux.o: ../nat/x86-linux.c): Remove.
4531 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4532 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4534 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4536 * Makefile.in (%.o: ../common/%.c): New rule.
4537 (signals.o: ../common/signals.c): Remove.
4538 (print-utils.o: ../common/print-utils.c): Remove.
4539 (rsp-low.o: ../common/rsp-low.c): Remove.
4540 (common-utils.o: ../common/common-utils.c): Remove.
4541 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4542 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4543 (vec.o: ../common/vec.c): Remove.
4544 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4545 (xml-utils.o: ../common/xml-utils.c): Remove.
4546 (ptid.o: ../common/ptid.c): Remove.
4547 (buffer.o: ../common/buffer.c): Remove.
4548 (format.o: ../common/format.c): Remove.
4549 (filestuff.o: ../common/filestuff.c): Remove.
4550 (agent.o: ../common/agent.c): Remove.
4551 (errors.o: ../common/errors.c): Remove.
4552 (environ.o: ../common/environ.c): Remove.
4553 (common-debug.o: ../common/common-debug.c): Remove.
4554 (cleanups.o: ../common/cleanups.c): Remove.
4555 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4556 (fileio.o: ../common/fileio.c): Remove.
4557 (common-regcache.o: ../common/common-regcache.c): Remove.
4558 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4559 (new-op.o: ../common/new-op.c): Remove.
4560 (btrace-common.o: ../common/btrace-common.c): Remove.
4562 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4564 * Makefile.in (%.o: ../target/%.c): New rule.
4565 (waitstatus.o: ../target/waitstatus.c): Remove.
4567 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4570 (%.c: ../regformats/%.dat,
4571 (%.c: ../regformats/arm/%.dat,
4572 (%.c: ../regformats/i386/%.dat,
4573 (%.c: ../regformats/rs6000/%.dat): New rules.
4574 (aarch64.c): Remove.
4575 (reg-arm.c): Remove.
4576 (arm-with-iwmmxt.c): Remove.
4577 (arm-with-vfpv2.c): Remove.
4578 (arm-with-vfpv3.c): Remove.
4579 (arm-with-neon.c): Remove.
4580 (reg-bfin.c): Remove.
4581 (reg-cris.c): Remove.
4582 (reg-crisv32.c): Remove.
4584 (i386-linux.c): Remove.
4585 (i386-avx.c): Remove.
4586 (i386-avx-linux.c): Remove.
4587 (i386-avx-avx512.c): Remove.
4588 (i386-avx-avx512-linux.c): Remove.
4589 (i386-mpx.c): Remove.
4590 (i386-mpx-linux.c): Remove.
4591 (i386-avx-mpx-avx512-pku.c): Remove.
4592 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4593 (i386-avx-mpx.c): Remove.
4594 (i386-avx-mpx-linux.c): Remove.
4595 (i386-mmx.c): Remove.
4596 (i386-mmx-linux.c): Remove.
4597 (reg-ia64.c): Remove.
4598 (reg-m32r.c): Remove.
4599 (reg-m68k.c): Remove.
4601 (mips-linux.c): Remove.
4602 (mips-dsp-linux.c): Remove.
4603 (mips64-linux.c): Remove.
4604 (mips64-dsp-linux.c): Remove.
4605 (nios2-linux.c): Remove.
4606 (powerpc-32.c): Remove.
4607 (powerpc-32l.c): Remove.
4608 (powerpc-altivec32l.c): Remove.
4609 (powerpc-cell32l.c): Remove.
4610 (powerpc-vsx32l.c): Remove.
4611 (powerpc-isa205-32l.c): Remove.
4612 (powerpc-isa205-altivec32l.c): Remove.
4613 (powerpc-isa205-vsx32l.c): Remove.
4614 (powerpc-e500l.c): Remove.
4615 (powerpc-64l.c): Remove.
4616 (powerpc-altivec64l.c): Remove.
4617 (powerpc-cell64l.c): Remove.
4618 (powerpc-vsx64l.c): Remove.
4619 (powerpc-isa205-64l.c): Remove.
4620 (powerpc-isa205-altivec64l.c): Remove.
4621 (powerpc-isa205-vsx64l.c): Remove.
4622 (s390-linux32.c): Remove.
4623 (s390-linux32v1.c): Remove.
4624 (s390-linux32v2.c): Remove.
4625 (s390-linux64.c): Remove.
4626 (s390-linux64v1.c): Remove.
4627 (s390-linux64v2.c): Remove.
4628 (s390-te-linux64.c): Remove.
4629 (s390-vx-linux64.c): Remove.
4630 (s390-tevx-linux64.c): Remove.
4631 (s390x-linux64.c): Remove.
4632 (s390x-linux64v1.c): Remove.
4633 (s390x-linux64v2.c): Remove.
4634 (s390x-te-linux64.c): Remove.
4635 (s390x-vx-linux64.c): Remove.
4636 (s390x-tevx-linux64.c): Remove.
4637 (tic6x-c64xp-linux.c): Remove.
4638 (tic6x-c64x-linux.c): Remove.
4639 (tic6x-c62x-linux.c): Remove.
4641 (reg-sparc64.c): Remove.
4642 (reg-spu.c): Remove.
4644 (amd64-linux.c): Remove.
4645 (amd64-avx.c): Remove.
4646 (amd64-avx-linux.c): Remove.
4647 (amd64-avx-avx512.c): Remove.
4648 (amd64-avx-avx512-linux.c): Remove.
4649 (amd64-mpx.c): Remove.
4650 (amd64-mpx-linux.c): Remove.
4651 (amd64-avx-mpx-avx512-pku.c): Remove.
4652 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4653 (amd64-avx-mpx.c): Remove.
4654 (amd64-avx-mpx-linux.c): Remove.
4656 (x32-linux.c): Remove.
4657 (x32-avx.c): Remove.
4658 (x32-avx-linux.c): Remove.
4659 (x32-avx-avx512.c): Remove.
4660 (x32-avx-avx512-linux.c): Remove.
4661 (reg-xtensa.c): Remove.
4662 (reg-tilegx.c): Remove.
4663 (reg-tilegx32.c): Remove.
4665 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4667 * Makefile.in (SFILES): Add "common/environ.c".
4668 (OBJS): Add "common/environ.h".
4670 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4672 * configure.ac: Check if the fs_base and gs_base members of
4673 `struct user_regs_struct' exist.
4674 * config.in: Regenerated.
4675 * configure: Likewise.
4677 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4679 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4681 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4682 (get_next_pcs_syscall_next_pc): Likewise.
4684 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4686 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4687 * nto-x86-low.c: Likewise.
4689 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4691 * Makefile.in: Include disable-implicit-rules.mk.
4693 2016-11-23 Pedro Alves <palves@redhat.com>
4695 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4696 (debug_vprintf): Use std::chrono::steady_clock instead of
4697 gettimeofday. Use '.' instead of ':'.
4698 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4699 (get_timestamp): Use std::chrono::steady_clock instead of
4702 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4704 * Makefile.in: Fix whitespace formatting.
4706 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4708 * Makefile.in (SFILES, OBS): Flatten list and order
4711 2016-11-23 Pedro Alves <palves@redhat.com>
4713 * event-loop.c (handle_file_event): Use warning.
4714 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4715 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4718 2016-11-23 Pedro Alves <palves@redhat.com>
4720 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4722 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4723 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4724 debug_printf and debug_flush for debug output.
4725 * server.c (handle_general_set): Likewise.
4726 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4729 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4731 * Makefile.in (.c.o): Replace rule with ...
4732 (%.o: %.c): ... this one.
4734 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4736 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4737 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4739 * configure.ac: Remove checks for the make program.
4740 * configure: Re-generate.
4742 2016-10-28 Pedro Alves <palves@redhat.com>
4744 * Makefile.in (CXX_DIALECT): Get from configure.
4745 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4746 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4747 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4748 * config.in: Regenerate.
4749 * configure: Regenerate.
4751 2016-10-27 Yao Qi <yao.qi@linaro.org>
4753 * linux-low.c (linux_supports_range_stepping): Return true if
4754 can_software_single_step return true.
4756 2016-10-27 Yao Qi <yao.qi@linaro.org>
4758 * inferiors.c (find_inferior_in_random): New function.
4759 * inferiors.h (find_inferior_in_random): Declare.
4760 * linux-low.c (linux_wait_for_event_filtered): Call
4761 find_inferior_in_random instead of find_inferior.
4763 2016-10-27 Yao Qi <yao.qi@linaro.org>
4765 * linux-low.c (linux_wait_1): If single-step breakpoints are
4766 inserted, remove them.
4768 2016-10-26 Pedro Alves <palves@redhat.com>
4770 * linux-low.c (handle_extended_wait): Link parent/child fork
4772 (linux_wait_1): Unlink them.
4773 (linux_set_resume_request): Ignore resume requests for
4774 already-resumed and unhandled fork child threads.
4775 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4776 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4778 (handle_v_requests) <vCont>: Don't call require_running.
4779 * server.h (in_queued_stop_replies): New declaration.
4781 2016-10-24 Yao Qi <yao.qi@linaro.org>
4784 * linux-aarch64-low.c (append_insns): Cast the return value to
4787 2016-10-10 Yao Qi <yao.qi@linaro.org>
4789 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4791 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4793 * target.c (target_supports_multi_process): New function, moved
4795 * target.h (target_supports_multi_process): ... here. Remove
4798 2016-10-05 Tom Tromey <tom@tromey.com>
4801 * tracepoint.c (handle_tracepoint_bkpts): Check
4802 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4804 2016-10-05 Yao Qi <yao.qi@linaro.org>
4806 * configure.srv: Update the path of arm-*.xml files.
4808 2016-10-05 Terry Guo <terry.guo@arm.com>
4809 Yao Qi <yao.qi@linaro.org>
4811 * Makefile.in: Adjust the path of rules.
4812 * configure.srv: Update the path of xml files.
4813 * regformats/arm-with-iwmmxt.dat: Regenerated.
4814 * regformats/arm-with-neon.dat: Likewise.
4815 * regformats/arm-with-vfpv2.dat: Likewise.
4816 * regformats/arm-with-vfpv3.dat Likewise.
4818 2016-09-30 Yao Qi <yao.qi@linaro.org>
4821 * target.c (target_stop_and_wait): Don't call
4822 target_continue_no_signal, use resume_stop instead.
4824 2016-09-26 Yao Qi <yao.qi@linaro.org>
4826 * linux-low.c (linux_wait_1): Call debug_exit.
4828 2016-09-23 Pedro Alves <palves@redhat.com>
4830 * Makefile.in (SFILES): Add common/new-op.c.
4831 (OBS): Add common/new-op.o.
4832 (new-op.o): New rule.
4834 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4836 * .gitinore: Ignore more files.
4838 2016-09-21 Yao Qi <yao.qi@linaro.org>
4840 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4843 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4845 * server.c (start_inferior): Call target_mourn_inferior instead of
4846 mourn_inferior; pass ptid_t argument to it.
4848 (handle_target_event): Likewise.
4849 * target.c (target_mourn_inferior): New function.
4850 * target.h (mourn_inferior): Delete macro.
4852 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4854 * linux-low.c (lwp_is_stepping): New function.
4856 2016-09-06 Carl Love <cel@us.ibm.com>
4858 * server.c (start_inferior): Fixed comment, requested comment change
4859 didn't get updated correctly. Removed reference to ptrace () call as
4860 it is only true on Linux systems.
4862 2016-09-06 Carl Love <cel@us.ibm.com>
4864 * server.c (start_inferior): Do not call
4865 function target_post_create_inferior () if the
4866 inferior process has already exited.
4868 2016-09-05 Pedro Alves <palves@redhat.com>
4870 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4871 (COMPILE.pre, CC_LD): Use CXX directly.
4872 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4873 * acinclude.m4: Don't include build-with-cxx.m4.
4874 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4875 * configure: Regenerate.
4877 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4880 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4881 call writing data to own_buf.
4883 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4885 * target.c (mywait): Call target_wait instead of
4887 (target_wait): New function.
4889 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4891 * server.c (start_inferior): New variable 'ptid'. Replace calls
4892 to the_target->resume by target_continue{,_no_signal}, depending
4894 * target.c (target_stop_and_wait): Call target_continue_no_signal
4895 instead of the_target->resume.
4896 (target_continue): New function.
4898 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4900 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4902 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4905 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4907 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4908 * linux-arm-low.c (ps_get_thread_area): Likewise.
4909 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4910 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4911 * linux-mips-low.c (ps_get_thread_area): Likewise.
4912 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4913 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4914 * linux-x86-low.c (ps_get_thread_area): Likewise.
4915 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4917 2016-08-19 Pedro Alves <palves@redhat.com>
4919 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4921 2016-08-19 Pedro Alves <palves@redhat.com>
4923 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4924 comment. Use memcpy instead of casting through unsigned long.
4926 2016-08-19 Pedro Alves <palves@redhat.com>
4928 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4929 allocating around 0x80000000.
4931 2016-08-19 Pedro Alves <palves@redhat.com>
4934 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4935 (x32-avx512-linux-ipa.o): New rules.
4936 * configure.ac (x86_64-*-linux*): New x32 check.
4937 * configure.srv (ipa_x32_linux_regobj): New.
4938 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4939 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4941 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4943 * configure: Regenerate.
4945 2016-08-09 Pedro Alves <palves@redhat.com>
4948 * Makefile.in (OBS): Add signals-state-save-restore.o.
4949 (signals-state-save-restore.o): New rule.
4950 * config.in: Regenerate.
4951 * configure: Regenerate.
4952 * linux-low.c: Include "signals-state-save-restore.h".
4953 (linux_create_inferior): Call
4954 restore_original_signals_state.
4955 * server.c: Include "dispositions-save-restore.h".
4956 (captured_main): Call save_original_signals_state.
4958 2016-08-05 Pedro Alves <palves@redhat.com>
4960 * configure: Regenerate.
4962 2016-08-04 Yao Qi <yao.qi@linaro.org>
4964 * linux-low.c (regsets_fetch_inferior_registers): Check
4965 errno is ESRCH or not.
4967 2016-08-02 Yao Qi <yao.qi@linaro.org>
4969 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4970 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4971 (thread_db_load_search): Update.
4972 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4973 td_ta_set_event and td_ta_event_getmsg.
4975 2016-07-26 Pedro Alves <palves@redhat.com>
4978 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4979 of unsigned long for 64-bit registers and use uint32_t instead of
4980 unsigned int for 32-bit registers.
4982 2016-07-26 Pedro Alves <palves@redhat.com>
4984 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4987 2016-07-21 Tom Tromey <tom@tromey.com>
4989 * configure: Rebuild.
4991 2016-07-21 Yao Qi <yao.qi@linaro.org>
4993 * mem-break.c (find_gdb_breakpoint): Cast bp to
4994 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4996 2016-07-21 Yao Qi <yao.qi@linaro.org>
4998 * server.c (handle_v_requests): Support s and S actions
4999 if target_supports_software_single_step return true.
5001 2016-07-21 Yao Qi <yao.qi@linaro.org>
5003 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5004 is resume_step, call maybe_hw_step.
5005 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5007 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5009 (proceed_one_lwp): If resume request is resume_step, install
5010 reinsert breakpoints and call maybe_hw_step.
5012 2016-07-21 Yao Qi <yao.qi@linaro.org>
5014 * linux-low.c (proceed_one_lwp): Declare.
5015 (linux_resume_one_thread): Remove local variable 'step'.
5016 Lift code enqueue signal. Call proceed_one_lwp instead of
5017 linux_resume_one_lwp.
5019 2016-07-21 Yao Qi <yao.qi@linaro.org>
5021 * linux-low.c (linux_resume_one_thread): Call
5022 enqueue_pending_signal.
5024 2016-07-21 Yao Qi <yao.qi@linaro.org>
5026 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5027 * inferiors.c (do_restore_current_thread_cleanup): New function.
5028 (make_cleanup_restore_current_thread): Likewise.
5029 * linux-low.c (install_software_single_step_breakpoints): Call
5030 make_cleanup_restore_current_thread. Switch current_thread to
5033 2016-07-21 Yao Qi <yao.qi@linaro.org>
5035 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5036 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5037 (clone_one_breakpoint): Likewise.
5038 (delete_reinsert_breakpoints): Change parameter to thread.
5040 (has_reinsert_breakpoints): Likewise.
5041 (uninsert_reinsert_breakpoints): Likewise.
5042 (reinsert_reinsert_breakpoints): Likewise.
5043 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5044 (delete_reinsert_breakpoints): Likewise.
5045 (reinsert_reinsert_breakpoints): Likewise.
5046 (uninsert_reinsert_breakpoints): Likewise.
5047 (has_reinsert_breakpoints): Likewise.
5049 2016-07-21 Yao Qi <yao.qi@linaro.org>
5051 * inferiors.c (get_thread_process): Make parameter const.
5052 * inferiors.h (get_thread_process): Update declaration.
5053 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5054 Add new parameters child_thread and parent_thread. Callers
5056 * mem-break.h (clone_all_breakpoints): Update declaration.
5058 2016-07-21 Yao Qi <yao.qi@linaro.org>
5060 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5061 <command_list, handler>: Remove.
5062 (struct gdb_breakpoint): New.
5063 (struct other_breakpoint): New.
5064 (struct reinsert_breakpoint): New.
5065 (is_gdb_breakpoint): New function.
5066 (any_persistent_commands): Update command_list if
5067 is_gdb_breakpoint returns true.
5068 (set_breakpoint): Create breakpoints according to their types.
5069 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5070 (set_gdb_breakpoint_1): Likewise.
5071 (set_gdb_breakpoint): Likewise.
5072 (clear_breakpoint_conditions): Change parameter type to
5073 'struct gdb_breakpoint *'.
5074 (clear_breakpoint_commands): Likewise.
5075 (clear_breakpoint_conditions_and_commands): Likewise.
5076 (add_condition_to_breakpoint): Likewise.
5077 (add_breakpoint_condition): Likewise.
5078 (add_commands_to_breakpoint): Likewise.
5079 (check_breakpoints): Check other_breakpoint.
5080 (clone_one_breakpoint): Clone breakpopint according to its type.
5081 * mem-break.h (struct gdb_breakpoint): Declare.
5082 (set_gdb_breakpoint): Update declaration.
5083 (clear_breakpoint_conditions_and_commands): Likewise.
5084 (add_breakpoint_condition): Likewise.
5085 (add_breakpoint_commands): Likewise.
5086 * server.c (process_point_options): Change parameter type to
5087 'struct gdb_breakpoint *'.
5089 2016-07-21 Yao Qi <yao.qi@linaro.org>
5091 * mem-break.c (set_breakpoint_at): Rename it to ...
5092 (set_breakpoint_type_at): ... it.
5093 (set_breakpoint_at): Call set_breakpoint_type_at.
5094 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5095 * mem-break.h (set_breakpoint_at): Update comments.
5097 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5099 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5101 (nios2_store_gregset): Likewise.
5103 2016-07-01 Pedro Alves <palves@redhat.com>
5104 Antoine Tremblay <antoine.tremblay@ericsson.com>
5106 * linux-low.c: Change interface to take the target lwp_info
5107 pointer directly and return void. Handle detaching from a zombie
5109 (linux_detach_lwp_callback): New function.
5110 (linux_detach): Detach from the leader thread after detaching from
5113 2016-06-28 Yao Qi <yao.qi@linaro.org>
5115 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5116 for variable new_offset.
5117 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5118 (aarch64_ftrace_insn_reloc_cb): Likewise.
5119 (aarch64_ftrace_insn_reloc_tb): Likewise.
5120 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5121 PRIx64 instead of PRIx32.
5123 2016-06-28 Yao Qi <yao.qi@linaro.org>
5125 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5126 (the_low_target): Install arm_get_syscall_trapinfo.
5128 2016-06-28 Yao Qi <yao.qi@linaro.org>
5130 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5132 (the_low_target): Install aarch64_get_syscall_trapinfo.
5134 2016-06-28 Yao Qi <yao.qi@linaro.org>
5136 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5138 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5139 Remove parameter sysno.
5140 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5143 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5145 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5146 (s390_emit_ne_goto): Likewise.
5147 (s390_emit_lt_goto): Likewise.
5148 (s390_emit_le_goto): Likewise.
5149 (s390_emit_gt_goto): Likewise.
5150 (s390_emit_ge_goto): Likewise.
5151 (s390x_emit_eq_goto): Likewise.
5152 (s390x_emit_ne_goto): Likewise.
5153 (s390x_emit_lt_goto): Likewise.
5154 (s390x_emit_le_goto): Likewise.
5155 (s390x_emit_gt_goto): Likewise.
5156 (s390x_emit_ge_goto): Likewise.
5157 (s390_emit_ops_impl): Mark variable static.
5158 (s390x_emit_ops): Likewise.
5160 2016-06-17 Yao Qi <yao.qi@linaro.org>
5162 * linux-low.c (handle_extended_wait): Call
5163 uninsert_reinsert_breakpoints for the parent process. Remove
5164 reinsert breakpoints from the child process. Reinsert them to
5165 the parent process when vfork is done.
5166 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5167 (reinsert_reinsert_breakpoints): New function.
5168 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5169 (reinsert_reinsert_breakpoints): Declare.
5171 2016-06-17 Yao Qi <yao.qi@linaro.org>
5173 * linux-low.c (handle_extended_wait): If the parent is doing
5174 step-over, remove the reinsert breakpoints from the forked child.
5176 2016-06-17 Yao Qi <yao.qi@linaro.org>
5178 * linux-low.c (unsuspend_all_lwps): Declare.
5179 (linux_low_filter_event): If thread exited, call finish_step_over.
5180 If step-over is finished, unsuspend other threads.
5182 2016-06-17 Yao Qi <yao.qi@linaro.org>
5184 * linux-low.c (linux_resume_one_lwp_throw): Assert
5185 has_reinsert_breakpoints returns false.
5186 * mem-break.c (delete_disabled_breakpoints): Assert
5187 bp type isn't reinsert_breakpoint.
5189 2016-06-17 Yao Qi <yao.qi@linaro.org>
5191 * linux-low.c (maybe_hw_step): New function.
5192 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5193 (finish_step_over): Switch current_thread to lwp temporarily,
5194 and assert has_reinsert_breakpoints returns true.
5195 (proceed_one_lwp): Call maybe_hw_step.
5196 * mem-break.c (has_reinsert_breakpoints): New function.
5197 * mem-break.h (has_reinsert_breakpoints): Declare.
5199 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5201 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5203 2016-05-17 Yao Qi <yao.qi@linaro.org>
5205 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5206 instead of find_inferior.
5208 2016-05-05 Yao Qi <yao.qi@linaro.org>
5210 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5211 Initialize res to zero.
5213 2016-05-05 Yao Qi <yao.qi@linaro.org>
5215 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5218 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5220 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5221 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5222 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5224 2016-04-28 Par Olsson <par.olsson@windriver.com>
5225 Simon Marchi <simon.marchi@ericsson.com>
5227 * tracepoint.c (write_inferior_int8): New function.
5228 (cmd_qtenable_disable): Write enable flag using
5229 write_inferior_int8.
5231 2016-04-25 Yao Qi <yao.qi@linaro.org>
5233 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5234 (need_step_over_p): Return zero if the LWP has pending signals
5235 can be delivered on software single step target.
5237 2016-04-25 Yao Qi <yao.qi@linaro.org>
5239 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5240 return instead of error.
5242 2016-04-22 Yao Qi <yao.qi@linaro.org>
5244 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5247 2016-04-22 Yao Qi <yao.qi@linaro.org>
5249 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5250 signal when stepping over breakpoint with software single
5253 2016-04-21 Pedro Alves <palves@redhat.com>
5255 * linux-s390-low.c (s390_collect_ptrace_register)
5256 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5258 (s390_check_regset): Use void * instead of gdb_byte *.
5260 2016-04-20 Pedro Alves <palves@redhat.com>
5262 * configure: Renegerate.
5264 2016-04-20 Yao Qi <yao.qi@linaro.org>
5266 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5267 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5269 (arm_store_gregset): Likewise.
5271 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5273 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5274 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5275 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5276 (amd64-avx-mpx-linux.c): New rules.
5277 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5278 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5279 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5280 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5281 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5282 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5283 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5284 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5285 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5286 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5287 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5288 * linux-x86-low.c (x86_linux_read_description): Add case for
5289 X86_XSTATE_AVX_MPX_MASK.
5290 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5291 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5292 init_registers_i386_avx_mpx_linux.
5293 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5294 (initialize_low_tracepoint): Call
5295 init_registers_i386_avx_mpx_linux.
5296 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5297 (initialize_low_tracepoint): Call
5298 init_registers_amd64_avx_mpx_linux.
5299 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5300 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5301 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5304 2016-04-18 Pedro Alves <palves@redhat.com>
5306 * configure: Regenerate.
5308 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5310 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5311 (aarch64_emit_sub): Likewise.
5313 2016-04-12 Pedro Alves <palves@redhat.com>
5315 * utils.c (prepare_to_throw_exception): Delete.
5317 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5319 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5321 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5323 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5325 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5327 * linux-aarch64-ipa.c: Add <elf.h> include.
5328 * linux-ppc-ipa.c: Add <elf.h> include.
5329 * linux-s390-ipa.c: Add <elf.h> include.
5331 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5333 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5334 (get_raw_reg_ptr): Likewise.
5335 (get_trace_state_variable_value_ptr): Likewise.
5336 (set_trace_state_variable_value_ptr): Likewise.
5337 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5340 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5341 Marcin Kościelnicki <koriakin@0x04.net>
5344 * linux-ppc-low.c (emit_insns): New function.
5345 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5346 (ppc_emit_prologue): New function.
5347 (ppc_emit_epilogue): New function.
5348 (ppc_emit_add): New function.
5349 (ppc_emit_sub): New function.
5350 (ppc_emit_mul): New function.
5351 (ppc_emit_lsh): New function.
5352 (ppc_emit_rsh_signed): New function.
5353 (ppc_emit_rsh_unsigned): New function.
5354 (ppc_emit_ext): New function.
5355 (ppc_emit_zero_ext): New function.
5356 (ppc_emit_log_not): New function.
5357 (ppc_emit_bit_and): New function.
5358 (ppc_emit_bit_or): New function.
5359 (ppc_emit_bit_xor): New function.
5360 (ppc_emit_bit_not): New function.
5361 (ppc_emit_equal): New function.
5362 (ppc_emit_less_signed): New function.
5363 (ppc_emit_less_unsigned): New function.
5364 (ppc_emit_ref): New function.
5365 (ppc_emit_const): New function.
5366 (ppc_emit_reg): New function.
5367 (ppc_emit_pop): New function.
5368 (ppc_emit_stack_flush): New function.
5369 (ppc_emit_swap): New function.
5370 (ppc_emit_stack_adjust): New function.
5371 (ppc_emit_call): New function.
5372 (ppc_emit_int_call_1): New function.
5373 (ppc_emit_void_call_2): New function.
5374 (ppc_emit_if_goto): New function.
5375 (ppc_emit_goto): New function.
5376 (ppc_emit_eq_goto): New function.
5377 (ppc_emit_ne_goto): New function.
5378 (ppc_emit_lt_goto): New function.
5379 (ppc_emit_le_goto): New function.
5380 (ppc_emit_gt_goto): New function.
5381 (ppc_emit_ge_goto): New function.
5382 (ppc_write_goto_address): New function.
5383 (ppc_emit_ops_impl): New static variable.
5384 (ppc64v1_emit_prologue): New function.
5385 (ppc64v2_emit_prologue): New function.
5386 (ppc64_emit_epilogue): New function.
5387 (ppc64_emit_add): New function.
5388 (ppc64_emit_sub): New function.
5389 (ppc64_emit_mul): New function.
5390 (ppc64_emit_lsh): New function.
5391 (ppc64_emit_rsh_signed): New function.
5392 (ppc64_emit_rsh_unsigned): New function.
5393 (ppc64_emit_ext): New function.
5394 (ppc64_emit_zero_ext): New function.
5395 (ppc64_emit_log_not): New function.
5396 (ppc64_emit_bit_and): New function.
5397 (ppc64_emit_bit_or): New function.
5398 (ppc64_emit_bit_xor): New function.
5399 (ppc64_emit_bit_not): New function.
5400 (ppc64_emit_equal): New function.
5401 (ppc64_emit_less_signed): New function.
5402 (ppc64_emit_less_unsigned): New function.
5403 (ppc64_emit_ref): New function.
5404 (ppc64_emit_const): New function.
5405 (ppc64v1_emit_reg): New function.
5406 (ppc64v2_emit_reg): New function.
5407 (ppc64_emit_pop): New function.
5408 (ppc64_emit_stack_flush): New function.
5409 (ppc64_emit_swap): New function.
5410 (ppc64v1_emit_call): New function.
5411 (ppc64v2_emit_call): New function.
5412 (ppc64v1_emit_int_call_1): New function.
5413 (ppc64v2_emit_int_call_1): New function.
5414 (ppc64v1_emit_void_call_2): New function.
5415 (ppc64v2_emit_void_call_2): New function.
5416 (ppc64_emit_if_goto): New function.
5417 (ppc64_emit_eq_goto): New function.
5418 (ppc64_emit_ne_goto): New function.
5419 (ppc64_emit_lt_goto): New function.
5420 (ppc64_emit_le_goto): New function.
5421 (ppc64_emit_gt_goto): New function.
5422 (ppc64_emit_ge_goto): New function.
5423 (ppc64v1_emit_ops_impl): New static variable.
5424 (ppc64v2_emit_ops_impl): New static variable.
5425 (ppc_emit_ops): New function.
5426 (linux_low_target): Wire in ppc_emit_ops.
5428 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5429 Marcin Kościelnicki <koriakin@0x04.net>
5432 * Makefile.in: Add powerpc-*-ipa.o
5433 * configure.srv: Add ipa_obj for powerpc*-linux.
5434 * linux-ppc-ipa.c: New file.
5435 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5437 (PPC_FIELD): New macro.
5438 (PPC_SEXT): New macro.
5439 (PPC_OP6): New macro.
5440 (PPC_BO): New macro.
5441 (PPC_LI): New macro.
5442 (PPC_BD): New macro.
5443 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5444 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5445 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5446 (ppc_get_thread_area): New function.
5447 (is_elfv2_inferior): New function.
5448 (gen_ds_form): New function.
5449 (GEN_STD): New macro.
5450 (GEN_STDU): New macro.
5451 (GEN_LD): New macro.
5452 (GEN_LDU): New macro.
5453 (gen_d_form): New function.
5454 (GEN_ADDI): New macro.
5455 (GEN_ADDIS): New macro.
5456 (GEN_LI): New macro.
5457 (GEN_LIS): New macro.
5458 (GEN_ORI): New macro.
5459 (GEN_ORIS): New macro.
5460 (GEN_LWZ): New macro.
5461 (GEN_STW): New macro.
5462 (GEN_STWU): New macro.
5463 (gen_xfx_form): New function.
5464 (GEN_MFSPR): New macro.
5465 (GEN_MTSPR): New macro.
5466 (GEN_MFCR): New macro.
5467 (GEN_MTCR): New macro.
5468 (GEN_SYNC): New macro.
5469 (GEN_LWSYNC): New macro.
5470 (gen_x_form): New function.
5471 (GEN_OR): New macro.
5472 (GEN_MR): New macro.
5473 (GEN_LWARX): New macro.
5474 (GEN_STWCX): New macro.
5475 (GEN_CMPW): New macro.
5476 (gen_md_form): New function.
5477 (GEN_RLDICL): New macro.
5478 (GEN_RLDICR): New macro.
5479 (gen_i_form): New function.
5481 (GEN_BL): New macro.
5482 (gen_b_form): New function.
5483 (GEN_BNE): New macro.
5484 (GEN_LOAD): New macro.
5485 (GEN_STORE): New macro.
5486 (gen_limm): New function.
5487 (gen_atomic_xchg): New function.
5488 (gen_call): New function.
5489 (ppc_relocate_instruction): New function.
5490 (ppc_install_fast_tracepoint_jump_pad): New function.
5491 (ppc_get_min_fast_tracepoint_insn_len): New function.
5492 (ppc_get_ipa_tdesc_idx): New function.
5493 (the_low_target): Wire in the new functions.
5494 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5496 * linux-ppc-tdesc.h: New file.
5498 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5500 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5501 (alloc_jump_pad_buffer): New function.
5502 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5503 (alloc_jump_pad_buffer): New function.
5504 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5505 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5506 (alloc_jump_pad_buffer): New function.
5507 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5508 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5509 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5510 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5512 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5514 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5515 * linux-amd64-ipa.c: Likewise.
5516 * linux-i386-ipa.c: Likewise.
5517 * linux-s390-ipa.c: Likewise.
5518 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5519 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5520 set_trace_state_variable_value_ptr.
5521 (struct ipa_sym_addresses): Likewise.
5522 (symbol_list): Likewise.
5523 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5524 accessing gdb_collect directly.
5525 (gdb_collect_ptr_type): New typedef.
5526 (get_raw_reg_ptr_type): New typedef.
5527 (get_trace_state_variable_value_ptr_type): New typedef.
5528 (set_trace_state_variable_value_ptr_type): New typedef.
5529 (gdb_collect_ptr): New global.
5530 (get_raw_reg_ptr): New global.
5531 (get_trace_state_variable_value_ptr): New global.
5532 (set_trace_state_variable_value_ptr): New global.
5533 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5534 accessing get_raw_reg directly.
5535 (get_get_tsv_func_addr): Likewise for
5536 get_trace_state_variable_value_ptr.
5537 (get_set_tsv_func_addr): Likewise for
5538 set_trace_state_variable_value_ptr.
5539 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5541 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5543 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5545 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5547 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5549 (relocate_instruction): Remove own_buf.
5550 * server.c (own_buf): Make global.
5551 (handle_v_requests): Make global.
5552 * server.h (own_buf): New declaration.
5553 (handle_v_requests): New prototype.
5555 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5558 * linux-s390-low.c (add_insns): New function.
5559 (s390_emit_prologue): New function.
5560 (s390_emit_epilogue): New function.
5561 (s390_emit_add): New function.
5562 (s390_emit_sub): New function.
5563 (s390_emit_mul): New function.
5564 (s390_emit_lsh): New function.
5565 (s390_emit_rsh_signed): New function.
5566 (s390_emit_rsh_unsigned): New function.
5567 (s390_emit_ext): New function.
5568 (s390_emit_log_not): New function.
5569 (s390_emit_bit_and): New function.
5570 (s390_emit_bit_or): New function.
5571 (s390_emit_bit_xor): New function.
5572 (s390_emit_bit_not): New function.
5573 (s390_emit_equal): New function.
5574 (s390_emit_less_signed): New function.
5575 (s390_emit_less_unsigned): New function.
5576 (s390_emit_ref): New function.
5577 (s390_emit_if_goto): New function.
5578 (s390_emit_goto): New function.
5579 (s390_write_goto_address): New function.
5580 (s390_emit_litpool): New function.
5581 (s390_emit_const): New function.
5582 (s390_emit_call): New function.
5583 (s390_emit_reg): New function.
5584 (s390_emit_pop): New function.
5585 (s390_emit_stack_flush): New function.
5586 (s390_emit_zero_ext): New function.
5587 (s390_emit_swap): New function.
5588 (s390_emit_stack_adjust): New function.
5589 (s390_emit_set_r2): New function.
5590 (s390_emit_int_call_1): New function.
5591 (s390_emit_void_call_2): New function.
5592 (s390_emit_eq_goto): New function.
5593 (s390_emit_ne_goto): New function.
5594 (s390_emit_lt_goto): New function.
5595 (s390_emit_le_goto): New function.
5596 (s390_emit_gt_goto): New function.
5597 (s390_emit_ge_goto): New function.
5598 (s390x_emit_prologue): New function.
5599 (s390x_emit_epilogue): New function.
5600 (s390x_emit_add): New function.
5601 (s390x_emit_sub): New function.
5602 (s390x_emit_mul): New function.
5603 (s390x_emit_lsh): New function.
5604 (s390x_emit_rsh_signed): New function.
5605 (s390x_emit_rsh_unsigned): New function.
5606 (s390x_emit_ext): New function.
5607 (s390x_emit_log_not): New function.
5608 (s390x_emit_bit_and): New function.
5609 (s390x_emit_bit_or): New function.
5610 (s390x_emit_bit_xor): New function.
5611 (s390x_emit_bit_not): New function.
5612 (s390x_emit_equal): New function.
5613 (s390x_emit_less_signed): New function.
5614 (s390x_emit_less_unsigned): New function.
5615 (s390x_emit_ref): New function.
5616 (s390x_emit_if_goto): New function.
5617 (s390x_emit_const): New function.
5618 (s390x_emit_call): New function.
5619 (s390x_emit_reg): New function.
5620 (s390x_emit_pop): New function.
5621 (s390x_emit_stack_flush): New function.
5622 (s390x_emit_zero_ext): New function.
5623 (s390x_emit_swap): New function.
5624 (s390x_emit_stack_adjust): New function.
5625 (s390x_emit_int_call_1): New function.
5626 (s390x_emit_void_call_2): New function.
5627 (s390x_emit_eq_goto): New function.
5628 (s390x_emit_ne_goto): New function.
5629 (s390x_emit_lt_goto): New function.
5630 (s390x_emit_le_goto): New function.
5631 (s390x_emit_gt_goto): New function.
5632 (s390x_emit_ge_goto): New function.
5633 (s390_emit_ops): New function.
5634 (struct linux_target_ops): Fill in emit_ops hook.
5636 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5639 * Makefile.in: Add s390 IPA files.
5640 * configure.srv: Build IPA for s390.
5641 * linux-s390-ipa.c: New file.
5642 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5643 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5644 (tdesc_s390_linux32): Likewise.
5645 (init_registers_s390_linux32v1): Likewise.
5646 (tdesc_s390_linux32v1): Likewise.
5647 (init_registers_s390_linux32v2): Likewise.
5648 (tdesc_s390_linux32v2): Likewise.
5649 (init_registers_s390_linux64): Likewise.
5650 (tdesc_s390_linux64): Likewise.
5651 (init_registers_s390_linux64v1): Likewise.
5652 (tdesc_s390_linux64v1): Likewise.
5653 (init_registers_s390_linux64v2): Likewise.
5654 (tdesc_s390_linux64v2): Likewise.
5655 (init_registers_s390_te_linux64): Likewise.
5656 (tdesc_s390_te_linux64): Likewise.
5657 (init_registers_s390_vx_linux64): Likewise.
5658 (tdesc_s390_vx_linux64): Likewise.
5659 (init_registers_s390_tevx_linux64): Likewise.
5660 (tdesc_s390_tevx_linux64): Likewise.
5661 (init_registers_s390x_linux64): Likewise.
5662 (tdesc_s390x_linux64): Likewise.
5663 (init_registers_s390x_linux64v1): Likewise.
5664 (tdesc_s390x_linux64v1): Likewise.
5665 (init_registers_s390x_linux64v2): Likewise.
5666 (tdesc_s390x_linux64v2): Likewise.
5667 (init_registers_s390x_te_linux64): Likewise.
5668 (tdesc_s390x_te_linux64): Likewise.
5669 (init_registers_s390x_vx_linux64): Likewise.
5670 (tdesc_s390x_vx_linux64): Likewise.
5671 (init_registers_s390x_tevx_linux64): Likewise.
5672 (tdesc_s390x_tevx_linux64): Likewise.
5673 (have_hwcap_s390_vx): New static variable.
5674 (s390_arch_setup): Fill have_hwcap_s390_vx.
5675 (s390_get_thread_area): New function.
5676 (s390_ft_entry_gpr_esa): New const.
5677 (s390_ft_entry_gpr_zarch): New const.
5678 (s390_ft_entry_misc): New const.
5679 (s390_ft_entry_fr): New const.
5680 (s390_ft_entry_vr): New const.
5681 (s390_ft_main_31): New const.
5682 (s390_ft_main_64): New const.
5683 (s390_ft_exit_fr): New const.
5684 (s390_ft_exit_vr): New const.
5685 (s390_ft_exit_misc): New const.
5686 (s390_ft_exit_gpr_esa): New const.
5687 (s390_ft_exit_gpr_zarch): New const.
5688 (append_insns): New function.
5689 (s390_relocate_instruction): New function.
5690 (s390_install_fast_tracepoint_jump_pad): New function.
5691 (s390_get_min_fast_tracepoint_insn_len): New function.
5692 (s390_get_ipa_tdesc_idx): New function.
5693 (struct linux_target_ops): Wire in the above functions.
5694 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5695 * linux-s390-tdesc.h: New file.
5697 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5699 * linux-s390-low.c (s390_supports_tracepoints): New function.
5700 (struct linux_target_ops): Fill supports_tracepoints hook.
5702 2016-03-18 Yao Qi <yao.qi@linaro.org>
5704 * linux-low.c (lwp_signal_can_be_delivered): New function.
5705 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5707 2016-03-18 Yao Qi <yao.qi@linaro.org>
5709 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5710 0 if signal is enqueued. Remove 'signal' from one debugging
5711 message. Move one debugging message to some lines below.
5712 Remove code setting 'signal' to 0.
5714 2016-03-18 Yao Qi <yao.qi@linaro.org>
5716 * linux-low.c (linux_low_filter_event): Remove redundant
5717 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5719 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5721 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5722 (struct linux_target_ops): Wire in the above.
5724 2016-03-03 Yao Qi <yao.qi@linaro.org>
5726 * linux-low.c: Update comments to start_step_over.
5728 2016-03-03 Yao Qi <yao.qi@linaro.org>
5731 * linux-low.c (handle_extended_wait): Set child suspended
5732 if event_lwp->bp_reinsert isn't zero.
5734 2016-03-02 Yao Qi <yao.qi@linaro.org>
5736 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5737 enqueue_pending_signal.
5739 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5741 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5744 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5746 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5747 (s390_regmap_3264) [!__s390x__]: New global.
5748 (s390_collect_ptrace_register): Skip map entries containing -1.
5749 (s390_supply_ptrace_register): Ditto.
5750 (s390_fill_gprs_high): New function.
5751 (s390_store_gprs_high): New function.
5752 (s390_regsets): Add NT_S390_HIGH_GPRS.
5753 (s390_get_hwcap): Enable on 31-bit.
5754 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5755 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5756 Detect NT_S390_HIGH_GPRS.
5757 (s390_usrregs_info_3264): Enable on 31-bit.
5758 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5759 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5761 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5764 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5765 * configure.srv: Ditto.
5766 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5767 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5768 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5769 (init_registers_amd64_linux): Remove prototype.
5770 (tdesc_amd64_linux): Remove declaration.
5771 (get_ipa_tdesc): New function.
5772 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5773 initialize remaining tdescs.
5774 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5775 (init_registers_i386_linux): Remove prototype.
5776 (tdesc_i386_linux): Remove declaration.
5777 (get_ipa_tdesc): New function.
5778 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5779 initialize remaining tdescs.
5780 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5781 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5782 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5783 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5784 (x86_get_ipa_tdesc_idx): New function.
5785 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5786 * linux-x86-tdesc.h: New file.
5787 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5788 (target_get_ipa_tdesc_idx): New macro.
5789 * tracepoint.c (ipa_tdesc_idx): New macro.
5790 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5791 (symbol_list): Add ipa_tdesc_idx.
5792 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5793 (ipa_tdesc): Remove.
5794 (ipa_tdesc_idx): New variable.
5795 (get_context_regcache): Use get_ipa_tdesc.
5796 (gdb_collect): Ditto.
5798 * tracepoint.h (get_ipa_tdesc): New prototype.
5799 (ipa_tdesc): Remove.
5801 2016-02-24 Pedro Alves <palves@redhat.com>
5803 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5804 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5805 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5806 Factor out common code between the USE_SIGTRAP_SIGINFO and
5807 !USE_SIGTRAP_SIGINFO blocks.
5808 (linux_low_filter_event): Call save_stop_reason instead of
5809 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5811 (linux_wait_1): Update comments.
5813 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5815 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5816 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5817 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5818 ppc_insert_point, ppc_remove_point.
5820 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5822 * linux-s390-low.c (s390_supports_z_point_type): New function.
5823 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5825 2016-02-16 Yao Qi <yao.qi@linaro.org>
5827 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5828 PC. Get pc from regcache_read_pc.
5830 2016-02-12 Yao Qi <yao.qi@linaro.org>
5832 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5833 or linux_get_pc_32bit.
5834 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5836 2016-02-12 Yao Qi <yao.qi@linaro.org>
5838 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5839 arm_linux_get_next_pcs_fixup.
5841 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5843 * tracepoint.c (x_tracepoint_action_download): Change
5844 write_inferior_data_ptr to write_inferior_data_pointer.
5845 (cmd_qtstart): Likewise.
5846 (write_inferior_data_ptr): Remove.
5847 (download_agent_expr): Change write_inferior_data_ptr to
5848 write_inferior_data_pointer.
5849 (download_tracepoint_1): Likewise.
5850 (download_tracepoint): Likewise.
5851 (download_trace_state_variables): Likewise.
5853 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5854 Marcin Kościelnicki <koriakin@0x04.net>
5856 * tracepoint.c (struct tracepoint_action_ops): Remove.
5857 (struct tracepoint_action): Remove ops.
5858 (m_tracepoint_action_download, r_tracepoint_action_download)
5859 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5860 size and offset accordingly.
5861 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5862 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5863 (tracepoint_action_send, tracepoint_action_download): New functions.
5864 Helpers for trace action handlers.
5865 (add_tracepoint_action): Remove setup actions ops.
5866 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5868 2016-02-10 Yao Qi <yao.qi@linaro.org>
5870 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5872 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5874 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5876 * configure: Regenerate.
5878 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5880 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5881 void * to gdb_byte *.
5882 * linux-low.c (siginfo_fixup): Likewise.
5883 (linux_xfer_siginfo): Likewise.
5884 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5886 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5888 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5890 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5892 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5894 * linux-x86-low.c [__x86_64__]: Include
5895 "nat/amd64-linux-siginfo.h".
5896 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5897 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5898 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5899 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5900 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5901 (cpt_si_fd, si_timerid, si_overrun): Move from
5902 nat/amd64-linux-siginfo.c.
5903 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5905 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5907 * server.c (skip_to_semicolon): Remove.
5908 (process_point_options): Use strchrnul instead of
5911 2016-01-26 Yao Qi <yao.qi@linaro.org>
5913 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5914 * linux-low.c (install_software_single_step_breakpoints): Don't
5915 call regcache_read_pc.
5916 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5919 2016-01-26 Yao Qi <yao.qi@linaro.org>
5921 * linux-low.c (install_software_single_step_breakpoints): Call
5922 regcache_read_pc instead of get_pc.
5924 2016-01-26 Yao Qi <yao.qi@linaro.org>
5926 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5927 (unblock_async_io): Rename to ...
5928 (block_unblock_async_io): ... it. New function.
5929 (enable_async_io): Don't install SIGIO handler. Unblock it
5931 (disable_async_io): Don't ignore SIGIO. Block it instead.
5932 (initialize_async_io): Install SIGIO handler. Don't call
5935 2016-01-26 Yao Qi <yao.qi@linaro.org>
5937 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5938 first character is '\003', call *the_target->request_interrupt.
5940 2016-01-25 Yao Qi <yao.qi@linaro.org>
5942 * remote-utils.c (new_thread_notify): Remove.
5943 (dead_thread_notify): Likewise.
5944 * remote-utils.h (new_thread_notify): Remove declaration.
5945 (dead_thread_notify): Likewise.
5947 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5949 * gdb.trace/pending.exp: Fix expected message on continue.
5951 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5953 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5954 it works properly on big-endian machines where sizeof (CORE_ADDR)
5957 2016-01-21 Pedro Alves <palves@redhat.com>
5959 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5960 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5961 * configure: Regenerate.
5963 2016-01-21 Yao Qi <yao.qi@linaro.org>
5965 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5966 is_thumb and set it according to CPSR saved on the stack.
5967 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5968 arm_sigreturn_next_pc.
5970 2016-01-18 Yao Qi <yao.qi@linaro.org>
5972 * linux-low.c (linux_set_pc_64bit): New function.
5973 (linux_get_pc_64bit): New function.
5974 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5976 * linux-sparc-low.c (debug_threads): Remove declaration.
5977 (sparc_get_pc): Remove.
5978 (the_low_target): Use linux_get_pc_64bit instead of
5980 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5981 (the_low_target): Use linux_get_pc_64bit and
5984 2016-01-18 Yao Qi <yao.qi@linaro.org>
5986 * linux-arm-low.c (debug_threads): Remove declaration.
5987 (arm_get_pc, arm_set_pc): Remove.
5988 (the_low_target): Use linux_get_pc_32bit and
5990 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5991 (the_low_target): Use linux_get_pc_32bit and
5993 * linux-cris-low.c (debug_threads): Remove declaration.
5994 (cris_get_pc, cris_set_pc,): Remove.
5995 (the_low_target): Use linux_get_pc_32bit and
5997 * linux-crisv32-low.c (debug_threads): Remove declaration.
5998 (cris_get_pc, cris_set_pc): Remove.
5999 (the_low_target): Use linux_get_pc_32bit and
6001 * linux-low.c: Include inttypes.h.
6002 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6003 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6004 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6005 (the_low_target): Use linux_get_pc_32bit and
6007 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6008 (the_low_target): Use linux_get_pc_32bit and
6010 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6011 (the_low_target): Use linux_get_pc_32bit and
6013 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6014 (the_low_target): Use linux_get_pc_32bit and
6016 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6017 (the_low_target): Use linux_get_pc_32bit and
6020 2016-01-18 Gary Benson <gbenson@redhat.com>
6022 * configure.ac (AC_FUNC_FORK): New check.
6023 * config.in: Regenerate.
6024 * configure: Likewise.
6026 2016-01-14 Yao Qi <yao.qi@linaro.org>
6028 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6029 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6030 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6031 arm_get_next_pcs_ctor.
6033 2016-01-12 Josh Stone <jistone@redhat.com>
6034 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6036 * inferiors.h: Include "gdb_vecs.h".
6037 (struct process_info): Add syscalls_to_catch.
6038 * inferiors.c (remove_process): Free syscalls_to_catch.
6039 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6040 syscall_return stops.
6041 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6042 * server.c (handle_general_set): Handle QCatchSyscalls.
6043 (handle_query): Report support for QCatchSyscalls.
6044 * target.h (struct target_ops): Add supports_catch_syscall.
6045 (target_supports_catch_syscall): New macro.
6046 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6047 (struct lwp_info): Add syscall_state.
6048 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6049 Maintain syscall_state and syscalls_to_catch across exec.
6050 (get_syscall_trapinfo): New function, proxy to the_low_target.
6051 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6052 (linux_low_filter_event): Toggle syscall_state entry/return for
6053 syscall traps, and set it ignored for all others.
6054 (gdb_catching_syscalls_p): New function.
6055 (gdb_catch_this_syscall_p): New function.
6056 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6057 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6058 (linux_supports_catch_syscall): New function.
6059 (linux_target_ops): Install it.
6060 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6061 (the_low_target): Install it.
6063 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6065 * acinclude.m4: Include new ../warning.m4 file.
6066 * configure: Regenerated.
6067 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6069 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6071 * ax.c (is_goto_target): Mark static.
6072 * linux-low.c (register_addr): Likewise.
6073 (linux_fetch_registers, linux_store_registers): Likewise.
6074 * mem-break.c (any_persistent_commands): Fix old prototype.
6075 (add_commands_to_breakpoint): Mark static.
6076 * regcache.c (find_register_by_name): Delete unused func.
6077 * remote-utils.c (hex_or_minus_one): Mark static.
6078 * server.c (monitor_show_help): Mark static.
6079 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6080 handle_v_requests): Likewise.
6082 2016-01-12 Pedro Alves <palves@redhat.com>
6084 Remove use of the registered trademark symbol throughout.
6086 2016-01-08 Yao Qi <yao.qi@linaro.org>
6088 * remote-utils.c (getpkt): If c is '\003', call target hook
6091 2016-01-06 Yao Qi <yao.qi@linaro.org>
6093 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6094 linux-aarch32-low.c.
6095 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6096 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6097 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6098 (thumb2_breakpoint): Declare.
6099 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6100 linux-aarch32-low.h.
6101 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6102 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6103 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6105 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6107 * gdbreplay.c (gdbreplay_version): Change copyright year in
6109 * server.c (gdbserver_version): Likewise.
6111 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6113 * server.c (crc32_table): Delete.
6114 (crc32): Use libiberty's xcrc32 function.
6116 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6118 * lynx-low.c (lynx_delete_thread_callback): New function.
6119 (lynx_mourn): Properly delete our process and all of its
6120 threads. Remove call to clear_inferiors.
6122 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6124 * target.c (thread_search_callback): Add check that
6125 the thread_stopped target callback is not NULL before
6128 2015-12-21 Yao Qi <yao.qi@linaro.org>
6130 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6133 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6135 * server.c (handle_query): Call target_supports_software_single_step.
6137 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6139 * linux-low.c (single_step): New function.
6140 (linux_resume_one_lwp_throw): Call single_step.
6141 (start_step_over): Likewise.
6143 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6145 * Makefile.in (SFILES): Append arch/arm-linux.c,
6146 arch/arm-get-next-pcs.c.
6147 (arm-linux.o): New rule.
6148 (arm-get-next-pcs.o): New rule.
6149 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6151 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6152 to linux-aarch32-low.c.
6153 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6154 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6155 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6156 (thumb2_breakpoint_len): Likewise.
6157 (arm_is_thumb_mode): Make non-static.
6158 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6159 from linux-aarch32-low.c.
6160 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6161 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6162 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6163 (thumb2_breakpoint_len): Likewise.
6164 (arm_is_thumb_mode): New declaration.
6165 * linux-arm-low.c: Include arch/arm-linux.h
6166 aarch/arm-get-next-pcs.h, sys/syscall.h.
6167 (get_next_pcs_ops): New struct.
6168 (get_next_pcs_addr_bits_remove): New function.
6169 (get_next_pcs_is_thumb): New function.
6170 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6171 (arm_sigreturn_next_pc): Likewise.
6172 (get_next_pcs_syscall_next_pc): Likewise.
6173 (arm_gdbserver_get_next_pcs): Likewise.
6174 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6176 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6177 * server.h: Include gdb_vecs.h.
6179 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6181 * Makefile.in (SFILES): Append common/common-regcache.c.
6182 (OBS): Append common-regcache.o.
6183 (common-regcache.o): New rule.
6184 * regcache.c (init_register_cache): Initialize cache to
6186 (regcache_raw_read_unsigned): New function.
6187 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6188 register_status enum.
6190 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6192 * linux-aarch64-low.c (the_low_targets): Rename
6193 breakpoint_reinsert_addr to get_next_pcs.
6194 * linux-arm-low.c (the_low_targets): Likewise.
6195 * linux-bfin-low.c (the_low_targets): Likewise.
6196 * linux-cris-low.c (the_low_targets): Likewise.
6197 * linux-crisv32-low.c (the_low_targets): Likewise.
6198 * linux-low.c (can_software_single_step): Likewise.
6199 (install_software_single_step_breakpoints): New function.
6200 (start_step_over): Use install_software_single_step_breakpoints.
6201 * linux-low.h: New CORE_ADDR vector.
6202 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6204 * linux-mips-low.c (the_low_targets): Likewise.
6205 * linux-nios2-low.c (the_low_targets): Likewise.
6206 * linux-sparc-low.c (the_low_targets): Likewise.
6208 2015-12-17 Pedro Alves <palves@redhat.com>
6210 * linux-low.c (linux_kill_one_lwp): Remove references to
6212 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6214 (linux_init_signals): Delete.
6215 (initialize_low): Adjust.
6216 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6218 2015-12-16 Pedro Alves <palves@redhat.com>
6220 * configure.ac (compiler warning flags): When testing a
6221 -Wno-foo option, check whether -Wfoo works instead.
6222 * configure: Regenerate.
6224 2015-12-11 Don Breazeal <donb@codesourcery.com>
6226 * server.c (process_serial_event): Don't exit from gdbserver
6227 in remote mode if there are still active inferiors.
6229 2015-12-11 Yao Qi <yao.qi@linaro.org>
6231 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6232 arm_breakpoint_at if the process is 32-bit.
6234 2015-12-11 Yao Qi <yao.qi@linaro.org>
6236 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6239 2015-12-07 Yao Qi <yao.qi@linaro.org>
6241 * configure.srv: Append arm.o to srv_tgtobj for
6242 aarch64*-*-linux* target.
6243 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6244 from linux-arm-low.c.
6245 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6246 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6247 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6248 (thumb2_breakpoint_len): Likewise.
6249 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6250 (arm_breakpoint_kinds): Likewise.
6251 (arm_breakpoint_kind_from_pc): Likewise.
6252 (arm_sw_breakpoint_from_kind): Likewise.
6253 (arm_breakpoint_kind_from_current_state): Likewise.
6254 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6255 (arm_sw_breakpoint_from_kind): Declare.
6256 (arm_breakpoint_kind_from_current_state): Declare.
6257 (arm_breakpoint_at): Declare.
6258 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6259 arm_sw_breakpoint_from_kind if process is 32-bit.
6260 (aarch64_breakpoint_kind_from_pc): New function.
6261 (aarch64_breakpoint_kind_from_current_state): New function.
6262 (the_low_target): Initialize fields breakpoint_kind_from_pc
6263 and breakpoint_kind_from_current_state.
6264 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6265 linux-aarch32-low.c.
6266 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6267 (arm_breakpoint, arm_breakpoint_len): Likewise.
6268 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6269 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6270 (arm_is_thumb_mode): Likewise.
6271 (arm_breakpoint_at): Likewise.
6272 (arm_breakpoint_kind_from_pc): Likewise.
6273 (arm_sw_breakpoint_from_kind): Likewise.
6274 (arm_breakpoint_kind_from_current_state): Likewise.
6277 2015-08-04 Yao Qi <yao.qi@linaro.org>
6279 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6280 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6281 * server.c (extended_protocol): Remove "static".
6282 * server.h (extended_protocol): Declare it.
6284 2015-12-04 Josh Stone <jistone@redhat.com>
6286 * target.h (struct target_ops) <arch_setup>: Rename to ...
6287 (struct target_ops) <post_create_inferior>: ... this.
6288 (target_arch_setup): Rename to ...
6289 (target_post_create_inferior): ... this, calling post_create_inferior.
6290 * server.c (start_inferior): Update target_arch_setup calls to
6291 target_post_create_inferior.
6292 * linux-low.c (linux_low_ptrace_options): Forward declare.
6293 (linux_arch_setup): Update its comment for general use.
6294 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6295 (struct linux_target_ops): Use linux_post_create_inferior.
6296 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6297 to post_create_inferior.
6298 * nto-low.c (struct nto_target_ops): Likewise.
6299 * spu-low.c (struct spu_target_ops): Likewise.
6300 * win32-low.c (struct win32_target_ops): Likewise.
6302 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6304 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6306 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6308 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6309 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6310 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6311 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6312 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6313 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6314 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6315 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6316 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6317 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6318 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6319 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6321 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6323 * linux-low.c (linux_look_up_symbols): Don't call
6324 linux_supports_traceclone.
6325 * linux-low.h (thread_db_init): Remove use_events argument.
6326 * thread-db.c (thread_db_use_event): Remove global variable.
6327 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6328 (struct thread_db) <td_create_bp>: Remove field.
6329 (thread_db_create_event): Remove function.
6330 (thread_db_enable_reporting): Likewise.
6331 (find_one_thread): Don't check for thread_db_use_events.
6332 (attach_thread): Likewise.
6333 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6334 (try_thread_db_load_1): Don't check for thread_db_use_events.
6335 (thread_db_init): Remove use_events argument and thread events
6337 (remove_thread_event_breakpoints): Remove function.
6338 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6340 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6342 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6344 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6345 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6346 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6347 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6348 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6350 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6352 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6353 * linux-low.c (can_hardware_single_step): Use
6354 supports_hardware_single_step.
6355 (can_software_single_step): New function.
6356 (start_step_over): Call can_software_single_step.
6357 (linux_supports_hardware_single_step): New function.
6358 (struct target_ops) <supports_software_single_step>: Initialize.
6359 * linux-low.h (struct linux_target_ops)
6360 <supports_hardware_single_step>: Initialize.
6361 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6362 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6363 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6364 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6365 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6366 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6367 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6368 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6369 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6370 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6372 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6373 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6375 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6376 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6377 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6379 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6380 * target.h (struct target_ops): <supports_software_single_step>:
6382 (target_supports_software_single_step): New macro.
6384 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6386 * linux-low.c (linux_wait_1): Fix pc advance condition.
6387 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6388 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6390 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6392 * linux-arm-low.c (arm_is_thumb_mode): New function.
6393 (arm_breakpoint_at): Use arm_is_thumb_mode.
6394 (arm_breakpoint_kind_from_current_state): New function.
6395 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6397 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6398 (linux_breakpoint_kind_from_current_state): New function.
6399 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6400 * linux-low.h (struct linux_target_ops)
6401 <breakpoint_kind_from_current_state>: New field.
6402 * target.h (struct target_ops): Likewise.
6403 (target_breakpoint_kind_from_current_state): New macro.
6405 2015-11-30 Pedro Alves <palves@redhat.com>
6407 * linux-low.c (linux_resume): Wake up the event loop before
6410 2015-11-30 Pedro Alves <palves@redhat.com>
6412 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6414 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6416 * target.c (struct thread_search): New structure.
6417 (thread_search_callback): New function.
6418 (prev_general_thread): New global.
6419 (prepare_to_access_memory, done_accessing_memory): New functions.
6420 * target.h (prepare_to_access_memory, done_accessing_memory):
6421 Replace macros with function declarations.
6423 2015-11-30 Pedro Alves <palves@redhat.com>
6426 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6427 report TARGET_WAITKIND_NO_RESUMED.
6428 * remote-utils.c (prepare_resume_reply): Handle
6429 TARGET_WAITKIND_NO_RESUMED.
6430 * server.c (report_no_resumed): New global.
6431 (handle_query) <qSupported>: Handle "no-resumed+". Report
6432 "no-resumed+" support.
6433 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6434 return error if the client doesn't support no-resumed events.
6435 (push_stop_notification): New function.
6436 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6437 events if the client supports them.
6439 2015-11-30 Pedro Alves <palves@redhat.com>
6441 * linux-low.c (thread_still_has_status_pending_p): Don't check
6443 (lwp_resumed): New function.
6444 (status_pending_p_callback): Return early if the LWP is not
6445 supposed to be resumed.
6447 2015-11-30 Pedro Alves <palves@redhat.com>
6449 * linux-low.c (handle_extended_wait): Assert that the LWP's
6450 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6451 thread create events, leave the new child's status pending.
6452 (linux_low_filter_event): If GDB wants to hear about thread exit
6453 events, leave the LWP marked dead and don't delete it.
6454 (linux_wait_for_event_filtered): Don't check for thread exit.
6455 (filter_exit_event): New function.
6456 (linux_wait_1): Use it, when returning an exit event.
6457 (linux_resume_one_lwp_throw): Assert that the LWP's
6458 waitstatus is TARGET_WAITKIND_IGNORE.
6459 * remote-utils.c (prepare_resume_reply): Handle
6460 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6461 * server.c (report_thread_events): New global.
6462 (handle_general_set): Handle QThreadEvents.
6463 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6464 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6465 TARGET_WAITKIND_THREAD_EXITED.
6466 * server.h (report_thread_events): Declare.
6468 2015-11-30 Pedro Alves <palves@redhat.com>
6470 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6471 the thread's last_resume_kind was resume_stop.
6473 2015-11-30 Pedro Alves <palves@redhat.com>
6475 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6478 2015-11-30 Pedro Alves <palves@redhat.com>
6480 * server.c (handle_v_requests): Handle vCtrlC.
6482 2015-11-30 Pedro Alves <palves@redhat.com>
6484 * gdbthread.h (find_any_thread_of_pid): Declare.
6485 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6487 * server.c (handle_query): If current_thread is NULL, look for
6488 another thread of the selected process.
6490 2015-11-26 Daniel Colascione <dancol@dancol.org>
6491 Simon Marchi <simon.marchi@ericsson.com>
6493 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6494 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6496 * target.h (struct target_ops) <thread_name>: New field.
6497 (target_thread_name): New macro.
6499 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6501 * regcache.h (regcache_invalidate_pid): Add declaration.
6502 * regcache.c (regcache_invalidate_pid): New function, extracted
6503 from regcache_invalidate.
6504 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6505 Add trivial documentation comment.
6506 * lynx-low.c: Use regcache_invalidate_pid instead of
6507 regcache_invalidate.
6509 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6511 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6512 and Elf64_auxv_t if the target is Android.
6514 2015-11-22 Doug Evans <xdje42@gmail.com>
6516 * target.h: #include <sys/types.h>.
6518 2015-11-19 Pedro Alves <palves@redhat.com>
6520 * linux-low.c (linux_process_qsupported): Change prototype.
6522 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6524 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6525 and adjust to loop over all features.
6526 * server.c (handle_query) <qSupported>: Adjust to call
6527 target_process_qsupported once, passing it a vector of unprocessed
6529 * target.h (struct target_ops) <process_qsupported>: Change
6531 (target_process_qsupported): Adjust.
6533 2015-11-19 Pedro Alves <palves@redhat.com>
6535 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6537 * configure: Regenerate.
6539 2015-11-19 Pedro Alves <palves@redhat.com>
6541 * configure: Regenerate.
6543 2015-11-19 Yao Qi <yao.qi@linaro.org>
6545 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6548 2015-11-19 Yao Qi <yao.qi@linaro.org>
6550 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6551 (struct aarch64_operand): Move enum out.
6553 2015-11-19 Yao Qi <yao.qi@linaro.org>
6555 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6556 struct user_fpsimd_state *.
6557 (aarch64_store_fpregset): Likewise.
6559 2015-11-19 Yao Qi <yao.qi@linaro.org>
6561 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6562 struct user_pt_regs *.
6563 (aarch64_store_gregset): Likewise.
6565 2015-11-18 Pedro Alves <palves@redhat.com>
6567 * Makefile.in (all_object_files): Add $IPA_OBJS.
6569 2015-11-17 Pedro Alves <palves@redhat.com>
6571 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6572 GDB_SIGNAL_0 and gdb_signal_to_string.
6574 2015-11-17 Pedro Alves <palves@redhat.com>
6576 * win32-low.c (handle_output_debug_string): Remove parameter.
6577 (win32_kill): Remove our_status local and adjust call to
6578 handle_output_debug_string.
6579 (get_child_debug_event): Adjust call to
6580 handle_output_debug_string.
6582 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6584 * linux-mips-low.c (mips_fill_gregset): Add cast.
6585 (mips_store_gregset): Likewise.
6586 (mips_fill_fpregset): Likewise.
6587 (mips_store_fpregset): Likewise.
6589 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6591 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6594 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6596 * linux-mips-low.c (mips_linux_new_thread): Change type of
6597 watch_type to enum target_hw_bp_type.
6599 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6601 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6602 Change return type to arm_hwbp_type.
6604 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6606 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6607 (arm_store_gregset): Likewise.
6608 * linux-arm-low.c (arm_get_hwcap): Likewise.
6609 (arm_read_description): Likewise.
6611 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6613 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6615 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6617 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6618 (ppc_fill_vsxregset): Likewise.
6619 (ppc_store_vsxregset): Likewise.
6620 (ppc_fill_vrregset): Likewise.
6621 (ppc_store_vrregset): Likewise.
6622 (ppc_fill_evrregset): Likewise.
6623 (ppc_store_evrregset): Likewise.
6625 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6627 * linux-ppc-low.c (ppc_usrregs_info): Remove
6628 forward-declaration.
6629 (ppc_arch_setup): Move lower in file.
6631 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6633 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6634 (ps_pdwrite): Likewise.
6636 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6638 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6639 to after assert checks.
6641 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6643 * proc-service.c (ps_pdread): Add/adjust casts.
6644 (ps_pdwrite): Add/adjust casts.
6646 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6648 * server.c (handle_search_memory_1): Cast return value of
6651 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6653 * server.c (write_qxfer_response): Change type of data to
6656 2015-10-29 Pedro Alves <palves@redhat.com>
6658 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6660 2015-10-29 Pedro Alves <palves@redhat.com>
6662 * tracepoint.c (clear_installed_tracepoints): Add casts.
6664 2015-10-29 Pedro Alves <palves@redhat.com>
6666 * server.c (handle_v_cont, process_serial_event): Add enum
6667 gdb_signal casts to signal parsing code.
6669 2015-10-29 Pedro Alves <palves@redhat.com>
6671 * linux-low.h (NULL_REGSET): Define.
6672 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6673 * linux-arm-low.c (arm_regsets): Likewise.
6674 * linux-crisv32-low.c (cris_regsets): Likewise.
6675 * linux-m68k-low.c (m68k_regsets): Likewise.
6676 * linux-mips-low.c (mips_regsets): Likewise.
6677 * linux-nios2-low.c (nios2_regsets): Likewise.
6678 * linux-ppc-low.c (ppc_regsets): Likewise.
6679 * linux-s390-low.c (s390_regsets): Likewise.
6680 * linux-sh-low.c (sh_regsets): Likewise.
6681 * linux-sparc-low.c (sparc_regsets): Likewise.
6682 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6683 * linux-tile-low.c (tile_regsets): Likewise.
6684 * linux-x86-low.c (x86_regsets): Likewise.
6685 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6687 2015-10-29 Pedro Alves <palves@redhat.com>
6689 * linux-low.h (NULL_REGSET): Define.
6690 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6691 * linux-arm-low.c (arm_regsets): Likewise.
6692 * linux-crisv32-low.c (cris_regsets): Likewise.
6693 * linux-m68k-low.c (m68k_regsets): Likewise.
6694 * linux-mips-low.c (mips_regsets): Likewise.
6695 * linux-nios2-low.c (nios2_regsets): Likewise.
6696 * linux-ppc-low.c (ppc_regsets): Likewise.
6697 * linux-s390-low.c (s390_regsets): Likewise.
6698 * linux-sh-low.c (sh_regsets): Likewise.
6699 * linux-sparc-low.c (sparc_regsets): Likewise.
6700 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6701 * linux-tile-low.c (tile_regsets): Likewise.
6702 * linux-x86-low.c (x86_regsets): Likewise.
6703 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6705 2015-10-26 Doug Evans <dje@google.com>
6707 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6709 2015-10-26 Doug Evans <dje@google.com>
6711 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6713 2015-10-26 Doug Evans <dje@google.com>
6715 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6717 (attach_thread, find_new_threads_callback): Ditto.
6719 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6721 * mem-break.h (set_breakpoint_data): Remove.
6723 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6725 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6726 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6727 (initialize_low): Remove set_breakpoint_data call.
6728 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6729 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6730 (initialize_low): Remove set_breakpoint_data call.
6731 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6732 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6733 (initialize_low): Remove set_breakpoint_data call.
6735 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6737 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6738 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6739 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6740 * target.h (target_breakpoint_kind_from_pc): New macro.
6742 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6744 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6745 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6746 the default breakpoint kind.
6748 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6750 * linux-arm-low.c (arm_supports_z_point_type): Add software
6753 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6755 * linux-arm-low.c: Refactor breakpoint definitions.
6756 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6757 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6759 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6761 * Makefile.in: Add arm.c/o.
6762 * configure.srv: Likewise.
6763 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6764 (arm_breakpoint_kind_from_pc): New function.
6765 (arm_sw_breakpoint_from_kind): Return proper kind.
6766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6768 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6770 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6772 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6773 (struct raw_breakpoint) <size>: Remove.
6774 (struct raw_breakpoint) <kind>: Add.
6775 (bp_size): New function.
6776 (bp_opcode): Likewise.
6777 (find_raw_breakpoint_at): Adjust for kind.
6778 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6779 (remove_memory_breakpoint): Adjust for kind call bp_size.
6780 (set_raw_breakpoint_at): Adjust for kind.
6781 (set_breakpoint): Likewise.
6782 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6783 (delete_raw_breakpoint): Adjust for kind.
6784 (delete_breakpoint): Likewise.
6785 (find_gdb_breakpoint): Likewise.
6786 (set_gdb_breakpoint_1): Likewise.
6787 (set_gdb_breakpoint): Likewise.
6788 (delete_gdb_breakpoint_1): Likewise.
6789 (delete_gdb_breakpoint): Likewise.
6790 (uninsert_raw_breakpoint): Likewise.
6791 (reinsert_raw_breakpoint): Likewise.
6792 (set_breakpoint_data): Remove.
6793 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6794 (check_mem_read): Adjust for kind call bp_size.
6795 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6796 (clone_one_breakpoint): Adjust for kind.
6797 * mem-break.h (set_gdb_breakpoint): Likewise.
6798 (delete_gdb_breakpoint): Likewise.
6799 * server.c (process_serial_event): Likewise.
6801 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6803 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6804 (struct linux_target_ops) <breakpoint>: Remove.
6805 (struct linux_target_ops) <breakpoint_len>: Remove.
6806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6808 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6809 (arm_sw_breakpoint_from_kind): New function.
6810 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6811 (struct linux_target_ops) <breakpoint>: Remove.
6812 (struct linux_target_ops) <breakpoint_len>: Remove.
6813 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6814 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6815 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6816 (struct linux_target_ops) <breakpoint>: Remove.
6817 (struct linux_target_ops) <breakpoint_len>: Remove.
6818 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6819 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6820 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6821 (struct linux_target_ops) <breakpoint>: Remove.
6822 (struct linux_target_ops) <breakpoint_len>: Remove.
6823 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6824 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6825 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6826 and sw_breakpoint_from_kind to increment the pc.
6827 (linux_breakpoint_kind_from_pc): New function.
6828 (linux_sw_breakpoint_from_kind): New function.
6829 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6830 (initialize_low): Call breakpoint_kind_from_pc and
6831 sw_breakpoint_from_kind to replace breakpoint_data/len.
6832 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6834 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6835 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6836 (struct linux_target_ops) <breakpoint>: Remove.
6837 (struct linux_target_ops) <breakpoint_len>: Remove.
6838 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6839 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6840 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6841 (struct linux_target_ops) <breakpoint>: Remove.
6842 (struct linux_target_ops) <breakpoint_len>: Remove.
6843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6845 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6846 (struct linux_target_ops) <breakpoint>: Remove.
6847 (struct linux_target_ops) <breakpoint_len>: Remove.
6848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6850 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6851 (struct linux_target_ops) <breakpoint>: Remove.
6852 (struct linux_target_ops) <breakpoint_len>: Remove.
6853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6855 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6856 (struct linux_target_ops) <breakpoint>: Remove.
6857 (struct linux_target_ops) <breakpoint_len>: Remove.
6858 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6859 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6860 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6861 (struct linux_target_ops) <breakpoint>: Remove.
6862 (struct linux_target_ops) <breakpoint_len>: Remove.
6863 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6865 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6866 (struct linux_target_ops) <breakpoint>: Remove.
6867 (struct linux_target_ops) <breakpoint_len>: Remove.
6868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6870 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6871 (struct linux_target_ops) <breakpoint>: Remove.
6872 (struct linux_target_ops) <breakpoint_len>: Remove.
6873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6875 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6876 (struct linux_target_ops) <breakpoint>: Remove.
6877 (struct linux_target_ops) <breakpoint_len>: Remove.
6878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6880 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6881 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6882 (struct linux_target_ops) <breakpoint>: Remove.
6883 (struct linux_target_ops) <breakpoint_len>: Remove.
6884 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6885 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6886 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6887 (struct linux_target_ops) <breakpoint>: Remove.
6888 (struct linux_target_ops) <breakpoint_len>: Remove.
6889 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6890 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6892 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6894 * linux-cris-low.c (cris_get_pc): Remove void arg.
6896 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6898 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6901 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6903 * inferiors.c (thread_pid_matches_callback): New function.
6904 (find_thread_process): New function.
6905 (remove_thread): Reset current_thread.
6906 (remove_process): Assert threads have been removed first.
6908 2015-10-15 Yao Qi <yao.qi@linaro.org>
6910 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6912 (aarch64_remove_point): Likewise.
6913 * regcache.c (regcache_register_size): New function.
6915 2015-10-12 Yao Qi <yao.qi@linaro.org>
6917 * linux-aarch64-low.c: Update all callers as emit_load_store
6918 is renamed to aarch64_emit_load_store.
6920 2015-10-12 Yao Qi <yao.qi@linaro.org>
6922 * linux-aarch64-low.c: Update all callers of function renaming
6923 from emit_insn to aarch64_emit_insn.
6925 2015-10-12 Yao Qi <yao.qi@linaro.org>
6927 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6928 arch/aarch64-insn.h.
6929 (struct aarch64_memory_operand): Likewise.
6931 (emit_insn): Move to arch/aarch64-insn.c.
6932 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6933 (emit_load_store): Move to arch/aarch64-insn.c.
6934 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6935 (can_encode_int32): Remove.
6937 2015-10-12 Yao Qi <yao.qi@linaro.org>
6939 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6940 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6941 (aarch64_relocate_instruction): Likewise.
6942 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6943 (struct aarch64_insn_visitor): Likewise.
6945 2015-10-12 Yao Qi <yao.qi@linaro.org>
6947 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6948 (struct aarch64_insn_visitor): New.
6949 (struct aarch64_insn_relocation_data): New.
6950 (aarch64_ftrace_insn_reloc_b): New function.
6951 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6952 (aarch64_ftrace_insn_reloc_cb): Likewise.
6953 (aarch64_ftrace_insn_reloc_tb): Likewise.
6954 (aarch64_ftrace_insn_reloc_adr): Likewise.
6955 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6956 (aarch64_ftrace_insn_reloc_others): Likewise.
6958 (aarch64_relocate_instruction): Use visitor.
6960 2015-10-12 Yao Qi <yao.qi@linaro.org>
6962 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6963 int. Add argument buf.
6964 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6965 aarch64_relocate_instruction.
6967 2015-10-12 Yao Qi <yao.qi@linaro.org>
6969 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6970 argument insn. Remove local variable insn. Don't call
6972 (aarch64_install_fast_tracepoint_jump_pad): Call
6975 2015-09-30 Yao Qi <yao.qi@linaro.org>
6977 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6978 (emit_load_store_pair): Likewise.
6980 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6982 * dll.c (match_dll): Add cast(s).
6983 (unloaded_dll): Likewise.
6984 * linux-low.c (second_thread_of_pid_p): Likewise.
6985 (delete_lwp_callback): Likewise.
6986 (count_events_callback): Likewise.
6987 (select_event_lwp_callback): Likewise.
6988 (linux_set_resume_request): Likewise.
6989 * server.c (accumulate_file_name_length): Likewise.
6990 (emit_dll_description): Likewise.
6991 (handle_qxfer_threads_worker): Likewise.
6992 (visit_actioned_threads): Likewise.
6993 * thread-db.c (any_thread_of): Likewise.
6994 * tracepoint.c (same_process_p): Likewise.
6995 (match_blocktype): Likewise.
6996 (build_traceframe_info_xml): Likewise.
6998 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7000 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7002 (gdb_unparse_agent_expr): Likewise.
7003 * hostio.c (require_data): Likewise.
7004 (handle_pread): Likewise.
7005 * linux-low.c (disable_regset): Likewise.
7006 (fetch_register): Likewise.
7007 (store_register): Likewise.
7008 (get_dynamic): Likewise.
7009 (linux_qxfer_libraries_svr4): Likewise.
7010 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7011 (set_fast_tracepoint_jump): Likewise.
7012 (uninsert_fast_tracepoint_jumps_at): Likewise.
7013 (reinsert_fast_tracepoint_jumps_at): Likewise.
7014 (validate_inserted_breakpoint): Likewise.
7015 (clone_agent_expr): Likewise.
7016 * regcache.c (init_register_cache): Likewise.
7017 * remote-utils.c (putpkt_binary_1): Likewise.
7018 (decode_M_packet): Likewise.
7019 (decode_X_packet): Likewise.
7020 (look_up_one_symbol): Likewise.
7021 (relocate_instruction): Likewise.
7022 (monitor_output): Likewise.
7023 * server.c (handle_search_memory): Likewise.
7024 (handle_qxfer_exec_file): Likewise.
7025 (handle_qxfer_libraries): Likewise.
7026 (handle_qxfer): Likewise.
7027 (handle_query): Likewise.
7028 (handle_v_cont): Likewise.
7029 (handle_v_run): Likewise.
7030 (captured_main): Likewise.
7031 * target.c (write_inferior_memory): Likewise.
7032 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7033 * tracepoint.c (init_trace_buffer): Likewise.
7034 (add_tracepoint_action): Likewise.
7035 (add_traceframe): Likewise.
7036 (add_traceframe_block): Likewise.
7037 (cmd_qtdpsrc): Likewise.
7038 (cmd_qtdv): Likewise.
7039 (cmd_qtstatus): Likewise.
7040 (response_source): Likewise.
7041 (response_tsv): Likewise.
7042 (cmd_qtnotes): Likewise.
7043 (gdb_collect): Likewise.
7044 (initialize_tracepoint): Likewise.
7046 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7048 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7049 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7050 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7052 (enum aarch64_condition_codes): New enum.
7053 (w0): New static global.
7056 (struct aarch64_memory_operand) <type>: New
7057 MEMORY_OPERAND_POSTINDEX type.
7058 (postindex_memory_operand): New helper function.
7059 (emit_ret): New function.
7060 (emit_load_store_pair): New function, factored out of emit_stp
7061 with support for MEMORY_OPERAND_POSTINDEX.
7062 (emit_stp): Rewrite using emit_load_store_pair.
7063 (emit_ldp): New function.
7064 (emit_load_store): Likewise.
7065 (emit_ldr): Mention post-index instruction in comment.
7066 (emit_ldrh): New function.
7067 (emit_ldrb): New function.
7068 (emit_ldrsw): Mention post-index instruction in comment.
7069 (emit_str): Likewise.
7070 (emit_subs): New function.
7071 (emit_cmp): Likewise.
7072 (emit_and): Likewise.
7073 (emit_orr): Likewise.
7074 (emit_orn): Likewise.
7075 (emit_eor): Likewise.
7076 (emit_mvn): Likewise.
7077 (emit_lslv): Likewise.
7078 (emit_lsrv): Likewise.
7079 (emit_asrv): Likewise.
7080 (emit_mul): Likewise.
7081 (emit_sbfm): Likewise.
7082 (emit_sbfx): Likewise.
7083 (emit_ubfm): Likewise.
7084 (emit_ubfx): Likewise.
7085 (emit_csinc): Likewise.
7086 (emit_cset): Likewise.
7087 (emit_nop): Likewise.
7088 (emit_ops_insns): New helper function.
7089 (emit_pop): Likewise.
7090 (emit_push): Likewise.
7091 (aarch64_emit_prologue): New function.
7092 (aarch64_emit_epilogue): Likewise.
7093 (aarch64_emit_add): Likewise.
7094 (aarch64_emit_sub): Likewise.
7095 (aarch64_emit_mul): Likewise.
7096 (aarch64_emit_lsh): Likewise.
7097 (aarch64_emit_rsh_signed): Likewise.
7098 (aarch64_emit_rsh_unsigned): Likewise.
7099 (aarch64_emit_ext): Likewise.
7100 (aarch64_emit_log_not): Likewise.
7101 (aarch64_emit_bit_and): Likewise.
7102 (aarch64_emit_bit_or): Likewise.
7103 (aarch64_emit_bit_xor): Likewise.
7104 (aarch64_emit_bit_not): Likewise.
7105 (aarch64_emit_equal): Likewise.
7106 (aarch64_emit_less_signed): Likewise.
7107 (aarch64_emit_less_unsigned): Likewise.
7108 (aarch64_emit_ref): Likewise.
7109 (aarch64_emit_if_goto): Likewise.
7110 (aarch64_emit_goto): Likewise.
7111 (aarch64_write_goto_address): Likewise.
7112 (aarch64_emit_const): Likewise.
7113 (aarch64_emit_call): Likewise.
7114 (aarch64_emit_reg): Likewise.
7115 (aarch64_emit_pop): Likewise.
7116 (aarch64_emit_stack_flush): Likewise.
7117 (aarch64_emit_zero_ext): Likewise.
7118 (aarch64_emit_swap): Likewise.
7119 (aarch64_emit_stack_adjust): Likewise.
7120 (aarch64_emit_int_call_1): Likewise.
7121 (aarch64_emit_void_call_2): Likewise.
7122 (aarch64_emit_eq_goto): Likewise.
7123 (aarch64_emit_ne_goto): Likewise.
7124 (aarch64_emit_lt_goto): Likewise.
7125 (aarch64_emit_le_goto): Likewise.
7126 (aarch64_emit_gt_goto): Likewise.
7127 (aarch64_emit_ge_got): Likewise.
7128 (aarch64_emit_ops_impl): New static global variable.
7129 (aarch64_emit_ops): New target function, return
7130 &aarch64_emit_ops_impl.
7131 (struct linux_target_ops): Install it.
7133 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7135 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7136 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7138 * linux-aarch64-ipa.c: New file.
7139 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7141 (aarch64_get_thread_area): New target method.
7142 (extract_signed_bitfield): New helper function.
7143 (aarch64_decode_ldr_literal): New function.
7144 (enum aarch64_opcodes): New enum.
7145 (struct aarch64_register): New struct.
7146 (struct aarch64_operand): New struct.
7147 (x0): New static global.
7156 (aarch64_register): New helper function.
7157 (register_operand): Likewise.
7158 (immediate_operand): Likewise.
7159 (struct aarch64_memory_operand): New struct.
7160 (offset_memory_operand): New helper function.
7161 (preindex_memory_operand): Likewise.
7162 (enum aarch64_system_control_registers): New enum.
7163 (ENCODE): New macro.
7164 (emit_insn): New helper function.
7165 (emit_b): New function.
7166 (emit_bcond): Likewise.
7167 (emit_cb): Likewise.
7168 (emit_tb): Likewise.
7169 (emit_blr): Likewise.
7170 (emit_stp): Likewise.
7171 (emit_ldp_q_offset): Likewise.
7172 (emit_stp_q_offset): Likewise.
7173 (emit_load_store): Likewise.
7174 (emit_ldr): Likewise.
7175 (emit_ldrsw): Likewise.
7176 (emit_str): Likewise.
7177 (emit_ldaxr): Likewise.
7178 (emit_stxr): Likewise.
7179 (emit_stlr): Likewise.
7180 (emit_data_processing_reg): Likewise.
7181 (emit_data_processing): Likewise.
7182 (emit_add): Likewise.
7183 (emit_sub): Likewise.
7184 (emit_mov): Likewise.
7185 (emit_movk): Likewise.
7186 (emit_mov_addr): Likewise.
7187 (emit_mrs): Likewise.
7188 (emit_msr): Likewise.
7189 (emit_sevl): Likewise.
7190 (emit_wfe): Likewise.
7191 (append_insns): Likewise.
7192 (can_encode_int32_in): New helper function.
7193 (aarch64_relocate_instruction): New function.
7194 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7195 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7196 (struct linux_target_ops): Install aarch64_get_thread_area,
7197 aarch64_install_fast_tracepoint_jump_pad and
7198 aarch64_get_min_fast_tracepoint_insn_len.
7200 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7202 * Makefile.in (aarch64-insn.o): New rule.
7203 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7205 2015-09-21 Yao Qi <yao.qi@linaro.org>
7207 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7209 2015-09-21 Yao Qi <yao.qi@linaro.org>
7211 * tracepoint.c (max_jump_pad_size): Remove.
7213 2015-09-18 Yao Qi <yao.qi@linaro.org>
7215 * linux-aarch64-low.c: Don't include sys/uio.h.
7216 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7218 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7220 * tracepoint.c (eval_result_type): Change prototype.
7221 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7223 2015-09-15 Pedro Alves <palves@redhat.com>
7225 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7226 Check whether to report exec events instead of checking whether
7227 multiprocess is enabled.
7229 2015-09-15 Pedro Alves <palves@redhat.com>
7232 * remote-utils.c (prepare_resume_reply): Merge
7233 TARGET_WAITKIND_VFORK_DONE switch case with the
7234 TARGET_WAITKIND_FORKED case.
7236 2015-09-15 Yao Qi <yao.qi@linaro.org>
7238 * server.c (handle_query): Check string comparison using
7239 "else if" instead of "if".
7241 2015-09-15 Yao Qi <yao.qi@linaro.org>
7243 * server.c (vCont_supported): New global variable.
7244 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7245 matches. Append ";vContSupported+" to own_buf.
7246 (handle_v_requests): Append ";s;S" to own_buf if target supports
7247 hardware single step or vCont_supported is false.
7248 (capture_main): Set vCont_supported to zero.
7250 2015-09-15 Yao Qi <yao.qi@linaro.org>
7252 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7254 (linux_supports_hardware_single_step): ... New function.
7255 (linux_target_ops): Update.
7256 * lynx-low.c (lynx_target_ops): Set field
7257 supports_hardware_single_step to target_can_do_hardware_single_step.
7258 * nto-low.c (nto_target_ops): Likewise.
7259 * spu-low.c (spu_target_ops): Likewise.
7260 * win32-low.c (win32_target_ops): Likewise.
7261 * target.c (target_can_do_hardware_single_step): New function.
7262 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7263 Remove. <supports_hardware_single_step>: New field.
7264 (target_supports_conditional_breakpoints): Remove.
7265 (target_supports_hardware_single_step): New macro.
7266 (target_can_do_hardware_single_step): Declare.
7267 * server.c (handle_query): Use target_supports_hardware_single_step
7268 instead of target_supports_conditional_breakpoints.
7270 2015-09-15 Yao Qi <yao.qi@linaro.org>
7272 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7274 (struct linux_target_ops the_low_target): Install
7275 aarch64_linux_siginfo_fixup.
7277 2015-09-11 Don Breazeal <donb@codesourcery.com>
7278 Luis Machado <lgustavo@codesourcery.com>
7280 * linux-low.c (linux_mourn): Static declaration.
7281 (linux_arch_setup): Move in front of
7282 handle_extended_wait.
7283 (linux_arch_setup_thread): New function.
7284 (handle_extended_wait): Handle exec events. Call
7285 linux_arch_setup_thread. Make event_lwp argument a
7286 pointer-to-a-pointer.
7287 (check_zombie_leaders): Do not check stopped threads.
7288 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7289 (linux_low_filter_event): Add lwp and thread for exec'ing
7290 non-leader thread if leader thread has been deleted.
7291 Refactor code into linux_arch_setup_thread and call it.
7292 Pass child lwp pointer by reference to handle_extended_wait.
7293 (linux_wait_for_event_filtered): Update comment.
7294 (linux_wait_1): Prevent clobbering exec event status.
7295 (linux_supports_exec_events): New function.
7296 (linux_target_ops) <supports_exec_events>: Initialize new member.
7297 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7299 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7300 * server.c (report_exec_events): New global variable.
7301 (handle_query): Handle qSupported query for exec-events feature.
7302 (captured_main): Initialize report_exec_events.
7303 * server.h (report_exec_events): Declare new global variable.
7304 * target.h (struct target_ops) <supports_exec_events>: New
7306 (target_supports_exec_events): New macro.
7307 * win32-low.c (win32_target_ops) <supports_exec_events>:
7308 Initialize new member.
7310 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7312 * linux-low.c (linux_low_enable_btrace): Remove.
7313 (linux_target_ops): Replace linux_low_enable_btrace with
7314 linux_enable_btrace.
7316 2015-09-03 Yao Qi <yao.qi@linaro.org>
7318 * linux-aarch64-low.c (aarch64_insert_point): Call
7319 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7322 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7324 * linux-low.c (check_stopped_by_breakpoint): Use
7325 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7327 2015-08-27 Pedro Alves <palves@redhat.com>
7329 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7331 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7333 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7334 the XNEW-family equivalent.
7335 (compile_bytecodes): Likewise.
7336 * dll.c (loaded_dll): Likewise.
7337 * event-loop.c (append_callback_event): Likewise.
7338 (create_file_handler): Likewise.
7339 (create_file_event): Likewise.
7340 * hostio.c (handle_open): Likewise.
7341 * inferiors.c (add_thread): Likewise.
7342 (add_process): Likewise.
7343 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7344 * linux-arm-low.c (arm_new_process): Likewise.
7345 (arm_new_thread): Likewise.
7346 * linux-low.c (add_to_pid_list): Likewise.
7347 (linux_add_process): Likewise.
7348 (handle_extended_wait): Likewise.
7349 (add_lwp): Likewise.
7350 (enqueue_one_deferred_signal): Likewise.
7351 (enqueue_pending_signal): Likewise.
7352 (linux_resume_one_lwp_throw): Likewise.
7353 (linux_resume_one_thread): Likewise.
7354 (linux_read_memory): Likewise.
7355 (linux_write_memory): Likewise.
7356 * linux-mips-low.c (mips_linux_new_process): Likewise.
7357 (mips_linux_new_thread): Likewise.
7358 (mips_add_watchpoint): Likewise.
7359 * linux-x86-low.c (initialize_low_arch): Likewise.
7360 * lynx-low.c (lynx_add_process): Likewise.
7361 * mem-break.c (set_raw_breakpoint_at): Likewise.
7362 (set_breakpoint): Likewise.
7363 (add_condition_to_breakpoint): Likewise.
7364 (add_commands_to_breakpoint): Likewise.
7365 (clone_agent_expr): Likewise.
7366 (clone_one_breakpoint): Likewise.
7367 * regcache.c (new_register_cache): Likewise.
7368 * remote-utils.c (look_up_one_symbol): Likewise.
7369 * server.c (queue_stop_reply): Likewise.
7370 (start_inferior): Likewise.
7371 (queue_stop_reply_callback): Likewise.
7372 (handle_target_event): Likewise.
7373 * spu-low.c (fetch_ppc_memory): Likewise.
7374 (store_ppc_memory): Likewise.
7375 * target.c (set_target_ops): Likewise.
7376 * thread-db.c (thread_db_load_search): Likewise.
7377 (try_thread_db_load_1): Likewise.
7378 * tracepoint.c (add_tracepoint): Likewise.
7379 (add_tracepoint_action): Likewise.
7380 (create_trace_state_variable): Likewise.
7381 (cmd_qtdpsrc): Likewise.
7382 (cmd_qtro): Likewise.
7383 (add_while_stepping_state): Likewise.
7384 * win32-low.c (child_add_thread): Likewise.
7385 (get_image_name): Likewise.
7387 2015-08-25 Yao Qi <yao.qi@linaro.org>
7389 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7391 2015-08-25 Yao Qi <yao.qi@linaro.org>
7393 * Makefile.in (aarch64-linux.o): New rule.
7394 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7396 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7397 (aarch64_init_debug_reg_state): Make it extern.
7398 (aarch64_linux_prepare_to_resume): Remove.
7400 2015-08-25 Yao Qi <yao.qi@linaro.org>
7402 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7403 lwp_arch_private_info and ptid_of_lwp.
7405 2015-08-25 Yao Qi <yao.qi@linaro.org>
7407 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7408 Find proc_info by find_process_pid. All callers updated.
7410 2015-08-25 Yao Qi <yao.qi@linaro.org>
7412 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7414 (debug_reg_change_callback): Remove.
7415 (aarch64_notify_debug_reg_change): Remove.
7417 2015-08-25 Yao Qi <yao.qi@linaro.org>
7419 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7420 Call current_lwp_ptid.
7422 2015-08-25 Yao Qi <yao.qi@linaro.org>
7424 * linux-aarch64-low.c (debug_reg_change_callback): Use
7427 2015-08-25 Yao Qi <yao.qi@linaro.org>
7429 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7431 2015-08-25 Yao Qi <yao.qi@linaro.org>
7433 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7435 2015-08-25 Yao Qi <yao.qi@linaro.org>
7437 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7440 2015-08-25 Yao Qi <yao.qi@linaro.org>
7442 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7444 (debug_reg_change_callback): Remove argument entry and add argument
7445 lwp. Remove local variable thread. Don't print thread id in the
7446 debugging output. Don't check whether pid of thread equals to pid.
7447 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7448 iterate_over_lwps instead find_inferior.
7450 2015-08-24 Pedro Alves <palves@redhat.com>
7452 * inferiors.c (get_first_process): New function.
7453 * inferiors.h (get_first_process): New declaration.
7454 * remote-utils.c (read_ptid): Default to the first process in the
7455 list, instead of to the current thread's process.
7457 2015-08-24 Pedro Alves <palves@redhat.com>
7459 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7460 * event-loop.c: Likewise.
7461 * remote-utils.c: Likewise.
7462 * tracepoint.c: Likewise.
7464 2015-08-24 Pedro Alves <palves@redhat.com>
7466 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7469 2015-08-21 Pedro Alves <palves@redhat.com>
7471 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7472 instead of literal 1.
7474 2015-08-21 Pedro Alves <palves@redhat.com>
7476 * tdesc.c (default_description): Explicitly zero-initialize.
7478 2015-08-21 Pedro Alves <palves@redhat.com>
7481 * inferiors.c (remove_thread): Discard any pending stop reply for
7483 * server.c (remove_all_on_match_pid): Rename to ...
7484 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7486 (discard_queued_stop_replies): Change parameter to a ptid. Now
7488 (handle_v_kill, kill_inferior_callback, captured_main)
7489 (process_serial_event): Adjust.
7490 * server.h (discard_queued_stop_replies): Declare.
7492 2015-08-21 Pedro Alves <palves@redhat.com>
7494 * linux-low.c (wait_for_sigstop): Always switch to no thread
7495 selected if the previously current thread dies.
7496 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7497 process instead of the current thread's.
7498 * remote-utils.c (input_interrupt): Don't check if there's no
7500 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7501 current thread to the general thread fails, error out.
7502 (handle_qxfer_auxv, handle_qxfer_libraries)
7503 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7504 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7505 (handle_query): Check if there's a thread selected instead of
7506 checking whether there's any thread in the thread list.
7507 (handle_qxfer_threads, handle_qxfer_btrace)
7508 (handle_qxfer_btrace_conf): Don't error out early if there's no
7509 thread in the thread list.
7510 (handle_v_cont, myresume): Don't set the current thread to the
7512 (process_serial_event) <Hg handling>: Also set thread_id if the
7513 previous general thread is still alive.
7514 (process_serial_event) <g/G handling>: If setting the current
7515 thread to the general thread fails, error out.
7516 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7517 thread's lwp instead of the current thread's.
7518 * target.c (set_desired_thread): If the desired thread was not
7519 found, leave the current thread pointing to NULL. Return an int
7520 (boolean) indicating success.
7521 * target.h (set_desired_thread): Change return type to int.
7523 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7525 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7526 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7528 (ps_get_thread_area): New function.
7530 2015-08-19 Gary Benson <gbenson@redhat.com>
7532 * hostio.c (handle_pread): Do not attempt to read more data
7533 than hostio_reply_with_data can fit in a packet.
7535 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7537 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7539 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7541 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7543 2015-08-06 Pedro Alves <palves@redhat.com>
7545 * tracepoint.c (expr_eval_result): Now an int.
7547 2015-08-06 Pedro Alves <palves@redhat.com>
7549 * gdbthread.h (struct regcache): Forward declare.
7550 (struct thread_info) <regcache_data>: Now a struct regcache
7552 * inferiors.c (inferior_regcache_data)
7553 (set_inferior_regcache_data): Now work with struct regcache
7555 * inferiors.h (struct regcache): Forward declare.
7556 (inferior_regcache_data, set_inferior_regcache_data): Now work
7557 with struct regcache pointers.
7558 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7559 (free_register_cache_thread): Remove struct regcache pointer
7562 2015-08-06 Pedro Alves <palves@redhat.com>
7564 * server.c (captured_main): On error, print the exception message
7565 to stderr, and if run_once is set, throw a quit.
7567 2015-08-06 Pedro Alves <palves@redhat.com>
7569 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7572 2015-08-06 Pedro Alves <palves@redhat.com>
7574 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7575 reading beyond the passed in buffer length.
7577 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7579 * tracepoint.c (symbol_list) <required>: Remove.
7581 2015-08-06 Pedro Alves <palves@redhat.com>
7583 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7584 count if stopping and suspending threads.
7585 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7586 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7587 (linux_detach): Complete an ongoing step-over.
7588 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7590 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7591 (linux_wait_1): If passing a signal to the inferior after
7592 finishing a step-over, unsuspend and re-resume all lwps. If we
7593 see a single-step event but the thread should be continuing, don't
7594 pass the trap to gdb.
7595 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7596 internal_error instead of gdb_assert.
7597 (enqueue_pending_signal): New function.
7598 (check_ptrace_stopped_lwp_gone): Add debug output.
7599 (start_step_over): Use internal_error instead of gdb_assert.
7600 (complete_ongoing_step_over): New function.
7601 (linux_resume_one_thread): Don't resume a suspended thread.
7602 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7605 2015-08-06 Pedro Alves <palves@redhat.com>
7607 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7608 (linux_thread_alive): Use lwp_is_marked_dead.
7609 (extended_event_reported): Delete.
7610 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7611 instead of extended_event_reported.
7612 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7614 (lwp_is_marked_dead): New function.
7615 (lwp_running): Use lwp_is_marked_dead.
7616 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7619 2015-08-06 Pedro Alves <palves@redhat.com>
7621 * linux-low.c (linux_wait_1): Move fork event output out of the
7622 !report_to_gdb check. Pass event_child->waitstatus to
7623 target_waitstatus_to_string instead of ourstatus.
7625 2015-08-04 Yao Qi <yao.qi@linaro.org>
7627 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7628 if current_thread is 32 bit.
7630 2015-08-04 Yao Qi <yao.qi@linaro.org>
7632 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7633 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7634 * server.c (extended_protocol): Remove "static".
7635 * server.h (extended_protocol): Declare it.
7637 2015-08-04 Yao Qi <yao.qi@linaro.org>
7639 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7640 both aarch64 and aarch32.
7641 (aarch64_set_pc): Likewise.
7643 2015-08-04 Yao Qi <yao.qi@linaro.org>
7645 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7646 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7647 arm-with-neon.xml to srv_xmlfiles.
7648 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7649 (is_64bit_tdesc): New function.
7650 (aarch64_linux_read_description): New function.
7651 (aarch64_arch_setup): Call aarch64_linux_read_description.
7652 (regs_info): Rename to regs_info_aarch64.
7653 (aarch64_regs_info): Return right regs_info.
7654 (initialize_low_arch): Call initialize_low_arch_aarch32.
7656 2015-08-04 Yao Qi <yao.qi@linaro.org>
7658 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7659 * linux-aarch32-low.c: New file.
7660 * linux-aarch32-low.h: New file.
7661 * linux-arm-low.c (arm_fill_gregset): Move it to
7662 linux-aarch32-low.c.
7663 (arm_store_gregset): Likewise.
7664 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7665 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7666 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7667 (regs_info): Rename to regs_info_arm.
7668 (arm_regs_info): Return regs_info_aarch32 if
7669 have_ptrace_getregset is 1 and target description is
7670 arm_with_neon or arm_with_vfpv3.
7671 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7672 Call initialize_low_arch_aarch32 instead.
7674 2015-08-04 Yao Qi <yao.qi@linaro.org>
7676 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7677 * linux-low.c: ... here.
7678 * linux-low.h (have_ptrace_getregset): Declare it.
7680 2015-08-04 Pedro Alves <palves@redhat.com>
7682 * thread-db.c (struct thread_db): Use new typedefs.
7683 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7685 (disable_thread_event_reporting): Cast result of dlsym to
7686 destination function pointer type.
7687 (thread_db_mourn): Use td_ta_delete_ftype.
7689 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7691 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7693 (CDX_BREAKPOINT): Define for R2.
7694 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7695 (the_low_target): Add comments.
7697 2015-07-30 Yao Qi <yao.qi@linaro.org>
7699 * linux-arm-low.c (arm_hwcap): Remove it.
7700 (arm_read_description): New local variable arm_hwcap. Don't
7701 set arm_hwcap to zero.
7703 2015-07-30 Yao Qi <yao.qi@linaro.org>
7705 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7706 Use regcache->tdesc instead.
7707 (arm_store_wmmxregset): Likewise.
7708 (arm_fill_vfpregset): Likewise.
7709 (arm_store_vfpregset): Likewise.
7711 2015-07-30 Yao Qi <yao.qi@linaro.org>
7713 * linux-arm-low.c: Include arch/arm.h.
7714 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7715 (arm_store_gregset): Likewise.
7717 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7719 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7720 ptrace's 4th parameter.
7722 2015-07-27 Yao Qi <yao.qi@linaro.org>
7724 * configure.srv (case aarch64*-*-linux*): Don't set
7727 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7729 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7731 * linux-arm-low.c: Likewise.
7732 * linux-cris-low.c: Likewise.
7733 * linux-crisv32-low.c: Likewise.
7734 * linux-low.c: Likewise.
7735 * linux-m68k-low.c: Likewise.
7736 * linux-mips-low.c: Likewise.
7737 * linux-nios2-low.c: Likewise.
7738 * linux-s390-low.c: Likewise.
7739 * linux-sparc-low.c: Likewise.
7740 * linux-tic6x-low.c: Likewise.
7741 * linux-tile-low.c: Likewise.
7742 * linux-x86-low.c: Likewise.
7744 2015-07-24 Pedro Alves <palves@redhat.com>
7746 * config.in: Regenerate.
7747 * configure: Regenerate.
7749 2015-07-24 Pedro Alves <palves@redhat.com>
7751 * acinclude.m4: Include ../ptrace.m4.
7752 * configure.ac: Call GDB_AC_PTRACE.
7753 * config.in, configure: Regenerate.
7755 2015-07-24 Yao Qi <yao.qi@linaro.org>
7757 * linux-low.c (linux_create_inferior): Remove setting to
7758 proc->priv->new_inferior.
7759 (linux_attach): Likewise.
7760 (linux_low_filter_event): Likewise.
7761 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7763 2015-07-24 Yao Qi <yao.qi@linaro.org>
7765 * linux-low.c (linux_arch_setup): New function.
7766 (linux_low_filter_event): If proc->tdesc is NULL and
7767 proc->attached is true, call the_low_target.arch_setup.
7768 Otherwise, keep status pending, and return.
7769 (linux_resume_one_lwp_throw): Don't call get_pc if
7770 thread->while_stepping isn't NULL. Don't call
7771 get_thread_regcache if proc->tdesc is NULL.
7772 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7773 (linux_target_ops): Install arch_setup.
7774 * server.c (start_inferior): Call the_target->arch_setup.
7775 * target.h (struct target_ops) <arch_setup>: New field.
7776 (target_arch_setup): New marco.
7777 * lynx-low.c (lynx_target_ops): Update.
7778 * nto-low.c (nto_target_ops): Update.
7779 * spu-low.c (spu_target_ops): Update.
7780 * win32-low.c (win32_target_ops): Update.
7782 2015-07-24 Yao Qi <yao.qi@linaro.org>
7784 * linux-low.c (linux_add_process): Don't set
7785 proc->priv->new_inferior.
7786 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7787 (linux_attach): Likewise.
7789 2015-07-24 Yao Qi <yao.qi@linaro.org>
7791 * server.c (start_inferior): Code refactor.
7793 2015-07-24 Yao Qi <yao.qi@linaro.org>
7795 * server.c (process_serial_event): Set general_thread.
7797 2015-07-21 Yao Qi <yao.qi@linaro.org>
7799 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7800 aarch64_linux_get_debug_reg_capacity.
7802 2015-07-17 Yao Qi <yao.qi@linaro.org>
7804 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7805 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7806 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7807 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7808 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7809 (AARCH64_HWP_ALIGNMENT): Likewise.
7810 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7811 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7812 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7813 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7814 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7815 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7816 (struct aarch64_debug_reg_state): Likewise.
7817 (struct arch_lwp_info): Likewise.
7818 (aarch64_align_watchpoint): Likewise.
7819 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7820 (aarch64_watchpoint_length): Likewise.
7821 (aarch64_point_encode_ctrl_reg): Likewise
7822 (aarch64_point_is_aligned): Likewise.
7823 (aarch64_align_watchpoint): Likewise.
7824 (aarch64_linux_set_debug_regs):
7825 (aarch64_dr_state_insert_one_point): Likewise.
7826 (aarch64_dr_state_remove_one_point): Likewise.
7827 (aarch64_handle_breakpoint): Likewise.
7828 (aarch64_handle_aligned_watchpoint): Likewise.
7829 (aarch64_handle_unaligned_watchpoint): Likewise.
7830 (aarch64_handle_watchpoint): Likewise.
7832 2015-07-17 Yao Qi <yao.qi@linaro.org>
7834 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7835 and don't aarch64_get_debug_reg_state. All callers update.
7836 (aarch64_handle_aligned_watchpoint): Likewise.
7837 (aarch64_handle_unaligned_watchpoint): Likewise.
7838 (aarch64_handle_watchpoint): Likewise.
7839 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7840 (aarch64_remove_point): Likewise.
7842 2015-07-17 Yao Qi <yao.qi@linaro.org>
7844 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7846 (aarch64_handle_unaligned_watchpoint): Likewise.
7848 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7850 Revert the previous 3 commits:
7851 Move gdb_regex* to common/
7852 Move linux_find_memory_regions_full & co.
7853 gdbserver build-id attribute generator
7855 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7856 Jan Kratochvil <jan.kratochvil@redhat.com>
7858 gdbserver build-id attribute generator.
7859 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7860 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7861 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7863 (get_dynamic): Use find_pdhr to traverse program headers.
7864 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7865 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7866 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7867 (get_hex_build_id): New.
7868 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7869 to reply XML document.
7871 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7872 Jan Kratochvil <jan.kratochvil@redhat.com>
7874 * target.c: Include target/target-utils.h and fcntl.h.
7875 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7876 (target_fileio_read_stralloc): New functions.
7878 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7880 * Makefile.in (OBS): Add gdb_regex.o.
7882 * config.in: Rebuilt.
7883 * configure: Rebuilt.
7885 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7886 Jan Kratochvil <jan.kratochvil@redhat.com>
7888 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7889 * Makefile.in (OBS): Add target-utils.o.
7890 (linux-maps.o, target-utils.o): New.
7891 * configure.srv (srv_linux_obj): Add linux-maps.o.
7893 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7895 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7897 (the_low_target): Install it.
7899 2015-07-14 Pedro Alves <palves@redhat.com>
7901 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7902 Instead, ignore ECHILD, and throw an error for other errnos.
7904 2015-07-10 Pedro Alves <palves@redhat.com>
7906 * event-loop.c (struct callback_event) <data>: Change type to
7907 gdb_client_data instance instead of gdb_client_data pointer.
7908 (append_callback_event): Adjust.
7910 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7912 * linux-aarch64-low.c: Add comments for each linux_target_ops
7913 method. Remove comments already covered in target_ops and
7914 linux_target_ops definitions.
7915 (the_low_target): Add comments for each unimplemented method.
7917 2015-07-09 Yao Qi <yao.qi@linaro.org>
7919 * linux-aarch64-low.c (aarch64_regmap): Remove.
7920 (aarch64_usrregs_info): Remove.
7921 (regs_info): Set field usrregs to NULL.
7923 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7925 * linux-low.c: Include "rsp-low.h"
7926 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7927 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7928 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7929 (handle_btrace_enable_pt): New.
7930 (handle_btrace_general_set): Support "pt".
7931 (handle_btrace_conf_general_set): Support "pt:size".
7933 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7935 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7938 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7940 * linux-aarch64-low.c: Remove comment about endianness.
7941 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7942 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7945 2015-06-24 Gary Benson <gbenson@redhat.com>
7947 * linux-i386-ipa.c (stdint.h): Do not include.
7948 * lynx-i386-low.c (stdint.h): Likewise.
7949 * lynx-ppc-low.c (stdint.h): Likewise.
7950 * mem-break.c (stdint.h): Likewise.
7951 * thread-db.c (stdint.h): Likewise.
7952 * tracepoint.c (stdint.h): Likewise.
7953 * win32-low.c (stdint.h): Likewise.
7955 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7957 * server.c (write_qxfer_response): Update call to
7958 remote_escape_output.
7960 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7961 Jan Kratochvil <jan.kratochvil@redhat.com>
7963 Merge multiple hex conversions.
7964 * gdbreplay.c (tohex): Rename to 'fromhex'.
7965 (logchar): Use fromhex.
7967 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7969 * server.c (handle_qxfer_libraries): Set `version' attribute for
7972 2015-06-10 Gary Benson <gbenson@redhat.com>
7974 * target.h (struct target_ops) <multifs_open>: New field.
7975 <multifs_unlink>: Likewise.
7976 <multifs_readlink>: Likewise.
7977 * linux-low.c (nat/linux-namespaces.h): New include.
7978 (linux_target_ops): Initialize the_target->multifs_open,
7979 the_target->multifs_unlink and the_target->multifs_readlink.
7980 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7981 * hostio.c (hostio_fs_pid): New static variable.
7982 (hostio_handle_new_gdb_connection): New function.
7983 (handle_setfs): Likewise.
7984 (handle_open): Use the_target->multifs_open as appropriate.
7985 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7986 (handle_readlink): Use the_target->multifs_readlink as
7988 (handle_vFile): Handle vFile:setfs packets.
7989 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7990 after target_handle_new_gdb_connection.
7992 2015-06-10 Gary Benson <gbenson@redhat.com>
7994 * configure.ac (AC_CHECK_FUNCS): Add setns.
7995 * config.in: Regenerate.
7996 * configure: Likewise.
7997 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7998 (linux-namespaces.o): New rule.
7999 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8001 2015-06-09 Gary Benson <gbenson@redhat.com>
8003 * hostio.c (handle_open): Process mode argument with
8004 fileio_to_host_mode.
8006 2015-06-01 Yao Qi <yao.qi@linaro.org>
8008 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8009 * linux-x86-low.c: Likewise.
8011 2015-05-28 Don Breazeal <donb@codesourcery.com>
8013 * linux-low.c (handle_extended_wait): Initialize
8014 thread_info.last_resume_kind for new fork children.
8016 2015-05-15 Pedro Alves <palves@redhat.com>
8018 * target.h (target_handle_new_gdb_connection): Rewrite using if
8019 wrapped in do/while.
8021 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8023 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8024 * configure, config.in: Regenerate.
8025 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8028 2015-05-12 Don Breazeal <donb@codesourcery.com>
8030 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8031 PTRACE_EVENT_VFORK_DONE.
8032 (linux_low_ptrace_options, extended_event_reported): Add vfork
8034 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8035 and "vforkdone" for RSP 'T' Stop Reply Packet.
8036 * server.h (report_vfork_events): Declare
8039 2015-05-12 Don Breazeal <donb@codesourcery.com>
8041 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8042 (the_low_target) <new_fork>: Initialize new member.
8043 * linux-arm-low.c (arm_new_fork): New function.
8044 (the_low_target) <new_fork>: Initialize new member.
8045 * linux-low.c (handle_extended_wait): Call new target function
8047 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8048 * linux-mips-low.c (mips_add_watchpoint): New function
8049 extracted from mips_insert_point.
8050 (the_low_target) <new_fork>: Initialize new member.
8051 (mips_linux_new_fork): New function.
8052 (mips_insert_point): Call mips_add_watchpoint.
8053 * linux-x86-low.c (x86_linux_new_fork): New function.
8054 (the_low_target) <new_fork>: Initialize new member.
8056 2015-05-12 Don Breazeal <donb@codesourcery.com>
8058 * linux-low.c (handle_extended_wait): Implement return value,
8059 rename argument 'event_child' to 'event_lwp', handle
8060 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8061 (linux_low_ptrace_options): New function.
8062 (linux_low_filter_event): Call linux_low_ptrace_options,
8063 use different argument fo linux_enable_event_reporting,
8064 use return value from handle_extended_wait.
8065 (extended_event_reported): New function.
8066 (linux_wait_1): Call extended_event_reported and set
8067 status to report fork events.
8068 (linux_write_memory): Add pid to debug message.
8069 (reset_lwp_ptrace_options_callback): New function.
8070 (linux_handle_new_gdb_connection): New function.
8071 (linux_target_ops): Initialize new structure member.
8072 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8073 * lynx-low.c: Initialize new structure member.
8074 * remote-utils.c (prepare_resume_reply): Implement stop reason
8075 "fork" for "T" stop message.
8076 * server.c (handle_query): Call handle_new_gdb_connection.
8077 * server.h (report_fork_events): Declare global flag.
8078 * target.h (struct target_ops) <handle_new_gdb_connection>:
8080 (target_handle_new_gdb_connection): New macro.
8081 * win32-low.c: Initialize new structure member.
8083 2015-05-12 Don Breazeal <donb@codesourcery.com>
8085 * mem-break.c (APPEND_TO_LIST): Define macro.
8086 (clone_agent_expr): New function.
8087 (clone_one_breakpoint): New function.
8088 (clone_all_breakpoints): New function.
8089 * mem-break.h: Declare new functions.
8091 2015-05-12 Don Breazeal <donb@codesourcery.com>
8093 * linux-low.c (linux_supports_fork_events): New function.
8094 (linux_supports_vfork_events): New function.
8095 (linux_target_ops): Initialize new structure members.
8096 (initialize_low): Call linux_check_ptrace_features.
8097 * lynx-low.c (lynx_target_ops): Initialize new structure
8099 * server.c (report_fork_events, report_vfork_events):
8101 (handle_query): Add new features to qSupported packet and
8103 (captured_main): Initialize new global variables.
8104 * target.h (struct target_ops) <supports_fork_events>:
8106 <supports_vfork_events>: New member.
8107 (target_supports_fork_events): New macro.
8108 (target_supports_vfork_events): New macro.
8109 * win32-low.c (win32_target_ops): Initialize new structure
8112 2015-05-12 Gary Benson <gbenson@redhat.com>
8114 * server.c (handle_qxfer_exec_file): Use current process
8117 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8119 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8120 Remove HAVE_PTRACE_GETREGS conditionals.
8121 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8122 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8124 2015-05-08 Yao Qi <yao.qi@linaro.org>
8126 * linux-low.c (linux_supports_conditional_breakpoints): New
8128 (linux_target_ops): Install new target method.
8129 * lynx-low.c (lynx_target_ops): Install NULL hook for
8130 supports_conditional_breakpoints.
8131 * nto-low.c (nto_target_ops): Likewise.
8132 * spu-low.c (spu_target_ops): Likewise.
8133 * win32-low.c (win32_target_ops): Likewise.
8134 * server.c (handle_query): Check
8135 target_supports_conditional_breakpoints.
8136 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8138 (target_supports_conditional_breakpoints): New macro.
8140 2015-05-06 Pedro Alves <palves@redhat.com>
8143 * server.c (start_inferior): If the process exits, mourn it.
8145 2015-04-21 Gary Benson <gbenson@redhat.com>
8147 * hostio.c (fileio_open_flags_to_host): Factored out to
8148 fileio_to_host_openflags in common/fileio.c. Single use
8151 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8153 * linux-xtensa-low.c (xtensa_fill_gregset)
8154 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8157 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8159 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8160 (regs_info): Replace usrregs pointer with NULL.
8162 2015-04-17 Gary Benson <gbenson@redhat.com>
8164 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8165 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8166 * server.c (handle_qxfer_exec_file): New function.
8167 (qxfer_packets): Add exec-file entry.
8168 (handle_query): Report qXfer:exec-file:read as supported packet.
8170 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8172 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8174 2015-04-09 Gary Benson <gbenson@redhat.com>
8176 * hostio-errno.c (errno_to_fileio_error): Remove function.
8177 Update caller to use remote_fileio_to_fio_error.
8179 2015-04-09 Yao Qi <yao.qi@linaro.org>
8181 * linux-low.c (linux_insert_point): Call
8182 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8183 (linux_remove_point): Call remove_memory_breakpoint if type is
8185 * linux-x86-low.c (x86_insert_point): Don't call
8186 insert_memory_breakpoint.
8187 (x86_remove_point): Don't call remove_memory_breakpoint.
8189 2015-04-01 Pedro Alves <palves@redhat.com>
8190 Cleber Rosa <crosa@redhat.com>
8192 * server.c (gdbserver_usage): Reorganize and extend the usage
8195 2015-03-24 Pedro Alves <palves@redhat.com>
8197 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8198 output. Also dump TRAP_TRACE.
8199 (linux_low_filter_event): In debug output, distinguish a
8200 resume_stop SIGSTOP from a delayed SIGSTOP.
8202 2015-03-24 Gary Benson <gbenson@redhat.com>
8204 * linux-x86-low.c (x86_linux_new_thread): Moved to
8206 (x86_linux_prepare_to_resume): Likewise.
8208 2015-03-24 Gary Benson <gbenson@redhat.com>
8210 * Makefile.in (x86-linux-dregs.o): New rule.
8211 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8212 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8213 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8214 (x86_linux_dr_get): Likewise.
8215 (x86_linux_dr_set): Likewise.
8216 (update_debug_registers_callback): Likewise.
8217 (x86_linux_dr_set_addr): Likewise.
8218 (x86_linux_dr_get_addr): Likewise.
8219 (x86_linux_dr_set_control): Likewise.
8220 (x86_linux_dr_get_control): Likewise.
8221 (x86_linux_dr_get_status): Likewise.
8222 (x86_linux_update_debug_registers): Likewise.
8224 2015-03-24 Gary Benson <gbenson@redhat.com>
8226 * linux-x86-low.c (x86_linux_update_debug_registers):
8227 New function, factored out from...
8228 (x86_linux_prepare_to_resume): ...this.
8230 2015-03-24 Gary Benson <gbenson@redhat.com>
8232 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8233 (x86_linux_dr_set): Likewise.
8234 (update_debug_registers_callback): Likewise.
8235 (x86_linux_dr_set_addr): Likewise.
8236 (x86_linux_dr_get_addr): Likewise.
8237 (x86_linux_dr_set_control): Likewise.
8238 (x86_linux_dr_get_control): Likewise.
8239 (x86_linux_dr_get_status): Likewise.
8240 (x86_linux_prepare_to_resume): Likewise.
8242 2015-03-24 Gary Benson <gbenson@redhat.com>
8244 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8245 Use perror_with_name. Pass string through gettext.
8246 (x86_linux_dr_set): Likewise.
8248 2015-03-24 Gary Benson <gbenson@redhat.com>
8250 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8251 (x86_linux_dr_set_addr): ...this.
8252 (x86_dr_low_get_addr): Rename to...
8253 (x86_linux_dr_get_addr): ...this.
8254 (x86_dr_low_set_control): Rename to...
8255 (x86_linux_dr_set_control): ...this.
8256 (x86_dr_low_get_control): Rename to...
8257 (x86_linux_dr_get_control): ...this.
8258 (x86_dr_low_get_status): Rename to...
8259 (x86_linux_dr_get_status): ...this.
8260 (x86_dr_low): Update with new function names.
8262 2015-03-24 Gary Benson <gbenson@redhat.com>
8264 * Makefile.in (x86-linux.o): New rule.
8265 * configure.srv: Add x86-linux.o to relevant targets.
8266 * linux-low.c (lwp_set_arch_private_info): New function.
8267 (lwp_arch_private_info): Likewise.
8268 * linux-x86-low.c: Include nat/x86-linux.h.
8269 (arch_lwp_info): Removed structure.
8270 (update_debug_registers_callback):
8271 Use lwp_set_debug_registers_changed.
8272 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8273 and lwp_set_debug_registers_changed.
8274 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8276 2015-03-24 Gary Benson <gbenson@redhat.com>
8278 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8279 * linux-arm-low.c (arm_new_thread): Likewise.
8280 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8281 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8282 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8283 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8285 2015-03-24 Gary Benson <gbenson@redhat.com>
8287 * linux-low.c (ptid_of_lwp): New function.
8288 (lwp_is_stopped): Likewise.
8289 (lwp_stop_reason): Likewise.
8290 * linux-x86-low.c (update_debug_registers_callback):
8292 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8295 2015-03-24 Gary Benson <gbenson@redhat.com>
8297 * linux-low.h (linux_stop_lwp): Remove declaration.
8299 2015-03-24 Gary Benson <gbenson@redhat.com>
8301 * linux-low.h: Include nat/linux-nat.h.
8302 * linux-low.c (iterate_over_lwps_args): New structure.
8303 (iterate_over_lwps_filter): New function.
8304 (iterate_over_lwps): Likewise.
8305 * linux-x86-low.c (update_debug_registers_callback):
8306 Update signature to what iterate_over_lwps expects.
8307 Remove PID check that iterate_over_lwps now performs.
8308 (x86_dr_low_set_addr): Use iterate_over_lwps.
8309 (x86_dr_low_set_control): Likewise.
8311 2015-03-24 Gary Benson <gbenson@redhat.com>
8313 * linux-x86-low.c (x86_debug_reg_state): New function.
8314 (x86_linux_prepare_to_resume): Use the above.
8316 2015-03-24 Gary Benson <gbenson@redhat.com>
8318 * linux-low.c (current_lwp_ptid): New function.
8319 * linux-x86-low.c: Include nat/linux-nat.h.
8320 (x86_dr_low_get_addr): Use current_lwp_ptid.
8321 (x86_dr_low_get_control): Likewise.
8322 (x86_dr_low_get_status): Likewise.
8324 2015-03-20 Pedro Alves <palves@redhat.com>
8326 * tracepoint.c (cmd_qtstatus): Make "str" const.
8328 2015-03-20 Pedro Alves <palves@redhat.com>
8330 * server.c (handle_general_set): Make "req_str" const.
8332 2015-03-19 Pedro Alves <palves@redhat.com>
8334 * linux-low.c (linux_resume_one_lwp): Rename to ...
8335 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8336 instead call perror_with_name.
8337 (check_ptrace_stopped_lwp_gone): New function.
8338 (linux_resume_one_lwp): Reimplement as wrapper around
8339 linux_resume_one_lwp_throw that swallows errors if the LWP is
8342 2015-03-19 Pedro Alves <palves@redhat.com>
8344 * linux-low.c (count_events_callback, select_event_lwp_callback):
8345 No longer check whether the thread has resume_stop as last resume
8348 2015-03-19 Pedro Alves <palves@redhat.com>
8350 * linux-low.c (count_events_callback, select_event_lwp_callback):
8351 Use the lwp's status_pending_p field, not the thread's.
8353 2015-03-19 Pedro Alves <palves@redhat.com>
8355 * linux-low.c (select_event_lwp_callback): Update comments to
8356 no longer mention SIGTRAP.
8358 2015-03-18 Gary Benson <gbenson@redhat.com>
8360 * server.c (handle_query): Do not report vFile:fstat as supported.
8362 2015-03-11 Gary Benson <gbenson@redhat.com>
8364 * hostio.c (sys/types.h): New include.
8365 (sys/stat.h): Likewise.
8366 (common-remote-fileio.h): Likewise.
8367 (handle_fstat): New function.
8368 (handle_vFile): Handle vFile:fstat packets.
8370 2015-03-11 Gary Benson <gbenson@redhat.com>
8372 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8373 struct stat.st_blocks and struct stat.st_blksize.
8374 * configure: Regenerate.
8375 * config.in: Likewise.
8376 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8377 (OBS): Add common-remote-fileio.o.
8378 (common-remote-fileio.o): New rule.
8380 2015-03-09 Pedro Alves <palves@redhat.com>
8382 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8383 'struct sockaddr' pointer in 'accept' call.
8385 2015-03-09 Pedro Alves <palves@redhat.com>
8388 2015-03-07 Pedro Alves <palves@redhat.com>
8389 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8390 or <winsock2.h> here. Instead include "gdb_socket.h".
8391 (remote_open): Use union gdb_sockaddr_u.
8392 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8393 or <winsock2.h> here. Instead include "gdb_socket.h".
8394 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8395 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8397 (init_named_socket, gdb_agent_helper_thread): Use union
8400 2015-03-07 Pedro Alves <palves@redhat.com>
8402 * configure.ac (build_warnings): Move
8403 -Wdeclaration-after-statement to the C-specific set.
8404 * configure: Regenerate.
8406 2015-03-07 Pedro Alves <palves@redhat.com>
8408 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8409 or <winsock2.h> here. Instead include "gdb_socket.h".
8410 (remote_open): Use union gdb_sockaddr_u.
8411 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8412 or <winsock2.h> here. Instead include "gdb_socket.h".
8413 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8414 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8416 (init_named_socket, gdb_agent_helper_thread): Use union
8419 2015-03-07 Pedro Alves <palves@redhat.com>
8421 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8424 2015-03-06 Yao Qi <yao.qi@linaro.org>
8426 * linux-aarch64-low.c (aarch64_insert_point): Use
8427 show_debug_regs as a boolean.
8428 (aarch64_remove_point): Likewise.
8430 2015-03-05 Pedro Alves <palves@redhat.com>
8432 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8433 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8434 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8435 * nto-low.c (nto_target_ops): Likewise.
8436 * spu-low.c (spu_target_ops): Likewise.
8437 * win32-low.c (win32_target_ops): Likewise.
8439 2015-03-04 Pedro Alves <palves@redhat.com>
8441 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8442 Decide whether a breakpoint triggered based on the SIGTRAP's
8444 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8445 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8446 (linux_low_filter_event): Check for breakpoints before checking
8448 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8450 (linux_stopped_by_sw_breakpoint)
8451 (linux_supports_stopped_by_sw_breakpoint)
8452 (linux_stopped_by_hw_breakpoint)
8453 (linux_supports_stopped_by_hw_breakpoint): New functions.
8454 (linux_target_ops): Install new target methods.
8456 2015-03-04 Pedro Alves <palves@redhat.com>
8458 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8459 * server.c (swbreak_feature, hwbreak_feature): New globals.
8460 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8461 (captured_main): Clear swbreak_feature and hwbreak_feature.
8462 * server.h (swbreak_feature, hwbreak_feature): Declare.
8463 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8464 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8465 supports_stopped_by_hw_breakpoint>: New fields.
8466 (target_supports_stopped_by_sw_breakpoint)
8467 (target_stopped_by_sw_breakpoint)
8468 (target_supports_stopped_by_hw_breakpoint)
8469 (target_stopped_by_hw_breakpoint): Declare.
8471 2015-03-04 Pedro Alves <palves@redhat.com>
8473 enum lwp_stop_reason -> enum target_stop_reason
8474 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8475 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8476 (linux_wait_1, stuck_in_jump_pad_callback)
8477 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8478 (linux_stopped_by_watchpoint):
8479 * linux-low.h (enum lwp_stop_reason): Delete.
8480 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8481 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8483 2015-03-04 Yao Qi <yao.qi@linaro.org>
8485 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8487 2015-03-03 Gary Benson <gbenson@redhat.com>
8489 * hostio.c (handle_vFile): Fix prefix lengths.
8491 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8493 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8496 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8498 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8499 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8500 (clean): Add "rm -f" for above C files.
8501 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8502 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8503 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8504 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8505 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8506 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8507 (init_registers_s390x_vx_linux64)
8508 (init_registers_s390x_tevx_linux64)
8509 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8510 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8512 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8513 (s390_store_vxrs_high): New functions.
8514 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8516 (s390_arch_setup): Add logic for selecting one of the new target
8517 descriptions. Activate the new vector regsets if applicable.
8518 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8519 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8520 and init_registers_s390x_tevx_linux64.
8522 2015-03-01 Pedro Alves <palves@redhat.com>
8524 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8527 2015-02-27 Pedro Alves <palves@redhat.com>
8529 * linux-x86-low.c (u_debugreg_offset): New function.
8530 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8532 2015-02-27 Pedro Alves <palves@redhat.com>
8534 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8535 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8536 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8537 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8538 (ps_lsetfpregs, ps_getpid)
8539 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8540 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8541 (ps_lsetxregs, ps_plog): Declare.
8543 2015-02-27 Pedro Alves <palves@redhat.com>
8545 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8546 IP_AGENT_EXPORT_FUNC.
8547 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8548 IP_AGENT_EXPORT_FUNC.
8549 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8550 (IP_AGENT_EXPORT): Delete.
8551 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8552 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8553 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8554 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8555 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8556 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8557 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8558 (traceframe_read_count, traceframe_write_count)
8559 (traceframes_created, trace_state_variables, get_raw_reg)
8560 (get_trace_state_variable_value, set_trace_state_variable_value)
8561 (ust_loaded, helper_thread_id, cmd_buf): Use
8562 IPA_SYM_EXPORTED_NAME.
8563 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8564 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8565 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8566 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8567 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8568 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8569 EXTERN_C_PUSH/EXTERN_C_POP.
8570 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8571 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8572 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8573 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8574 (traceframe_write_count, traceframe_read_count)
8575 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8576 (about_to_request_buffer_space, get_trace_state_variable_value)
8577 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8578 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8579 EXTERN_C_PUSH/EXTERN_C_POP.
8580 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8581 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8582 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8583 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8584 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8585 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8586 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8587 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8589 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8590 (IP_AGENT_EXPORT_VAR_DECL): Define.
8592 (gdb_agent_get_raw_reg): Declare.
8594 2015-02-27 Tom Tromey <tromey@redhat.com>
8595 Pedro Alves <palves@redhat.com>
8597 Rename symbols whose names are reserved C++ keywords throughout.
8599 2015-02-27 Pedro Alves <palves@redhat.com>
8601 * Makefile.in (COMPILER): New, get it from autoconf.
8602 (CXX): Get from autoconf instead.
8603 (COMPILE.pre): Use COMPILER.
8604 (CC-LD): Rename to ...
8605 (CC_LD): ... this. Use COMPILER.
8606 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8607 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8608 * acinclude.m4: Include build-with-cxx.m4.
8609 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8610 Disable -Werror by default if building in C++ mode.
8611 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8612 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8613 the C++ compiler. Save/restore CXXFLAGS too.
8614 * configure: Regenerate.
8616 2015-02-27 Pedro Alves <palves@redhat.com>
8618 * acinclude.m4: Include libiberty.m4.
8619 * configure.ac: Call libiberty_INIT.
8620 * config.in, configure: Regenerate.
8622 2015-02-26 Pedro Alves <palves@redhat.com>
8624 * linux-low.c (linux_wait_1): When incrementing the PC past a
8625 program breakpoint always use the_low_target.breakpoint_len as
8626 increment, rather than the maximum between that and
8627 the_low_target.decr_pc_after_break.
8629 2015-02-23 Pedro Alves <palves@redhat.com>
8631 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8632 thread was doing a step-over; always adjust the PC if
8633 we stepped over a permanent breakpoint.
8634 (linux_wait_1): If we stepped over breakpoint that was on top of a
8635 permanent breakpoint, manually advance the PC past it.
8637 2015-02-23 Pedro Alves <palves@redhat.com>
8639 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8641 (x86_fill_gregset, x86_store_gregset): Use it when handling
8644 2015-02-20 Pedro Alves <palves@redhat.com>
8646 * thread-db.c: Include "nat/linux-procfs.h".
8647 (thread_db_init): Skip listing new threads if the kernel supports
8648 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8650 2015-02-20 Pedro Alves <palves@redhat.com>
8652 * linux-low.c (status_pending_p_callback): Use ptid_match.
8654 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8656 PR breakpoints/16812
8657 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8658 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8659 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8661 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8663 PR breakpoints/15956
8664 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8666 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8668 * linux-low.c (linux_low_btrace_conf): Print size.
8669 * server.c (handle_btrace_conf_general_set): New.
8670 (hanle_general_set): Call handle_btrace_conf_general_set.
8671 (handle_query): Report Qbtrace-conf:bts:size as supported.
8673 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8675 * linux-low.c (linux_low_enable_btrace): Update parameters.
8676 (linux_low_btrace_conf): New.
8677 (linux_target_ops)<to_btrace_conf>: Initialize.
8678 * server.c (current_btrace_conf): New.
8679 (handle_btrace_enable): Rename to ...
8680 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8681 to target_enable_btrace. Update comment. Update users.
8682 (handle_qxfer_btrace_conf): New.
8683 (qxfer_packets): Add btrace-conf entry.
8684 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8685 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8686 (target_ops)<read_btrace_conf>: New.
8687 (target_enable_btrace): Update parameters.
8688 (target_read_btrace_conf): New.
8690 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8692 * server.c (handle_btrace_general_set): Remove call to
8693 target_supports_btrace.
8694 (supported_btrace_packets): New.
8695 (handle_query): Call supported_btrace_packets.
8696 * target.h: include btrace-common.h.
8697 (btrace_target_info): Removed.
8698 (supports_btrace, target_supports_btrace): Update parameters.
8700 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8702 * Makefile.in (SFILES): Add common/btrace-common.c.
8703 (OBS): Add common/btrace-common.o.
8704 (btrace-common.o): Add build rules.
8705 * linux-low: Include btrace-common.h.
8706 (linux_low_read_btrace): Use struct btrace_data. Call
8707 btrace_data_init and btrace_data_fini.
8709 2015-02-06 Pedro Alves <palves@redhat.com>
8711 * thread-db.c (find_new_threads_callback): Add debug output.
8713 2015-02-04 Pedro Alves <palves@redhat.com>
8715 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8716 (resume_stopped_resumed_lwps): New function.
8717 (linux_wait_for_event_filtered): Use it.
8719 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8721 * Makefile.in (SFILES): Add linux-personality.c.
8722 (linux-personality.o): New rule.
8723 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8724 list of objects to be built.
8725 * linux-low.c: Include nat/linux-personality.h.
8726 (linux_create_inferior): Remove code to disable address space
8727 randomization (moved to ../nat/linux-personality.c). Create
8728 cleanup to disable address space randomization.
8730 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8732 * Makefile.in (posix-strerror.o): New rule.
8733 (mingw-strerror.o): Likewise.
8734 * configure: Regenerated.
8735 * configure.ac: Source file ../common/common.host. Initialize new
8736 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8738 2015-01-14 Yao Qi <yao@codesourcery.com>
8740 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8741 (ppc-linux.o): New rule.
8742 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8743 * configure.ac: AC_CHECK_FUNCS(getauxval).
8744 * config.in: Re-generated.
8745 * configure: Re-generated.
8746 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8747 ppc64_64bit_inferior_p
8749 2015-01-14 Yao Qi <yao@codesourcery.com>
8751 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8752 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8753 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8754 (PT_ORIG_R3, PT_TRAP): Likewise.
8755 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8756 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8757 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8759 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8761 * i387-fp.c (i387_cache_to_xsave): In look over
8762 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8763 zmmh_low_space field by use of zmmh_high_space.
8765 2015-01-09 Pedro Alves <palves@redhat.com>
8767 * linux-low.c (step_over_bkpt): Move higher up in the file.
8768 (handle_extended_wait): Don't store the stop_pc here.
8769 (get_stop_pc): Adjust comments and rename to ...
8770 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8771 stopped for a software breakpoint or hardware breakpoint.
8772 (thread_still_has_status_pending_p): New function.
8773 (status_pending_p_callback): Use
8774 thread_still_has_status_pending_p. If the event is no longer
8775 interesting, resume the LWP.
8776 (handle_tracepoints): Add assert.
8777 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8778 (wstatus_maybe_breakpoint): New function.
8779 (cancel_breakpoint): Delete function.
8780 (check_stopped_by_watchpoint): New function, factored out from
8781 linux_low_filter_event.
8782 (lp_status_maybe_breakpoint): Delete function.
8783 (linux_low_filter_event): Remove filter_ptid argument.
8784 Leave thread group exits pending here. Store the LWP's stop PC.
8785 Always leave events pending.
8786 (linux_wait_for_event_filtered): Pull all events out of the
8787 kernel, and leave them all pending.
8788 (count_events_callback, select_event_lwp_callback): Consider all
8790 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8791 (select_event_lwp): Only give preference to the stepping LWP in
8792 all-stop mode. Adjust comments.
8793 (ignore_event): New function.
8794 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8795 references to cancel_breakpoints. Adjust to renames. Also give
8796 equal priority to all LWPs that have had events in non-stop mode.
8797 If reporting a software breakpoint event, unadjust the LWP's PC.
8798 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8799 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8801 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8802 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8803 (linux_stopped_by_watchpoint): Adjust.
8804 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8805 * linux-low.h (enum lwp_stop_reason): New.
8806 (struct lwp_info) <stop_pc>: Adjust comment.
8807 <stopped_by_watchpoint>: Delete field.
8808 <stop_reason>: New field.
8809 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8810 * mem-break.c (software_breakpoint_inserted_here)
8811 (hardware_breakpoint_inserted_here): New function.
8812 * mem-break.h (software_breakpoint_inserted_here)
8813 (hardware_breakpoint_inserted_here): Declare.
8814 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8815 (cancel_breakpoints): Delete.
8816 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8817 (upload_fast_traceframes): Remove references to
8820 2015-01-09 Pedro Alves <palves@redhat.com>
8822 * thread-db.c (find_new_threads_callback): Ignore thread if the
8823 kernel thread ID is -1.
8825 2015-01-09 Pedro Alves <palves@redhat.com>
8827 * linux-low.c (linux_attach_fail_reason_string): Move to
8828 nat/linux-ptrace.c, and rename.
8829 (linux_attach_lwp): Update comment.
8830 (attach_proc_task_lwp_callback): New function.
8831 (linux_attach): Adjust to rename and use
8832 linux_proc_attach_tgid_threads.
8833 (linux_attach_fail_reason_string): Delete declaration.
8835 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8837 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8838 * server.c (gdbserver_version): Likewise.
8840 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8842 * remote-utils.c: Include ctype.h.
8843 (input_interrupt): Explicitly handle the case when the char
8844 received is the NUL byte. Improve the printing of non-ASCII
8847 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8849 * linux-low.c (linux_low_filter_event): Update call to
8850 linux_enable_event_reporting following the addition of
8851 a new parameter to that function.
8853 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8856 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8857 (AARCH64_FPCR_REGNO): Likewise.
8858 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8859 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8860 (aarch64_store_fpregset): Likewise.
8862 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8864 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8865 Remove FIXME comment about assumption about N.
8867 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8869 * configure.ac: If large-file support is disabled in GDBserver,
8870 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8871 * configure: Regenerate.
8873 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8875 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8876 warning upon ENODATA from ptrace.
8877 * linux-s390-low.c (s390_store_tdb): New.
8878 (s390_regsets): Add regset for NT_S390_TDB.
8880 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8882 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8883 without a fill_function.
8884 * linux-s390-low.c (s390_fill_last_break): Remove.
8885 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8886 (s390_arch_setup): Use regset's size instead of fill_function for
8889 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8891 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8892 the regset's store function when ptrace returned an error.
8893 * regcache.c (get_thread_regcache): Invalidate register cache
8894 before fetching inferior's registers.
8896 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8898 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8899 while-loop as for-loop.
8900 (regsets_store_inferior_registers): Likewise.
8902 2014-11-28 Yao Qi <yao@codesourcery.com>
8904 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8905 * config.in, configure: Re-generate.
8906 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8909 2014-11-21 Yao Qi <yao@codesourcery.com>
8911 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8912 (AC_CHECK_HEADERS): Remove malloc.h.
8913 * configure: Re-generated.
8914 * config.in: Re-generated.
8915 * server.h: Don't include alloca.h and malloc.h.
8916 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8917 Don't include malloc.h.
8919 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8921 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8922 corresponding ERRNO check in same block.
8924 2014-11-12 Pedro Alves <palves@redhat.com>
8926 * server.c (cont_thread): Update comment.
8927 (start_inferior, attach_inferior): No longer clear cont_thread.
8928 (handle_v_cont): No longer set cont_thread.
8929 (captured_main): Clear cont_thread each time a GDB connects.
8931 2014-11-12 Pedro Alves <palves@redhat.com>
8933 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8934 thread, and don't resume all threads if the Hc thread has exited.
8936 2014-11-12 Pedro Alves <palves@redhat.com>
8938 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8939 the process group instead of to a specific LWP.
8941 2014-10-15 Pedro Alves <palves@redhat.com>
8944 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8946 (arm_set_thread_context): Delete.
8947 (the_low_target): Adjust.
8948 * win32-i386-low.c (debug_registers_changed)
8949 (debug_registers_used): Delete.
8950 (update_debug_registers_callback): New function.
8951 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8952 needing to update their debug registers.
8953 (win32_get_current_dr): New function.
8954 (x86_dr_low_get_addr, x86_dr_low_get_control)
8955 (x86_dr_low_get_status): Fetch the debug register from the thread
8957 (i386_initial_stuff): Adjust.
8958 (i386_get_thread_context): Remove current_event parameter. Don't
8959 clear debug_registers_changed nor copy DR values to
8961 (i386_set_thread_context): Delete.
8962 (i386_prepare_to_resume): New function.
8963 (i386_thread_added): Mark the thread as needing to update irs
8965 (the_low_target): Remove i386_set_thread_context and install
8966 i386_prepare_to_resume.
8967 * win32-low.c (win32_get_thread_context): Adjust.
8968 (win32_set_thread_context): Use SetThreadContext
8970 (win32_prepare_to_resume): New function.
8971 (win32_require_context): New function, factored out from ...
8972 (thread_rec): ... this.
8973 (continue_one_thread): Call win32_prepare_to_resume on each thread
8974 we're about to continue.
8975 (win32_resume): Call win32_prepare_to_resume on the event thread.
8976 * win32-low.h (struct win32_thread_info)
8977 <debug_registers_changed>: New field.
8978 (struct win32_target_ops): Change prototype of set_thread_context,
8979 delete set_thread_context and add prepare_to_resume.
8980 (win32_require_context): New declaration.
8982 2014-10-08 Gary Benson <gbenson@redhat.com>
8984 * server.h: Do not include common-exceptions.h.
8986 2014-10-08 Gary Benson <gbenson@redhat.com>
8988 * server.h: Do not include cleanups.h.
8990 2014-09-30 James Hogan <james.hogan@imgtec.com>
8992 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8995 2014-09-23 Yao Qi <yao@codesourcery.com>
8997 * linux-low.c (lp_status_maybe_breakpoint): New function.
8998 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8999 (count_events_callback): Likewise.
9000 (select_event_lwp_callback): Likewise.
9001 (cancel_breakpoints_callback): Likewise.
9003 2014-09-19 Don Breazeal <donb@codesourcery.com>
9005 * linux-low.c (handle_extended_wait): Call
9006 linux_ptrace_get_extended_event.
9007 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9008 linux_is_extended_waitstatus.
9010 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9012 * Makefile.in (CPPFLAGS): Define.
9013 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9014 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9016 2014-09-16 Gary Benson <gbenson@redhat.com>
9018 * inferiors.h (current_inferior): Renamed as...
9019 (current_thread): New variable. All uses updated.
9020 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9021 (maybe_move_out_of_jump_pad): Likewise.
9022 (cancel_breakpoint): Likewise.
9023 (linux_low_filter_event): Likewise.
9024 (wait_for_sigstop): Likewise.
9025 (linux_resume_one_lwp): Likewise.
9026 (need_step_over_p): Likewise.
9027 (start_step_over): Likewise.
9028 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9029 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9030 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9031 and save_inferior as saved_thread.
9032 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9034 (regcache_invalidate_thread): Likewise.
9035 * remote-utils.c (prepare_resume_reply): Likewise.
9036 * thread-db.c (thread_db_get_tls_address): Likewise.
9037 (disable_thread_event_reporting): Likewise.
9038 (remove_thread_event_breakpoints): Likewise.
9039 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9041 * target.h (set_desired_inferior): Renamed as...
9042 (set_desired_thread): New declaration. All uses updated.
9043 * server.c (myresume): Updated comment to reference thread instead
9045 (handle_serial_event): Likewise.
9046 (handle_target_event): Likewise.
9048 2014-09-12 Tom Tromey <tromey@redhat.com>
9049 Gary Benson <gbenson@redhat.com>
9051 * regcache.h: Include common-regcache.h.
9052 (regcache_read_pc): Don't declare.
9053 * regcache.c (get_thread_regcache_for_ptid): New function.
9055 2014-09-11 Tom Tromey <tromey@redhat.com>
9056 Gary Benson <gbenson@redhat.com>
9058 * symbol.c: New file.
9059 * Makefile.in (SFILES): Add symbol.c.
9060 (OBS): Add symbol.o.
9062 2014-09-11 Gary Benson <gbenson@redhat.com>
9064 * target.c (target_stop_ptid, target_continue_ptid): New
9067 2014-09-11 Tom Tromey <tromey@redhat.com>
9068 Gary Benson <gbenson@redhat.com>
9070 * target.h: Include target/target.h.
9071 * target.c (target_read_memory, target_read_uint32)
9072 (target_write_memory): New functions.
9074 2014-09-11 Gary Benson <gbenson@redhat.com>
9076 * server.h (debug_hw_points): Don't declare.
9077 * server.c (debug_hw_points): Don't define. Replace all uses
9078 with show_debug_regs.
9079 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9080 all uses with show_debug_regs.
9082 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9084 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9085 endianness into account.
9086 (ppc_supply_ptrace_register): Likewise.
9088 2014-09-03 James Hogan <james.hogan@imgtec.com>
9090 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9091 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9093 2014-09-03 Gary Benson <gbenson@redhat.com>
9095 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9096 ALL_DEBUG_ADDRESS_REGISTERS.
9098 2014-09-02 Gary Benson <gbenson@redhat.com>
9100 * i386-low.h: Renamed as...
9101 * x86-low.h: New file. All type, function and variable name
9102 prefixes changed from "i386_" to "x86_". All references updated.
9103 * i386-low.c: Renamed as...
9104 * x86-low.c: New file. All type, function and variable name
9105 prefixes changed from "i386_" to "x86_". All references updated.
9107 2014-09-02 Gary Benson <gbenson@redhat.com>
9109 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9110 (x86_linux_new_thread): Likewise.
9112 2014-08-29 Gary Benson <gbenson@redhat.com>
9114 * server.h (setjmp.h): Do not include.
9115 (toplevel): Do not declare.
9116 (common-exceptions.h): Include.
9117 (cleanups.h): Likewise.
9118 * server.c (toplevel): Do not define.
9119 (exit_code): New static global.
9120 (detach_or_kill_for_exit_cleanup): New function.
9121 (main): New function. Original main renamed to...
9122 (captured_main): New function.
9123 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9125 2014-08-29 Gary Benson <gbenson@redhat.com>
9127 * Makefile.in (SFILES): Add common/common-exceptions.c.
9128 (OBS): Add common-exceptions.o.
9129 (common-exceptions.o): New rule.
9130 * utils.c (prepare_to_throw_exception): New function.
9132 2014-08-29 Gary Benson <gbenson@redhat.com>
9134 * config.in: Regenerate.
9135 * configure: Likewise.
9137 2014-08-29 Gary Benson <gbenson@redhat.com>
9139 * Makefile.in (SFILES): Add common/cleanups.c.
9141 (cleanups.o): New rule.
9143 2014-08-29 Gary Benson <gbenson@redhat.com>
9145 * utils.c (internal_vwarning): New function.
9147 2014-08-28 Gary Benson <gbenson@redhat.com>
9149 * utils.h (fatal): Remove declaration.
9150 * utils.c (fatal): Remove function.
9152 2014-08-28 Gary Benson <gbenson@redhat.com>
9154 * tracepoint.c (gdb_agent_init): Replace fatal with
9156 (initialize_tracepoint): Likewise.
9158 2014-08-28 Gary Benson <gbenson@redhat.com>
9160 * remote-utils.c (remote_prepare): Replace fatal with error.
9162 2014-08-28 Gary Benson <gbenson@redhat.com>
9164 * linux-low.c (linux_async): Replace fatal with warning.
9166 (linux_start_non_stop): Return -1 if linux_async failed.
9168 2014-08-28 Gary Benson <gbenson@redhat.com>
9170 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9172 (i386_dr_low_get_addr): Remove vague comment.
9173 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9176 2014-08-28 Gary Benson <gbenson@redhat.com>
9178 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9179 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9181 (linux_resume_one_lwp): Likewise.
9182 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9184 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9185 with internal_error.
9186 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9187 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9188 (find_register_by_name): Replace fatal with internal_error.
9189 (find_regno): Likewise.
9190 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9191 * thread-db.c (thread_db_create_event): Likewise.
9192 (thread_db_load_search): Likewise.
9193 (try_thread_db_load_1): Likewise.
9194 * tracepoint.c (get_jump_space_head): Replace fatal with
9196 (claim_trampoline_space): Likewise.
9197 (have_fast_tracepoint_trampoline_buffer): Likewise.
9198 (cmd_qtstart): Likewise.
9199 (stop_tracing): Likewise.
9200 (fast_tracepoint_collecting): Likewise.
9201 (target_malloc): Likewise.
9202 (download_tracepoint): Likewise.
9203 (download_trace_state_variables): Replace check with gdb_assert.
9204 (upload_fast_traceframes): Replace fatal with internal_error.
9206 2014-08-19 Tom Tromey <tromey@redhat.com>
9207 Gary Benson <gbenson@redhat.com>
9209 * Makefile.in (SFILES): Add common/common-debug.c.
9210 (OBS): Add common-debug.o.
9211 (common-debug.o): New rule.
9212 * debug.h (debug_printf): Don't declare.
9213 * debug.c (debug_printf): Renamed and rewritten as...
9214 (debug_vprintf): New function.
9216 2014-08-19 Gary Benson <gbenson@redhat.com>
9218 * utils.h: Do not include print-utils.h.
9220 2014-08-19 Tom Tromey <tromey@redhat.com>
9221 Gary Benson <gbenson@redhat.com>
9223 * server.h: Add static assertion.
9224 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9226 2014-08-19 Tom Tromey <tromey@redhat.com>
9227 Gary Benson <gbenson@redhat.com>
9229 * Makefile.in (SFILES): Add common/errors.c.
9230 (OBS): Add errors.o.
9231 (IPA_OBS): Add errors-ipa.o.
9232 (errors.o): New rule.
9233 (errors-ipa.o): Likewise.
9234 * utils.h (perror_with_name, error, warning): Don't declare.
9235 * utils.c (warning): Renamed and rewritten as...
9236 (vwarning): New function.
9237 (error): Renamed and rewritten as...
9238 (verror): New function.
9239 (internal_error): Renamed and rewritten as...
9240 (internal_verror): New function.
9242 2014-08-07 Gary Benson <gbenson@redhat.com>
9244 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9245 * configure: Regenerate.
9246 * config.in: Likewise.
9247 * server.h: Do not include errno.h.
9248 * event-loop.c: Likewise.
9249 * hostio-errno.c: Likewise.
9250 * linux-low.c: Likewise.
9251 * remote-utils.c: Likewise.
9252 * spu-low.c: Likewise.
9253 * utils.c: Likewise.
9254 * gdbreplay.c: Unconditionally include errno.h.
9256 2014-08-07 Gary Benson <gbenson@redhat.com>
9258 * server.h: Do not include string.h.
9259 * event-loop.c: Likewise.
9260 * linux-low.c: Likewise.
9261 * regcache.c: Likewise.
9262 * remote-utils.c: Likewise.
9263 * spu-low.c: Likewise.
9264 * utils.c: Likewise.
9266 2014-08-07 Gary Benson <gbenson@redhat.com>
9268 * server.h: Do not include gdb_assert.h.
9270 2014-08-07 Gary Benson <gbenson@redhat.com>
9272 * server.h: Do not include common-utils.h.
9274 2014-08-07 Gary Benson <gbenson@redhat.com>
9276 * server.h: Do not include ptid.h.
9277 * notif.h: Likewise.
9279 2014-08-07 Gary Benson <gbenson@redhat.com>
9281 * server.h: Do not include gdb_locale.h.
9283 2014-08-07 Gary Benson <gbenson@redhat.com>
9285 * server.h: Do not include gdb/signals.h.
9286 * win32-low.c: Likewise.
9288 2014-08-07 Gary Benson <gbenson@redhat.com>
9290 * server.h: Do not include pathmax.h.
9292 2014-08-07 Gary Benson <gbenson@redhat.com>
9294 * server.h: Do not include libiberty.h.
9295 * linux-bfin-low.c: Likewise.
9297 2014-08-07 Gary Benson <gbenson@redhat.com>
9299 * server.h: Do not include ansidecl.h.
9301 2014-08-07 Gary Benson <gbenson@redhat.com>
9303 * linux-x86-low.c: Do not include stddef.h.
9304 * lynx-ppc-low.c: Likewise.
9305 * tracepoint.c: Likewise.
9307 2014-08-07 Gary Benson <gbenson@redhat.com>
9309 * server.h: Do not include stdarg.h.
9310 * nto-low.c: Likewise.
9312 2014-08-07 Gary Benson <gbenson@redhat.com>
9314 * server.h: Do not include stdlib.h.
9315 * inferiors.c: Likewise.
9316 * linux-low.c: Likewise.
9317 * regcache.c: Likewise.
9318 * spu-low.c: Likewise.
9319 * tracepoint.c: Likewise.
9320 * utils.c: Likewise.
9322 2014-08-07 Gary Benson <gbenson@redhat.com>
9324 * server.h: Do not include stdio.h.
9325 * linux-low.c: Likewise.
9326 * remote-utils.c: Likewise.
9327 * spu-low.c: Likewise.
9328 * utils.c: Likewise.
9329 * wincecompat.c: Likewise.
9331 2014-08-06 Gary Benson <gbenson@redhat.com>
9333 * regcache.c (init_register_cache): Move conditionals inside if.
9335 2014-08-06 Gary Benson <gbenson@redhat.com>
9337 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9339 2014-07-31 Gary Benson <gbenson@redhat.com>
9341 * ax.h: Do not include server.h.
9342 * gdbthread.h: Likewise.
9343 * lynx-low.h: Likewise.
9344 * notif.h: Likewise.
9346 2014-07-30 Gary Benson <gbenson@redhat.com>
9348 * server.h: Include common-defs.h.
9349 Do not include config.h or build-gnulib-gdbserver/config.h.
9351 2014-07-30 Gary Benson <gbenson@redhat.com>
9353 * hostio-errno.c: Move server.h to top of includes list.
9354 * inferiors.c: Likewise.
9355 * linux-x86-low.c: Likewise.
9356 * notif.c: Include server.h.
9358 2014-07-24 Tom Tromey <tromey@redhat.com>
9359 Gary Benson <gbenson@redhat.com>
9361 * server.h (CORE_ADDR): Now unsigned.
9363 2014-07-16 Pedro Alves <palves@redhat.com>
9365 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9367 2014-07-15 Pedro Alves <palves@redhat.com>
9369 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9372 2014-07-11 Pedro Alves <palves@redhat.com>
9374 * linux-low.c (kill_wait_lwp): New function, based on
9375 kill_one_lwp_callback, but use my_waitpid directly.
9376 (kill_one_lwp_callback, linux_kill): Use it.
9378 2014-06-23 Pedro Alves <palves@redhat.com>
9380 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9381 before setting DR0..DR3.
9383 2014-06-20 Gary Benson <gbenson@redhat.com>
9385 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9386 * configure: Regenerated.
9387 * config.in: Likewise.
9389 2014-06-20 Gary Benson <gbenson@redhat.com>
9391 * Makefile.in (SFILES): Update locations for files moved
9393 (object file files): Reordered.
9395 2014-06-20 Gary Benson <gbenson@redhat.com>
9397 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9398 (i386_dr_low_set_addr): Likewise.
9399 (i386_dr_low_get_addr): Likewise.
9400 (i386_dr_low_can_set_control): Likewise.
9401 (i386_dr_low_set_control): Likewise.
9402 (i386_dr_low_get_control): Likewise.
9403 (i386_dr_low_get_status): Likewise.
9404 (i386_get_debug_register_length): Likewise.
9405 * linux-x86-low.c (i386_dr_low_set_addr):
9406 Changed signature. Made static.
9407 (i386_dr_low_get_addr): Likewise.
9408 (i386_dr_low_set_control): Likewise.
9409 (i386_dr_low_get_control): Likewise.
9410 (i386_dr_low_get_status): Likewise.
9411 (i386_dr_low): New global variable.
9412 * win32-i386-low.c (i386_dr_low_set_addr):
9413 Changed signature. Made static.
9414 (i386_dr_low_get_addr): Likewise.
9415 (i386_dr_low_set_control): Likewise.
9416 (i386_dr_low_get_control): Likewise.
9417 (i386_dr_low_get_status): Likewise.
9418 (i386_dr_low): New global variable.
9420 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9422 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9423 * Makefile.in (AR, AR_FLAGS): Define.
9424 * configure: Regenerate.
9426 2014-06-19 Gary Benson <gbenson@redhat.com>
9428 * Makefile.in (i386-dregs.o): New rule.
9429 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9430 * i386-low.c (target.h): Remove include.
9431 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9432 (DR_CONTROL_SHIFT): Likewise.
9433 (DR_CONTROL_SIZE): Likewise.
9434 (DR_RW_EXECUTE): Likewise.
9435 (DR_RW_WRITE): Likewise.
9436 (DR_RW_READ): Likewise.
9437 (DR_RW_IORW): Likewise.
9438 (DR_LEN_1): Likewise.
9439 (DR_LEN_2): Likewise.
9440 (DR_LEN_4): Likewise.
9441 (DR_LEN_8): Likewise.
9442 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9443 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9444 (DR_ENABLE_SIZE): Likewise.
9445 (DR_LOCAL_SLOWDOWN): Likewise.
9446 (DR_GLOBAL_SLOWDOWN): Likewise.
9447 (DR_CONTROL_RESERVED): Likewise.
9448 (I386_DR_CONTROL_MASK): Likewise.
9449 (I386_DR_VACANT): Likewise.
9450 (I386_DR_LOCAL_ENABLE): Likewise.
9451 (I386_DR_GLOBAL_ENABLE): Likewise.
9452 (I386_DR_DISABLE): Likewise.
9453 (I386_DR_SET_RW_LEN): Likewise.
9454 (I386_DR_GET_RW_LEN): Likewise.
9455 (I386_DR_WATCH_HIT): Likewise.
9456 (i386_wp_op_t): Likewise.
9457 (i386_show_dr): Likewise.
9458 (i386_length_and_rw_bits): Likewise.
9459 (i386_insert_aligned_watchpoint): Likewise.
9460 (i386_remove_aligned_watchpoint): Likewise.
9461 (i386_handle_nonaligned_watchpoint): Likewise.
9462 i386_update_inferior_debug_regs(): Likewise.
9463 (i386_dr_insert_watchpoint): Likewise.
9464 (i386_dr_remove_watchpoint): Likewise.
9465 (i386_dr_region_ok_for_watchpoint): Likewise.
9466 (i386_dr_stopped_data_address): Likewise.
9467 (i386_dr_stopped_by_watchpoint): Likewise.
9469 2014-06-19 Gary Benson <gbenson@redhat.com>
9471 * i386-low.c (i386_dr_show): Renamed to
9472 i386_show_dr and made static. All uses updated.
9473 (i386_dr_length_and_rw_bits): Renamed to
9474 i386_length_and_rw_bits and made static.
9476 (i386_dr_insert_aligned_watchpoint): Renamed to
9477 i386_insert_aligned_watchpoint and made static.
9479 (i386_dr_remove_aligned_watchpoint): Renamed to
9480 i386_remove_aligned_watchpoint and made static.
9482 (i386_dr_update_inferior_debug_regs): Renamed to
9483 i386_update_inferior_debug_regs and made static.
9486 2014-06-18 Gary Benson <gbenson@redhat.com>
9488 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9489 (i386_dr_low_can_set_control): Likewise.
9490 (i386_get_debug_register_length): Likewise.
9491 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9492 (i386_dr_low_can_set_control): Likewise.
9493 (i386_get_debug_register_length): Likewise.
9495 2014-06-17 Gary Benson <gbenson@redhat.com>
9497 * i386-low.h (i386-dregs.h): New include.
9498 (DR_FIRSTADDR): Now in i386-dregs.h.
9499 (DR_LASTADDR): Likewise.
9500 (DR_NADDR): Likewise.
9501 (DR_STATUS): Likewise.
9502 (DR_CONTROL): Likewise.
9503 (i386_debug_reg_state): Likewise.
9504 (i386_dr_insert_watchpoint): Likewise.
9505 (i386_dr_remove_watchpoint): Likewise.
9506 (i386_dr_region_ok_for_watchpoint): Likewise.
9507 (i386_dr_stopped_data_address): Likewise.
9508 (i386_dr_stopped_by_watchpoint): Likewise.
9509 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9511 2014-06-18 Gary Benson <gbenson@redhat.com>
9513 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9514 i386_dr_insert_watchpoint.
9515 (i386_low_remove_watchpoint): Renamed to
9516 i386_dr_remove_watchpoint.
9517 (i386_low_region_ok_for_watchpoint): Renamed to
9518 i386_dr_region_ok_for_watchpoint.
9519 (i386_low_stopped_data_address): Renamed to
9520 i386_dr_stopped_data_address.
9521 (i386_low_stopped_by_watchpoint): Renamed to
9522 i386_dr_stopped_by_watchpoint.
9523 * i386-low.c (i386_show_dr): Renamed to
9524 i386_dr_show and made nonstatic. All uses updated.
9525 (i386_length_and_rw_bits): Renamed to
9526 i386_dr_length_and_rw_bits and made nonstatic.
9528 (i386_insert_aligned_watchpoint): Renamed to
9529 i386_dr_insert_aligned_watchpoint and made nonstatic.
9531 (i386_remove_aligned_watchpoint): Renamed to
9532 i386_dr_remove_aligned_watchpoint and made nonstatic.
9534 (i386_update_inferior_debug_regs): Renamed to
9535 i386_dr_update_inferior_debug_regs and made nonstatic.
9537 (i386_low_insert_watchpoint): Renamed to
9538 i386_dr_insert_watchpoint. All uses updated.
9539 (i386_low_remove_watchpoint): Renamed to
9540 i386_dr_remove_watchpoint. All uses updated.
9541 (i386_low_region_ok_for_watchpoint): Renamed to
9542 i386_dr_region_ok_for_watchpoint. All uses updated.
9543 (i386_low_stopped_data_address): Renamed to
9544 i386_dr_stopped_data_address. All uses updated.
9545 (i386_low_stopped_by_watchpoint): Renamed to
9546 i386_dr_stopped_by_watchpoint. All uses updated.
9548 2014-06-18 Gary Benson <gbenson@redhat.com>
9550 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9551 (i386_dr_low_can_set_control): Likewise.
9552 (i386_insert_aligned_watchpoint): New check.
9554 2014-06-18 Gary Benson <gbenson@redhat.com>
9556 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9559 2014-06-18 Gary Benson <gbenson@redhat.com>
9561 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9562 instead of fatal and error.
9563 (i386_handle_nonaligned_watchpoint): Likewise.
9565 2014-06-18 Gary Benson <gbenson@redhat.com>
9567 * i386-low.c (i386_get_debug_register_length): New macro.
9568 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9569 (i386_show_dr): Use debug_printf instead of fprintf. Use
9570 phex to format values.
9572 2014-06-18 Gary Benson <gbenson@redhat.com>
9574 * i386-low.h: Comment changes.
9575 * i386-low.c: Likewise.
9577 2014-06-18 Gary Benson <gbenson@redhat.com>
9579 * i386-low.c: Whitespace changes.
9581 2014-06-12 Tom Tromey <tromey@redhat.com>
9583 * utils.c (freeargv): Remove.
9585 2014-06-12 Tom Tromey <tromey@redhat.com>
9587 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9588 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9589 (parse_debug_format_options): Likewise.
9590 (gdbserver_usage): Likewise.
9591 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9592 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9593 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9595 ($(LIBGNU)): Depend on libiberty.
9596 (all-lib): Recurse into all subdirs.
9597 (install-only): Invoke "install" target in subdirs.
9598 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9600 * configure: Rebuild.
9601 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9602 for vasprintf, vsnprintf, or gettimeofday.
9603 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9606 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9608 * development.sh: Delete.
9609 * Makefile.in (config.status): Adjust dependency on development.sh.
9610 * configure.ac: Adjust development.sh source call.
9611 * configure: Regenerate.
9613 2014-06-02 Pedro Alves <palves@redhat.com>
9615 * ax.c (gdb_free_agent_expr): New function.
9616 * ax.h (gdb_free_agent_expr): New declaration.
9617 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9619 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9621 (clear_breakpoint_conditions_and_commands): New function.
9622 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9623 (clear_breakpoint_conditions_and_commands): New declaration.
9625 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9627 * linux-aarch64-low.c (asm/ptrace.h): Include.
9629 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9631 Fix TLS access for -static -pthread.
9632 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9633 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9634 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9636 2014-05-20 Pedro Alves <palves@redhat.com>
9638 * linux-aarch64-low.c (aarch64_insert_point)
9639 (aarch64_remove_point): No longer check whether the type is
9640 supported here. Adjust to new interface.
9641 (the_low_target): Install aarch64_supports_z_point_type as
9642 supports_z_point_type method.
9643 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9644 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9645 instead of a Z packet char. Adjust.
9646 (arm_supports_z_point_type): New function.
9647 (arm_insert_point, arm_remove_point): Adjust to new interface.
9648 (the_low_target): Install arm_supports_z_point_type.
9649 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9650 (cris_insert_point, cris_remove_point): Adjust to new interface.
9651 Don't check whether the type is supported here.
9652 (the_low_target): Install cris_supports_z_point_type.
9653 * linux-low.c (linux_supports_z_point_type): New function.
9654 (linux_insert_point, linux_remove_point): Adjust to new interface.
9655 * linux-low.h (struct linux_target_ops) <insert_point,
9656 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9657 raw_breakpoint pointer parameter.
9658 <supports_z_point_type>: New method.
9659 * linux-mips-low.c (mips_supports_z_point_type): New function.
9660 (mips_insert_point, mips_remove_point): Adjust to new interface.
9661 Use mips_supports_z_point_type.
9662 (the_low_target): Install mips_supports_z_point_type.
9663 * linux-ppc-low.c (the_low_target): Install NULL as
9664 supports_z_point_type method.
9665 * linux-s390-low.c (the_low_target): Install NULL as
9666 supports_z_point_type method.
9667 * linux-sparc-low.c (the_low_target): Install NULL as
9668 supports_z_point_type method.
9669 * linux-x86-low.c (x86_supports_z_point_type): New function.
9670 (x86_insert_point): Adjust to new insert_point interface. Use
9671 insert_memory_breakpoint. Adjust to new
9672 i386_low_insert_watchpoint interface.
9673 (x86_remove_point): Adjust to remove_point interface. Use
9674 remove_memory_breakpoint. Adjust to new
9675 i386_low_remove_watchpoint interface.
9676 (the_low_target): Install x86_supports_z_point_type.
9677 * lynx-low.c (lynx_target_ops): Install NULL as
9678 supports_z_point_type callback.
9679 * nto-low.c (nto_supports_z_point_type): New.
9680 (nto_insert_point, nto_remove_point): Adjust to new interface.
9681 (nto_target_ops): Install nto_supports_z_point_type.
9682 * mem-break.c: Adjust intro comment.
9683 (struct raw_breakpoint) <raw_type, size>: New fields.
9684 <inserted>: Update comment.
9685 <shlib_disabled>: Delete field.
9686 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9687 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9688 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9689 (raw_bkpt_type_to_target_hw_bp_type): New function.
9690 (find_enabled_raw_code_breakpoint_at): New function.
9691 (find_raw_breakpoint_at): New type and size parameters. Use them.
9692 (insert_memory_breakpoint): New function, based off
9693 set_raw_breakpoint_at.
9694 (remove_memory_breakpoint): New function.
9695 (set_raw_breakpoint_at): Reimplement.
9696 (set_breakpoint): New, based on set_breakpoint_at.
9697 (set_breakpoint_at): Reimplement.
9698 (delete_raw_breakpoint): Go through the_target->remove_point
9699 instead of assuming memory breakpoints.
9700 (find_gdb_breakpoint_at): Delete.
9701 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9702 (find_gdb_breakpoint): New function.
9703 (set_gdb_breakpoint_at): Delete.
9704 (z_type_supported): New function.
9705 (set_gdb_breakpoint_1): New function, loosely based off
9706 set_gdb_breakpoint_at.
9707 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9708 (delete_gdb_breakpoint_at): Delete.
9709 (delete_gdb_breakpoint_1): New function, loosely based off
9710 delete_gdb_breakpoint_at.
9711 (delete_gdb_breakpoint): New function.
9712 (clear_gdb_breakpoint_conditions): Rename to ...
9713 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9715 (add_condition_to_breakpoint): Make static.
9716 (add_breakpoint_condition): Take a struct breakpoint pointer
9717 instead of an address. Adjust.
9718 (gdb_condition_true_at_breakpoint): Rename to ...
9719 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9721 (gdb_condition_true_at_breakpoint): Reimplement.
9722 (add_breakpoint_commands): Take a struct breakpoint pointer
9723 instead of an address. Adjust.
9724 (gdb_no_commands_at_breakpoint): Rename to ...
9725 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9726 parameter. Return true if no breakpoint was found. Change debug
9728 (gdb_no_commands_at_breakpoint): Reimplement.
9729 (run_breakpoint_commands): Rename to ...
9730 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9731 and change return type to boolean.
9732 (run_breakpoint_commands): New function.
9733 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9734 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9735 breakpoint. Go through the_target->remove_point instead of
9736 assuming memory breakpoint.
9737 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9738 software and hardware breakpoints.
9739 (reinsert_raw_breakpoint): Go through the_target->insert_point
9740 instead of assuming memory breakpoint.
9741 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9742 software and hardware breakpoints.
9743 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9744 Check both software and hardware breakpoints.
9745 (validate_inserted_breakpoint): Assert the breakpoint is a
9746 software breakpoint. Set the inserted flag to -1 instead of
9747 setting shlib_disabled.
9748 (delete_disabled_breakpoints): Adjust.
9749 (validate_breakpoints): Only validate software breakpoints.
9750 Adjust to inserted flag change.
9751 (check_mem_read, check_mem_write): Skip breakpoint types other
9752 than software breakpoints. Adjust to inserted flag change.
9753 * mem-break.h (enum raw_bkpt_type): New enum.
9754 (raw_breakpoint, struct process_info): Forward declare.
9755 (Z_packet_to_target_hw_bp_type): Delete declaration.
9756 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9757 (set_gdb_breakpoint, delete_gdb_breakpoint)
9758 (clear_breakpoint_conditions): New declarations.
9759 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9760 (breakpoint_inserted_here): Update comment.
9761 (add_breakpoint_condition, add_breakpoint_commands): Replace
9762 address parameter with a breakpoint pointer parameter.
9763 (gdb_breakpoint_here): Update comment.
9764 (delete_gdb_breakpoint_at): Delete.
9765 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9766 * server.c (process_point_options): Take a struct breakpoint
9767 pointer instead of an address. Adjust.
9768 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9769 delete_gdb_breakpoint.
9770 * spu-low.c (spu_target_ops): Install NULL as
9771 supports_z_point_type method.
9772 * target.h: Include mem-break.h.
9773 (struct target_ops) <prepare_to_access_memory>: Update comment.
9774 <supports_z_point_type>: New field.
9775 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9776 instead of a char. Also take a raw breakpoint pointer.
9777 * win32-arm-low.c (the_low_target): Install NULL as
9778 supports_z_point_type.
9779 * win32-i386-low.c (i386_supports_z_point_type): New function.
9780 (i386_insert_point, i386_remove_point): Adjust to new interface.
9781 (the_low_target): Install i386_supports_z_point_type.
9782 * win32-low.c (win32_supports_z_point_type): New function.
9783 (win32_insert_point, win32_remove_point): Adjust to new interface.
9784 (win32_target_ops): Install win32_supports_z_point_type.
9785 * win32-low.h (struct win32_target_ops):
9786 <supports_z_point_type>: New method.
9787 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9788 instead of a char. Also take a raw breakpoint pointer.
9790 2014-05-20 Pedro Alves <palves@redhat.com>
9792 * mem-break.h: Include break-common.h.
9793 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9794 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9795 (Z_packet_to_target_hw_bp_type): New declaration.
9796 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9797 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9798 (Z_PACKET_ACCESS_WP): Delete macros.
9799 (Z_packet_to_hw_type): Delete function.
9800 * i386-low.h: Don't include break-common.h here.
9801 (Z_packet_to_hw_type): Delete declaration.
9802 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9803 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9804 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9805 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9806 * linux-aarch64-low.c: Don't include break-common.h here.
9807 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9808 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9809 (Z_packet_to_target_hw_bp_type): Delete function.
9810 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9812 (mips_insert_point, mips_remove_point): Use
9813 Z_packet_to_target_hw_bp_type.
9815 2014-05-20 Pedro Alves <palves@redhat.com>
9817 * linux-aarch64-low.c: Include break-common.h.
9818 (enum target_point_type): Delete.
9819 (Z_packet_to_point_type): Rename to ...
9820 (Z_packet_to_target_hw_bp_type): ... this, and return a
9821 target_hw_bp_type instead.
9822 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9823 instead of an enum target_point_type.
9824 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9826 (aarch64_dr_state_insert_one_point)
9827 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9828 (aarch64_handle_aligned_watchpoint)
9829 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9830 Take an enum target_hw_bp_type instead of an enum
9832 (aarch64_supports_z_point_type): New function.
9833 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9834 use Z_packet_to_target_hw_bp_type.
9836 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9838 * configure.ac: Only use -Werror by default when DEVELOPMENT
9840 * configure: Regenerate.
9842 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9844 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9845 * linux-x86-low.c (X86_64_USER_REGS): New.
9846 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9848 2014-04-28 Yao Qi <yao@codesourcery.com>
9850 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9853 2014-04-25 Pedro Alves <palves@redhat.com>
9856 * linux-low.c (linux_attach_fail_reason_string): New function.
9857 (linux_attach_lwp): Delete.
9858 (linux_attach_lwp_1): Rename to ...
9859 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9860 argument. Remove "initial" parameter. Return int instead of
9861 void. Don't error or warn here.
9862 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9863 failure to attach to the tgid. Call warning when failing to
9865 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9866 argument. Remove "initial" parameter. Return int instead of
9867 void. Don't error or warn here.
9868 (linux_attach_fail_reason_string): New declaration.
9869 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9870 interface change. Use linux_attach_fail_reason_string.
9872 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9873 Walfred Tedeschi <walfred.tedeschi@intel.com>
9875 * Makefile.in: Added rules to handle new files
9876 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9877 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9878 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9879 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9880 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9881 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9883 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9884 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9885 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9886 i386/x32-avx512.xml.
9887 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9888 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9889 i386/x32-avx512-linux.xml.
9890 * i387-fp.c (num_avx512_k_registers): New constant for number
9892 (num_avx512_zmmh_low_registers): New constant for number of
9893 lower ZMM registers (0-15).
9894 (num_avx512_zmmh_high_registers): New constant for number of
9895 higher ZMM registers (16-31).
9896 (num_avx512_ymmh_registers): New contant for number of higher
9897 YMM registers (ymm16-31 added by avx521 on x86_64).
9898 (num_avx512_xmm_registers): New constant for number of higher
9899 XMM registers (xmm16-31 added by AVX512 on x86_64).
9900 (struct i387_xsave): Add space for AVX512 registers.
9901 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9902 Add code to handle AVX512 registers.
9903 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9904 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9905 prototypei from generated file.
9906 (tdesc_amd64_avx512_linux): Likewise.
9907 (init_registers_x32_avx512_linux): Likewise.
9908 (tdesc_x32_avx512_linux): Likewise.
9909 (init_registers_i386_avx512_linux): Likewise.
9910 (tdesc_i386_avx512_linux): Likewise.
9911 (x86_64_regmap): Add AVX512 registers.
9912 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9914 (initialize_low_arch): Add code to initialize AVX512 registers.
9916 2014-04-23 Pedro Alves <palves@redhat.com>
9918 * mem-break.c (find_gdb_breakpoint_at): Make static.
9919 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9921 2014-04-23 Pedro Alves <palves@redhat.com>
9923 * i386-low.c: Don't include break-common.h here.
9924 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9925 prototype to take target_hw_bp_type as argument instead of a Z
9927 * i386-low.h: Include break-common.h here.
9928 (Z_packet_to_hw_type): Declare.
9929 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9931 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9932 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9933 (x86_remove_point): Convert the packet number to a
9934 target_hw_bp_type before calling i386_low_remove_watchpoint.
9935 * win32-i386-low.c (i386_insert_point): Convert the packet number
9936 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9937 (i386_remove_point): Convert the packet number to a
9938 target_hw_bp_type before calling i386_low_remove_watchpoint.
9940 2014-04-23 Pedro Alves <palves@redhat.com>
9942 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9944 2014-04-10 Pedro Alves <palves@redhat.com>
9946 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9947 Check if the condition or command is NULL before checking if the
9948 breakpoint is known. On success, return true.
9949 * mem-break.h (add_breakpoint_condition): Document return.
9950 (add_breakpoint_commands): Add describing comment.
9951 * server.c (skip_to_semicolon): New function.
9952 (process_point_options): Use it.
9954 2014-04-09 Pedro Alves <palves@redhat.com>
9956 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9959 2014-02-27 Pedro Alves <palves@redhat.com>
9962 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9964 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9966 (last_thread_of_process_p): Take a PID argument instead of a
9968 (linux_wait_for_lwp): Delete.
9969 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9971 (linux_low_filter_event): New function, party factored out from
9972 linux_wait_for_event.
9973 (linux_wait_for_event): Rename to ...
9974 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9975 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9976 sigsuspend. Check for zombie leaders.
9977 (linux_wait_for_event): Reimplement as wrapper around
9978 linux_wait_for_event_filtered.
9979 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9980 a normal or signal exit is seen, it's the whole process exiting.
9981 (wait_for_sigstop): No longer a for_each_inferior callback.
9982 Rewrite on top of linux_wait_for_event_filtered.
9983 (stop_all_lwps): Call wait_for_sigstop directly.
9984 * server.c (resume, handle_target_event): Handle
9985 TARGET_WAITKIND_NO_RESUMED.
9987 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9989 * win32-low.c (psapi_get_dll_name,
9990 * win32_CreateToolhelp32Snapshot): Delete.
9991 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9992 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9994 (handle_load_dll): Add function description.
9995 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9997 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9999 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10001 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10002 base address when calling win32_add_one_solib.
10003 (handle_load_dll): Delete local variable load_addr.
10004 Remove 0x1000 offset applied to DLL base address when calling
10005 win32_add_one_solib.
10006 (handle_unload_dll): Add comment.
10008 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10010 * win32-low.c (win32_add_all_dlls): Renames
10011 win32_ensure_ntdll_loaded. Rewrite function documentation.
10012 Adjust implementation to always load all DLLs.
10013 Add 0x1000 offset to DLL base address when calling
10014 win32_add_one_solib.
10015 (child_initialization_done): New static global.
10016 (do_initial_child_stuff): Set child_initialization_done to
10017 zero during child initialization, and 1 after. Replace call
10018 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10020 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10021 (handle_unload_dll): Add function documentation.
10022 (get_child_debug_event): Ignore load and unload DLL events
10023 during child initialization.
10025 2014-02-20 Doug Evans <dje@google.com>
10027 Remove global all_lwps.
10028 * inferiors.h (ptid_of): Move here from linux-low.h.
10029 (pid_of, lwpid_of): Ditto.
10030 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10031 parameter is a struct thread_info * now.
10032 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10033 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10034 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10036 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10037 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10038 * linux-arm-low.c (update_registers_callback): Update, "entry"
10039 parameter is a struct thread_info * now.
10040 Fetch lwpid from current_inferior directly.
10041 (arm_insert_point): Pass &all_threads to find_inferior instead of
10043 (arm_remove_point): Ditto.
10044 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10045 (arm_prepare_to_resume): Fetch pid from thread.
10046 (arm_read_description): Fetch lwpid from current_inferior directly.
10047 * linux-low.c (all_lwps): Delete.
10048 (delete_lwp): Delete call to remove_inferior.
10049 (handle_extended_wait): Fetch lwpid from thread.
10050 (add_lwp): Don't set lwp->entry.id. Remove call to
10051 add_inferior_to_list.
10052 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10053 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10054 (kill_one_lwp_callback): Ditto.
10055 (linux_kill): Don't dereference NULL pointer.
10056 Fetch ptid,lwpid from thread.
10057 (get_detach_signal): Fetch ptid from thread.
10058 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10059 Simplify call to regcache_invalidate_thread.
10060 (delete_lwp_callback): Update, "entry" parameter is a
10061 struct thread_info * now. Fetch pid from thread.
10062 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10063 (status_pending_p_callback): Update, "entry" parameter is a
10064 struct thread_info * now. Fetch ptid from thread.
10065 (find_lwp_pid): Update, "entry" parameter is a
10066 struct thread_info * now.
10067 (linux_wait_for_lwp): Fetch pid from thread.
10068 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10069 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10070 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10071 (dequeue_one_deferred_signal): Ditto.
10072 (cancel_breakpoint): Fetch ptid from current_inferior.
10073 (linux_wait_for_event): Pass &all_threads to find_inferior,
10074 not &all_lwps. Fetch ptid, lwpid from thread.
10075 (count_events_callback): Update, "entry" parameter is a
10076 struct thread_info * now.
10077 (select_singlestep_lwp_callback): Ditto.
10078 (select_event_lwp_callback): Ditto.
10079 (cancel_breakpoints_callback): Ditto.
10080 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10082 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10083 (unsuspend_one_lwp): Update, "entry" parameter is a
10084 struct thread_info * now.
10085 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10087 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10088 Fetch lwpid from thread, not lwp.
10089 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10090 Pass &all_threads to find_inferior, not &all_lwps.
10091 (send_sigstop): Fetch lwpid from thread, not lwp.
10092 (send_sigstop_callback): Update, "entry" parameter is a
10093 struct thread_info * now.
10094 (suspend_and_send_sigstop_callback): Ditto.
10095 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10096 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10097 struct thread_info * now.
10098 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10100 (lwp_running): Update, "entry" parameter is a
10101 struct thread_info * now.
10102 (stop_all_lwps): Fetch ptid from thread.
10103 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10104 (linux_resume_one_lwp): Fetch lwpid from thread.
10105 (linux_set_resume_request): Update, "entry" parameter is a
10106 struct thread_info * now. Fetch pid, lwpid from thread.
10107 (resume_status_pending_p): Update, "entry" parameter is a
10108 struct thread_info * now.
10109 (need_step_over_p): Ditto. Fetch lwpid from thread.
10110 (start_step_over): Fetch lwpid from thread.
10111 (linux_resume_one_thread): Update, "entry" parameter is a
10112 struct thread_info * now. Fetch lwpid from thread.
10113 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10114 (proceed_one_lwp): Update, "entry" parameter is a
10115 struct thread_info * now. Fetch lwpid from thread.
10116 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10117 struct thread_info * now.
10118 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10119 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10120 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10122 (regsets_store_inferior_registers): Ditto.
10123 (fetch_register, store_register): Ditto.
10124 (linux_read_memory, linux_write_memory): Ditto.
10125 (linux_request_interrupt): Ditto.
10126 (linux_read_auxv): Ditto.
10127 (linux_xfer_siginfo): Ditto.
10128 (linux_qxfer_spu): Ditto.
10129 (linux_qxfer_libraries_svr4): Ditto.
10130 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10131 moved to inferiors.h.
10133 (get_thread_lwp): Update.
10134 (struct lwp_info): Delete member "entry". Simplify comment for
10136 (all_lwps): Delete.
10137 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10138 current_inferior directly.
10139 (update_watch_registers_callback): Update, "entry" parameter is a
10140 struct thread_info * now. Fetch pid from thread.
10141 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10142 (mips_insert_point): Fetch lwpid from current_inferior.
10143 Pass &all_threads to find_inferior, not &all_lwps.
10144 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10145 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10147 (mips_stopped_data_address): Ditto.
10148 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10150 * linux-tile-low.c (tile_arch_setup): Ditto.
10151 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10152 (update_debug_registers_callback): Update, "entry" parameter is a
10153 struct thread_info * now. Fetch pid from thread.
10154 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10155 Pass &all_threads to find_inferior, not &all_lwps.
10156 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10157 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10158 Pass &all_threads to find_inferior, not &all_lwps.
10159 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10160 (i386_dr_low_get_status): Ditto.
10161 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10162 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10163 (x86_linux_read_description): Ditto.
10164 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10166 2014-02-20 Doug Evans <dje@google.com>
10168 * inferiors.c (get_first_inferior): Fix buglet.
10170 2014-02-19 Doug Evans <dje@google.com>
10172 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10173 * inferiors.c (add_thread): Change result type to struct thread_info *.
10174 All callers updated.
10175 (add_lwp): Call add_thread here instead of in callers.
10176 All callers updated.
10177 * linux-low.h (get_lwp_thread): Rewrite.
10178 (struct lwp_info): New member "thread".
10180 2014-02-19 Doug Evans <dje@google.com>
10182 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10183 All callers updated.
10185 2014-02-19 Doug Evans <dje@google.com>
10187 * inferiors.c (add_thread): Fix whitespace.
10189 2014-02-19 Doug Evans <dje@google.com>
10191 * dll.c (clear_dlls): Replace accessing list implemention details
10193 * gdbthread.h (get_first_thread): Declare.
10194 * inferiors.c (for_each_inferior_with_data): New function.
10195 (get_first_thread): New function.
10196 (find_thread_ptid): Simplify.
10197 (get_first_inferior): New function.
10198 (clear_list): Delete.
10199 (one_inferior_p): New function.
10200 (clear_inferior_list): New function.
10201 (clear_inferiors): Update.
10202 * inferiors.h (for_each_inferior_with_data): Declare.
10203 (clear_inferior_list): Declare.
10204 (one_inferior_p): Declare.
10205 (get_first_inferior): Declare.
10206 * linux-low.c (linux_wait_for_event): Replace accessing list
10207 implemention details with API function.
10208 * server.c (target_running): Ditto.
10209 (accumulate_file_name_length): New function.
10210 (emit_dll_description): New function.
10211 (handle_qxfer_libraries): Replace accessing list implemention
10212 details with API function.
10213 (handle_qxfer_threads_worker): New function.
10214 (handle_qxfer_threads_proper): Replace accessing list implemention
10215 details with API function.
10216 (handle_query): Ditto.
10217 (visit_actioned_threads_callback_ftype): New typedef.
10218 (visit_actioned_threads_data): New struct.
10219 (visit_actioned_threads): Rewrite to be find_inferior callback.
10220 (resume): Call find_inferior.
10221 (handle_status): Replace accessing list implemention
10222 details with API function.
10223 (process_serial_event): Replace accessing list implemention details
10225 * target.c (set_desired_inferior): Replace accessing list implemention
10226 details with API function.
10227 * tracepoint.c (same_process_p): New function.
10228 (gdb_agent_about_to_close): Replace accessing list implemention
10229 details with API function.
10230 * win32-low.c (child_delete_thread): Replace accessing list
10231 implemention details with API function.
10232 (match_dll_by_basename): New function.
10233 (dll_is_loaded_by_basename): New function.
10234 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10235 details call to dll_is_loaded_by_basename.
10237 2014-02-19 Doug Evans <dje@google.com>
10239 * dll.h (struct dll_info): Add comment.
10240 * gdbthread.h (struct thread_info): Add comment.
10241 (current_ptid): Simplify.
10242 * inferiors.c (add_process): Update.
10243 (remove_process): Update.
10244 * inferiors.h (struct process_info): Rename member "head" to "entry".
10245 * linux-low.c (delete_lwp): Update.
10247 (last_thread_of_process_p): Update.
10248 (kill_one_lwp_callback, linux_kill): Update.
10249 (status_pending_p_callback): Update.
10250 (wait_for_sigstop): Update. Simplify read of ptid.
10251 (start_step_over): Update.
10252 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10253 (get_lwp_thread): Update.
10254 (struct lwp_info): Rename member "head" to "entry".
10255 * regcache.h (inferior_list_entry): Delete.
10256 * server.c (kill_inferior_callback): Update.
10257 (detach_or_kill_inferior_callback): Update.
10258 (print_started_pid): Update.
10259 (print_attached_pid): Update.
10260 (process_serial_event): Simplify read of ptid.
10261 * thread-db.c (thread_db_create_event): Update.
10262 (thread_db_get_tls_address): Update.
10263 * win32-low.c (current_inferior_ptid): Simplify.
10265 2014-02-19 Tom Tromey <tromey@redhat.com>
10267 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10269 (target_supports_btrace): Update.
10271 2014-02-14 Yao Qi <yao@codesourcery.com>
10273 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10274 (rsp-low-ipa.o): New target.
10276 2014-02-12 Tom Tromey <tromey@redhat.com>
10278 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10279 convert_ascii_to_int.
10280 * regcache.c (registers_to_string): Likewise.
10281 * remote-utils.c (decode_M_packet): Likewise.
10282 * server.c (process_serial_event): Likewise.
10284 2014-02-12 Tom Tromey <tromey@redhat.com>
10286 * server.c (handle_query, handle_v_run): Use hex2bin, not
10288 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10290 2014-02-12 Tom Tromey <tromey@redhat.com>
10292 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10293 convert_int_to_ascii.
10294 * regcache.c (registers_to_string, collect_register_as_string):
10296 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10298 * server.c (process_serial_event): Likewise.
10299 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10300 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10302 2014-02-12 Tom Tromey <tromey@redhat.com>
10304 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10305 bin2hex, not hexify.
10306 * tracepoint.c (cmd_qtstatus): Likewise.
10308 2014-02-12 Tom Tromey <tromey@redhat.com>
10310 * remote-utils.c (monitor_output): Pass explicit length to
10313 2014-02-12 Tom Tromey <tromey@redhat.com>
10315 * tracepoint.c: Include rsp-low.h.
10316 * server.c: Include rsp-low.h.
10317 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10318 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10320 * remote-utils.c: Include rsp-low.h.
10321 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10322 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10323 (convert_int_to_ascii, convert_ascii_to_int): Move to
10325 * regcache.c: Include rsp-low.h.
10326 * ax.c: Include rsp-low.h.
10327 * Makefile.in (SFILES): Add common/rsp-low.c.
10328 (OBS): Add rsp-low.o.
10329 (rsp-low.o): New target.
10331 2014-02-12 Tom Tromey <tromey@redhat.com>
10333 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10334 Include print-utils.h.
10335 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10336 (plongest, thirty_two, phex_nz): Remove.
10337 * Makefile.in (SFILES): Add common/print-utils.c.
10338 (OBS): Add print-utils.o.
10339 (print-utils-ipa.o): New target.
10340 (print-utils.o): New target.
10341 (IPA_OBJS): Add print-utils-ipa.o.
10343 2014-02-06 Tom Tromey <tromey@redhat.com>
10345 * Makefile.in (SFILES): Fix indentation.
10347 2014-02-05 Doug Evans <dje@google.com>
10349 * linux-low.c (linux_wait_for_event): Improve comment.
10350 (linux_wait_1): Keep current_inferior in sync with event_child.
10352 2014-01-22 Doug Evans <dje@google.com>
10354 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10356 2014-01-22 Doug Evans <dje@google.com>
10358 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10359 * configure: Regenerate.
10360 * config.in: Regenerate.
10361 * Makefile.in (SFILES): Add debug.c.
10362 (OBS): Add debug.o.
10363 * debug.c: New file.
10364 * debug.h: New file.
10365 * linux-aarch64-low.c (*): Update all debugging printfs to use
10366 debug_printf instead of fprintf.
10367 * linux-arm-low.c (*): Ditto.
10368 * linux-cris-low.c (*): Ditto.
10369 * linux-crisv32-low.c (*): Ditto.
10370 * linux-m32r-low.c (*): Ditto.
10371 * linux-sparc-low.c (*): Ditto.
10372 * linux-x86.c (*): Ditto.
10373 * linux-low.c (*): Ditto.
10374 (linux_wait_1): Add calls to debug_enter, debug_exit.
10375 (linux_wait): Remove redundant debugging printf.
10376 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10377 (linux_resume, unstop_all_lwps): Ditto.
10378 * mem-break.c (*): Update all debugging printfs to use
10379 debug_printf instead of fprintf.
10380 * remote-utils.c (*): Ditto.
10381 * thread-db.c (*): Ditto.
10382 * server.c #include <ctype.h>, "gdb_vecs.h".
10383 (debug_threads): Moved to debug.c.
10384 (*): Update all debugging printfs to use debug_printf instead of
10386 (start_inferior): Replace call to fflush with call to debug_flush.
10387 (monitor_show_help): Mention set debug-format.
10388 (parse_debug_format_options): New function.
10389 (handle_monitor_command): Handle "monitor set debug-format".
10390 (gdbserver_usage): Mention --debug-format.
10391 (main): Parse --debug-format.
10392 * server.h (debug_threads): Declaration moved to debug.h.
10393 #include "debug.h".
10394 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10395 trace_debug_1 that uses debug_printf.
10396 (tracepoint_look_up_symbols): Update all debugging printfs to use
10397 debug_printf instead of fprintf.
10399 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10401 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10404 2014-01-17 Pedro Alves <palves@redhat.com>
10407 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10408 defined after including gdb_proc_service.h.
10410 2014-01-16 Doug Evans <dje@google.com>
10412 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10413 (match_dll): Use it.
10415 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10417 * target.h (target_ops) <read_btrace>: Change parameters and
10418 return type to allow error reporting.
10419 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10420 trace reading errors on.
10421 * linux-low.c (linux_low_read_btrace): Pass trace reading
10423 (linux_low_disable_btrace): New.
10425 2014-01-15 Doug Evans <dje@google.com>
10427 * inferiors.c (thread_id_to_gdb_id): Delete.
10428 * inferiors.h (thread_id_to_gdb_id): Delete.
10430 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10432 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10433 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10436 2014-01-08 Pedro Alves <palves@redhat.com>
10438 * server.c (handle_status): Don't discard previous queued stop
10439 replies or thread's pending status here.
10440 (main) <disconnection>: Do it here instead.
10442 2014-01-08 Pedro Alves <palves@redhat.com>
10444 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10445 * server.c (visit_actioned_threads, handle_pending_status): New
10447 (handle_v_cont): Factor out parts to ...
10448 (resume): ... this new function. If in all-stop, and a thread
10449 being resumed has a pending status, report it without actually
10451 (myresume): Adjust to use the new 'resume' function.
10452 (clear_pending_status_callback, set_pending_status_callback)
10453 (find_status_pending_thread_callback): New functions.
10454 (handle_status): Handle the case of multiple threads having
10455 interesting statuses to report. Report threads' real last signal
10456 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10457 with an interesting thread to report the status for, instead of
10458 always reporting the status of the first thread.
10460 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10462 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10463 * gdbreplay.c (gdbreplay_version): Likewise.
10465 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10467 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10468 iov.iov_len with the real length in use.
10470 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10472 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10473 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10474 for all targets that use win32-low.c.
10475 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10476 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10478 2013-12-13 Pedro Alves <palves@redhat.com>
10480 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10481 if equal to TARGET_WAITKIND_LOADED.
10482 * win32-low.c (cached_status): New static global.
10483 (win32_wait): Add declaration.
10484 (do_initial_child_stuff): Flush all initial pending debug events
10485 up to the initial breakpoint.
10486 (win32_wait): If CACHED_STATUS was set, return that instead
10487 of doing a real wait. Remove the code resuming the execution
10488 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10489 during the initial phase. Also remove the code changing
10490 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10491 TARGET_WAITKIND_STOPPED.
10493 2013-12-11 Yao Qi <yao@codesourcery.com>
10495 * notif.c (handle_notif_ack): Return 0 if no notification
10498 2013-11-20 Doug Evans <dje@google.com>
10500 * linux-low.c (linux_set_resume_request): Fix comment.
10502 2013-11-20 Doug Evans <dje@google.com>
10504 * linux-low.c (resume_status_pending_p): Tweak comment.
10506 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10508 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10509 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10510 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10511 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10512 (srv_amd64_regobj): Add amd64-mpx.o.
10513 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10514 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10515 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10516 * i387-fp.c (num_pl_bnd_register) Added constant.
10517 (num_pl_bnd_cfg_registers) Added constant.
10518 (struct i387_xsave) Added reserved area and MPX fields.
10519 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10520 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10522 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10523 (init_registers_amd64_mpx_linux): Declare new function.
10524 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10525 (x86_64_regmap): Add MPX registers.
10526 (x86_linux_read_description): Add MPX case.
10527 (initialize_low_arch): Initialize MPX targets.
10529 2013-11-18 Tom Tromey <tromey@redhat.com>
10531 * configure: Rebuild.
10532 * configure.ac: Don't check for stdlib.h.
10533 * gdbreplay.c: Unconditionally include stdlib.h.
10535 2013-11-18 Tom Tromey <tromey@redhat.com>
10537 * config.in: Rebuild.
10538 * configure: Rebuild.
10539 * configure.ac: Don't use AC_HEADER_DIRENT.
10541 2013-11-18 Tom Tromey <tromey@redhat.com>
10543 * server.h: Don't check HAVE_STRING_H.
10544 * gdbreplay.c: Don't check HAVE_STRING_H.
10545 * configure: Rebuild.
10547 2013-11-18 Tom Tromey <tromey@redhat.com>
10549 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10552 2013-11-08 Tom Tromey <tromey@redhat.com>
10554 * configure, config.in: Rebuild.
10555 * configure.ac: Remove unused configury.
10557 2013-11-08 Tom Tromey <tromey@redhat.com>
10559 * acinclude.m4: Include common.m4, codeset.m4.
10560 * configure, config.in: Rebuild.
10561 * configure.ac: Use GDB_AC_COMMON.
10563 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10565 * linux-s390-low.c (HWCAP_S390_TE): New define.
10566 (s390_arch_setup): Consider the TE field in the HWCAP for
10567 determining 'have_regset_tdb'.
10569 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10572 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10575 2013-10-02 Pedro Alves <palves@redhat.com>
10577 * server.c (process_serial_event): Don't output "GDBserver
10578 exiting" if GDB is connected through stdio.
10579 * target.c (mywait): Likewise, be silent if GDB is connected
10582 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10584 * lynx-low.c (lynx_add_threads_after_attach): New function.
10585 (lynx_attach): Remove call to add_thread. Add call to
10586 lynx_add_threads_after_attach instead.
10588 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10590 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10591 * config.in, configure: Regenerated.
10593 2013-09-18 Yao Qi <yao@codesourcery.com>
10596 * server.c (start_inferior): Clear 'resume_info'.
10598 2013-09-16 Jiong Wang <jiwang@tilera.com>
10600 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10603 2013-09-16 Jiong Wang <jiwang@tilera.com>
10605 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10606 linux-tile-low.o to srv_tgtobj.
10608 2013-09-16 Will Newton <will.newton@linaro.org>
10610 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10613 2013-09-06 Pedro Alves <palves@redhat.com>
10615 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10616 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10617 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10618 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10619 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10620 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10622 2013-09-06 Pedro Alves <palves@redhat.com>
10624 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10625 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10627 2013-09-06 Pedro Alves <palves@redhat.com>
10629 * linux-amd64-ipa.c: Include tracepoint.h.
10630 * linux-i386-ipa.c: Include tracepoint.h.
10632 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10634 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10635 (ps_get_thread_area): New function.
10637 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10639 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10640 (initialize_low_arch): Call init_registers_crisv32 rather than
10641 init_register_crisv32.
10643 2013-09-05 Pedro Alves <palves@redhat.com>
10645 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10647 * hostio.h: ... this new file.
10648 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10649 win32-low.c: Include hostio.h.
10651 2013-09-05 Pedro Alves <palves@redhat.com>
10653 * server.h (gdb_client_data, handler_func, callback_handler_func)
10654 (delete_file_handler, add_file_handler, append_callback_event)
10655 (delete_callback_event, start_event_loop, initialize_event_loop):
10656 Move to event-loop.h and include it.
10657 * event-loop.h: New file.
10659 2013-09-05 Pedro Alves <palves@redhat.com>
10661 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10662 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10663 (loaded_dll, unloaded_dll): Move to ...
10664 * dll.h: ... this new file.
10665 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10667 2013-09-05 Pedro Alves <palves@redhat.com>
10669 * server.h (current_process, get_thread_process, all_processes)
10670 (add_inferior_to_list, for_each_inferior, current_inferior)
10671 (remove_inferior, add_process, remove_process, find_process_pid)
10672 (have_started_inferiors_p, have_attached_inferiors_p)
10673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10674 (clear_inferiors, find_inferior, find_inferior_id)
10675 (inferior_target_data, set_inferior_target_data)
10676 (inferior_regcache_data, set_inferior_regcache_data): Move to
10677 inferiors.h, and include it.
10678 * inferiors.h: New file.
10680 2013-09-05 Pedro Alves <palves@redhat.com>
10682 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10686 2013-09-05 Pedro Alves <palves@redhat.com>
10688 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10690 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10691 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10692 (handle_tracepoint_general_set, handle_tracepoint_query)
10693 (tracepoint_finished_step, tracepoint_was_hit)
10694 (release_while_stepping_state_list, current_traceframe)
10695 (in_readonly_region, traceframe_read_mem)
10696 (fetch_traceframe_registers, traceframe_read_sdata)
10697 (traceframe_read_info, struct fast_tpoint_collect_status)
10698 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10699 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10700 (supply_fast_tracepoint_registers)
10701 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10702 (ipa_tdesc, claim_trampoline_space)
10703 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10704 (agent_mem_read, agent_get_trace_state_variable_value)
10705 (agent_set_trace_state_variable_value, agent_tsv_read)
10706 (agent_mem_read_string, get_raw_reg_func_addr)
10707 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10708 * tracepoint.h: ... this new file.
10710 2013-09-05 Pedro Alves <palves@redhat.com>
10712 * server.h (perror_with_name, error, fatal, warning, paddress)
10713 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10715 * utils.h: New file.
10717 2013-09-05 Pedro Alves <palves@redhat.com>
10719 * server.h (remote_debug, noack_mode, transport_is_reliable)
10720 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10721 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10722 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10723 (write_enn, initialize_async_io, enable_async_io)
10724 (disable_async_io, check_remote_input_interrupt_request)
10725 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10726 (dead_thread_notify, prepare_resume_reply)
10727 (decode_address_to_semicolon, decode_address, decode_m_packet)
10728 (decode_M_packet, decode_X_packet, decode_xfer_write)
10729 (decode_search_memory_packet, unhexify, hexify)
10730 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10731 (look_up_one_symbol, relocate_instruction)
10732 (monitor_output): Move to remote-utils.h, and include it.
10733 * remote-utils.h: New file.
10735 2013-09-05 Pedro Alves <palves@redhat.com>
10737 * server.h (_): Delete.
10739 2013-09-02 Pedro Alves <palves@redhat.com>
10741 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10742 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10744 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10746 2013-09-02 Pierre Muller <muller@sourceware.org>
10748 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10749 or WriteProcessMemory complete successfully and handle
10750 ERROR_PARTIAL_COPY error.
10752 2013-09-02 Pedro Alves <palves@redhat.com>
10754 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10755 error instead of EIO.
10757 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10760 * linux-low.c: Include filestuff.h.
10761 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10762 * lynx-low.c: Include filestuff.h.
10763 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10764 * server.c: Include filestuff.h.
10765 (main): Call notice_open_fds.
10766 * spu-low.c: Include filestuff.h.
10767 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10769 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10771 * Makefile.in: Explain why ../target and ../nat are not
10772 listed as include file search paths.
10773 (linux-waitpid.o): New object file rule.
10774 * configure.srv (srv_native_linux_obj): New variable.
10775 Replace all occurrences of linux native object files with
10776 $srv_native_linux_obj.
10777 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10778 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10779 (linux_enable_event_reporting): Remove declaration.
10780 (my_waitpid): Moved to common/linux-waitpid.c.
10781 (linux_wait_for_event): Pass ptid when calling
10782 linux_enable_event_reporting.
10783 (linux_supports_tracefork_flag): Remove.
10784 (linux_enable_event_reporting): Likewise.
10785 (linux_tracefork_grandchild): Remove.
10786 (STACK_SIZE): Moved to common/linux-ptrace.c.
10787 (linux_tracefork_child): Remove.
10788 (linux_test_for_tracefork): Remove.
10789 (linux_look_up_symbols): Call linux_supports_traceclone.
10790 (initialize_low): Remove call to linux_test_for_tracefork.
10791 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10792 common/linux-ptrace.h.
10793 (PTRACE_TYPE_ARG4): Likewise.
10794 Include linux-ptrace.h.
10796 2013-08-21 Pedro Alves <palves@redhat.com>
10798 * config.in: Renegerate.
10800 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10802 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10803 (SFILES): Remove $(srcdir)/common/target-common.c and
10804 add $(srcdir)/target/waitstatus.c.
10805 (OBS): Remove target-common.o and add waitstatus.o.
10806 (server_h): Remove $(srcdir)/../common/target-common.h and
10807 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10808 and $(srcdir)/../target/waitstatus.h.
10809 (target-common.o): Remove.
10810 (waitstatus.o): New target object file.
10811 * target.h: Do not include target-common.h and
10812 include target/resume.h, target/wait.h and
10813 target/waitstatus.h.
10815 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10817 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10818 to PTRACE_TYPE_ARG3.
10819 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10820 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10822 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10823 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10825 2013-07-27 Jie Zhang <jie@codesourcery.com>
10826 Daniel Jacobowitz <dan@codesourcery.com>
10827 Yao Qi <yao@codesourcery.com>
10829 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10830 (mips-linux-watch.o): New rule.
10831 (mips_linux_watch_h): New variable.
10832 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10834 * linux-mips-low.c: Include mips-linux-watch.h.
10835 (struct arch_process_info, struct arch_lwp_info): New.
10836 (update_watch_registers_callback): New function.
10837 (mips_linux_new_process, mips_linux_new_thread) New functions.
10838 (mips_linux_prepare_to_resume, mips_insert_point): New
10840 (mips_remove_point, mips_stopped_by_watchpoint): New
10842 (rsp_bp_type_to_target_hw_bp_type): New function.
10843 (mips_stopped_data_address): New function.
10844 (the_low_target): Add watchpoint support functions.
10846 2013-07-27 Yao Qi <yao@codesourcery.com>
10848 * i386-low.c: Include break-common.h.
10849 (enum target_hw_bp_type): Remove.
10851 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10853 * Makefile.in (SFILES): /common/target-common.c.
10854 (OBS): Add target-common.o.
10855 (server_h): Add $(srcdir)/../common/target-common.h.
10856 (target-common.o): New target.
10857 * server.c (queue_stop_reply_callback): Free
10858 status string after use.
10859 * target.c (target_waitstatus_to_string): Remove.
10860 * target.h: Include target-common.h.
10861 (resume_kind): Likewise.
10862 (target_waitkind): Likewise.
10863 (target_waitstatus): Likewise.
10864 (TARGET_WNOHANG): Likewise.
10866 2013-07-04 Yao Qi <yao@codesourcery.com>
10868 * Makefile.in (host_alias): Use @host_noncanonical@.
10869 (target_alias): Use @target_noncanonical@.
10870 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10871 ACX_NONCANONICAL_HOST.
10872 * configure: Regenerated.
10875 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10877 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10878 * configure: Rebuild.
10879 * Makefile.in (version_host, version_target): Get from configure.
10880 (version.c): Use $(version_host) and $(version_target).
10882 2013-07-03 Pedro Alves <palves@redhat.com>
10884 * Makefile.in (config.status): Depend on development.sh.
10885 * acinclude.m4: Include libmcheck.m4.
10886 * configure: Regenerate.
10888 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10890 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10891 attribute inside the parentheses.
10892 (winapi_DebugSetProcessKillOnExit): Ditto.
10893 (winapi_DebugBreakProcess): Ditto.
10894 (winapi_GenerateConsoleCtrlEvent): Ditto.
10896 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10898 * notif.h (notif_event): Add a dummy member to avoid compiler
10901 2013-07-01 Pedro Alves <palves@redhat.com>
10903 * hostio.c (HOSTIO_PATH_MAX): Define.
10904 (require_filename, handle_open, handle_unlink, handle_readlink):
10907 2013-07-01 Pedro Alves <palves@redhat.com>
10909 * server.h: Include "pathmax.h".
10910 * linux-low.c: Don't include sys/param.h.
10911 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10913 * win32-low.c: Don't include sys/param.h.
10914 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10916 2013-07-01 Pedro Alves <palves@redhat.com>
10918 * event-loop.c: Don't check HAVE_UNISTD_H before including
10920 * gdbreplay.c: Likewise.
10921 * remote-utils.c: Likewise.
10922 * server.c: Likewise.
10923 * configure.ac: Don't check for unistd.h.
10924 * configure: Regenerate.
10926 2013-06-28 Tom Tromey <tromey@redhat.com>
10928 * Makefile.in (version.c): Use version.in, not
10931 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10933 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10934 * configure: Rebuild.
10935 * Makefile.in (version_host, version_target): Get from configure.
10936 (version.c): Use $(version_host) and $(version_target).
10938 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10940 Fix trace-status to output user name without trailing colon.
10941 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10943 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10945 Fix trace-status to output proper start-time and stop-time.
10946 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10947 output start time and stop time in hex as gdb expects.
10949 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10951 * tracepoint.c (build_traceframe_info_xml): Output trace state
10952 variables present in the trace buffer.
10954 2013-06-24 Tom Tromey <tromey@redhat.com>
10956 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10958 (version.o): Remove.
10959 * gdbreplay.c: Include version.h.
10960 (version, host_name): Don't declare.
10961 * server.h: Include version.h.
10962 (version, host_name): Don't declare.
10964 2013-06-12 Pedro Alves <palves@redhat.com>
10966 * linux-x86-low.c (linux_is_elf64): Delete global.
10967 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10968 with local linux_pid_exe_is_elf_64_file use.
10970 2013-06-11 Pedro Alves <palves@redhat.com>
10972 * linux-low.c (regset_disabled, disable_regset): New functions.
10973 (regsets_fetch_inferior_registers)
10974 (regsets_store_inferior_registers): Use them.
10975 (initialize_regsets_info); Don't allocate the disabled_regsets
10977 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10980 2013-06-11 Pedro Alves <palves@redhat.com>
10982 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10985 2013-06-11 Pedro Alves <palves@redhat.com>
10987 * linux-x86-low.c (initialize_low_arch): Call
10988 init_registers_x32_avx_linux.
10990 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10992 Fix compatibility with Android Bionic.
10993 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10996 2013-06-07 Pedro Alves <palves@redhat.com>
10999 * Makefile.in (OBS): Add tdesc.o.
11000 (IPA_OBJS): Add tdesc-ipa.o.
11001 (tdesc-ipa.o): New rule.
11002 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11004 * linux-low.c (new_inferior): Delete.
11005 (disabled_regsets, num_regsets): Delete.
11006 (linux_add_process): Adjust to set the new per-process
11008 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11009 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11010 was a stop. When calling arch_setup, switch the current inferior
11011 to the thread that got an event.
11012 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11013 (regsets_fetch_inferior_registers)
11014 (regsets_store_inferior_registers): New regsets_info parameter.
11016 (linux_register_in_regsets): New regs_info parameter. Adjust to
11018 (register_addr, fetch_register, store_register): New usrregs_info
11019 parameter. Adjust to use it.
11020 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11021 parameter regs_info. Adjust to use it.
11022 (linux_fetch_registers): Get the current inferior's regs_info, and
11024 (linux_store_registers): Ditto.
11025 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11026 (initialize_low): Don't initialize the target_regsets here. Call
11027 initialize_low_arch.
11028 * linux-low.h (target_regsets): Delete declaration.
11029 (struct regsets_info): New.
11030 (struct usrregs_info): New.
11031 (struct regs_info): New.
11032 (struct process_info_private) <new_inferior>: New field.
11033 (struct linux_target_ops): Delete the num_regs, regmap, and
11034 regset_bitmap fields. New field regs_info.
11035 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11036 * i387-fp.c (num_xmm_registers): Delete.
11037 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11038 calls to new interface.
11039 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11040 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11041 Infer the number of xmm registers from the regcache's target
11043 * i387-fp.h (num_xmm_registers): Delete.
11044 * inferiors.c (add_thread): Don't install the thread's regcache
11046 * proc-service.c (gregset_info): Fetch the current inferior's
11047 regs_info. Adjust to use it.
11048 * regcache.c: Include tdesc.h.
11049 (register_bytes, reg_defs, num_registers)
11050 (gdbserver_expedite_regs): Delete.
11051 (get_thread_regcache): If the thread doesn't have a regcache yet,
11052 create one, instead of aborting gdbserver.
11053 (regcache_invalidate_one): Rename to ...
11054 (regcache_invalidate_thread): ... this.
11055 (regcache_invalidate_one): New.
11056 (regcache_invalidate): Only invalidate registers of the current
11058 (init_register_cache): Add target_desc parameter, and use it.
11059 (new_register_cache): Ditto. Assert the target description has a
11060 non zero registers_size.
11061 (regcache_cpy): Add assertions. Adjust.
11062 (realloc_register_cache, set_register_cache): Delete.
11063 (registers_to_string, registers_from_string): Adjust.
11064 (find_register_by_name, find_regno, find_register_by_number)
11065 (register_cache_size): Add target_desc parameter, and use it.
11066 (free_register_cache_thread, free_register_cache_thread_one)
11067 (regcache_release, register_cache_size): New.
11068 (register_size): Add target_desc parameter, and use it.
11069 (register_data, supply_register, supply_register_zeroed)
11070 (supply_regblock, supply_register_by_name, collect_register)
11071 (collect_register_as_string, collect_register_by_name): Adjust.
11072 * regcache.h (struct target_desc): Forward declare.
11073 (struct regcache) <tdesc>: New field.
11074 (init_register_cache, new_register_cache): Add target_desc
11076 (regcache_invalidate_thread): Declare.
11077 (regcache_invalidate_one): Delete declaration.
11078 (regcache_release): Declare.
11079 (find_register_by_number, register_cache_size, register_size)
11080 (find_regno): Add target_desc parameter.
11081 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11083 * remote-utils.c: Include tdesc.h.
11084 (outreg, prepare_resume_reply): Adjust.
11085 * server.c: Include tdesc.h.
11086 (gdbserver_xmltarget): Delete declaration.
11087 (get_features_xml, process_serial_event): Adjust.
11088 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11090 (struct process_info) <tdesc>: New field.
11091 (ipa_tdesc): Declare.
11092 * tdesc.c: New file.
11093 * tdesc.h: New file.
11094 * tracepoint.c: Include tdesc.h.
11095 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11096 (get_context_regcache): Adjust to pass ipa_tdesc down.
11097 (do_action_at_tracepoint): Adjust to get the register cache size
11098 from the context regcache's description.
11099 (traceframe_walk_blocks): Adjust to get the register cache size
11100 from the current trace frame's description.
11101 (traceframe_get_pc): Adjust to get current trace frame's
11102 description and pass it down.
11103 (gdb_collect): Adjust to get the register cache size from the
11105 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11106 (gdbserver_xmltarget): Delete.
11107 (initialize_low_tracepoint): Set the ipa's target description.
11108 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11109 (initialize_low_tracepoint): Set the ipa's target description.
11110 * linux-x86-low.c: Include tdesc.h.
11111 [__x86_64__] (is_64bit_tdesc): New.
11112 (ps_get_thread_area, x86_get_thread_area): Use it.
11113 (i386_cannot_store_register): Rename to ...
11114 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11115 (i386_cannot_fetch_register): Rename to ...
11116 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11117 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11119 (target_regsets): Rename to ...
11120 (x86_regsets): ... this.
11121 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11123 (x86_siginfo_fixup): Use is_64bit_tdesc.
11124 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11125 (tdesc_x32_avx_linux, tdesc_x32_linux)
11126 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11128 (x86_linux_update_xmltarget): Delete.
11129 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11130 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11131 (AMD64_LINUX_USER64_CS): New.
11132 (x86_linux_read_description): New, based on
11133 x86_linux_update_xmltarget.
11134 (same_process_callback): New.
11135 (x86_arch_setup_process_callback): New.
11136 (x86_linux_update_xmltarget): New.
11137 (x86_regsets_info): New.
11138 (amd64_linux_regs_info): New.
11139 (i386_linux_usrregs_info): New.
11140 (i386_linux_regs_info): New.
11141 (x86_linux_regs_info): New.
11142 (x86_arch_setup): Reimplement.
11143 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11144 (x86_emit_ops): Ditto.
11145 (the_low_target): Adjust. Install x86_linux_regs_info,
11146 x86_cannot_fetch_register, and x86_cannot_store_register.
11147 (initialize_low_arch): New.
11148 * linux-ia64-low.c (tdesc_ia64): Declare.
11149 (ia64_fetch_register): Adjust.
11150 (ia64_usrregs_info, regs_info): New globals.
11151 (ia64_regs_info): New function.
11152 (the_low_target): Adjust.
11153 (initialize_low_arch): New function.
11154 * linux-sparc-low.c (tdesc_sparc64): Declare.
11155 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11157 (sparc_arch_setup): New function.
11158 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11159 (the_low_target): Adjust.
11160 (initialize_low_arch): New function.
11161 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11162 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11163 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11164 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11165 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11166 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11167 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11168 (tdesc_powerpc_isa205_vsx64l): Declare.
11169 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11170 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11171 (ppc_set_pc, ppc_get_hwcap): Adjust.
11172 (ppc_usrregs_info): Forward declare.
11173 (!__powerpc64__) ppc_regmap_adjusted: New global.
11174 (ppc_arch_setup): Adjust to the current process'es target
11176 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11177 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11178 (ppc_store_evrregset): Adjust.
11179 (target_regsets): Rename to ...
11180 (ppc_regsets): ... this, and make static.
11181 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11182 (ppc_regs_info): New function.
11183 (the_low_target): Adjust.
11184 (initialize_low_arch): New function.
11185 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11186 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11187 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11188 (tdesc_s390x_linux64v2): Declare.
11189 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11190 (s390_fill_gregset, s390_store_last_break): Adjust.
11191 (target_regsets): Rename to ...
11192 (s390_regsets): ... this, and make static.
11193 (s390_get_pc, s390_set_pc): Adjust.
11194 (s390_get_hwcap): New target_desc parameter, and use it.
11195 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11196 (s390_arch_setup): Adjust to set the current process'es target
11197 description. Don't adjust the regmap.
11198 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11199 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11200 (regs_info_3264): New globals.
11201 (s390_regs_info): New function.
11202 (the_low_target): Adjust.
11203 (initialize_low_arch): New function.
11204 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11205 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11206 [__mips64] (init_registers_mips_linux)
11207 (init_registers_mips_dsp_linux): Delete defines.
11208 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11209 (have_dsp): New global.
11210 (mips_read_description): New, based on mips_arch_setup.
11211 (mips_arch_setup): Reimplement.
11212 (get_usrregs_info): New function.
11213 (mips_cannot_fetch_register, mips_cannot_store_register)
11214 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11215 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11216 (target_regsets): Rename to ...
11217 (mips_regsets): ... this, and make static.
11218 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11219 (dsp_regs_info, regs_info): New globals.
11220 (mips_regs_info): New function.
11221 (the_low_target): Adjust.
11222 (initialize_low_arch): New function.
11223 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11224 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11226 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11227 (arm_read_description): New, with bits factored from
11229 (arm_arch_setup): Reimplement.
11230 (target_regsets): Rename to ...
11231 (arm_regsets): ... this, and make static.
11232 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11233 (arm_regs_info): New function.
11234 (the_low_target): Adjust.
11235 (initialize_low_arch): New function.
11236 * linux-m68k-low.c (tdesc_m68k): Declare.
11237 (target_regsets): Rename to ...
11238 (m68k_regsets): ... this, and make static.
11239 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11240 (m68k_regs_info): New function.
11241 (m68k_arch_setup): New function.
11242 (the_low_target): Adjust.
11243 (initialize_low_arch): New function.
11244 * linux-sh-low.c (tdesc_sharch): Declare.
11245 (target_regsets): Rename to ...
11246 (sh_regsets): ... this, and make static.
11247 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11248 (sh_regs_info, sh_arch_setup): New functions.
11249 (the_low_target): Adjust.
11250 (initialize_low_arch): New function.
11251 * linux-bfin-low.c (tdesc_bfin): Declare.
11252 (bfin_arch_setup): New function.
11253 (bfin_usrregs_info, regs_info): New globals.
11254 (bfin_regs_info): New function.
11255 (the_low_target): Adjust.
11256 (initialize_low_arch): New function.
11257 * linux-cris-low.c (tdesc_cris): Declare.
11258 (cris_arch_setup): New function.
11259 (cris_usrregs_info, regs_info): New globals.
11260 (cris_regs_info): New function.
11261 (the_low_target): Adjust.
11262 (initialize_low_arch): New function.
11263 * linux-cris-low.c (tdesc_crisv32): Declare.
11264 (cris_arch_setup): New function.
11265 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11266 (cris_regs_info): New function.
11267 (the_low_target): Adjust.
11268 (initialize_low_arch): New function.
11269 * linux-m32r-low.c (tdesc_m32r): Declare.
11270 (m32r_arch_setup): New function.
11271 (m32r_usrregs_info, regs_info): New globals.
11272 (m32r_regs_info): Adjust.
11273 (initialize_low_arch): New function.
11274 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11275 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11276 (tic6x_usrregs_info): Forward declare.
11277 (tic6x_read_description): New function, based on ...
11278 (tic6x_arch_setup): ... this. Reimplement.
11279 (target_regsets): Rename to ...
11280 (tic6x_regsets): ... this, and make static.
11281 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11282 (tic6x_regs_info): New function.
11283 (the_low_target): Adjust.
11284 (initialize_low_arch): New function.
11285 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11286 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11287 (target_regsets): Rename to ...
11288 (xtensa_regsets): ... this, and make static.
11289 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11291 (xtensa_arch_setup, xtensa_regs_info): New functions.
11292 (the_low_target): Adjust.
11293 (initialize_low_arch): New function.
11294 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11295 (nios2_arch_setup): Set the current process'es tdesc.
11296 (target_regsets): Rename to ...
11297 (nios2_regsets): ... this.
11298 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11299 (nios2_regs_info): New function.
11300 (the_low_target): Adjust.
11301 (initialize_low_arch): New function.
11302 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11303 (aarch64_arch_setup): Set the current process'es tdesc.
11304 (target_regsets): Rename to ...
11305 (aarch64_regsets): ... this.
11306 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11307 (aarch64_regs_info): New function.
11308 (the_low_target): Adjust.
11309 (initialize_low_arch): New function.
11310 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11312 (target_regsets): Rename to ...
11313 (tile_regsets): ... this.
11314 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11315 (tile_regs_info): New function.
11316 (tile_arch_setup): Set the current process'es tdesc.
11317 (the_low_target): Adjust.
11318 (initialize_low_arch): New function.
11319 * spu-low.c (tdesc_spu): Declare.
11320 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11321 * win32-arm-low.c (tdesc_arm): Declare.
11322 (arm_arch_setup): New function.
11323 (the_low_target): Install arm_arch_setup instead of
11324 init_registers_arm.
11325 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11326 (init_windows_x86): Rename to ...
11327 (i386_arch_setup): ... this. Set `win32_tdesc'.
11328 (the_low_target): Adjust.
11329 * win32-low.c (win32_tdesc): New global.
11330 (child_add_thread): Don't create the thread cache here.
11331 (do_initial_child_stuff): Set the new process'es tdesc.
11332 * win32-low.h (struct target_desc): Forward declare.
11333 (win32_tdesc): Declare.
11334 * lynx-i386-low.c (tdesc_i386): Declare global.
11335 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11336 * lynx-low.c (lynx_tdesc): New global.
11337 (lynx_add_process): Set the new process'es tdesc.
11338 * lynx-low.h (struct target_desc): Forward declare.
11339 (lynx_tdesc): Declare global.
11340 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11341 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11342 * nto-low.c (nto_tdesc): New global.
11343 (do_attach): Set the new process'es tdesc.
11344 * nto-low.h (struct target_desc): Forward declare.
11345 (nto_tdesc): Declare.
11346 * nto-x86-low.c (tdesc_i386): Declare.
11347 (nto_x86_arch_setup): Set `nto_tdesc'.
11349 2013-06-04 Gary Benson <gbenson@redhat.com>
11351 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11352 to qSupported response when appropriate.
11353 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11354 with nonzero-length annex.
11355 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11356 arguments supplied in annex.
11358 2013-05-31 Doug Evans <dje@google.com>
11361 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11362 64 bits in 64-cross-32 environment.
11364 2013-05-28 Pedro Alves <palves@redhat.com>
11366 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11367 (aarch64-without-fpu.c): Delete rule.
11368 * configure.srv (aarch64*-*-linux*): Remove references to
11369 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11370 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11373 2013-05-24 Pedro Alves <palves@redhat.com>
11375 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11376 instead of strchr/decode_address. Error if the range isn't split
11377 with a ','. Don't assume there's be a ':' in the action.
11379 2013-05-23 Yao Qi <yao@codesourcery.com>
11380 Pedro Alves <palves@redhat.com>
11382 * linux-low.c (lwp_in_step_range): New function.
11383 (linux_wait_1): If the thread was range stepping and stopped
11384 outside the stepping range, report the stop to GDB. Otherwise,
11385 continue stepping. Add range stepping debug output.
11386 (linux_set_resume_request): Copy the step range from the resume
11387 request to the lwp.
11388 (linux_supports_range_stepping): New.
11389 (linux_target_ops) <supports_range_stepping>: Set to
11390 linux_supports_range_stepping.
11391 * linux-low.h (struct linux_target_ops)
11392 <supports_range_stepping>: New field.
11393 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11394 * linux-x86-low.c (x86_supports_range_stepping): New.
11395 (the_low_target) <supports_range_stepping>: Set to
11396 x86_supports_range_stepping.
11397 * server.c (handle_v_cont): Handle 'r' action.
11398 (handle_v_requests): Append ";r" if the target supports range
11400 * target.h (struct thread_resume) <step_range_start,
11401 step_range_end>: New fields.
11402 (struct target_ops) <supports_range_stepping>:
11404 (target_supports_range_stepping): New macro.
11406 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11408 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11409 confusion in comment.
11411 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11413 * lynx-low.c (struct process_info_private): New type.
11414 (lynx_add_process): New function.
11415 (lynx_create_inferior, lynx_attach): Replace calls to
11416 add_process by calls to lynx_add_process.
11417 (lynx_resume): If PTID is null, then try using
11418 current_process()->private->last_wait_event_ptid.
11420 (lynx_clear_inferiors): Delete. The contents of that function
11421 has been inlined in lynx_mourn;
11422 (lynx_wait_1): Save the ptid in the process's private data.
11423 (lynx_mourn): Free the process' private data. Replace call
11424 to lynx_clear_inferiors by call to clear_inferiors.
11426 2013-05-17 Yao Qi <yao@codesourcery.com>
11428 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11431 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11433 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11434 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11435 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11436 PT_TEXT_END_ADDR guards. Update comments.
11437 (linux_target_op) <read_offsets>: Conditionally define to
11438 linux_read_offsets if the target is UCLIBC and if it defines
11439 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11441 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11442 Andrew Jenner <andrew@codesourcery.com>
11444 * Makefile.in (SFILES): Add linux-nios2-low.c.
11445 (clean): Add action to delete nios2-linux.c.
11446 (nios2-linux.c): New rule.
11447 * configure.srv: Add nios2*-*-linux*.
11448 * linux-nios2-low.c: New.
11450 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11452 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11454 2013-04-25 Hui Zhu <hui@codesourcery.com>
11457 * ax.c (ax_printf): Add fflush.
11459 2013-04-22 Tom Tromey <tromey@redhat.com>
11461 * Makefile.in (SFILES): Add filestuff.c.
11462 (OBS): Add filestuff.o.
11463 (filestuff.o): New target.
11464 * config.in, configure: Rebuild.
11465 * configure.ac: Check for fdwalk, pipe2.
11467 2013-04-17 Pedro Alves <palves@redhat.com>
11469 * configure.ac (USE_THREAD_DB): Delete variable.
11470 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11471 Don't AC_SUBST USE_THREAD_DB.
11472 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11473 * config.in, configure: Regenerate.
11475 2013-04-16 Pedro Alves <palves@redhat.com>
11477 * linux-low.h (struct lwp_info) <thread_known>: Move under
11478 the USE_THREAD_DB #ifdef.
11480 2013-04-16 Pedro Alves <palves@redhat.com>
11482 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11483 (linux-low.o): Delete rule.
11484 * linux-low.h: Always include "gdb_thread_db.h" instead of
11485 conditionally including thread_db.h.
11486 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11489 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11491 * Makefile.in (install-only): Fix make install regression.
11493 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11495 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11496 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11498 * gdbserver.1: Remove.
11500 2013-03-22 Pedro Alves <palves@redhat.com>
11502 * linux-low.c (handle_extended_wait): Don't call
11503 linux_enable_event_reporting.
11505 2013-03-15 Tony Theodore <tonyt@logyst.com>
11508 * Makefile.in (SHELL): Use @SHELL@.
11510 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11512 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11515 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11517 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11518 Remove extraneous NULL element.
11520 2013-03-13 Yao Qi <yao@codesourcery.com>
11522 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11523 'V' block in trace frame.
11525 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11527 * target.h (struct target_ops): Add btrace ops.
11528 (target_supports_btrace): New macro.
11529 (target_enable_btrace): New macro.
11530 (target_disable_btrace): New macro.
11531 (target_read_btrace): New macro.
11532 * gdbthread.h (struct thread_info): Add btrace field.
11533 * server.c: Include btrace-common.h.
11534 (handle_btrace_general_set): New function.
11535 (handle_btrace_enable): New function.
11536 (handle_btrace_disable): New function.
11537 (handle_general_set): Call handle_btrace_general_set.
11538 (handle_qxfer_btrace): New function.
11539 (struct qxfer qxfer_packets[]): Add btrace entry.
11540 * inferiors.c (remove_thread): Disable btrace.
11541 * linux-low: Include linux-btrace.h.
11542 (linux_low_enable_btrace): New function.
11543 (linux_low_read_btrace): New function.
11544 (linux_target_ops): Add btrace ops.
11545 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11546 Add srv_linux_btrace=yes.
11547 (x86_64-*-linux*): Add linux-btrace.o.
11548 Add srv_linux_btrace=yes.
11549 * configure.ac: Define HAVE_LINUX_BTRACE.
11550 * config.in: Regenerated.
11551 * configure: Regenerated.
11553 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11555 * server.c (handle_qxfer): Preserve error message if -3 is
11557 (qxfer): Document the -3 return value.
11559 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11561 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11562 (linux_btrace_h): New variable.
11563 (linux-btrace.o): New rule.
11565 2013-03-08 Stan Shebs <stan@codesourcery.com>
11566 Hafiz Abid Qadeer <abidh@codesourcery.com>
11568 * tracepoint.c (trace_buffer_size): New global.
11569 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11570 (init_trace_buffer): Change to one-argument function. Allocate
11571 trace buffer memory.
11572 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11573 handle QTBuffer:size packet.
11574 (cmd_bigqtbuffer_size): New function.
11575 (initialize_tracepoint): Call init_trace_buffer with
11576 DEFAULT_TRACE_BUFFER_SIZE.
11577 * server.c (handle_query): Add QTBuffer:size in the
11580 2013-03-07 Yao Qi <yao@codesourcery.com>
11582 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11583 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11585 (cmd_qtsp): Adjust condition. Do post increment.
11586 Set cur_action and cur_step_action back to 0.
11588 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11591 * linux-low.c (linux_write_memory): Return early success if LEN is
11594 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11596 * configure.srv: Add x86_64-*-cygwin* as target.
11598 2013-02-28 Tom Tromey <tromey@redhat.com>
11600 * configure.ac: Invoke AC_SYS_LARGEFILE.
11601 * configure, config.in: Rebuild.
11603 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11605 * win32-low.c: Throughout, fix format strings and casts of
11606 printf-like functions to avoid type related warnings on all
11608 (get_child_debug_event): Print dwDebugEventCode as hex since
11609 that's how it's usually documented.
11611 2013-02-28 Yao Qi <yao@codesourcery.com>
11613 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11616 2013-02-27 Jiong Wang <jiwang@tilera.com>
11618 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11619 (reg-tilegx32.c): New rule.
11620 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11621 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11622 different register info initializer according to elf class.
11623 (init_registers_tilgx32): New function. The tilegx32 register info
11625 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11626 (tile_store_gregset): Likewise.
11628 2013-02-27 Yao Qi <yao@codesourcery.com>
11630 * server.c (process_point_options): Print debug message when
11631 debug_threads is true.
11633 2013-02-26 Yao Qi <yao@codesourcery.com>
11635 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11637 2013-02-19 Pedro Alves <palves@redhat.com>
11638 Kai Tietz <ktietz@redhat.com>
11642 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11643 instead of strtoul to extract address from packet.
11644 (process_serial_event) <'z'>: Likewise.
11646 2013-02-18 Yao Qi <yao@codesourcery.com>
11648 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11650 2013-02-14 Pedro Alves <palves@redhat.com>
11654 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11655 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11657 2013-02-14 Pedro Alves <palves@redhat.com>
11659 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11661 2013-02-14 Pedro Alves <palves@redhat.com>
11663 * tracepoint.c (save_string): Delete.
11664 (add_tracepoint_action): Use savestring instead of save_string.
11666 2013-02-12 Pedro Alves <palves@redhat.com>
11668 * linux-xtensa-low.c: Ditto.
11669 * xtensa-xtregs.c: Ditto.
11671 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11673 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11676 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11678 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11679 aarch64_num_wp_regs and aarch64_num_bp_regs to
11680 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11682 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11684 * linux-aarch64-low.c (ps_get_thread_area): Replace
11685 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11687 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11688 Marcus Shawcroft <marcus.shawcroft@arm.com>
11689 Nigel Stephens <nigel.stephens@arm.com>
11690 Yufeng Zhang <yufeng.zhang@arm.com>
11692 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11693 (aarch64.c, aarch64-without-fpu.c): New targets.
11694 * configure.srv (aarch64*-*-linux*): New.
11695 * linux-aarch64-low.c: New file.
11697 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11699 * linux-low.c (handle_extended_wait, linux_create_inferior)
11700 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11701 (dequeue_one_deferred_signal, linux_resume_one_thread)
11702 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11703 (linux_tracefork_grandchild, linux_test_for_tracefork)
11704 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11705 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11706 where the argument is 0.
11708 2013-01-25 Yao Qi <yao@codesourcery.com>
11710 * event-loop.c: Include "queue.h".
11711 (gdb_event_p): New typedef.
11712 (struct gdb_event) <next_event>: Remove.
11713 (event_queue): Change to QUEUE(gdb_event_p).
11714 (async_queue_event): Remove.
11715 (gdb_event_xfree): New.
11716 (initialize_event_loop): New.
11717 (process_event): Use API from QUEUE.
11718 (wait_for_event): Likewise.
11719 * server.c (main): Call initialize_event_loop.
11720 * server.h (initialize_event_loop): Declare.
11722 2013-01-18 Yao Qi <yao@codesourcery.com>
11724 * ax.h (struct eval_agent_expr_context): New.
11725 (gdb_eval_agent_expr): Update declaration.
11726 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11727 TFRAME. Add new argument CTX.
11728 * server.h (struct eval_agent_expr_context): Declare.
11729 (agent_mem_read, agent_tsv_read): Update declaration.
11730 (agent_mem_read_string): Likewise.
11731 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11732 (add_traceframe_block): Add new argument TPOINT.
11733 Increase TPOINT->traceframe_usage.
11734 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11735 eval_tracepoint_agent_expr.
11736 (condition_true_at_tracepoint): Likewise.
11737 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11738 (agent_mem_read_string, agent_tsv_read): Likewise.
11740 2013-01-16 Yao Qi <yao@codesourcery.com>
11742 * linux-low.c (linux_resume_one_lwp): Don't check
11743 'lwp->bp_reinsert != 0'.
11745 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11746 Pedro Alves <palves@redhat.com>
11748 * lynx-low.c (ptrace_request_to_str): Define a temporary
11749 macro and use it to simplify this function's implementation.
11751 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11753 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11756 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11758 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11760 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11762 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11764 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11766 * lynx-low.c (lynx_resume): Use the resume_info parameter
11767 to determine the ptid for the lynx_ptrace call, unless
11768 it is equal to minus_one_ptid, in which case we use the
11769 ptid of the current_inferior.
11770 (lynx_wait_1): After having received a thread create/exit
11771 event, resume the inferior's execution using the signaling
11772 thread's ptid, rather than the old ptid.
11774 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11776 * lynx-low.c (lynx_resume): Delete variable ret.
11778 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11780 * gdbreplay.c (gdbreplay_version): Update copyright year.
11781 * server.c (gdbserver_version): Likewise.
11783 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11785 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11788 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11790 * lynx-low.c (ptrace_request_to_str): Add handling for
11791 PTRACE_GETTRACESIG.
11793 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11795 * lynx-low.c (lynx_attach): Delete variable new_process.
11797 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11799 * lynx-low.c (lynx_create_inferior): Delete variable
11802 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11804 * lynx-low.c (ptrace_request_to_str): Do not handle
11805 PTRACE_GETTHREADLIST if this macro does not exist.
11807 2012-12-15 Yao Qi <yao@codesourcery.com>
11809 * Makefile.in (OBS): Add notif.o.
11810 * notif.c, notif.h: New.
11811 * server.c: Include "notif.h".
11812 (struct vstop_notif) <next>: Remove.
11814 (queue_stop_reply): Update.
11815 (push_event, send_next_stop_reply): Remove.
11816 (discard_queued_stop_replies): Update.
11817 (notif_stop): New variable.
11818 (handle_v_stopped): Remove.
11819 (handle_v_requests): Don't call handle_v_stopped. Call
11820 handle_ack_notif instead.
11821 (queue_stop_reply_callback): Call notif_event_enque instead
11822 of queue_stop_reply.
11823 (handle_status): Don't call send_next_stop_reply, call
11824 notif_write_event instead.
11825 (kill_inferior_callback): Likewise.
11826 (detach_or_kill_inferior_callback): Likewise.
11827 (main): Call initialize_notif.
11828 (process_serial_event): Call QUEUE_is_empty.
11829 (handle_target_event): Call notif_push instead of push event.
11830 * server.h (push_event): Remove declaration.
11832 2012-12-10 Tom Tromey <tromey@redhat.com>
11834 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11835 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11838 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11839 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11840 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11841 (amd64-linux-ipa.o, ax.o): Rewrite.
11842 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11843 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11844 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11845 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11846 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11847 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11848 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11849 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11850 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11851 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11852 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11853 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11854 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11855 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11856 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11857 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11858 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11859 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11860 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11861 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11862 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11863 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11864 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11865 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11866 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11867 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11868 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11869 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11870 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11871 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11872 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11873 (reg-tilegx.o): Remove.
11874 (all_object_files): New macro.
11875 Include .deps files.
11876 * aclocal.m4, configure: Rebuild.
11877 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11878 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11879 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11881 2012-12-05 Tom Tromey <tromey@redhat.com>
11884 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11886 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11888 * configure.ac: Check for linux/perf_event.h.
11889 * config.in: Regenerated.
11890 * configure: Regenerated.
11892 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11894 * hostio.c (handle_readlink): Decrease buffer size
11895 parameter passed to readlink by one byte.
11897 2012-11-26 Yao Qi <yao@codesourcery.com>
11899 * configure.ac (build_warnings): Append '-Wempty-body'.
11900 * configure: Regenerated.
11901 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11904 2012-11-15 Pierre Muller <muller@sourceware.org>
11906 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11907 * config.in: Regenerate.
11908 * configure: Regenerate.
11909 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11910 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11911 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11912 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11914 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11915 instead of <sys/wait.h> header.
11916 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11918 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11920 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11921 (various make rules): Remove -DGDBSERVER
11923 2012-11-09 Yao Qi <yao@codesourcery.com>
11925 * spu-low.c (current_ptid): Move it to ..
11926 * gdbthread.h: ... here. New.
11927 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11928 * server.c (myresume, process_serial_event): Likewise.
11929 * thread-db.c (thread_db_find_new_threads): Likewise.
11930 * tracepoint.c (run_inferior_command): Likewise.
11932 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11934 * server.c (handle_search_memory_1): Include access length in
11937 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11939 * linux-crisv32-low.c: Fix compile errors.
11941 2012-09-04 Yao Qi <yao@codesourcery.com>
11943 * tracepoint.c (cmd_qtsv): Adjust debug message.
11944 Don't check CUR_TPOINT.
11946 2012-08-28 Yao Qi <yao@codesourcery.com>
11948 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11949 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11950 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11951 Remove declarations of xmalloc, xreallloc, xstrdup and
11953 * Makefile.in (libiberty_h): New.
11954 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11955 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11957 2012-08-23 Yao Qi <yao@codesourcery.com>
11959 * server.h: Remove declaration of 'xsnprintf'.
11961 2012-08-22 Keith Seitz <keiths@redhat.com>
11963 * server.h: Include build-gnulib-gbserver/config.h.
11964 * gdbreplay.c: Likewise.
11966 2012-08-08 Doug Evans <dje@google.com>
11968 * Makefile.in (SFILES): Add gdb_vecs.c.
11969 (OBS): Add gdb_vecs.o.
11970 (gdb_vecs_h, host_defs_h): New variables.
11971 (thread-db.o): Add $(gdb_vecs_h) dependency.
11972 (gdb_vecs.o): New rule.
11973 * thread-db.c: #include "gdb_vecs.h".
11974 (thread_db_load_search): Use a vector to iterate over path elements.
11975 Handle text appearing after "$pdir".
11977 * configure.ac: Add check for strstr.
11978 * config.in: Regenerate.
11979 * configure: Regenerate.
11981 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11983 * hostio.c (handle_pread): If pread fails, fall back to attempting
11985 (handle_pwrite): Likewise for pwrite.
11987 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11989 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11990 between unsupported TYPE and unimplementable ADDR/LEN combination.
11991 (arm_insert_point): Act on new return value.
11993 2012-07-31 Pedro Alves <palves@redhat.com>
11995 * server.c (process_point_options): Only skip tokens if we find
11996 one that is unrecognized. Don't treat 'X' specially while
11997 skipping unrecognized tokens.
11999 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12001 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12002 to 4-byte-align HW breakpoint addresses for Thumb.
12004 2012-07-27 Yao Qi <yao@codesourcery.com>
12008 * server.h: Declare gdb_agent_about_to_close.
12009 * target.c (kill_inferior): Include "agent.h".
12010 New. Send command 'kill'.
12011 * target.h (kill_inferior): Removed macro.
12012 * tracepoint.c (gdb_agent_about_to_close): New.
12013 (gdb_agent_helper_thread): Handle command 'close'.
12014 Wait endlessly until the inferior stops.
12015 Install gdb_agent_remove_socket to atexit hook.
12016 (agent_socket_name): New static variable.
12017 (gdb_agent_socket_init): Replace local variable 'name' with
12018 'agent_socket_name'.
12019 (gdb_agent_remove_socket): New.
12021 2012-07-27 Yao Qi <yao@codesourcery.com>
12023 * server.c (process_point_options): Stop at 'X' when parsing.
12025 2012-07-19 Michael Eager <eager@eagercon.com>
12027 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12029 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12030 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12031 hardware breakpoint.
12033 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12035 * gdbserver/linux-low.c (initialize_low): Call
12036 linux_ptrace_init_warnings.
12038 2012-07-02 Doug Evans <dje@google.com>
12040 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12043 2012-07-02 Stan Shebs <stan@codesourcery.com>
12045 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12046 (ax.o): Add it to build rule.
12048 (OBS): Add format.o.
12049 (IPA_OBS): Add format.o.
12050 * server.c (handle_query): Claim support for breakpoint commands.
12051 (process_point_options): Add command case.
12052 (process_serial_event): Leave running if there are printfs in
12054 * mem-break.h (any_persistent_commands): Declare.
12055 (add_breakpoint_commands): Declare.
12056 (gdb_no_commands_at_breakpoint): Declare.
12057 (run_breakpoint_commands): Declare.
12058 * mem-break.c (struct point_command_list): New struct.
12059 (struct breakpoint): New field command_list.
12060 (any_persistent_commands): New function.
12061 (add_commands_to_breakpoint): New function.
12062 (add_breakpoint_commands): New function.
12063 (gdb_no_commands_at_breakpoint): New function.
12064 (run_breakpoint_commands): New function.
12065 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12067 * ax.c: Include format.h.
12068 (ax_printf): New function.
12069 (gdb_eval_agent_expr): Add printf opcode.
12071 2012-06-13 Yao Qi <yao@codesourcery.com>
12073 * server.c (start_inferior): Remove duplicated writes to fields
12074 'last_resume_kind' and 'last_status' of 'current_inferior'.
12076 2012-06-12 Yao Qi <yao@codesourcery.com>
12077 Pedro Alves <palves@redhat.com>
12079 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12081 * server.c (handle_v_cont): Extend comment.
12083 2012-06-11 Yao Qi <yao@codesourcery.com>
12085 * linux-low.c (linux_attach): Add 'static'.
12087 2012-06-06 Yao Qi <yao@codesourcery.com>
12089 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12091 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12093 Fix gcc -flto compilation warning.
12094 * server.c (main): Make variable multi_mode and attach volatile.
12096 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12098 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12099 if the platform doesn't know about it.
12101 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12103 * Makefile.in (SFILES): Add linux-tile-low.c.
12104 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12105 * configure.srv: Handle tilegx-*-linux*.
12106 * linux-tile-low.c: New file.
12108 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12110 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12112 2012-05-24 Pedro Alves <palves@redhat.com>
12116 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12118 2012-05-24 Pedro Alves <palves@redhat.com>
12122 Replace target_signal with gdb_signal throughout.
12124 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12126 * linux-low.c (linux_store_registers): Avoid the copying sequence
12127 when no data has been retrieved by ptrace.
12129 2012-05-22 Will Deacon <will.deacon@arm.com>
12131 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12132 Include asm/ptrace.h.
12133 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12136 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12138 * linux-low.c (linux_store_registers): Don't re-retrieve data
12139 with ptrace that has already been obtained from /proc. Always
12140 copy any data retrieved with ptrace to the buffer supplied.
12142 2012-05-11 Yao Qi <yao@codesourcery.com>
12143 Pedro Alves <palves@redhat.com>
12145 * linux-low.c (enum stopping_threads_kind): New.
12146 (stopping_threads): Change type to `enum stopping_threads_kind'.
12147 (handle_extended_wait): If stopping and suspending threads, leave
12148 the new_lwp suspended too.
12149 (linux_wait_for_event): Adjust.
12150 (stop_all_lwps): Set `stopping_threads' to
12151 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12152 whether we're suspending threads or just stopping them. Assert no
12155 2012-04-29 Yao Qi <yao@codesourcery.com>
12157 * server.h: Move some code to ...
12158 * gdbthread.h: ... here. New.
12159 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12160 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12161 (nto-low.o, win32-low.o): Likewise.
12162 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12163 * regcache.c, remote-utils.c, server.c: Likewise.
12164 * target.c, tracepoint.c, win32-low.c: Likewise.
12166 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12168 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12169 (PTRACE_ARG4_TYPE): Likewise.
12170 (PTRACE_XFER_TYPE): Likewise.
12171 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12172 ptrace to PTRACE_ARG3_TYPE.
12173 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12174 (PTRACE_ARG4_TYPE): Likewise.
12175 (PTRACE_XFER_TYPE): Likewise.
12176 (linux_detach_one_lwp): Cast fourth argument of
12177 ptrace to long then PTRACE_ARG4_TYPE.
12178 (regsets_fetch_inferior_registers): Cast third argument of
12179 ptrace to long then PTRACE_ARG3_TYPE.
12180 (regsets_store_inferior_registers): Likewise.
12182 2012-04-20 Pedro Alves <palves@redhat.com>
12184 * configure: Regenerate.
12186 2012-04-19 Pedro Alves <palves@redhat.com>
12188 * Makefile.in (GNULIB_BUILDDIR): New.
12189 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12190 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12191 (all, install-only, uninstall, clean-info, all-lib, clean): No
12192 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12193 (maintainer-clean realclean distclean): Use subdir_do.
12195 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12196 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12197 * acinclude.m4: Include acx_configure_dir.m4.
12198 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12199 calls. Call AC_PROG_RANLIB. Configure gnulib using
12202 (GNULIB_STDINT_H): Adjust.
12203 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12204 * gdbreplay.c: Include build-gnulib/config.h.
12205 * server.h: Likewise.
12206 * aclocal.m4: Regenerate.
12207 * config.in: Regenerate.
12208 * configure: Regenerate.
12210 2012-04-19 Pedro Alves <palves@redhat.com>
12212 * Makefile.in (LIBGNU, INCGNU): Adjust.
12213 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12214 (all, install-only, uninstall, clean-info, all-lib, clean)
12215 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12216 * configure.ac: Adjust AC_OUTPUT output.
12217 * aclocal.m4: Regenerate.
12218 * configure: Regenerate.
12220 2012-04-19 Pedro Alves <palves@redhat.com>
12222 * Makefile.in (generated_files): New.
12223 (server_h): Remove the explicit dependency on config.h, and depend
12224 on $generated_files.
12226 2012-04-19 Pedro Alves <palves@redhat.com>
12228 * Makefile.in (INCGNU): Add -Ignulib.
12230 2012-04-19 Pedro Alves <palves@redhat.com>
12232 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12233 (INCGNU): ... this, and spell out -I here.
12234 (GNULIB_LIB): Rename to ...
12235 (LIBGNU): ... this.
12236 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12238 2012-04-19 Pedro Alves <palves@redhat.com>
12240 * config.in: Regenerate.
12242 2012-04-19 Pedro Alves <palves@redhat.com>
12244 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12245 * server.h (memmem): Remove declaration.
12246 * config.in: Regenerate.
12247 * configure: Regenerate.
12249 2012-04-19 Yao Qi <yao@codesourcery.com>
12251 * Makefile.in (SFILES): Add common/vec.c.
12255 2012-04-19 Yao Qi <yao@codesourcery.com>
12257 * remote-utils.c (prepare_resume_reply): Replace with macro
12258 target_core_of_thread.
12259 * server.c (handle_qxfer_threads_proper): Likewise.
12260 * target.h (traget_core_of_thread): New macro.
12262 2012-04-18 Pedro Alves <palves@redhat.com>
12264 * aclocal.m4: Regenerate.
12265 * configure: Regenerate.
12267 2012-04-16 Yao Qi <yao@codesourcery.com>
12269 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12270 duplicated on address.
12272 2012-04-16 Yao Qi <yao@codesourcery.com>
12274 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12275 (struct tracepoint_action_ops) <send>: New field.
12276 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12277 (agent_expr_send, x_tracepoint_action_send): New.
12278 (l_tracepoint_action_send): New.
12279 (cmd_qtdp): Download and install tracepoint
12280 according to `use_agent'.
12281 (run_inferior_command): Add one more parameter `len'.
12283 (tracepoint_send_agent): New.
12284 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12286 2012-04-16 Yao Qi <yao@codesourcery.com>
12288 * tracepoint.c (download_tracepoints): Moved to ...
12289 (cmd_qtstart): ... here.
12291 2012-04-14 Yao Qi <yao@codesourcery.com>
12293 * tracepoint.c: Include inttypes.h.
12294 (struct collect_memory_action): Use sized types.
12295 (struct tracepoint): Likewise.
12296 (cmd_qtdp, stop_tracing): Update print specifiers.
12297 (cmd_qtp, response_tracepoint): Likewise.
12298 (collect_data_at_tracepoint): Likewise.
12299 (collect_data_at_step): Likewise.
12301 2012-04-14 Yao Qi <yao@codesourcery.com>
12303 Import gnulib module inttypes.
12304 * aclocal.m4, config.in, configure: Regenerated.
12306 2012-04-14 Yao Qi <yao@codesourcery.com>
12308 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12309 Makefile and config.status at last.
12311 2012-04-13 Yao Qi <yao@codesourcery.com>
12313 * tracepoint.c: Include stdint.h unconditionally.
12315 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12317 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12318 on BFD_HAVE_SYS_PROCFS_TYPE.
12319 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12320 * configure: Regenerate.
12321 * config.in: Likewise.
12323 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12325 * Makefile.in (clean): Also remove x32.c x32-linux.c
12326 x32-avx.c x32-avx-linux.c.
12327 (x32.o): New target.
12329 (x32-linux.o): Likewise.
12330 (x32-linux.c): Likewise.
12331 (x32-avx.o): Likewise.
12332 (x32-avx.c): Likewise.
12333 (x32-avx-linux.o): Likewise.
12334 (x32-avx-linux.c): Likewise.
12336 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12337 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12338 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12339 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12340 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12341 i386/x32-avx-linux.xml.
12343 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12344 (init_registers_x32_avx_linux): Likwise.
12345 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12346 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12348 2012-04-13 Pedro Alves <palves@redhat.com>
12350 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12351 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12352 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12353 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12356 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12358 * linux-x86-low.c (compat_x32_clock_t): New.
12359 (compat_x32_siginfo_t): Likewise.
12360 (compat_x32_siginfo_from_siginfo): Likewise.
12361 (siginfo_from_compat_x32_siginfo): Likewise.
12362 (linux_is_elf64): Likewise.
12363 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12364 and siginfo_from_compat_x32_siginfo for x32.
12365 (x86_arch_setup): Set linux_is_elf64.
12367 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12370 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12372 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12373 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12374 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12375 compatible with process.
12377 2012-04-12 Yao Qi <yao@codesourcery.com>
12379 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12380 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12381 (install-only, install-info, clean): Handle sub dir gnulib.
12382 (all-lib, am--refresh): New targets.
12383 (memmem.o): Remove target.
12384 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12385 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12386 (AC_REPLACE_FUNCS): Remove memmem.
12387 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12388 (AC_OUTPUT): Generate Makefile in gnulib/.
12389 * aclocal.m4, config.in, configure: Regenerated.
12391 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12393 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12395 2012-04-05 Pedro Alves <palves@redhat.com>
12397 -Werror=strict-aliasing
12399 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12402 2012-04-04 Pedro Alves <palves@redhat.com>
12404 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12405 (sparc_store_gregset_from_stack, sparc_store_gregset)
12406 (sparc_breakpoint_at): Fix formatting.
12408 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12410 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12412 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12413 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12414 * config.in: Regenerate.
12415 * configure: Likewise.
12417 2012-03-29 Pedro Alves <palves@redhat.com>
12419 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12420 Correct ptrace arguments.
12422 2012-03-28 Pedro Alves <palves@redhat.com>
12424 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12425 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12426 (IA64_FR1_REGNUM): New defines.
12427 (ia64_fetch_register): New.
12428 (the_low_target): Install it.
12429 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12431 * linux-low.c (linux_fetch_registers): Try the
12432 the_low_target.fetch_register hook first.
12434 * linux-arm-low.c (the_low_target): Adjust.
12435 * linux-bfin-low.c (the_low_target): Adjust.
12436 * linux-cris-low.c (the_low_target): Adjust.
12437 * linux-crisv32-low.c (the_low_target): Adjust.
12438 * linux-m32r-low.c (the_low_target): Adjust.
12439 * linux-m68k-low.c (the_low_target): Adjust.
12440 * linux-mips-low.c (the_low_target): Adjust.
12441 * linux-ppc-low.c (the_low_target): Adjust.
12442 * linux-s390-low.c (the_low_target): Adjust.
12443 * linux-sh-low.c (the_low_target): Adjust.
12444 * linux-sparc-low.c (the_low_target): Adjust.
12445 * linux-tic6x-low.c (the_low_target): Adjust.
12446 * linux-x86-low.c (the_low_target): Adjust.
12447 * linux-xtensa-low.c (the_low_target): Adjust.
12449 2012-03-26 Pedro Alves <palves@redhat.com>
12451 * server.c (handle_qxfer_libraries): Don't bail early if
12452 the_target->qxfer_libraries_svr4 is not NULL.
12454 2012-03-26 Pedro Alves <palves@redhat.com>
12456 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12458 2012-03-23 Pedro Alves <palves@redhat.com>
12460 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12461 "library-list-svr4" element's start tag when the the DSO list is
12464 2012-03-23 Pedro Alves <palves@redhat.com>
12466 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12467 a variable whose type size is the same as the inferior's pointer
12470 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12472 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12474 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12475 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12476 * linux-low.h: Include <signal.h>.
12477 (struct siginfo): Remove forward declaration.
12478 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12481 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12483 * .gitignore: Ignore more files.
12485 2012-03-19 Pedro Alves <palves@redhat.com>
12486 Jan Kratochvil <jan.kratochvil@redhat.com>
12488 * server.c (cont_thread, general_thread): Add describing comments.
12489 (start_inferior): Clear `cont_thread'.
12490 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12493 2012-03-15 Yao Qi <yao@codesourcery.com>
12495 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12497 (cmd_qtdp): ... here.
12499 2012-03-15 Yao Qi <yao@codesourcery.com>
12501 * tracepoint.c (struct tracepoint_action_ops): New.
12502 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12503 (m_tracepoint_action_download): New.
12504 (r_tracepoint_action_download): New.
12505 (x_tracepoint_action_download): New.
12506 (l_tracepoint_action_download): New.
12507 (add_tracepoint_action): Install `action->ops' according type.
12508 (download_tracepoint_1): Move code `download' function pointer
12509 of various tracepoint_action_ops.
12511 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12513 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12514 linux_ptrace_attach_warnings.
12516 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12518 * Makefile.in (linux-ptrace.o): New.
12519 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12520 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12521 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12522 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12523 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12525 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12527 2012-03-08 Yao Qi <yao@codesourcery.com>
12528 Pedro Alves <palves@redhat.com>
12530 Fix PR server/13392.
12531 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12532 offset of JMP insn.
12533 * tracepoint.c (remove_tracepoint): New.
12534 (cmd_qtdp): Call remove_tracepoint when failed to install.
12536 2012-03-07 Pedro Alves <palves@redhat.com>
12538 * linux-low.c (get_detach_signal): New.
12539 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12540 Pass on pending signals to PTRACE_DETACH. Check the result of the
12542 * server.c (program_signals, program_signals_p): New.
12543 (handle_general_set): Handle QProgramSignals.
12544 * server.h (program_signals, program_signals_p): Declare.
12546 2012-03-05 Pedro Alves <palves@redhat.com>
12547 Jan Kratochvil <jan.kratochvil@redhat.com>
12549 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12552 2012-03-03 Yao Qi <yao@codesourcery.com>
12554 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12555 agent_look_up_symbols.
12557 2012-03-03 Yao Qi <yao@codesourcery.com>
12559 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12560 (linux-x86-low.o): Likewise.
12561 * server.h: Remove in_process_agent_loaded.
12562 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12566 2012-03-03 Yao Qi <yao@codesourcery.com>
12568 * tracepoint.c (gdb_agent_capability): New global.
12569 (in_process_agent_loaded_ust): Renamed to
12570 `in_process_agent_supports_ust'.
12572 (in_process_agent_supports_ust): Call agent_capability_check.
12573 (clear_installed_tracepoints): Assert that agent supports
12576 2012-03-03 Yao Qi <yao@codesourcery.com>
12578 * linux-low.c (linux_supports_agent): New.
12579 (linux_target_ops): Initialize field `supports_agent' with
12580 linux_supports_agent.
12581 * target.h (struct target_ops) <supports_agent>: New.
12582 (target_supports_agent): New macro.
12583 * server.c (handle_general_set): Handle packet 'QAgent'.
12584 (handle_query): Send `QAgent+'.
12585 * Makefile.in (server.o): Depends on agent.h.
12587 2012-03-03 Yao Qi <yao@codesourcery.com>
12589 * Makefile.in (OBS): Add agent.o.
12590 Add new rule for agent.o.
12591 Track dependence of tracepoint.c on agent.h.
12592 * tracepoint.c (run_inferior_command_1):
12593 (run_inferior_command): Call agent_run_command.
12594 (gdb_ust_connect_sync_socket): Deleted. Move it to
12596 (resume_thread, stop_thread): Likewise.
12597 (gdb_ust_socket_init): Renamed to ...
12598 (gdb_agent_socket_init): ... New.
12599 (gdb_ust_thread): Renamed to ...
12600 (gdb_agent_helper_thread): ... New.
12601 (gdb_ust_init): Move some code to ...
12602 (gdb_agent_init): ... here. New.
12603 [HAVE_UST]: Call gdb_ust_init.
12604 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12605 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12606 * config.in, configure: Regenerated.
12608 2012-03-02 Pedro Alves <palves@redhat.com>
12610 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12611 * linux-low.c (struct simple_pid_list): New.
12612 (stopped_pids): New a struct simple_pid_list pointer.
12613 (add_to_pid_list, pull_pid_from_list): New.
12614 (handle_extended_wait): Don't assume the first signal new children
12615 report is SIGSTOP. Adjust call to pull_pid_from_list.
12616 (linux_wait_for_lwp): Adjust.
12618 2012-03-02 Yao Qi <yao@codesourcery.com>
12620 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12623 2012-03-02 Yao Qi <yao@codesourcery.com>
12625 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12626 `stop_pc' and `tpoint'. Update caller.
12628 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12630 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12631 * linux-low.c (use_linux_regsets): New macro.
12632 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12633 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12634 (linux_register_in_regsets): New function.
12635 (usr_fetch_inferior_registers): Skip registers covered by
12637 (usr_store_inferior_registers): Likewise.
12638 (usr_fetch_inferior_registers): New macro.
12639 (usr_store_inferior_registers): Likewise.
12640 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12641 (linux_store_registers): Likewise.
12642 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12644 (init_registers_mips64_dsp_linux): Likewise.
12645 (init_registers_mips_linux): New macro.
12646 (init_registers_mips_dsp_linux): Likewise.
12647 (mips_dsp_num_regs): Likewise.
12648 (DSP_BASE, DSP_CONTROL): New fallback macros.
12649 (mips_base_regs): New macro.
12650 (mips_regmap): Use it. Fix the size.
12651 (mips_dsp_regmap): New variable.
12652 (mips_dsp_regset_bitmap): Likewise.
12653 (mips_arch_setup): New function.
12654 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12656 (mips_cannot_store_register): Likewise.
12657 (the_low_target): Update .arch_setup, .num_regs and .regmap
12658 initializers. Add .regset_bitmap initializer.
12659 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12661 * linux-bfin-low.c (the_low_target): Likewise.
12662 * linux-cris-low.c (the_low_target): Likewise.
12663 * linux-crisv32-low.c (the_low_target): Likewise.
12664 * linux-ia64-low.c (the_low_target): Likewise.
12665 * linux-m32r-low.c (the_low_target): Likewise.
12666 * linux-m68k-low.c (the_low_target): Likewise.
12667 * linux-ppc-low.c (the_low_target): Likewise.
12668 * linux-s390-low.c (the_low_target): Likewise.
12669 * linux-sh-low.c (the_low_target): Likewise.
12670 * linux-sparc-low.c (the_low_target): Likewise.
12671 * linux-tic6x-low.c (the_low_target): Likewise.
12672 * linux-x86-low.c (the_low_target): Likewise.
12673 * linux-xtensa-low.c (the_low_target): Likewise.
12674 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12675 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12676 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12678 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12679 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12681 2012-02-29 Yao Qi <yao@codesourcery.com>
12682 Pedro Alves <palves@redhat.com>
12684 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12685 `step_over_finished' is true.
12687 2012-02-27 Pedro Alves <palves@redhat.com>
12689 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12690 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12692 2012-02-27 Pedro Alves <palves@redhat.com>
12695 * linux-low.c (pid_is_stopped): New.
12696 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12698 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12700 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12703 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12705 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12707 2012-02-24 Luis Machado <lgustavo@codesourcery>
12709 * server.c (handle_query): Advertise support for target-side
12710 breakpoint condition evaluation.
12711 (process_point_options): New function.
12712 (process_serial_event): When inserting a breakpoint, check for
12713 a target-side condition that should be evaluated.
12715 * mem-break.c: Include regcache.h and ax.h.
12716 (point_cond_list_t): New data structure.
12717 (breakpoint) <cond_list>: New field.
12718 (find_gdb_breakpoint_at): Make non-static.
12719 (delete_gdb_breakpoint_at): Clear any target-side
12721 (clear_gdb_breakpoint_conditions): New function.
12722 (add_condition_to_breakpoint): Likewise.
12723 (add_breakpoint_condition): Likewise.
12724 (gdb_condition_true_at_breakpoint): Likewise.
12725 (gdb_breakpoint_here): Return result directly instead
12726 of going through a local variable.
12728 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12729 (clear_gdb_breakpoint_conditions): Likewise.
12730 (add_breakpoint_condition): Likewise.
12731 (gdb_condition_true_at_breakpoint): Likewise.
12733 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12734 (need_step_over_p): Take target-side breakpoint condition into
12737 2012-02-24 Luis Machado <lgustavo@codesourcery>
12739 * server.h: Include tracepoint.h.
12740 (agent_mem_read, agent_get_trace_state_variable_value,
12741 agent_set_trace_state_variable_value,
12742 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12743 get_set_tsv_func_addr): New prototypes.
12745 * ax.h: New include file.
12746 * ax.c: New source file.
12748 * tracepoint.c: Include ax.h.
12749 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12750 agent_expr, eval_result_type): Move to ax.h.
12751 (parse_agent_expr): Rename to ...
12752 (gdb_parse_agent_expr): ... this, make it non-static and move
12754 (unparse_agent_expr) Rename to ...
12755 (gdb_unparse_agent_expr): ... this, make it non-static and move
12757 (eval_agent_expr): Rename to ...
12758 (eval_tracepoint_agent_expr): ... this.
12759 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12760 forward declarations.
12761 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12762 (agent_get_trace_state_variable_value): New function.
12763 (agent_set_trace_state_variable_value): New function.
12764 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12765 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12766 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12767 (condition_true_at_tracepoint): Likewise.
12768 (parse_agent_expr): Rename to ...
12769 (gdb_parse_agent_expr): ... this and move to ax.c.
12770 (unparse_agent_expr): Rename to ...
12771 (gdb_unparse_agent_expr): ... this and move to ax.c.
12772 (gdb_agent_op_name): Move to ax.c.
12773 (eval_agent_expr): Rename to ...
12774 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12776 (eval_tracepoint_agent_expr): New function.
12777 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12779 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12781 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12782 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12783 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12784 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12785 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12786 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12787 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12788 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12789 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12790 (compile_bytecodes): Remove forward declaration.
12791 (is_goto_target): Move to ax.c.
12792 (compile_bytecodes): Move to ax.c and call
12793 agent_get_trace_state_variable_value (...) and
12794 agent_set_trace_state_variable_value (...).
12796 * Makefile.in: Update ax.c and IPA dependencies.
12798 2012-02-24 Pedro Alves <palves@redhat.com>
12800 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12801 (cmd_bigqtbuffer_circular): ... this. Only handle
12802 'QTBuffer:circular:'.
12803 (handle_tracepoint_general_set): Adjust.
12805 2012-02-16 Yao Qi <yao@codesourcery.com>
12807 * inferiors.c: Move code to ...
12808 * dll.c: .... here. New.
12809 * server.h: Declare clear_dlls.
12810 * Makefile.in (SFILES): Add dll.c.
12814 2012-02-11 Yao Qi <yao@codesourcery.com>
12816 * server.c: (handle_monitor_command): Add a new parameter
12818 (handle_query): Update caller.
12820 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12822 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12823 * configure, config.in: Regenerate.
12824 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12827 2012-02-02 Pedro Alves <palves@redhat.com>
12829 Try SIGKILL first, then PTRACE_KILL.
12830 * linux-low.c (linux_kill_one_lwp): New.
12831 (linux_kill_one_lwp): Rename to ...
12832 (kill_one_lwp_callback): ... this. Use the new
12833 linux_kill_one_lwp.
12835 2012-02-02 Pedro Alves <palves@redhat.com>
12837 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12840 2012-01-27 Pedro Alves <palves@redhat.com>
12842 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12843 (elf_64_file_p): Make static.
12844 (linux_pid_exe_is_elf_64_file): New.
12845 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12846 Delete declarations.
12847 (linux_pid_exe_is_elf_64_file): Declare.
12848 * linux-x86-low.c (x86_arch_setup): Use
12849 linux_pid_exe_is_elf_64_file.
12851 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12853 * linux-low.c (linux_wait_for_event_1): Rename to ...
12854 (linux_wait_for_event): ... here and merge it with former
12855 linux_wait_for_event - new variable wait_ptid, use it.
12856 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12858 2012-01-23 Pedro Alves <palves@redhat.com>
12860 * server.c (main): Avoid yet another case of infinite loop while
12861 detaching/killing after a longjmp.
12863 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12866 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12868 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12870 * hostio.c (handle_readlink): New function.
12871 (handle_vFile): Call it to handle "vFile:readlink" packets.
12873 2012-01-20 Pedro Alves <palves@redhat.com>
12874 Ulrich Weigand <ulrich.weigand@linaro.org>
12876 * server.c (handle_v_requests): Only support vAttach and vRun to
12877 start multiple processes when in extended protocol mode.
12879 2012-01-17 Pedro Alves <palves@redhat.com>
12881 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12882 memalign plus mprotect to allocate the scratch buffer.
12884 2012-01-13 Pedro Alves <palves@redhat.com>
12886 * server.c (attach_inferior): Clear `cont_thread'.
12888 2012-01-13 Pedro Alves <palves@redhat.com>
12890 * server.c (main): Avoid infinite loop while detaching/killing
12893 2012-01-09 Doug Evans <dje@google.com>
12895 * server.c (start_inferior): Set last_ptid in --wrapper case.
12897 2012-01-06 Yao Qi <yao@codesourcery.com>
12899 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12901 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12903 2012-01-04 Yao Qi <yao@codesourcery.com>
12905 * tracepoint.c (cmd_qtdp): Print debug message
12906 for static tracepoint.
12908 2012-01-04 Yao Qi <yao@codesourcery.com>
12910 * tracepoint.c (trace_vdebug): Differentiate debug message
12911 between gdbserver and IPA.
12913 2012-01-03 Yao Qi <yao@codesourcery.com>
12915 * tracepoint.c (tracepoint_was_hit): Don't collect for
12918 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12920 * terminal.h: Reformat copyright header.
12922 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12924 * server.c (gdbserver_version): Update copyright year.
12925 * gdbreplay.c (gdbreplay_version): Likewise.
12927 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12929 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12932 2011-12-18 Hui Zhu <teawater@gmail.com>
12933 * linux-low.c (linux_create_inferior): Save return value to ret.
12935 2011-12-18 Hui Zhu <teawater@gmail.com>
12937 * linux-low.c (linux_create_inferior): Save return value to ret.
12939 2011-12-16 Doug Evans <dje@google.com>
12941 * linux-low.c (linux_create_inferior): If stdio connection,
12942 redirect stdin from /dev/null, stdout to stderr.
12943 * remote-utils.c (remote_is_stdio): New static global.
12944 (remote_connection_is_stdio): New function.
12945 (remote_prepare): Handle stdio connection.
12946 (remote_open): Ditto.
12947 (remote_close): Don't close stdin for stdio connections.
12948 (read_prim,write_prim): New functions. Replace all calls to
12949 read/write to these.
12950 * server.c (main): Watch for "-" argument. Move call to
12951 remote_prepare before start_inferior.
12952 * server.h (STDIO_CONNECTION_NAME): New macro.
12953 (remote_connection_is_stdio): Declare.
12955 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12956 in debugging output.
12958 2011-12-15 Yao Qi <yao@codesourcery.com>
12960 * tracepoint.c: Include sys/syscall.h.
12961 (gdb_ust_thread): Remove preprocessor conditional.
12963 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12965 * linux-low.c (linux_detach_one_lwp): Call
12966 the_low_target.prepare_to_resume before detaching.
12968 2011-12-14 Yao Qi <yao@codesourcery.com>
12970 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12973 2011-12-14 Yao Qi <yao@codesourcery.com>
12975 * i386-low.c (i386_low_stopped_data_address): Initialize local
12976 variable `control'.
12978 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12982 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12983 DR_CONTROL unless necessary. Extend comments.
12984 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12985 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12987 2011-12-13 Yao Qi <yao@codesourcery.com>
12989 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12991 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12993 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12995 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12996 Print new debug message for such case.
12998 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13000 Fix overlapping memcpy.
13001 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13002 the read_inferior_memory transfer.
13003 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13004 write_inferior_memory transfer.
13005 (set_fast_tracepoint_jump): New variable buf. Use it for the
13006 read_inferior_memory and write_inferior_memory transfers.
13007 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13008 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13009 Use it for the write_inferior_memory transfer.
13010 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13013 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13015 * linux-low.c (fetch_register, store_register): Make code
13016 consistent, fix formatting.
13018 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13020 * linux-low.c (usr_store_inferior_registers): Factor out code
13021 to handle individual registers into...
13022 (store_register): ... this new function.
13024 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13026 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13027 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13028 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13029 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13030 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13031 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13032 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13033 (srv_xmlfiles): Add new XML files.
13035 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13037 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13038 (init_registers_s390_linux32v1): Add prototype.
13039 (init_registers_s390_linux32v2): Likewise.
13040 (init_registers_s390_linux64v1): Likewise.
13041 (init_registers_s390_linux64v2): Likewise.
13042 (init_registers_s390x_linux64v1): Likewise.
13043 (init_registers_s390x_linux64v2): Likewise.
13044 (s390_num_regs): Increment to 52.
13045 (s390_regmap): Add orig_r2 register.
13046 (s390_num_regs_3264): Increment to 68.
13047 (s390_regmap_3264): Add orig_r2 register.
13048 (s390_collect_ptrace_register): Handle orig_r2 register.
13049 (s390_supply_ptrace_register): Likewise.
13050 (s390_fill_last_break): New function.
13051 (s390_store_last_break): Likewise.
13052 (s390_fill_system_call): New function.
13053 (s390_store_system_call): Likewise.
13054 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13056 (s390_check_regset): New function.
13057 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13058 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13059 Update target_regsets for available register sets.
13061 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13062 Jan Kratochvil <jan.kratochvil@redhat.com>
13064 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13065 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13067 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13068 * linux-low.h (struct process_info_private): New member r_debug.
13069 * server.c (handle_qxfer_libraries): Call
13070 the_target->qxfer_libraries_svr4.
13071 (handle_qxfer_libraries_svr4): New function.
13072 (qxfer_packets): New entry "libraries-svr4".
13073 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13074 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13075 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13076 PACKET_qXfer_libraries_svr4.
13078 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13080 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13081 PSW address/mask between 8-byte and 16-byte formats.
13082 (s390_supply_ptrace_register): Likewise.
13083 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13084 basic addressing mode bit.
13086 2011-11-24 Stan Shebs <stan@codesourcery.com>
13088 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13090 2011-11-17 Stan Shebs <stan@codesourcery.com>
13092 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13093 (tracing_start_time): New global.
13094 (tracing_stop_time): New global.
13095 (tracing_user_name): New global.
13096 (tracing_notes): New global.
13097 (tracing_stop_note): New global.
13098 (cmd_qtstart): Set traceframe_usage, start_time.
13099 (stop_tracing): Set stop_time.
13100 (cmd_qtstatus): Report additional status.
13101 (cmd_qtp): New function.
13102 (handle_tracepoint_query): Call it.
13103 (cmd_qtnotes): New function.
13104 (handle_tracepoint_general_set): Call it.
13105 (get_timestamp): Rename from tsv_get_timestamp.
13107 2011-11-14 Stan Shebs <stan@codesourcery.com>
13108 Kwok Cheung Yeung <kcy@codesourcery.com>
13110 * linux-x86-low.c (small_jump_insn): New.
13111 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13112 trampoline and error message, build a trampoline and issue a small
13113 jump instruction to it.
13114 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13115 trampoline and error message.
13116 (x86_get_min_fast_tracepoint_insn_len): New.
13117 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13118 * linux-low.h (struct linux_target_ops): Add arguments to
13119 install_fast_tracepoint_jump_pad operation, add new operation.
13120 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13122 (linux_get_min_fast_tracepoint_insn_len): New function.
13123 (linux_target_op): Add new operation.
13124 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13125 (gdb_trampoline_buffer_end): Ditto.
13126 (gdb_trampoline_buffer_error): Ditto.
13127 (struct ipa_sym_addresses): Add fields for new IPA variables.
13128 (symbol_list): Add entries for new IPA variables.
13129 (struct tracepoint): Add fields to hold the address range of the
13130 trampoline used by the tracepoint.
13131 (trampoline_buffer_head): New static variable.
13132 (trampoline_buffer_tail): Ditto.
13133 (claim_trampoline_space): New function.
13134 (have_fast_tracepoint_trampoline_buffer): New function.
13135 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13137 (install_fast_tracepoint): Ditto, also add error buffer argument.
13138 (cmd_qtminftpilen): New function.
13139 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13140 (fast_tracepoint_from_trampoline_address): New function.
13141 (fast_tracepoint_collecting): Handle trampoline as part of jump
13143 (set_trampoline_buffer_space): New function.
13144 (initialize_tracepoint): Initialize new IPA variables.
13145 * target.h (struct target_ops): Add arguments to
13146 install_fast_tracepoint_jump_pad operation, add new
13147 get_min_fast_tracepoint_insn_len operation.
13148 (target_get_min_fast_tracepoint_insn_len): New.
13149 (install_fast_tracepoint_jump_pad): Add arguments.
13150 * server.h (IPA_BUFSIZ): Define.
13151 * linux-i386-ipa.c: Include extra header files.
13152 (initialize_fast_tracepoint_trampoline_buffer): New function.
13153 (initialize_low_tracepoint): Call it.
13154 * server.h (set_trampoline_buffer_space): Declare.
13155 (claim_trampoline_space): Ditto.
13156 (have_fast_tracepoint_trampoline_buffer): Ditto.
13158 2011-11-14 Yao Qi <yao@codesourcery.com>
13160 * server.c (handle_query): Handle InstallInTrace for qSupported.
13161 * tracepoint.c (add_tracepoint): Sort list.
13162 (install_tracepoint, download_tracepoint): New.
13163 (cmd_qtdp): Call them to install and download tracepoints.
13164 (sort_tracepoints): Removed.
13165 (cmd_qtstart): Update.
13167 2011-11-14 Yao Qi <yao@codesourcery.com>
13169 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13170 * mem-break.h: Declare.
13171 * tracepoint.c (cmd_qtstart): Move some code to ...
13172 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13174 (download_tracepoints): Move some code to ...
13175 (download_tracepoint_1): ... here. New.
13177 2011-11-08 Yao Qi <yao@codesourcery.com>
13179 * remote-utils.c (relocate_instruction): A comment fix.
13181 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13183 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13184 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13185 dr_status_mirror and dr_control_mirror from debug_reg_state.
13186 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13187 (i386_initial_stuff): Remove use of deleted globals.
13188 (i386_get_thread_context, i386_set_thread_context,
13189 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13190 from debug_reg_state.
13192 2011-11-05 Yao Qi <yao@codesourcery.com>
13194 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13195 address as TPOINT's.
13197 2011-11-02 Stan Shebs <stan@codesourcery.com>
13199 * tracepoint.c (agent_mem_read_string): New function.
13200 (eval_agent_expr): Call it for tracenz.
13201 * server.c (handle_query): Report support for tracenz.
13203 2011-11-02 Yao Qi <yao@codesourcery.com>
13205 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13207 2011-11-02 Yao Qi <yao@codesourcery.com>
13209 * target.h: Fix a typo in comment.
13211 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13213 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13214 clobber the breakpoints' shadows with fast tracepoint jumps.
13215 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13216 * target.c (write_inferior_memory): Also pass MYADDR down to
13219 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13221 * configure.ac: Check support for personality routine.
13222 * configure: Regenerate.
13223 * config.in: Likewise.
13224 * linux-low.c: Include <sys/personality.h>.
13225 Define ADDR_NO_RANDOMIZE if necessary.
13226 (linux_create_inferior): Disable address space randomization when
13227 forking inferior, if requested.
13228 (linux_supports_disable_randomization): New function.
13229 (linux_target_ops): Install it.
13230 * server.h (disable_randomization): Declare.
13231 * server.c (disable_randomization): New global variable.
13232 (handle_general_set): Handle QDisableRandomization.
13233 (handle_query): Likewise for qSupported.
13234 (main): Support --disable-randomization and --no-disable-randomization
13235 command line arguments.
13236 * target.h (struct target_ops): Add supports_disable_randomization.
13237 (target_supports_disable_randomization): New macro.
13239 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13241 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13243 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13244 [!PT_GETDSBT] (target_loadmap): New definition.
13245 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13246 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13247 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13248 and PT_GETDSBT to LINUX_LOADMAP.
13249 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13250 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13252 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13254 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13255 (arm_linux_hwbp_cap): New static variable.
13256 (arm_linux_get_hwbp_cap): Replace by ...
13257 (arm_linux_init_hwbp_cap): ... this new function.
13258 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13259 (arm_linux_get_hw_watchpoint_count): Likewise.
13260 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13261 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13262 (arm_prepare_to_resume): Use perror_with_name instead of error.
13264 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13266 * linux-arm-low.c: Include <signal.h>.
13267 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13268 (struct arm_linux_hwbp_cap): New data type.
13269 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13270 (struct arm_linux_hw_breakpoint): New data type.
13271 (MAX_BPTS, MAX_WPTS): Define.
13272 (struct arch_process_info, struct arch_lwp_info): New data types.
13273 (arm_linux_get_hwbp_cap): New function.
13274 (arm_linux_get_hw_breakpoint_count): Likewise.
13275 (arm_linux_get_hw_watchpoint_count): Likewise.
13276 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13277 (arm_hwbp_control_initialize): Likewise.
13278 (arm_hwbp_control_is_enabled): Likewise.
13279 (arm_hwbp_control_is_initialized): Likewise.
13280 (arm_hwbp_control_disable): Likewise.
13281 (arm_linux_hw_breakpoint_equal): Likewise.
13282 (arm_linux_hw_point_initialize): Likewise.
13283 (struct update_registers_data): New data structure.
13284 (update_registers_callback: New function.
13285 (arm_insert_point): Likewise.
13286 (arm_remove_point): Likewise.
13287 (arm_stopped_by_watchpoint): Likewise.
13288 (arm_stopped_data_address): Likewise.
13289 (arm_new_process): Likewise.
13290 (arm_new_thread): Likewise.
13291 (arm_prepare_to_resume): Likewise.
13292 (the_low_target): Register arm_insert_point, arm_remove_point,
13293 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13294 arm_new_thread, and arm_prepare_to_resume.
13296 2011-09-15 Stan Shebs <stan@codesourcery.com>
13298 * server.h (struct emit_ops): Add compare-goto fields.
13299 * tracepoint.c (gdb_agent_op_sizes): New table.
13300 (emit_eq_goto): New function.
13301 (emit_ne_goto): New function.
13302 (emit_lt_goto): New function.
13303 (emit_le_goto): New function.
13304 (emit_gt_goto): New function.
13305 (emit_ge_goto): New function.
13306 (is_goto_target): New function.
13307 (compile_bytecodes): Recognize special cases of compare-goto
13308 combinations and call specialized emitters for them.
13309 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13310 (amd64_emit_ne_goto): New function.
13311 (amd64_emit_lt_goto): New function.
13312 (amd64_emit_le_goto): New function.
13313 (amd64_emit_gt_goto): New function.
13314 (amd64_emit_ge_goto): New function.
13315 (amd64_emit_ops): Add the new functions.
13316 (i386_emit_eq_goto): New function.
13317 (i386_emit_ne_goto): New function.
13318 (i386_emit_lt_goto): New function.
13319 (i386_emit_le_goto): New function.
13320 (i386_emit_gt_goto): New function.
13321 (i386_emit_ge_goto): New function.
13322 (i386_emit_ops): Add the new functions.
13324 2011-09-08 Stan Shebs <stan@codesourcery.com>
13326 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13327 (i386_emit_epilogue): Restore %ebx.
13329 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13331 * server.c (step_thread): Remove definition.
13332 (process_serial_event): Don't handle Hs.
13333 * server.h (step_thread): Remove declaration.
13334 * target.c (set_desired_inferior): Remove use of step_thread.
13336 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13338 * linux-low.c: Include linux-procfs.h.
13339 (linux_attach_lwp_1): Update comments.
13340 (linux_attach): Scan for existing threads when attaching to a
13341 process that is the tgid.
13342 * Makefile.in: Update dependencies.
13344 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13346 * configure.srv: Add linux-procfs.o dependencies.
13348 2011-08-14 Yao Qi <yao@codesourcery.com>
13350 * target.h (struct target_ops): Fix indent.
13351 * win32-low.c (win32_target_ops): Fix comment.
13353 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13354 Yao Qi <yao@codesourcery.com>
13356 * Makefile.in (clean): Remove tic6x-*.c files.
13357 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13358 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13359 (tic6x-c64xp-linux.c): Likewise.
13360 * configure.srv: Add support for tic6x-*-uclinux.
13361 * linux-tic6x-low.c: New.
13362 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13364 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13365 Yao Qi <yao@codesourcery.com>
13367 * target.h (struct target_ops): Add read_loadmap.
13368 * linux-low.c (struct target_loadseg): New type.
13369 (struct target_loadmap): New type.
13370 (linux_read_loadmap): New function.
13371 (linux_target_ops): Add linux_read_loadmap.
13372 * server.c (handle_query): Support qXfer:fdpic:read packet.
13373 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13376 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13378 * win32-low.c: Include <stdint.h>.
13380 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13382 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13383 to the inferior here.
13384 (i386_remove_aligned_watchpoint): Ditto.
13385 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13386 fit part of the watchpoint in the debug registers.
13387 (i386_update_inferior_debug_regs): New.
13388 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13389 registers, and only update the inferior on success.
13390 (i386_low_remove_watchpoint): Ditto.
13392 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13394 * linux-low.c (compare_ints, unique, list_threads, show_process,
13395 linux_core_of_thread): Delete.
13396 (linux_target_ops): Change linux_core_of_thread to
13397 linux_common_core_of_thread.
13398 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13399 * utils.c (malloc_failure): Change type of argument.
13400 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13401 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13402 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13403 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13404 (IPA_OBJS): Add common-utils-ipa.o.
13405 (ptid_h, linux_osdata_h): New macros.
13406 (server_h): Add common/common-utils.h, common/xml-utils.h,
13407 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13409 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13410 ptid.o, buffer.o): New rules.
13411 (linux-low.o): Add common/linux-osdata.h as a dependency.
13412 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13413 * configure.ac: Add AC_HEADER_DIRENT check.
13414 * config.in: Regenerate.
13415 * configure: Regenerate.
13416 * remote-utils.c (xml_escape_text): Delete.
13417 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13418 buffer_xml_printf): Move to common/buffer.c.
13419 * server.c (main): Remove call to initialize_inferiors.
13420 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13421 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13422 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13423 internal_error, gdb_assert, gdb_assert_fail): Delete.
13424 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13425 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13427 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13428 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13429 initialize_inferiors): Delete.
13431 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13433 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13436 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13438 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13440 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13442 2011-05-26 Yao Qi <yao@codesourcery.com>
13444 * Makefile.in (thread-db.o): Track dependence to
13445 common/gdb_thread_db.h.
13446 * thread-db.c: include gdb_thread_db.h from right place.
13448 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13450 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13451 __FILE__ and __LINE__ to internal_error.
13453 2011-05-13 Doug Evans <dje@google.com>
13455 * thread-db.c (try_thread_db_load_from_sdir): New function.
13456 (try_thread_db_load_from_dir): New function.
13457 (thread_db_load_search): Handle $sdir, ignore $pdir.
13458 Remove trying of system directories if search of
13459 libthread-db-search-path fails, that is now done via $sdir.
13461 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13463 * server.c (handle_query): Add EnableDisableTracepoints to the list
13464 of supported features.
13465 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13467 (cmd_qtenable_disable): New.
13468 (cmd_qtstart): Install tracepoints even if disabled.
13469 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13470 receiving a QTEnable or QTDisable packet.
13471 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13472 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13474 (gdb_probe): Skip data collection if static tracepoint is disabled.
13476 2011-05-10 Doug Evans <dje@google.com>
13478 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13480 2011-05-04 Doug Evans <dje@google.com>
13482 * linux-low.c (linux_join): Skip process lookup.
13483 * spu-low.c (spu_join): Ditto.
13484 * server.c (join_inferiors_callback): Delete.
13485 (process_serial_event): For 'D' packet (detach) call join_inferior
13488 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13490 * README: Don't mention xscale*-*-linux*.
13491 * configure.srv (xscale*-*-linux*): Don't handle target.
13493 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13495 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13497 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13498 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13499 (i386_emit_void_call_2): Likewise.
13501 2011-04-26 Yao Qi <yao@codesourcery.com>
13503 * linux-low.c: Move common macros to linux-ptrace.h.
13504 Include linux-ptrace.h.
13505 * Makefile.in (linux_ptrace_h): New.
13506 (linux-low.o): Depends on linux-ptrace.h.
13508 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13510 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13511 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13512 (remote_prepare): New function with most of the TCP code from ...
13513 (remote_open): ... here. Detect PORT here unconditionally. Move also
13514 setting transport_is_reliable.
13515 * server.c (run_once): New variable.
13516 (gdbserver_usage): Document it.
13517 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13518 the first run if RUN_ONCE.
13519 * server.h (run_once, remote_prepare): New declarations.
13521 2011-04-19 Tom Tromey <tromey@redhat.com>
13523 * win32-low.c (handle_load_dll): Remove duplicate "the".
13525 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13527 Remove support for old Cygwin 1.5 versions.
13528 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13529 function to avoid warning.
13530 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13533 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13535 * gdbserver/server.h (Macro _): Define it if not available.
13537 2011-03-14 Michael Snyder <msnyder@vmware.com>
13539 * hostio.c (handle_close): Remove unnecessary null test.
13541 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13543 * Makefile.in (maintainer-clean realclean distclean): Remove
13544 "make ... subdir_do" command.
13546 2011-03-10 Michael Snyder <msnyder@vmware.com>
13548 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13550 * server.c (handle_v_run): Free alloced buffer on early return.
13552 2011-03-09 Yao Qi <yao@codesourcery.com>
13555 2011-03-04 Yao Qi <yao@codesourcery.com>
13557 * Makefile.in: Remove GNU make feature --directory.
13559 2011-03-05 Yao Qi <yao@codesourcery.com>
13561 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13562 (subdir_do): New make target. Copied from gdb/Makefile.
13563 (maintainer-clean, realclean, distclean, clean): Call corresponding
13564 make targets in common/Makefile.
13566 2011-02-11 Yao Qi <yao@codesourcery.com>
13568 * configure.ac: Call AC_PROG_RANLIB.
13569 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13570 * configure: Regenerate.
13572 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13574 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13576 2011-03-06 Yao Qi <yao@codesourcery.com>
13578 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13580 2011-03-05 Yao Qi <yao@codesourcery.com>
13582 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13583 (subdir_do): New make target. Copied from gdb/Makefile.
13584 (maintainer-clean, realclean, distclean, clean): Call corresponding
13585 make targets in common/Makefile.
13587 2011-03-04 Yao Qi <yao@codesourcery.com>
13589 * Makefile.in: Remove GNU make feature --directory.
13591 2011-03-04 Michael Snyder <msnyder@vmware.com>
13593 * server.c (queue_stop_reply): Call xmalloc not malloc.
13595 2011-03-02 Michael Snyder <msnyder@vmware.com>
13597 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13599 2011-02-28 Michael Snyder <msnyder@vmware.com>
13601 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13602 (cmd_qtframe): Ditto.
13603 (cmd_qtbuffer): Ditto.
13604 (cmd_bigqtbuffer): Ditto.
13606 * utils.c (decimal2str): Initialize 'width' to nine, then
13607 don't mess with it.
13609 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13611 * hostio.c (require_data): Free *data, not data.
13613 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13615 * hostio.c (require_data): Use free, not xfree.
13617 2011-02-27 Michael Snyder <msnyder@vmware.com>
13619 * server.c (handle_query): Discard unused value.
13621 * hostio.c (require_data): Free malloc memory before returning
13624 2011-02-26 Michael Snyder <msnyder@vmware.com>
13626 * linux-low.c (list_threads): Call closedir for dirent.
13628 2011-02-27 Michael Snyder <msnyder@vmware.com>
13630 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13631 a case statement falls through.
13633 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13638 2011-02-26 Michael Snyder <msnyder@vmware.com>
13640 * utils.c (decimal2str): Eliminate dead code and dead param.
13641 (pulongest): Drop dead param from call to decimal2str.
13644 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13646 Revert the following patch (not approved yet):
13647 2011-02-21 Hui Zhu <teawater@gmail.com>
13648 * tracepoint.c (tp_printf): New function.
13649 (eval_agent_expr): Handle gdb_agent_op_printf.
13651 2011-02-21 Hui Zhu <teawater@gmail.com>
13653 * tracepoint.c (tp_printf): New function.
13654 (eval_agent_expr): Handle gdb_agent_op_printf.
13656 2011-02-18 Tom Tromey <tromey@redhat.com>
13658 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13659 (tracepoint.o): Likewise.
13660 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13661 (gdb_agent_op_names): Likewise.
13663 2011-02-18 Tom Tromey <tromey@redhat.com>
13665 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13666 gdb_agent_op_rot>: New constants.
13667 (gdb_agent_op_names): Add pick and roll.
13668 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13671 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13673 * aclocal.m4: Regenerated with aclocal-1.11.1.
13675 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13677 * server.c (handle_qxfer_traceframe_info): New.
13678 (qxfer_packets): Register "traceframe-info".
13679 (handle_query): Report support for qXfer:traceframe-info:read+.
13680 * tracepoint.c (match_blocktype): New.
13681 (traceframe_find_block_type): Rename to ...
13682 (traceframe_walk_blocks): ... this. Add callback filter argument,
13684 (traceframe_find_block_type): New, reimplemented on top of
13685 traceframe_walk_blocks.
13686 (build_traceframe_info_xml): New.
13687 (traceframe_read_info): New.
13688 * server.h (traceframe_read_info): Declare.
13690 2011-02-11 Yao Qi <yao@codesourcery.com>
13692 * configure.ac: Call AC_PROG_RANLIB.
13693 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13694 * configure: Regenerate.
13696 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13698 * server.c (gdb_read_memory): Change return semantics to allow
13700 (handle_search_memory_1): Adjust.
13701 (process_serial_event) <'m' packet>: Handle partial transfers.
13702 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13704 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13706 * regcache.c (init_register_cache): Initialize
13707 regcache->register_status.
13708 (free_register_cache): Release regcache->register_status.
13709 (regcache_cpy): Copy register_status.
13710 (registers_to_string): Print 'x's for unavailable registers.
13711 (supply_register): Mark the register's status valid or
13712 unavailable, depending on whether a buffer was passed in or not.
13713 (supply_register_zeroed): New.
13714 (supply_regblock): Mark the registers' status valid or
13715 unavailable, depending on whether a buffer was passed in or not.
13716 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13717 (struct regcache): New `register_status' field.
13718 (supply_register_zeroed): Declare.
13719 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13720 supply_register_zeroed, rather than passing a NULL buffer to
13722 * tracepoint.c (fetch_traceframe_registers): Update comment.
13724 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13726 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13729 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13731 * server.h (decode_xfer_write): Change prototype.
13732 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13733 and don't extract the annex here.
13734 * server.c (decode_xfer_read): Remove `annex' parameter,
13735 and don't extract the annex here.
13736 (decode_xfer): New.
13737 (struct qxfer): New.
13738 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13739 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13740 (handle_qxfer_statictrace): New functions, abstracted out from
13741 handle_query, and made to use the struct qxfer interface.
13742 (handle_threads_qxfer_proper): Rename to ...
13743 (handle_qxfer_threads_proper): ... this.
13744 (handle_threads_qxfer): Rename to ...
13745 (handle_qxfer_threads): ... this. Adjust.
13746 (qxfer_packets): New array.
13747 (handle_qxfer): New function.
13748 (handle_query): Use handle_qxfer.
13750 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13752 * gdbreplay.c: Shorten lines of >= 80 columns.
13753 * linux-low.c: Ditto.
13754 * linux-ppc-low.c: Ditto.
13755 * linux-s390-low.c: Ditto.
13756 * linux-sparc-low.c: Ditto.
13757 * linux-x86-low.c: Ditto.
13758 * linux-xtensa-low.c: Ditto.
13759 * mem-break.c: Ditto.
13760 * nto-low.c: Ditto.
13761 * regcache.h: Ditto.
13762 * remote-utils.c: Ditto.
13765 * thread-db.c: Ditto.
13766 * tracepoint.c: Ditto.
13768 * win32-low.h: Ditto.
13770 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13772 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13775 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13777 * server.c (gdbserver_version): Update copyright year in version
13779 * gdbreplay.c (gdbreplay_version): Ditto.
13781 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13783 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13784 * linux-bfin-low.c: New file.
13785 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13786 PT_DATA_ADDR for BFIN targets.
13787 * Makefile.in (SFILES): Add linux-bfin-low.c.
13788 (clean): Remove reg-bfin.c.
13789 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13790 * README: Mention supported Blackfin targets.
13792 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13794 * .gitignore: New file.
13796 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13798 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13800 2010-10-22 Jie Zhang <jie@codesourcery.com>
13802 * Makefile.in: Add FLAGS_TO_PASS variable.
13803 (install): Remove dependency of install-only and recursively
13804 invoke make for install-only.
13806 2010-10-04 Doug Evans <dje@google.com>
13808 * Makefile.in (uninstall): Use $(DESTDIR).
13810 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13814 * linux-x86-low.c (compat_siginfo_from_siginfo)
13815 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13816 si_code is < 0. Check for si_code == SI_TIMER before checking for
13819 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13821 * lynx-i386-low.c: New file.
13822 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13824 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13826 * lynx-low.c (ptrace_request_to_str): Remove handling for
13827 request values that have been removed in LynxOS 5.x.
13829 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13831 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13834 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13836 * configure.ac: Add --enable-inprocess-agent option.
13837 * configure: Rebuilt.
13839 2010-09-06 Yao Qi <yao@codesourcery.com>
13841 * linux-low.c (linux_kill): Remove unused variable.
13842 (linux_stabilize_threads): Likewise.
13843 * server.c (start_inferior): Likewise.
13844 (queue_stop_reply_callback): Likewise.
13845 * tracepoint.c (do_action_at_tracepoint): Likewise.
13847 2010-09-06 Yao Qi <yao@codesourcery.com>
13849 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13852 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13854 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13856 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13858 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13861 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13863 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13864 gdbserver/lynx-ppc-low.c: New files.
13865 * Makefile.in (lynx_low_h): New variable.
13866 (lynx-low.o, lynx-ppc-low.o): New rules.
13867 * configure.ac: On LynxOS, link with -lnetinet.
13868 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13869 * configure: regenerate.
13871 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13873 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13874 * configure.ac: Add check for vasprintf and vsnprintf.
13875 * configure, config.in: Regenerate.
13876 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13878 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13880 * gdbreplay.c: Move include of alloca.h up, next to include of
13882 * server.h: Add include of malloc.h.
13883 * mem-break.c: Remove include of malloc.h.
13884 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13886 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13888 * Makefile.in (memmem.o): Build with -Wno-error.
13890 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13892 * utils.c (xsnprintf): Make non-static.
13893 * server.h: Add xsnprintf declaration.
13894 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13895 replace calls to snprintf by calls to xsnprintf throughout.
13897 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13899 * configure.ac: Add configure check for alloca.
13900 * configure, config.in: Regenerate.
13901 * server.h: Include alloca.h if it exists.
13902 * gdbreplay.c: Include alloca.h if it exists.
13904 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13906 * linux-low.c (__SIGRTMIN): Define if not already defined.
13907 (linux_create_inferior): Check for __ANDROID__ rather than
13909 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13910 are already deferred.
13911 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13912 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13913 stopped and already has a pending signal to report.
13914 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13915 a pending signal to report or is moving out of a jump pad.
13916 (linux_init_signals): Check for __ANDROID__ rather than
13919 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13921 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13922 debug_threads check. Avoid a linear search when not doing debug
13925 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13927 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13928 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13929 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13930 (process_event): Change local fd's type to gdb_fildes_t.
13931 (create_file_handler): Adjust prototype.
13932 (delete_file_handler): Adjust prototype.
13933 (handle_file_event): Adjust prototype. Use pfildes.
13934 (create_file_event): Adjsut prototype.
13935 * remote-utils.c (remote_desc, listen_desc): Change type to
13937 * server.h: New gdb_fildes_t typedef.
13938 [USE_WIN32API]: Include winsock2.h.
13939 (delete_file_handler, add_file_handler): Adjust prototypes.
13940 (pfildes): Declare.
13941 * utils.c (pfildes): New.
13943 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13945 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13946 * configure: Regenerate.
13948 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13950 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13951 (linux_done_accessing_memory): ... this.
13952 (linux_target_ops): Adjust.
13953 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13954 * nto-low.c (nto_target_ops): Adjust comment.
13955 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13956 * spu-low.c (spu_target_ops): Adjust comment.
13957 * target.h (target_ops): Rename unprepare_to_access_memory field
13958 to done_accessing_memory.
13959 (unprepare_to_access_memory): Rename to ...
13960 (done_accessing_memory): ... this.
13962 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13964 * linux-low.c (linux_prepare_to_access_memory): New.
13965 (linux_unprepare_to_access_memory): New.
13966 (linux_target_ops): Install them.
13967 * server.c (read_memory): Rename to ...
13968 (gdb_read_memory): ... this. Use
13969 prepare_to_access_memory/prepare_to_access_memory.
13970 (write_memory): Rename to ...
13971 (gdb_write_memory): ... this. Use
13972 prepare_to_access_memory/prepare_to_access_memory.
13973 (handle_search_memory_1): Adjust.
13974 (process_serial_event): Adjust.
13975 * target.h (struct target_ops): New fields
13976 prepare_to_access_memory and unprepare_to_access_memory.
13977 (prepare_to_access_memory, unprepare_to_access_memory): New.
13978 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13979 prepare_to_access_memory/prepare_to_access_memory.
13980 * nto-low.c (nto_target_ops): Adjust.
13981 * spu-low.c (spu_target_ops): Adjust.
13982 * win32-low.c (win32_target_ops): Adjust.
13984 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13986 * Makefile.in (WARN_CFLAGS): Get it from configure.
13987 (WERROR_CFLAGS): New.
13988 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13989 * configure.ac: Introduce --enable-werror, which adds -Werror to
13990 the compiler command line. Enabled by default. Disable with
13991 --disable-werror. Add -Wdeclaration-after-statement
13992 Wpointer-arith and -Wformat-nonliteral to warning flags.
13993 * configure: Regenerate.
13995 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13997 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13999 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14001 * gdbreplay.c (remote_error): New.
14003 (expect): Use gdbchar. Check for error reading from GDB.
14004 Clarify sync error output.
14005 (play): Check for errors writing to GDB.
14006 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14007 * remote-utils.c (getpkt): Check for errors writing to the remote
14010 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14012 * linux-low.c (linux_wait_1): Move non-debugging code out of
14013 `debug_threads' control.
14015 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14017 * linux-low.c (linux_wait_1): Don't set last_status here.
14018 * server.c (push_event, queue_stop_reply_callback): Assert we're
14019 not pushing a TARGET_WAITKIND_IGNORE event.
14020 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14021 (myresume, handle_target_event): Set the thread's last_resume_kind
14022 and last_status from the target returned status.
14024 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14028 * linux-x86-low.c (update_debug_registers_callback): New.
14029 (i386_dr_low_set_addr): Use it.
14030 (i386_dr_low_get_addr): New.
14031 (i386_dr_low_set_control): Use update_debug_registers_callback.
14032 (i386_dr_low_get_control): New.
14033 (i386_dr_low_get_status): Adjust.
14034 * linux-low.c (linux_stop_lwp): New.
14035 * linux-low.h (linux_stop_lwp): Declare.
14037 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14038 argument instead of a i386_debug_reg_state.
14039 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14040 a i386_debug_reg_state.
14041 (i386_insert_aligned_watchpoint): Adjust.
14042 (i386_remove_aligned_watchpoint): Adjust.
14043 (i386_low_stopped_data_address): Read the debug registers from the
14044 inferior instead of from the mirrors.
14045 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14046 (i386_dr_low_get_addr): Declare.
14047 (i386_dr_low_get_control): Declare.
14048 (i386_dr_low_get_status): Change prototype.
14050 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14051 (i386_dr_low_get_addr): New.
14052 (i386_dr_low_get_control): New.
14053 (i386_dr_low_get_status): Adjust prototype. Return
14055 (i386_initial_stuff): Clear dr_status_mirror and
14057 (i386_get_thread_context): Adjust.
14058 (i386_set_thread_context): Adjust.
14059 (i386_thread_added): Adjust.
14061 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14063 * linux-low.h (linux_thread_area): Delete declaration.
14065 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14067 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14068 after its termination.
14070 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14072 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14073 (gdb_wants_all_stopped): Delete.
14074 (linux_wait_1): Don't call them.
14075 * server.c (handle_v_cont): Tag all threads as want-stopped.
14076 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14077 stopped as "client-wants-stopped".
14079 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14081 * Makefile.in (signals_h): New.
14082 (server_h): Depend on it.
14083 (server.o): Don't depend on $(signals_def).
14084 (signals.o): Depend on $(signals_def).
14086 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14088 * Makefile.in (signals_def): New.
14089 (server_h): Append include/gdb/signals.h and signals_def.
14090 (server.o): Append signals_def.
14092 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14094 * server.c (handle_target_event): Use target_signal_to_host for
14095 resume_info.sig initialization.
14096 * target.h (struct thread_resume) <sig>: New comment.
14098 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14100 * server.c (handle_query): strcpy() the returned string from paddress()
14101 instead of sprintf().
14102 * utils.c (paddress): Return phex_nz().
14104 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14106 * server.c (handle_v_cont): Call mourn_inferior if process
14108 (myresume): Likewise.
14110 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14112 Static tracepoints, and integration with UST.
14114 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14115 * mem-break.c (uninsert_all_breakpoints)
14116 (reinsert_all_breakpoints): New.
14117 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14118 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14119 (gdb_agent_ust_loaded, helper_thread_id)
14120 (gdb_agent_helper_thread_id): New macros.
14121 (struct ipa_sym_addresses): Add addr_ust_loaded,
14122 addr_helper_thread_id, addr_cmd_buf.
14123 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14124 (in_process_agent_loaded_ust): New.
14125 (write_e_ust_not_loaded): New.
14126 (maybe_write_ipa_ust_not_loaded): New.
14127 (struct collect_static_trace_data_action): New.
14128 (enum tracepoint_type) <static_tracepoint>: New.
14129 (struct tracepoint) <handle>: Mention static tracepoints.
14130 (struct static_tracepoint_ctx): New.
14131 (CMD_BUF_SIZE): New.
14132 (add_tracepoint_action): Handle static tracepoint actions.
14133 (unprobe_marker_at): New.
14134 (clear_installed_tracepoints): Handle static tracepoints.
14135 (cmd_qtdp): Handle static tracepoints.
14136 (probe_marker_at): New.
14137 (cmd_qtstart): Handle static tracepoints.
14138 (response_tracepoint): Handle static tracepoints.
14139 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14140 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14141 (get_context_regcache): Handle static tracepoints.
14142 (do_action_at_tracepoint): Handle static tracepoint actions.
14143 (traceframe_find_block_type): Handle static trace data blocks.
14144 (traceframe_read_sdata): New.
14145 (download_tracepoints): Download static tracepoint actions.
14146 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14147 (GDB_PROBE_NAME): New.
14149 (GET_UST_SYM): New.
14152 (ust_marker_to_static_tracepoint): New.
14154 (collect_ust_data_at_tracepoint): New.
14155 (gdb_ust_probe): New.
14156 (UNIX_PATH_MAX, SOCK_DIR): New.
14157 (gdb_ust_connect_sync_socket): New.
14158 (resume_thread, stop_thread): New.
14159 (run_inferior_command): New.
14160 (init_named_socket): New.
14161 (gdb_ust_socket_init): New.
14162 (cstr_to_hexstr): New.
14164 (first_marker, next_marker): New.
14165 (response_ust_marker): New.
14166 (cmd_qtfstm, cmd_qtsstm): New.
14167 (unprobe_marker_at, probe_marker_at): New.
14168 (cmd_qtstmat, gdb_ust_thread): New.
14169 (gdb_ust_init): New.
14170 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14171 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14172 (ST_REGENTRY): New.
14173 (x86_64_st_collect_regmap): New.
14174 (X86_64_NUM_ST_COLLECT_GREGS): New.
14175 (AMD64_RIP_REGNUM): New.
14176 (supply_static_tracepoint_registers): New.
14177 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14178 (ST_REGENTRY): New.
14179 (i386_st_collect_regmap): New.
14180 (i386_NUM_ST_COLLECT_GREGS): New.
14181 (supply_static_tracepoint_registers): New.
14182 * server.c (handle_query): Handle qXfer:statictrace:read.
14183 <qSupported>: Report support for StaticTracepoints, and
14184 qXfer:statictrace:read features.
14185 * server.h (traceframe_read_sdata)
14186 (supply_static_tracepoint_registers): Declare.
14187 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14188 (unpack_varlen_hex): Include in IPA build.
14189 * Makefile.in (ustlibs, ustinc): New.
14190 (IPA_OBJS): Add remote-utils-ipa.o.
14191 ($(IPA_LIB)): Link -ldl and -lpthread.
14193 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14194 * config.in, configure: Regenerate.
14196 2010-06-20 Ian Lance Taylor <iant@google.com>
14197 Pedro Alves <pedro@codesourcery.com>
14199 * linux-x86-low.c (always_true): Delete.
14200 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14201 trying to fool the compiler with always_true.
14203 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14205 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14206 conditions in gdbserver.
14208 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14210 * spu-low.c (spu_read_memory): Wrap around local store limit.
14211 (spu_write_memory): Likewise.
14213 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14215 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14216 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14218 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14220 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14221 uses with LONGEST uses.
14223 2010-06-14 Stan Shebs <stan@codesourcery.com>
14224 Pedro Alves <pedro@codesourcery.com>
14228 * linux-x86-low.c: Include limits.h.
14230 (always_true): New.
14233 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14234 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14235 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14236 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14237 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14238 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14239 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14240 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14241 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14242 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14243 (amd64_emit_void_call_2): New.
14244 (amd64_emit_ops): New.
14245 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14246 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14247 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14248 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14249 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14250 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14251 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14252 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14253 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14254 (i386_emit_stack_adjust, i386_emit_int_call_1)
14255 (i386_emit_void_call_2): New.
14256 (i386_emit_ops): New.
14257 (x86_emit_ops): New.
14258 (the_low_target): Install x86_emit_ops.
14259 * server.h (struct emit_ops): New.
14260 (get_raw_reg_func_addr): Declare.
14261 (current_insn_ptr, emit_error): Declare.
14262 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14263 (set_trace_state_variable_value): New defines.
14264 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14265 addr_get_trace_state_variable_value and
14266 addr_set_trace_state_variable_value.
14267 (symbol_list): New fields for get_raw_reg,
14268 get_trace_state_variable_value and set_trace_state_variable_value.
14269 (condfn): New typedef.
14270 (struct tracepoint): New field `compiled_cond'.
14271 (do_action_at_tracepoint): Clear compiled_cond.
14272 (get_trace_state_variable_value, set_trace_state_variable_value):
14274 (condition_true_at_tracepoint): If there's a compiled condition,
14276 (current_insn_ptr, emit_error): New globals.
14277 (struct bytecode_address): New.
14278 (get_raw_reg_func_addr): New.
14279 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14280 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14281 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14282 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14283 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14284 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14285 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14286 (compile_tracepoint_condition, compile_bytecodes): New.
14287 * target.h (emit_ops): Forward declare.
14288 (struct target_ops): New field emit_ops.
14289 (target_emit_ops): New.
14290 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14291 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14292 * linux-low.c (linux_emit_ops): New.
14293 (linux_target_ops): Install it.
14294 * linux-low.h (struct linux_target_ops): New field emit_ops.
14296 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14298 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14299 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14301 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14302 Stan Shebs <stan@codesourcery.com>
14304 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14305 (all): Depend on $(extra_libraries).
14306 (install-only): Install the IPA.
14307 (IPA_OBJS, IPA_LIB): New.
14308 (clean): Remove the IPA lib.
14309 (IPAGENT_CFLAGS): New.
14310 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14311 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14312 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14313 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14314 * configure.ac: Check for atomic builtins support in the compiler.
14315 (IPA_DEPFILES, extra_libraries): Define.
14316 * configure.srv (ipa_obj): Add description.
14317 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14318 (i[34567]86-*-linux*): Set ipa_obj.
14319 (x86_64-*-linux*): Set ipa_obj.
14320 * linux-low.c (stabilizing_threads): New.
14321 (supports_fast_tracepoints): New.
14322 (linux_detach): Stabilize threads before detaching.
14323 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14324 the lwp is either not stabilizing, or is moving out of a jump pad.
14325 (linux_fast_tracepoint_collecting): New.
14326 (maybe_move_out_of_jump_pad): New.
14327 (enqueue_one_deferred_signal): New.
14328 (dequeue_one_deferred_signal): New.
14329 (linux_wait_for_event_1): If moving out of a jump pad, defer
14330 pending signals to later.
14331 (linux_stabilize_threads): New.
14332 (linux_wait_1): Check if threads need moving out of jump pads, and
14334 (stuck_in_jump_pad_callback): New.
14335 (move_out_of_jump_pad_callback): New.
14336 (lwp_running): New.
14337 (linux_resume_one_lwp): Handle moving out of jump pads.
14338 (linux_set_resume_request): Dequeue deferred signals.
14339 (need_step_over_p): Also step over fast tracepoint jumps.
14340 (start_step_over): Also uninsert fast tracepoint jumps.
14341 (finish_step_over): Also reinsert fast tracepoint jumps.
14342 (linux_install_fast_tracepoint_jump): New.
14343 (linux_target_ops): Install linux_stabilize_threads and
14344 linux_install_fast_tracepoint_jump_pad.
14345 * linux-low.h (linux_target_ops) <get_thread_area,
14346 install_fast_tracepoint_jump_pad>: New fields.
14347 (struct lwp_info) <collecting_fast_tracepoint,
14348 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14349 (linux_get_thread_area): Declare.
14350 * linux-x86-low.c (jump_insn): New.
14351 (x86_get_thread_area): New.
14352 (append_insns): New.
14353 (push_opcode): New.
14354 (amd64_install_fast_tracepoint_jump_pad): New.
14355 (i386_install_fast_tracepoint_jump_pad): New.
14356 (x86_install_fast_tracepoint_jump_pad): New.
14357 (the_low_target): Install x86_get_thread_area and
14358 x86_install_fast_tracepoint_jump_pad.
14359 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14360 (struct fast_tracepoint_jump): New.
14361 (fast_tracepoint_jump_insn): New.
14362 (fast_tracepoint_jump_shadow): New.
14363 (find_fast_tracepoint_jump_at): New.
14364 (fast_tracepoint_jump_here): New.
14365 (delete_fast_tracepoint_jump): New.
14366 (set_fast_tracepoint_jump): New.
14367 (uninsert_fast_tracepoint_jumps_at): New.
14368 (reinsert_fast_tracepoint_jumps_at): New.
14369 (set_breakpoint_at): Use write_inferior_memory.
14370 (uninsert_raw_breakpoint): Use write_inferior_memory.
14371 (check_mem_read): Mask out fast tracepoint jumps.
14372 (check_mem_write): Mask out fast tracepoint jumps.
14373 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14374 (set_fast_tracepoint_jump): Declare.
14375 (delete_fast_tracepoint_jump)
14376 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14377 (reinsert_fast_tracepoint_jumps_at): Declare.
14378 * regcache.c: Don't compile many functions when building the
14379 in-process agent library.
14380 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14381 the register buffer in the heap.
14382 (free_register_cache): If the register buffer isn't owned by the
14383 regcache, don't free it.
14384 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14385 pre-existing register caches.
14386 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14388 (convert_ascii_to_int): : Constify `from' parameter type.
14389 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14390 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14391 the needed buffer in-place.
14392 (relocate_instruction): New.
14393 * server.c (handle_query) <qSymbols>: If the target supports
14394 tracepoints, give it a chance of looking up symbols. Report
14395 support for fast tracepoints.
14396 (handle_status): Stabilize threads.
14397 (process_serial_event): Adjust.
14398 * server.h (struct fast_tracepoint_jump): Forward declare.
14399 (struct process_info) <fast_tracepoint_jumps>: New field.
14400 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14401 (decode_X_packet, decode_M_packet): Adjust.
14402 (relocate_instruction): Declare.
14403 (in_process_agent_loaded): Declare.
14404 (tracepoint_look_up_symbols): Declare.
14405 (struct fast_tpoint_collect_status): Declare.
14406 (fast_tracepoint_collecting): Declare.
14407 (force_unlock_trace_buffer): Declare.
14408 (handle_tracepoint_bkpts): Declare.
14409 (initialize_low_tracepoint)
14410 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14411 * target.h (struct target_ops) <stabilize_threads,
14412 install_fast_tracepoint_jump_pad>: New fields.
14413 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14414 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14415 [HAVE_STDINT_H]: Include stdint.h.
14416 (trace_debug_1): Rename to ...
14417 (trace_vdebug): ... this.
14418 (trace_debug): Rename to ...
14419 (trace_debug_1): ... this. Add `level' parameter.
14420 (trace_debug): New.
14421 (ATTR_USED, ATTR_NOINLINE): New.
14422 (IP_AGENT_EXPORT): New.
14423 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14424 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14425 (about_to_request_buffer_space, trace_buffer_is_full)
14426 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14427 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14428 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14429 (traceframe_write_count, traceframes_created)
14430 (trace_state_variables)
14431 New renaming defines.
14432 (struct ipa_sym_addresses): New.
14433 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14434 (symbol_list): New.
14435 (ipa_sym_addrs): New.
14436 (all_tracepoint_symbols_looked_up): New.
14437 (in_process_agent_loaded): New.
14438 (write_e_ipa_not_loaded): New.
14439 (maybe_write_ipa_not_loaded): New.
14440 (tracepoint_look_up_symbols): New.
14441 (debug_threads) [IN_PROCESS_AGENT]: New.
14442 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14443 (UNKNOWN_SIDE_EFFECTS): New.
14444 (stop_tracing): New.
14445 (flush_trace_buffer): New.
14446 (stop_tracing_bkpt): New.
14447 (flush_trace_buffer_bkpt): New.
14448 (read_inferior_integer): New.
14449 (read_inferior_uinteger): New.
14450 (read_inferior_data_pointer): New.
14451 (write_inferior_data_pointer): New.
14452 (write_inferior_integer): New.
14453 (write_inferior_uinteger): New.
14454 (struct collect_static_trace_data_action): Delete.
14455 (enum tracepoint_type): New.
14456 (struct tracepoint) <type>: New field `type'.
14457 <actions_str, step_actions, step_actions_str>: Only include in
14459 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14460 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14461 (tracepoints): Use IP_AGENT_EXPORT.
14462 (last_tracepoint): Don't include in the IPA.
14463 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14464 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14465 (alloced_trace_state_variables): New.
14466 (trace_state_variables): Use IP_AGENT_EXPORT.
14467 (traceframe_t): Delete unused variable.
14468 (circular_trace_buffer): Don't include in the IPA.
14469 (trace_buffer_start): Delete.
14470 (struct trace_buffer_control): New.
14471 (trace_buffer_free): Delete.
14472 (struct ipa_trace_buffer_control): New.
14473 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14474 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14476 (trace_buffer_ctrl): New.
14477 (TRACE_BUFFER_CTRL_CURR): New.
14478 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14479 Reimplement as macros.
14480 (trace_buffer_wrap): Delete.
14481 (traceframe_write_count, traceframe_read_count)
14482 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14483 (struct tracepoint_hit_ctx) <type>: New field.
14484 (struct fast_tracepoint_ctx): New.
14485 (memory_barrier): New.
14487 (record_tracepoint_error): Update atomically in the IPA.
14488 (clear_inferior_trace_buffer): New.
14489 (about_to_request_buffer_space): New.
14490 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14491 updating the same buffer.
14492 (add_tracepoint): Default the tracepoint's type to trap
14493 tracepoint, and orig_size to -1.
14494 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14495 internal variables.
14496 (create_trace_state_variable): New parameter `gdb'. Handle it.
14497 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14498 (cmd_qtdp): Handle fast tracepoints.
14499 (cmd_qtdv): Adjust.
14500 (max_jump_pad_size): New.
14501 (gdb_jump_pad_head): New.
14502 (get_jump_space_head): New.
14503 (claim_jump_space): New.
14504 (sort_tracepoints): New.
14505 (MAX_JUMP_SIZE): New.
14506 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14508 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14509 support. Upload fast traceframes, and delete internal IPA
14511 (stop_tracing_handler): New.
14512 (flush_trace_buffer_handler): New.
14513 (cmd_qtstop): Upload fast tracepoints.
14514 (response_tracepoint): Handle fast tracepoints.
14515 (tracepoint_finished_step): Upload fast traceframes. Set the
14516 tracepoint hit context's tracepoint type.
14517 (handle_tracepoint_bkpts): New.
14518 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14519 type. Add comment about fast tracepoints.
14520 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14521 non-existing action_str field.
14522 (get_context_regcache): Handle fast tracepoints.
14523 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14525 (fast_tracepoint_from_jump_pad_address): New.
14526 (fast_tracepoint_from_ipa_tpoint_address): New.
14527 (collecting_t): New.
14528 (force_unlock_trace_buffer): New.
14529 (fast_tracepoint_collecting): New.
14531 (gdb_collect): New.
14532 (write_inferior_data_ptr): New.
14533 (target_tp_heap): New.
14534 (target_malloc): New.
14535 (download_agent_expr): New.
14537 (download_tracepoints): New.
14538 (download_trace_state_variables): New.
14539 (upload_fast_traceframes): New.
14540 (IPA_FIRST_TRACEFRAME): New.
14541 (IPA_NEXT_TRACEFRAME_1): New.
14542 (IPA_NEXT_TRACEFRAME): New.
14543 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14544 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14545 (gdb_jump_pad_buffer_end): New.
14546 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14547 (initialize_tracepoint): Adjust.
14548 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14549 buffer. Initialize the low module.
14550 * utils.c (PREFIX, TOOLNAME): New.
14551 (malloc_failure): Use PREFIX.
14552 (error): In the IPA, an error causes an exit.
14553 (fatal, warning): Use PREFIX.
14554 (internal_error): Use TOOLNAME.
14555 (NUMCELLS): Increase to 10.
14556 * configure, config.in: Regenerate.
14558 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14560 * server.c (handle_query) <qSupported>: Do two passes over the
14561 qSupported string to avoid nesting strtok.
14563 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14565 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14567 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14568 -Wl,--dynamic-list.
14569 * configure: Regenerate.
14570 * proc-service.list: New.
14572 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14574 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14577 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14579 * gdbreplay.c (remote_open): Check error return from socket() call by
14580 its equality to -1 not by it being negative.
14581 * remote-utils.c (remote_open): Likewise.
14583 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14585 * config.h: Regenerate.
14587 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14589 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14590 doesn't provide PTRACE_GET_THREAD_AREA.
14592 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14594 * linux-m68k-low.c: Include <asm/ptrace.h>
14595 (ps_get_thread_area): Implement.
14597 2010-05-03 Doug Evans <dje@google.com>
14599 * event-loop.c (struct callback_event): New struct.
14600 (callback_list): New global.
14601 (append_callback_event, delete_callback_event): New functions.
14602 (process_callback): New function.
14603 (start_event_loop): Call it.
14604 * remote-utils.c (NOT_SCHEDULED): Define.
14605 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14606 moved out of readchar.
14607 (readchar): Rewrite. Call reschedule before returning.
14608 (reset_readchar): New function.
14609 (remote_close): Call it.
14610 (process_remaining, reschedule): New functions.
14611 * server.h (callback_handler_func): New typedef.
14612 (append_callback_event, delete_callback_event): Declare.
14614 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14616 * proc-service.c (ps_pglobal_lookup): Use
14617 thread_db_look_up_one_symbol.
14618 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14619 parameter. Use it instead of all_symbols_looked_up.
14620 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14622 (all_symbols_looked_up): Don't declare.
14623 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14624 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14626 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14627 Set all_symbols_looked_up here.
14628 (thread_db_look_up_one_symbol): New.
14629 (thread_db_get_tls_address): Adjust.
14630 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14631 thread_db object on the heap, and tentatively set it in the
14633 (thread_db_init): Don't set all_symbols_looked_up here.
14634 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14636 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14638 * linux-low.c (linux_kill, linux_detach): Adjust.
14639 (status_pending_p_callback): Remove redundant statement. Check
14640 for !TARGET_WAITIKIND_IGNORE, instead of
14641 TARGET_WAITKIND_STOPPED.
14642 (handle_tracepoints): Make sure LWP is locked. Adjust.
14643 (linux_wait_for_event_1): Adjust.
14644 (linux_cancel_breakpoints): New.
14645 (unsuspend_one_lwp): New.
14646 (unsuspend_all_lwps): New.
14647 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14648 (send_sigstop_callback): Change return type to int, add new
14649 `except' parameter and handle it.
14650 (suspend_and_send_sigstop_callback): New.
14651 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14652 pass them down. If SUSPEND, also increment the lwp's suspend
14654 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14655 (need_step_over_p): Don't consider suspended LWPs.
14656 (start_step_over): Adjust.
14657 (proceed_one_lwp): Change return type to int, add new `except'
14658 parameter and handle it.
14659 (unsuspend_and_proceed_one_lwp): New.
14660 (proceed_all_lwps): Use find_inferior instead of
14662 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14663 also decrement the suspend count of LWPs. Pass `except' down,
14664 instead of hacking its suspend count.
14665 (linux_pause_all): Add `freeze' parameter. Adjust.
14666 (linux_unpause_all): New.
14667 (linux_target_ops): Install linux_unpause_all.
14668 * server.c (handle_status): Adjust.
14669 * target.h (struct target_ops): New fields `unpause_all' and
14670 `cancel_breakpoints'. Add new parameter to `pause_all'.
14671 (pause_all): Add new `freeze' parameter.
14672 (unpause_all): New.
14673 (cancel_breakpoints): New.
14674 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14675 cancel breakpoints.
14676 (cmd_qtstart): Pause threads.
14677 (stop_tracing): Pause threads, and cancel breakpoints.
14678 * win32-low.c (win32_target_ops): Adjust.
14680 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14682 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14683 the inferior right away from here...
14684 (linux_wait_1): ... to here, and adjust to check the thread's
14685 last_resume_kind instead of the lwp's step or stop_expected flags.
14687 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14689 * README: Use consistent `GDB' and `GDBserver' spellings.
14691 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14693 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14694 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14695 (linux_detach_one_lwp): Assume the lwp is stopped.
14696 (any_thread_of): Delete.
14697 (linux_detach): Stop all lwps here. Don't blindly delete all
14699 (delete_lwp_callback): New.
14700 (linux_mourn): Delete all lwps of the process that is gone.
14701 (linux_wait_1): Don't delete the last lwp of the process here.
14702 * mem-break.h (mark_breakpoints_out): Declare.
14703 * mem-break.c (mark_breakpoints_out): New.
14704 (free_all_breakpoints): Use it.
14705 * server.c (handle_target_event): If the process is gone, mark
14707 * thread-db.c (struct thread_db) <create_bp>: New field.
14708 (thread_db_enable_reporting): Fix prototype. Store a thread event
14709 breakpoint reference in the thread_db struct.
14710 (thread_db_load_search): Clear the thread_db object.
14711 (try_thread_db_load_1): Ditto.
14712 (switch_to_process): New.
14713 (disable_thread_event_reporting): Use it.
14714 (remove_thread_event_breakpoints): New.
14715 (thread_db_detach, thread_db_mourn): Use it.
14717 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14719 * linux-low.c (linux_enable_event_reporting): New.
14720 (linux_wait_for_event_1, handle_extended_wait): Use it.
14722 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14724 * linux-low.c (linux_kill_one_lwp, linux_kill)
14725 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14726 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14727 SIGSTOP even if the LWP is stopped.
14728 (send_sigstop_callback): New.
14729 (stop_all_lwps): Use send_sigstop_callback instead.
14730 (linux_resume_one_thread): Adjust.
14731 (proceed_one_lwp): Still proceed an LWP that the client has
14732 requested to stop, if we haven't reported it as stopped yet. Make
14733 sure that LWPs the client want stopped, have a pending SIGSTOP.
14735 2010-04-26 Doug Evans <dje@google.com>
14737 * server.c (handle_general_set): Make static.
14739 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14740 Print received char after testing for error/eof instead of before.
14741 (input_interrupt): Tweak comment.
14743 2010-04-23 Doug Evans <dje@google.com>
14745 * server.c (start_inferior): Print inferior argv if --debug.
14747 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14749 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14750 * nto-x86-low.c: Include server.h
14752 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14754 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14755 be consistent with other sources of this directory.
14756 (init_registers_amd64): Correct name of source file of this function
14759 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14761 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14762 64-bit executables.
14764 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14766 * win32-i386-low.c: Add 64-bit support.
14767 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14768 (init_registers_amd64): Declare.
14769 (mappings): Add 64-bit version of array.
14770 (init_windows_x86): New function.
14771 (the_low_target): Change init_arch field to init_windows_x86.
14773 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14775 * win32-low.c: Adapt to support also 64-bit architecture.
14776 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14777 (get_image_name): Use SIZE_T type for local variable `done'.
14778 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14779 (toolhelp_get_dll_name): Idem.
14780 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14781 Use uintptr_t typecast to avoid warning.
14782 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14783 (handle_exception): Use phex_nz to avoid warning.
14784 (win32_wait): Remove unused local variable `process'.
14786 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14788 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14791 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14793 * configure.ac: Use `ws2_32' library for srv_mingw.
14794 * configure: Regenerate.
14795 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14796 * remote-utils.c: Likewise.
14798 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14800 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14801 if __x86_64__ is defined.
14803 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14805 * configure: Regenerate.
14807 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14809 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14810 * target.h (target_ops): New get_tib_address field.
14811 * win32-low.h (win32_thread_info): Add thread_local_base field.
14812 * win32-low.c (child_add_thread): Add tlb argument.
14813 Set thread_local_base field to TLB.
14814 (get_child_debug_event): Adapt to child_add_thread change.
14815 (win32_get_tib_address): New function.
14816 (win32_target_ops): Set get_tib_address field to
14817 win32_get_tib_address.
14818 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14820 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14822 * linux-low.c (linux_mourn): Also remove the process.
14823 * server.c (handle_target_event): Don't remove the process here.
14824 * nto-low.c (nto_mourn): New.
14825 (nto_target_ops): Install it.
14826 * spu-low.c (spu_mourn): New.
14827 (spu_target_ops): Install it.
14828 * win32-low.c (win32_mourn): New.
14829 (win32_target_ops): Install it.
14831 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14833 * server.h (buffer_xml_printf): Remove redundant `;'.
14835 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14837 * regcache.c (set_register_cache): Invalidate regcaches before
14838 changing the register cache layout.
14839 (regcache_invalidate_one): Allow a NULL regcache.
14840 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14841 regcaches before changing the register cache layout or the target
14844 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14846 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14847 variable warning on Linux/x86-64.
14849 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14851 GDBserver disconnected tracing support.
14853 * linux-low.c (linux_remove_process): Delete.
14854 (add_lwp): Don't set last_resume_kind here.
14855 (linux_kill): Use `mourn'.
14856 (linux_detach): Use `thread_db_detach', and `mourn'.
14857 (linux_mourn): New.
14858 (linux_attach_lwp_1): Adjust comment.
14859 (linux_attach): last_resume_kind moved the thread_info; adjust.
14860 (status_pending_p_callback): Adjust.
14861 (linux_wait_for_event_1): Adjust.
14862 (count_events_callback, select_singlestep_lwp_callback)
14863 (select_event_lwp_callback, cancel_breakpoints_callback)
14864 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14865 (proceed_one_lwp): Adjust.
14866 (linux_async): Add debug output.
14867 (linux_thread_stopped): New.
14868 (linux_pause_all): New.
14869 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14871 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14872 (thread_db_free): Delete declaration.
14873 (thread_db_detach, thread_db_mourn): Declare.
14874 * thread-db.c (thread_db_init): Use thread_db_mourn.
14875 (thread_db_free): Delete, split in two.
14876 (disable_thread_event_reporting): New.
14877 (thread_db_detach): New.
14878 (thread_db_mourn): New.
14880 * server.h (struct thread_info) <last_resume_kind>: New field.
14881 <attached>: Add comment.
14882 <gdb_detached>: New field.
14883 (handler_func): Change return type to int.
14884 (handle_serial_event, handle_target_event): Ditto.
14885 (gdb_connected): Declare.
14887 (disconnected_tracing): Declare.
14888 (stop_tracing): Declare.
14890 * server.c (handle_query) <qSupported>: Report support for
14891 disconnected tracing.
14892 (queue_stop_reply_callback): Account for running threads.
14893 (gdb_wants_thread_stopped): New.
14894 (gdb_wants_all_threads_stopped): New.
14895 (gdb_reattached_process): New.
14896 (handle_status): Clear the `gdb_detached' flag of all processes.
14897 In all-stop, stop all threads.
14898 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14899 (process_serial_event): If the remote connection breaks, or if an
14900 exit was forced with "monitor exit", force an event loop exit.
14901 Handle disconnected tracing on detach.
14902 (handle_serial_event): Adjust.
14903 (handle_target_event): If GDB isn't connected, forward events back
14904 to the inferior, unless the last process exited, in which case,
14905 exit gdbserver. Adjust interface.
14907 * remote-utils.c (remote_open): Don't block in accept. Instead
14908 register an event loop source on the listen socket file
14909 descriptor. Refactor bits into ...
14910 (listen_desc): ... this new global.
14911 (gdb_connected): ... this new function.
14912 (enable_async_notification): ... this new function.
14913 (handle_accept_event): ... this new function.
14914 (remote_close): Clear remote_desc.
14916 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14918 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14920 (mourn_inferior): Define.
14921 (target_process_qsupported): Avoid the dangling else problem.
14922 (thread_stopped): Define.
14923 (pause_all): Define.
14924 (target_waitstatus_to_string): Declare.
14925 * target.c (target_waitstatus_to_string): New.
14927 * tracepoint.c (tracing): Make extern.
14928 (disconnected_tracing): New.
14929 (stop_tracing): Make extern. Handle tracing stops due to GDB
14931 (cmd_qtdisconnected): New.
14932 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14933 (handle_tracepoint_general_set): Handle QTDisconnected.
14935 * event-loop.c (event_handler_func): Change return type to int.
14936 (process_event): Bail out if the event handler wants the event
14938 (handle_file_event): Ditto.
14939 (start_event_loop): Bail out if the event handler wants the event
14942 * nto-low.c (nto_target_ops): Adjust.
14943 * spu-low.c (spu_wait): Don't remove the process here.
14944 (spu_target_ops): Adjust.
14945 * win32-low.c (win32_wait): Don't remove the process here.
14946 (win32_target_ops): Adjust.
14948 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14950 * regcache.c (realloc_register_cache): Invalidate inferior's
14951 regcache before recreating it.
14953 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14955 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14957 2010-04-09 Stan Shebs <stan@codesourcery.com>
14958 Pedro Alves <pedro@codesourcery.com>
14960 * server.h (LONGEST): New.
14961 (struct thread_info) <while_stepping>: New field.
14962 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14964 (initialize_tracepoint, handle_tracepoint_general_set)
14965 (handle_tracepoint_query, tracepoint_finished_step)
14966 (tracepoint_was_hit, release_while_stepping_state_list):
14967 (current_traceframe): Declare.
14968 * server.c (handle_general_set): Handle tracepoint packets.
14969 (read_memory): New.
14970 (write_memory): New.
14971 (handle_search_memory_1): Use read_memory.
14972 (handle_query): Report support for conditional tracepoints, trace
14973 state variables, and tracepoint sources. Handle tracepoint
14975 (main): Initialize the tracepoints module.
14976 (process_serial_event): Handle traceframe reads/writes.
14978 * linux-low.c (handle_tracepoints): New.
14979 (linux_wait_1): Call it.
14980 (linux_resume_one_lwp): Handle while-stepping.
14981 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14982 (linux_target_ops): Install them.
14983 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14985 * linux-x86-low.c (x86_supports_tracepoints): New.
14986 (the_low_target). Install it.
14988 * mem-break.h (delete_breakpoint): Declare.
14989 * mem-break.c (delete_breakpoint): Make external.
14991 * target.h (struct target_ops): Add `supports_tracepoints',
14992 `read_pc', and `write_pc' fields.
14993 (target_supports_tracepoints): Define.
14994 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14997 * regcache.h (struct regcache) <registers_owned>: New field.
14998 (init_register_cache, regcache_cpy): Declare.
14999 (regcache_read_pc, regcache_write_pc): Declare.
15000 (register_cache_size): Declare.
15001 (supply_regblock): Declare.
15002 * regcache.c (init_register_cache): New.
15003 (new_register_cache): Use it.
15004 (regcache_cpy): New.
15005 (register_cache_size): New.
15006 (supply_regblock): New.
15007 (regcache_read_pc, regcache_write_pc): New.
15009 * tracepoint.c: New.
15011 * Makefile.in (OBS): Add tracepoint.o.
15012 (tracepoint.o): New rule.
15014 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15016 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15018 (i386-mmx.c): Likewise.
15019 (i386-mmx-linux.o): Likewise.
15020 (i386-mmx-linux.c): Likewise.
15022 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15023 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15024 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15025 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15027 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15028 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15029 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15031 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15033 * Makefile.in (clean): Updated.
15035 (i386-avx.c): Likewise.
15036 (i386-avx-linux.o): Likewise.
15037 (i386-avx-linux.c): Likewise.
15038 (amd64-avx.o): Likewise.
15039 (amd64-avx.c): Likewise.
15040 (amd64-avx-linux.o): Likewise.
15041 (amd64-avx-linux.c): Likewise.
15043 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15044 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15045 (srv_amd64_regobj): Add amd64-avx.o.
15046 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15047 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15048 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15049 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15050 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15051 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15052 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15054 * i387-fp.c: Include "i386-xstate.h".
15056 (i387_cache_to_xsave): Likewise.
15057 (i387_xsave_to_cache): Likewise.
15058 (x86_xcr0): Likewise.
15060 * i387-fp.h (i387_cache_to_xsave): Likewise.
15061 (i387_xsave_to_cache): Likewise.
15062 (x86_xcr0): Likewise.
15064 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15065 * linux-crisv32-low.c (target_regsets): Likewise.
15066 * linux-m68k-low.c (target_regsets): Likewise.
15067 * linux-mips-low.c (target_regsets): Likewise.
15068 * linux-ppc-low.c (target_regsets): Likewise.
15069 * linux-s390-low.c (target_regsets): Likewise.
15070 * linux-sh-low.c (target_regsets): Likewise.
15071 * linux-sparc-low.c (target_regsets): Likewise.
15072 * linux-xtensa-low.c (target_regsets): Likewise.
15074 * linux-low.c: Include <sys/uio.h>.
15075 (regsets_fetch_inferior_registers): Support nt_type.
15076 (regsets_store_inferior_registers): Likewise.
15077 (linux_process_qsupported): New.
15078 (linux_target_ops): Add linux_process_qsupported.
15080 * linux-low.h (regset_info): Add nt_type.
15081 (linux_target_ops): Add process_qsupported.
15083 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15085 (init_registers_i386_avx_linux): New.
15086 (init_registers_amd64_avx_linux): Likewise.
15087 (xmltarget_i386_linux_no_xml): Likewise.
15088 (xmltarget_amd64_linux_no_xml): Likewise.
15089 (PTRACE_GETREGSET): Likewise.
15090 (PTRACE_SETREGSET): Likewise.
15091 (x86_fill_xstateregset): Likewise.
15092 (x86_store_xstateregset): Likewise.
15093 (use_xml): Likewise.
15094 (x86_linux_update_xmltarget): Likewise.
15095 (x86_linux_process_qsupported): Likewise.
15096 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15097 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15098 init_registers_i386_linux here. Call
15099 x86_linux_update_xmltarget.
15100 (the_low_target): Add x86_linux_process_qsupported.
15102 * server.c (handle_query): Call target_process_qsupported.
15104 * target.h (target_ops): Add process_qsupported.
15105 (target_process_qsupported): New.
15107 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15109 * inferiors.c (add_thread): Set last_status kind to
15110 TARGET_WAITKIND_IGNORE.
15111 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15112 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15113 (linux_wait_1): Move `thread' local definition to block that uses
15114 it. Don't NULL initialize `event_child'.
15115 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15116 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15117 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15119 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15121 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15122 an extended waitstatus, or by a watchpoint.
15123 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15124 thread was stepping or has been stopped by a watchpoint.
15126 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15128 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15129 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15130 of another, then delete the previous, and validate all
15132 (validate_inserted_breakpoint): New.
15133 (delete_disabled_breakpoints): New.
15134 (validate_breakpoints): New.
15135 (check_mem_read): Validate breakpoints before trusting their
15136 shadow. Delete disabled breakpoints.
15137 (check_mem_write): Validate breakpoints before trusting they
15138 should be inserted. Delete disabled breakpoints.
15139 * mem-break.h (validate_breakpoints):
15140 * server.c (handle_query): Validate breakpoints when we see a
15143 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15145 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15146 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15147 if we could tell there's a GDB breakpoint at stop_pc.
15148 (need_step_over_p): Don't do a step over if we find a GDB
15149 breakpoint at the resume PC.
15151 * mem-break.c (struct raw_breakpoint): New.
15152 (enum bkpt_type): New type `gdb_breakpoint'.
15153 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15154 fields. New field `raw'.
15155 (find_raw_breakpoint_at): New.
15156 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15157 breakpoint instead.
15158 (set_breakpoint_at): Adjust.
15159 (delete_raw_breakpoint): New.
15160 (release_breakpoint): New.
15161 (delete_breakpoint): Rename to...
15162 (delete_breakpoint_1): ... this. Add proc parameter. Use
15163 release_breakpoint. Return ENOENT.
15164 (delete_breakpoint): Reimplement.
15165 (find_breakpoint_at): Delete.
15166 (find_gdb_breakpoint_at): New.
15167 (delete_breakpoint_at): Delete.
15168 (set_gdb_breakpoint_at): New.
15169 (delete_gdb_breakpoint_at): New.
15170 (gdb_breakpoint_here): New.
15171 (set_reinsert_breakpoint): Use release_breakpoint.
15172 (uninsert_breakpoint): Rename to ...
15173 (uninsert_raw_breakpoint): ... this.
15174 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15175 (reinsert_raw_breakpoint): Change parameter type to
15177 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15179 (check_breakpoints): Adjust. Use release_breakpoint.
15180 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15181 (breakpoint_inserted_here): Ditto.
15182 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15183 Don't trust the breakpoint's shadow if it is not inserted.
15184 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15185 (delete_all_breakpoints): Adjust.
15186 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15187 use delete_breakpoint_1.
15189 * mem-break.h (breakpoints_supported): Delete declaration.
15190 (set_gdb_breakpoint_at): Declare.
15191 (gdb_breakpoint_here): Declare.
15192 (delete_breakpoint_at): Delete.
15193 (delete_gdb_breakpoint_at): Declare.
15195 * server.h (struct raw_breakpoint): Forward declare.
15196 (struct process_info): New field `raw_breakpoints'.
15198 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15201 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15203 * linux-low.c (status_pending_p_callback): Fix comment.
15204 (linux_wait_for_event_1): Move most of the internal breakpoint
15205 handling from here...
15206 (linux_wait_1): ... to here.
15207 (count_events_callback): New.
15208 (select_singlestep_lwp_callback): New.
15209 (select_event_lwp_callback): New.
15210 (cancel_breakpoints_callback): New.
15211 (select_event_lwp): New.
15212 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15213 priority to all LWPs that have had events that should be reported
15214 to the client. Cancel breakpoints when about to reporting the
15215 event to the client, not while stopping lwps. No longer cancel
15216 finished single-steps here.
15217 (cancel_finished_single_step): Delete.
15218 (cancel_finished_single_steps): Delete.
15220 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15222 * mem-break.c (enum bkpt_type): New.
15223 (struct breakpoint): New field `type'.
15224 (set_breakpoint_at): Change return type to struct breakpoint
15225 pointer. Set type to `other_breakpoint' by default.
15226 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15227 in the breakpoint list.
15228 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15229 (reinsert_breakpoint): Rename to ...
15230 (reinsert_raw_breakpoint): ... this.
15231 (reinsert_breakpoints_at): Adjust.
15232 * mem-break.h (struct breakpoint): Declare.
15233 (set_breakpoint_at): Change return type to struct breakpoint
15236 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15238 * server.c (handle_query): Assign, not compare.
15240 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15242 Teach linux gdbserver to step-over-breakpoints.
15244 * linux-low.c (can_hardware_single_step): New.
15245 (supports_breakpoints): New.
15246 (handle_extended_wait): If stopping threads, read the stop pc of
15247 the new cloned LWP.
15249 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15250 low target doesn't support retrieving the PC.
15251 (add_lwp): Set last_resume_kind to resume_continue.
15252 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15253 (linux_attach): Don't clear stop_expected. Set the lwp's
15254 last_resume_kind to resume_stop.
15255 (linux_detach_one_lwp): Don't check for removed breakpoints.
15256 (check_removed_breakpoint): Delete.
15257 (status_pending_p): Rename to ...
15258 (status_pending_p_callback): ... this. Don't check for removed
15259 breakpoints. Don't consider threads that are stopped from GDB's
15261 (linux_wait_for_lwp): Always read the stop_pc here.
15262 (cancel_breakpoint): New.
15263 (step_over_bkpt): New global.
15264 (linux_wait_for_event_1): Implement stepping over breakpoints.
15265 (gdb_wants_lwp_stopped): New.
15266 (gdb_wants_all_stopped): New.
15267 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15268 single-step traps here. Store the thread's last reported target
15270 (send_sigstop): Don't clear stop_expected. Always set it,
15272 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15273 (cancel_finished_single_step): New.
15274 (cancel_finished_single_steps): New.
15275 (wait_for_sigstop): Don't cancel finished single-step traps here.
15276 (linux_resume_one_lwp): Don't check for removed breakpoints.
15277 Don't set `step' on non-hardware step archs.
15278 (linux_set_resume_request): Ignore resume_stop requests if already
15279 stopping or stopped. Set the lwp's last_resume_kind.
15280 (resume_status_pending_p): Don't check for removed breakpoints.
15281 (need_step_over_p): New.
15282 (start_step_over): New.
15283 (finish_step_over): New.
15284 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15285 requests. Clear the thread's last reported target waitstatus.
15286 Don't use the `suspended' flag. Don't consider pending breakpoints.
15287 (linux_resume): Start a step-over if necessary.
15288 (proceed_one_lwp): New.
15289 (proceed_all_lwps): New.
15290 (unstop_all_lwps): New.
15291 * linux-low.h (struct lwp_info): Rewrite comment for the
15292 `suspended' flag. Add the `stop_pc' field. Delete the
15293 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15294 Add `'last_resume_kind' and `need_step_over' fields.
15295 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15296 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15297 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15298 (set_raw_breakpoint_at): New.
15299 (set_breakpoint_at): Rewrite to use it.
15300 (reinsert_breakpoint_handler): Delete.
15301 (set_reinsert_breakpoint): New.
15302 (reinsert_breakpoint_by_bp): Delete.
15303 (delete_reinsert_breakpoints): New.
15304 (uninsert_breakpoint): Rewrite.
15305 (uninsert_breakpoints_at): New.
15306 (reinsert_breakpoint): Rewrite.
15307 (reinsert_breakpoints_at): New.
15308 (check_breakpoints): Rewrite.
15309 (breakpoint_here): New.
15310 (breakpoint_inserted_here): New.
15311 (check_mem_read): Adjust.
15312 * mem-break.h (breakpoints_supported, breakpoint_here)
15313 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15314 (reinsert_breakpoint_by_bp): Delete declaration.
15315 (delete_reinsert_breakpoints): Declare.
15316 (reinsert_breakpoint): Delete declaration.
15317 (reinsert_breakpoints_at): Declare.
15318 (uninsert_breakpoint): Delete declaration.
15319 (uninsert_breakpoints_at): Declare.
15320 (check_breakpoints): Adjust prototype.
15321 * server.h: Adjust include order.
15322 (struct thread_info): Declare here. Add a `last_status' field.
15324 2010-03-23 Michael Snyder <msnyder@vmware.com>
15326 * server.c (crc32): New function.
15327 (handle_query): Add handling for 'qCRC:' request.
15329 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15331 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15332 lwp had been stopped by a watchpoint.
15334 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15336 * server.h (internal_error): Declare.
15337 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15338 * utils.c (internal_error): New function.
15340 2010-03-15 Andreas Schwab <schwab@redhat.com>
15342 * configure.srv: Fix typo setting srv_regobj.
15344 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15346 * linux-low.c (fetch_register): Avoid passing a non string literal
15348 (usr_store_inferior_registers): Ditto.
15350 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15352 * linux-low.c (linux_write_memory): Bail out early if peeking
15355 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15357 * linux-low.h (struct lwp_info): New fields
15358 `stopped_by_watchpoint' and `stopped_data_address'.
15359 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15360 here, and cache them in the lwp object.
15361 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15363 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15365 (linux_stopped_by_watchpoint): Rewrite.
15366 (linux_stopped_data_address): Rewrite.
15368 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15370 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15371 switching the current inferior, not before.
15373 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15375 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15376 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15377 i386-linux.c and amd64-linux.c.
15378 (reg-i386.o): Removed.
15379 (reg-i386.c): Likewise.
15380 (reg-i386-linux.o): Likewise.
15381 (reg-i386-linux.c): Likewise.
15382 (reg-x86-64.o): Likewise.
15383 (reg-x86-64.c): Likewise.
15384 (reg-x86-64-linux.o): Likewise.
15385 (reg-x86-64-linux.c): Likewise.
15387 (i386.c): Likewise.
15388 (i386-linux.o): Likewise.
15389 (i386-linux.c): Likewise.
15390 (amd64.o): Likewise.
15391 (amd64.c): Likewise.
15392 (amd64-linux.o): Likewise.
15393 (amd64-linux.c): Likewise.
15395 * configure.srv (srv_i386_regobj): New.
15396 (srv_i386_linux_regobj): Likewise.
15397 (srv_amd64_regobj): Likewise.
15398 (srv_amd64_linux_regobj): Likewise.
15399 (srv_i386_32bit_xmlfiles): Likewise.
15400 (srv_i386_64bit_xmlfiles): Likewise.
15401 (srv_i386_xmlfiles): Likewise.
15402 (srv_amd64_xmlfiles): Likewise.
15403 (srv_i386_linux_xmlfiles): Likewise.
15404 (srv_amd64_linux_xmlfiles): Likewise.
15405 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15406 srv_xmlfiles to $srv_i386_xmlfiles.
15407 (i[34567]86-*-mingw32ce*): Likewise.
15408 (i[34567]86-*-mingw*): Likewise.
15409 (i[34567]86-*-nto*): Likewise.
15410 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15411 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15412 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15413 (x86_64-*-linux*): Likewise.
15415 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15416 (init_registers_amd64_linux): New.
15417 (x86_arch_setup): Replace init_registers_x86_64_linux with
15418 init_registers_amd64_linux.
15420 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15422 * configure.ac: Check for libdl. If it is not available link against
15423 static libthread_db.
15424 * configure: Regenerate.
15426 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15430 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15431 handing a read watchpoint.
15432 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15434 2010-02-12 Doug Evans <dje@google.com>
15436 * linux-low.c (linux_supports_tracefork_flag): Document.
15437 (linux_look_up_symbols): Add comment.
15439 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15441 * regcache.c (supply_register): Clear regcache if buf is NULL.
15443 2010-02-02 Nicolas Roche <roche@sourceware.org>
15444 Joel Brobecker <brobecker@adacore.com>
15446 * inferiors.c (find_inferior): Add function documentation.
15447 (unloaded_dll): Handle the case where the unloaded dll has not
15448 been previously registered in the dll list.
15450 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15452 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15453 (thumb2_breakpoint): New.
15454 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15456 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15458 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15459 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15462 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15464 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15466 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15468 * linux-s390-low.c (s390_collect_ptrace_register)
15469 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15471 2010-01-21 Doug Evans <dje@google.com>
15473 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15474 (PTRACE_ARG4_TYPE): New macro.
15475 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15476 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15477 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15478 (usr_store_inferior_registers): Ditto.
15479 (linux_read_memory, linux_write_memory): Ditto.
15480 (linux_test_for_tracefork): Ditto.
15482 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15483 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15485 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15487 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15490 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15492 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15493 prototype to take a regcache. Adjust.
15495 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15497 * regcache.h (struct thread_info): Forward declare.
15498 (struct regcache): New.
15499 (new_register_cache): Adjust prototype.
15500 (get_thread_regcache): Declare.
15501 (free_register_cache): Adjust prototype.
15502 (registers_to_string, registers_from_string): Ditto.
15503 (supply_register, supply_register_by_name, collect_register)
15504 (collect_register_as_string, collect_register_by_name): Ditto.
15505 * regcache.c (struct inferior_regcache_data): Delete.
15506 (get_regcache): Rename to ...
15507 (get_thread_regcache): ... this. Adjust. Switch inferior before
15508 fetching registers.
15509 (regcache_invalidate_one): Adjust.
15510 (regcache_invalidate): Fix prototype.
15511 (new_register_cache): Return the new register cache.
15512 (free_register_cache): Change prototype.
15513 (realloc_register_cache): Adjust.
15514 (registers_to_string): Change prototype to take a regcache. Adjust.
15515 (registers_from_string): Ditto.
15516 (register_data): Ditto.
15517 (supply_register): Ditto.
15518 (supply_register_by_name): Ditto.
15519 (collect_register): Ditto.
15520 (collect_register_as_string): Ditto.
15521 (collect_register_by_name): Ditto.
15522 * server.c (process_serial_event): Adjust.
15523 * linux-low.h (regset_fill_func, regset_store_func): Change
15525 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15527 * linux-low.c (get_stop_pc): Adjust.
15528 (check_removed_breakpoint): Adjust.
15529 (linux_wait_for_event): Adjust.
15530 (linux_resume_one_lwp): Adjust.
15531 (fetch_register): Add regcache parameter. Adjust.
15532 (usr_store_inferior_registers): Ditto.
15533 (regsets_fetch_inferior_registers): Ditto.
15534 (regsets_store_inferior_registers): Ditto.
15535 (linux_fetch_registers, linux_store_registers): Ditto.
15536 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15538 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15540 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15541 prototype to take a regcache.
15542 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15543 * remote-utils.c (convert_ascii_to_int, outreg)
15544 (prepare_resume_reply): Change prototype to take a regcache.
15546 * target.h (struct target_ops) <fetch_registers, store_registers>:
15547 Change prototype to take a regcache.
15548 (fetch_inferior_registers, store_inferior_registers): Change
15549 prototype to take a regcache. Adjust.
15550 * proc-service.c (ps_lgetregs): Adjust.
15551 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15552 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15553 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15554 take a regcache. Adjust.
15555 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15556 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15557 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15558 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15559 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15560 (cris_cannot_fetch_register):
15561 (cris_breakpoint_at): Change prototype to take a regcache.
15563 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15564 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15565 to take a regcache. Adjust.
15566 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15568 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15569 take a regcache. Adjust.
15570 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15571 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15572 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15573 * linux-mips-low.c (mips_get_pc):
15574 (mips_set_pc): Change prototype to take a regcache. Adjust.
15575 (mips_reinsert_addr): Adjust.
15576 (mips_collect_register): Change prototype to take a regcache.
15578 (mips_supply_register):
15579 (mips_collect_register_32bit, mips_supply_register_32bit)
15580 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15581 (mips_store_fpregset): Ditto.
15582 * linux-ppc-low.c (ppc_supply_ptrace_register)
15583 (ppc_supply_ptrace_register): Ditto.
15584 (parse_spufs_run): Adjust.
15585 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15586 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15587 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15588 take a regcache. Adjust.
15589 * linux-s390-low.c (s390_collect_ptrace_register)
15590 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15591 (s390_set_pc): Change prototype to take a regcache. Adjust.
15592 (s390_arch_setup): Adjust.
15593 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15594 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15595 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15596 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15597 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15599 (sparc_breakpoint_at): Adjust.
15600 * linux-xtensa-low.c (xtensa_fill_gregset):
15601 (xtensa_store_gregset):
15602 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15603 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15604 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15605 prototype to take a regcache. Adjust.
15606 * win32-arm-low.c (arm_fetch_inferior_register)
15607 (arm_store_inferior_register): Change prototype to take a
15609 * win32-i386-low.c (i386_fetch_inferior_register)
15610 (i386_store_inferior_register): Change prototype to take a
15612 * win32-low.c (child_fetch_inferior_registers)
15613 (child_store_inferior_registers): Change prototype to take a
15615 (win32_wait): Adjust.
15616 (win32_fetch_inferior_registers): Change prototype to take a
15618 (win32_store_inferior_registers): Adjust.
15619 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15620 store_inferior_register>: Change prototype to take a regcache.
15622 2010-01-20 Doug Evans <dje@google.com>
15624 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15626 (linux_wait_for_event1, linux_init_signals): Ditto.
15627 (W_STOPCODE): Provide definition if missing.
15629 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15631 * linux-low.c (linux_core_of_thread): New.
15632 (compare_ints, show_process, list_threads): New.
15633 (linux_qxfer_osdata): Report threads and cores.
15634 (linux_target_op): Register linux_core_of_thread.
15635 * remote-utils.c (prepare_resume_reply): Report the core.
15636 (buffer_xml_printf): Support %d specifier.
15637 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15639 (handle_query): Handle qXfer:threads. Announce availability
15641 * target.h (struct target_ops): New field core_of_thread.
15643 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15645 * Makefile.in (clean): Remove new generated files.
15646 (reg-s390.o, reg-s390.c): Remove rules.
15647 (reg-s390x.o, reg-s390x.c): Likewise.
15648 (s390-linux32.o, s390-linux32.c): Add rules.
15649 (s390-linux64.o, s390-linux64.c): Likewise.
15650 (s390x-linux64.o, s390x-linux64.c): Likewise.
15651 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15652 * linux-s390-low.c: Include <elf.h>.
15653 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15654 (init_registers_s390): Remove prototype.
15655 (init_registers_s390x): Likewise.
15656 (init_registers_s390_linux32): Add prototype.
15657 (init_registers_s390_linux64): Likewise.
15658 (init_registers_s390x_linux64): Likewise.
15659 (s390_num_regs_3264): New define.
15660 (s390_regmap_3264): New global variable.
15661 (s390_cannot_fetch_register): Remove obsolete check.
15662 (s390_cannot_store_register): Likewise.
15663 (s390_collect_ptrace_register): Handle upper/lower register halves.
15664 (s390_supply_ptrace_register): Likewise.
15665 (s390_fill_gregset): Update to register number changes.
15666 (s390_get_hwcap): New routine.
15667 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15668 Install appropriate regmap and register set.
15670 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15672 * server.c (gdbserver_version): Update copyright year to 2010.
15673 * gdbreplay.c (gdbreplay_version): Likewise.
15675 2009-12-28 Doug Evans <dje@google.com>
15677 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15678 elf/external.h. Include <elf.h> instead but only if necessary.
15680 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15682 * linux-low.c (linux_remove_process): Remove `detaching'
15683 parameter. Don't release/detach from thread_db here.
15684 (linux_kill): Release/detach from thread_db here, ...
15685 (linux_detach): ... and here, before actually detaching.
15686 (linux_wait_1): ... and here, when a process exits.
15687 * thread-db.c (any_thread_of): New.
15688 (thread_db_free): Switch the current inferior to a thread of the
15691 2009-12-21 Doug Evans <dje@google.com>
15693 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15695 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15696 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15697 warning ifndef __NR_tkill. Move setting of errno there too.
15698 Delete unnecessary resetting of errno after syscall.
15699 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15701 * configure.ac: Check for dladdr.
15702 * config.in: Regenerate.
15703 * configure: Regenerate.
15704 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15705 (try_thread_db_load): Update.
15707 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15709 2009-12-18 Doug Evans <dje@google.com>
15711 * event-loop.c: Include unistd.h if it exists.
15713 * linux-low.c (my_waitpid): Move definition away from being in
15714 between linux_tracefork_child/linux_test_for_tracefork.
15716 * gdb_proc_service.h (psaddr_t): Fix type.
15717 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15718 signature to match glibc.
15720 2009-12-16 Doug Evans <dje@google.com>
15722 * linux-low.c (linux_read_memory): Fix argument to read.
15724 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15726 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15727 events, don't leave current_inferior pointing at null.
15729 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15731 * win32-low.c (LOG): Delete.
15732 (OUTMSG): Output to stderr.
15733 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15734 on compile time LOG macro.
15735 (win32_wait): Fix debug output.
15737 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15739 * win32-low.c (win32_add_one_solib): If the dll name is
15740 "ntdll.dll", prepend the system directory to the dll path.
15742 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15744 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15746 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15747 Vladimir Prus <vladimir@codesourcery.com>
15749 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15750 * configure.ac: Check for __mcoldfire__ and set
15751 gdb_cv_m68k_is_coldfire.
15752 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15753 reg-cf.o and reg-m68k.o.
15754 * configure: Regenerated.
15756 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15758 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15759 Pass it to thread_db_free.
15760 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15761 proper `detaching' argument to linux_remove_process.
15762 * linux-low.h (thread_db_free): Add `detaching' parameter.
15763 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15765 (thread_db_free): Add `detaching' parameter. Only
15766 call td_ta_clear_event if detaching from process.
15768 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15770 * thread-db.c (thread_db_free): Fix typo.
15772 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15775 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15777 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15779 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15780 with an i686 compiler.
15781 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15783 * configure: Rebuilt.
15785 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15789 * server.c (handle_search_memory_1): Correct read_addr initialization
15790 in loop for searching subsequent chunks.
15792 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15794 * configure.ac: New --with-libthread-db option.
15795 * thread-db.c: Allow direct dependence on libthread_db.
15796 (thread_db_free): Adjust.
15797 * config.in: Regenerate.
15798 * configure: Likewise.
15800 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15803 * thread-db.c (attach_thread): New function.
15804 (maybe_attach_thread): Return success/failure.
15805 (find_new_threads_callback): Adjust.
15806 (thread_db_find_new_threads): Loop until no new threads.
15808 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15810 * proc-service.c (ps_lgetregs): Formatting.
15812 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15814 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15815 * configure.ac: Adjust.
15816 * linux-low.h (struct process_info_private): Move members to struct
15818 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15819 * linux-low.c (linux_remove_process): Adjust.
15820 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15821 * server.c (handle_query): Move code ...
15822 (handle_monitor_command): ... here. New function.
15823 * target.h (struct target_ops): New member.
15824 * thread-db.c (struct thread_db): New.
15825 (libthread_db_search_path): New variable.
15826 (thread_db_create_event, thread_db_enable_reporting)
15827 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15828 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15829 (try_thread_db_load_1, dladdr_to_soname): New functions.
15830 (try_thread_db_load, thread_db_load_search): New functions.
15831 (thread_db_init): Search for libthread_db.
15832 (thread_db_free): New function.
15833 (thread_db_handle_monitor_command): Likewise.
15834 * config.in: Regenerate.
15835 * configure: Regenerate.
15837 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15839 * spu-low.c (spu_kill): Wait for inferior to terminate.
15840 Call clear_inferiors.
15841 (spu_detach): Call clear_inferiors.
15843 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15845 * aclocal.m4: Regenerate.
15846 * config.in: Likewise.
15847 * configure: Likewise.
15849 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15851 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15852 (parse_spufs_run): New function.
15853 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15854 (ppc_breakpoint_at): Handle SPU breakpoints.
15856 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15858 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15859 (SPUFS_MAGIC): Define.
15860 (spu_enumerate_spu_ids): New function.
15861 (linux_qxfer_spu): New function.
15862 (linux_target_ops): Install linux_qxfer_spu.
15864 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15866 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15867 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15868 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15869 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15870 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15871 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15872 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15873 (init_registers_powerpc_cell32l): Add prototype.
15874 (init_registers_powerpc_cell64l): Likewise.
15875 (ppc_arch_setup): Detect Cell/B.E. architecture.
15877 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15879 * Makefile.in (datarootdir): New variable.
15881 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15883 * linux-low.c (linux_write_memory): Update debugging output.
15884 * Makefile.in (clean): Add new descriptions.
15885 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15886 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15887 * configure.srv: Add new files for arm*-*-linux*.
15888 * linux-arm-low.c: Add new declarations.
15889 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15890 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15891 (HWCAP_VFPv3D16): New.
15892 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15893 instead of __IWMMXT__.
15894 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15895 (arm_arch_setup): New.
15896 (target_regsets): Remove #ifdef. Add VFP regset.
15897 (the_low_target): Use arm_arch_setup.
15899 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15901 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15902 the main thread again.
15904 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15906 Adding Neutrino gdbserver.
15907 * configure: Regenerated.
15908 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15909 * configure.srv (i[34567]86-*-nto*): New target.
15910 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15911 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15912 (nto_comctrl) [__QNX__]: New function.
15913 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15915 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15917 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15920 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15921 Pedro Alves <pedro@codesourcery.com>
15923 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15924 don't support CONTEXT_EXTENDED_REGISTERS.
15925 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15926 (the_low_target): Install them.
15927 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15928 failing with ERROR_PIPE_NOT_CONNECTED.
15930 2009-06-30 Doug Evans <dje@google.com>
15931 Pierre Muller <muller@ics.u-strasbg.fr>
15933 Add h/w watchpoint support to x86-linux, win32-i386.
15934 * Makefile.in (SFILES): Add i386-low.c
15935 (i386_low_h): Define.
15936 (i386-low.o): Add dependencies.
15937 (linux-x86-low.o): Add i386-low.h dependency.
15938 (win32-i386-low.o): Ditto.
15939 * i386-low.c: New file.
15940 * i386-low.h: New file.
15941 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15942 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15943 * linux-low.c (linux_add_process): Initialize arch_private.
15944 (linux_remove_process): Free arch_private.
15945 (add_lwp): Initialize arch_private.
15946 (delete_lwp): Free arch_private.
15947 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15949 * linux-low.h (process_info_private): New member arch_private.
15950 (lwp_info): New member arch_private.
15951 (linux_target_ops): New members new_process, new_thread,
15953 (ptid_of): New macro.
15954 * linux-x86-low.c: Include stddef.h, i386-low.h.
15955 (arch_process_info): New struct.
15956 (arch_lwp_info): New struct.
15957 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15958 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15959 (i386_dr_low_get_status): New function.
15960 (x86_insert_point, x86_remove_point): New functions.
15961 (x86_stopped_by_watchpoint): New function.
15962 (x86_stopped_data_address): New function.
15963 (x86_linux_new_process, x86_linux_new_thread): New functions.
15964 (x86_linux_prepare_to_resume): New function.
15965 (the_low_target): Add entries for insert_point, remove_point,
15966 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15968 * server.c (debug_hw_points): New global.
15969 (monitor_show_help): Document set debug-hw-points.
15970 (handle_query): Process "set debug-hw-points".
15971 * server.h (debug_hw_points): Declare.
15972 (paddress): Declare.
15973 * utils.c (NUMCELLS, CELLSIZE): New macros.
15974 (get_sell, xsnprintf, paddress): New functions.
15975 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15976 remove_point, stopped_by_watchpoint, stopped_data_address.
15977 * win32-i386-low.c: Include i386-low.h.
15978 (debug_reg_state): Replaces dr.
15979 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15980 (i386_dr_low_get_status): New function.
15981 (i386_insert_point, i386_remove_point): New functions.
15982 (i386_stopped_by_watchpoint): New function.
15983 (i386_stopped_data_address): New function.
15984 (i386_initial_stuff): Update.
15985 (get_thread_context,set_thread_context,i386_thread_added): Update.
15986 (the_low_target): Add entries for insert_point,
15987 remove_point, stopped_by_watchpoint, stopped_data_address.
15988 * win32-low.c (win32_insert_watchpoint): New function.
15989 (win32_remove_watchpoint): New function.
15990 (win32_stopped_by_watchpoint): New function.
15991 (win32_stopped_data_address): New function.
15992 (win32_target_ops): Add entries for insert_watchpoint,
15993 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15994 * win32-low.h (win32_target_ops): New members insert_point,
15995 remove_point, stopped_by_watchpoint, stopped_data_address.
15997 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15999 * server.c (process_serial_event): Re-return unsupported, not
16000 error, if the type isn't recognized. Re-allow supporting only
16001 insert or remove packets. Also call require_running for
16002 breakpoints. Add missing break statement to default case. Tidy.
16003 * target.h (struct target_ops): Rename insert_watchpoint to
16004 insert_point, and remove_watchpoint to remove_point.
16006 * linux-low.h (struct linux_target_ops): Likewise.
16007 * linux-low.c (linux_insert_watchpoint): Rename to ...
16008 (linux_insert_point): ... this. Adjust.
16009 (linux_remove_watchpoint): Rename to ...
16010 (linux_remove_point): ... this. Adjust.
16011 (linux_target_ops): Adjust.
16012 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16013 (cris_insert_point): ... this.
16014 (cris_remove_watchpoint): Rename to ...
16015 (cris_remove_point): ... this.
16016 (the_low_target): Adjust.
16018 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16020 * server.c (handle_v_kill): Pass signal_pid to
16021 kill_inferior if multi_process is zero.
16023 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16025 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16026 * target.h (target_ops): Comment for *_watchpoint to make it clear
16027 the functions can get types '0' and '1'.
16029 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16031 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16032 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16033 * regcache.c (get_regcache): Likewise.
16034 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16035 * win32-low.c (child_fetch_inferior_registers): Remove check for
16038 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16039 Pedro Alves <pedro@codesourcery.com>
16041 * target.h (struct target_ops) <supports_multi_process>: New
16043 (target_supports_multi_process): New.
16044 * server.c (handle_query): Even if GDB reports support, only
16045 enable multi-process if the target also supports it. Report
16046 multi-process support only if the target backend supports it.
16047 * linux-low.c (linux_supports_multi_process): New function.
16048 (linux_target_ops): Install it as target_supports_multi_process
16051 2009-05-24 Doug Evans <dje@google.com>
16053 Global renaming of find_thread_pid to find_thread_ptid.
16054 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16055 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16056 All callers updated.
16058 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16059 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16062 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16063 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16064 (linux_resume_one_lwp): Ditto.
16066 2009-05-23 Doug Evans <dje@google.com>
16068 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16069 from struct inferior_list_entry * to struct lwp_info *.
16070 All callers updated.
16072 2009-05-13 Doug Evans <dje@google.com>
16074 * linux-x86-low.c: Don't include assert.h.
16075 (x86_siginfo_fixup): Use fatal, not assert.
16076 (x86_arch_setup): Fix comment.
16078 2009-05-12 Doug Evans <dje@google.com>
16080 Biarch support for i386/amd64 gdbserver.
16081 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16082 Add linux-x86-low.c.
16083 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16084 (linux-x86-low.o): Add.
16085 * linux-x86-64-low.c: Delete.
16086 * linux-i386-low.c: Delete.
16087 * linux-x86-low.c: New file.
16088 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16090 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16092 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16093 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16094 (linux_child_pid_to_exec_file): New function.
16095 (elf_64_header_p, elf_64_file_p): New functions.
16096 (siginfo_fixup): New function.
16097 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16098 give target a chance to convert layout.
16099 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16100 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16102 2009-05-07 Doug Evans <dje@google.com>
16104 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16105 (regsets_store_inferior_registers): Ditto.
16107 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16111 * linux-low.c (must_set_ptrace_flags): Delete.
16112 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16114 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16115 `lwp->must_set_ptrace_flags' instead.
16116 (linux_wait_for_event_1): Set ptrace options here.
16117 (linux_wait_1): ... not here.
16119 2009-04-30 Doug Evans <dje@google.com>
16121 * inferiors.c (started_inferior_callback): New function.
16122 (attached_inferior_callback): New function.
16123 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16124 * server.c (print_started_pid, print_attached_pid): New functions.
16125 (detach_or_kill_for_exit): New function.
16126 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16127 * server.h (have_started_inferiors_p): Declare.
16128 (have_attached_inferiors_p): Declare.
16130 * inferiors.c (remove_process): Fix memory leak, free process.
16131 * linux-low.c (linux_remove_process): New function.
16132 (linux_kill): Call it instead of remove_process.
16133 (linux_detach, linux_wait_1): Ditto.
16135 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16137 * configure.srv: Add x86 Windows CE target.
16139 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16141 * inferiors.c (get_thread_process): Make global.
16142 * server.h (get_thread_process): Add prototype.
16143 * thread-db.c (find_one_thread): Use get_thread_process
16144 instead of current_process.
16145 (thread_db_get_tls_address): Do not crash if called when
16146 thread layer is not yet initialized.
16148 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16150 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16151 * spu-low.c (current_tid): Rename to ...
16152 (current_ptid): ... this.
16153 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16154 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16155 ptid_get_lwp (current_ptid) instead of current_tid.
16156 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16157 instead of current_tid. Use find_process_pid to verify pid
16158 argument is valid. Pass proper argument to remove_process.
16159 (spu_thread_alive): Compare current_ptid instead of current_tid.
16160 (spu_resume): Likewise.
16162 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16164 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16167 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16169 Implement the multiprocess extensions, and add linux multiprocess
16172 * server.h (ULONGEST): Declare.
16173 (struct ptid, ptid_t): New.
16174 (minus_one_ptid, null_ptid): Declare.
16175 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16176 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16177 (struct inferior_list_entry): Change `id' type from unsigned from
16179 (struct sym_cache, struct breakpoint, struct
16180 process_info_private): Forward declare.
16181 (struct process_info): Declare.
16182 (current_process): Declare.
16183 (all_processes): Declare.
16184 (initialize_inferiors): Declare.
16185 (add_thread): Adjust to use ptid_t.
16186 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16187 (add_process, remove_process, find_thread_pid): Declare.
16188 (find_inferior_id): Adjust to use ptid_t.
16189 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16190 (multi_process): Declare.
16191 (push_event): Adjust to use ptid_t.
16192 (read_ptid, write_ptid): Declare.
16193 (prepare_resume_reply): Adjust to use ptid_t.
16194 (clear_symbol_cache): Declare.
16195 * inferiors.c (all_processes): New.
16196 (null_ptid, minus_one_ptid): New.
16197 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16198 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16199 (add_thread): Change unsigned long to ptid. Remove gdb_id
16201 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16202 (gdb_id_to_thread): Rename to ...
16203 (find_thread_pid): ... this. Change unsigned long to ptid.
16204 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16205 (loaded_dll, pull_pid_from_list): Adjust.
16206 (add_process, remove_process, find_process_pid)
16207 (get_thread_process, current_process, initialize_inferiors): New.
16208 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16209 (struct target_waitstatus) <related_pid>: Ditto.
16210 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16211 return type to int.
16212 (struct target_ops) <join>: Add `pid' argument.
16213 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16214 (struct target_ops) <wait>: Add `ptid' field. Change return type
16216 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16217 (mywait): Add `ptid' argument. Change return type to ptid_t.
16218 (target_pid_to_str): Declare.
16219 * target.c (set_desired_inferior): Adjust to use ptids.
16220 (mywait): Add new `ptid' argument. Adjust.
16221 (target_pid_to_str): New.
16222 * mem-break.h (free_all_breakpoints): Declare.
16223 * mem-break.c (breakpoints): Delelete.
16224 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16225 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16226 to use per-process breakpoint list.
16227 (free_all_breakpoints): New.
16228 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16229 (symbol_cache, all_symbols_looked_up): Delete.
16231 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16233 (prepare_resume_reply): Change ptid argument's type from unsigned
16234 long to ptid_t. Adjust. Implement W;process and X;process.
16235 (free_sym_cache, clear_symbol_cache): New.
16236 (look_up_one_symbol): Adjust to per-process symbol cache. *
16237 * server.c (cont_thread, general_thread, step_thread): Change type
16239 (attached): Delete.
16240 (multi_process): New.
16241 (last_ptid): Change type to ptid_t.
16242 (struct vstop_notif) <ptid>: Change type to ptid_t.
16243 (queue_stop_reply, push_event): Change `ptid' argument's type to
16245 (discard_queued_stop_replies): Add `pid' argument.
16246 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16247 changes. Don't reference the `attached' global.
16248 (attach_inferior): Adjust to mywait interface changes.
16249 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16250 features. Handle and report "multiprocess+". Handle
16252 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16254 (handle_v_kill): New.
16255 (handle_v_stopped): Adjust to use target_pid_to_str.
16256 (handle_v_requests): Allow multiple attaches and runs when
16257 multiprocess extensions are in effect. Handle "vKill".
16258 (myresume): Adjust to use ptids.
16259 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16260 (handle_status): Adjust to discard_queued_stop_replies interface
16262 (first_thread_of, kill_inferior_callback)
16263 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16264 (main): Call initialize_inferiors. Adjust to use ptids, killing
16265 and detaching from all inferiors. Handle multiprocess packet
16267 * linux-low.h: Include gdb_proc_service.h.
16268 (struct process_info_private): New.
16269 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16270 <lwpid_of>: Use ptid_get_lwp.
16271 (get_lwp_thread): Adjust.
16272 (struct lwp_info): Add `dead' member.
16273 (find_lwp_pid): Declare.
16274 * linux-low.c (thread_db_active): Delete.
16275 (new_inferior): Adjust comment.
16276 (inferior_pid): Delete.
16277 (linux_add_process): New.
16278 (handle_extended_wait): Adjust.
16279 (add_lwp): Change unsigned long to ptid.
16280 (linux_create_inferior): Add process to processes table. Adjust
16281 to use ptids. Don't set new_inferior here.
16282 (linux_attach_lwp): Rename to ...
16283 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16284 it. Adjust to use ptids.
16285 (linux_attach_lwp): New.
16286 (linux_attach): Add process to processes table. Don't set
16288 (struct counter): New.
16289 (second_thread_of_pid_p, last_thread_of_process_p): New.
16290 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16291 multiple processes.
16292 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16293 processes. Remove process from process table.
16294 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16295 to multiple processes.
16296 (any_thread_of): New.
16297 (linux_detach): Add `pid' argument, and handle it. Remove process
16298 from processes table.
16299 (linux_join): Add `pid' argument. Handle it.
16300 (linux_thread_alive): Change unsighed long argument to ptid_t.
16301 Consider dead lwps as not being alive.
16302 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16303 threads we're not interested in.
16304 (same_lwp, find_lwp_pid): New.
16305 (linux_wait_for_lwp): Change `pid' argument's type from int to
16307 (linux_wait_for_event): Rename to ...
16308 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16309 from int to ptid_t. Adjust.
16310 (linux_wait_for_event): New.
16311 (linux_wait_1): Add `ptid' argument. Change return type to
16312 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16313 that exit from the process table.
16314 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16316 (mark_lwp_dead): New.
16317 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16318 stopping all threads, mark its main lwp as dead.
16319 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16321 (fetch_register, usr_store_inferior_registers)
16322 (regsets_fetch_inferior_registers)
16323 (regsets_store_inferior_registers, linux_read_memory)
16324 (linux_write_memory): Inline `inferior_pid'.
16325 (linux_look_up_symbols): Adjust to use per-process
16326 `thread_db_active'.
16327 (linux_request_interrupt): Adjust to use ptids.
16328 (linux_read_auxv): Inline `inferior_pid'.
16329 (initialize_low): Don't reference thread_db_active.
16330 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16331 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16332 (ps_getpid): Return the pid of the current inferior.
16333 * thread-db.c (proc_handle, thread_agent): Delete.
16334 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16336 (find_one_thread): Change argument type to ptid_t. Adjust to
16338 (maybe_attach_thread): Adjust to per-process data and ptids.
16339 (thread_db_find_new_threads): Ditto.
16340 (thread_db_init): Ditto.
16341 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16342 processes table. Adjust to use ptids.
16343 (spu_kill, spu_detach): Adjust interface. Remove process from
16345 (spu_join, spu_thread_alive): Adjust interface.
16346 (spu_wait): Adjust interface. Remove process from processes
16347 table. Adjust to use ptids.
16348 * win32-low.c (current_inferior_tid): Delete.
16349 (current_inferior_ptid): New.
16350 (debug_event_ptid): New.
16351 (thread_rec): Take a ptid. Adjust.
16352 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16353 (child_delete_thread): Ditto.
16354 (do_initial_child_stuff): Add `attached' argument. Add process to
16356 (child_fetch_inferior_registers, child_store_inferior_registers):
16358 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16359 (win32_attach): Pass 1 to do_initial_child_stuff.
16360 (win32_kill): Adjust interface. Remove process from processes
16362 (win32_detach): Ditto.
16363 (win32_join): Adjust interface.
16364 (win32_thread_alive): Take a ptid.
16365 (win32_resume): Adjust to use ptids.
16366 (get_child_debug_event): Ditto.
16367 (win32_wait): Adjust interface. Remove exiting process from
16370 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16372 Non-stop mode support.
16374 * server.h (non_stop): Declare.
16375 (gdb_client_data, handler_func): Declare.
16376 (delete_file_handler, add_file_handler, start_event_loop):
16378 (handle_serial_event, handle_target_event, push_event)
16379 (putpkt_notif): Declare.
16380 * target.h (enum resume_kind): New.
16381 (struct thread_resume): Replace `step' field by `kind' field.
16382 (TARGET_WNOHANG): Define.
16383 (struct target_ops) <wait>: Add `options' argument.
16384 <supports_non_stop, async, start_non_stop>: New fields.
16385 (target_supports_non_stop, target_async): New.
16386 (start_non_stop): Declare.
16387 (mywait): Add `options' argument.
16388 * target.c (mywait): Add `options' argument. Print child exit
16389 notifications here.
16390 (start_non_stop): New.
16391 * server.c (non_stop, own_buf, mem_buf): New globals.
16392 (struct vstop_notif): New.
16393 (notif_queue): New global.
16394 (queue_stop_reply, push_event, discard_queued_stop_replies)
16395 (send_next_stop_reply): New.
16396 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16398 (attach_inferior): In non-stop mode, don't wait for the target
16400 (handle_general_set): Handle QNonStop.
16401 (handle_query): When handling qC, return the current general
16402 thread, instead of the first thread of the list.
16403 (handle_query): If the backend supports non-stop mode, include
16404 QNonStop+ in the qSupported query response.
16405 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16407 (handle_v_attach, handle_v_run): Handle non-stop mode.
16408 (handle_v_stopped): New.
16409 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16410 (myresume): Adjust to use resume_kind. Handle non-stop.
16411 (queue_stop_reply_callback): New.
16412 (handle_status): Handle non-stop mode.
16413 (main): Clear non_stop flag on reconnection. Use the event-loop.
16414 Refactor serial protocol handling from here ...
16415 (process_serial_event): ... to this new function. When GDB
16416 selects any thread, select one here. In non-stop mode, wait until
16417 GDB acks all pending events before exiting.
16418 (handle_serial_event, handle_target_event): New.
16419 * remote-utils.c (remote_open): Install remote_desc in the event
16421 (remote_close): Remove remote_desc from the event loop.
16422 (putpkt_binary): Rename to...
16423 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16424 (putpkt_binary): New as wrapper around putpkt_binary_1.
16425 (putpkt_notif): New.
16426 (prepare_resume_reply): In non-stop mode, don't change the
16428 * event-loop.c: New.
16429 * Makefile.in (OBJ): Add event-loop.o.
16430 (event-loop.o): New rule.
16432 * linux-low.h (pid_of): Moved here.
16434 (get_lwp_thread): Use lwpid_of.
16435 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16436 * linux-low.c (pid_of): Delete.
16437 (inferior_pid): Use lwpid_of.
16438 (linux_event_pipe): New.
16439 (target_is_async_p): New.
16441 (handle_extended_wait): Use lwpid_of.
16442 (add_lwp): Don't set lwpid field.
16443 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16444 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16445 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16446 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16447 first. Adjust to linux_wait_for_event interface changes. Use
16449 (linux_detach): Don't delete the main lwp here.
16450 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16451 (status_pending_p): Don't consider explicitly suspended lwps.
16452 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16453 pointer. Add OPTIONS argument. Change return type to int. Use
16454 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16455 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16456 pointer. Add status pointer argument. Return a pid instead of a
16457 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16458 changes. In non-stop mode, don't switch to a random thread.
16459 (linux_wait): Rename to...
16460 (linux_wait_1): ... this. Add target_options argument, and handle
16461 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16462 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16463 clean exit and signal exit code. Don't stop all threads in
16464 non-stop mode. In all-stop mode, only stop all threads when
16465 reporting a stop to GDB. Handle explicit thread stop requests.
16466 (async_file_flush, async_file_mark): New.
16468 (send_sigstop): Use lwpid_of.
16469 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16470 interface changes. In non-stop mode, don't switch to a random
16472 (linux_resume_one_lwp): Use lwpid_of.
16473 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16474 (linux_resume_one_thread): ... this. Handle resume_stop. In
16475 non-stop mode, don't look for pending flag in all threads.
16476 (resume_status_pending_p): Don't consider explicitly suspended
16478 (my_waitpid): Reimplement. Emulate __WALL.
16479 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16481 (sigchld_handler, linux_supports_non_stop, linux_async)
16482 (linux_start_non_stop): New.
16483 (linux_target_ops): Register linux_supports_non_stop, linux_async
16484 and linux_start_non_stop.
16485 (initialize_low): Install SIGCHLD handler.
16486 * thread-db.c (thread_db_create_event, find_one_thread)
16487 (thread_db_get_tls_address): Use lwpid_of.
16488 * win32-low.c (win32_detach): Adjust to use resume_kind.
16489 (win32_wait): Add `options' argument.
16490 * spu-low.c (spu_resume): Adjust to use resume_kind.
16491 (spu_wait): Add `options' argument.
16493 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16495 Decouple target code from remote protocol.
16497 * target.h (enum target_waitkind): New.
16498 (struct target_waitstatus): New.
16499 (struct target_ops) <wait>: Return an unsigned long. Take a
16500 target_waitstatus pointer instead of a char pointer.
16501 (mywait): Likewise.
16502 * target.c (mywait): Change prototype to return an unsigned long.
16503 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16504 * server.h (thread_from_wait, old_thread_from_wait): Delete
16506 (prepare_resume_reply): Change prototype to take a
16508 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16509 (last_status, last_ptid): New.
16510 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16511 pid instead of a signal.
16512 (attach_inferior): Remove "status" and "signal" parameters.
16514 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16516 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16517 (handle_v_requests, myresume): Remove "status" and "signal"
16518 parameters. Adjust.
16519 (handle_status): New.
16520 (main): Delete local `status'. Adjust.
16521 * remote-utils.c: Include target.h.
16522 (prepare_resume_reply): Change prototype to take a
16523 target_waitstatus. Adjust.
16525 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16527 * spu-low.c (spu_wait): Adjust.
16528 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16530 (win32_wait): Adjust.
16532 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16534 * target.h (struct thread_resume): Delete leave_stopped member.
16535 (struct target_ops): Add a `n' argument to the `resume' callback.
16536 * server.c (start_inferior): Adjust.
16537 (handle_v_cont, myresume): Adjust.
16538 * linux-low.c (check_removed_breakpoint): Adjust to resume
16539 interface change, and to removed leave_stopped field.
16540 (resume_ptr): Delete.
16541 (struct thread_resume_array): New.
16542 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16543 resume interface change.
16544 (linux_continue_one_thread, linux_queue_one_thread)
16545 (resume_status_pending_p): Check if the resume field is NULL
16546 instead of checking the leave_stopped member.
16547 (linux_resume): Adjust to the target resume interface change.
16548 * spu-low.c (spu_resume): Adjust to the target resume interface
16550 * win32-low.c (win32_detach, win32_resume): Ditto.
16552 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16554 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16556 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16558 (linux_continue_one_thread): Only preserve the stepping flag if
16559 there's a pending breakpoint.
16561 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16563 * server.c (main): After the inferior having exited, call
16564 remote_close before exiting gdbserver.
16566 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16568 Fix size of FPSCR in Power 7 processors.
16569 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16570 (PPC_FEATURE_HAS_DFP): New #define.
16571 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16574 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16576 * server.c (handle_query) Whitespace and formatting.
16578 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16580 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16581 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16582 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16583 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16584 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16585 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16586 Makefile.in, configure.ac: Fix whitespace throughout.
16587 * configure: Regenerate.
16589 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16591 * inferiors.c (find_inferior): Make it safe for the callback
16592 function to delete the currently iterated inferior.
16594 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16596 * Makefile.in (linuw_low_h): Move higher.
16597 (thread-db.o): Depend on $(linux_low_h).
16599 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16601 Rename "process" to "lwp" throughout.
16603 * linux-low.c (all_processes): Rename to...
16604 (all_lwps): ... this.
16605 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16606 (add_process): Rename to ...
16607 (add_lwp): ... this. Adjust.
16608 (linux_create_inferior): Adjust.
16609 (linux_attach_lwp): Adjust.
16610 (linux_attach): Adjust.
16611 (linux_kill_one_process): Rename to ...
16612 (linux_kill_one_lwp): ... this. Adjust.
16613 (linux_kill): Adjust.
16614 (linux_detach_one_process): Rename to ...
16615 (linux_detach_one_lwp): ... this. Adjust.
16616 (linux_detach): Adjust.
16617 (check_removed_breakpoint): Adjust.
16618 (status_pending_p): Adjust.
16619 (linux_wait_for_process): Rename to ...
16620 (linux_wait_for_lwp): ... this. Adjust.
16621 (linux_wait_for_event): Adjust.
16622 (send_sigstop): Adjust.
16623 (wait_for_sigstop): Adjust.
16624 (stop_all_processes): Rename to ...
16625 (stop_all_lwps): ... this.
16626 (linux_resume_one_process): Rename to ...
16627 (linux_resume_one_lwp): ... this. Adjust.
16628 (linux_set_resume_request, linux_continue_one_thread)
16629 (linux_queue_one_thread, resume_status_pending_p)
16630 (usr_store_inferior_registers, regsets_store_inferior_registers)
16631 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16633 * linux-low.h (get_process): Rename to ...
16634 (get_lwp): ... this. Adjust.
16635 (get_thread_process): Rename to ...
16636 (get_thread_lwp): ... this. Adjust.
16637 (get_process_thread): Rename to ...
16638 (get_lwp_thread): ... this. Adjust.
16639 (struct process_info): Rename to ...
16640 (struct lwp_info): ... this.
16641 (all_processes): Rename to ...
16642 (all_lwps): ... this.
16643 * proc-service.c (ps_lgetregs): Adjust.
16644 * thread-db.c (thread_db_create_event, find_one_thread)
16645 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16647 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16649 * server.c (handle_query): Handle "qAttached".
16651 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16653 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16654 GPLv3, update license URL.
16656 2009-03-01 Doug Evans <dje@google.com>
16658 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16659 (server_h): Add gdb_signals.h.
16660 (signals.o): Update.
16661 * server.h (target_signal_from_host,target_signal_to_host_p)
16662 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16664 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16666 * remote-utils.c (getpkt): Also generate remote-debug
16667 information if noack_mode is set.
16669 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16671 * server.c (handle_query): Report qXfer:siginfo:read and
16672 qXfer:siginfo:write as supported and handle them.
16673 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16674 * linux-low.c (linux_xfer_siginfo): New.
16675 (linux_target_ops): Set it.
16677 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16679 * server.c (gdbserver_usage): Mention --remote-debug.
16680 (main): Accept '--remote-debug' switch.
16682 2009-01-18 Doug Evans <dje@google.com>
16684 * regcache.c (new_register_cache): No need to check result of xcalloc.
16685 * server.c (handle_search_memory): Back out calls to xmalloc,
16686 result is checked and error is returned to user upon failure.
16687 (handle_query): Ditto. Add more checks for result of malloc.
16688 (handle_v_cont): Check result of malloc, report error back to
16690 (handle_v_run): Ditto. Call freeargv.
16691 * server.h (freeargv): Declare.
16692 * utils.c (freeargv): New fn.
16694 2009-01-15 Doug Evans <dje@google.com>
16696 * gdbreplay.c (perror_with_name): Make arg const char *.
16697 * server.h (target_signal_to_name): Make return type const char *.
16698 * thread-db.c (thread_db_err_str): Make return type const char *.
16699 * utils.c (perror_with_name): Make arg const char *.
16701 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16703 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16704 when handling a EXIT_PROCESS_DEBUG_EVENT.
16706 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16708 * gdbreplay.c (gdbreplay_version): Update copyright year.
16709 * server.c (gdbserver_version): Likewise.
16711 2009-01-05 Doug Evans <dje@google.com>
16713 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16714 (handle_extended_wait): Improve comment.
16716 2008-12-13 Doug Evans <dje@google.com>
16718 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16719 * server.h (ATTR_MALLOC): New macro.
16720 (xmalloc,xcalloc,xstrdup): Declare.
16721 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16722 * inferiors.c: Ditto.
16723 * linux-low.c: Ditto.
16724 * mem-break.c: Ditto.
16725 * regcache.c: Ditto.
16726 * remote-utils.c: Ditto.
16729 * win32-low.c: Ditto.
16731 2008-12-12 Doug Evans <dje@google.com>
16733 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16734 in debugging printf.
16736 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16738 2008-12-09 Doug Evans <dje@google.com>
16740 * linux-low.h (struct process_info): Delete member tid, unused.
16741 * thread-db.c (find_one_thread): Update.
16742 (maybe_attach_thread): Update.
16744 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16746 * target.h (struct target_ops): Add qxfer_osdata member.
16747 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16749 (linux_qxfer_osdata): New functions.
16750 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16752 * server.c (handle_query): Handle "qXfer:osdata:read:".
16753 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16754 (buffer_xml_printf): New functions.
16755 * server.h (struct buffer): New.
16756 (buffer_grow_str, buffer_grow_str0): New macros.
16757 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16758 (buffer_xml_printf): Declare.
16760 2008-11-24 Doug Evans <dje@google.com>
16762 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16764 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16766 * server.c (handle_v_run): Always use the supplied argument list.
16768 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16770 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16771 (xtensa_regmap_table): Add entry for scompare1.
16773 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16775 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16776 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16777 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16778 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16779 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16780 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16781 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16782 XML target descriptions.
16783 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16784 when inferior is running on an ISA 2.05 or later processor. Add
16785 special case to return offset for full 64-bit slot of FPSCR when
16788 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16790 * Makefile.in (SFILES, clean): Added sparc64 files.
16791 (reg-sparc64.o, reg-sparc64.c): New.
16792 * configure.srv (sparc*-*-linux*): New configuration.
16793 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16794 syscall arguments for SPARC.
16795 (regsets_store_inferior_registers): Likewise.
16796 * linux-sparc-low.c: New file.
16798 2008-10-21 Doug Evans <dje@google.com>
16800 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16801 (READLINE_DIR,READLINE_DEP): Delete.
16802 (INTERNAL_CFLAGS): Update.
16803 (LINTFLAGS): Update.
16805 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16807 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16808 whole argv from the last run, not just argv[0].
16810 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16812 * regcache.c (new_register_cache): Return NULL if the register
16813 cache size isn't known yet.
16814 (free_register_cache): Avoid dereferencing a NULL regcache.
16816 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16818 * configure.srv: Merge MIPS and MIPS64.
16820 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16822 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16824 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16826 * Makefile.in: Add required vsx dependencies.
16828 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16829 Declare init_registers_powerpc_vsx32l.
16830 Declare init_registers_powerpc_vsx64l.
16831 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16832 (ppc_arch_setup): Check for VSX in hwcap.
16833 (ppc_fill_vsxregset): New function.
16834 (ppc_store_vsxregset): New function.
16835 Add new VSX entry in regset_info target_regsets.
16837 * configure.srv: Add new VSX dependencies.
16839 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16841 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16842 (remote_open): Set or clear transport_is_reliable.
16843 (putpkt_binary): Don't expect acks in noack mode.
16844 (getpkt): Don't send ack/nac in noack mode.
16845 * server.c (handle_general_set): Handle QStartNoAckMode.
16846 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16848 (main): Reset noack_mode on every connection.
16849 * server.h (noack_mode): Declare.
16851 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16853 * Makefile.in (GDBREPLAY_OBS): New variable.
16854 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16856 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16857 Daniel Jacobowitz <dan@codesourcery.com>
16859 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16860 (usr_store_inferior_registers): Likewise.
16861 (regsets_store_inferior_registers): Likewise.
16863 2008-07-31 Rolf Jansen <rj@surtec.com>
16864 Pedro Alves <pedro@codesourcery.com>
16866 * configure.ac: Check for memmem declaration.
16867 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16868 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16869 (disable_packet_qfThreadInfo): Unconditionally compile.
16870 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16871 * configure, config.in: Regenerate.
16873 2008-07-28 Doug Kwan <dougkwan@google.com>
16875 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16876 (linux_write_memory): Remove declaration of errno.
16878 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16880 * linux-low.c (handle_extended_wait): Do not use "status"
16881 variable uninitialized.
16883 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16885 * server.c (handle_v_attach): Inhibit reporting dll changes.
16887 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16889 * remote-utils.c (prepare_resume_reply): If requested, don't
16890 output "thread:TID" in the T stop reply.
16892 * server.c (disable_packet_vCont, disable_packet_Tthread)
16893 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16894 (handle_query): If requested, disable support for qC, qfThreadInfo
16896 (handle_v_requests): If requested, disable support for vCont.
16897 (gdbserver_show_disableable): New.
16898 (main): Handle --disable-packet and --disable-packet=LIST.
16900 * server.h (disable_packet_vCont, disable_packet_Tthread)
16901 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16903 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16905 * server.c (gdbserver_usage): Mention --version.
16907 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16909 * Makefile.in (gdbreplay.o): New rule.
16911 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16913 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16914 message, not gdbserver.
16916 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16917 Nathan Sidwell <nathan@codesourcery.com>
16918 Joseph Myers <joseph@codesourcery.com>
16920 * acinclude.m4: Include ../../config/acx.m4.
16921 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16922 * configure, config.in: Regenerate.
16923 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16924 * server.c (gdbserver_version): Print PKGVERSION.
16925 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16926 (main): Adjust gdbserver_usage calls.
16927 * gdbreplay.c (version, host_name): Add declarations.
16928 (gdbreplay_version, gdbreplay_usage): New.
16929 (main): Accept --version and --help options.
16931 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16933 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16934 (arm_breakpoint_at): Handle Thumb.
16935 (the_low_target): Add comment.
16937 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16939 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16941 2008-05-09 Doug Evans <dje@google.com>
16943 * server.h (decode_search_memory_packet): Declare.
16944 * remote-utils.c (decode_search_memory_packet): New fn.
16945 * server.c (handle_search_memory_1): New fn.
16946 (handle_search_memory): New fn.
16947 (handle_query): Process qSearch:memory packets.
16949 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16951 * regcache.c (registers_length): Remove.
16952 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16953 full register packet.
16954 * regcache.h (registers_length): Remove prototype.
16955 * server.h (PBUFSIZ): Define to 16384.
16957 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16959 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16960 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16961 powerpc-64l.o, and powerpc-altivec64l.o.
16962 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16963 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16964 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16965 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16966 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16969 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16970 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16971 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16972 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16973 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16974 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16975 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16976 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16977 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16978 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16981 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16982 (init_registers_powerpc_32l): ... this new prototype.
16983 (init_registers_powerpc_32): Remove, replace by ...
16984 (init_registers_powerpc_altivec32l): ... this new prototype.
16985 (init_registers_powerpc_e500): Remove, replace by ...
16986 (init_registers_powerpc_e500l): ... this new prototype.
16987 (init_registers_ppc64): Remove, replace by ...
16988 (init_registers_powerpc_64l): ... this new prototype.
16989 (init_registers_powerpc_64): Remove, replace by ...
16990 (init_registers_powerpc_altivec64l): ... this new prototype.
16991 (ppc_num_regs): Set to 73.
16992 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16993 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16994 (ppc_cannot_store_register): Handle orig_r3 and trap.
16995 (ppc_arch_setup): Update init_registers_... calls.
16996 (ppc_fill_gregset): Handle orig_r3 and trap.
16998 * inferiors.c (clear_inferiors): Reset current_inferior.
17000 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17002 * acinclude.m4: Add override.m4.
17003 * configure: Regenerate.
17005 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17007 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17008 initial call to init_register_ppc64.
17010 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17012 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17013 single powerpc*-*-linux* case.
17014 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17016 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17018 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17019 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17021 * linux-ppc-low.c: Include <elf.h>.
17022 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17023 (ppc_hwcap): New global variable.
17024 (ppc_regmap): Remove __SPE__ #ifdef sections.
17025 (ppc_regmap_e500): New global variable.
17026 (ppc_cannot_store_register): Update __SPE__ special case.
17027 (ppc_get_hwcap): New function.
17028 (ppc_arch_setup): Use it to determine whether inferior supports
17029 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17030 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17031 Do not access registers if target does not support AltiVec.
17032 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17033 Do not access registers if target does not support SPE.
17034 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17036 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17038 * linux-low.c (disabled_regsets, num_regsets): New.
17039 (use_regsets_p): Delete.
17040 (linux_wait_for_process): Clear disabled_regsets.
17041 (regsets_fetch_inferior_registers): Check and set it.
17042 (regsets_store_inferior_registers): Likewise.
17043 (linux_fetch_registers, linux_store_registers): Do not use
17045 (initialize_low): Allocate disabled_regsets.
17047 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17049 * Makefile.in (LIBOBJS): New.
17050 (OBS): Use LIBOBJS.
17051 (memmem.o): New rule.
17052 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17053 * configure: Regenerated.
17055 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17057 * server.c (handle_query): Never return "unsupported" for
17058 qXfer:features:read queries.
17060 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17062 * server.c (get_features_xml): Fix inverted condition.
17063 (handle_query): Always support qXfer:feature:read.
17065 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17067 * server.c (wrapper_argv): New.
17068 (start_inferior): Handle wrapper_argv. If set, expect an extra
17070 (gdbserver_usage): Document --wrapper.
17071 (main): Parse --wrapper.
17073 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17075 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17076 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17077 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17078 (ppc_set_pc): Likewise.
17079 (ppc_arch_setup): New function.
17080 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17081 of collect_register.
17082 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17084 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17086 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17087 instead of linux-ppc64-low.o.
17088 * linux-ppc64-low.c: Remove file.
17089 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17090 (linux-ppc64-low.o): Remove rule.
17092 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17093 (init_registers_powerpc_64): Likewise.
17094 (ppc_regmap): Conditionally define depending on __powerpc64__.
17095 (ppc_cannot_store_register): Do not special-case "fpscr" when
17096 compiled on __powerpc64__.
17097 (ppc_collect_ptrace_register): New function.
17098 (ppc_supply_ptrace_register): New function.
17099 (ppc_breakpoint): Change type to "unsigned int".
17100 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17101 (the_low_target): Conditionally provide initializers for the
17102 arch_setup member depending on __powerpc64__. Install
17103 collect_ptrace_register and supply_ptrace_register members.
17105 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17107 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17108 * server.c (gdbserver_xmltarget): Define.
17109 (get_features_xml): Use it to replace "target.xml" and arch_string.
17111 * configure.srv: Remove srv_xmltarget. Add XML files that were
17112 mentioned there to srv_xmlfiles instead. Remove conditional tests
17113 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17114 srv_xmlfiles and srv_regobj to include all possible choices.
17115 * configure.ac (srv_xmltarget): Remove.
17116 (srv_xmlfiles): Do not add "target.xml".
17117 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17118 checks for supplementary target information.
17119 * configure: Regenerate.
17120 * Makefile.in (XML_TARGET): Remove.
17121 (target.xml): Remove rule.
17122 (clean): Do not clean up target.xml.
17123 (.PRECIOUS): Do not mention target.xml.
17125 * target.h (struct target_ops): Remove arch_string member.
17126 * linux-low.c (linux_arch_string): Remove.
17127 (linux_target_ops): Remove arch_string initializer.
17128 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17129 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17130 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17131 * spu-low.c (spu_arch_string): Remove.
17132 (spu_target_ops): Remove arch_string initializer.
17133 * win32-low.c (win32_arch_string): Remove.
17134 (win32_target_ops): Remove arch_string initializer.
17135 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17136 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17137 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17139 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17141 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17142 by collect_ptrace_register and supply_ptrace_register hooks.
17143 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17144 instead of checking for the_low_target.left_pad_xfer.
17145 (usr_store_inferior_registers): Use collect_ptrace_register callback
17146 instead of checking for the_low_target.left_pad_xfer.
17148 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17149 (s390_supply_ptrace_register): Likewise.
17150 (s390_fill_gregset): Call s390_collect_ptrace_register.
17151 (the_low_target): Update.
17153 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17154 (ppc_supply_ptrace_register): Likewise.
17155 (the_low_target): Update.
17157 * linux-i386-low.c (the_low_target): Update.
17158 * linux-x86-64-low.c (the_low_target): Update.
17160 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17162 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17163 reg-s390.o and reg-s390x.o.
17165 * linux-low.c (new_inferior): New global variable.
17166 (linux_create_inferior, linux_attach): Set it.
17167 (linux_wait_for_process): Call the_low_target.arch_setup after the
17168 target has stopped for the first time.
17169 (initialize_low): Do not call the_low_target.arch_setup.
17171 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17172 (s390_set_pc): Likewise.
17173 (s390_arch_setup): New function.
17174 (the_low_target): Use s390_arch_setup as arch_setup routine.
17176 * regcache.c (realloc_register_cache): New function.
17177 (set_register_cache): Call it for each existing regcache.
17179 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17181 * server.h (init_registers): Remove prototype.
17183 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17184 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17185 instead of init_registers ().
17186 * linux-arm-low.c (init_registers_arm): Add prototype.
17187 (init_registers_arm_with_iwmmxt): Likewise.
17188 (the_low_target): Add initializer for arch_setup field.
17189 * linux-cris-low.c (init_registers_cris): Add prototype.
17190 (the_low_target): Add initializer for arch_setup field.
17191 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17192 (the_low_target): Add initializer for arch_setup field.
17193 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17194 (the_low_target): Add initializer for arch_setup field.
17195 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17196 (the_low_target): Add initializer for arch_setup field.
17197 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17198 (the_low_target): Add initializer for arch_setup field.
17199 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17200 (the_low_target): Add initializer for arch_setup field.
17201 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17202 (init_registers_mips64_linux): Likewise.
17203 (the_low_target): Add initializer for arch_setup field.
17204 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17205 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17206 (the_low_target): Add initializer for arch_setup field.
17207 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17208 (init_registers_powerpc_64): Likewise.
17209 (the_low_target): Add initializer for arch_setup field.
17210 * linux-s390-low.c (init_registers_s390): Add prototype.
17211 (init_registers_s390x): Likewise.
17212 (the_low_target): Add initializer for arch_setup field.
17213 * linux-sh-low.c (init_registers_sh): Add prototype.
17214 (the_low_target): Add initializer for arch_setup field.
17215 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17216 (the_low_target): Add initializer for arch_setup field.
17217 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17218 (the_low_target): Add initializer for arch_setup field.
17220 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17221 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17222 instead of init_registers ().
17223 * win32-arm-low.c (init_registers_arm): Add prototype.
17224 (the_low_target): Add initializer for arch_setup field.
17225 * win32-i386-low.c (init_registers_i386): Add prototype.
17226 (the_low_target): Add initializer for arch_setup field.
17228 * spu-low.c (init_registers_spu): Add prototype.
17229 (initialize_low): Call initialie_registers_spu () instead of
17230 initialize_registers ().
17232 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17234 * server.c (handle_v_requests): When handling the vRun and vAttach
17235 packets, if already debugging a process, don't kill it. Return an
17238 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17240 * server.c (handle_query): Correct length check.
17242 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17244 * win32-low.c (do_initial_child_stuff): Add process handle
17245 parameter. Set current_process_handle and current_process_id from the
17246 parameters. Clear globals.
17247 (win32_create_inferior): Don't set current_process_handle and
17248 current_process_id here. Instead pass them on the call to
17249 do_initial_child_stuff.
17250 (win32_attach): Likewise.
17251 (win32_clear_inferiors): New.
17252 (win32_kill): Don't close the current process handle or the
17253 current thread handle here. Instead call win32_clear_inferiors.
17254 (win32_detach): Don't open a new handle to the process. Call
17255 win32_clear_inferiors.
17256 (win32_join): Don't rely on current_process_handle; open a new
17257 handle using the process id.
17258 (win32_wait): Call win32_clear_inferiors when the inferior process
17261 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17263 * server.c (monitor_show_help): Add "exit".
17265 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17267 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17268 (clean): Add reg-xtensa.c.
17269 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17270 * configure.srv (xtensa*-*-linux*) New target.
17271 * linux-xtensa-low.c: New.
17272 * xtensa-xtregs.c: New.
17274 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17276 * hostio.c: Don't include errno.h.
17277 (errno_to_fileio_errno): Move to hostio-errno.
17278 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17279 error number outputting to the target->hostio_last_error callback.
17280 (hostio_packet_error): Use FILEIO_EINVAL directly.
17281 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17282 calls to hostio_error.
17283 * hostio-errno.c: New.
17284 * server.h (hostio_last_error_from_errno): Declare.
17285 * target.h (target_ops): Add hostio_last_error member.
17286 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17287 as hostio_last_error handler.
17288 * spu-low.c (spu_target_ops): Likewise.
17289 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17290 (wince_hostio_last_error): New functions.
17291 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17292 as hostio_last_error handler.
17293 (win32_target_ops) [!_WIN32_WCE]: Register
17294 hostio_last_error_from_errno as hostio_last_error handler.
17295 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17296 (hostio-errno.o): New rule.
17297 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17298 * configure.srv (srv_hostio_err_objs): New variable. Default to
17300 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17301 * configure: Regenerate.
17303 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17305 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17306 (linux_kill, linux_detach): Clean up the process list.
17307 * remote-utils.c (remote_open): Improve port number parsing.
17308 (putpkt_binary, input_interrupt): Only send interrupts if the target
17310 * server.c (extended_protocol): Make static.
17311 (attached): Define earlier.
17312 (exit_requested, response_needed, program_argv): New variables.
17313 (target_running): New.
17314 (start_inferior): Clear attached here.
17315 (attach_inferior): Set attached here.
17316 (require_running): Define.
17317 (handle_query): Use require_running and target_running. Implement
17319 (handle_v_attach, handle_v_run): New.
17320 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17321 (gdbserver_usage): Update.
17322 (main): Redo argument parsing. Handle --debug and --multi. Handle
17323 --attach along with other options or after the port. Save
17324 program_argv. Support no initial program. Resynchronize
17325 communication with GDB after an error. Handle "monitor exit".
17326 Use require_running and target_running. Always allow the extended
17327 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17328 restart in extended mode.
17329 * README: Refer to the GDB manual. Update --attach usage.
17331 2007-12-20 Andreas Schwab <schwab@suse.de>
17333 * linux-low.c (STACK_SIZE): Define.
17334 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17335 (linux_test_for_tracefork): Likewise.
17337 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17339 * linux-low.c (linux_wait_for_event): Update messages. Do not
17340 reinsert auto-delete breakpoints.
17341 * mem-break.c (struct breakpoint): Change return type of handler to
17343 (set_breakpoint_at): Update handler type.
17344 (reinsert_breakpoint_handler): Return 1 instead of calling
17346 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17348 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17349 * mem-break.h (set_breakpoint_at): Update handler type.
17350 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17351 * win32-low.c (auto_delete_breakpoint): New.
17352 (get_child_debug_event): Use it.
17354 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17356 * configure.ac: Check for pread and pwrite.
17357 * hostio.c (handle_pread): Fall back to lseek and read.
17358 (handle_pwrite): Fall back to lseek and write.
17359 * config.in, configure: Regenerated.
17361 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17363 * server.c (myresume): Add own_buf argument.
17364 (main): Update calls.
17366 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17368 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17369 * remote-utils.c (remote_open): Do not call disable_async_io.
17370 (block_async_io): Delete.
17371 (unblock_async_io): Make static.
17372 (initialize_async_io): New.
17373 * server.c (handle_v_cont): Handle async I/O here.
17374 (myresume): Likewise. Move other common resume tasks here...
17375 (main): ... from here. Call initialize_async_io. Disable async
17376 I/O before the main loop.
17377 * server.h (initialize_async_io): Declare.
17378 (block_async_io, unblock_async_io): Delete prototypes.
17379 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17381 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17383 * remote-utils.c (readchar): Allow binary data in received messages.
17385 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17387 * win32-low.c (attaching): New global.
17388 (win32_create_inferior): Clear the `attaching' global.
17389 (win32_attach): Set the `attaching' global.
17390 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17391 attaching. Only set a breakpoint at the entry point if not
17394 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17396 * server.c (main): Don't report dll events on the initial
17397 connection on attaches.
17399 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17401 * server.c (main): Relax numerical bases supported for the pid of
17402 the --attach command line argument.
17404 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17406 * win32-low.c (win32_attach): Call OpenProcess before
17407 DebugActiveProcess, not after. Add last error output to error
17410 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17412 * win32-low.c (win32_get_thread_context)
17413 (win32_set_thread_context): New functions.
17414 (thread_rec): Use win32_get_thread_context.
17415 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17416 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17419 2007-12-03 Leo Zayas
17420 Pedro Alves <pedro_alves@portugalmail.pt>
17422 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17424 (child_add_thread): Minor cleanup.
17425 (child_continue): Resume artificially suspended threads before
17426 calling ContinueDebugEvent.
17427 (suspend_one_thread): New.
17428 (fake_breakpoint_event): New.
17429 (get_child_debug_event): Change return type to int. Check here if
17430 gdb sent an interrupt request. If a soft interrupt was requested,
17431 fake a breakpoint event. Return 0 if there is no event to handle,
17433 (win32_wait): Don't check here if gdb sent an interrupt request.
17434 Ensure there is a valid event to handle.
17435 (win32_request_interrupt): Add soft interruption method as last
17438 2007-12-03 Leo Zayas
17439 Pedro Alves <pedro_alves@portugalmail.pt>
17441 * win32-low.h (win32_thread_info): Add descriptions to the
17442 structure members. Replace `suspend_count' counter by a
17444 * win32-low.c (thread_rec): Update condition of when to get the
17445 context from the inferior. Rely on ContextFlags being set if it
17446 has already been retrieved. Only suspend the inferior thread if
17447 we haven't already. Warn if that fails.
17448 (continue_one_thread): s/suspend_count/suspended/. Only call
17449 ResumeThread once. Warn if that fails.
17451 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17453 * win32-low.c (win32_wait): Don't read from the inferior when it
17454 has already exited.
17456 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17458 * Makefile.in (win32_low_h): New variable.
17459 (win32-low.o): Add dependency on $(win32_low_h).
17460 (win32-arm-low.o, win32-i386-low.o): New rules.
17462 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17464 * hostio.c: Correct copyright year.
17466 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17468 * Makefile.in (OBS): Add hostio.o.
17469 (hostio.o): New rule.
17470 * server.h (handle_vFile): Declare.
17471 * hostio.c: New file.
17472 * server.c (handle_v_requests): Take packet_len and new_packet_len
17473 for binary packets. Call handle_vFile.
17474 (main): Update call to handle_v_requests.
17476 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17478 * linux-low.c: Include <sched.h>.
17480 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17482 * linux-low.c (linux_tracefork_grandchild): New.
17483 (linux_tracefork_child): Use clone.
17484 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17486 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17488 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17490 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17492 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17494 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17496 * inferiors.c (change_inferior_id): Delete.
17497 (add_pid_to_list, pull_pid_from_list): New.
17498 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17499 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17500 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17501 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17502 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17503 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17504 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17505 (using_threads): Always set to 1.
17506 (handle_extended_wait): New.
17507 (add_process): Do not set TID.
17508 (linux_create_inferior): Set must_set_ptrace_flags.
17509 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17510 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17511 (linux_thread_alive): Rename TID argument to LWPID.
17512 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17513 (linux_wait_for_event): Do not use TID or check using_threads. Update
17514 call to dead_thread_notify. Call handle_extended_wait.
17515 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17516 (send_sigstop): Delete sigstop_sent.
17517 (wait_for_sigstop): Avoid TID.
17518 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17519 (linux_test_for_tracefork): New.
17520 (linux_lookup_signals): Use thread_db_active and
17521 linux_supports_tracefork_flag.
17522 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17523 * linux-low.h (get_process_thread): Avoid TID.
17524 (struct process_ifo): Move thread_known and tid to the end. Remove
17526 (linux_attach_lwp, thread_db_init): Update prototypes.
17527 * server.h (change_inferior_id): Delete prototype.
17528 (add_pid_to_list, pull_pid_from_list): New prototypes.
17529 * thread-db.c (thread_db_use_events): New.
17530 (find_first_thread): Rename to...
17531 (find_one_thread): ...this. Update callers and messages. Do not
17532 call fatal. Check thread_db_use_events. Do not call
17533 change_inferior_id or new_thread_notify.
17534 (maybe_attach_thread): Update. Do not call new_thread_notify.
17535 (thread_db_init): Set thread_db_use_events. Check use_events.
17536 * utils.c (fatal, warning): Correct message prefix.
17538 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17540 * Makefile.in (clean): Remove new files.
17541 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17542 (powerpc-64.o, powerpc-64.c): New rules.
17543 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17544 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17546 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17548 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17549 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17550 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17551 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17552 (target_regsets): Add AltiVec and SPE register sets.
17553 * configure.ac: Check for AltiVec and SPE.
17554 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17555 (ppc_fill_vrregset, ppc_store_vrregset): New.
17556 (target_regsets): Add AltiVec register set.
17557 * configure: Regenerated.
17559 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17561 * linux-low.c (O_LARGEFILE): Define.
17562 (linux_read_memory): Use /proc/PID/mem.
17563 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17564 * configure, config.in: Regenerated.
17566 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17568 * linux-low.c (linux_wait_for_event): Do not pass signals while
17571 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17573 * win32-low.c (create_process): New.
17574 (win32_create_inferior): Use create_process instead of
17575 CreateProcess. If create_process failed retry appending an ".exe"
17576 suffix. Store the GetLastError result immediatelly after
17577 create_process calls and use it on the call to error.
17579 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17581 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17583 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17585 * configure.ac: Switch license to GPLv3.
17587 2007-08-01 Michael Snyder <msnyder@access-company.com>
17589 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17591 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17593 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17595 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17596 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17597 CloseToolhelp32Snapshot.
17598 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17599 CloseToolhelp32Snapshot.
17601 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17603 * server.c (main): Check for inferior exit before main loop.
17605 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17607 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17608 instead of on tmp_desc.
17610 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17611 Daniel Jacobowitz <dan@codesourcery.com>
17613 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17614 (add_thread): Minor cleanups.
17615 (clear_inferiors): Move lower in the file. Clear the DLL
17617 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17618 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17619 (xml_escape_text): New.
17620 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17622 (handle_v_cont): Report errors.
17623 (gdbserver_version): Update.
17624 (main): Correct size of own_buf. Do not report initial DLL events.
17625 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17626 (unloaded_dll, xml_escape_text): New.
17627 * win32-low.c (enum target_waitkind): Update comments.
17628 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17629 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17630 (win32_EnumProcessModules, win32_GetModuleInformation)
17631 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17632 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17633 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17634 (win32_Module32First, win32_Module32Next, load_toolhelp)
17635 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17636 (get_child_debug_event): Handle DLL events.
17637 (win32_wait): Likewise.
17639 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17641 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17642 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17644 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17646 * win32-low.c (handle_output_debug_string): Ignore event if not
17649 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17651 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17653 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17655 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17657 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17659 * inferiors.c (change_inferior_id): Add comment.
17660 * linux-low.c (check_removed_breakpoint): Add an early
17661 prototype. Improve debug output.
17662 (linux_attach): Doc update.
17663 (linux_detach_one_process, linux_detach): Clean up before releasing
17665 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17666 * linux-low.h (struct process_info): Doc improvement.
17667 * mem-break.c (delete_all_breakpoints): New.
17668 * mem-break.h (delete_all_breakpoints): New prototype.
17669 * thread-db.c (find_first_thread): New.
17670 (thread_db_create_event): Call it instead of
17671 thread_db_find_new_threads. Clean up unused variables.
17672 (maybe_attach_thread): Remove first thread handling.
17673 (thread_db_find_new_threads): Use find_first_thread.
17674 (thread_db_get_tls_address): Likewise.
17676 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17678 * thread-db.c (thread_db_find_new_threads): Add prototype.
17679 (thread_db_create_event): Check for the main thread before adding
17681 (maybe_attach_thread): Only enable event reporting if TID == 0.
17682 (thread_db_get_tls_address): Check for new threads.
17684 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17686 * linux-low.c (linux_create_inferior): Try execv before execvp.
17687 * spu-low.c (spu_create_inferior): Likewise.
17689 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17691 * linux-low.c (linux_create_inferior): Change execv to execvp.
17692 * spu-low.c (spu_create_inferior): Likewies.
17694 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17696 * Makefile.in (clean): Clean new files instead of deleted ones.
17697 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17698 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17700 * configure.srv: Specify XML files and new regformats for MIPS and
17702 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17703 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17704 an entry for the restart register.
17705 (mips_cannot_fetch_register, mips_cannot_store_register)
17706 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17707 register names to match the XML descriptions.
17708 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17709 restart register instead of $0.
17711 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17712 Markus Deuling <deuling@de.ibm.com>
17714 * remote-utils.c (decode_xfer_write): New function.
17715 * server.h (decode_xfer_write): Add prototype.
17716 * server.c (handle_query): Add PACKET_LEN argument. Support
17717 qXfer:spu:read and qXfer:spu:write packets.
17718 (main): Pass packet_len to handle_query.
17719 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17720 * target.h (target_ops): Add qxfer_spu.
17722 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17724 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17725 accessing non-seekable spufs files.
17727 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17729 * server.c (handle_query): Add reply for qC packet.
17731 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17732 Leo Zayas <lerele@champenstudios@com>
17734 * server.h (check_remote_input_interrupt_request): New function.
17735 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17736 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17737 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17738 (check_remote_input_interrupt_request): New function.
17739 * server.h (check_remote_input_interrupt_request): Declare.
17740 * win32-low.c (winapi_DebugBreakProcess,
17741 winapi_GenerateConsoleCtrlEvent): New typedefs.
17742 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17744 (win32_wait): Check for remote interrupt request
17745 with check_remote_input_interrupt_request.
17746 (win32_request_interrupt): New function.
17747 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17749 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17751 * win32-low.c (debug_registers_changed,
17752 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17753 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17754 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17755 (thread_rec): Get context using the low target.
17756 (child_add_thread): Call thread_added on the low target,
17757 which does the same thing.
17759 (do_initial_child_stuff): Remove debug registers references.
17760 Set context using the low target. Resume threads after
17761 setting the contexts.
17762 (child_continue): Remove dead variable. Remove debug
17763 registers references.
17764 (child_fetch_inferior_registers): Go through the low target.
17765 (do_child_store_inferior_registers): Remove.
17766 (child_store_inferior_registers): Go through the low target.
17767 (win32_resume): Remove debug registers references.
17768 Set context using the low target.
17769 (handle_exception): Change return type to void. Don't record
17770 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17771 first chance exception.
17772 (get_child_debug_event): Change return type to void. Remove
17773 goto loop. Always return after waiting for debug event.
17774 (win32_wait): Convert to switch statement. Handle spurious
17777 * win32-i386-low.c (debug_registers_changed,
17778 debug_registers_used): New.
17779 (initial_stuff): Rename to ...
17780 (i386_initial_stuff): ... this. Clear debug registers
17782 (store_debug_registers): Delete.
17783 (i386_get_thread_context): New.
17784 (load_debug_registers): Delete.
17785 (i386_set_thread_context): New.
17786 (i386_thread_added): New.
17787 (single_step): Rename to ...
17788 (i386_single_step): ... this.
17789 (do_fetch_inferior_registers): Rename to ...
17790 (i386_fetch_inferior_register): ... this.
17791 (i386_store_inferior_register): New.
17792 (the_low_target): Adapt to new interface.
17794 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17795 (arm_get_thread_context): New.
17796 (arm_set_thread_context): New.
17798 (do_fetch_inferior_registers): Rename to ...
17799 (arm_fetch_inferior_register): ... this.
17800 (arm_store_inferior_register): New.
17801 (arm_wince_breakpoint): Reimplement as unsigned long.
17802 (arm_wince_breakpoint_len): Define.
17803 (the_low_target): Adapt to new interface.
17805 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17806 load_debug_registers. Add get_thread_context, set_thread_context,
17807 thread_added and store_inferior_register. Rename
17808 fetch_inferior_registers to fetch_inferior_register.
17809 (regptr): Remove declaration.
17811 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17813 * linux-low.c (linux_detach): Change return type to int. Return 0.
17814 * spu-low.c (spu_detach): Likewise.
17816 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17818 * target.h (target_ops): Change return type of detach to int.
17820 (join_inferior): New.
17821 * server.c (main): Don't skip detach support on mingw32.
17822 If the inferior doesn't support detaching return error.
17823 Call join_inferior instead of using waitpid.
17824 * linux-low.c (linux_join): New.
17825 (linux_target_op): Add linux_join.
17826 * spu-low.c (spu_join): New.
17827 (spu_target_ops): Add spu_join.
17828 * win32-low.c (win32_detach): Adapt to new interface.
17829 Reopen current_process_handle before detaching. Issue a child
17830 resume before detaching.
17832 (win32_target_op): Add win32_join.
17834 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17836 * win32-low.c (win32-attach): Fix return value.
17837 * target.h (target_ops): Describe ATTACH return values.
17839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17841 * win32-low.c (GETPROCADDRESS): Define.
17842 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17843 (winapi_DebugSetProcessKillOnExit): Likewise.
17844 (win32_create_inferior): Force usage of ansi CreateProcessA.
17845 (win32_attach): Use GETPROCADDRESS.
17846 (win32_detach): Likewise.
17848 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17850 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17852 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17854 * win32-low.c: Commit leftover changes from 2007-03-29.
17856 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17858 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17859 fields short instead of int. Add explicit padding.
17860 (i387_cache_to_fsave): Remove unnecessary casts.
17861 (i387_fsave_to_cache): Doc fix.
17862 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17864 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17866 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17867 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17869 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17871 * configure.srv (arm*-*-mingw32ce*): Move near the other
17874 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17876 * configure.ac: Add errno checking.
17877 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17878 sys/file.h and malloc.h.
17879 (AC_CHECK_DECLS): Add perror.
17880 (srv_mingwce): Handle.
17881 * configure.srv (i[34567]86-*-cygwin*): Add
17882 win32-i386-low.o to srv_tgtobj.
17883 (i[34567]86-*-mingw*): Likewise.
17884 (arm*-*-mingw32ce*): Add case.
17885 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17886 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17887 [__MINGW32CE__] (strerror): New function.
17888 [__MINGW32CE__] (errno): Define to GetLastError.
17889 [__MINGW32CE__] (COUNTOF): New macro.
17890 (remote_open): Remove extra close call.
17891 * mem-break.c (delete_breakpoint_at): New function.
17892 * mem-break.h (delete_breakpoint_at): Declare.
17893 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17894 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17895 [USE_WIN32API] (read, write): Add char* casts.
17896 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17897 * server.h: Include wincecompat.h on Windows CE.
17898 [HAVE_ERRNO_H]: Check.
17899 (perror): Declare if not declared.
17900 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17901 (perror_with_name): Remove errno declaration.
17902 * wincecompat.h: New.
17903 * wincecompat.c: New.
17904 * win32-low.h: New.
17905 * win32-arm-low.c: New.
17906 * win32-i386-low.c: New.
17907 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17908 (OUTMSG2): Make it safe.
17910 (COUNTOF): New macro.
17911 (NUM_REGS): Get it from the low target.
17912 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17913 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17914 (thread_rec): Let low target handle debug registers.
17915 (child_add_thread): Likewise.
17916 (child_init_thread_list): Likewise.
17917 (continue_one_thread): Likewise.
17919 (do_child_fetch_inferior_registers): Move to ...
17920 * win32-i386-low.c: ... here, and rename to ...
17921 (do_fetch_inferior_registers): ... this.
17922 * win32-low.c (child_fetch_inferior_registers):
17923 Go through the low target.
17924 (do_child_store_inferior_registers): Use regptr.
17925 (strwinerror): New function.
17926 (win32_create_inferior): Handle Windows CE.
17927 Use strwinerror instead of strerror on Windows error
17928 codes. Add program to the error output.
17929 Don't close the main thread handle on Windows CE.
17930 (win32_attach): Use coredll.dll on Windows CE.
17931 (win32_kill): Close current process and current
17933 (win32_detach): Use coredll.dll on Windows CE.
17934 (win32_resume): Let low target handle debug registers, and
17936 (handle_exception): Add/Remove initial breakpoint. Avoid
17937 non-existant WSTOPSIG on Windows CE.
17938 (win32_read_inferior_memory): Cast to remove warning.
17939 (win32_arch_string): Go through the low target.
17940 (initialize_low): Call set_breakpoint_data with the low
17941 target's breakpoint.
17942 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17943 FOP_REGNUM, mappings): Move to ...
17944 * win32-i386-low.c: ... here.
17945 * win32-low.c (win32_thread_info): Move to ...
17946 * win32-low.h: ... here.
17947 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17948 win32-arm-low.c and wincecompat.c.
17949 (all:): Add $EXEEXT.
17950 (install-only:): Likewise.
17951 (gdbserver:): Likewise.
17952 (gdbreplay:): Likewise.
17953 * config.in: Regenerate.
17954 * configure: Regenerate.
17956 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17958 * win32-low.c: Rename typedef thread_info to
17959 win32_thread_info throughout.
17961 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17963 * win32-i386-low.c: Rename to ...
17964 * win32-low.c: ... this.
17965 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17966 * Makefile.in: Likewise.
17968 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17970 * remote-utils.c (monitor_output): Constify msg parameter.
17971 * server.h (monitor_output): Likewise.
17972 * win32-i386-low.c (handle_output_debug_string): New.
17973 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17974 handle_output_debug_string.
17975 (get_child_debug_event): Likewise.
17977 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17979 * server.c (main): Correct strtoul check.
17981 2007-03-27 Jon Ringle <jon@ringle.org>
17983 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17985 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17987 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17989 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17991 * terminal.h: Check HAVE_SGTTY_H.
17993 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17995 * remote-utils.c (remote_open): Print out the assigned port number.
17997 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17999 * remote-utils.c (monitor_output): New function.
18000 * server.c (debug_threads): Define here.
18001 (monitor_show_help): New function.
18002 (handle_query): Handle qRcmd.
18003 (main): Do not handle 'd' packet.
18004 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18005 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18008 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18010 * Makefile.in (EXEEXT): New.
18011 (clean): Use $(EXEEXT).
18013 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18015 * target.h (target_ops): Rename send_signal to request_interrupt,
18016 and remove enum target_signal parameter.
18017 * linux-low.c (linux_request_interrupt): Rename from
18018 linux_send_signal, and always send SIGINT.
18019 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18020 and always send SIGINT.
18021 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18023 (input_interrupt): Likewise.
18025 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18027 * server.c (get_features_xml): Check if target implemented
18029 * win32-i386-low.c (win32_arch_string): New.
18030 (win32_target_ops): Add win32_arch_string as arch_string member.
18032 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18034 * spu-low.c (spu_arch_string): New.
18035 (spu_target_ops): Add spu_arch_string.
18037 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18039 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18040 * configure.ac: Do not check for terminal.h.
18041 * configure, config.in: Regenerated.
18043 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18045 * Makefile.in (OBS): Add $(XML_BUILTIN).
18046 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18048 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18049 (arm-with-iwmmxt.c): New.
18050 * config.in, configure: Regenerate.
18051 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18052 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18053 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18054 (arm*-*-linux*): Add iWMMXt and regset support.
18055 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18056 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18057 (arm_store_wmmxregset, target_regsets): New.
18058 * server.c (get_features_xml): Take annex argument. Check builtin
18060 (handle_query): Handle multiple annexes.
18062 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18064 * remote-utils.c [USE_WIN32API] (read, write): Define.
18065 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18068 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18070 * linux-i386-low.c (the_low_target): Set arch_string.
18071 * linux-x86-64-low.c (the_low_target): Likewise.
18072 * linux-low.c (linux_arch_string): New.
18073 (linux_target_ops): Add it.
18074 * linux-low.h (struct linux_target_ops): Add arch_string.
18075 * server.c (write_qxfer_response): Use const void * for DATA.
18076 (get_features_xml): New.
18077 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18078 * target.h (struct target_ops): Add arch_string method.
18080 2007-01-03 Denis Pilat <denis.pilat@st.com>
18081 Daniel Jacobowitz <dan@codesourcery.com>
18083 * linux-low.c (linux_kill): Handle being called with no threads.
18084 * win32-i386-low.c (win32_kill): Likewise.
18085 (get_child_debug_event): Clear current_process_handle.
18087 2006-12-30 Denis PILAT <denis.pilat@st.com>
18088 Daniel Jacobowitz <dan@codesourcery.com>
18090 * remote-utils.c (remote_open): Check the type of specified
18091 serial port devices before opening them.
18092 * server.c (main): Kill the inferior if an error occurs during
18093 the first remote_open.
18095 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18097 * README: Update supported targets.
18099 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18101 * Makefile.in (clean): Remove reg-mips64.c.
18102 (reg-mips64.c, reg-mips64.o): New rules.
18103 * configure.srv: Handle mips64. Include regset support for mips.
18104 * linux-mips-low.c (union mips_register): New.
18105 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18106 (mips_breakpoint, mips_breakpoint_at): Use int.
18107 (mips_collect_register, mips_supply_register)
18108 (mips_collect_register_32bit, mips_supply_register_32bit)
18109 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18110 (mips_store_fpregset, target_regsets): New.
18111 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18113 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18115 * configure.srv: Add target "spu*-*-*".
18116 * Makefile.in (clean): Remove reg-spu.c.
18117 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18118 * spu-low.c: New file.
18120 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18122 * configure.ac: Correct td_thr_tls_get_addr test.
18123 * configure: Regenerated.
18125 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18127 * linux-low.c (linux_wait_for_event): Reformat. Use the
18128 pass_signals array.
18129 * remote-utils.c (decode_address_to_semicolon): New.
18130 * server.c (pass_signals, handle_general_set): New.
18131 (handle_query): Mention QPassSignals for qSupported.
18132 (main): Call handle_general_set.
18133 * server.h (pass_signals, decode_address_to_semicolon): New.
18135 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18137 * server.c (handle_query): Correct error handling for read_auxv.
18139 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18141 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18142 and srv_linux_thread_db to yes.
18143 * linux-s390-low.c (s390_fill_gregset): New function.
18144 (target_regsets): Define data structure.
18146 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18148 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18149 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18150 * config.in, configure: Regenerated.
18151 * inferiors.c (gdb_id_to_thread): New function.
18152 (gdb_id_to_thread_id): Use it.
18153 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18154 * linux-low.h (struct process_info): Add th member.
18155 (thread_db_get_tls_address): New prototype.
18156 * remote-utils.c (decode_address): Make non-static.
18157 * server.c (handle_query): Handle qGetTLSAddr.
18158 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18159 * target.h (struct target_ops): Add get_tls_address.
18160 * thread-db.c (maybe_attach_thread): Save the thread handle.
18161 (thread_db_get_tls_address): New.
18163 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18165 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18166 (linux_resume_one_process): Take a siginfo_t *. Update all
18167 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18168 (struct pending_signals): Add a siginfo_t.
18169 (linux_wait_for_process): Always set last_status.
18170 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18171 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18172 * linux-low.h (struct process_info): Add last_status.
18174 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18176 * remote-utils.c (try_rle): New function.
18177 (putpkt_binary): Use it.
18179 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18181 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18182 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18183 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18184 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18185 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18188 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18190 * server.c (terminal_fd): New variable.
18191 (old_foreground_pgrp): Likewise.
18192 (restore_old_foreground_pgrp): New function.
18193 (start_inferior): Record the terminal file descriptor in terminal_fd
18194 and its original foreground group in old_foreground_pgrp. Register
18195 restore_old_foreground_pgrp with atexit().
18197 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18199 * server.c (handle_query): Correct qPart to qXfer.
18201 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18203 * configure.ac: Check for more headers which are missing on
18204 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18205 * configure.srv: Add Cygwin and mingw32.
18206 * remote-utils.c: Don't include headers unconditionally which
18207 are missing on mingw32. Include <winsock.h> for mingw32.
18208 (remote_open): Adjust for mingw32 support. Flush
18209 standard error after writing to it.
18210 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18211 (unblock_async_io, enable_async_io, disable_async_io)
18212 (readchar, getpkt): Update for Winsock support.
18213 (prepare_resume_reply): Expect a protocol signal number.
18214 * server.c: Disable <sys/wait.h> on mingw32.
18215 (start_inferior): Adjust for mingw32 support. Flush
18216 standard error after writing to it.
18217 (attach_inferior): Likewise. Use protocol signal
18219 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18221 * win32-i386-low.c: New file.
18222 * Makefile.in (XM_CLIBS): Set.
18223 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18224 (win32-i386-low.o): New dependency rule.
18225 * linux-low.c (linux_wait): Use target signal numbers.
18226 * target.h (struct target_ops): Doc fix.
18227 * server.h (target_signal_to_name): New prototype.
18228 * gdbreplay.c: Don't include headers unconditionally which
18229 are missing on mingw32. Include <winsock.h> for mingw32.
18230 (remote_close, remote_open): Adjust for Winsock support.
18231 * configure, config.in: Regenerated.
18233 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18235 * server.c (decode_xfer_read, write_qxfer_response): New.
18236 (handle_query): Take a packet length argument. Handle
18237 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18238 the qSupported response.
18239 (main): Update call to handle_query.
18241 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18243 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18244 (putpkt_binary): Renamed from putpkt and adjusted for binary
18246 (putpkt): New wrapper for putpkt_binary.
18247 (readchar): Don't mask off the high bit.
18248 (decode_X_packet): New function.
18249 * server.c (main): Call putpkt_binary if a handler sets the packet
18250 length. Save the length of the incoming packet. Handle 'X'.
18251 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18253 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18255 * server.c (handle_query): Handle qSupported.
18257 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18259 * remote-utils.c (all_symbols_looked_up): New variable.
18260 (look_up_one_symbol): Check it.
18261 * server.h (look_up_one_symbol): New declaration.
18262 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18264 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18266 * Makefile.in (linux-arm-low.o): Update dependencies.
18267 * linux-arm-low.c: Include "gdb_proc_service.h".
18268 (PTRACE_GET_THREAD_AREA): Define.
18269 (ps_get_thread_area): New function.
18271 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18273 * configure.srv (m68k*-*-uclinux*): New target.
18274 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18275 (linux_resume_one_process): Remove extraneous cast.
18276 (linux_read_offsets): New.
18277 (linux_target_op): Add linux_read_offsets on mmuless systems.
18278 * server.c (handle_query): Add qOffsets logic.
18279 * target.h (struct target_ops): Add read_offsets.
18281 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18283 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18284 (PTRACE_GET_THREAD_AREA): Define.
18285 (ps_get_thread_area): New function.
18286 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18287 (linux-x86-64-low.o): Update.
18289 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18291 * configure.ac: Remove checks for prfpregset_t.
18292 * gdb_proc_service.h: New file.
18293 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18294 new "gdb_proc_service.h".
18295 * proc-service.c: Likewise.
18296 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18297 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18298 * Makefile.in (gdb_proc_service_h): Updated.
18299 * configure, config.in: Regenerated.
18301 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18303 * remote-utils.c (prepare_resume_reply): Move declaration
18304 of gdb_id_from_wait to the top of the block.
18306 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18308 * linux-low.c (regsets_store_inferior_registers): Read the regset
18309 from the target before filling it.
18311 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18313 * server.c (attach_inferior): Return SIGTRAP for a successful
18316 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18318 * Makefile.in (OBS): Add version.o.
18319 (STAGESTUFF): Delete.
18320 (version.o): Add dependencies.
18321 (version.c): Replace rule.
18322 (clean): Remove version.c.
18323 * server.c (gdbserver_version): New.
18324 (gdbserver_usage): Use printf.
18325 (main): Handle --version and --help.
18326 * server.h (version, host_name): Add declarations.
18328 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18340 * linux-x86-64-low.c:
18342 * linux-s390-low.c:
18343 * linux-ppc64-low.c:
18345 * linux-mips-low.c:
18346 * linux-m68k-low.c:
18347 * linux-m32r-low.c:
18350 * linux-ia64-low.c:
18351 * linux-i386-low.c:
18352 * linux-crisv32-low.c:
18364 * gdbserver.1: Add (C) after Copyright. Update the FSF
18367 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18369 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18370 (arm_breakpoint_at): Recognize both breakpoints.
18371 (the_low_target): Use the correct breakpoint instruction.
18373 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18375 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18376 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18377 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18378 (the_low_target): Update.
18380 2005-10-25 Andreas Schwab <schwab@suse.de>
18382 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18384 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18385 (ia64_num_regs): Reduce to 462.
18387 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18389 * acinclude.m4: Correct quoting.
18390 * aclocal.m4: Regenerated.
18392 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18393 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18394 (thread_db_init): Call thread_db_err_str.
18395 * configure.ac: Check for TD_VERSION.
18396 * config.in, configure: Regenerated.
18398 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18400 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18402 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18404 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18405 is not available. Define HAVE_PTRACE_GETREGS if it is.
18406 * config.in, configure: Regenerated.
18407 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18408 * linux-i386-low.c, linux-m68k-low.c: Update to use
18409 HAVE_PTRACE_GETREGS.
18410 * linux-low.c (regsets_fetch_inferior_registers)
18411 (regsets_store_inferior_registers): Only return 0 if we processed
18413 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18414 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18416 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18418 * inferiors.c (struct thread_info): Add gdb_id.
18419 (add_thread): Add gdb_id argument.
18420 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18421 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18422 calls to add_thread.
18423 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18424 * server.c (handle_query): Use thread_to_gdb_id.
18425 (handle_v_cont, main): Use gdb_id_to_thread_id.
18426 * server.h (add_thread): Update prototype.
18427 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18430 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18432 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18433 left-padded registers.
18434 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18435 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18437 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18439 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18440 * configure: Regenerate.
18441 * config.in: Regenerate.
18442 * server.h (NEED_DECLARATION_STRERROR):
18443 Replace with !HAVE_DECL_STRERROR.
18445 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18447 * linux-low.c (linux_wait, linux_send_signal): Don't test
18448 an unsigned long variable for > 0 if it could be MAX_ULONG.
18449 * server.c (myresume): Likewise.
18450 * target.c (set_desired_inferior): Likewise.
18452 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18454 * configure.ac: Simplify and improve check for socklen_t.
18455 * configure, config.in: Regenerate.
18457 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18459 * acconfig.h: Remove.
18460 * configure.ac: Add a test for socklen_t. Use three-argument
18461 AC_DEFINE throughout.
18462 * config.in: Regenerated using autoheader 2.59.
18463 * configure: Regenerated.
18465 * gdbreplay.c (socklen_t): Provide a default.
18466 (remote_open): Use socklen_t.
18467 * remote-utils.c (socklen_t): Provide a default.
18468 (remote_open): Use socklen_t.
18469 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18472 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18474 * linux-low.c (linux_read_memory, linux_write_memory)
18475 (linux_read_auxv): Likewise.
18476 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18477 (check_mem_write): Likewise.
18478 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18480 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18481 (registers_from_string, register_data): Likewise.
18482 * server.c (handle_query, main): Likewise.
18483 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18484 (decode_M_packet): Likewise.
18485 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18486 * target.h (struct target_ops): Update read_memory, write_memory,
18488 (read_inferior_memory, write_inferior_memory): Update.
18489 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18490 to unsigned char *.
18491 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18492 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18493 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18494 linux-s390-low.c, linux-sh-low.c: Update for changes in
18495 read_inferior_memory and the_low_target->breakpoint.
18497 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18499 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18500 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18501 * configure.srv: Add powerpc64-*-linux*.
18502 * linux-ppc64-low.c: New file.
18504 2005-05-23 Orjan Friberg <orjanf@axis.com>
18506 * linux-cris-low.c: New file with support for CRIS.
18507 * linux-crisv32-low.c: Ditto for CRISv32.
18508 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18509 (clean): Add reg-cris.c and reg-crisv32.c.
18510 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18511 reg-crisv32.o, and reg-crisv32.c to make rules.
18512 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18513 recognized targets.
18515 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18517 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18518 of sizeof (PTRACE_XFER_TYPE).
18519 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18521 2005-05-12 Orjan Friberg <orjanf@axis.com>
18523 * target.h (struct target_ops): Add insert_watchpoint,
18524 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18525 pointers for hardware watchpoint support.
18526 * linux-low.h (struct linux_target_ops): Ditto.
18527 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18528 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18529 to linux_target_ops.
18530 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18532 * server.c (main): Recognize 'Z' and 'z' packets.
18534 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18536 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18537 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18538 (the_low_target): Add new members.
18540 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18542 * proc-service.c (ps_lgetregs): Search all_processes instead of
18545 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18547 * server.c (start_inferior): Change return type to int.
18548 (attach_inferior): Change sigptr to int *.
18549 (handle_v_cont, handle_v_requests): Change signal to int *.
18550 (main): Change signal to int.
18552 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18554 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18555 * configure.srv: Add m32r*-*-linux*.
18556 * linux-m32r-low.c: New file.
18558 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18560 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18562 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18564 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18565 Take unsigned long arguments for PIDs.
18566 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18567 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18568 (wait_for_sigstop, linux_resume_one_process)
18569 (regsets_fetch_inferior_registers, linux_send_signal)
18570 (linux_read_auxv): Likewise. Update the types of variables holding
18571 PIDs. Update format string specifiers.
18572 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18573 * remote-utils.c (prepare_resume_reply): Likewise.
18574 * server.c (cont_thread, general_thread, step_thread)
18575 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18577 (handle_query): Update format specifiers.
18578 (handle_v_cont, main): Use strtoul for thread IDs.
18579 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18580 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18581 (general_thread, step_thread, thread_from_wait)
18582 (old_thread_from_wait): Update.
18583 * target.h (struct thread_resume): Use unsigned long for THREAD.
18584 (struct target_ops): Use unsigned long for arguments to attach and
18587 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18589 * acinclude.m4: Include bfd/bfd.m4 directly.
18590 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18591 <agriffis@toolchain.org>.
18592 * aclocal.m4, configure: Regenerated.
18594 2005-01-07 Andrew Cagney <cagney@gnu.org>
18596 * configure.ac: Rename configure.in, require autoconf 2.59.
18597 * configure: Re-generate.
18599 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18601 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18602 LIBS when finished.
18603 * aclocal.m4: Regenerated.
18604 * configure: Regenerated.
18606 2004-11-21 Andreas Schwab <schwab@suse.de>
18608 * linux-m68k-low.c (m68k_num_gregs): Define.
18609 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18610 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18611 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18612 (m68k_breakpoint_at): New. Add to the_low_target.
18614 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18615 srv_linux_thread_db to yes.
18617 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18619 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18620 (ARCH_SET_FS): Likewise.
18621 (ARCH_GET_FS): Likewise.
18622 (ARCH_GET_GS): Likewise.
18624 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18626 * linux-i386-low.c (ps_get_thread_area): New.
18627 * linux-x86-64-low.c (ps_get_thread_area): New.
18628 * linux-low.c: Include <sys/syscall.h>.
18629 (linux_kill_one_process): Don't kill the first thread here.
18630 (linux_kill): Kill the first thread here.
18631 (kill_lwp): New function.
18632 (send_sigstop, linux_send_signal): Use it.
18633 * proc-service.c: Clean up #ifdefs.
18634 (fpregset_info): Delete.
18635 (ps_lgetregs): Update and enable implementation.
18636 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18638 * remote-utils.c (struct sym_cache, symbol_cache): New.
18639 (input_interrupt): Print a clearer message.
18640 (async_io_enabled): New variable.
18641 (enable_async_io, disable_async_io): Use it. Update comments.
18642 (look_up_one_symbol): Use the symbol cache.
18643 * thread-db.c (thread_db_look_up_symbols): New function.
18644 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18646 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18648 * configure.in: Test for -rdynamic.
18649 * configure: Regenerated.
18650 * Makefile (INTERNAL_LDFLAGS): New.
18651 (gdbserver, gdbreplay): Use it.
18653 2004-09-02 Andrew Cagney <cagney@gnu.org>
18655 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18657 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18659 * linux-low.c (linux_wait): Clear all_processes list also.
18661 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18663 * linux-low.c: Include <errno.h>. Remove extern declaration of
18666 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18668 * gdbreplay.c, server.h, utils.c: Update copyright years.
18670 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18672 * server.c (main): Print child status or termination signal from
18673 variable 'signal', not 'sig'.
18675 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18677 * linux-low.c (linux_read_memory): Change return type to
18678 int. Check for and return error from ptrace().
18679 * target.c (read_inferior_memory): Change return type to int. Pass
18680 back return status from the_target->read_memory().
18681 * target.h (struct target_ops): Adapt *read_memory() prototype.
18683 (read_inferior_memory): Adapt prototype.
18684 * server.c (main): Return an error packet if
18685 read_inferior_memory() returns an error.
18687 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18689 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18690 Unify with other clean targets.
18692 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18694 * server.c (handle_v_cont): Call set_desired_inferior.
18696 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18698 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18700 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18702 * linux-low.c (linux_wait): Unblock async I/O.
18703 (linux_resume): Block and enable async I/O.
18704 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18705 * server.h (block_async_io, unblock_async_io): Add prototypes.
18707 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18709 * remote-utils.c (remote_open): Print a status notice after
18710 opening a TCP port.
18711 * server.c (attach_inferior): Print a status notice after
18714 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18716 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18718 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18720 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18722 * server.c, target.h: Update copyright years.
18724 2004-02-25 Roland McGrath <roland@redhat.com>
18726 * target.h (struct target_ops): New member `read_auxv'.
18727 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18728 * linux-low.c (linux_read_auxv): New function.
18729 (linux_target_ops): Initialize `read_auxv' member to that.
18731 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18733 Committed by Jim Blandy <jimb@redhat.com>.
18735 * linux-s390-low.c (s390_num_regs): Update.
18736 (s390_regmap): Remove control registers. Use __s390x__ predefine
18737 instead of GPR_SIZE to distiguish s390 and s390x targets.
18739 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18741 * linux-low.c: Update copyright year.
18742 (check_removed_breakpoint): Clear pending_is_breakpoint.
18743 (linux_set_resume_request, linux_queue_one_thread)
18744 (resume_status_pending_p): New functions.
18745 (linux_continue_one_thread): Use process->resume.
18746 (linux_resume): Only resume threads if there are no pending events.
18747 * linux-low.h (struct process_info): Add resume request
18750 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18752 * regcache.c (new_register_cache): Clear the allocated register
18753 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18755 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18757 * linux-low.c (linux_resume): Take a struct thread_resume *
18759 (linux_wait): Update call.
18760 (resume_ptr): New static variable.
18761 (linux_continue_one_thread): Renamed from
18762 linux_continue_one_process. Use resume_ptr.
18763 (linux_resume): Use linux_continue_one_thread.
18764 * server.c (handle_v_cont, handle_v_requests): New functions.
18765 (myresume): New function.
18766 (main): Handle 'v' case.
18767 * target.h (struct thread_resume): New type.
18768 (struct target_ops): Change argument of "resume" to struct
18770 (myresume): Delete macro.
18772 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18774 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18775 (uninstall): Support DESTDIR.
18777 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18779 * configure.srv: Add xscale*linux copy of arm*linux entry.
18781 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18783 * linux-arm-low.c (arm_reinsert_addr): New function.
18784 (the_low_target): Add arm_reinsert_addr.
18786 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18788 * mem-break.c: Remove whitespace at end of file.
18790 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18792 * configure.in: Check whether we need to prototype strerror.
18793 * server.h: Optionally prototype strerror.
18794 * gdbreplay.c (perror_with_name): Use strerror.
18795 * linux-low.c (linux_attach_lwp): Use strerror.
18796 * utils.c (perror_with_name): Use strerror.
18797 * config.in, configure: Regenerated.
18799 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18801 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18802 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18804 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18806 * Makefile.in (SFILES): Update.
18807 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18808 low-sun3.c: Remove files.
18810 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18812 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18813 (linux_detach_one_process, linux_detach): New functions.
18814 (linux_target_ops): Add linux_detach.
18815 * server.c (main): Handle 'D' packet.
18816 * target.h (struct target_ops): Add "detach" member.
18817 (detach_inferior): Define.
18819 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18821 From Kelley Cook <kelleycook@wideopenwest.com>:
18822 * configure.srv: Accept i[34567]86 variants.
18824 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18826 * linux-low.c (linux_wait_for_event): Correct comment typos.
18827 (linux_resume_one_process): Call check_removed_breakpoint.
18828 (linux_send_signal): New function.
18829 (linux_target_ops): Add linux_send_signal.
18830 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18832 * target.h (struct target_ops): Add send_signal.
18834 2003-05-29 Jim Blandy <jimb@redhat.com>
18836 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18837 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18838 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18839 away part of the register's value.
18841 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18843 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18844 (linux_wait_for_event, linux_init_signals): Likewise.
18846 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18848 * configure.in: Check for stdlib.h.
18849 * configure: Regenerated.
18850 * config.in: Regenerated.
18852 2003-01-04 Andreas Schwab <schwab@suse.de>
18854 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18856 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18858 * Makefile.in: Remove obsolete code.
18860 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18862 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18863 defined(PT_FPR0_HI).
18865 2002-11-17 Stuart Hughes <seh@zee2.com>
18867 * linux-arm-low.c (arm_num_regs): Increase.
18868 (arm_regmap): Include status register.
18870 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18872 * linux-low.c (register_addr): Remove incorrect -1 check.
18874 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18876 * linux-low.c (linux_create_inferior): Call setpgid. Return
18878 (unstopped_p, linux_signal_pid): Remove.
18879 (linux_target_ops): Remove linux_signal_pid.
18880 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18881 global instead of target method.
18882 * target.h (struct target_ops): Remove signal_pid. Update comment
18883 for create_inferior.
18884 * server.c (signal_pid): New variable.
18885 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18886 gdbserver. Set the child to be the foreground process group.
18887 (attach_inferior): Set signal_pid.
18889 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18891 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18893 2002-08-20 Jim Blandy <jimb@redhat.com>
18895 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18898 2002-08-01 Andrew Cagney <cagney@redhat.com>
18900 * Makefile.in: Make chill references obsolete.
18902 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18904 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18905 * configure: Regenerate.
18906 * config.in: Regenerate.
18908 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18910 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18911 (perror_with_name, remote_close, remote_open, expect, play): Static.
18913 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18915 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18916 byte offsets instead of an array of indexes.
18917 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18919 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18921 * regcache.c: Add comment.
18923 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18925 * thread-db.c: New file.
18926 * proc-service.c: New file.
18927 * acinclude.m4: New file.
18928 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18929 proc-service.o, and thread-db.o.
18930 (linux-low.o): Add USE_THREAD_DB.
18931 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18932 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18933 * aclocal.m4: Regenerated.
18934 * config.in: Regenerated.
18935 * configure: Regenerated.
18936 * configure.in: Check for proc_service.h, sys/procfs.h,
18937 thread_db.h, and linux/elf.h headrs.
18938 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18939 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18940 Check for -lthread_db and thread support.
18941 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18942 PowerPC, and SuperH.
18943 * i387-fp.c: Constify arguments.
18944 * i387-fp.h: Likewise.
18945 * inferiors.c: (struct thread_info): Renamed from
18946 `struct inferior_info'. Remove PID member. Use generic inferior
18947 list header. All uses updated.
18948 (inferiors, signal_pid): Removed.
18949 (all_threads): New variable.
18950 (get_thread): Define.
18951 (add_inferior_to_list): New function.
18952 (for_each_inferior): New function.
18953 (change_inferior_id): New function.
18954 (add_inferior): Removed.
18955 (remove_inferior): New function.
18956 (add_thread): New function.
18957 (free_one_thread): New function.
18958 (remove_thread): New function.
18959 (clear_inferiors): Use for_each_inferior and free_one_thread.
18960 (find_inferior): New function.
18961 (find_inferior_id): New function.
18962 (inferior_target_data): Update argument type.
18963 (set_inferior_target_data): Likewise.
18964 (inferior_regcache_data): Likewise.
18965 (set_inferior_regcache_data): Likewise.
18966 * linux-low.c (linux_bp_reinsert): Remove.
18967 (all_processes, stopping_threads, using_thrads)
18968 (struct pending_signals, debug_threads, pid_of): New.
18969 (inferior_pid): Replace with macro.
18970 (struct inferior_linux_data): Remove.
18971 (get_stop_pc, add_process): New functions.
18972 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18973 Use add_process and add_thread.
18974 (linux_attach_lwp): New function, based on old linux_attach. Use
18975 add_process and add_thread. Set stop_expected for new threads.
18976 (linux_attach): New function.
18977 (linux_kill_one_process): New function.
18978 (linux_kill): Kill all LWPs.
18979 (linux_thread_alive): Use find_inferior_id.
18980 (check_removed_breakpoints, status_pending_p): New functions.
18981 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18982 Update. Use WNOHANG. Wait for cloned processes also. Update process
18983 struct for the found process.
18984 (linux_wait_for_event): New function.
18985 (linux_wait): Use it. Support LWPs.
18986 (send_sigstop, wait_for_sigstop, stop_all_processes)
18987 (linux_resume_one_process, linux_continue_one_process): New functions.
18988 (linux_resume): Support LWPs.
18989 (REGISTER_RAW_SIZE): Remove.
18990 (fetch_register): Use register_size instead. Call supply_register.
18991 (usr_store_inferior_registers): Likewise. Call collect_register.
18992 Fix recursive case.
18993 (regsets_fetch_inferior_registers): Improve error message.
18994 (regsets_store_inferior_registers): Add debugging.
18995 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18996 (unstopped_p, linux_signal_pid): New functions.
18997 (linux_target_ops): Add linux_signal_pid.
18998 (linux_init_signals): New function.
18999 (initialize_low): Call it. Initialize using_threads.
19000 * regcache.c (inferior_regcache_data): Add valid
19002 (get_regcache): Fetch registers lazily. Add fetch argument
19003 and update all callers.
19004 (regcache_invalidate_one, regcache_invalidate): New
19006 (new_register_cache): Renamed from create_register_cache.
19007 Return the new regcache.
19008 (free_register_cache): Change argument to a void *.
19009 (registers_to_string, registers_from_string): Call get_regcache
19010 with fetch flag set.
19011 (register_data): Make static. Pass fetch flag to get_regcache.
19012 (supply_register): Call get_regcache with fetch flag clear.
19013 (collect_register): Call get_regcache with fetch flag set.
19014 (collect_register_as_string): New function.
19015 * regcache.h: Update.
19016 * remote-utils.c (putpkt): Flush after debug output and use
19018 Handle input interrupts while waiting for an ACK.
19019 (input_interrupt): Use signal_pid method.
19020 (getpkt): Flush after debug output and use stderr.
19021 (outreg): Use collect_register_as_string.
19022 (new_thread_notify, dead_thread_notify): New functions.
19023 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19024 and general_thread.
19025 (look_up_one_symbol): Flush after debug output.
19026 * server.c (step_thread, server_waiting): New variables.
19027 (start_inferior): Don't use signal_pid. Update call to mywait.
19028 (attach_inferior): Update call to mywait.
19029 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19030 (main): Don't fetch/store registers explicitly. Use
19031 set_desired_inferior. Support proposed ``Hs'' packet. Update
19033 * server.h: Update.
19034 (struct inferior_list, struct_inferior_list_entry): New.
19035 * target.c (set_desired_inferior): New.
19036 (write_inferior_memory): Constify.
19037 (mywait): New function.
19038 * target.h: Update.
19039 (struct target_ops): New signal_pid method.
19040 (mywait): Removed macro, added prototype.
19042 * linux-low.h (regset_func): Removed.
19043 (regset_fill_func, regset_store_func): New.
19044 (enum regset_type): New.
19045 (struct regset_info): Add type field. Use new operation types.
19046 (struct linux_target_ops): stop_pc renamed to get_pc.
19047 Add decr_pc_after_break and breakpoint_at.
19048 (get_process, get_thread_proess, get_process_thread)
19049 (strut process_info, all_processes, linux_attach_lwp)
19050 (thread_db_init): New.
19052 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19053 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19054 (the_low_target): Add new members.
19055 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19056 (i386_store_fpxregset): Constify.
19057 (target_regsets): Add new kind identifier.
19058 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19059 (i386_set_pc): Add debugging.
19060 (i386_breakpoint_at): New function.
19061 (the_low_target): Add new members.
19062 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19063 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19064 (mips_breakpoint_at): New.
19065 (the_low_target): Add new members.
19066 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19067 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19068 (the_low_target): Add new members.
19069 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19070 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19071 (the_low_target): Add new members.
19072 * linux-x86-64-low.c (target_regsets): Add new kind
19075 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19077 From Martin Pool <mbp@samba.org>:
19078 * server.c (gdbserver_usage): New function.
19081 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19083 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19084 stop_at -> stop_pc.
19086 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19088 * Makefile.in: Remove obsolete code.
19090 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19092 * linux-low.c (regsets_fetch_inferior_registers),
19093 (regsets_store_inferior_registers): Removed cast to int from
19095 * regcache.h: Added declaration of struct inferior_info.
19097 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19099 * inferiors.c (struct inferior_info): Add regcache_data.
19100 (add_inferior): Call create_register_cache.
19101 (clear_inferiors): Call free_register_cache.
19102 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19103 * regcache.c (struct inferior_regcache_data): New.
19104 (registers): Remove.
19105 (get_regcache): New function.
19106 (create_register_cache, free_register_cache): New functions.
19107 (set_register_cache): Don't initialize the register cache here.
19108 (registers_to_string, registers_from_string, register_data): Call
19110 * regcache.h: Add prototypes.
19111 * server.h: Likewise.
19113 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19115 * mem-break.c: New file.
19116 * mem-break.h: New file.
19117 * Makefile.in: Add mem-break.o rule; update server.h
19119 * inferiors.c (struct inferior_info): Add target_data
19121 (clear_inferiors): Free target_data member if set.
19122 (inferior_target_data, set_inferior_target_data): New functions.
19123 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19124 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19125 * linux-low.c (linux_bp_reinsert): New variable.
19126 (struct inferior_linux_data): New.
19127 (linux_create_inferior): Use set_inferior_target_data.
19128 (linux_attach): Likewise. Call add_inferior.
19129 (linux_wait_for_one_inferior): New function.
19130 (linux_wait): Call it.
19131 (linux_write_memory): Add const.
19132 (initialize_low): Call set_breakpoint_data.
19133 * linux-low.h (struct linux_target_ops): Add breakpoint
19135 * server.c (attach_inferior): Remove extra add_inferior
19137 * server.h: Include mem-break.h. Update inferior.c
19139 * target.c (read_inferior_memory)
19140 (write_inferior_memory): New functions.
19141 * target.h (read_inferior_memory)
19142 (write_inferior_memory): Change macros to prototypes.
19143 (struct target_ops): Update comments. Add const to write_memory
19146 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19148 * linux-low.c (usr_store_inferior_registers): Support
19149 registers which are allowed to fail to store.
19150 * linux-low.h (linux_target_ops): Likewise.
19151 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19152 (ppc_cannot_store_register): FPSCR may not be storable.
19154 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19156 * server.h: Include <string.h> if HAVE_STRING_H.
19157 * ChangeLog: Correct paths in last ChangeLog entry.
19159 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19161 * linux-low.h: Remove obsolete prototypes.
19162 (struct linux_target_ops): New.
19163 (extern the_low_target): New.
19164 * linux-low.c (num_regs, regmap): Remove declarations.
19165 (register_addr): Use the_low_target explicitly.
19166 (fetch_register): Likewise.
19167 (usr_fetch_inferior_registers): Likewise.
19168 (usr_store_inferior_registers): Likewise.
19169 * linux-arm-low.c (num_regs): Remove.
19170 (arm_num_regs): Define.
19171 (arm_regmap): Renamed from regmap, made static.
19172 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19174 (arm_cannot_store_register): Renamed from cannot_store_register,
19176 (the_low_target): New.
19177 * linux-i386-low.c (num_regs): Remove.
19178 (i386_num_regs): Define.
19179 (i386_regmap): Renamed from regmap, made static.
19180 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19182 (i386_cannot_store_register): Renamed from cannot_store_register,
19184 (the_low_target): New.
19185 * linux-ia64-low.c (num_regs): Remove.
19186 (ia64_num_regs): Define.
19187 (ia64_regmap): Renamed from regmap, made static.
19188 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19190 (ia64_cannot_store_register): Renamed from cannot_store_register,
19192 (the_low_target): New.
19193 * linux-m68k-low.c (num_regs): Remove.
19194 (m68k_num_regs): Define.
19195 (m68k_regmap): Renamed from regmap, made static.
19196 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19198 (m68k_cannot_store_register): Renamed from cannot_store_register,
19200 (the_low_target): New.
19201 * linux-mips-low.c (num_regs): Remove.
19202 (mips_num_regs): Define.
19203 (mips_regmap): Renamed from regmap, made static.
19204 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19206 (mips_cannot_store_register): Renamed from cannot_store_register,
19208 (the_low_target): New.
19209 * linux-ppc-low.c (num_regs): Remove.
19210 (ppc_num_regs): Define.
19211 (ppc_regmap): Renamed from regmap, made static.
19212 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19214 (ppc_cannot_store_register): Renamed from cannot_store_register,
19216 (the_low_target): New.
19217 * linux-s390-low.c (num_regs): Remove.
19218 (s390_num_regs): Define.
19219 (s390_regmap): Renamed from regmap, made static.
19220 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19222 (s390_cannot_store_register): Renamed from cannot_store_register,
19224 (the_low_target): New.
19225 * linux-sh-low.c (num_regs): Remove.
19226 (sh_num_regs): Define.
19227 (sh_regmap): Renamed from regmap, made static.
19228 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19230 (sh_cannot_store_register): Renamed from cannot_store_register,
19232 (the_low_target): New.
19233 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19234 (the_low_target): New.
19236 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19238 * Makefile.in: Add stamp-h target.
19239 * configure.in: Create stamp-h.
19240 * configure: Regenerated.
19242 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19244 * inferiors.c: New file.
19245 * target.c: New file.
19246 * target.h: New file.
19247 * Makefile.in: Add target.o and inferiors.o. Update
19249 * linux-low.c (inferior_pid): New static variable,
19250 moved from server.c.
19251 (linux_create_inferior): Renamed from create_inferior.
19252 Call add_inferior. Return 0 on success instead of a PID.
19253 (linux_attach): Renamed from myattach.
19254 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19255 (linux_thread_alive): Renamed from mythread_alive.
19256 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19258 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19259 (regsets_store_inferior_registers): Correct error message.
19260 Add missing ``return 0''.
19261 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19262 (linux_store_registers): Renamed from store_inferior_registers.
19263 (linux_read_memory): Renamed from read_inferior_memory.
19264 (linux_write_memory): Renamed from write_inferior_memory.
19265 (linux_target_ops): New structure.
19266 (initialize_low): Call set_target_ops ().
19267 * remote-utils.c (unhexify): New function.
19268 (hexify): New function.
19269 (input_interrupt): Send signals to ``signal_pid''.
19270 * server.c (inferior_pid): Remove.
19271 (start_inferior): Update create_inferior call.
19272 (attach_inferior): Call add_inferior.
19273 (handle_query): New function.
19274 (main): Call handle_query for `q' packets.
19275 * server.h: Include "target.h". Remove obsolete prototypes.
19276 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19278 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19280 * Makefile.in: Add WARN_CFLAGS. Update configury
19282 * configure.in: Check for <string.h>
19283 * configure: Regenerate.
19284 * config.in: Regenerate.
19285 * gdbreplay.c: Include needed system headers.
19286 (remote_open): Remove strchr prototype.
19287 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19288 * regcache.c (supply_register): Change buf argument to const void *.
19289 (supply_register_by_name): Likewise.
19290 (collect_register): Change buf argument to void *.
19291 (collect_register_by_name): Likewise.
19292 * regcache.h: Add missing prototypes.
19293 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19294 * server.c (handle_query): New function.
19295 (attached): New static variable, moved out of main.
19296 (main): Quiet longjmp clobber warnings.
19297 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19298 * utils.c (error): Remove NORETURN.