1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's btrace-related ops (enable_btrace,
4 disable_btrace, read_btrace, read_btrace_conf) into methods of
7 * target.h (struct process_stratum_target): Remove the target ops.
8 (class process_target): Add the target ops.
9 (target_enable_btrace): Update.
10 (target_disable_btrace): Update.
11 (target_read_btrace): Update.
12 (target_read_btrace_conf): Update.
13 * target.cc (process_target::enable_btrace): Define.
14 (process_target::disable_btrace): Define.
15 (process_target::read_btrace): Define.
16 (process_target::read_btrace_conf): Define.
18 Update the derived classes and callers below.
20 * linux-low.cc (linux_target_ops): Update.
21 (linux_process_target:enable_btrace): Define as a wrapper around
23 (linux_low_disable_btrace): Turn into ...
24 (linux_process_target::disable_btrace): ... this.
25 (linux_low_read_btrace): Turn into ...
26 (linux_process_target::read_btrace): ... this.
27 (linux_low_btrace_conf): Turn into ...
28 (linux_process_target::read_btrace_conf): ... this.
29 * linux-low.h (class linux_process_target): Update.
30 * lynx-low.cc (lynx_target_ops): Update.
31 * nto-low.cc (nto_target_ops): Update.
32 * win32-low.cc (win32_target_ops): Update.
34 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
36 Turn process_stratum_target's supports_agent op into a method of
39 * target.h (struct process_stratum_target): Remove the target op.
40 (class process_target): Add the target op.
41 (target_supports_agent): Update the macro.
42 * target.cc (process_target::supports_agent): Define.
44 Update the derived classes and callers below.
46 * linux-low.cc (linux_target_ops): Update.
47 (linux_supports_agent): Turn into ...
48 (linux_process_target::supports_agent): ... this.
49 * linux-low.h (class linux_process_target): Update.
50 * lynx-low.cc (lynx_target_ops): Update.
51 * nto-low.cc (nto_target_ops): Update.
52 * win32-low.cc (win32_target_ops): Update.
54 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
56 Turn process_stratum_target's qxfer_libraries_svr4 op into a
57 method of process_target.
59 * target.h (struct process_stratum_target): Remove the target op.
60 (class process_target): Add the target op. Also add
61 'supports_qxfer_libraries_svr4'.
62 * target.cc (process_target::qxfer_libraries_svr4): Define.
63 (process_target::supports_qxfer_libraries_svr4): Define.
65 Update the derived classes and callers below.
67 * server.cc (handle_qxfer_libraries_svr4): Update.
68 (handle_query): Update.
69 * linux-low.cc (linux_target_ops): Update.
70 (linux_process_target::supports_qxfer_libraries_svr4): Define.
71 (linux_qxfer_libraries_svr4): Turn into ...
72 (linux_process_target::qxfer_libraries_svr4): ... this.
73 * linux-low.h (class linux_process_target): Update.
74 * lynx-low.cc (lynx_target_ops): Update.
75 * nto-low.cc (nto_target_ops): Update.
76 * win32-low.cc (win32_target_ops): Update.
78 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
80 Turn process_stratum_target's supports_disable_randomization op
81 into a method of process_target.
83 * target.h (struct process_stratum_target): Remove the target op.
84 (class process_target): Add the target op.
85 (target_supports_disable_randomization): Update the macro.
86 * target.cc (process_target::supports_disable_randomization): Define.
88 Update the derived classes and callers below.
90 * linux-low.cc (linux_target_ops): Update.
91 (linux_supports_disable_randomization): Turn into ...
92 (linux_process_target::supports_disable_randomization): ... this.
93 * linux-low.h (class linux_process_target): Update.
94 * lynx-low.cc (lynx_target_ops): Update.
95 * nto-low.cc (nto_target_ops): Update.
96 * win32-low.cc (win32_target_ops): Update.
98 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
100 Turn process_stratum_target's emit_ops op into a method of
103 * target.h (struct process_stratum_target): Remove the target op.
104 (class process_target): Add the target op.
105 (target_emit_ops): Update the macro.
106 * target.cc (process_target::emit_ops): Define.
108 Update the derived classes and callers below.
110 * linux-low.cc (linux_target_ops): Update.
111 (linux_emit_ops): Turn into ...
112 (linux_process_target::emit_ops): ... this.
113 * linux-low.h (class linux_process_target): Update.
114 * lynx-low.cc (lynx_target_ops): Update.
115 * nto-low.cc (nto_target_ops): Update.
116 * win32-low.cc (win32_target_ops): Update.
118 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
120 Turn process_stratum_target's install_fast_tracepoint_jump_pad
121 and get_min_fast_tracepoint_insn_len ops into methods of
124 * target.h (struct process_stratum_target): Remove the target ops.
125 (class process_target): Add the target ops. Also add
126 'supports_fast_tracepoints'.
127 (target_supports_fast_tracepoints): Update the macro.
128 (target_get_min_fast_tracepoint_insn_len): Update the macro.
129 (install_fast_tracepoint_jump_pad): Update and rename the macro
131 (target_install_fast_tracepoint_jump_pad): ... this.
132 * target.cc (process_target::supports_fast_tracepoints): Define.
133 (process_target::install_fast_tracepoint_jump_pad): Define.
134 (process_target::get_min_fast_tracepoint_insn_len): Define.
136 Update the derived classes and callers below.
138 * tracepoint.cc (install_fast_tracepoint): Update.
139 * linux-low.cc (linux_target_ops): Update.
140 (linux_process_target::supports_fast_tracepoints): Define.
141 (linux_install_fast_tracepoint_jump_pad): Turn into ...
142 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
143 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
144 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
145 * linux-low.h (class linux_process_target): Update.
146 * lynx-low.cc (lynx_target_ops): Update.
147 * nto-low.cc (nto_target_ops): Update.
148 * win32-low.cc (win32_target_ops): Update.
150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
152 Turn process_stratum_target's stabilize_threads op into a
153 method of process_target.
155 * target.h (struct process_stratum_target): Remove the target op.
156 (class process_target): Add the target op.
157 (target_stabilize_threads): Update the macro.
158 * target.cc (process_target::stabilize_threads): Define.
160 Update the derived classes and callers below.
162 * server.cc (handle_status): Update.
163 * tracepoint.cc (cmd_qtdp): Update.
164 (cmd_qtstart): Update.
165 * linux-low.cc (linux_target_ops): Update.
166 (linux_stabilize_threads): Turn into ...
167 (linux_process_target::stabilize_threads): ... this.
168 (linux_wait_1): Update.
169 * linux-low.h (class linux_process_target): Update.
170 * lynx-low.cc (lynx_target_ops): Update.
171 * nto-low.cc (nto_target_ops): Update.
172 * win32-low.cc (win32_target_ops): Update.
174 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
176 Turn process_stratum_target's pause_all and unpause_all ops
177 into methods of process_target.
179 * target.h (struct process_stratum_target): Remove the target ops.
180 (class process_target): Add the target ops.
181 (pause_all): Update the macro and rename to...
182 (target_pause_all): ... this.
183 (unpause_all): Update the macro and rename to...
184 (target_unpause_all): ... this.
185 * target.cc (process_target::pause_all): Define.
186 (process_target::unpause_all): Define.
188 Update the derived classes and callers below.
190 * server.cc (handle_status): Update.
191 * tracepoint.cc (clear_installed_tracepoints): Update.
193 (cmd_qtstart): Update.
194 (stop_tracing): Update.
195 (cmd_qtstatus): Update.
196 (upload_fast_traceframes): Update.
197 (run_inferior_command): Update.
198 * linux-low.cc (linux_target_ops): Update.
199 (linux_pause_all): Turn into ...
200 (linux_process_target::pause_all): ... this.
201 (linux_unpause_all): Turn into ...
202 (linux_process_target::unpause_all): ... this.
203 (linux_process_target::prepare_to_access_memory): Update.
204 (linux_process_target::done_accessing_memory): Update.
205 * linux-low.h (class linux_process_target): Update.
206 * lynx-low.cc (lynx_target_ops): Update.
207 * nto-low.cc (nto_target_ops): Update.
208 * win32-low.cc (win32_target_ops): Update.
210 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
212 Turn process_stratum_target's get_tib_address op into a method of
215 * target.h (struct process_stratum_target): Remove the target op.
216 (class process_target): Add the target op. Also add
217 'supports_get_tib_address'.
218 * target.cc (process_target::get_tib_address): Define.
219 (process_target::supports_get_tib_address): Define.
221 Update the derived classes and callers below.
223 * server.cc (handle_query): Update.
224 * linux-low.cc (win32_target_ops): 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.
228 (win32_process_target::supports_get_tib_address): Define.
229 (win32_get_tib_address): Turn into ...
230 (win32_process_target::get_tib_address): ... this.
231 * win32-low.h (class win32_process_target): Update.
233 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
235 Turn process_stratum_target's thread_stopped op into a method of
238 * target.h (struct process_stratum_target): Remove the target op.
239 (class process_target): Add the target op. Also add
240 'supports_thread_stopped'.
241 (target_thread_stopped): Update the macro.
242 * target.cc (process_target::thread_stopped): Define.
243 (process_target::supports_thread_stopped): Define.
244 (prepare_to_access_memory): Update.
246 Update the derived classes and callers below.
248 * server.cc (queue_stop_reply_callback): Update.
249 * linux-low.cc (linux_target_ops): Update.
250 (linux_process_target::supports_thread_stopped): Define.
251 (linux_thread_stopped): Turn into ...
252 (linux_process_target::thread_stopped): ... this.
253 * linux-low.h (class linux_process_target): Update.
254 * lynx-low.cc (lynx_target_ops): Update.
255 * nto-low.cc (nto_target_ops): Update.
256 * win32-low.cc (win32_target_ops): Update.
258 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
260 Turn process_stratum_target's read_pc and write_pc ops into
261 methods of process_target.
263 * target.h (struct process_stratum_target): Remove the target ops.
264 (class process_target): Add the target ops.
265 * target.cc (process_target::read_pc): Define.
266 (process_target::write_pc): Define.
268 Update the derived classes and callers below.
270 * regcache.cc (regcache_read_pc): Update.
271 (regcache_write_pc): Update.
272 * linux-low.cc (linux_target_ops): Update.
273 (linux_read_pc): Turn into ...
274 (linux_process_target::read_pc): ... this.
275 (linux_write_pc): Turn into ...
276 (linux_process_target::write_pc): ... this.
277 * linux-low.h (class linux_process_target): Update.
278 * lynx-low.cc (lynx_target_ops): Update.
279 * nto-low.cc (nto_target_ops): Update.
280 * win32-low.cc (win32_target_ops): Update.
282 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
284 Turn process_stratum_target's supports_tracepoints op into a
285 method of process_target.
287 * target.h (struct process_stratum_target): Remove the target op.
288 (class process_target): Add the target op.
289 (target_supports_tracepoints): Update the macro.
290 * target.cc (process_target::supports_tracepoints): Define.
292 Update the derived classes and callers below.
294 * linux-low.cc (linux_target_ops): Update.
295 (linux_supports_tracepoints): Turn into ...
296 (linux_process_target::supports_tracepoints): ... this.
297 * linux-low.h (class linux_process_target): Update.
298 * lynx-low.cc (lynx_target_ops): Update.
299 * nto-low.cc (nto_target_ops): Update.
300 * win32-low.cc (win32_target_ops): Update.
302 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
304 Turn process_stratum_target's process_qsupported op into a method
307 * target.h (struct process_stratum_target): Remove the target op.
308 (class process_target): Add the target op.
309 (target_process_qsupported): Update the macro.
310 * target.cc (process_target::process_qsupported): Define.
312 Update the derived classes and callers below.
314 * linux-low.cc (linux_target_ops): Update.
315 (linux_process_qsupported): Turn into ...
316 (linux_process_target::process_qsupported): ... this.
317 * linux-low.h (class linux_process_target): Update.
318 * lynx-low.cc (lynx_target_ops): Update.
319 * nto-low.cc (nto_target_ops): Update.
320 * win32-low.cc (win32_target_ops): Update.
322 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
324 Turn process_stratum_target's read_loadmap op into a method of
327 * target.h (struct process_stratum_target): Remove the target op.
328 (class process_target): Add the target op. Also add
329 'supports_read_loadmap'.
330 * target.cc (process_target::read_loadmap): Define.
331 (process_target::supports_read_loadmap): Define.
333 Update the derived classes and callers below.
335 * server.cc (handle_qxfer_fdpic): Update.
336 (handle_query): Update.
337 * linux-low.cc (linux_target_ops): Update.
338 (linux_process_target::supports_read_loadmap): Define.
339 (linux_read_loadmap): Turn into ...
340 (linux_process_target::read_loadmap): ... this.
341 * linux-low.h (class linux_process_target): Update.
342 * lynx-low.cc (lynx_target_ops): Update.
343 * nto-low.cc (nto_target_ops): Update.
344 * win32-low.cc (win32_target_ops): Update.
346 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
348 Turn process_stratum_target's core_of_thread op into a method of
351 * target.h (struct process_stratum_target): Remove the target op.
352 (class process_target): Add the target op.
353 (target_core_of_thread): Update the macro.
354 * target.cc (process_target::core_of_thread): Define.
356 Update the derived classes and callers below.
358 * linux-low.cc (linux_target_ops): Update.
359 (linux_process_target::core_of_thread): Define.
360 * linux-low.h (class linux_process_target): Update.
361 * lynx-low.cc (lynx_target_ops): Update.
362 * nto-low.cc (nto_target_ops): Update.
363 * win32-low.cc (win32_target_ops): Update.
365 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
367 Turn process_stratum_target's handle_monitor_command op into a
368 method of process_target.
370 * target.h (struct process_stratum_target): Remove the target op.
371 (class process_target): Add the target op.
372 (target_handle_monitor_command): Update the macro.
373 * target.cc (process_target::handle_monitor_command): Define.
375 Update the derived classes and callers below.
377 * server.cc (handle_query): Update.
378 * linux-low.cc (linux_target_ops): Update.
379 (linux_process_target::handle_monitor_command): Define.
380 * linux-low.h (class linux_process_target): Update.
381 * lynx-low.cc (lynx_target_ops): Update.
382 * nto-low.cc (nto_target_ops): Update.
383 * win32-low.cc (win32_target_ops): Update.
385 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
387 Turn process_stratum_target's handle_new_gdb_connection op into a
388 method of process_target.
390 * target.h (struct process_stratum_target): Remove the target op.
391 (class process_target): Add the target op.
392 (target_handle_new_gdb_connection): Update the macro.
393 * target.cc (process_target::handle_new_gdb_connection): Define.
395 Update the derived classes and callers below.
397 * linux-low.cc (linux_target_ops): Update.
398 (linux_handle_new_gdb_connection): Turn into ...
399 (linux_process_target::handle_new_gdb_connection): ... this.
400 * linux-low.h (class linux_process_target): Update.
401 * lynx-low.cc (lynx_target_ops): Update.
402 * nto-low.cc (nto_target_ops): Update.
403 * win32-low.cc (win32_target_ops): Update.
405 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
407 Turn process_stratum_target's supports_fork_events,
408 supports_vfork_events, and supports_exec_events ops into methods
411 * target.h (struct process_stratum_target): Remove the target ops.
412 (class process_target): Add the target ops.
413 (target_supports_fork_events): Update the macro.
414 (target_supports_vfork_events): Update the macro.
415 (target_supports_exec_events): Update the macro.
416 * target.cc (process_target::supports_fork_events): Define.
417 (process_target::supports_vfork_events): Define.
418 (process_target::supports_exec_events): Define.
420 Update the derived classes and callers below.
422 * linux-low.cc (linux_target_ops): Update.
423 (linux_supports_fork_events): Turn into ...
424 (linux_process_target::supports_fork_events): ... this.
425 (linux_supports_vfork_events): Turn into ...
426 (linux_process_target::supports_vfork_events): ... this.
427 (linux_supports_exec_events): Turn into ...
428 (linux_process_target::supports_exec_events): ... this.
429 * linux-low.h (class linux_process_target): Update.
430 * lynx-low.cc (lynx_target_ops): Update.
431 * nto-low.cc (nto_target_ops): Update.
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 supports_multi_process op into a
437 method of process_target.
439 * target.h (struct process_stratum_target): Remove the target op.
440 (class process_target): Add the target op.
441 * target.cc (process_target::supports_multi_process): Define.
442 (target_supports_multi_process): Update.
444 Update the derived classes and callers below.
446 * linux-low.cc (linux_target_ops): Update.
447 (linux_supports_multi_process): Turn into ...
448 (linux_process_target::supports_multi_process): ... this.
449 * linux-low.h (class linux_process_target): Update.
450 * lynx-low.cc (lynx_target_ops): Update.
451 * nto-low.cc (nto_target_ops): Update.
452 * win32-low.cc (win32_target_ops): Update.
454 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
456 Turn process_stratum_target's supports_non_stop, async, and
457 start_non_stop ops into methods of process_target.
459 * target.h (struct process_stratum_target): Remove the target ops.
460 (class process_target): Add the target ops.
461 (target_supports_non_stop): Update the macro.
462 (target_async): Update the macro.
463 (start_non_stop): Remove declaration.
464 * target.cc (process_target::supports_non_stop): Define.
465 (process_target::async): Define.
466 (process_target::start_non_stop): Define.
467 (start_non_stop): Remove.
469 Update the derived classes and callers below.
471 * server.cc (handle_qxfer_siginfo): Update.
472 (handle_query): Update.
473 * linux-low.cc (linux_target_ops): Update.
474 (linux_supports_non_stop): Turn into ...
475 (linux_process_target::supports_non_stop): ... this.
476 (linux_async): Turn into ...
477 (linux_process_target::async): ... this.
478 (linux_start_non_stop): Turn into ...
479 (linux_process_target::start_non_stop): ... this.
480 * linux-low.h (class linux_process_target): Update.
481 * lynx-low.cc (lynx_target_ops): Update.
482 * nto-low.cc (nto_target_ops): Update.
483 (nto_supports_non_stop): Remove; rely on the default behavior
485 * win32-low.cc (win32_target_ops): Update.
487 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
489 Turn process_stratum_target's qxfer_siginfo op into a method of
492 * target.h (struct process_stratum_target): Remove the target op.
493 (class process_target): Add the target op. Also add
494 'supports_qxfer_siginfo'.
495 * target.cc (process_target::qxfer_siginfo): Define.
496 (process_target::supports_qxfer_siginfo): Define.
498 Update the derived classes and callers below.
500 * server.cc (handle_qxfer_siginfo): Update.
501 (handle_query): Update.
502 * linux-low.cc (linux_target_ops): Update.
503 (linux_process_target::supports_qxfer_siginfo): Define.
504 (linux_xfer_siginfo): Turn into ...
505 (linux_process_target::qxfer_siginfo): ... this.
506 * linux-low.h (class linux_process_target): Update.
507 * lynx-low.cc (lynx_target_ops): Update.
508 * nto-low.cc (nto_target_ops): Update.
509 * win32-low.cc (win32_target_ops): Update.
511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
513 Turn process_stratum_target's qxfer_osdata op into a method of
516 * target.h (struct process_stratum_target): Remove the target op.
517 (class process_target): Add the target op. Also add
518 'supports_qxfer_osdata'.
519 * target.cc (process_target::qxfer_osdata): Define.
520 (process_target::supports_qxfer_osdata): Define.
522 Update the derived classes and callers below.
524 * server.cc (handle_qxfer_osdata): Update.
525 (handle_query): Update.
526 * linux-low.cc (linux_target_ops): Update.
527 (linux_process_target::supports_qxfer_osdata): Define.
528 (linux_qxfer_osdata): Turn into ...
529 (linux_process_target::qxfer_osdata): ... this.
530 * linux-low.h (class linux_process_target): Update.
531 * lynx-low.cc (lynx_target_ops): Update.
532 * nto-low.cc (nto_target_ops): Update.
533 * win32-low.cc (win32_target_ops): Update.
535 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
537 Turn process_stratum_target's hostio_last_error op into a
538 method of process_target.
540 * target.h (struct process_stratum_target): Remove the target op.
541 (class process_target): Add the target op.
542 * target.cc: Add "hostio.h" to includes.
543 (process_target::hostio_last_error): Define.
545 Update the derived classes and callers below.
547 * hostio.cc (hostio_error): Update.
548 * linux-low.cc: Remove "hostio.h" from includes.
549 (linux_target_ops): Update.
550 * lynx-low.cc (lynx_target_ops): Update.
551 * nto-low.cc (nto_target_ops): Update.
552 * win32-low.h (class win32_process_target): Update.
553 * win32-low.cc (win32_target_ops): Update.
554 (wince_hostio_last_error): Turn into ...
555 (win32_process_target::hostio_last_error): ... this.
557 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
559 Turn process_stratum_target's get_tls_address op into a method of
562 * target.h (struct process_stratum_target): Remove the target op.
563 (class process_target): Add the target op. Also add
564 'supports_get_tls_address'.
565 * target.cc (process_target::get_tls_address): Define.
566 (process_target::supports_get_tls_address): Define.
568 Update the derived classes and callers below.
570 * server.cc (handle_query): Update.
571 * linux-low.cc (linux_target_ops): Update.
572 (linux_process_target::supports_get_tls_address): Define.
573 (linux_process_target::get_tls_address): Define.
574 * linux-low.h (class linux_process_target): Update.
575 * lynx-low.cc (lynx_target_ops): Update.
576 * nto-low.cc (nto_target_ops): Update.
577 * win32-low.cc (win32_target_ops): Update.
579 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
581 Turn process_stratum_target's read_offsets op into a method of
584 * target.h (struct process_stratum_target): Remove the target op.
585 (class process_target): Add the target op. Also add
586 'supports_read_offsets'.
587 * target.cc (process_target::read_offsets): Define.
588 (process_target::supports_read_offsets): Define.
590 Update the derived classes and callers below.
592 * server.cc (handle_query): Update.
593 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
594 (linux_target_ops): Update.
595 (linux_process_target::supports_read_offsets): Define.
596 (linux_read_offsets): Turn into ...
597 (linux_process_target::read_offsets): ... this.
598 * linux-low.h (class linux_process_target): Update.
599 * lynx-low.cc (lynx_target_ops): Update.
600 * nto-low.cc (nto_target_ops): Update.
601 * win32-low.cc (win32_target_ops): Update.
603 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
605 Turn process_stratum_target's stopped_by_watchpoint and
606 stopped_data_address ops into methods of process_target.
608 * target.h (struct process_stratum_target): Remove the target ops.
609 (class process_target): Add the target ops.
610 * target.cc (process_target::stopped_by_watchpoint): Define.
611 (process_target::stopped_data_address): Define.
613 Update the derived classes and callers below.
615 * remote-utils.cc (prepare_resume_reply): Update.
616 * linux-low.cc (linux_target_ops): Update.
617 (linux_stopped_by_watchpoint): Turn into ...
618 (linux_process_target::stopped_by_watchpoint): ... this.
619 (linux_stopped_data_address): Turn into ...
620 (linux_process_target::stopped_data_address): ... this.
621 * linux-low.h (class linux_process_target): Update.
622 * lynx-low.cc (lynx_target_ops): Update.
623 * nto-low.cc (nto_target_ops): Update.
624 (nto_stopped_by_watchpoint): Turn into ...
625 (nto_process_target::stopped_by_watchpoint): ... this.
626 (nto_stopped_data_address): Turn into ...
627 (nto_process_target::stopped_data_address): ... this.
628 * nto-low.h (class nto_process_target): Update.
629 * win32-low.cc (win32_target_ops): Update.
630 (win32_stopped_by_watchpoint): Turn into ...
631 (win32_process_target::stopped_by_watchpoint): ... this.
632 (win32_stopped_data_address): Turn into ...
633 (win32_process_target::stopped_data_address): ... this.
634 * win32-low.h (class win32_process_target): Update.
636 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
638 Turn process_stratum_target's supports_hardware_single_step op into
639 a method of process_target.
641 * target.h (struct process_stratum_target): Remove the target op.
642 (class process_target): Add the target op.
643 (target_supports_hardware_single_step): Update the macro.
644 (target_can_do_hardware_single_step): Remove declaration.
645 * target.cc (process_target::supports_hardware_single_step): Define.
646 (target_can_do_hardware_single_step): Remove.
648 Update the derived classes and callers below.
650 * linux-low.h (class linux_process_target): Update.
651 * linux-low.cc (linux_target_ops): Update.
652 (linux_supports_hardware_single_step): Turn into ...
653 (linux_process_target::supports_hardware_single_step): ... this.
654 * lynx-low.h (class lynx_process_target): Update.
655 * lynx-low.cc (lynx_target_ops): Update.
656 (lynx_process_target::supports_hardware_single_step): Define.
657 * nto-low.h (class nto_process_target): Update.
658 * nto-low.cc (nto_target_ops): Update.
659 (nto_process_target::supports_hardware_single_step): Define.
660 * win32-low.h (class win32_process_target): Update.
661 * win32-low.cc (win32_target_ops): Update.
662 (win32_process_target::supports_hardware_single_step): Define.
664 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
666 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
667 ops into methods of process_target.
669 * target.h (struct process_stratum_target): Remove the target ops.
670 (class process_target): Add the target ops.
671 (target_stopped_by_hw_breakpoint): Update the macro.
672 (target_supports_stopped_by_hw_breakpoint): Update the macro.
673 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
674 (process_target::supports_stopped_by_hw_breakpoint): Define.
676 Update the derived classes and callers below.
678 * linux-low.cc (linux_target_ops): Update.
679 (linux_stopped_by_hw_breakpoint): Turn into ...
680 (linux_process_target::stopped_by_hw_breakpoint): ... this.
681 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
682 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
683 * linux-low.h (class linux_process_target): Update.
684 * lynx-low.cc (lynx_target_ops): Update.
685 * nto-low.cc (nto_target_ops): Update.
686 * win32-low.cc (win32_target_ops): Update.
688 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
690 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
691 ops into methods of process_target.
693 * target.h (struct process_stratum_target): Remove the target ops.
694 (class process_target): Add the target ops.
695 (target_stopped_by_sw_breakpoint): Update the macro.
696 (target_supports_stopped_by_sw_breakpoint): Update the macro.
697 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
698 (process_target::supports_stopped_by_sw_breakpoint): Define.
700 Update the derived classes and callers below.
702 * linux-low.cc (linux_target_ops): Update.
703 (linux_stopped_by_sw_breakpoint): Turn into ...
704 (linux_process_target::stopped_by_sw_breakpoint): ... this.
705 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
706 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
707 * linux-low.h (class linux_process_target): Update.
708 * lynx-low.cc (lynx_target_ops): Update.
709 * nto-low.cc (nto_target_ops): Update.
710 * win32-low.cc (win32_target_ops): Update.
712 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
714 Turn process_stratum_target's insert_point and remove_point ops
715 into methods of process_target.
717 * target.h (struct process_stratum_target): Remove the target ops.
718 (class process_target): Add the target ops.
719 * target.cc (process_target::insert_point): Define.
720 (process_target::remove_point): Define.
722 Update the derived classes and callers below.
724 * mem-break.cc (set_raw_breakpoint_at): Update.
725 (delete_raw_breakpoint): Update.
726 (uninsert_raw_breakpoint): Update.
727 (reinsert_raw_breakpoint): Update.
728 * linux-low.cc (linux_target_ops): Update.
729 (linux_insert_point): Turn into ...
730 (linux_process_target::insert_point): ... this.
731 (linux_remove_point): Turn into ...
732 (linux_process_target::remove_point): ... this.
733 * linux-low.h (class linux_process_target): Update.
734 * lynx-low.cc (lynx_target_ops): Update.
735 * nto-low.cc (nto_target_ops): Update.
736 (nto_insert_point): Turn into ...
737 (nto_process_target::insert_point): ... this.
738 (nto_remove_point): Turn into ...
739 (nto_process_target::remove_point): ... this.
740 * nto-low.h (class nto_process_target): Update.
741 * win32-low.cc (win32_target_ops): Update.
742 (win32_insert_point): Turn into ...
743 (win32_process_target::insert_point): ... this.
744 (win32_remove_point): Turn into ...
745 (win32_process_target::remove_point): ... this.
746 * win32-low.h (class win32_process_target): Update.
748 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
750 Turn process_stratum_target's supports_z_point_type op into a
751 method of process_target.
753 * target.h (struct process_stratum_target): Remove the target op.
754 (class process_target): Add the target op.
755 * target.cc (process_target::supports_z_point_type): Define.
757 Update the derived classes and callers below.
759 * mem-break.cc (z_type_supported): Update.
760 * linux-low.cc (linux_target_ops): Update.
761 (linux_supports_z_point_type): Turn into ...
762 (linux_process_target::supports_z_point_type): ... this.
763 * linux-low.h (class linux_process_target): Update.
764 * lynx-low.cc (lynx_target_ops): Update.
765 * nto-low.cc (nto_target_ops): Update.
766 (nto_supports_z_point_type): Turn into ...
767 (nto_process_target::supports_z_point_type): ... this.
768 * nto-low.h (class nto_process_target): Update.
769 * win32-low.cc (win32_target_ops): Update.
770 (win32_supports_z_point_type): Turn into ...
771 (win32_process_target::supports_z_point_type): ... this.
772 * win32-low.h (class win32_process_target): Update.
774 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
776 Turn process_stratum_target's read_auxv op into a method of
779 * target.h (class process_stratum_target): Remove the target op.
780 (struct process_target): Add the target op. Also add
781 'supports_read_auxv'.
782 * target.cc (process_target::read_auxv): Define.
783 (process_target::supports_read_auxv): Define.
785 Update the derived classes and callers below.
787 * server.cc (handle_qxfer_auxv): Update.
788 (handle_query): Update.
789 * linux-low.cc (linux_target_ops): Update.
790 (linux_process_target::supports_read_auxv): Define.
791 (linux_read_auxv): Turn into ...
792 (linux_process_target::read_auxv): ... this.
793 * linux-low.h (class linux_process_target): Update.
794 * lynx-low.cc (lynx_target_ops): Update.
795 * nto-low.cc (nto_target_ops): Update.
796 (nto_process_target::supports_read_auxv): Define.
797 (nto_read_auxv): Turn into ...
798 (nto_process_target::read_auxv): ... this.
799 * nto-low.h (class nto_process_target): Update.
800 * win32-low.cc (win32_target_ops): Update.
802 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
804 Turn process_stratum_target's request_interrupt op into a method of
807 * target.h (struct process_stratum_target): Remove the target op.
808 (class process_target): Add the target op.
810 Update the derived classes and callers below.
812 * remote-utils.cc (putpkt_binary_1): Update.
813 (input_interrupt): Update.
815 * server.cc (handle_v_requests): Update.
816 * linux-low.cc (linux_target_ops): Update.
817 (linux_request_interrupt): Turn into ...
818 (linux_process_target::request_interrupt): ... this.
819 * linux-low.h (class linux_process_target): Update.
820 * lynx-low.cc (lynx_target_ops): Update.
821 (lynx_request_interrupt): Turn into ...
822 (lynx_process_target::request_interrupt): ... this.
823 * lynx-low.h (class lynx_process_target): Update.
824 * nto-low.cc (nto_target_ops): Update.
825 (nto_request_interrupt): Turn into ...
826 (nto_process_target::request_interrupt): ... this.
827 * nto-low.h (class nto_process_target): Update.
828 * win32-low.cc (win32_target_ops): Update.
829 (win32_request_interrupt): Turn into ...
830 (win32_process_target::request_interrupt): ... this.
831 * win32-low.h (class win32_process_target): Update.
833 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
835 Turn process_stratum_target's look_up_symbols op into a method of
838 * target.h (struct process_stratum_target): Remove the target op.
839 (class process_target): Add the target op.
840 * target.cc (process_target::look_up_symbols): Define.
842 Update the derived classes and callers below.
844 * server.cc (handle_query): Update.
845 * linux-low.cc (linux_target_ops): Update.
846 (linux_look_up_symbols): Turn into ...
847 (linux_process_target::look_up_symbols): ... this.
848 * linux-low.h (class linux_process_target): Update.
849 * lynx-low.cc (lynx_target_ops): Update.
850 * nto-low.cc (nto_target_ops): Update.
851 * win32-low.cc (win32_target_ops): Update.
853 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
855 Turn process_stratum_target's read_memory and write_memory
856 ops into methods of process_target.
858 * target.h (struct process_stratum_target): Remove the target ops.
859 (class process_target): Add the target ops.
861 Update the derived classes and callers below.
863 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
864 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
865 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
866 (arm_get_syscall_trapinfo): Update.
867 * linux-cris-low.cc (cris_breakpoint_at): Update.
868 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
869 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
870 * linux-mips-low.cc (mips_breakpoint_at): Update.
871 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
872 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
873 * linux-sh-low.cc (sh_breakpoint_at): Update.
874 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
875 (sparc_store_gregset_from_stack): Update.
876 (sparc_breakpoint_at): Update.
877 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
878 * linux-tile-low.cc (tile_breakpoint_at): Update.
879 * linux-x86-low.cc (x86_breakpoint_at): Update.
880 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
881 * mem-brea.cc (insert_memory_breakpoint): Update.
882 (validate_inserted_breakpoint): Update.
883 * target.cc (read_inferior_memory): Update.
884 (target_write_memory): Update.
885 * linux-low.cc (linux_target_ops): Update.
886 (linux_read_memory): Make a wrapper around the read_memory target
888 (linux_process_target::read_memory): Rename from linux_read_memory.
889 (linux_write_memory): Turn into ...
890 (linux_process_target::write_memory): ... this.
891 * linux-low.h (class linux_process_target): Update.
892 * lynx-low.cc (lynx_target_ops): Update.
893 (lynx_read_memory): Turn into ...
894 (lynx_process_target::read_memory): ... this.
895 (lynx_write_memory): Turn into ...
896 (lynx_process_target::write_memory): ... this.
897 * lynx-low.h (class lynx_process_target): Update.
898 * nto-low.cc (nto_target_ops): Update.
899 (nto_read_memory): Turn into ...
900 (nto_process_target::read_memory): ... this.
901 (nto_write_memory): Turn into ...
902 (nto_process_target::write_memory): ... this.
903 * nto-low.h (class nto_process_target): Update.
904 * win32-low.cc (win32_target_ops): Update.
905 (win32_read_inferior_memory): Turn into ...
906 (win32_process_target::read_memory): ... this.
907 (win32_write_inferior_memory): Turn into ...
908 (win32_process_target::write_memory): ... this.
909 * win32-low.h (class win32_process_target): Update.
911 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
913 Turn process_stratum_target's prepare_to_access_memory and
914 done_accessing_memory ops into methods of process_target.
916 * target.h (struct process_stratum_target): Remove the target ops.
917 (class process_target): Add the target ops.
918 * target.cc (process_target::prepare_to_access_memory): Define.
919 (process_target::done_accessing_memory): Define.
920 (prepare_to_access_memory): Update.
921 (done_accessing_memory): Update.
923 Update the derived classes and callers below.
925 * linux-low.cc (linux_target_ops): Update.
926 (linux_prepare_to_access_memory): Turn into ...
927 (linux_process_target::prepare_to_access_memory): ... this.
928 (linux_done_accessing_memory): Turn into ...
929 (linux_process_target::done_accessing_memory): ... this.
930 * linux-low.h (class linux_process_target): Update.
931 * lynx-low.cc (lynx_target_ops): Update.
932 * nto-low.cc (nto_target_ops): Update.
933 * win32-low.cc (win32_target_ops): Update.
935 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
937 Turn process_stratum_target's fetch_registers and store_registers
938 ops into methods of process_target.
940 * target.h (struct process_stratum_target): Remove the target ops.
941 (class process_target): Add the target ops.
942 (fetch_inferior_registers): Update the macro.
943 (store_inferior_registers): Update the macro.
945 Update the derived classes and callers below.
947 * linux-low.cc (linux_target_ops): Update.
948 (linux_fetch_registers): Turn into ...
949 (linux_process_target::fetch_registers): ... this.
950 (linux_store_registers): Turn into ...
951 (linux_process_target::store_registers): ... this.
952 * linux-low.h (class linux_process_target): Update.
953 * lynx-low.cc (lynx_target_ops): Update.
954 (lynx_fetch_registers): Turn into ...
955 (lynx_process_target::fetch_registers): ... this.
956 (lynx_store_registers): Turn into ...
957 (lynx_process_target::store_registers): ... this.
958 * lynx-low.h (class lynx_process_target): Update.
959 * nto-low.cc (nto_target_ops): Update.
960 (nto_fetch_registers): Turn into ...
961 (nto_process_target::fetch_registers): ... this.
962 (nto_store_registers): Turn into ...
963 (nto_process_target::store_registers): ... this.
964 * nto-low.h (class nto_process_target): Update.
965 * win32-low.cc (win32_target_ops): Update.
966 (win32_fetch_inferior_registers): Turn into ...
967 (win32_process_target::fetch_registers): ... this.
968 (win32_store_inferior_registers): Turn into ...
969 (win32_process_target::store_registers): ... this.
970 * win32-low.h (class win32_process_target): Update.
972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
974 Turn process_stratum_target's wait op into a method of
977 * target.h (struct process_stratum_target): Remove the target op.
978 (class process_target): Add the target op.
980 Update the derived classes and callers below.
982 * target.cc (target_wait): Update.
983 * linux-low.cc (linux_target_ops): Update.
984 (linux_wait): Turn into ...
985 (linux_process_target::wait): ... this.
986 * linux-low.h (class linux_process_target): Update.
987 * lynx-low.cc (lynx_target_ops): Update.
988 (lynx_wait): Turn into ...
989 (lynx_process_target::wait): ... this.
990 * lynx-low.h (class lynx_process_target): Update.
991 * nto-low.cc (nto_target_ops): Update.
992 (nto_wait): Turn into ...
993 (nto_process_target::wait): ... this.
994 * nto-low.h (class nto_process_target): Update.
995 * win32-low.cc (win32_target_ops): Update.
996 (win32_wait): Turn into ...
997 (win32_process_target::wait): ... this.
998 (do_initial_child_stuff): Update.
999 * win32-low.h (class win32_process_target): Update.
1001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1003 Turn process_stratum_target's resume op into a method of
1006 * target.h (struct process_stratum_target): Remove the target op.
1007 (class process_target): Add the target op.
1009 Update the derived classes and callers below.
1011 * server.cc (resume): Update.
1012 * target.cc (target_stop_and_wait): Update.
1013 (target_continue_no_signal): Update.
1014 (target_continue): Update.
1015 * linux-low.cc (linux_target_ops): Update.
1016 (linux_resume): Turn into ...
1017 (linux_process_target::resume): ... this.
1018 * linux-low.h (class linux_process_target): Update.
1019 * lynx-low.cc (lynx_target_ops): Update.
1020 (lynx_resume): Turn into ...
1021 (lynx_process_target::resume): ... this.
1022 * lynx-low.h (class lynx_process_target): Update.
1023 * nto-low.cc (nto_target_ops): Update.
1024 (nto_resume): Turn into ...
1025 (nto_process_target::resume): ... this.
1026 * nto-low.h (class nto_process_target): Update.
1027 * win32-low.cc (win32_target_ops): Update.
1028 (win32_resume): Turn into ...
1029 (win32_process_target::resume): ... this.
1030 (win32_process_target::detach): Update.
1031 (do_initial_child_stuff): Update.
1032 * win32-low.h (class win32_process_target): Update.
1034 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1036 Turn process_stratum_target's thread_alive op into a method of
1039 * target.h (struct process_stratum_target): Remove the target op.
1040 (class process_target): Add the target op.
1041 (mythread_alive): Update the macro.
1043 Update the derived classes and callers below.
1045 * linux-low.cc (linux_target_ops): Update.
1046 (linux_thread_alive): Turn into ...
1047 (linux_process_target::thread_alive): ... this.
1048 (wait_for_sigstop): Update.
1049 * linux-low.h (class linux_process_target): Update.
1050 * lynx-low.cc (lynx_target_ops): Update.
1051 (lynx_thread_alive): Turn into ...
1052 (lynx_process_target::thread_alive): ... this.
1053 * lynx-low.h (class lynx_process_target): Update.
1054 * nto-low.cc (nto_target_ops): Update.
1055 (nto_thread_alive): Turn into ...
1056 (nto_process_target::thread_alive): ... this.
1057 * nto-low.h (class nto_process_target): Update.
1058 * win32-low.cc (win32_target_ops): Update.
1059 (win32_thread_alive): Turn into ...
1060 (win32_process_target::thread_alive): ... this.
1061 * win32-low.h (class win32_process_target): Update.
1063 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1065 Turn process_stratum_target's join op into a method of
1068 * target.h (struct process_stratum_target): Remove the target op.
1069 (class process_target): Add the target op.
1070 (join_inferior): Update the macro.
1072 Update the derived classes and callers below.
1074 * linux-low.cc (linux_target_ops): Update.
1075 (linux_join): Turn into ...
1076 (linux_process_target::join): ... this.
1077 * linux-low.h (class linux_process_target): Update.
1078 * lynx-low.cc (lynx_target_ops): Update.
1079 (lynx_join): Turn into ...
1080 (lynx_process_target::join): ... this.
1081 * lynx-low.h (class lynx_process_target): Update.
1082 * nto-low.cc (nto_target_ops): Update.
1083 (nto_process_target::join): Define.
1084 * nto-low.h (class nto_process_target): Update.
1085 * win32-low.cc (win32_target_ops): Update.
1086 (win32_join): Turn into ...
1087 (win32_process_target::join): ... this.
1088 * win32-low.h (class win32_process_target): Update.
1090 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1092 Turn process_stratum_target's mourn op into a method of
1095 * target.h (struct process_stratum_target): Remove the target op.
1096 (class process_target): Add the target op.
1098 Update the derived classes and callers below.
1100 * target.cc (target_mourn_inferior): Update.
1101 * linux-low.cc (linux_target_ops): Update.
1102 (linux_mourn): Turn into ...
1103 (linux_process_target::mourn): ... this.
1104 (handle_extended_wait): Update.
1105 (linux_process_target::kill): Update.
1106 (linux_process_target::detach): Update.
1107 * linux-low.h (class linux_process_target): Update.
1108 * lynx-low.cc (lynx_target_ops): Update.
1109 (lynx_mourn): Turn into ...
1110 (lynx_process_target::mourn): ... this.
1111 * lynx-low.h (class lynx_process_target): Update.
1112 * nto-low.cc (nto_target_ops): Update.
1113 (nto_mourn): Turn into ...
1114 (nto_process_target::mourn): ... this.
1115 * nto-low.h (class nto_process_target): Update.
1116 * win32-low.cc (win32_target_ops): Update.
1117 (win32_mourn): Turn into ...
1118 (win32_process_target::mourn): ... this.
1119 * win32-low.h (class win32_process_target): Update.
1121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1123 Turn process_stratum_target's detach op into a method of
1126 * target.h (struct process_stratum_target): Remove the target op.
1127 (class process_target): Add the target op.
1128 (detach_inferior): Update the macro.
1130 Update the derived classes and callers below.
1132 * linux-low.cc (linux_target_ops): Update.
1133 (linux_detach): Turn into ...
1134 (linux_process_target::detach): ... this.
1135 * linux-low.h (class linux_process_target): Update.
1136 * lynx-low.cc (lynx_target_ops): Update.
1137 (lynx_detach): Turn into ...
1138 (lynx_process_target::detach): ... this.
1139 * lynx-low.h (class lynx_process_target): Update.
1140 * nto-low.cc (nto_target_ops): Update.
1141 (nto_detach): Turn into ...
1142 (nto_process_target::detach): ... this.
1143 * nto-low.h (class nto_process_target): Update.
1144 * win32-low.cc (win32_target_ops): Update.
1145 (win32_detach): Turn into ...
1146 (win32_process_target::detach): ... this.
1147 * win32-low.h (class win32_process_target): Update.
1149 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1151 Turn process_stratum_target's kill op into a method of
1154 * target.h (struct process_stratum_target): Remove the target op.
1155 (class process_target): Add the target op.
1157 Update the derived classes and callers below.
1159 * target.cc (kill_inferior): Update.
1160 * linux-low.cc (linux_target_ops): Update.
1161 (linux_kill): Turn into ...
1162 (linux_process_target::kill): ... this.
1163 * linux-low.h (class linux_process_target): Update.
1164 * lynx-low.cc (lynx_target_ops): Update.
1165 (lynx_kill): Turn into ...
1166 (lynx_process_target::kill): ... this.
1167 * lynx-low.h (class lynx_process_target): Update.
1168 * nto-low.cc (nto_target_ops): Update.
1169 (nto_kill): Turn into ...
1170 (nto_process_target::kill): ... this.
1171 * nto-low.h (class nto_process_target): Update.
1172 * win32-low.cc (win32_target_ops): Update.
1173 (win32_kill): Turn into ...
1174 (win32_process_target::kill): ... this.
1175 * win32-low.h (class win32_process_target): Update.
1177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1179 Turn process_stratum_target's attach op into a method of
1182 * target.h (struct process_stratum_target): Remove the target op.
1183 (class process_target): Add the target op.
1184 (myattach): Update the macro.
1186 Update the derived classes and callers below.
1188 * linux-low.cc (linux_target_ops): Update.
1189 (linux_attach): Turn into ...
1190 (linux_process_target::attach): ... this.
1191 * linux-low.h (class linux_process_target): Update.
1192 * lynx-low.cc (lynx_target_ops): Update.
1193 (lynx_attach): Turn into ...
1194 (lynx_process_target::attach): ... this.
1195 * lynx-low.h (class lynx_process_target): Update.
1196 * nto-low.cc (nto_target_ops): Update.
1197 (nto_attach): Turn into ...
1198 (nto_process_target::attach): ... this.
1199 * nto-low.h (class nto_process_target): Update.
1200 * win32-low.cc (win32_target_ops): Update.
1201 (win32_attach): Turn into ...
1202 (win32_process_target::attach): ... this.
1203 * win32-low.h (class win32_process_target): Update.
1205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1207 Turn process_stratum_target's post_create_inferior op into a method
1210 * target.h (struct process_stratum_target): Remove the target op.
1211 (class process_target): Add the target op.
1212 (target_post_create_inferior): Update the macro.
1213 * target.cc (process_target::post_create_inferior): Define.
1215 Update the derived classes and callers below.
1217 * linux-low.cc (linux_target_ops): Update.
1218 (linux_post_create_inferior): Turn into ...
1219 (linux_process_target::post_create_inferior): ... this.
1220 * linux-low.h (class linux_process_target): Update.
1221 * lynx-low.cc (lynx_target_ops): Update.
1222 * nto-low.cc (nto_target_ops): Update.
1223 * win32-low.cc (win32_target_ops): Update.
1225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1227 Turn process_stratum_target's create_inferior op into a method of
1230 * target.h (struct process_stratum_target): Remove the target op.
1231 (class process_target): Add the target op.
1232 (create_inferior): Rename the macro to ...
1233 (target_create_inferior): ... this.
1235 Update the derived classes and callers below.
1237 * server.cc (handle_v_run): Update.
1238 (captured_main): Update.
1239 (process_serial_event): Update.
1240 * linux-low.cc (linux_target_ops): Update.
1241 (linux_create_inferior): Turn into ...
1242 (linux_process_target::create_inferior): ... this.
1243 * linux-low.h (class linux_process_target): Update.
1244 * lynx-low.cc (lynx_target_ops): Update.
1245 (lynx_create_inferior): Turn into ...
1246 (lynx_process_target::create_inferior): ... this.
1247 * lynx-low.h (class lynx_process_target): Update.
1248 * nto-low.cc (nto_target_ops): Update.
1249 (nto_create_inferior): Turn into ...
1250 (nto_process_target::create_inferior): ... this.
1251 * nto-low.h (class nto_process_target): Update.
1252 * win32-low.cc (win32_target_ops): Update.
1253 (win32_create_inferior): Turn into ...
1254 (win32_process_target::create_inferior): ... this.
1255 * win32-low.h (class win32_process_target): Update.
1257 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1259 * target.h (class process_target): New class definition.
1260 (struct process_stratum_target) <pt>: New field with type
1262 * linux-low.h (class linux_process_target): Define as a derived
1263 class of 'process_target'.
1264 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1266 * lynx-low.h (class lynx_process_target): Define as a derived
1267 class of 'process_target'.
1268 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1270 * nto-low.h (class nto_process_target): Define as a derived
1271 class of 'process_target'.
1272 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1274 * win32-low.h (class win32_process_target): Define as a derived
1275 class of 'process_target'.
1276 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1279 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1281 * configure: Regenerate.
1283 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1284 Andrew Burgess <andrew.burgess@embecosm.com>
1286 * linux-riscv-low.cc: New file.
1287 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1288 and nat/riscv-linux-tdesc.c.
1289 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1290 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1293 2020-02-14 Tom Tromey <tom@tromey.com>
1295 * acinclude.m4: Don't include acx_configure_dir.m4.
1296 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1297 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1298 (all, install-only, uninstall, clean-info, clean)
1299 (maintainer-clean): Don't recurse.
1300 (subdir_do, all-lib): Remove.
1301 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1303 (generated_files): Update.
1304 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1305 * configure: Rebuild.
1306 * configure.ac: Don't configure gnulib or libiberty.
1309 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1311 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1312 preparing the command line for CreateProcess.
1313 (win32_create_inferior): Reflect the program name in debugging
1314 output that shows the process and its command line.
1316 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1318 * Makefile.in: Rename source files from .c to .cc.
1319 * %.c: Rename to %.cc.
1320 * configure.ac: Rename server.c to server.cc.
1321 * configure: Re-generate.
1323 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1325 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1327 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1329 * win32-low.c (win32_create_inferior): Set signal_pid.
1331 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1332 Pedro Alves <palves@redhat.com>
1334 Skip building gdbserver in a cross-configuration.
1335 * configure.srv: Set $gdbserver_host depending on whether $target
1336 is $host. Use $gdbserver_host instead of $host.
1338 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1340 * configure: Re-generate.
1342 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1344 * configure: Re-generate.
1346 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1348 * acinclude.m4: Update warning.m4 path.
1350 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1352 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1353 (handle_exception): Set siginfo_er.
1354 (win32_xfer_siginfo): New function.
1356 2020-02-07 Tom Tromey <tom@tromey.com>
1357 Pedro Alves <palves@redhat.com>
1359 * README: Update build documentation.
1360 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1362 * configure.ac: Update paths.
1363 * configure: Rebuild.
1364 * acinclude.m4: Update paths.
1365 * Makefile.in: Update include paths.
1366 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1367 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1368 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1369 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1370 (%-generated.c): Update paths.
1371 * Move entire directory from ../gdb/gdbserver.
1373 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1375 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1377 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1379 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1380 assignment instead of srv_linux_obj.
1382 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1384 * server.c (handle_qxfer_libraries): Write segment-address with
1387 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1389 * Makefile.in (install-strip): New target.
1390 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1391 * aclocal.m4: Regenerate.
1392 * configure: Regenerate.
1393 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1395 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1397 * Makefile.in (SFILES): Adjust paths to point to real files.
1398 (OBS): Move waitstatus.o to target/waitstatus.o.
1399 (TAGS): Transform paths appropriately.
1401 (nat/%.o): ... this pattern rule.
1403 (target/%.o): ... this pattern rule.
1404 * configure.srv: Adjust paths throughout to include nat/ prefix
1405 with the revant files.
1406 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1407 * configure: Regenerate.
1409 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1411 * Makefile.in (TAGS): Remove config files from the recipe.
1413 2020-01-14 Tom Tromey <tom@tromey.com>
1415 * configure: Rebuild.
1416 * configure.ac: Remove any checks that were added to common.m4.
1417 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1420 2020-01-14 Tom Tromey <tom@tromey.com>
1422 * server.h: Include config.h.
1423 * gdbreplay.c: Include config.h.
1424 * configure: Rebuild.
1425 * configure.ac: Don't source common.host.
1426 * acinclude.m4: Update path.
1427 * Makefile.in (INCSUPPORT): New variable.
1428 (INCLUDE_CFLAGS): Add INCSUPPORT.
1429 (SFILES): Update paths.
1430 (version-generated.c): Update path to create-version.sh.
1431 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1433 2020-01-14 Tom Tromey <tom@tromey.com>
1435 * configure.ac (LIBS): Use WIN32APILIBS.
1436 (USE_WIN32API): Don't define.
1437 * configure: Rebuild.
1439 2020-01-14 Tom Tromey <tom@tromey.com>
1441 * configure: Rebuild.
1443 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1445 * Makefile.in (%-generated.c): Remove rule for files from
1448 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1450 * configure: Re-generate.
1452 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1454 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1456 * tracepoint.c (stop_tracing, flush_trace_buffer,
1457 about_to_request_buffer_space, get_trace_state_variable_value,
1458 set_trace_state_variable_value, gdb_collect): Add declaration.
1460 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1462 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1463 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1464 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1465 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1466 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1469 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1471 * inferiors.c: Include gdbsupport/common-inferior.h.
1473 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1475 * hostio-errno.c: Include hostio.h.
1477 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1479 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1482 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1484 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1485 * linux-arm-tdesc.h: Include arch/arm.h.
1487 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1489 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1491 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1493 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1494 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1496 2020-01-10 Pedro Alves <palves@redhat.com>
1498 * fork-child.c (post_fork_inferior): Pass target down to
1500 * inferiors.c (switch_to_thread): Add process_stratum_target
1502 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1503 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1504 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1505 * remote-utils.c (prepare_resume_reply): Pass the target to
1507 * target.c (the_target): Now a process_stratum_target.
1508 (done_accessing_memory): Pass the target to switch_to_thread.
1509 (set_target_ops): Ajust to use process_stratum_target.
1510 * target.h (struct target_ops): Rename to ...
1511 (struct process_stratum_target): ... this.
1512 (the_target, set_target_ops): Adjust.
1513 (prepare_to_access_memory): Adjust comment.
1514 * win32-low.c (child_xfer_memory): Adjust to use
1515 process_stratum_target.
1516 (win32_target_ops): Now a process_stratum_target.
1518 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1519 Pedro Alves <palves@redhat.com>
1521 * win32-low.c (get_child_debug_event): Extract the fatal exception
1522 from the exit status and convert to the equivalent Posix signal
1524 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1525 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1527 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1529 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1531 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1533 * server.c (gdbserver_version): Change copyright year to 2020.
1534 * gdbreplay.c (gdbreplay_version): Likewise.
1536 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1538 * configure: Regenerate.
1539 * configure.ac: Quote variable arguments of test.
1541 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1543 * Makefile.in: Fix build with GNU Make 3.81
1545 2019-12-16 Tom Tromey <tromey@adacore.com>
1547 * server.c (get_exec_file): Constify result.
1549 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1551 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1552 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1553 * config.in: Regenerate.
1554 * configure: Regenerate.
1555 * configure.ac: Don't check for strerror.
1556 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1557 Call safe_strerror instead of strerror.
1558 * server.h (strerror): Remove this now-unnecessary declaration.
1559 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1561 (gdb_agent_helper_thread): Likewise.
1562 * utils.c (perror_with_name): Likewise.
1564 2019-11-26 Tom Tromey <tom@tromey.com>
1566 * configure, config.in: Rebuild.
1568 2019-11-26 Tom Tromey <tom@tromey.com>
1570 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1571 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1573 * configure, config.in: Rebuild.
1575 2019-11-26 Tom Tromey <tom@tromey.com>
1577 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1578 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1579 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1580 * acinclude.m4: Include ax_pthread.m4.
1581 * config.in, configure: Rebuild.
1583 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1585 * debug.c (debug_set_output): Call safe_strerror instead of
1587 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1588 (linux_kill_one_lwp): Likewise.
1589 (linux_detach_one_lwp): Likewise.
1590 (linux_wait_for_event_filtered): Likewise.
1591 (store_register): Likewise.
1592 * lynx-low.c (lynx_attach): Likewise.
1593 * mem-break.c (insert_memory_breakpoint): Likewise.
1594 (remove_memory_breakpoint): Likewise.
1595 (delete_fast_tracepoint_jump): Likewise.
1596 (set_fast_tracepoint_jump): Likewise.
1597 (uninsert_fast_tracepoint_jumps_at): Likewise.
1598 (reinsert_fast_tracepoint_jumps_at): Likewise.
1599 * nto-low.c (nto_xfer_memory): Likewise.
1600 (nto_resume): Likewise.
1602 2019-11-20 Luis Machado <luis.machado@linaro.org>
1604 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1605 instead of register count.
1606 * tdesc.c (tdesc_contains_feature): New function.
1607 * tdesc.h (tdesc_contains_feature): New prototype.
1609 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1611 * Makefile.in: Add safe-strerror.c.
1612 * configure: Regenerate.
1613 * configure.ac: Don't source common.host.
1615 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1617 * config.in: Regenerate.
1618 * configure: Regenerate.
1620 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1622 * ax.c (ax_printf): Handle size_t_arg.
1624 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1626 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1627 * mi/mi-main.c (output_cores): Likewise.
1628 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1629 (linux_xfer_osdata_modules): Likewise.
1630 * remote.c (register_remote_support_xml): Likewise.
1631 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1632 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1634 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1636 * configure: Regenerate.
1637 * configure.ac: Remove check for strerror_r.
1639 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1641 * config.in: Regenerate.
1642 * configure: Regenerate.
1643 * configure.ac: Also check for strerror_r.
1645 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1647 * ax.h (debug_agent): Remove duplicate declaration.
1649 2019-10-26 Tom de Vries <tdevries@suse.de>
1651 * linux-aarch64-low.c: Fix typos in comments.
1652 * linux-arm-low.c: Same.
1653 * linux-low.c: Same.
1654 * linux-ppc-low.c: Same.
1655 * proc-service.c: Same.
1658 * tracepoint.c: Same.
1659 * win32-low.c: Same.
1661 2019-10-25 Tom Tromey <tromey@adacore.com>
1663 * utils.c (xstrdup): Remove.
1665 2019-10-23 Tom Tromey <tom@tromey.com>
1667 * configure, config.in: Rebuild.
1669 2019-10-23 Tom Tromey <tom@tromey.com>
1671 * configure: Rebuild.
1672 * acinclude.m4: Use m4_include, not sinclude.
1674 2019-10-17 Tom Tromey <tromey@adacore.com>
1676 * configure: Rebuild.
1677 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1678 in AC_CONFIG_FILES invocation.
1679 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1682 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1684 * server.c: Include xml-builtin.h.
1685 (get_xml_features): Don't declare xml_builtins here.
1687 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1689 * Makefile.in: Remove references to vec-ipa.o.
1691 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1693 * Makefile.in: Remove references to vec.c.
1695 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1697 * server.c (server_waiting): Change to bool.
1698 (extended_protocol): Likewise.
1699 (response_needed): Likewise.
1700 (exit_requested): Likewise.
1701 (run_once): Likewise.
1702 (report_no_resumed): Likewise.
1703 (non_stop): Likewise.
1704 (disable_packet_vCont): Likewise.
1705 (disable_packet_Tthread): Likewise.
1706 (disable_packet_qC): Likewise.
1707 (disable_packet_qfThreadInfo): Likewise.
1708 (handle_general_set): Update.
1709 (handle_detach): Update.
1710 (handle_monitor_command): Update.
1711 (handle_query): Update.
1712 (captured_main): Update.
1713 (process_serial_event): Update.
1714 * server.h (server_waiting): Change to bool.
1715 (disable_packet_vCont): Likewise.
1716 (disable_packet_Tthread): Likewise.
1717 (disable_packet_qC): Likewise.
1718 (disable_packet_qfThreadInfo): Likewise.
1719 (run_once): Likewise.
1720 (non_stop): Likewise.
1721 * target.c (target_stop_and_wait): Update.
1723 2019-10-02 Tom Tromey <tromey@adacore.com>
1725 * Makefile.in (SFILES): Add common-inferior.c.
1726 (OBS): Add common-inferior.o.
1727 * server.c (startup_with_shell): Don't define.
1729 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1731 * linux-low.c (linux_low_read_btrace): Update for change to
1734 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1736 * debug.c (debug_threads): Remove comment in favor of the header.
1737 * debug.h (using_threads): Add declaration.
1738 (debug_threads): Add comment.
1739 * linux-aarch64-low.c: Include debug.h and remove declaration of
1741 * nto-low.c: Likewise.
1742 * remote-utils.c: Likewise.
1743 * thread-db.c: Likewise.
1745 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1747 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1748 and powerpc-cell64l-ipa.o.
1749 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1750 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1751 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1754 * spu-low.c: Remove file.
1756 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1757 (parse_spufs_run): Remove.
1758 (ppc_get_pc): Remove Cell/B.E. support.
1759 (ppc_set_pc): Likewise.
1760 (ppc_breakpoint_at): Likewise.
1761 (ppc_arch_setup): Likewise.
1762 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1763 tdesc_powerpc_cell32l.
1764 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1765 or init_registers_powerpc_cell32l.
1766 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1767 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1768 or init_registers_powerpc_cell32l.
1769 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1770 (init_registers_powerpc_cell32l): Remove prototype.
1771 (init_registers_powerpc_cell64l): Likewise.
1773 * target.h (struct target_ops): Remove qxfer_spu member.
1774 * server.c (handle_qxfer_spu): Remove.
1775 (qxfer_packets): Remove entry for "spu".
1776 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1777 * linux-low.c (SPUFS_MAGIC): Remove.
1778 (spu_enumerate_spu_ids): Remove.
1779 (linux_qxfer_spu): Remove.
1780 (linux_target_ops): Remove qxfer_spu member.
1781 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1782 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1783 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1785 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1787 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1788 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1789 * config.in: Regenerate.
1790 * configure: Regenerate.
1792 2019-08-15 Tom Tromey <tromey@adacore.com>
1794 * target.c (target_write_memory): Use gdb::byte_vector.
1796 2019-08-15 Tom Tromey <tromey@adacore.com>
1798 * tracepoint.c (write_inferior_data_pointer)
1799 (write_inferior_integer, write_inferior_int8)
1800 (write_inferior_uinteger, m_tracepoint_action_download)
1801 (r_tracepoint_action_download, x_tracepoint_action_download)
1802 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1803 (download_agent_expr, download_tracepoint_1)
1804 (download_trace_state_variables, upload_fast_traceframes): Update.
1805 * server.c (gdb_write_memory): Update.
1806 * remote-utils.c (relocate_instruction): Update.
1807 * proc-service.c (ps_pdwrite): Update.
1808 * mem-break.c (remove_memory_breakpoint)
1809 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1810 (uninsert_fast_tracepoint_jumps_at)
1811 (reinsert_fast_tracepoint_jumps_at): Update.
1812 * linux-x86-low.c (append_insns)
1813 (i386_install_fast_tracepoint_jump_pad)
1814 (amd64_write_goto_address, i386_write_goto_address): Update.
1815 * linux-s390-low.c (append_insns, s390_write_goto_address):
1817 * linux-ppc-low.c (ppc_relocate_instruction)
1818 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1819 (ppc_write_goto_address): Update.
1820 * linux-aarch64-low.c (append_insns): Update.
1821 * target.h (struct target_ops): Update.
1822 (write_inferior_memory): Don't declare.
1823 * target.c (target_write_memory): Rename from
1824 write_inferior_memory. Remove old target_write_memory.
1826 2019-08-15 Tom Tromey <tromey@adacore.com>
1828 * target.c (write_inferior_memory): Use std::vector.
1830 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1833 * configure.ac: Drop enable-libmcheck support.
1834 * configure, config.in: Rebuild.
1835 * acinclude.m4: Don't include it.
1837 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1839 * configure.srv: Remove Arm xml files.
1841 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1843 * configure.srv: Add new files. Remove xml generated files.
1844 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1846 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1847 * linux-aarch32-tdesc.c: New file.
1848 * linux-aarch32-tdesc.h: New file.
1849 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1850 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1851 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1852 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1853 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1854 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1855 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1856 (arm_read_description): Call arm_linux_read_description.
1857 (initialize_low_arch): Don't init registers.
1858 * linux-arm-tdesc.c: New file.
1859 * linux-arm-tdesc.h: New file.
1861 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1863 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1864 Move counter inside for.
1865 (arm_read_description): Check ptrace earlier.
1866 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1868 2019-07-09 Tom Tromey <tom@tromey.com>
1870 * configure: Rebuild.
1871 * configure.ac: Change common to gdbsupport.
1872 * acinclude.m4: Change common to gdbsupport.
1873 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1874 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1875 common to gdbsupport.
1876 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1877 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1878 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1879 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1880 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1881 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1882 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1883 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1884 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1885 common to gdbsupport.
1887 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1889 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1891 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1893 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1895 * configure.srv: Remove legacy xml.
1896 * linux-aarch64-low.c (initialize_low_arch): Remove
1897 initialize_low_tdesc call.
1898 * linux-aarch64-tdesc-selftest.c: Remove file.
1899 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1900 * linux-x86-low.c (initialize_low_arch): Remove
1901 initialize_low_tdesc call.
1902 * linux-x86-tdesc-selftest.c: Remove file.
1903 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1905 2019-06-20 Tom de Vries <tdevries@suse.de>
1907 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1908 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1910 2019-06-19 Tom de Vries <tdevries@suse.de>
1912 * debug.h (debug_write): Change return type to ssize_t.
1913 * debug.c (debug_write): Same.
1915 2019-06-14 Tom Tromey <tom@tromey.com>
1917 * configure.ac: Use new path to gnulib.
1918 * configure: Rebuild.
1919 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1922 2019-06-11 Tom Tromey <tom@tromey.com>
1924 * Makefile.in (SFILES): Add alloc.c.
1926 (IPA_OBJS): Add alloc-ipa.o.
1927 (alloc-ipa.o): New target.
1928 (%.o: ../%.c): New pattern rule.
1930 2019-06-10 Tom Tromey <tromey@adacore.com>
1932 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1933 end warning with a newline.
1934 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1936 * thread-db.c (attach_thread): Don't end warning with a newline.
1937 (thread_db_notice_clone): Likewise.
1938 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1940 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1941 end warning with a newline.
1943 2019-06-04 Pedro Alves <palves@redhat.com>
1945 * server.c (captured_main): Use make_unique_xstrdup.
1947 2019-06-02 Tom Tromey <tom@tromey.com>
1949 * gdbreplay.c (fromhex): Remove.
1950 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1952 2019-05-29 Tom Tromey <tromey@adacore.com>
1954 * configure: Rebuild.
1956 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1958 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1959 sign extension code on 32-bit builds.
1961 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1964 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1966 2019-04-19 Tom Tromey <tom@tromey.com>
1968 * server.c (struct vstop_notif): Derive from notif_event.
1970 (queue_stop_reply): Update.
1971 (remove_all_on_match_ptid): Change type. Rewrite.
1972 (discard_queued_stop_replies): Rewrite.
1973 (in_queued_stop_replies_ptid): Change type.
1974 (in_queued_stop_replies): Rewrite.
1975 (notif_stop): Update.
1976 (queue_stop_reply_callback): Update.
1977 (captured_main): Don't call initialize_notif.
1978 (push_stop_notification): Update.
1979 * notif.c (notif_write_event, handle_notif_ack)
1980 (notif_event_enque, notif_push): Update.
1981 (notif_event_xfree, initialize_notif): Remove.
1982 * notif.h (struct notif_event): Include <list>, not
1984 (struct notif_server) <queue>: Now a std::list.
1985 (notif_event_p): Remove typedef.
1986 (initialize_notif): Don't declare.
1987 (struct notif_event): Add virtual destructor.
1989 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1991 * ax.c (ax_vdebug): Call debug_printf.
1992 * debug.c (debug_write): New function.
1993 * debug.h (debug_write): New declaration.
1994 * linux-low.c (sigchld_handler): Call debug_write.
1996 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1998 * debug.c (debug_set_output): New function.
1999 (debug_vprintf): Send output to debug_file.
2000 (debug_flush): Likewise.
2001 * debug.h (debug_set_output): New declaration.
2002 * server.c (handle_monitor_command): Add debug-file option.
2003 (captured_main): Likewise.
2005 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2007 * debug.c (remote_debug): Add definition.
2008 * debug.h (remote_debug): Add declaration.
2009 * hostio.c (remote_debug): Remove declaration.
2010 * remote-utils.c (struct ui_file): Likewise.
2011 (remote_debug): Likewise.
2012 * remote-utils.h (remote_debug): Likewise,
2013 * server.c (remote_debug): Remove definition.
2015 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2017 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2018 when using a 64-bit gdbserver.
2020 2019-04-09 Tom Tromey <tromey@adacore.com>
2022 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2024 2019-04-08 Tom Tromey <tom@tromey.com>
2026 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2028 (linux_resume_one_lwp): Likewise.
2030 2019-04-08 Tom Tromey <tom@tromey.com>
2032 * gdbreplay.c: Update.
2033 * linux-low.c: Update.
2036 2019-04-08 Tom Tromey <tom@tromey.com>
2038 * server.c: Use C++ exception handling.
2039 * linux-low.c: Use C++ exception handling.
2040 * gdbreplay.c: Use C++ exception handling.
2042 2019-04-08 Tom Tromey <tom@tromey.com>
2044 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2045 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2046 (captured_main, main): Update.
2047 * gdbreplay.c (main): Update.
2049 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2051 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2052 value in argument pointer, return 1 if the entry is found and 0
2053 otherwise. Move comment.
2054 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2055 * linux-low.h (linux_get_auxv): Declare.
2056 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2058 2019-04-05 Tom Tromey <tromey@adacore.com>
2060 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2063 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2065 * linux-low.c (AT_HWCAP2): Add define if not already included.
2067 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2069 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2070 (aarch64_arch_setup): Call linux_get_hwcap.
2071 * linux-arm-low.c (arm_get_hwcap): Remove function.
2072 (arm_read_description): Call linux_get_hwcap.
2073 * linux-low.c (linux_get_auxv): New function.
2074 (linux_get_hwcap): Likewise.
2075 (linux_get_hwcap2): Likewise.
2076 * linux-low.h (linux_get_hwcap): New declaration.
2077 (linux_get_hwcap2): Likewise.
2078 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2079 (ppc_arch_setup): Call linux_get_hwcap.
2080 * linux-s390-low.c (s390_get_hwcap): Remove function.
2081 (s390_arch_setup): Call linux_get_hwcap.
2083 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2084 Jiong Wang <jiong.wang@arm.com>
2086 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2087 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2089 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2091 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2092 Jiong Wang <jiong.wang@arm.com>
2094 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2095 (aarch64_get_hwcap): New function.
2096 (aarch64_arch_setup): Read APIA hwcap.
2098 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2099 Jiong Wang <jiong.wang@arm.com>
2101 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2102 (initialize_low_tracepoint): Likewise.
2103 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2104 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2105 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2106 (aarch64_linux_read_description): Likewise.
2107 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2109 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2111 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2112 i386_create_target_description for 'segments' parameter.
2113 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2114 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2115 * win32-i386-low.c (i386_arch_setup): Likewise.
2117 2019-03-12 Tom Tromey <tromey@adacore.com>
2119 * linux-low.c (iterate_over_lwps): Update.
2121 2019-03-06 Tom Tromey <tom@tromey.com>
2123 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2124 (captured_main): Use SCOPE_EXIT.
2126 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2128 * configure.srv: Use '$enable_unittest' instead of '$development'
2129 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2132 2019-02-27 Tom Tromey <tromey@adacore.com>
2134 * gdbreplay.c (logchar): Handle \r\n.
2136 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2138 * linux-low.c (linux_attach): Add process before lwp.
2139 * server.c (attach_inferior): Check if already attached.
2141 2019-02-07 Tom Tromey <tom@tromey.com>
2143 * x86-tdesc.h: Rename include guard.
2144 * x86-low.h: Add include guard.
2145 * wincecompat.h: Rename include guard.
2146 * win32-low.h: Add include guard.
2147 * utils.h: Rename include guard.
2148 * tracepoint.h: Rename include guard.
2149 * tdesc.h: Rename include guard.
2150 * target.h: Rename include guard.
2151 * server.h: Rename include guard.
2152 * remote-utils.h: Rename include guard.
2153 * regcache.h: Rename include guard.
2154 * nto-low.h: Rename include guard.
2155 * notif.h: Add include guard.
2156 * mem-break.h: Rename include guard.
2157 * lynx-low.h: Add include guard.
2158 * linux-x86-tdesc.h: Add include guard.
2159 * linux-s390-tdesc.h: Add include guard.
2160 * linux-ppc-tdesc-init.h: Add include guard.
2161 * linux-low.h: Add include guard.
2162 * linux-aarch64-tdesc.h: Add include guard.
2163 * linux-aarch32-low.h: Add include guard.
2164 * inferiors.h: Rename include guard.
2165 * i387-fp.h: Rename include guard.
2166 * hostio.h: Rename include guard.
2167 * gdbthread.h: Rename include guard.
2168 * gdb_proc_service.h: Rename include guard.
2169 * event-loop.h: Rename include guard.
2170 * dll.h: Rename include guard.
2171 * debug.h: Rename include guard.
2172 * ax.h: Rename include guard.
2174 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2177 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2178 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2180 2019-01-25 Tom Tromey <tom@tromey.com>
2182 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2184 2019-01-25 Tom Tromey <tom@tromey.com>
2186 * win32-low.c: Fix common/ includes.
2187 * win32-i386-low.c: Fix common/ includes.
2188 * tracepoint.c: Fix common/ includes.
2189 * thread-db.c: Fix common/ includes.
2190 * target.h: Fix common/ includes.
2191 * symbol.c: Fix common/ includes.
2192 * spu-low.c: Fix common/ includes.
2193 * server.h: Fix common/ includes.
2194 * server.c: Fix common/ includes.
2195 * remote-utils.c: Fix common/ includes.
2196 * regcache.h: Fix common/ includes.
2197 * regcache.c: Fix common/ includes.
2198 * nto-x86-low.c: Fix common/ includes.
2199 * notif.h: Fix common/ includes.
2200 * mem-break.h: Fix common/ includes.
2201 * lynx-low.c: Fix common/ includes.
2202 * lynx-i386-low.c: Fix common/ includes.
2203 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2204 * linux-x86-low.c: Fix common/ includes.
2205 * linux-low.c: Fix common/ includes.
2206 * inferiors.h: Fix common/ includes.
2207 * i387-fp.c: Fix common/ includes.
2208 * hostio.c: Fix common/ includes.
2209 * hostio-errno.c: Fix common/ includes.
2210 * gdbthread.h: Fix common/ includes.
2211 * gdbreplay.c: Fix common/ includes.
2212 * fork-child.c: Fix common/ includes.
2213 * event-loop.c: Fix common/ includes.
2215 (enum gdb_agent_op): Fix common/ includes.
2217 2019-01-21 Tom Tromey <tom@tromey.com>
2219 * tracepoint.c: Fix includes.
2220 * remote-utils.c: Fix includes.
2221 * linux-x86-low.c: Fix includes.
2223 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2225 * gdbreplay.c (gdbreplay_version): Update copyright year in
2227 * server.c (gdbserver_version): Likewise.
2229 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2231 * linux-low.c (add_lwp): Switch ordering.
2233 2018-11-29 Tom Tromey <tom@tromey.com>
2235 * win32-low.c (win32_join): Take pid, not process.
2236 * target.h (struct target_ops) <join>: Change argument type.
2237 (join_inferior): Change argument name.
2238 * spu-low.c (spu_join): Take pid, not process.
2239 * server.c (handle_detach): Preserve pid before destroying
2241 * lynx-low.c (lynx_join): Take pid, not process.
2242 * linux-low.c (linux_join): Take pid, not process.
2244 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2246 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2247 (aarch64_cannot_fetch_register): Likewise.
2248 (struct linux_target_ops): Update references.
2250 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2252 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2254 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2256 * configure.srv (ipa_ppc_linux_regobj): Add
2257 powerpc-isa207-htm-vsx32l-ipa.o and
2258 powerpc-isa207-htm-vsx64l-ipa.o.
2259 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2260 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2261 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2262 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2263 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2264 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2265 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2266 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2267 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2268 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2269 (init_registers_powerpc_isa207_htm_vsx32l)
2270 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2271 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2272 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2273 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2274 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2275 (ppc_store_tm_ctarregset): New functions.
2276 (ppc_regsets): Add entries for HTM regsets.
2277 (ppc_arch_setup): Set htm in features struct when needed. Set
2278 sizes for the HTM regsets.
2279 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2280 (initialize_low_arch): Call
2281 init_registers_powerpc_isa207_htm_vsx32l and
2282 init_registers_powerpc_isa207_htm_vsx64l.
2283 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2284 PPC_TDESC_ISA207_HTM_VSX.
2285 (initialize_low_tracepoint): Call
2286 init_registers_powerpc_isa207_htm_vsx32l and
2287 init_registers_powerpc_isa207_htm_vsx64l.
2289 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2291 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2292 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2293 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2294 (ppc_store_pmuregset): New functions.
2295 (ppc_regsets): Add entries for ebb and pmu regsets.
2296 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2297 pmu regsets are available. Set sizes for these regsets.
2299 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2301 * configure.srv (ipa_ppc_linux_regobj): Add
2302 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2303 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2304 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2305 rs6000/powerpc-isa207-vsx32l.xml, and
2306 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2307 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2308 <PPC_TDESC_ISA207_VSX>: New enum value.
2309 (init_registers_powerpc_isa207_vsx32l): Declare.
2310 (init_registers_powerpc_isa207_vsx64l): Declare.
2311 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2312 (ppc_store_tarregset): New function.
2313 (ppc_regsets): Add entry for the TAR regset.
2314 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2315 size for the TAR regsets.
2316 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2317 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2318 and init_registers_powerpc_isa207_vsx64l.
2319 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2320 (initialize_low_tracepoint): Call
2321 init_registers_powerpc_isa207_vsx32l and
2322 init_registers_powerpc_isa207_vsx64l.
2324 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2325 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2327 * configure.srv (ipa_ppc_linux_regobj): Add
2328 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2329 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2330 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2331 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2332 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2333 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2334 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2335 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2336 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2337 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2338 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2339 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2340 (ppc_hwcap): Add comment.
2341 (ppc_hwcap2): New global.
2342 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2343 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2344 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2345 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2346 when needed. Set sizes for the the DSCR and PPR regsets.
2347 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2348 (initialize_low_arch): Call
2349 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2350 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2351 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2352 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2353 (initialize_low_tracepoint): Call
2354 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2355 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2357 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2359 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2361 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2362 Simon Marchi <simark@simark.ca>
2364 * acinclude.m4: Include "../selftest.m4".
2365 * configure: Regenerate.
2366 * configure.ac: Use "GDB_AC_SELFTEST".
2367 * configure.srv: Use "$enable_unittests" instead of
2368 "$development" when checking whether unit tests have been
2370 * server.c (captured_main): Update message informing that
2371 selftests have been disabled.
2373 2018-10-04 Tom Tromey <tom@tromey.com>
2375 * configure: Rebuild.
2377 2018-10-04 Tom Tromey <tom@tromey.com>
2379 * server.c (handle_status): Rename inner "thread".
2380 (process_serial_event): Declare "res" in 'm' case.
2381 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2382 (iterate_over_lwps): Rename inner "thread".
2383 (linux_qxfer_libraries_svr4): Rename inner "len".
2384 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2386 2018-10-01 Gary Benson <gbenson@redhat.com>
2388 * gdb_proc_service.h: Moved common code to
2389 common/gdb_proc_service.h.
2391 2018-10-01 Gary Benson <gbenson@redhat.com>
2393 * gdb_proc_service.h: Synchronize comments and whitespace with
2394 GDB's version of this file.
2396 2018-09-25 Tom Tromey <tom@tromey.com>
2398 * configure: Rebuild.
2399 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2401 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2403 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2404 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2405 ($(IPA_LIB)): Sort IPA_OBJS.
2407 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2409 * Makefile.in: Remove references to $(ADD_DEPS).
2411 2018-09-16 Tom Tromey <tom@tromey.com>
2413 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2415 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2418 2018-09-05 Tom Tromey <tom@tromey.com>
2420 * configure: Rebuild.
2422 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2425 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2427 2018-08-27 Tom Tromey <tom@tromey.com>
2430 * configure: Rebuild.
2432 2018-08-27 Tom Tromey <tom@tromey.com>
2434 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2435 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2436 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2437 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2438 (s390x_emit_stack_adjust): Add casts to unsigned char.
2440 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2444 * server.h (struct client_state) <disable_randomization>:
2447 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2449 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2451 (mips_supply_ptrace_register): Likewise.
2453 2018-07-22 Tom Tromey <tom@tromey.com>
2455 * configure: Rebuild.
2457 2018-07-22 Tom Tromey <tom@tromey.com>
2459 * win32-low.c (win32_create_inferior): Remove unused variables.
2460 * gdbreplay.c (remote_open): Remove unused variable.
2461 * remote-utils.c (remote_prepare): Remove unused variable.
2462 * x86-tdesc.h (X86_TDESC_H): Define.
2463 (amd64_expedite_regs): Define conditionally.
2464 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2465 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2466 * remote-utils.c (readchar): Remove unused variable.
2468 2018-07-13 Pedro Alves <palves@redhat.com>
2470 * linux-low.c (linux_kill): Change parameter to process_info
2471 pointer instead of pid. Adjust.
2472 * lynx-low.c (lynx_kill): Likewise.
2473 * nto-low.c (nto_kill): Likewise.
2474 * spu-low.c (spu_kill): Likewise.
2475 * win32-low.c (win32_kill): Likewise.
2476 * server.c (handle_v_kill, kill_inferior_callback)
2477 (detach_or_kill_for_exit): Adjust.
2478 * target.c (kill_inferior): Change parameter to process_info
2479 pointer instead of pid. Adjust.
2480 * target.h (struct target_ops) <kill>: Change parameter to
2481 process_info pointer instead of pid. Adjust all implementations
2483 (kill_inferior): Likewise.
2485 2018-07-13 Pedro Alves <palves@redhat.com>
2487 * linux-low.c (linux_detach, linux_join): Change parameter to
2488 process_info pointer instead of pid. Adjust.
2489 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2490 * nto-low.c (nto_detach): Likewise.
2491 * spu-low.c (spu_detach, spu_join): Likewise.
2492 * win32-low.c (win32_detach, win32_join): Likewise.
2493 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2494 * target.h (struct target_ops) <detach, join>: Change parameter to
2495 process_info pointer instead of pid. Adjust all implementations
2497 (detach_inferior, join_inferior): Rename 'pid' parameter to
2500 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2501 Jan Kratochvil <jan.kratochvil@redhat.com>
2502 Paul Fertser <fercerpav@gmail.com>
2503 Tsutomu Seki <sekiriki@gmail.com>
2505 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2506 (OBS): Add 'common/netstuff.o'.
2507 (GDBREPLAY_OBS): Likewise.
2508 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2509 (remote_open): Implement support for IPv6
2511 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2513 (handle_accept_event): Accept connections from IPv6 sources.
2514 (remote_prepare): Handle IPv6-style hostnames; implement
2515 support for IPv6 connections.
2516 (remote_open): Implement support for printing connections from
2519 2018-07-11 Pedro Alves <palves@redhat.com>
2522 * mem-break.c (any_persistent_commands): Add process_info
2523 parameter and use it instead of relying on the current process.
2524 Change return type to bool.
2525 * mem-break.h (any_persistent_commands): Add process_info
2526 parameter and change return type to bool.
2527 * server.c (handle_detach): Remove require_running_or_return call.
2528 Look up the process_info for the process we're about to detach.
2529 If not found, return back error to GDB. Adjust
2530 any_persistent_commands call to pass down a process pointer.
2532 2018-07-11 Pedro Alves <palves@redhat.com>
2534 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2535 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2536 instead of collect_register_by_name.
2537 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2538 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2540 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2541 Pedro Alves <palves@redhat.com>
2543 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2545 2018-07-03 Tom Tromey <tom@tromey.com>
2547 * linux-low.c: Update.
2548 * lynx-low.c: Update.
2549 * mem-break.c: Update.
2550 * nto-low.c: Update.
2551 * remote-utils.c: Update.
2553 * spu-low.c: Update.
2555 * win32-low.c: Update.
2557 2018-07-03 Tom Tromey <tom@tromey.com>
2561 2018-07-03 Tom Tromey <tom@tromey.com>
2563 * linux-low.c: Update.
2565 2018-07-03 Tom Tromey <tom@tromey.com>
2569 2018-07-03 Tom Tromey <tom@tromey.com>
2571 * linux-low.c: Update.
2572 * linux-mips-low.c: Update.
2573 * lynx-low.c: Update.
2574 * nto-low.c: Update.
2575 * remote-utils.c: Update.
2577 * spu-low.c: Update.
2579 * thread-db.c: Update.
2581 2018-07-03 Tom Tromey <tom@tromey.com>
2583 * linux-low.c: Update.
2584 * linux-mips-low.c: Update.
2585 * lynx-low.c: Update.
2586 * mem-break.c: Update.
2587 * nto-low.c: Update.
2588 * remote-utils.c: Update.
2590 * spu-low.c: Update.
2592 * tracepoint.c: Update.
2594 2018-07-03 Tom Tromey <tom@tromey.com>
2596 * linux-low.c: Update.
2597 * linux-ppc-low.c: Update.
2598 * linux-x86-low.c: Update.
2599 * proc-service.c: Update.
2601 * spu-low.c: Update.
2602 * thread-db.c: Update.
2603 * win32-low.c: Update.
2605 2018-07-03 Tom Tromey <tom@tromey.com>
2607 * linux-low.c: Update.
2608 * lynx-low.c: Update.
2609 * nto-low.c: Update.
2610 * remote-utils.c: Update.
2611 * spu-low.c: Update.
2612 * thread-db.c: Update.
2613 * win32-low.c: Update.
2615 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2617 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2618 parameter in call to 'amd64_create_target_description'.
2620 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2622 * x86-tdesc.h: Remove executable permission flag.
2624 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2626 * configure.ac: Remove AC_PREREQ, add missing quoting.
2627 * configure: Re-generate.
2628 * config.in: Re-generate.
2629 * aclocal.m4: Re-generate.
2631 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2633 * tracepoint.h (current_traceframe): Remove declaration.
2635 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2637 * linux-aarch64-low.c (is_sve_tdesc): New function.
2638 (aarch64_sve_regs_copy_to_regcache): Likewise.
2639 (aarch64_sve_regs_copy_from_regcache): Likewise.
2640 (aarch64_regs_info): Add SVE checks.
2641 (initialize_low_arch): Initialize SVE.
2643 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2645 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2647 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2649 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2650 (initialize_low_tracepoint): Likewise
2651 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2652 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2654 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2656 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2658 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2660 * server.h (PBUFSIZ): Increase size
2662 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2664 * regcache.c (regcache::raw_compare): New function.
2665 * regcache.h (regcache::raw_compare): New declaration.
2667 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2669 * regcache.c (new_register_cache): Use new.
2670 (free_register_cache): Use delete.
2671 (register_data): Use const.
2672 (supply_register): Move body inside regcache.
2673 (regcache::raw_supply): New override function.
2674 (collect_register): Move body inside regcache.
2675 (regcache::raw_collect): New override function.
2676 (regcache::get_register_status): New override function.
2677 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2679 2018-06-09 Tom Tromey <tom@tromey.com>
2681 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2683 (event_queue): Use std::queue.
2684 (gdb_event_xfree): Remove.
2685 (initialize_event_loop, process_event, wait_for_event): Update.
2687 2018-06-08 Stan Cox <scox@redhat.com>
2689 * win32-low.c (win32_create_inferior): last_ptid and last_status
2690 moved to client_state.
2692 2018-06-08 Pedro Alves <palves@redhat.com>
2694 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2695 common/common-exceptions.o, common/common-utils.o,
2696 common/errors.o, common/print-utils.o and utils.o.
2697 * gdbreplay.c: Include "common-defs.h" instead of the two
2698 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2699 string.h or alloca.h.
2700 (perror_with_name): Delete.
2701 (remote_open): Use xstrdup instead of strdup.
2702 (main): Rename to ...
2703 (captured_main): ... this.
2706 2018-06-08 Tom Tromey <tom@tromey.com>
2708 * linux-low.c (linux_low_read_btrace): Update.
2710 2018-06-04 Stan Cox <scox@redhat.com>
2712 * server.h (struct client_state): New.
2713 * server.c (cont_thread, general_thread, multi_process)
2714 (report_fork_events, report_vfork_events, report_exec_events)
2715 (report_thread_events, swbreak_feature, hwbreak_feature)
2716 (vCont_supported, disable_randomization, pass_signals)
2717 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2718 Moved to client_state.
2719 * remote-utils.c (remote_debug, noack_mode)
2720 (transport_is_reliable): Moved to client_state.
2721 * tracepoint.c (current_traceframe): Moved to client_state.
2724 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2725 linux-low.c, remote-utils.h, target.c: Use client_state.
2727 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2729 * configure.srv: Add new c/h file.
2731 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2733 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2736 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2738 * gdb.arch/mips-fpregset-core.exp: New test.
2739 * gdb.arch/mips-fpregset-core.c: New test source.
2741 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2744 * hostio.c (require_int): Do not report overflow for integers
2745 between 0xfffffff and 0x7fffffff.
2747 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2749 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2750 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2751 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2753 (the_low_target): Wire them.
2755 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2757 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2758 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2759 mode. Call collect_register_by_name with vscr using
2760 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2761 (ppc_store_vrregset): Add and set vscr_offset variable as in
2762 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2765 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2767 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2768 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2769 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2771 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2773 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2774 (ppc_store_vsxregset): Likewise.
2775 (ppc_fill_vrregset): Likewise.
2776 (ppc_store_vrregset): Likewise.
2777 (ppc_fill_evrregset): Likewise.
2778 (ppc_store_evrregset): Likewise.
2779 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2780 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2783 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2785 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2786 wordsize of the inferior. Call ppc_linux_target_wordsize.
2788 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2790 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2791 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2792 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2793 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2794 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2795 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2796 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2797 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2798 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2799 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2800 (tdesc_powerpc_e500l): Remove.
2801 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2802 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2803 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2804 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2806 (ppc_arch_setup): Remove target description matching code. Fill a
2807 ppc_linux_features struct and call ppc_linux_match_description
2810 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2812 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2813 width of the requested register exceeds the width of the
2815 (mips_cannot_store_register): Likewise.
2817 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2819 * linux-mips-low.c (mips_fetch_register): New function. Update
2821 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2822 (the_low_target): Wire `mips_fetch_register'.
2824 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2826 * lynx-i386-low.c (LYNXOS_178): New macro.
2827 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2828 the layout on LynxOS-178.
2829 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2830 handle floating point registers that are not supported by
2833 2018-05-10 Tom Tromey <tom@tromey.com>
2835 * configure: Rebuild.
2837 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2840 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2841 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2842 Use it to set the expedite_regs field in the given tdesc.
2843 * x86-tdesc.h: New file.
2844 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2845 Adjust following the addition of the new expedite_regs parameter
2846 to init_target_desc.
2847 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2848 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2849 (i386_linux_read_description, amd64_linux_read_description):
2850 Adjust following the addition of the new expedite_regs parameter
2851 to init_target_desc.
2852 * lynx-i386-low.c: #include "x86-tdesc.h".
2853 (lynx_i386_arch_setup): Adjust following the addition of the new
2854 expedite_regs parameter to init_target_desc.
2855 * nto-x86-low.c: #include "x86-tdesc.h".
2856 (nto_x86_arch_setup): Adjust following the addition of the new
2857 expedite_regs parameter to init_target_desc.
2858 * win32-i386-low.c: #include "x86-tdesc.h".
2859 (i386_arch_setup): Adjust following the addition of the new
2860 expedite_regs parameter to init_target_desc.
2862 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2865 * win32-low.c (win32_create_inferior): Add call to my_wait
2866 setting last_status global.
2868 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2871 * win32-low.c (create_process): Only call gdb_tilde_expand if
2872 inferior_cwd is not NULL.
2874 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2876 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2877 registers to the cache if their values have changed.
2878 (i387_xsave_to_cache): Provide default values for x87 control
2879 registers when these features are available, but disabled.
2880 * regcache.c (supply_register_by_name_zeroed): New function.
2881 * regcache.h (supply_register_by_name_zeroed): Declare new
2884 2018-05-07 Tom Tromey <tom@tromey.com>
2886 * configure: Rebuild.
2888 2018-05-04 Tom Tromey <tom@tromey.com>
2890 * configure: Rebuild.
2892 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2893 Pedro Alves <palves@redhat.com>
2895 * linux-aarch64-low.c (aarch64_stopped_data_address):
2898 2018-04-27 Tom Tromey <tom@tromey.com>
2900 * configure: Rebuild.
2902 2018-04-23 Tom Tromey <tom@tromey.com>
2904 * configure: Rebuild.
2906 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2908 * Makefile.in (depcomp): Add "..".
2909 (all_deps_files): New and use it.
2911 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2913 * configure.srv (aarch64*-*-linux*): Don't include xml.
2914 (i[34567]86-*-cygwin*): Likewise.
2915 (i[34567]86-*-linux*): Likewise.
2916 (i[34567]86-*-lynxos*): Likewise.
2917 (i[34567]86-*-mingw32ce*): Likewise.
2918 (i[34567]86-*-mingw*): Likewise.
2919 (i[34567]86-*-nto*): Likewise.
2920 (tic6x-*-uclinux): Likewise.
2921 (x86_64-*-linux*): Likewise.
2922 (x86_64-*-mingw*): Likewise.
2923 (x86_64-*-cygwin*): Likewise.
2925 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2927 * tdesc.c: Remove xml parameter.
2929 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2931 * server.c (get_features_xml): Remove cast.
2932 * tdesc.c (void target_desc::accept): Fill in function.
2933 (tdesc_get_features_xml): Remove old xml creation.
2934 (print_xml_feature::visit_pre): Add xml vistor.
2935 * tdesc.h (struct target_desc): Make xmltarget mutable.
2936 (tdesc_get_features_xml): Remove declaration.
2938 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2940 * tdesc.c (tdesc_architecture_name): Add new function.
2941 (tdesc_osabi_name): Likewise.
2942 (tdesc_get_features_xml): Use new functions.
2944 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2946 * tdesc.c (tdesc_create_flags): Remove.
2947 (tdesc_add_flag): Likewise.
2948 (tdesc_named_type): Likewise.
2949 (tdesc_create_union): Likewise.
2950 (tdesc_create_struct): Likewise.
2951 (tdesc_create_vector): Likewise.
2952 (tdesc_add_bitfield): Likewise.
2953 (tdesc_add_field): Likewise.
2954 (tdesc_set_struct_size): Likewise.
2956 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2958 * tdesc.c (~target_desc): Remove implictly deleted items.
2959 (init_target_desc): Iterate all features.
2960 (tdesc_get_features_xml): Use vector.
2961 (tdesc_create_feature): Create feature.
2962 * tdesc.h (tdesc_feature) Remove
2963 (target_desc): Add features.
2965 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2967 * Makefile.in: Add common/tdesc.c
2968 * tdesc.c (init_target_desc): init all reg_defs from register
2970 (tdesc_create_reg): Create tdesc_reg.
2971 * tdesc.h (tdesc_feature): Add register vector.
2973 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2975 * tdesc.h (struct target_desc) <features>: Change type to
2976 std::vector<std::string>.
2977 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2979 (tdesc_get_features_xml): Likewise.
2980 (tdesc_create_feature): Likewise.
2982 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2984 * regcache.c (find_register_by_number): Return a ref.
2985 (find_regno): Use references.
2986 (register_size): Likewise.
2987 (register_data): Likewise.
2988 * tdesc.c (target_desc::~target_desc): Remove free calls.
2989 (target_desc::operator==): Use std::vector compare.
2990 (init_target_desc): Use reference.
2991 (tdesc_create_reg): Use reg constructors.
2992 * tdesc.h (struct target_desc): Replace pointer with object.
2994 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2996 * regcache.c (find_register_by_number): Make static.
2997 (find_regno): Use find_register_by_number
2998 * regcache.h (struct reg): Remove declaration.
3000 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3002 * tdesc.c (target_desc::~target_desc): Move to here.
3003 (target_desc::operator==): Likewise.
3004 * tdesc.h (target_desc::~target_desc): Move from here.
3005 (target_desc::operator==): Likewise.
3007 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3009 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3011 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3013 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3015 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3016 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3017 and init_registers_s390_gs_linux64.
3019 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3021 * linux-s390-low.c (s390_fill_gs): Remove function.
3022 (s390_fill_gsbc): Remove function.
3023 (s390_regsets): Set fill functions for the guarded storage regsets
3026 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3028 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3029 the word size. Add comment.
3030 (s390_get_wordsize): New function.
3031 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3032 pswm with it. Instead, use s390_get_wordsize to determine the
3033 word size first and derive the correct tdesc from that directly.
3035 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3037 * Makefile.in: Include silent-rules.mk.
3038 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3039 (COMPILE): Add ECHO_CXX.
3040 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3041 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3042 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3043 (version-generated.c): Add ECHO_GEN.
3044 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3045 (IPAGENT_COMPILE): Add ECHO_CXX.
3046 (%-generated.c): Add ECHO_REGDAT.
3048 2018-03-14 Tom Tromey <tom@tromey.com>
3051 * ax.c (ax_printf): Special case for NULL.
3053 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3055 * linux-low.c (linux_qxfer_libraries_svr4): Use
3056 xml_escape_text_append.
3058 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3060 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3062 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3064 * server.c (handle_general_set): Remove unnecessary xstrdup.
3066 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3068 * server.c (parse_debug_format_options): Adjust to
3069 delim_string_to_char_ptr_vec changes.
3070 * thread-db.c (thread_db_load_search): Adjust to
3071 dirnames_to_char_ptr_vec changes.
3073 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3075 * target.h (target_enable_btrace, target_disable_btrace)
3076 (target_read_btrace, target_read_btrace_conf): Turn macro into
3077 inline function. Throw error if target method is not defined.
3078 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3079 check for btrace target method. Be prepared to handle exceptions
3080 from btrace target methods.
3082 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3084 * server.c (captured_main): Change order of error message printed
3085 when the current working directory cannot be found.
3087 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3089 * server.c: Include "filenames.h" and "pathstuff.h".
3090 (program_name): Delete variable.
3091 (program_path): New anonymous class.
3092 (get_exec_wrapper): Use "program_path" instead of
3094 (handle_v_run): Likewise.
3095 (captured_main): Likewise.
3096 (process_serial_event): Likewise.
3098 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3100 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3101 (OBJS): Add "pathstuff.o".
3102 * server.c (current_directory): New global variable.
3103 (captured_main): Initialize "current_directory".
3105 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3107 * tdesc.c: Use common/tdesc.h.
3108 * tdesc.h: Likewise.
3110 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3111 Simon Marchi <simon.marchi@ericsson.com>
3113 * Makefile.in: Switch order of make rules.
3115 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3117 * Makefile.in: Add common directory in build.
3118 * configure.ac: Add common reference.
3119 * configure: Regenerate.
3121 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3123 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3124 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3125 * spu-low.c (spu_target_ops): Likewise.
3126 * win32-low.c (win32_target_ops): Likewise.
3127 * server.c (supported_btrace_packets): Report packets unconditionally.
3128 * target.h (target_ops) <supports_btrace>: Remove.
3129 (target_supports_btrace): Remove.
3131 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3133 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3134 (handle_btrace_disable): Change return type to void. Use exceptions
3136 (handle_btrace_general_set): Catch exception and copy message to
3139 2018-02-08 Tom Tromey <tom@tromey.com>
3141 * linux-low.c (install_software_single_step_breakpoints): Use
3142 make_scoped_restore.
3143 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3144 (do_restore_current_thread_cleanup): Remove.
3145 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3148 2018-02-08 Tom Tromey <tom@tromey.com>
3150 * mem-break.c (set_raw_breakpoint_at): Use
3151 gdb::unique_xmalloc_ptr.
3153 2018-01-30 Pedro Alves <palves@redhat.com>
3156 * target.c (target_terminal::terminal_state): Rename to ...
3157 (target_terminal::m_terminal_state): ... this.
3159 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3161 * linux-low.c (handle_extended_wait): Surround call to
3162 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3164 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3166 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3167 linux_ptrace_attach_fail_reason_string now returning an
3169 (linux_attach): Likewise.
3170 * thread-db.c (attach_thread): Likewise.
3172 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3175 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3176 checking for fs_base/gs_base fields in struct user_regs_struct.
3177 * configure: Regenerate.
3179 2018-01-16 Yao Qi <yao.qi@linaro.org>
3182 * linux-low.c (fetch_register): Call supply_register instead of
3185 2018-01-08 Yao Qi <yao.qi@linaro.org>
3186 Simon Marchi <simon.marchi@ericsson.com>
3188 * Makefile.in (OBS): Remove selftest.o.
3189 * configure.ac: Set srv_selftest_objs if $development is true.
3190 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3191 * configure: Re-generated.
3192 * server.c (captured_main): Wrap variable selftest_filter with
3195 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3197 * server.c (parse_debug_format_options): Return std::string.
3198 (handle_monitor_command, captured_main): Adjust.
3200 2018-01-05 Pedro Alves <palves@redhat.com>
3203 * server.c (captured_main): Pass quiet=false to
3204 save_original_signals_state.
3206 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3208 * gdbreplay.c (gdbreplay_version): Update copyright year in
3210 * server.c (gdbserver_version): Likewise.
3212 2017-12-08 Tom Tromey <tom@tromey.com>
3214 * ax.c (ax_printf): Update.
3216 2017-12-07 Yao Qi <yao.qi@linaro.org>
3218 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3219 aarch64_linux_read_description.
3220 * linux-amd64-ipa.c (idx2mask): New array.
3221 (get_ipa_tdesc): Move idx2mask out.
3222 (initialize_low_tracepoint): Initialize target descriptions.
3223 * linux-i386-ipa.c (idx2mask): New array.
3224 (get_ipa_tdesc): Move idx2mask out.
3225 (initialize_low_tracepoint): Initialize target descriptions.
3227 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3229 * tdesc.c (struct tdesc_type): Change return type.
3230 (tdesc_add_flag): Change parameter type.
3231 (tdesc_add_bitfield): Likewise.
3232 (tdesc_add_field): Likewise.
3233 (tdesc_set_struct_size): Likewise.
3235 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3237 * regcache.c (registers_to_string): Remove unused variable.
3239 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3241 * inferiors.c (for_each_inferior_with_data): Remove.
3242 * inferiors.h (for_each_inferior_with_data): Remove.
3243 * server.c (handle_qxfer_threads_worker): Change parameter type.
3244 (handle_qxfer_threads_proper): Use for_each_thread.
3246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3248 * inferiors.c (for_each_inferior): Remove.
3249 (clear_inferiors): Use for_each_thread.
3250 * inferiors.h (for_each_inferior): Remove.
3251 * linux-low.c (linux_wait_for_event_filtered): Use
3253 (linux_stabilize_threads): Likewise.
3254 * regcache.c (regcache_release): Likewise.
3255 * server.c (gdb_wants_all_threads_stopped): Likewise.
3256 (clear_pending_status_callback): Remove.
3257 (handle_status): Use for_each_thread.
3258 (captured_main): Likewise.
3259 * win32-low.c (child_init_thread_list): Likewise.
3260 (win32_clear_inferiors): Likewise.
3261 (fake_breakpoint_event): Likewise.
3263 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3265 * inferiors.h (find_inferior): Remove.
3266 * inferiors.c (find_inferior): Remove.
3268 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3270 * linux-low.c (resume_status_pending_p): Update comment.
3271 (need_step_over_p): Update comment.
3273 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3275 * linux-low.c (proceed_one_lwp): Return void, change parameter
3277 (unsuspend_and_proceed_one_lwp): Likewise.
3278 (proceed_all_lwps): Use for_each_thread.
3279 (unstop_all_lwps): Likewise.
3281 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3283 * linux-low.c (linux_resume_one_thread): Return void, take
3285 (linux_resume): Use for_each_thread.
3287 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3289 * linux-low.c (send_sigstop_callback): Return void, change
3290 parameter type. Rename to...
3291 (send_sigstop): ... this.
3292 (suspend_and_send_sigstop_callback): Return void, change parameter
3294 (suspend_and_send_sigstop): ... this.
3295 (stop_all_lwps): Use for_each_thread.
3297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3299 * linux-low.c (lwp_running): Return bool, remove unused
3301 (linux_stabilize_threads): Use find_thread.
3303 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3305 * linux-low.c (select_singlestep_lwp_callback): Remove.
3306 (count_events_callback): Remove.
3307 (select_event_lwp_callback): Remove.
3308 (select_event_lwp): Use find_thread/for_each_thread.
3310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3312 * linux-low.c (not_stopped_callback): Return bool, take filter
3314 (linux_wait_for_event_filtered): Use find_thread.
3315 (linux_wait_1): Likewise.
3317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3319 * linux-low.c (same_lwp): Remove.
3320 (find_lwp_pid): Use find_thread.
3322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3324 * linux-low.c (delete_lwp_callback): Remove.
3325 (linux_mourn): Use for_each_thread.
3327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3329 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3330 args parameter, don't check for pid.
3331 (linux_detach): Use for_each_thread.
3333 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3335 * linux-low.c (struct counter): Remove.
3336 (second_thread_of_pid_p): Remove.
3337 (last_thread_of_process_p): Use find_thread.
3339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3341 * inferiors.c (find_inferior_in_random): Remove.
3342 * inferiors.h (find_inferior_in_random): Remove.
3343 * linux-low.c (status_pending_p_callback): Return bool, accept
3344 parameter ptid directly.
3345 (linux_wait_for_event_filtered): Use find_thread_in_random.
3346 (linux_wait_1): Likewise.
3348 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3350 * inferiors.c (find_inferior_id): Remove.
3351 (find_thread_ptid): Move implemention from find_inferior_id to
3353 * inferiors.h (find_inferior_id): Remove.
3354 * server.c (handle_status): Use find_thread_ptid.
3355 (process_serial_event): Likewise.
3356 * thread-db.c (find_one_thread): Likewise.
3357 (thread_db_thread_handle): Likewise.
3358 * win32-low.c (thread_rec): Likewise.
3359 (child_delete_thread): Likewise.
3360 (win32_thread_alive): Likewise.
3361 (get_child_debug_event): Likewise.
3363 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3365 * linux-mips-low.c (update_watch_registers_callback): Return
3366 void, remove pid_p parameter, don't check for pid.
3367 (mips_insert_point, mips_remove_point): Use for_each_thread.
3369 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3371 * lynx.low (lynx_delete_thread_callback): Remove.
3372 (lynx_mourn): Use for_each_thread.
3374 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3376 * regcache.c (regcache_invalidate_one): Remove.
3377 (regcache_invalidate_pid): use for_each_thread.
3379 2017-11-26 Tom Tromey <tom@tromey.com>
3381 * linux-low.c (linux_create_inferior): Update.
3383 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3385 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3387 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3389 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3390 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3391 * linux-aarch64-tdesc-selftest.c: New file.
3392 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3394 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3396 * configure.srv: Add new file.
3397 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3398 * linux-aarch64-tdesc-selftest.c: New file.
3399 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3401 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3403 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3404 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3405 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3407 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3409 * configure.srv: Add new files.
3410 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3411 aarch64_linux_read_description.
3412 * linux-aarch64-low.c (aarch64_linux_read_description):
3413 Merge with aarch64_arch_setup.
3414 (aarch64_arch_setup): Call aarch64_linux_read_description.
3415 * linux-aarch64-tdesc.c: New file.
3416 * linux-aarch64-tdesc.h: New file.
3418 2017-11-24 Yao Qi <yao.qi@linaro.org>
3420 * configure.srv: Set $srv_regobj for tic6x-linux.
3421 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3422 (tic6x_read_description): Move some code to tic6x_arch_setup.
3423 (tic6x_tdesc_test): New function.
3424 (initialize_low_arch): Call selftests::register_test.
3426 2017-11-22 Yao Qi <yao.qi@linaro.org>
3428 * remote-utils.c (prepare_resume_reply): Use memcpy.
3430 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3432 * linux-low.c (kill_one_lwp_callback): Return void, take
3433 argument directly, don't filter on pid.
3434 (linux_kill): Use for_each_thread.
3436 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3438 * linux-low.c (need_step_over_p): Return bool, remove dummy
3440 (linux_resume, proceed_all_lwps): Use find_thread.
3442 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3444 * linux-low.c (resume_status_pending_p): Return bool, remove
3446 (linux_resume): Use find_thread.
3448 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3450 * linux-low.c (struct thread_resume_array): Remove.
3451 (linux_set_resume_request): Return void, take arguments
3453 (linux_resume): Use for_each_thread.
3455 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3457 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3458 return bool, remove data argument.
3459 (linux_stabilize_threads): Use find_thread.
3461 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3463 * linux-low.c (unsuspend_one_lwp): Remove.
3464 (unsuspend_all_lwps): Use for_each_thread, inline code from
3467 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3469 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3470 * linux-low.c (struct iterate_over_lwps_args): Remove.
3471 (iterate_over_lwps_filter): Remove.
3472 (iterate_over_lwps): Use find_thread.
3474 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3476 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3477 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3478 code from reset_lwp_ptrace_options_callback.
3480 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3482 * linux-arm-low.c (struct update_registers_data): Remove.
3483 (update_registers_callback): Return void, take arguments
3484 directly, don't check thread's pid.
3485 (arm_insert_point, arm_remove_point): Use for_each_thread.
3487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3489 * win32-low.c (continue_one_thread): Return void, take argument
3491 (child_continue): Use for_each_thread.
3493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3495 * win32-i386-low.c (update_debug_registers_callback): Rename
3497 (update_debug_registers): ... this, return void, remove pid_p arg.
3498 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3500 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3502 * inferiors.h (struct process_info): Add constructor, initialize
3504 <syscalls_to_catch>: Change type to std::vector<int>.
3505 * inferiors.c (add_process): Allocate process_info with new.
3506 (remove_process): Free process_info with delete.
3507 * linux-low.c (handle_extended_wait): Adjust.
3508 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3509 * server.c (handle_general_set): Adjust.
3511 2017-11-16 Pedro Alves <palves@redhat.com>
3513 * remote-utils.c (remote_close): Block SIGIO signals instead of
3514 uninstalling the SIGIO handler.
3516 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3518 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3520 2017-11-16 Yao Qi <yao.qi@linaro.org>
3522 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3523 (tic6x_store_gregset): Likewise.
3524 (tic6x_usrregs_info): Move it up.
3526 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3528 * Makefile.in: Update arch rules.
3529 * configure.srv: Explicitly mark arch/ files.
3531 2017-11-13 Andreas Schwab <schwab@suse.de>
3533 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3537 2017-11-06 Pedro Alves <palves@redhat.com>
3539 * config.in, configure: Regenerate.
3541 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3543 * target.c (struct thread_search): Remove.
3544 (thread_search_callback): Remove.
3545 (prepare_to_access_memory): Use for_each_thread instead of
3546 find_inferior. Inline code from thread_search_callback.
3548 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3550 * server.c (struct visit_actioned_threads_data): Remove.
3551 (visit_actioned_threads): Change prototype to take arguments
3553 (resume): Use find_thread instead of find_inferior.
3555 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3557 * server.c (queue_stop_reply_callback): Change prototype, return
3559 (find_status_pending_thread_callback): Remove.
3560 (handle_status): Replace find_inferior with find_thread and
3563 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3565 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3567 (aarch64_store_gregset): Likewise.
3568 (aarch64_fill_fpregset): Likewise.
3569 (aarch64_store_fpregset): Likewise.
3571 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3573 * gdbthread.h (find_thread, for_each_thread): New functions.
3574 * inferiors.c (thread_of_pid): Remove.
3575 (find_any_thread_of_pid): Use find_thread.
3576 * linux-low.c (num_lwps): Use for_each_thread.
3578 2017-10-17 Yao Qi <yao.qi@linaro.org>
3580 * Makefile.in: Remove one rule.
3581 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3583 2017-10-17 Yao Qi <yao.qi@linaro.org>
3585 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3586 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3588 2017-10-17 Yao Qi <yao.qi@linaro.org>
3590 * configure.srv: Rename arm.o with arch/arm.o.
3592 2017-10-17 Yao Qi <yao.qi@linaro.org>
3594 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3595 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3596 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3597 (arch-i386.o, arch-amd64.o): Remove rules.
3598 (arch/%.o): New rule.
3599 Update POSTCOMPILE and COMPILE.pre.
3600 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3601 * configure: Re-generated.
3602 * configure.srv: Replace arch-i386.o with arch/i386.o.
3603 Replace arch-amd64.o with arch/amd64.o.
3605 2017-10-16 Yao Qi <yao.qi@linaro.org>
3607 * configure: Regenerated.
3609 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3611 * inferiors.h: (struct inferior_list): Remove.
3612 (struct inferior_list_entry); Remove.
3613 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3614 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3615 get_first_inferior): Remove.
3616 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3617 find_inferior_id, find_inferior_in_random): Change signature.
3618 * inferiors.c (all_threads): Change type to
3619 std::list<thread_info *>.
3620 (get_thread): Remove macro.
3621 (find_inferior, find_inferior_id): Change signature, implement
3623 (find_inferior_in_random): Change signature, implement using
3624 find_thread_in_random.
3625 (for_each_inferior, for_each_inferior_with_data): Change
3626 signature, implement using for_each_thread.
3627 (add_inferior_to_list, remove_inferior): Remove.
3628 (add_thread, get_first_thread, thread_of_pid,
3629 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3630 (get_first_inferior, one_inferior_p, clear_inferior_list):
3632 (clear_inferiors, get_thread_process): Update.
3633 * gdbthread.h: Include <list>.
3634 (struct thread_info) <entry>: Remove field.
3636 (all_threads): Change type to std::list<thread_info *>.
3637 (get_first_inferior): Add doc.
3638 (find_thread, for_each_thread, find_thread_in_random): New
3640 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3641 * linux-arm-low.c (update_registers_callback): Update.
3642 * linux-low.c (second_thread_of_pid_p): Update.
3643 (kill_one_lwp_callback, linux_detach_lwp_callback,
3644 delete_lwp_callback, status_pending_p_callback, same_lwp,
3645 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3646 iterate_over_lwps, not_stopped_callback,
3647 resume_stopped_resumed_lwps, count_events_callback,
3648 select_singlestep_lwp_callback, select_event_lwp_callback,
3649 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3650 suspend_and_send_sigstop_callback, wait_for_sigstop,
3651 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3652 lwp_running, linux_set_resume_request, resume_status_pending_p,
3653 need_step_over_p, start_step_over, linux_resume_one_thread,
3654 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3655 reset_lwp_ptrace_options_callback): Update.
3656 * linux-mips-low.c (update_watch_registers_callback): Update.
3657 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3659 (free_register_cache_thread_one): Remove.
3660 (regcache_release): Update.
3661 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3662 handle_qxfer_threads_worker): Update.
3663 (handle_query): Update, use list iterator.
3664 (visit_actioned_threads, handle_pending_status,
3665 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3666 clear_pending_status_callback, set_pending_status_callback,
3667 find_status_pending_thread_callback, handle_status,
3668 process_serial_event): Update.
3669 * target.c (thread_search_callback): Update.
3670 * thread-db.c (thread_db_get_tls_address): Update.
3671 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3673 * win32-i386-low.c (update_debug_registers_callback): Update.
3674 * win32-low.c (delete_thread_info, child_delete_thread,
3675 continue_one_thread, suspend_one_thread,
3676 get_child_debug_event): Adjust.
3678 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3680 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3681 * inferiors.h: Include <list>.
3682 (struct process_info) <entry>: Remove field.
3684 (pid_of): Change macro to function.
3685 (ptid_of, lwpid_of): Remove macro.
3686 (all_processes): Change type to std::list<process_info *>.
3687 (ALL_PROCESSES): Remove macro.
3688 (for_each_process, find_process): New function.
3689 * inferiors.c (all_processes): Change type to
3690 std::list<process_info *>.
3691 (find_thread_process): Adjust.
3692 (add_process): Likewise.
3693 (remove_process): Likewise.
3694 (find_process_pid): Likewise.
3695 (get_first_process): Likewise.
3696 (started_inferior_callback): Remove.
3697 (have_started_inferiors_p): Adjust.
3698 (attached_inferior_callback): Remove.
3699 (have_attached_inferiors_p): Adjust.
3700 * linux-low.c (check_zombie_leaders): Likewise.
3701 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3702 (x86_linux_update_xmltarget): Adjust.
3703 * server.c (handle_query): Likewise.
3704 (gdb_reattached_process): Remove.
3705 (handle_status): Adjust.
3706 (kill_inferior_callback): Likewise.
3707 (detach_or_kill_inferior): Remove.
3708 (print_started_pid): Likewise.
3709 (print_attached_pid): Likewise.
3710 (detach_or_kill_for_exit): Update.
3711 (process_serial_event): Likewise.
3712 * linux-arm-low.c (arm_new_fork): Likewise.
3714 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3716 * dll.h: Include <list>.
3717 (struct dll_info): Add constructor.
3718 <entry>: Remove field.
3719 (all_dlls): Change type to std::list<dll_info>.
3720 * dll.c: Include <algorithm>.
3721 (get_dll): Remove macro.
3722 (all_dlls): Change type to std::list<dll_info *>.
3723 (free_one_dll): Remove.
3724 (match_dll): Likewise.
3725 (loaded_dll): Adjust.
3726 (unloaded_dll): Adjust to all_dlls type change, use
3727 std::find_if. Inline code from match_dll.
3728 (clear_dlls): Adjust to all_dlls type change.
3729 * server.c (emit_dll_description): Remove.
3730 (handle_qxfer_libraries): Adjust to all_dlls type change,
3731 integrate emit_dll_description's functionality.
3733 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3735 * linux-low.h (struct linux_target_ops) <delete_process>: New
3737 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3738 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3739 (struct linux_target_ops): Add delete_process callback.
3740 * linux-arm-low.c (arm_delete_process): New.
3741 (struct linux_target_ops): Add delete_process callback.
3742 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3743 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3744 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3745 * linux-mips-low.c (mips_linux_delete_process): New.
3746 (struct linux_target_ops): Add delete_process callback.
3747 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3748 * linux-s390-low.c (struct linux_target_ops): Likewise.
3749 * linux-sh-low.c (struct linux_target_ops): Likewise.
3750 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3751 * linux-tile-low.c (struct linux_target_ops): Likewise.
3752 * linux-x86-low.c (x86_linux_delete_process): New.
3753 (struct linux_target_ops): Add delete_process callback.
3754 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3756 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3758 * linux-aarch64-low.c (the_low_target): Add thread delete
3760 * linux-arm-low.c (arm_delete_thread): New function.
3761 (the_low_target): Add thread delete callback.
3762 * linux-bfin-low.c (the_low_target): Likewise.
3763 * linux-crisv32-low.c (the_low_target): Likewise.
3764 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3766 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3768 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3769 * linux-mips-low.c (mips_linux_delete_thread): New function.
3770 (the_low_target): Add thread delete callback.
3771 * linux-ppc-low.c (the_low_target): Likewise.
3772 * linux-s390-low.c (the_low_target): Likewise.
3773 * linux-sh-low.c (the_low_target): Likewise.
3774 * linux-tic6x-low.c (the_low_target): Likewise.
3775 * linux-tile-low.c (the_low_target): Likewise.
3776 * linux-x86-low.c (the_low_target): Likewise.
3777 * linux-xtensa-low.c (the_low_target): Likewise.
3779 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3781 * win32-low.c: Include "common-inferior.h".
3783 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3785 * inferiors.c (set_inferior_cwd): New function.
3786 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3787 (handle_query): Inform that QSetWorkingDir is supported.
3788 * win32-low.c (create_process): Pass the inferior's cwd to
3791 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3793 * inferiors.c (current_inferior_cwd): New global variable.
3794 (get_inferior_cwd): New function.
3795 * inferiors.h (struct process_info) <cwd>: New field.
3797 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3799 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3800 (OBS): Add gdb_tilde_expand.o.
3802 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3804 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3805 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3807 2017-09-29 Pedro Alves <palves@redhat.com>
3809 * ax.c (gdb_parse_agent_expr): Constify.
3810 * ax.h (gdb_parse_agent_expr): Constify.
3811 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3813 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3814 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3815 * remote-utils.h (read_ptid): Constify.
3816 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3817 (process_point_options, process_serial_event): Constify.
3818 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3819 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3820 (cmd_qtbuffer): Constify.
3822 2017-09-29 Pedro Alves <palves@redhat.com>
3824 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3827 2017-09-29 Pedro Alves <palves@redhat.com>
3829 * linux-low.c (handle_extended_wait): Pass parent thread instead
3830 of process to thread_db_notice_clone.
3831 * linux-low.h (thread_db_notice_clone): Replace parent process
3832 parameter with parent thread parameter.
3833 * thread-db.c (find_one_thread): Add comment.
3834 (thread_db_notice_clone): Replace parent process parameter with
3835 parent thread parameter. Temporarily switch to the parent thread.
3837 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3839 * gdbthread.h: Include "common-gdbthread.h".
3840 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3841 "if" when validating the ptid.
3842 * remote-utils.c: Include "gdbthread.h".
3843 (prepare_resume_reply): Use "switch_to_thread".
3844 * target.c (done_accessing_memory): Likewise.
3846 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3848 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3849 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3850 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3851 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3852 s390x-gs-linux64-ipa.o to ipa_obj.
3853 * linux-s390-low.c (HWCAP_S390_GS): New define.
3854 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3856 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3857 (s390_arch_setup): Check for guarded-storage support and choose
3859 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3860 init_registers_s390x_gs_linux64.
3861 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3863 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3864 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3866 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3868 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3870 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3872 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3873 (thread_db_thread_handle): Declare.
3874 * linux-low.c (linux_target_ops): Initialize thread_handle.
3875 * server.c (handle_qxfer_threads_worker): Add support for
3877 * target.h (struct target_ops): Add new function pointer,
3879 (target_thread_handle): Define.
3880 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3882 (thread_db_thread_handle): New function.
3884 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3886 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3887 * linux-low.h (thread_db_notice_clone): Declare.
3888 * thread-db.c (thread_db_notice_clone): New function.
3890 2017-09-21 Pedro Alves <palves@redhat.com>
3892 * server.c (gdb_read_memory, handle_status, process_serial_event)
3893 (handle_serial_event, handle_target_event): Adjust to
3894 set_desired_thread prototype change.
3895 * target.c (set_desired_thread): Remove 'use_general' parameter
3897 * target.h (set_desired_thread): Remove 'use_general' parameter.
3899 2017-09-20 Tom Tromey <tom@tromey.com>
3901 * target.c (target_terminal::terminal_state): Define.
3902 (target_terminal::init): Rename from target_terminal_init.
3903 (target_terminal::inferior): Rename from
3904 target_terminal_inferior.
3905 (target_terminal::ours): Rename from target_terminal_ours.
3906 (target_terminal::ours_for_output, target_terminal::info): New.
3908 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3910 * server.c (accumulate_file_name_length): Remove.
3911 (emit_dll_description): Adjust to std::string change.
3912 (handle_qxfer_libraries): Use std::string to hold document.
3914 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3916 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3917 return type of xml_escape_text.
3918 * server.c (emit_dll_description): Likewise.
3920 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3922 * server.c (captured_main): Accept argument for --selftest.
3923 Update run_tests call.
3924 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3925 when registering selftests.
3927 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3929 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3930 instead of "VEC" for "target_desc.reg_defs".
3931 (regcache_cpy): Likewise.
3932 (registers_to_string): Likewise.
3933 (registers_from_string): Likewise.
3934 (find_regno): Likewise.
3935 (supply_regblock): Likewise.
3936 (regcache_raw_read_unsigned): Likewise.
3937 * tdesc.c (init_target_desc): Likewise.
3938 (tdesc_create_reg): Likewise.
3939 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3940 (struct target_desc) <reg_defs>: Convert to "std::vector".
3941 (target_desc): Do not initialize "reg_defs".
3942 (~target_desc): Update code to use "std::vector" instead of "VEC"
3943 for "target_desc.reg_defs".
3944 (operator==): Likewise.
3946 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3948 * inferiors.h (thread_to_gdb_id): Remove.
3949 * inferiors.c (thread_to_gdb_id): Remove.
3950 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3951 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3952 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3954 * nto-low.c (nto_fetch_registers, nto_store_registers,
3955 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3957 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3959 * inferiors.h (gdb_id_to_thread_id): Remove.
3960 * inferiors.c (gdb_id_to_thread_id): Remove.
3961 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3962 removal. Move pid declaration closer to where it's used.
3964 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3966 * server.c (handle_detach): New function.
3967 (process_serial_event): Move code out, call handle_detach.
3969 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3971 * server.c (require_running): Rename to ...
3972 (require_running_or_return): ... this ...
3973 (require_running_or_break): ... and this.
3974 (handle_query, process_serial_event): Adjust.
3976 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3978 * linux-low.c (linux_set_resume_request): Remove unused
3981 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3983 * server.c (first_thread_of): Remove.
3984 (process_serial_event): Replace usage of first_thread_of with
3985 find_any_thread_of_pid.
3986 * tracepoint.c (same_process_p): Remove.
3987 (gdb_agent_about_to_close): Replace usage of same_process_p with
3988 find_any_thread_of_pid.
3989 * linux-x86-low.c (same_process_callback): Remove.
3990 (x86_arch_setup_process_callback): Replace usage of
3991 same_process_callback with find_any_thread_of_pid.
3992 * thread-db.c (any_thread_of): Remove.
3993 (switch_to_process): Replace usage of any_thread_of with
3994 find_any_thread_of_pid.
3995 * inferiors.c (thread_pid_matches_callback): Remove.
3996 (find_thread_process): Adjust to use find_any_thread_of_pid.
3998 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4000 * regcache.c (get_thread_regcache): Guard calls to "memset"
4003 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4005 * linux-low.c (handle_extended_wait): Use
4006 "allocate_target_description" instead of "XNEW".
4007 * linux-x86-low.c (initialize_low_arch): Likewise.
4009 2017-09-05 Yao Qi <yao.qi@linaro.org>
4011 * configure.srv (srv_i386_regobj): Remove.
4012 (srv_amd64_regobj): Remove.
4013 (srv_regobj): Set it to "" for x86 non-linux targets.
4014 * linux-x86-tdesc.c (i386_linux_read_description):
4015 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4016 (init_registers_i386): Remove the declaration.
4017 (tdesc_i386): Remove the declaration.
4018 (lynx_i386_arch_setup): Call i386_create_target_description.
4019 * nto-x86-low.c: Likewise.
4020 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4021 [!__x86_64__]: include arch/i386.h.
4022 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4024 2017-09-05 Yao Qi <yao.qi@linaro.org>
4026 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4027 i386/amd64-XXX-linux from it.
4029 2017-09-05 Yao Qi <yao.qi@linaro.org>
4031 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4033 (ipa_amd64_linux_regobj): Remove.
4034 (ipa_x32_linux_regobj): Remove.
4036 2017-09-05 Yao Qi <yao.qi@linaro.org>
4038 * Makefile.in (arch-amd64.o): New rule.
4039 * configure.srv: Append arch-amd64.o.
4040 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4041 (get_ipa_tdesc): Call amd64_linux_read_description.
4042 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4043 and init_registers_amd64_XXX.
4044 * linux-x86-low.c (x86_linux_read_description): Call
4045 amd64_linux_read_description.
4046 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4047 (initialize_low_arch): Don't call init_registers_x32_XXX and
4048 init_registers_amd64_XXX.
4049 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4050 and tdesc_amd64_XXX.
4051 [__x86_64__] (amd64_tdesc_test): New function.
4052 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4053 and init_registers_amd64_XXX.
4054 * linux-x86-tdesc.c: Include arch/amd64.h.
4055 (xcr0_to_tdesc_idx): New function.
4056 (i386_linux_read_description): New function.
4057 (amd64_get_ipa_tdesc_idx): New function.
4058 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4059 (amd64_get_ipa_tdesc): Declare.
4061 2017-09-05 Yao Qi <yao.qi@linaro.org>
4063 * configure.srv (srv_i386_linux_xmlfiles): Remove
4064 i386/i386-XXX-linux.xml from it.
4066 2017-09-05 Yao Qi <yao.qi@linaro.org>
4068 * configure.srv: Set srv_i386_linux_regobj empty if $development
4070 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4071 initialize_low_tdesc.
4072 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4073 with #if initialize_low_tdesc.
4074 * linux-x86-tdesc-selftest.c: New file.
4075 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4077 2017-09-05 Yao Qi <yao.qi@linaro.org>
4079 * Makefile.in (arch-i386.o): New rule.
4080 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4081 (x86_64-*-linux*): Likewise.
4082 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4083 include arch/i386.h.
4084 (i386_linux_read_description): Remove code and call
4085 i386_create_target_description.
4086 * tdesc.c (allocate_target_description): New function.
4087 * tdesc.h (set_tdesc_architecture): Remove declaration.
4088 (set_tdesc_osabi): Likewise.
4090 2017-09-05 Yao Qi <yao.qi@linaro.org>
4092 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4093 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4094 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4096 * server.c (get_features_xml): Call tdesc_get_features_xml.
4097 * tdesc.c (set_tdesc_architecture): New function.
4098 (set_tdesc_osabi): New function.
4099 (tdesc_get_features_xml): New function.
4100 (tdesc_create_feature): Add an argument.
4101 * tdesc.h (struct target_desc) <features>: New field.
4102 <arch, osabi>: New field.
4103 (~target_desc): xfree features, arch, and osabi.
4104 (target_desc::oerator==): Don't compare .xmltarget.
4105 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4106 (set_tdesc_osabi): Likewise.
4107 (tdesc_get_features_xml): Likewise.
4109 2017-09-05 Yao Qi <yao.qi@linaro.org>
4111 * linux-x86-tdesc.c: Include selftest.h.
4112 (i386_tdesc_test): New function.
4113 (initialize_low_tdesc): Call selftests::register_test.
4114 * tdesc.h: Include regdef.h.
4115 (target_desc): Override operator == and !=.
4117 2017-09-05 Yao Qi <yao.qi@linaro.org>
4119 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4120 (ipa_obj): Likewise.
4121 * linux-i386-ipa.c: Include common/x86-xstate.h
4122 (get_ipa_tdesc): Call i386_linux_read_description.
4123 (initialize_low_tracepoint): Don't call init_registers_XXX
4124 functions, call initialize_low_tdesc instead.
4125 * linux-x86-low.c (x86_linux_read_description): Call
4126 i386_linux_read_description.
4127 (initialize_low_arch): Don't call init_registers_i386_XXX
4128 functions, call initialize_low_tdesc.
4129 * linux-x86-tdesc.c: New file.
4130 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4131 (i386_get_ipa_tdesc_idx): Declare.
4132 (i386_get_ipa_tdesc): Declare.
4133 (initialize_low_tdesc): Declare.
4135 2017-09-05 Yao Qi <yao.qi@linaro.org>
4137 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4140 2017-09-05 Yao Qi <yao.qi@linaro.org>
4142 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4143 * regcache.c (get_thread_regcache): Use VEC_length.
4144 (init_register_cache): Likewise.
4145 (regcache_cpy): Likewise.
4146 (registers_to_string): Iterate reg_defs via VEC_iterate.
4147 (find_regno): Likewise.
4148 (find_register_by_number): Use VEC_index.
4149 (register_size): Call find_register_by_number.
4150 (register_data): Call find_register_by_number.
4151 (supply_regblock): Use VEC_length.
4152 (regcache_raw_read_unsigned): Likewise.
4153 * tdesc.c (init_target_desc): Iterate reg_defs via
4155 (default_description): Update initializer.
4156 (copy_target_description): Don't update field num_registers.
4157 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4158 <num_registers>: Remove.
4160 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4162 * Makefile.in (.SECONDARY): Define target.
4164 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4166 * linux-low.c (linux_wait_1): Adjust.
4167 * server.c (queue_stop_reply_callback): Adjust.
4169 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4171 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4172 QEnvironmentUnset and QEnvironmentReset packets.
4173 (handle_query): Inform remote that QEnvironmentHexEncoded,
4174 QEnvironmentUnset and QEnvironmentReset are supported.
4176 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4178 * inferiors.h (inferior_target_data): Rename to ...
4179 (thread_target_data): ... this.
4180 (inferior_regcache_data): Rename to ...
4181 (thread_regcache_data): ... this.
4182 (set_inferior_regcache_data): Rename to ...
4183 (set_thread_regcache_data): ... this.
4184 * inferiors.c (inferior_target_data): Rename to ...
4185 (thread_target_data): ... this.
4186 (inferior_regcache_data): Rename to ...
4187 (thread_regcache_data): ... this.
4188 (set_inferior_regcache_data): Rename to ...
4189 (set_thread_regcache_data): ... this.
4190 (free_one_thread): Update.
4191 * linux-low.h (get_thread_lwp): Update.
4192 * regcache.c (get_thread_regcache): Update.
4193 (regcache_invalidate_thread): Update.
4194 (free_register_cache_thread): Update.
4195 * win32-i386-low.c (update_debug_registers_callback): Update.
4196 (win32_get_current_dr): Update.
4197 * win32-low.c (thread_rec): Update.
4198 (delete_thread_info): Update.
4199 (continue_one_thread): Update.
4200 (suspend_one_thread): Update.
4202 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4204 * inferiors.c (set_inferior_target_data): Remove.
4205 * inferiors.h (set_inferior_target_data): Remove.
4207 2017-08-18 Yao Qi <yao.qi@linaro.org>
4209 * Makefile.in (OBS): Add selftest.o.
4210 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4211 * configure, config.in: Re-generated.
4212 * server.c: Include common/sefltest.h.
4213 (captured_main): Handle option --selftest.
4215 2017-08-09 Yao Qi <yao.qi@linaro.org>
4217 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4218 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4219 i386-avx-mpx.o and i386-mmx.o.
4220 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4221 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4222 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4223 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4224 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4225 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4226 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4227 i386/amd64-avx-mpx.xml.
4229 2017-08-09 Yao Qi <yao.qi@linaro.org>
4231 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4232 and x32-avx-avx512.o.
4233 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4234 i386/x32-avx-avx512.xml.
4236 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4238 * tracepoint.h (enum class fast_tpoint_collect_result): New
4240 (fast_tracepoint_collecting): Change return type to
4241 fast_tpoint_collect_result.
4242 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4243 * linux-low.h: Include tracepoint.h.
4244 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4245 fast_tpoint_collect_result.
4246 * linux-low.c (handle_tracepoints): Adjust.
4247 (linux_fast_tracepoint_collecting): Change return type to
4248 fast_tpoint_collect_result.
4249 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4250 linux_wait_1, stuck_in_jump_pad_callback,
4251 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4252 proceed_one_lwp): Adjust to type change.
4254 2017-07-10 Yao Qi <yao.qi@linaro.org>
4256 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4258 2017-06-29 Yao Qi <yao.qi@linaro.org>
4260 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4262 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4264 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4266 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4268 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4270 * linux-low.c (linux_create_inferior): Adjust code to access the
4271 environment information via 'gdb_environ' class.
4272 * lynx-low.c (lynx_create_inferior): Likewise.
4273 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4274 (get_environ): Return a pointer to 'our_environ'.
4275 (captured_main): Initialize 'our_environ'.
4276 * server.h (get_environ): Adjust prototype.
4277 * spu-low.c (spu_create_inferior): Adjust code to access the
4278 environment information via 'gdb_environ' class.
4280 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4282 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4283 usage of "register" keyword.
4285 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4287 * configure: Re-generate.
4289 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4291 * configure: Re-generate.
4293 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4295 * Makefile.in (COMPILE.pre): Add "-x c++".
4297 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4299 * fork-child.c: Conditionally include <signal.h>.
4301 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4303 * server.c (handle_general_set): Handle new packet
4304 "QStartupWithShell".
4305 (handle_query): Add "QStartupWithShell" to the list of supported
4307 (gdbserver_usage): Add help text explaining the
4308 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4310 (captured_main): Recognize and act upon the presence of the new
4313 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4314 Pedro Alves <palves@redhat.com>
4316 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4317 * configure: Regenerate.
4318 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4320 (i[34567]86-*-lynxos*): Likewise.
4321 (spu*-*-*): Likewise.
4322 * fork-child.c: New file.
4323 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4325 (linux_ptrace_fun): New function.
4326 (linux_create_inferior): Adjust function prototype to reflect
4327 change on "target.h". Adjust function code to use
4329 (linux_request_interrupt): Delete "signal_pid".
4330 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4331 (lynx_ptrace_fun): New function.
4332 (lynx_create_inferior): Adjust function prototype to reflect
4333 change on "target.h". Adjust function code to use
4335 * nto-low.c (nto_create_inferior): Adjust function prototype and
4336 code to reflect change on "target.h". Update comments.
4337 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4338 "common-terminal.h" and "environ.h".
4339 (terminal_fd): Moved to fork-child.c.
4340 (old_foreground_pgrp): Likewise.
4341 (restore_old_foreground_pgrp): Likewise.
4342 (last_status): Make it global.
4343 (last_ptid): Likewise.
4344 (our_environ): New variable.
4345 (startup_with_shell): Likewise.
4346 (program_name): Likewise.
4347 (program_argv): Rename to...
4348 (program_args): ...this.
4349 (wrapper_argv): New variable.
4350 (start_inferior): Delete function.
4351 (get_exec_wrapper): New function.
4352 (get_exec_file): Likewise.
4353 (get_environ): Likewise.
4354 (prefork_hook): Likewise.
4355 (post_fork_inferior): Likewise.
4356 (postfork_hook): Likewise.
4357 (postfork_child_hook): Likewise.
4358 (handle_v_run): Update code to deal with arguments coming from the
4359 remote host. Update calls from "start_inferior" to
4361 (captured_main): Likewise. Initialize environment variable. Call
4363 * server.h (post_fork_inferior): New prototype.
4364 (get_environ): Likewise.
4365 (last_status): Declare.
4366 (last_ptid): Likewise.
4367 (signal_pid): Likewise.
4368 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4369 (spu_ptrace_fun): New function.
4370 (spu_create_inferior): Adjust function prototype to reflect change
4371 on "target.h". Adjust function code to use "fork_inferior".
4372 * target.c (target_terminal_init): New function.
4373 (target_terminal_inferior): Likewise.
4374 (target_terminal_ours): Likewise.
4375 * target.h: Include <vector>.
4376 (struct target_ops) <create_inferior>: Update prototype.
4377 (create_inferior): Update macro.
4378 * utils.c (gdb_flush_out_err): New function.
4379 * win32-low.c (win32_create_inferior): Adjust function prototype
4380 and code to reflect change on "target.h".
4382 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4384 * inferiors.c (switch_to_thread): New function.
4386 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4388 * Makefile.in (SFILE): Add "common/job-control.c".
4389 (OBS): Add "job-control.o".
4391 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4393 * Makefile: Remove "@host_makefile_frag@".
4395 2017-05-05 Pedro Alves <palves@redhat.com>
4397 * configure: Regenerate.
4399 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4401 * configure: Regenerate.
4403 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4405 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4406 software_single_step change of return type to
4407 std::vector<CORE_ADDR>.
4408 * linux-low.c (install_software_single_step_breakpoints):
4410 * linux-low.h (install_software_single_step_breakpoints):
4413 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4415 * remote-utils.c: Include "gdb_termios.h" instead of
4417 * terminal.h: Delete file.
4419 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4421 * server.c: Include <vector>.
4422 <program_argv, wrapper_argv>: Convert to std::vector.
4423 (start_inferior): Rewrite function to use C++.
4424 (handle_v_run): Likewise. Update code that calculates the argv
4425 based on the vRun packet; use C++.
4426 (captured_main): Likewise.
4428 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4430 * server.c (handle_v_cont): Initialize thread_resume::thread
4433 2017-04-05 Pedro Alves <palves@redhat.com>
4435 * configure: Regenerate.
4437 2017-04-05 Pedro Alves <palves@redhat.com>
4439 * gdbreplay.c (sync_error): Constify.
4440 * linux-x86-low.c (push_opcode): Constify.
4442 2017-04-05 Pedro Alves <palves@redhat.com>
4444 * win32-low.c (get_child_debug_event)
4445 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4446 Report TARGET_WAITKIND_SPURIOUS instead.
4448 2017-04-05 Pedro Alves <palves@redhat.com>
4450 * remote-utils.c (remote_prepare, remote_open): Constify.
4451 * remote-utils.h (remote_prepare, remote_open): Constify.
4452 * server.c (captured_main): Constify 'port' handling.
4454 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4456 * Makefile.in (clean): Clear .deps.
4458 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4460 * .gitignore: Remove generated files, replace with wildcard.
4461 * (clean): Replace removal of generated files with wildcard.
4462 (version.c): Replace with...
4463 (version-generated.c): ...this.
4464 (xml-builtin.c): Replace with...
4465 (xml-builtin-generated.c): ...this.
4466 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4467 (%.c: *regformats*): Replace with...
4468 (%-generated.c: *regformats*): ...this.
4470 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4472 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4473 (xtensa_fill_gregset): Call collect_register_by_name for
4475 (xtensa_store_gregset): Call supply_register_by_name for
4478 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4480 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4481 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4482 (xtensa_store_gregset): Call supply_register for all registers in
4483 a0_regnum..a0_regnum + C0_NREGS range.
4485 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4487 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4488 (ax-ipa.o: ax.c): Remove.
4489 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4490 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4491 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4492 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4493 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4495 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4497 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4498 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4499 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4500 (errors-ipa.o: ../common/errors.c): Remove.
4501 (format-ipa.o: ../common/format.c): Remove.
4502 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4504 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4506 * Makefile.in (%-ipa.o: %.c): New rule.
4507 (tracepoint-ipa.o: tracepoint.c): Remove.
4508 (utils-ipa.o: utils.c): Remove.
4509 (remote-utils-ipa.o: remote-utils.c): Remove.
4510 (regcache-ipa.o: regcache.c): Remove.
4511 (i386-linux-ipa.o: i386-linux.c): Remove.
4512 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4513 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4514 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4515 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4516 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4517 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4518 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4519 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4520 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4521 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4522 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4523 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4524 (aarch64-ipa.o: aarch64.c): Remove.
4525 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4526 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4527 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4528 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4529 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4530 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4531 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4532 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4533 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4534 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4535 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4536 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4537 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4538 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4539 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4540 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4541 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4542 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4543 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4544 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4545 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4546 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4547 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4548 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4549 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4550 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4551 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4552 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4553 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4554 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4555 (tdesc-ipa.o: tdesc.c): Remove.
4556 (x32-linux-ipa.o: x32-linux.c): Remove.
4557 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4558 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4560 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4562 * Makefile.in (%.o: ../arch/%.c): New rule.
4563 (arm.o: ../arch/arm.c): Remove.
4564 (arm-linux.o: ../arch/arm-linux.c): Remove.
4565 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4566 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4568 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4570 * Makefile.in (%.o: ../nat/%.c): New rule.
4571 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4572 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4573 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4574 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4575 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4576 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4577 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4578 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4579 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4580 (linux-personality.o: ../nat/linux-personality.c): Remove.
4581 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4582 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4583 (x86-linux.o: ../nat/x86-linux.c): Remove.
4584 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4585 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4587 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4589 * Makefile.in (%.o: ../common/%.c): New rule.
4590 (signals.o: ../common/signals.c): Remove.
4591 (print-utils.o: ../common/print-utils.c): Remove.
4592 (rsp-low.o: ../common/rsp-low.c): Remove.
4593 (common-utils.o: ../common/common-utils.c): Remove.
4594 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4595 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4596 (vec.o: ../common/vec.c): Remove.
4597 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4598 (xml-utils.o: ../common/xml-utils.c): Remove.
4599 (ptid.o: ../common/ptid.c): Remove.
4600 (buffer.o: ../common/buffer.c): Remove.
4601 (format.o: ../common/format.c): Remove.
4602 (filestuff.o: ../common/filestuff.c): Remove.
4603 (agent.o: ../common/agent.c): Remove.
4604 (errors.o: ../common/errors.c): Remove.
4605 (environ.o: ../common/environ.c): Remove.
4606 (common-debug.o: ../common/common-debug.c): Remove.
4607 (cleanups.o: ../common/cleanups.c): Remove.
4608 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4609 (fileio.o: ../common/fileio.c): Remove.
4610 (common-regcache.o: ../common/common-regcache.c): Remove.
4611 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4612 (new-op.o: ../common/new-op.c): Remove.
4613 (btrace-common.o: ../common/btrace-common.c): Remove.
4615 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4617 * Makefile.in (%.o: ../target/%.c): New rule.
4618 (waitstatus.o: ../target/waitstatus.c): Remove.
4620 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4623 (%.c: ../regformats/%.dat,
4624 (%.c: ../regformats/arm/%.dat,
4625 (%.c: ../regformats/i386/%.dat,
4626 (%.c: ../regformats/rs6000/%.dat): New rules.
4627 (aarch64.c): Remove.
4628 (reg-arm.c): Remove.
4629 (arm-with-iwmmxt.c): Remove.
4630 (arm-with-vfpv2.c): Remove.
4631 (arm-with-vfpv3.c): Remove.
4632 (arm-with-neon.c): Remove.
4633 (reg-bfin.c): Remove.
4634 (reg-cris.c): Remove.
4635 (reg-crisv32.c): Remove.
4637 (i386-linux.c): Remove.
4638 (i386-avx.c): Remove.
4639 (i386-avx-linux.c): Remove.
4640 (i386-avx-avx512.c): Remove.
4641 (i386-avx-avx512-linux.c): Remove.
4642 (i386-mpx.c): Remove.
4643 (i386-mpx-linux.c): Remove.
4644 (i386-avx-mpx-avx512-pku.c): Remove.
4645 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4646 (i386-avx-mpx.c): Remove.
4647 (i386-avx-mpx-linux.c): Remove.
4648 (i386-mmx.c): Remove.
4649 (i386-mmx-linux.c): Remove.
4650 (reg-ia64.c): Remove.
4651 (reg-m32r.c): Remove.
4652 (reg-m68k.c): Remove.
4654 (mips-linux.c): Remove.
4655 (mips-dsp-linux.c): Remove.
4656 (mips64-linux.c): Remove.
4657 (mips64-dsp-linux.c): Remove.
4658 (nios2-linux.c): Remove.
4659 (powerpc-32.c): Remove.
4660 (powerpc-32l.c): Remove.
4661 (powerpc-altivec32l.c): Remove.
4662 (powerpc-cell32l.c): Remove.
4663 (powerpc-vsx32l.c): Remove.
4664 (powerpc-isa205-32l.c): Remove.
4665 (powerpc-isa205-altivec32l.c): Remove.
4666 (powerpc-isa205-vsx32l.c): Remove.
4667 (powerpc-e500l.c): Remove.
4668 (powerpc-64l.c): Remove.
4669 (powerpc-altivec64l.c): Remove.
4670 (powerpc-cell64l.c): Remove.
4671 (powerpc-vsx64l.c): Remove.
4672 (powerpc-isa205-64l.c): Remove.
4673 (powerpc-isa205-altivec64l.c): Remove.
4674 (powerpc-isa205-vsx64l.c): Remove.
4675 (s390-linux32.c): Remove.
4676 (s390-linux32v1.c): Remove.
4677 (s390-linux32v2.c): Remove.
4678 (s390-linux64.c): Remove.
4679 (s390-linux64v1.c): Remove.
4680 (s390-linux64v2.c): Remove.
4681 (s390-te-linux64.c): Remove.
4682 (s390-vx-linux64.c): Remove.
4683 (s390-tevx-linux64.c): Remove.
4684 (s390x-linux64.c): Remove.
4685 (s390x-linux64v1.c): Remove.
4686 (s390x-linux64v2.c): Remove.
4687 (s390x-te-linux64.c): Remove.
4688 (s390x-vx-linux64.c): Remove.
4689 (s390x-tevx-linux64.c): Remove.
4690 (tic6x-c64xp-linux.c): Remove.
4691 (tic6x-c64x-linux.c): Remove.
4692 (tic6x-c62x-linux.c): Remove.
4694 (reg-sparc64.c): Remove.
4695 (reg-spu.c): Remove.
4697 (amd64-linux.c): Remove.
4698 (amd64-avx.c): Remove.
4699 (amd64-avx-linux.c): Remove.
4700 (amd64-avx-avx512.c): Remove.
4701 (amd64-avx-avx512-linux.c): Remove.
4702 (amd64-mpx.c): Remove.
4703 (amd64-mpx-linux.c): Remove.
4704 (amd64-avx-mpx-avx512-pku.c): Remove.
4705 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4706 (amd64-avx-mpx.c): Remove.
4707 (amd64-avx-mpx-linux.c): Remove.
4709 (x32-linux.c): Remove.
4710 (x32-avx.c): Remove.
4711 (x32-avx-linux.c): Remove.
4712 (x32-avx-avx512.c): Remove.
4713 (x32-avx-avx512-linux.c): Remove.
4714 (reg-xtensa.c): Remove.
4715 (reg-tilegx.c): Remove.
4716 (reg-tilegx32.c): Remove.
4718 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4720 * Makefile.in (SFILES): Add "common/environ.c".
4721 (OBJS): Add "common/environ.h".
4723 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4725 * configure.ac: Check if the fs_base and gs_base members of
4726 `struct user_regs_struct' exist.
4727 * config.in: Regenerated.
4728 * configure: Likewise.
4730 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4732 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4734 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4735 (get_next_pcs_syscall_next_pc): Likewise.
4737 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4739 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4740 * nto-x86-low.c: Likewise.
4742 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4744 * Makefile.in: Include disable-implicit-rules.mk.
4746 2016-11-23 Pedro Alves <palves@redhat.com>
4748 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4749 (debug_vprintf): Use std::chrono::steady_clock instead of
4750 gettimeofday. Use '.' instead of ':'.
4751 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4752 (get_timestamp): Use std::chrono::steady_clock instead of
4755 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4757 * Makefile.in: Fix whitespace formatting.
4759 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4761 * Makefile.in (SFILES, OBS): Flatten list and order
4764 2016-11-23 Pedro Alves <palves@redhat.com>
4766 * event-loop.c (handle_file_event): Use warning.
4767 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4768 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4771 2016-11-23 Pedro Alves <palves@redhat.com>
4773 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4775 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4776 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4777 debug_printf and debug_flush for debug output.
4778 * server.c (handle_general_set): Likewise.
4779 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4782 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4784 * Makefile.in (.c.o): Replace rule with ...
4785 (%.o: %.c): ... this one.
4787 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4789 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4790 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4792 * configure.ac: Remove checks for the make program.
4793 * configure: Re-generate.
4795 2016-10-28 Pedro Alves <palves@redhat.com>
4797 * Makefile.in (CXX_DIALECT): Get from configure.
4798 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4799 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4800 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4801 * config.in: Regenerate.
4802 * configure: Regenerate.
4804 2016-10-27 Yao Qi <yao.qi@linaro.org>
4806 * linux-low.c (linux_supports_range_stepping): Return true if
4807 can_software_single_step return true.
4809 2016-10-27 Yao Qi <yao.qi@linaro.org>
4811 * inferiors.c (find_inferior_in_random): New function.
4812 * inferiors.h (find_inferior_in_random): Declare.
4813 * linux-low.c (linux_wait_for_event_filtered): Call
4814 find_inferior_in_random instead of find_inferior.
4816 2016-10-27 Yao Qi <yao.qi@linaro.org>
4818 * linux-low.c (linux_wait_1): If single-step breakpoints are
4819 inserted, remove them.
4821 2016-10-26 Pedro Alves <palves@redhat.com>
4823 * linux-low.c (handle_extended_wait): Link parent/child fork
4825 (linux_wait_1): Unlink them.
4826 (linux_set_resume_request): Ignore resume requests for
4827 already-resumed and unhandled fork child threads.
4828 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4829 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4831 (handle_v_requests) <vCont>: Don't call require_running.
4832 * server.h (in_queued_stop_replies): New declaration.
4834 2016-10-24 Yao Qi <yao.qi@linaro.org>
4837 * linux-aarch64-low.c (append_insns): Cast the return value to
4840 2016-10-10 Yao Qi <yao.qi@linaro.org>
4842 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4844 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4846 * target.c (target_supports_multi_process): New function, moved
4848 * target.h (target_supports_multi_process): ... here. Remove
4851 2016-10-05 Tom Tromey <tom@tromey.com>
4854 * tracepoint.c (handle_tracepoint_bkpts): Check
4855 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4857 2016-10-05 Yao Qi <yao.qi@linaro.org>
4859 * configure.srv: Update the path of arm-*.xml files.
4861 2016-10-05 Terry Guo <terry.guo@arm.com>
4862 Yao Qi <yao.qi@linaro.org>
4864 * Makefile.in: Adjust the path of rules.
4865 * configure.srv: Update the path of xml files.
4866 * regformats/arm-with-iwmmxt.dat: Regenerated.
4867 * regformats/arm-with-neon.dat: Likewise.
4868 * regformats/arm-with-vfpv2.dat: Likewise.
4869 * regformats/arm-with-vfpv3.dat Likewise.
4871 2016-09-30 Yao Qi <yao.qi@linaro.org>
4874 * target.c (target_stop_and_wait): Don't call
4875 target_continue_no_signal, use resume_stop instead.
4877 2016-09-26 Yao Qi <yao.qi@linaro.org>
4879 * linux-low.c (linux_wait_1): Call debug_exit.
4881 2016-09-23 Pedro Alves <palves@redhat.com>
4883 * Makefile.in (SFILES): Add common/new-op.c.
4884 (OBS): Add common/new-op.o.
4885 (new-op.o): New rule.
4887 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4889 * .gitinore: Ignore more files.
4891 2016-09-21 Yao Qi <yao.qi@linaro.org>
4893 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4896 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4898 * server.c (start_inferior): Call target_mourn_inferior instead of
4899 mourn_inferior; pass ptid_t argument to it.
4901 (handle_target_event): Likewise.
4902 * target.c (target_mourn_inferior): New function.
4903 * target.h (mourn_inferior): Delete macro.
4905 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4907 * linux-low.c (lwp_is_stepping): New function.
4909 2016-09-06 Carl Love <cel@us.ibm.com>
4911 * server.c (start_inferior): Fixed comment, requested comment change
4912 didn't get updated correctly. Removed reference to ptrace () call as
4913 it is only true on Linux systems.
4915 2016-09-06 Carl Love <cel@us.ibm.com>
4917 * server.c (start_inferior): Do not call
4918 function target_post_create_inferior () if the
4919 inferior process has already exited.
4921 2016-09-05 Pedro Alves <palves@redhat.com>
4923 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4924 (COMPILE.pre, CC_LD): Use CXX directly.
4925 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4926 * acinclude.m4: Don't include build-with-cxx.m4.
4927 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4928 * configure: Regenerate.
4930 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4933 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4934 call writing data to own_buf.
4936 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4938 * target.c (mywait): Call target_wait instead of
4940 (target_wait): New function.
4942 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4944 * server.c (start_inferior): New variable 'ptid'. Replace calls
4945 to the_target->resume by target_continue{,_no_signal}, depending
4947 * target.c (target_stop_and_wait): Call target_continue_no_signal
4948 instead of the_target->resume.
4949 (target_continue): New function.
4951 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4953 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4955 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4958 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4960 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4961 * linux-arm-low.c (ps_get_thread_area): Likewise.
4962 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4963 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4964 * linux-mips-low.c (ps_get_thread_area): Likewise.
4965 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4966 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4967 * linux-x86-low.c (ps_get_thread_area): Likewise.
4968 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4970 2016-08-19 Pedro Alves <palves@redhat.com>
4972 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4974 2016-08-19 Pedro Alves <palves@redhat.com>
4976 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4977 comment. Use memcpy instead of casting through unsigned long.
4979 2016-08-19 Pedro Alves <palves@redhat.com>
4981 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4982 allocating around 0x80000000.
4984 2016-08-19 Pedro Alves <palves@redhat.com>
4987 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4988 (x32-avx512-linux-ipa.o): New rules.
4989 * configure.ac (x86_64-*-linux*): New x32 check.
4990 * configure.srv (ipa_x32_linux_regobj): New.
4991 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4992 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4994 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4996 * configure: Regenerate.
4998 2016-08-09 Pedro Alves <palves@redhat.com>
5001 * Makefile.in (OBS): Add signals-state-save-restore.o.
5002 (signals-state-save-restore.o): New rule.
5003 * config.in: Regenerate.
5004 * configure: Regenerate.
5005 * linux-low.c: Include "signals-state-save-restore.h".
5006 (linux_create_inferior): Call
5007 restore_original_signals_state.
5008 * server.c: Include "dispositions-save-restore.h".
5009 (captured_main): Call save_original_signals_state.
5011 2016-08-05 Pedro Alves <palves@redhat.com>
5013 * configure: Regenerate.
5015 2016-08-04 Yao Qi <yao.qi@linaro.org>
5017 * linux-low.c (regsets_fetch_inferior_registers): Check
5018 errno is ESRCH or not.
5020 2016-08-02 Yao Qi <yao.qi@linaro.org>
5022 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5023 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5024 (thread_db_load_search): Update.
5025 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5026 td_ta_set_event and td_ta_event_getmsg.
5028 2016-07-26 Pedro Alves <palves@redhat.com>
5031 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5032 of unsigned long for 64-bit registers and use uint32_t instead of
5033 unsigned int for 32-bit registers.
5035 2016-07-26 Pedro Alves <palves@redhat.com>
5037 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5040 2016-07-21 Tom Tromey <tom@tromey.com>
5042 * configure: Rebuild.
5044 2016-07-21 Yao Qi <yao.qi@linaro.org>
5046 * mem-break.c (find_gdb_breakpoint): Cast bp to
5047 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5049 2016-07-21 Yao Qi <yao.qi@linaro.org>
5051 * server.c (handle_v_requests): Support s and S actions
5052 if target_supports_software_single_step return true.
5054 2016-07-21 Yao Qi <yao.qi@linaro.org>
5056 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5057 is resume_step, call maybe_hw_step.
5058 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5060 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5062 (proceed_one_lwp): If resume request is resume_step, install
5063 reinsert breakpoints and call maybe_hw_step.
5065 2016-07-21 Yao Qi <yao.qi@linaro.org>
5067 * linux-low.c (proceed_one_lwp): Declare.
5068 (linux_resume_one_thread): Remove local variable 'step'.
5069 Lift code enqueue signal. Call proceed_one_lwp instead of
5070 linux_resume_one_lwp.
5072 2016-07-21 Yao Qi <yao.qi@linaro.org>
5074 * linux-low.c (linux_resume_one_thread): Call
5075 enqueue_pending_signal.
5077 2016-07-21 Yao Qi <yao.qi@linaro.org>
5079 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5080 * inferiors.c (do_restore_current_thread_cleanup): New function.
5081 (make_cleanup_restore_current_thread): Likewise.
5082 * linux-low.c (install_software_single_step_breakpoints): Call
5083 make_cleanup_restore_current_thread. Switch current_thread to
5086 2016-07-21 Yao Qi <yao.qi@linaro.org>
5088 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5089 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5090 (clone_one_breakpoint): Likewise.
5091 (delete_reinsert_breakpoints): Change parameter to thread.
5093 (has_reinsert_breakpoints): Likewise.
5094 (uninsert_reinsert_breakpoints): Likewise.
5095 (reinsert_reinsert_breakpoints): Likewise.
5096 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5097 (delete_reinsert_breakpoints): Likewise.
5098 (reinsert_reinsert_breakpoints): Likewise.
5099 (uninsert_reinsert_breakpoints): Likewise.
5100 (has_reinsert_breakpoints): Likewise.
5102 2016-07-21 Yao Qi <yao.qi@linaro.org>
5104 * inferiors.c (get_thread_process): Make parameter const.
5105 * inferiors.h (get_thread_process): Update declaration.
5106 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5107 Add new parameters child_thread and parent_thread. Callers
5109 * mem-break.h (clone_all_breakpoints): Update declaration.
5111 2016-07-21 Yao Qi <yao.qi@linaro.org>
5113 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5114 <command_list, handler>: Remove.
5115 (struct gdb_breakpoint): New.
5116 (struct other_breakpoint): New.
5117 (struct reinsert_breakpoint): New.
5118 (is_gdb_breakpoint): New function.
5119 (any_persistent_commands): Update command_list if
5120 is_gdb_breakpoint returns true.
5121 (set_breakpoint): Create breakpoints according to their types.
5122 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5123 (set_gdb_breakpoint_1): Likewise.
5124 (set_gdb_breakpoint): Likewise.
5125 (clear_breakpoint_conditions): Change parameter type to
5126 'struct gdb_breakpoint *'.
5127 (clear_breakpoint_commands): Likewise.
5128 (clear_breakpoint_conditions_and_commands): Likewise.
5129 (add_condition_to_breakpoint): Likewise.
5130 (add_breakpoint_condition): Likewise.
5131 (add_commands_to_breakpoint): Likewise.
5132 (check_breakpoints): Check other_breakpoint.
5133 (clone_one_breakpoint): Clone breakpopint according to its type.
5134 * mem-break.h (struct gdb_breakpoint): Declare.
5135 (set_gdb_breakpoint): Update declaration.
5136 (clear_breakpoint_conditions_and_commands): Likewise.
5137 (add_breakpoint_condition): Likewise.
5138 (add_breakpoint_commands): Likewise.
5139 * server.c (process_point_options): Change parameter type to
5140 'struct gdb_breakpoint *'.
5142 2016-07-21 Yao Qi <yao.qi@linaro.org>
5144 * mem-break.c (set_breakpoint_at): Rename it to ...
5145 (set_breakpoint_type_at): ... it.
5146 (set_breakpoint_at): Call set_breakpoint_type_at.
5147 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5148 * mem-break.h (set_breakpoint_at): Update comments.
5150 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5152 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5154 (nios2_store_gregset): Likewise.
5156 2016-07-01 Pedro Alves <palves@redhat.com>
5157 Antoine Tremblay <antoine.tremblay@ericsson.com>
5159 * linux-low.c: Change interface to take the target lwp_info
5160 pointer directly and return void. Handle detaching from a zombie
5162 (linux_detach_lwp_callback): New function.
5163 (linux_detach): Detach from the leader thread after detaching from
5166 2016-06-28 Yao Qi <yao.qi@linaro.org>
5168 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5169 for variable new_offset.
5170 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5171 (aarch64_ftrace_insn_reloc_cb): Likewise.
5172 (aarch64_ftrace_insn_reloc_tb): Likewise.
5173 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5174 PRIx64 instead of PRIx32.
5176 2016-06-28 Yao Qi <yao.qi@linaro.org>
5178 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5179 (the_low_target): Install arm_get_syscall_trapinfo.
5181 2016-06-28 Yao Qi <yao.qi@linaro.org>
5183 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5185 (the_low_target): Install aarch64_get_syscall_trapinfo.
5187 2016-06-28 Yao Qi <yao.qi@linaro.org>
5189 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5191 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5192 Remove parameter sysno.
5193 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5196 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5198 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5199 (s390_emit_ne_goto): Likewise.
5200 (s390_emit_lt_goto): Likewise.
5201 (s390_emit_le_goto): Likewise.
5202 (s390_emit_gt_goto): Likewise.
5203 (s390_emit_ge_goto): Likewise.
5204 (s390x_emit_eq_goto): Likewise.
5205 (s390x_emit_ne_goto): Likewise.
5206 (s390x_emit_lt_goto): Likewise.
5207 (s390x_emit_le_goto): Likewise.
5208 (s390x_emit_gt_goto): Likewise.
5209 (s390x_emit_ge_goto): Likewise.
5210 (s390_emit_ops_impl): Mark variable static.
5211 (s390x_emit_ops): Likewise.
5213 2016-06-17 Yao Qi <yao.qi@linaro.org>
5215 * linux-low.c (handle_extended_wait): Call
5216 uninsert_reinsert_breakpoints for the parent process. Remove
5217 reinsert breakpoints from the child process. Reinsert them to
5218 the parent process when vfork is done.
5219 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5220 (reinsert_reinsert_breakpoints): New function.
5221 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5222 (reinsert_reinsert_breakpoints): Declare.
5224 2016-06-17 Yao Qi <yao.qi@linaro.org>
5226 * linux-low.c (handle_extended_wait): If the parent is doing
5227 step-over, remove the reinsert breakpoints from the forked child.
5229 2016-06-17 Yao Qi <yao.qi@linaro.org>
5231 * linux-low.c (unsuspend_all_lwps): Declare.
5232 (linux_low_filter_event): If thread exited, call finish_step_over.
5233 If step-over is finished, unsuspend other threads.
5235 2016-06-17 Yao Qi <yao.qi@linaro.org>
5237 * linux-low.c (linux_resume_one_lwp_throw): Assert
5238 has_reinsert_breakpoints returns false.
5239 * mem-break.c (delete_disabled_breakpoints): Assert
5240 bp type isn't reinsert_breakpoint.
5242 2016-06-17 Yao Qi <yao.qi@linaro.org>
5244 * linux-low.c (maybe_hw_step): New function.
5245 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5246 (finish_step_over): Switch current_thread to lwp temporarily,
5247 and assert has_reinsert_breakpoints returns true.
5248 (proceed_one_lwp): Call maybe_hw_step.
5249 * mem-break.c (has_reinsert_breakpoints): New function.
5250 * mem-break.h (has_reinsert_breakpoints): Declare.
5252 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5254 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5256 2016-05-17 Yao Qi <yao.qi@linaro.org>
5258 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5259 instead of find_inferior.
5261 2016-05-05 Yao Qi <yao.qi@linaro.org>
5263 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5264 Initialize res to zero.
5266 2016-05-05 Yao Qi <yao.qi@linaro.org>
5268 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5271 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5273 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5274 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5275 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5277 2016-04-28 Par Olsson <par.olsson@windriver.com>
5278 Simon Marchi <simon.marchi@ericsson.com>
5280 * tracepoint.c (write_inferior_int8): New function.
5281 (cmd_qtenable_disable): Write enable flag using
5282 write_inferior_int8.
5284 2016-04-25 Yao Qi <yao.qi@linaro.org>
5286 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5287 (need_step_over_p): Return zero if the LWP has pending signals
5288 can be delivered on software single step target.
5290 2016-04-25 Yao Qi <yao.qi@linaro.org>
5292 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5293 return instead of error.
5295 2016-04-22 Yao Qi <yao.qi@linaro.org>
5297 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5300 2016-04-22 Yao Qi <yao.qi@linaro.org>
5302 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5303 signal when stepping over breakpoint with software single
5306 2016-04-21 Pedro Alves <palves@redhat.com>
5308 * linux-s390-low.c (s390_collect_ptrace_register)
5309 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5311 (s390_check_regset): Use void * instead of gdb_byte *.
5313 2016-04-20 Pedro Alves <palves@redhat.com>
5315 * configure: Renegerate.
5317 2016-04-20 Yao Qi <yao.qi@linaro.org>
5319 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5320 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5322 (arm_store_gregset): Likewise.
5324 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5326 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5327 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5328 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5329 (amd64-avx-mpx-linux.c): New rules.
5330 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5331 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5332 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5333 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5334 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5335 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5336 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5337 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5338 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5339 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5340 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5341 * linux-x86-low.c (x86_linux_read_description): Add case for
5342 X86_XSTATE_AVX_MPX_MASK.
5343 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5344 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5345 init_registers_i386_avx_mpx_linux.
5346 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5347 (initialize_low_tracepoint): Call
5348 init_registers_i386_avx_mpx_linux.
5349 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5350 (initialize_low_tracepoint): Call
5351 init_registers_amd64_avx_mpx_linux.
5352 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5353 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5354 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5357 2016-04-18 Pedro Alves <palves@redhat.com>
5359 * configure: Regenerate.
5361 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5363 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5364 (aarch64_emit_sub): Likewise.
5366 2016-04-12 Pedro Alves <palves@redhat.com>
5368 * utils.c (prepare_to_throw_exception): Delete.
5370 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5372 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5374 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5376 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5378 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5380 * linux-aarch64-ipa.c: Add <elf.h> include.
5381 * linux-ppc-ipa.c: Add <elf.h> include.
5382 * linux-s390-ipa.c: Add <elf.h> include.
5384 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5386 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5387 (get_raw_reg_ptr): Likewise.
5388 (get_trace_state_variable_value_ptr): Likewise.
5389 (set_trace_state_variable_value_ptr): Likewise.
5390 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5393 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5394 Marcin Kościelnicki <koriakin@0x04.net>
5397 * linux-ppc-low.c (emit_insns): New function.
5398 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5399 (ppc_emit_prologue): New function.
5400 (ppc_emit_epilogue): New function.
5401 (ppc_emit_add): New function.
5402 (ppc_emit_sub): New function.
5403 (ppc_emit_mul): New function.
5404 (ppc_emit_lsh): New function.
5405 (ppc_emit_rsh_signed): New function.
5406 (ppc_emit_rsh_unsigned): New function.
5407 (ppc_emit_ext): New function.
5408 (ppc_emit_zero_ext): New function.
5409 (ppc_emit_log_not): New function.
5410 (ppc_emit_bit_and): New function.
5411 (ppc_emit_bit_or): New function.
5412 (ppc_emit_bit_xor): New function.
5413 (ppc_emit_bit_not): New function.
5414 (ppc_emit_equal): New function.
5415 (ppc_emit_less_signed): New function.
5416 (ppc_emit_less_unsigned): New function.
5417 (ppc_emit_ref): New function.
5418 (ppc_emit_const): New function.
5419 (ppc_emit_reg): New function.
5420 (ppc_emit_pop): New function.
5421 (ppc_emit_stack_flush): New function.
5422 (ppc_emit_swap): New function.
5423 (ppc_emit_stack_adjust): New function.
5424 (ppc_emit_call): New function.
5425 (ppc_emit_int_call_1): New function.
5426 (ppc_emit_void_call_2): New function.
5427 (ppc_emit_if_goto): New function.
5428 (ppc_emit_goto): New function.
5429 (ppc_emit_eq_goto): New function.
5430 (ppc_emit_ne_goto): New function.
5431 (ppc_emit_lt_goto): New function.
5432 (ppc_emit_le_goto): New function.
5433 (ppc_emit_gt_goto): New function.
5434 (ppc_emit_ge_goto): New function.
5435 (ppc_write_goto_address): New function.
5436 (ppc_emit_ops_impl): New static variable.
5437 (ppc64v1_emit_prologue): New function.
5438 (ppc64v2_emit_prologue): New function.
5439 (ppc64_emit_epilogue): New function.
5440 (ppc64_emit_add): New function.
5441 (ppc64_emit_sub): New function.
5442 (ppc64_emit_mul): New function.
5443 (ppc64_emit_lsh): New function.
5444 (ppc64_emit_rsh_signed): New function.
5445 (ppc64_emit_rsh_unsigned): New function.
5446 (ppc64_emit_ext): New function.
5447 (ppc64_emit_zero_ext): New function.
5448 (ppc64_emit_log_not): New function.
5449 (ppc64_emit_bit_and): New function.
5450 (ppc64_emit_bit_or): New function.
5451 (ppc64_emit_bit_xor): New function.
5452 (ppc64_emit_bit_not): New function.
5453 (ppc64_emit_equal): New function.
5454 (ppc64_emit_less_signed): New function.
5455 (ppc64_emit_less_unsigned): New function.
5456 (ppc64_emit_ref): New function.
5457 (ppc64_emit_const): New function.
5458 (ppc64v1_emit_reg): New function.
5459 (ppc64v2_emit_reg): New function.
5460 (ppc64_emit_pop): New function.
5461 (ppc64_emit_stack_flush): New function.
5462 (ppc64_emit_swap): New function.
5463 (ppc64v1_emit_call): New function.
5464 (ppc64v2_emit_call): New function.
5465 (ppc64v1_emit_int_call_1): New function.
5466 (ppc64v2_emit_int_call_1): New function.
5467 (ppc64v1_emit_void_call_2): New function.
5468 (ppc64v2_emit_void_call_2): New function.
5469 (ppc64_emit_if_goto): New function.
5470 (ppc64_emit_eq_goto): New function.
5471 (ppc64_emit_ne_goto): New function.
5472 (ppc64_emit_lt_goto): New function.
5473 (ppc64_emit_le_goto): New function.
5474 (ppc64_emit_gt_goto): New function.
5475 (ppc64_emit_ge_goto): New function.
5476 (ppc64v1_emit_ops_impl): New static variable.
5477 (ppc64v2_emit_ops_impl): New static variable.
5478 (ppc_emit_ops): New function.
5479 (linux_low_target): Wire in ppc_emit_ops.
5481 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5482 Marcin Kościelnicki <koriakin@0x04.net>
5485 * Makefile.in: Add powerpc-*-ipa.o
5486 * configure.srv: Add ipa_obj for powerpc*-linux.
5487 * linux-ppc-ipa.c: New file.
5488 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5490 (PPC_FIELD): New macro.
5491 (PPC_SEXT): New macro.
5492 (PPC_OP6): New macro.
5493 (PPC_BO): New macro.
5494 (PPC_LI): New macro.
5495 (PPC_BD): New macro.
5496 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5497 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5498 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5499 (ppc_get_thread_area): New function.
5500 (is_elfv2_inferior): New function.
5501 (gen_ds_form): New function.
5502 (GEN_STD): New macro.
5503 (GEN_STDU): New macro.
5504 (GEN_LD): New macro.
5505 (GEN_LDU): New macro.
5506 (gen_d_form): New function.
5507 (GEN_ADDI): New macro.
5508 (GEN_ADDIS): New macro.
5509 (GEN_LI): New macro.
5510 (GEN_LIS): New macro.
5511 (GEN_ORI): New macro.
5512 (GEN_ORIS): New macro.
5513 (GEN_LWZ): New macro.
5514 (GEN_STW): New macro.
5515 (GEN_STWU): New macro.
5516 (gen_xfx_form): New function.
5517 (GEN_MFSPR): New macro.
5518 (GEN_MTSPR): New macro.
5519 (GEN_MFCR): New macro.
5520 (GEN_MTCR): New macro.
5521 (GEN_SYNC): New macro.
5522 (GEN_LWSYNC): New macro.
5523 (gen_x_form): New function.
5524 (GEN_OR): New macro.
5525 (GEN_MR): New macro.
5526 (GEN_LWARX): New macro.
5527 (GEN_STWCX): New macro.
5528 (GEN_CMPW): New macro.
5529 (gen_md_form): New function.
5530 (GEN_RLDICL): New macro.
5531 (GEN_RLDICR): New macro.
5532 (gen_i_form): New function.
5534 (GEN_BL): New macro.
5535 (gen_b_form): New function.
5536 (GEN_BNE): New macro.
5537 (GEN_LOAD): New macro.
5538 (GEN_STORE): New macro.
5539 (gen_limm): New function.
5540 (gen_atomic_xchg): New function.
5541 (gen_call): New function.
5542 (ppc_relocate_instruction): New function.
5543 (ppc_install_fast_tracepoint_jump_pad): New function.
5544 (ppc_get_min_fast_tracepoint_insn_len): New function.
5545 (ppc_get_ipa_tdesc_idx): New function.
5546 (the_low_target): Wire in the new functions.
5547 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5549 * linux-ppc-tdesc.h: New file.
5551 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5553 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5554 (alloc_jump_pad_buffer): New function.
5555 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5556 (alloc_jump_pad_buffer): New function.
5557 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5558 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5559 (alloc_jump_pad_buffer): New function.
5560 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5561 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5562 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5563 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5565 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5567 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5568 * linux-amd64-ipa.c: Likewise.
5569 * linux-i386-ipa.c: Likewise.
5570 * linux-s390-ipa.c: Likewise.
5571 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5572 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5573 set_trace_state_variable_value_ptr.
5574 (struct ipa_sym_addresses): Likewise.
5575 (symbol_list): Likewise.
5576 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5577 accessing gdb_collect directly.
5578 (gdb_collect_ptr_type): New typedef.
5579 (get_raw_reg_ptr_type): New typedef.
5580 (get_trace_state_variable_value_ptr_type): New typedef.
5581 (set_trace_state_variable_value_ptr_type): New typedef.
5582 (gdb_collect_ptr): New global.
5583 (get_raw_reg_ptr): New global.
5584 (get_trace_state_variable_value_ptr): New global.
5585 (set_trace_state_variable_value_ptr): New global.
5586 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5587 accessing get_raw_reg directly.
5588 (get_get_tsv_func_addr): Likewise for
5589 get_trace_state_variable_value_ptr.
5590 (get_set_tsv_func_addr): Likewise for
5591 set_trace_state_variable_value_ptr.
5592 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5594 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5596 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5598 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5600 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5602 (relocate_instruction): Remove own_buf.
5603 * server.c (own_buf): Make global.
5604 (handle_v_requests): Make global.
5605 * server.h (own_buf): New declaration.
5606 (handle_v_requests): New prototype.
5608 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5611 * linux-s390-low.c (add_insns): New function.
5612 (s390_emit_prologue): New function.
5613 (s390_emit_epilogue): New function.
5614 (s390_emit_add): New function.
5615 (s390_emit_sub): New function.
5616 (s390_emit_mul): New function.
5617 (s390_emit_lsh): New function.
5618 (s390_emit_rsh_signed): New function.
5619 (s390_emit_rsh_unsigned): New function.
5620 (s390_emit_ext): New function.
5621 (s390_emit_log_not): New function.
5622 (s390_emit_bit_and): New function.
5623 (s390_emit_bit_or): New function.
5624 (s390_emit_bit_xor): New function.
5625 (s390_emit_bit_not): New function.
5626 (s390_emit_equal): New function.
5627 (s390_emit_less_signed): New function.
5628 (s390_emit_less_unsigned): New function.
5629 (s390_emit_ref): New function.
5630 (s390_emit_if_goto): New function.
5631 (s390_emit_goto): New function.
5632 (s390_write_goto_address): New function.
5633 (s390_emit_litpool): New function.
5634 (s390_emit_const): New function.
5635 (s390_emit_call): New function.
5636 (s390_emit_reg): New function.
5637 (s390_emit_pop): New function.
5638 (s390_emit_stack_flush): New function.
5639 (s390_emit_zero_ext): New function.
5640 (s390_emit_swap): New function.
5641 (s390_emit_stack_adjust): New function.
5642 (s390_emit_set_r2): New function.
5643 (s390_emit_int_call_1): New function.
5644 (s390_emit_void_call_2): New function.
5645 (s390_emit_eq_goto): New function.
5646 (s390_emit_ne_goto): New function.
5647 (s390_emit_lt_goto): New function.
5648 (s390_emit_le_goto): New function.
5649 (s390_emit_gt_goto): New function.
5650 (s390_emit_ge_goto): New function.
5651 (s390x_emit_prologue): New function.
5652 (s390x_emit_epilogue): New function.
5653 (s390x_emit_add): New function.
5654 (s390x_emit_sub): New function.
5655 (s390x_emit_mul): New function.
5656 (s390x_emit_lsh): New function.
5657 (s390x_emit_rsh_signed): New function.
5658 (s390x_emit_rsh_unsigned): New function.
5659 (s390x_emit_ext): New function.
5660 (s390x_emit_log_not): New function.
5661 (s390x_emit_bit_and): New function.
5662 (s390x_emit_bit_or): New function.
5663 (s390x_emit_bit_xor): New function.
5664 (s390x_emit_bit_not): New function.
5665 (s390x_emit_equal): New function.
5666 (s390x_emit_less_signed): New function.
5667 (s390x_emit_less_unsigned): New function.
5668 (s390x_emit_ref): New function.
5669 (s390x_emit_if_goto): New function.
5670 (s390x_emit_const): New function.
5671 (s390x_emit_call): New function.
5672 (s390x_emit_reg): New function.
5673 (s390x_emit_pop): New function.
5674 (s390x_emit_stack_flush): New function.
5675 (s390x_emit_zero_ext): New function.
5676 (s390x_emit_swap): New function.
5677 (s390x_emit_stack_adjust): New function.
5678 (s390x_emit_int_call_1): New function.
5679 (s390x_emit_void_call_2): New function.
5680 (s390x_emit_eq_goto): New function.
5681 (s390x_emit_ne_goto): New function.
5682 (s390x_emit_lt_goto): New function.
5683 (s390x_emit_le_goto): New function.
5684 (s390x_emit_gt_goto): New function.
5685 (s390x_emit_ge_goto): New function.
5686 (s390_emit_ops): New function.
5687 (struct linux_target_ops): Fill in emit_ops hook.
5689 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5692 * Makefile.in: Add s390 IPA files.
5693 * configure.srv: Build IPA for s390.
5694 * linux-s390-ipa.c: New file.
5695 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5696 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5697 (tdesc_s390_linux32): Likewise.
5698 (init_registers_s390_linux32v1): Likewise.
5699 (tdesc_s390_linux32v1): Likewise.
5700 (init_registers_s390_linux32v2): Likewise.
5701 (tdesc_s390_linux32v2): Likewise.
5702 (init_registers_s390_linux64): Likewise.
5703 (tdesc_s390_linux64): Likewise.
5704 (init_registers_s390_linux64v1): Likewise.
5705 (tdesc_s390_linux64v1): Likewise.
5706 (init_registers_s390_linux64v2): Likewise.
5707 (tdesc_s390_linux64v2): Likewise.
5708 (init_registers_s390_te_linux64): Likewise.
5709 (tdesc_s390_te_linux64): Likewise.
5710 (init_registers_s390_vx_linux64): Likewise.
5711 (tdesc_s390_vx_linux64): Likewise.
5712 (init_registers_s390_tevx_linux64): Likewise.
5713 (tdesc_s390_tevx_linux64): Likewise.
5714 (init_registers_s390x_linux64): Likewise.
5715 (tdesc_s390x_linux64): Likewise.
5716 (init_registers_s390x_linux64v1): Likewise.
5717 (tdesc_s390x_linux64v1): Likewise.
5718 (init_registers_s390x_linux64v2): Likewise.
5719 (tdesc_s390x_linux64v2): Likewise.
5720 (init_registers_s390x_te_linux64): Likewise.
5721 (tdesc_s390x_te_linux64): Likewise.
5722 (init_registers_s390x_vx_linux64): Likewise.
5723 (tdesc_s390x_vx_linux64): Likewise.
5724 (init_registers_s390x_tevx_linux64): Likewise.
5725 (tdesc_s390x_tevx_linux64): Likewise.
5726 (have_hwcap_s390_vx): New static variable.
5727 (s390_arch_setup): Fill have_hwcap_s390_vx.
5728 (s390_get_thread_area): New function.
5729 (s390_ft_entry_gpr_esa): New const.
5730 (s390_ft_entry_gpr_zarch): New const.
5731 (s390_ft_entry_misc): New const.
5732 (s390_ft_entry_fr): New const.
5733 (s390_ft_entry_vr): New const.
5734 (s390_ft_main_31): New const.
5735 (s390_ft_main_64): New const.
5736 (s390_ft_exit_fr): New const.
5737 (s390_ft_exit_vr): New const.
5738 (s390_ft_exit_misc): New const.
5739 (s390_ft_exit_gpr_esa): New const.
5740 (s390_ft_exit_gpr_zarch): New const.
5741 (append_insns): New function.
5742 (s390_relocate_instruction): New function.
5743 (s390_install_fast_tracepoint_jump_pad): New function.
5744 (s390_get_min_fast_tracepoint_insn_len): New function.
5745 (s390_get_ipa_tdesc_idx): New function.
5746 (struct linux_target_ops): Wire in the above functions.
5747 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5748 * linux-s390-tdesc.h: New file.
5750 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5752 * linux-s390-low.c (s390_supports_tracepoints): New function.
5753 (struct linux_target_ops): Fill supports_tracepoints hook.
5755 2016-03-18 Yao Qi <yao.qi@linaro.org>
5757 * linux-low.c (lwp_signal_can_be_delivered): New function.
5758 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5760 2016-03-18 Yao Qi <yao.qi@linaro.org>
5762 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5763 0 if signal is enqueued. Remove 'signal' from one debugging
5764 message. Move one debugging message to some lines below.
5765 Remove code setting 'signal' to 0.
5767 2016-03-18 Yao Qi <yao.qi@linaro.org>
5769 * linux-low.c (linux_low_filter_event): Remove redundant
5770 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5772 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5774 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5775 (struct linux_target_ops): Wire in the above.
5777 2016-03-03 Yao Qi <yao.qi@linaro.org>
5779 * linux-low.c: Update comments to start_step_over.
5781 2016-03-03 Yao Qi <yao.qi@linaro.org>
5784 * linux-low.c (handle_extended_wait): Set child suspended
5785 if event_lwp->bp_reinsert isn't zero.
5787 2016-03-02 Yao Qi <yao.qi@linaro.org>
5789 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5790 enqueue_pending_signal.
5792 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5794 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5797 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5799 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5800 (s390_regmap_3264) [!__s390x__]: New global.
5801 (s390_collect_ptrace_register): Skip map entries containing -1.
5802 (s390_supply_ptrace_register): Ditto.
5803 (s390_fill_gprs_high): New function.
5804 (s390_store_gprs_high): New function.
5805 (s390_regsets): Add NT_S390_HIGH_GPRS.
5806 (s390_get_hwcap): Enable on 31-bit.
5807 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5808 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5809 Detect NT_S390_HIGH_GPRS.
5810 (s390_usrregs_info_3264): Enable on 31-bit.
5811 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5812 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5814 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5817 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5818 * configure.srv: Ditto.
5819 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5820 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5821 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5822 (init_registers_amd64_linux): Remove prototype.
5823 (tdesc_amd64_linux): Remove declaration.
5824 (get_ipa_tdesc): New function.
5825 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5826 initialize remaining tdescs.
5827 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5828 (init_registers_i386_linux): Remove prototype.
5829 (tdesc_i386_linux): Remove declaration.
5830 (get_ipa_tdesc): New function.
5831 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5832 initialize remaining tdescs.
5833 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5834 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5835 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5836 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5837 (x86_get_ipa_tdesc_idx): New function.
5838 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5839 * linux-x86-tdesc.h: New file.
5840 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5841 (target_get_ipa_tdesc_idx): New macro.
5842 * tracepoint.c (ipa_tdesc_idx): New macro.
5843 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5844 (symbol_list): Add ipa_tdesc_idx.
5845 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5846 (ipa_tdesc): Remove.
5847 (ipa_tdesc_idx): New variable.
5848 (get_context_regcache): Use get_ipa_tdesc.
5849 (gdb_collect): Ditto.
5851 * tracepoint.h (get_ipa_tdesc): New prototype.
5852 (ipa_tdesc): Remove.
5854 2016-02-24 Pedro Alves <palves@redhat.com>
5856 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5857 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5858 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5859 Factor out common code between the USE_SIGTRAP_SIGINFO and
5860 !USE_SIGTRAP_SIGINFO blocks.
5861 (linux_low_filter_event): Call save_stop_reason instead of
5862 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5864 (linux_wait_1): Update comments.
5866 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5868 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5869 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5870 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5871 ppc_insert_point, ppc_remove_point.
5873 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5875 * linux-s390-low.c (s390_supports_z_point_type): New function.
5876 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5878 2016-02-16 Yao Qi <yao.qi@linaro.org>
5880 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5881 PC. Get pc from regcache_read_pc.
5883 2016-02-12 Yao Qi <yao.qi@linaro.org>
5885 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5886 or linux_get_pc_32bit.
5887 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5889 2016-02-12 Yao Qi <yao.qi@linaro.org>
5891 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5892 arm_linux_get_next_pcs_fixup.
5894 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5896 * tracepoint.c (x_tracepoint_action_download): Change
5897 write_inferior_data_ptr to write_inferior_data_pointer.
5898 (cmd_qtstart): Likewise.
5899 (write_inferior_data_ptr): Remove.
5900 (download_agent_expr): Change write_inferior_data_ptr to
5901 write_inferior_data_pointer.
5902 (download_tracepoint_1): Likewise.
5903 (download_tracepoint): Likewise.
5904 (download_trace_state_variables): Likewise.
5906 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5907 Marcin Kościelnicki <koriakin@0x04.net>
5909 * tracepoint.c (struct tracepoint_action_ops): Remove.
5910 (struct tracepoint_action): Remove ops.
5911 (m_tracepoint_action_download, r_tracepoint_action_download)
5912 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5913 size and offset accordingly.
5914 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5915 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5916 (tracepoint_action_send, tracepoint_action_download): New functions.
5917 Helpers for trace action handlers.
5918 (add_tracepoint_action): Remove setup actions ops.
5919 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5921 2016-02-10 Yao Qi <yao.qi@linaro.org>
5923 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5925 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5927 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5929 * configure: Regenerate.
5931 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5933 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5934 void * to gdb_byte *.
5935 * linux-low.c (siginfo_fixup): Likewise.
5936 (linux_xfer_siginfo): Likewise.
5937 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5939 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5941 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5943 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5945 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5947 * linux-x86-low.c [__x86_64__]: Include
5948 "nat/amd64-linux-siginfo.h".
5949 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5950 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5951 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5952 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5953 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5954 (cpt_si_fd, si_timerid, si_overrun): Move from
5955 nat/amd64-linux-siginfo.c.
5956 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5958 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5960 * server.c (skip_to_semicolon): Remove.
5961 (process_point_options): Use strchrnul instead of
5964 2016-01-26 Yao Qi <yao.qi@linaro.org>
5966 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5967 * linux-low.c (install_software_single_step_breakpoints): Don't
5968 call regcache_read_pc.
5969 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5972 2016-01-26 Yao Qi <yao.qi@linaro.org>
5974 * linux-low.c (install_software_single_step_breakpoints): Call
5975 regcache_read_pc instead of get_pc.
5977 2016-01-26 Yao Qi <yao.qi@linaro.org>
5979 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5980 (unblock_async_io): Rename to ...
5981 (block_unblock_async_io): ... it. New function.
5982 (enable_async_io): Don't install SIGIO handler. Unblock it
5984 (disable_async_io): Don't ignore SIGIO. Block it instead.
5985 (initialize_async_io): Install SIGIO handler. Don't call
5988 2016-01-26 Yao Qi <yao.qi@linaro.org>
5990 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5991 first character is '\003', call *the_target->request_interrupt.
5993 2016-01-25 Yao Qi <yao.qi@linaro.org>
5995 * remote-utils.c (new_thread_notify): Remove.
5996 (dead_thread_notify): Likewise.
5997 * remote-utils.h (new_thread_notify): Remove declaration.
5998 (dead_thread_notify): Likewise.
6000 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6002 * gdb.trace/pending.exp: Fix expected message on continue.
6004 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6006 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6007 it works properly on big-endian machines where sizeof (CORE_ADDR)
6010 2016-01-21 Pedro Alves <palves@redhat.com>
6012 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6013 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6014 * configure: Regenerate.
6016 2016-01-21 Yao Qi <yao.qi@linaro.org>
6018 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6019 is_thumb and set it according to CPSR saved on the stack.
6020 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6021 arm_sigreturn_next_pc.
6023 2016-01-18 Yao Qi <yao.qi@linaro.org>
6025 * linux-low.c (linux_set_pc_64bit): New function.
6026 (linux_get_pc_64bit): New function.
6027 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6029 * linux-sparc-low.c (debug_threads): Remove declaration.
6030 (sparc_get_pc): Remove.
6031 (the_low_target): Use linux_get_pc_64bit instead of
6033 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6034 (the_low_target): Use linux_get_pc_64bit and
6037 2016-01-18 Yao Qi <yao.qi@linaro.org>
6039 * linux-arm-low.c (debug_threads): Remove declaration.
6040 (arm_get_pc, arm_set_pc): Remove.
6041 (the_low_target): Use linux_get_pc_32bit and
6043 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6044 (the_low_target): Use linux_get_pc_32bit and
6046 * linux-cris-low.c (debug_threads): Remove declaration.
6047 (cris_get_pc, cris_set_pc,): Remove.
6048 (the_low_target): Use linux_get_pc_32bit and
6050 * linux-crisv32-low.c (debug_threads): Remove declaration.
6051 (cris_get_pc, cris_set_pc): Remove.
6052 (the_low_target): Use linux_get_pc_32bit and
6054 * linux-low.c: Include inttypes.h.
6055 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6056 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6057 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6058 (the_low_target): Use linux_get_pc_32bit and
6060 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6061 (the_low_target): Use linux_get_pc_32bit and
6063 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6064 (the_low_target): Use linux_get_pc_32bit and
6066 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6067 (the_low_target): Use linux_get_pc_32bit and
6069 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6070 (the_low_target): Use linux_get_pc_32bit and
6073 2016-01-18 Gary Benson <gbenson@redhat.com>
6075 * configure.ac (AC_FUNC_FORK): New check.
6076 * config.in: Regenerate.
6077 * configure: Likewise.
6079 2016-01-14 Yao Qi <yao.qi@linaro.org>
6081 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6082 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6083 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6084 arm_get_next_pcs_ctor.
6086 2016-01-12 Josh Stone <jistone@redhat.com>
6087 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6089 * inferiors.h: Include "gdb_vecs.h".
6090 (struct process_info): Add syscalls_to_catch.
6091 * inferiors.c (remove_process): Free syscalls_to_catch.
6092 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6093 syscall_return stops.
6094 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6095 * server.c (handle_general_set): Handle QCatchSyscalls.
6096 (handle_query): Report support for QCatchSyscalls.
6097 * target.h (struct target_ops): Add supports_catch_syscall.
6098 (target_supports_catch_syscall): New macro.
6099 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6100 (struct lwp_info): Add syscall_state.
6101 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6102 Maintain syscall_state and syscalls_to_catch across exec.
6103 (get_syscall_trapinfo): New function, proxy to the_low_target.
6104 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6105 (linux_low_filter_event): Toggle syscall_state entry/return for
6106 syscall traps, and set it ignored for all others.
6107 (gdb_catching_syscalls_p): New function.
6108 (gdb_catch_this_syscall_p): New function.
6109 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6110 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6111 (linux_supports_catch_syscall): New function.
6112 (linux_target_ops): Install it.
6113 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6114 (the_low_target): Install it.
6116 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6118 * acinclude.m4: Include new ../warning.m4 file.
6119 * configure: Regenerated.
6120 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6122 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6124 * ax.c (is_goto_target): Mark static.
6125 * linux-low.c (register_addr): Likewise.
6126 (linux_fetch_registers, linux_store_registers): Likewise.
6127 * mem-break.c (any_persistent_commands): Fix old prototype.
6128 (add_commands_to_breakpoint): Mark static.
6129 * regcache.c (find_register_by_name): Delete unused func.
6130 * remote-utils.c (hex_or_minus_one): Mark static.
6131 * server.c (monitor_show_help): Mark static.
6132 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6133 handle_v_requests): Likewise.
6135 2016-01-12 Pedro Alves <palves@redhat.com>
6137 Remove use of the registered trademark symbol throughout.
6139 2016-01-08 Yao Qi <yao.qi@linaro.org>
6141 * remote-utils.c (getpkt): If c is '\003', call target hook
6144 2016-01-06 Yao Qi <yao.qi@linaro.org>
6146 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6147 linux-aarch32-low.c.
6148 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6149 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6150 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6151 (thumb2_breakpoint): Declare.
6152 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6153 linux-aarch32-low.h.
6154 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6155 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6156 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6158 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6160 * gdbreplay.c (gdbreplay_version): Change copyright year in
6162 * server.c (gdbserver_version): Likewise.
6164 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6166 * server.c (crc32_table): Delete.
6167 (crc32): Use libiberty's xcrc32 function.
6169 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6171 * lynx-low.c (lynx_delete_thread_callback): New function.
6172 (lynx_mourn): Properly delete our process and all of its
6173 threads. Remove call to clear_inferiors.
6175 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6177 * target.c (thread_search_callback): Add check that
6178 the thread_stopped target callback is not NULL before
6181 2015-12-21 Yao Qi <yao.qi@linaro.org>
6183 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6186 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6188 * server.c (handle_query): Call target_supports_software_single_step.
6190 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6192 * linux-low.c (single_step): New function.
6193 (linux_resume_one_lwp_throw): Call single_step.
6194 (start_step_over): Likewise.
6196 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6198 * Makefile.in (SFILES): Append arch/arm-linux.c,
6199 arch/arm-get-next-pcs.c.
6200 (arm-linux.o): New rule.
6201 (arm-get-next-pcs.o): New rule.
6202 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6204 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6205 to linux-aarch32-low.c.
6206 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6207 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6208 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6209 (thumb2_breakpoint_len): Likewise.
6210 (arm_is_thumb_mode): Make non-static.
6211 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6212 from linux-aarch32-low.c.
6213 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6214 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6215 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6216 (thumb2_breakpoint_len): Likewise.
6217 (arm_is_thumb_mode): New declaration.
6218 * linux-arm-low.c: Include arch/arm-linux.h
6219 aarch/arm-get-next-pcs.h, sys/syscall.h.
6220 (get_next_pcs_ops): New struct.
6221 (get_next_pcs_addr_bits_remove): New function.
6222 (get_next_pcs_is_thumb): New function.
6223 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6224 (arm_sigreturn_next_pc): Likewise.
6225 (get_next_pcs_syscall_next_pc): Likewise.
6226 (arm_gdbserver_get_next_pcs): Likewise.
6227 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6229 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6230 * server.h: Include gdb_vecs.h.
6232 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6234 * Makefile.in (SFILES): Append common/common-regcache.c.
6235 (OBS): Append common-regcache.o.
6236 (common-regcache.o): New rule.
6237 * regcache.c (init_register_cache): Initialize cache to
6239 (regcache_raw_read_unsigned): New function.
6240 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6241 register_status enum.
6243 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6245 * linux-aarch64-low.c (the_low_targets): Rename
6246 breakpoint_reinsert_addr to get_next_pcs.
6247 * linux-arm-low.c (the_low_targets): Likewise.
6248 * linux-bfin-low.c (the_low_targets): Likewise.
6249 * linux-cris-low.c (the_low_targets): Likewise.
6250 * linux-crisv32-low.c (the_low_targets): Likewise.
6251 * linux-low.c (can_software_single_step): Likewise.
6252 (install_software_single_step_breakpoints): New function.
6253 (start_step_over): Use install_software_single_step_breakpoints.
6254 * linux-low.h: New CORE_ADDR vector.
6255 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6257 * linux-mips-low.c (the_low_targets): Likewise.
6258 * linux-nios2-low.c (the_low_targets): Likewise.
6259 * linux-sparc-low.c (the_low_targets): Likewise.
6261 2015-12-17 Pedro Alves <palves@redhat.com>
6263 * linux-low.c (linux_kill_one_lwp): Remove references to
6265 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6267 (linux_init_signals): Delete.
6268 (initialize_low): Adjust.
6269 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6271 2015-12-16 Pedro Alves <palves@redhat.com>
6273 * configure.ac (compiler warning flags): When testing a
6274 -Wno-foo option, check whether -Wfoo works instead.
6275 * configure: Regenerate.
6277 2015-12-11 Don Breazeal <donb@codesourcery.com>
6279 * server.c (process_serial_event): Don't exit from gdbserver
6280 in remote mode if there are still active inferiors.
6282 2015-12-11 Yao Qi <yao.qi@linaro.org>
6284 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6285 arm_breakpoint_at if the process is 32-bit.
6287 2015-12-11 Yao Qi <yao.qi@linaro.org>
6289 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6292 2015-12-07 Yao Qi <yao.qi@linaro.org>
6294 * configure.srv: Append arm.o to srv_tgtobj for
6295 aarch64*-*-linux* target.
6296 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6297 from linux-arm-low.c.
6298 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6299 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6300 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6301 (thumb2_breakpoint_len): Likewise.
6302 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6303 (arm_breakpoint_kinds): Likewise.
6304 (arm_breakpoint_kind_from_pc): Likewise.
6305 (arm_sw_breakpoint_from_kind): Likewise.
6306 (arm_breakpoint_kind_from_current_state): Likewise.
6307 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6308 (arm_sw_breakpoint_from_kind): Declare.
6309 (arm_breakpoint_kind_from_current_state): Declare.
6310 (arm_breakpoint_at): Declare.
6311 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6312 arm_sw_breakpoint_from_kind if process is 32-bit.
6313 (aarch64_breakpoint_kind_from_pc): New function.
6314 (aarch64_breakpoint_kind_from_current_state): New function.
6315 (the_low_target): Initialize fields breakpoint_kind_from_pc
6316 and breakpoint_kind_from_current_state.
6317 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6318 linux-aarch32-low.c.
6319 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6320 (arm_breakpoint, arm_breakpoint_len): Likewise.
6321 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6322 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6323 (arm_is_thumb_mode): Likewise.
6324 (arm_breakpoint_at): Likewise.
6325 (arm_breakpoint_kind_from_pc): Likewise.
6326 (arm_sw_breakpoint_from_kind): Likewise.
6327 (arm_breakpoint_kind_from_current_state): Likewise.
6330 2015-08-04 Yao Qi <yao.qi@linaro.org>
6332 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6333 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6334 * server.c (extended_protocol): Remove "static".
6335 * server.h (extended_protocol): Declare it.
6337 2015-12-04 Josh Stone <jistone@redhat.com>
6339 * target.h (struct target_ops) <arch_setup>: Rename to ...
6340 (struct target_ops) <post_create_inferior>: ... this.
6341 (target_arch_setup): Rename to ...
6342 (target_post_create_inferior): ... this, calling post_create_inferior.
6343 * server.c (start_inferior): Update target_arch_setup calls to
6344 target_post_create_inferior.
6345 * linux-low.c (linux_low_ptrace_options): Forward declare.
6346 (linux_arch_setup): Update its comment for general use.
6347 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6348 (struct linux_target_ops): Use linux_post_create_inferior.
6349 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6350 to post_create_inferior.
6351 * nto-low.c (struct nto_target_ops): Likewise.
6352 * spu-low.c (struct spu_target_ops): Likewise.
6353 * win32-low.c (struct win32_target_ops): Likewise.
6355 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6357 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6359 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6361 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6362 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6363 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6364 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6365 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6366 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6367 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6368 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6369 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6370 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6371 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6372 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6374 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6376 * linux-low.c (linux_look_up_symbols): Don't call
6377 linux_supports_traceclone.
6378 * linux-low.h (thread_db_init): Remove use_events argument.
6379 * thread-db.c (thread_db_use_event): Remove global variable.
6380 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6381 (struct thread_db) <td_create_bp>: Remove field.
6382 (thread_db_create_event): Remove function.
6383 (thread_db_enable_reporting): Likewise.
6384 (find_one_thread): Don't check for thread_db_use_events.
6385 (attach_thread): Likewise.
6386 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6387 (try_thread_db_load_1): Don't check for thread_db_use_events.
6388 (thread_db_init): Remove use_events argument and thread events
6390 (remove_thread_event_breakpoints): Remove function.
6391 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6393 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6395 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6398 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6399 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6400 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6401 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6403 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6405 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6406 * linux-low.c (can_hardware_single_step): Use
6407 supports_hardware_single_step.
6408 (can_software_single_step): New function.
6409 (start_step_over): Call can_software_single_step.
6410 (linux_supports_hardware_single_step): New function.
6411 (struct target_ops) <supports_software_single_step>: Initialize.
6412 * linux-low.h (struct linux_target_ops)
6413 <supports_hardware_single_step>: Initialize.
6414 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6415 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6416 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6417 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6418 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6420 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6421 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6422 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6423 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6425 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6426 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6428 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6429 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6430 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6432 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6433 * target.h (struct target_ops): <supports_software_single_step>:
6435 (target_supports_software_single_step): New macro.
6437 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6439 * linux-low.c (linux_wait_1): Fix pc advance condition.
6440 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6441 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6443 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6445 * linux-arm-low.c (arm_is_thumb_mode): New function.
6446 (arm_breakpoint_at): Use arm_is_thumb_mode.
6447 (arm_breakpoint_kind_from_current_state): New function.
6448 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6450 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6451 (linux_breakpoint_kind_from_current_state): New function.
6452 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6453 * linux-low.h (struct linux_target_ops)
6454 <breakpoint_kind_from_current_state>: New field.
6455 * target.h (struct target_ops): Likewise.
6456 (target_breakpoint_kind_from_current_state): New macro.
6458 2015-11-30 Pedro Alves <palves@redhat.com>
6460 * linux-low.c (linux_resume): Wake up the event loop before
6463 2015-11-30 Pedro Alves <palves@redhat.com>
6465 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6467 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6469 * target.c (struct thread_search): New structure.
6470 (thread_search_callback): New function.
6471 (prev_general_thread): New global.
6472 (prepare_to_access_memory, done_accessing_memory): New functions.
6473 * target.h (prepare_to_access_memory, done_accessing_memory):
6474 Replace macros with function declarations.
6476 2015-11-30 Pedro Alves <palves@redhat.com>
6479 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6480 report TARGET_WAITKIND_NO_RESUMED.
6481 * remote-utils.c (prepare_resume_reply): Handle
6482 TARGET_WAITKIND_NO_RESUMED.
6483 * server.c (report_no_resumed): New global.
6484 (handle_query) <qSupported>: Handle "no-resumed+". Report
6485 "no-resumed+" support.
6486 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6487 return error if the client doesn't support no-resumed events.
6488 (push_stop_notification): New function.
6489 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6490 events if the client supports them.
6492 2015-11-30 Pedro Alves <palves@redhat.com>
6494 * linux-low.c (thread_still_has_status_pending_p): Don't check
6496 (lwp_resumed): New function.
6497 (status_pending_p_callback): Return early if the LWP is not
6498 supposed to be resumed.
6500 2015-11-30 Pedro Alves <palves@redhat.com>
6502 * linux-low.c (handle_extended_wait): Assert that the LWP's
6503 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6504 thread create events, leave the new child's status pending.
6505 (linux_low_filter_event): If GDB wants to hear about thread exit
6506 events, leave the LWP marked dead and don't delete it.
6507 (linux_wait_for_event_filtered): Don't check for thread exit.
6508 (filter_exit_event): New function.
6509 (linux_wait_1): Use it, when returning an exit event.
6510 (linux_resume_one_lwp_throw): Assert that the LWP's
6511 waitstatus is TARGET_WAITKIND_IGNORE.
6512 * remote-utils.c (prepare_resume_reply): Handle
6513 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6514 * server.c (report_thread_events): New global.
6515 (handle_general_set): Handle QThreadEvents.
6516 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6517 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6518 TARGET_WAITKIND_THREAD_EXITED.
6519 * server.h (report_thread_events): Declare.
6521 2015-11-30 Pedro Alves <palves@redhat.com>
6523 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6524 the thread's last_resume_kind was resume_stop.
6526 2015-11-30 Pedro Alves <palves@redhat.com>
6528 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6531 2015-11-30 Pedro Alves <palves@redhat.com>
6533 * server.c (handle_v_requests): Handle vCtrlC.
6535 2015-11-30 Pedro Alves <palves@redhat.com>
6537 * gdbthread.h (find_any_thread_of_pid): Declare.
6538 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6540 * server.c (handle_query): If current_thread is NULL, look for
6541 another thread of the selected process.
6543 2015-11-26 Daniel Colascione <dancol@dancol.org>
6544 Simon Marchi <simon.marchi@ericsson.com>
6546 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6547 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6549 * target.h (struct target_ops) <thread_name>: New field.
6550 (target_thread_name): New macro.
6552 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6554 * regcache.h (regcache_invalidate_pid): Add declaration.
6555 * regcache.c (regcache_invalidate_pid): New function, extracted
6556 from regcache_invalidate.
6557 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6558 Add trivial documentation comment.
6559 * lynx-low.c: Use regcache_invalidate_pid instead of
6560 regcache_invalidate.
6562 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6564 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6565 and Elf64_auxv_t if the target is Android.
6567 2015-11-22 Doug Evans <xdje42@gmail.com>
6569 * target.h: #include <sys/types.h>.
6571 2015-11-19 Pedro Alves <palves@redhat.com>
6573 * linux-low.c (linux_process_qsupported): Change prototype.
6575 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6577 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6578 and adjust to loop over all features.
6579 * server.c (handle_query) <qSupported>: Adjust to call
6580 target_process_qsupported once, passing it a vector of unprocessed
6582 * target.h (struct target_ops) <process_qsupported>: Change
6584 (target_process_qsupported): Adjust.
6586 2015-11-19 Pedro Alves <palves@redhat.com>
6588 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6590 * configure: Regenerate.
6592 2015-11-19 Pedro Alves <palves@redhat.com>
6594 * configure: Regenerate.
6596 2015-11-19 Yao Qi <yao.qi@linaro.org>
6598 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6601 2015-11-19 Yao Qi <yao.qi@linaro.org>
6603 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6604 (struct aarch64_operand): Move enum out.
6606 2015-11-19 Yao Qi <yao.qi@linaro.org>
6608 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6609 struct user_fpsimd_state *.
6610 (aarch64_store_fpregset): Likewise.
6612 2015-11-19 Yao Qi <yao.qi@linaro.org>
6614 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6615 struct user_pt_regs *.
6616 (aarch64_store_gregset): Likewise.
6618 2015-11-18 Pedro Alves <palves@redhat.com>
6620 * Makefile.in (all_object_files): Add $IPA_OBJS.
6622 2015-11-17 Pedro Alves <palves@redhat.com>
6624 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6625 GDB_SIGNAL_0 and gdb_signal_to_string.
6627 2015-11-17 Pedro Alves <palves@redhat.com>
6629 * win32-low.c (handle_output_debug_string): Remove parameter.
6630 (win32_kill): Remove our_status local and adjust call to
6631 handle_output_debug_string.
6632 (get_child_debug_event): Adjust call to
6633 handle_output_debug_string.
6635 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6637 * linux-mips-low.c (mips_fill_gregset): Add cast.
6638 (mips_store_gregset): Likewise.
6639 (mips_fill_fpregset): Likewise.
6640 (mips_store_fpregset): Likewise.
6642 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6644 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6647 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6649 * linux-mips-low.c (mips_linux_new_thread): Change type of
6650 watch_type to enum target_hw_bp_type.
6652 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6654 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6655 Change return type to arm_hwbp_type.
6657 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6659 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6660 (arm_store_gregset): Likewise.
6661 * linux-arm-low.c (arm_get_hwcap): Likewise.
6662 (arm_read_description): Likewise.
6664 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6666 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6668 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6670 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6671 (ppc_fill_vsxregset): Likewise.
6672 (ppc_store_vsxregset): Likewise.
6673 (ppc_fill_vrregset): Likewise.
6674 (ppc_store_vrregset): Likewise.
6675 (ppc_fill_evrregset): Likewise.
6676 (ppc_store_evrregset): Likewise.
6678 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6680 * linux-ppc-low.c (ppc_usrregs_info): Remove
6681 forward-declaration.
6682 (ppc_arch_setup): Move lower in file.
6684 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6686 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6687 (ps_pdwrite): Likewise.
6689 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6691 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6692 to after assert checks.
6694 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6696 * proc-service.c (ps_pdread): Add/adjust casts.
6697 (ps_pdwrite): Add/adjust casts.
6699 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6701 * server.c (handle_search_memory_1): Cast return value of
6704 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6706 * server.c (write_qxfer_response): Change type of data to
6709 2015-10-29 Pedro Alves <palves@redhat.com>
6711 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6713 2015-10-29 Pedro Alves <palves@redhat.com>
6715 * tracepoint.c (clear_installed_tracepoints): Add casts.
6717 2015-10-29 Pedro Alves <palves@redhat.com>
6719 * server.c (handle_v_cont, process_serial_event): Add enum
6720 gdb_signal casts to signal parsing code.
6722 2015-10-29 Pedro Alves <palves@redhat.com>
6724 * linux-low.h (NULL_REGSET): Define.
6725 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6726 * linux-arm-low.c (arm_regsets): Likewise.
6727 * linux-crisv32-low.c (cris_regsets): Likewise.
6728 * linux-m68k-low.c (m68k_regsets): Likewise.
6729 * linux-mips-low.c (mips_regsets): Likewise.
6730 * linux-nios2-low.c (nios2_regsets): Likewise.
6731 * linux-ppc-low.c (ppc_regsets): Likewise.
6732 * linux-s390-low.c (s390_regsets): Likewise.
6733 * linux-sh-low.c (sh_regsets): Likewise.
6734 * linux-sparc-low.c (sparc_regsets): Likewise.
6735 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6736 * linux-tile-low.c (tile_regsets): Likewise.
6737 * linux-x86-low.c (x86_regsets): Likewise.
6738 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6740 2015-10-29 Pedro Alves <palves@redhat.com>
6742 * linux-low.h (NULL_REGSET): Define.
6743 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6744 * linux-arm-low.c (arm_regsets): Likewise.
6745 * linux-crisv32-low.c (cris_regsets): Likewise.
6746 * linux-m68k-low.c (m68k_regsets): Likewise.
6747 * linux-mips-low.c (mips_regsets): Likewise.
6748 * linux-nios2-low.c (nios2_regsets): Likewise.
6749 * linux-ppc-low.c (ppc_regsets): Likewise.
6750 * linux-s390-low.c (s390_regsets): Likewise.
6751 * linux-sh-low.c (sh_regsets): Likewise.
6752 * linux-sparc-low.c (sparc_regsets): Likewise.
6753 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6754 * linux-tile-low.c (tile_regsets): Likewise.
6755 * linux-x86-low.c (x86_regsets): Likewise.
6756 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6758 2015-10-26 Doug Evans <dje@google.com>
6760 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6762 2015-10-26 Doug Evans <dje@google.com>
6764 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6766 2015-10-26 Doug Evans <dje@google.com>
6768 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6770 (attach_thread, find_new_threads_callback): Ditto.
6772 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6774 * mem-break.h (set_breakpoint_data): Remove.
6776 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6778 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6779 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6780 (initialize_low): Remove set_breakpoint_data call.
6781 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6782 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6783 (initialize_low): Remove set_breakpoint_data call.
6784 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6785 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6786 (initialize_low): Remove set_breakpoint_data call.
6788 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6790 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6791 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6792 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6793 * target.h (target_breakpoint_kind_from_pc): New macro.
6795 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6797 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6798 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6799 the default breakpoint kind.
6801 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6803 * linux-arm-low.c (arm_supports_z_point_type): Add software
6806 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6808 * linux-arm-low.c: Refactor breakpoint definitions.
6809 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6810 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6812 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6814 * Makefile.in: Add arm.c/o.
6815 * configure.srv: Likewise.
6816 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6817 (arm_breakpoint_kind_from_pc): New function.
6818 (arm_sw_breakpoint_from_kind): Return proper kind.
6819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6821 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6823 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6825 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6826 (struct raw_breakpoint) <size>: Remove.
6827 (struct raw_breakpoint) <kind>: Add.
6828 (bp_size): New function.
6829 (bp_opcode): Likewise.
6830 (find_raw_breakpoint_at): Adjust for kind.
6831 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6832 (remove_memory_breakpoint): Adjust for kind call bp_size.
6833 (set_raw_breakpoint_at): Adjust for kind.
6834 (set_breakpoint): Likewise.
6835 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6836 (delete_raw_breakpoint): Adjust for kind.
6837 (delete_breakpoint): Likewise.
6838 (find_gdb_breakpoint): Likewise.
6839 (set_gdb_breakpoint_1): Likewise.
6840 (set_gdb_breakpoint): Likewise.
6841 (delete_gdb_breakpoint_1): Likewise.
6842 (delete_gdb_breakpoint): Likewise.
6843 (uninsert_raw_breakpoint): Likewise.
6844 (reinsert_raw_breakpoint): Likewise.
6845 (set_breakpoint_data): Remove.
6846 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6847 (check_mem_read): Adjust for kind call bp_size.
6848 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6849 (clone_one_breakpoint): Adjust for kind.
6850 * mem-break.h (set_gdb_breakpoint): Likewise.
6851 (delete_gdb_breakpoint): Likewise.
6852 * server.c (process_serial_event): Likewise.
6854 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6856 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6857 (struct linux_target_ops) <breakpoint>: Remove.
6858 (struct linux_target_ops) <breakpoint_len>: Remove.
6859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6861 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6862 (arm_sw_breakpoint_from_kind): New function.
6863 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6864 (struct linux_target_ops) <breakpoint>: Remove.
6865 (struct linux_target_ops) <breakpoint_len>: Remove.
6866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6868 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6869 (struct linux_target_ops) <breakpoint>: Remove.
6870 (struct linux_target_ops) <breakpoint_len>: Remove.
6871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6873 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6874 (struct linux_target_ops) <breakpoint>: Remove.
6875 (struct linux_target_ops) <breakpoint_len>: Remove.
6876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6878 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6879 and sw_breakpoint_from_kind to increment the pc.
6880 (linux_breakpoint_kind_from_pc): New function.
6881 (linux_sw_breakpoint_from_kind): New function.
6882 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6883 (initialize_low): Call breakpoint_kind_from_pc and
6884 sw_breakpoint_from_kind to replace breakpoint_data/len.
6885 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6888 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6889 (struct linux_target_ops) <breakpoint>: Remove.
6890 (struct linux_target_ops) <breakpoint_len>: Remove.
6891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6893 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6894 (struct linux_target_ops) <breakpoint>: Remove.
6895 (struct linux_target_ops) <breakpoint_len>: Remove.
6896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6898 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6899 (struct linux_target_ops) <breakpoint>: Remove.
6900 (struct linux_target_ops) <breakpoint_len>: Remove.
6901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6903 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6904 (struct linux_target_ops) <breakpoint>: Remove.
6905 (struct linux_target_ops) <breakpoint_len>: Remove.
6906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6908 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6909 (struct linux_target_ops) <breakpoint>: Remove.
6910 (struct linux_target_ops) <breakpoint_len>: Remove.
6911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6913 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6914 (struct linux_target_ops) <breakpoint>: Remove.
6915 (struct linux_target_ops) <breakpoint_len>: Remove.
6916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6918 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6919 (struct linux_target_ops) <breakpoint>: Remove.
6920 (struct linux_target_ops) <breakpoint_len>: Remove.
6921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6923 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6924 (struct linux_target_ops) <breakpoint>: Remove.
6925 (struct linux_target_ops) <breakpoint_len>: Remove.
6926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6928 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6929 (struct linux_target_ops) <breakpoint>: Remove.
6930 (struct linux_target_ops) <breakpoint_len>: Remove.
6931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6933 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6934 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6935 (struct linux_target_ops) <breakpoint>: Remove.
6936 (struct linux_target_ops) <breakpoint_len>: Remove.
6937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6939 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6940 (struct linux_target_ops) <breakpoint>: Remove.
6941 (struct linux_target_ops) <breakpoint_len>: Remove.
6942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6945 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6947 * linux-cris-low.c (cris_get_pc): Remove void arg.
6949 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6951 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6954 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6956 * inferiors.c (thread_pid_matches_callback): New function.
6957 (find_thread_process): New function.
6958 (remove_thread): Reset current_thread.
6959 (remove_process): Assert threads have been removed first.
6961 2015-10-15 Yao Qi <yao.qi@linaro.org>
6963 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6965 (aarch64_remove_point): Likewise.
6966 * regcache.c (regcache_register_size): New function.
6968 2015-10-12 Yao Qi <yao.qi@linaro.org>
6970 * linux-aarch64-low.c: Update all callers as emit_load_store
6971 is renamed to aarch64_emit_load_store.
6973 2015-10-12 Yao Qi <yao.qi@linaro.org>
6975 * linux-aarch64-low.c: Update all callers of function renaming
6976 from emit_insn to aarch64_emit_insn.
6978 2015-10-12 Yao Qi <yao.qi@linaro.org>
6980 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6981 arch/aarch64-insn.h.
6982 (struct aarch64_memory_operand): Likewise.
6984 (emit_insn): Move to arch/aarch64-insn.c.
6985 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6986 (emit_load_store): Move to arch/aarch64-insn.c.
6987 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6988 (can_encode_int32): Remove.
6990 2015-10-12 Yao Qi <yao.qi@linaro.org>
6992 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6993 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6994 (aarch64_relocate_instruction): Likewise.
6995 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6996 (struct aarch64_insn_visitor): Likewise.
6998 2015-10-12 Yao Qi <yao.qi@linaro.org>
7000 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7001 (struct aarch64_insn_visitor): New.
7002 (struct aarch64_insn_relocation_data): New.
7003 (aarch64_ftrace_insn_reloc_b): New function.
7004 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7005 (aarch64_ftrace_insn_reloc_cb): Likewise.
7006 (aarch64_ftrace_insn_reloc_tb): Likewise.
7007 (aarch64_ftrace_insn_reloc_adr): Likewise.
7008 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7009 (aarch64_ftrace_insn_reloc_others): Likewise.
7011 (aarch64_relocate_instruction): Use visitor.
7013 2015-10-12 Yao Qi <yao.qi@linaro.org>
7015 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7016 int. Add argument buf.
7017 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7018 aarch64_relocate_instruction.
7020 2015-10-12 Yao Qi <yao.qi@linaro.org>
7022 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7023 argument insn. Remove local variable insn. Don't call
7025 (aarch64_install_fast_tracepoint_jump_pad): Call
7028 2015-09-30 Yao Qi <yao.qi@linaro.org>
7030 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7031 (emit_load_store_pair): Likewise.
7033 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7035 * dll.c (match_dll): Add cast(s).
7036 (unloaded_dll): Likewise.
7037 * linux-low.c (second_thread_of_pid_p): Likewise.
7038 (delete_lwp_callback): Likewise.
7039 (count_events_callback): Likewise.
7040 (select_event_lwp_callback): Likewise.
7041 (linux_set_resume_request): Likewise.
7042 * server.c (accumulate_file_name_length): Likewise.
7043 (emit_dll_description): Likewise.
7044 (handle_qxfer_threads_worker): Likewise.
7045 (visit_actioned_threads): Likewise.
7046 * thread-db.c (any_thread_of): Likewise.
7047 * tracepoint.c (same_process_p): Likewise.
7048 (match_blocktype): Likewise.
7049 (build_traceframe_info_xml): Likewise.
7051 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7053 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7055 (gdb_unparse_agent_expr): Likewise.
7056 * hostio.c (require_data): Likewise.
7057 (handle_pread): Likewise.
7058 * linux-low.c (disable_regset): Likewise.
7059 (fetch_register): Likewise.
7060 (store_register): Likewise.
7061 (get_dynamic): Likewise.
7062 (linux_qxfer_libraries_svr4): Likewise.
7063 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7064 (set_fast_tracepoint_jump): Likewise.
7065 (uninsert_fast_tracepoint_jumps_at): Likewise.
7066 (reinsert_fast_tracepoint_jumps_at): Likewise.
7067 (validate_inserted_breakpoint): Likewise.
7068 (clone_agent_expr): Likewise.
7069 * regcache.c (init_register_cache): Likewise.
7070 * remote-utils.c (putpkt_binary_1): Likewise.
7071 (decode_M_packet): Likewise.
7072 (decode_X_packet): Likewise.
7073 (look_up_one_symbol): Likewise.
7074 (relocate_instruction): Likewise.
7075 (monitor_output): Likewise.
7076 * server.c (handle_search_memory): Likewise.
7077 (handle_qxfer_exec_file): Likewise.
7078 (handle_qxfer_libraries): Likewise.
7079 (handle_qxfer): Likewise.
7080 (handle_query): Likewise.
7081 (handle_v_cont): Likewise.
7082 (handle_v_run): Likewise.
7083 (captured_main): Likewise.
7084 * target.c (write_inferior_memory): Likewise.
7085 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7086 * tracepoint.c (init_trace_buffer): Likewise.
7087 (add_tracepoint_action): Likewise.
7088 (add_traceframe): Likewise.
7089 (add_traceframe_block): Likewise.
7090 (cmd_qtdpsrc): Likewise.
7091 (cmd_qtdv): Likewise.
7092 (cmd_qtstatus): Likewise.
7093 (response_source): Likewise.
7094 (response_tsv): Likewise.
7095 (cmd_qtnotes): Likewise.
7096 (gdb_collect): Likewise.
7097 (initialize_tracepoint): Likewise.
7099 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7101 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7102 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7103 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7105 (enum aarch64_condition_codes): New enum.
7106 (w0): New static global.
7109 (struct aarch64_memory_operand) <type>: New
7110 MEMORY_OPERAND_POSTINDEX type.
7111 (postindex_memory_operand): New helper function.
7112 (emit_ret): New function.
7113 (emit_load_store_pair): New function, factored out of emit_stp
7114 with support for MEMORY_OPERAND_POSTINDEX.
7115 (emit_stp): Rewrite using emit_load_store_pair.
7116 (emit_ldp): New function.
7117 (emit_load_store): Likewise.
7118 (emit_ldr): Mention post-index instruction in comment.
7119 (emit_ldrh): New function.
7120 (emit_ldrb): New function.
7121 (emit_ldrsw): Mention post-index instruction in comment.
7122 (emit_str): Likewise.
7123 (emit_subs): New function.
7124 (emit_cmp): Likewise.
7125 (emit_and): Likewise.
7126 (emit_orr): Likewise.
7127 (emit_orn): Likewise.
7128 (emit_eor): Likewise.
7129 (emit_mvn): Likewise.
7130 (emit_lslv): Likewise.
7131 (emit_lsrv): Likewise.
7132 (emit_asrv): Likewise.
7133 (emit_mul): Likewise.
7134 (emit_sbfm): Likewise.
7135 (emit_sbfx): Likewise.
7136 (emit_ubfm): Likewise.
7137 (emit_ubfx): Likewise.
7138 (emit_csinc): Likewise.
7139 (emit_cset): Likewise.
7140 (emit_nop): Likewise.
7141 (emit_ops_insns): New helper function.
7142 (emit_pop): Likewise.
7143 (emit_push): Likewise.
7144 (aarch64_emit_prologue): New function.
7145 (aarch64_emit_epilogue): Likewise.
7146 (aarch64_emit_add): Likewise.
7147 (aarch64_emit_sub): Likewise.
7148 (aarch64_emit_mul): Likewise.
7149 (aarch64_emit_lsh): Likewise.
7150 (aarch64_emit_rsh_signed): Likewise.
7151 (aarch64_emit_rsh_unsigned): Likewise.
7152 (aarch64_emit_ext): Likewise.
7153 (aarch64_emit_log_not): Likewise.
7154 (aarch64_emit_bit_and): Likewise.
7155 (aarch64_emit_bit_or): Likewise.
7156 (aarch64_emit_bit_xor): Likewise.
7157 (aarch64_emit_bit_not): Likewise.
7158 (aarch64_emit_equal): Likewise.
7159 (aarch64_emit_less_signed): Likewise.
7160 (aarch64_emit_less_unsigned): Likewise.
7161 (aarch64_emit_ref): Likewise.
7162 (aarch64_emit_if_goto): Likewise.
7163 (aarch64_emit_goto): Likewise.
7164 (aarch64_write_goto_address): Likewise.
7165 (aarch64_emit_const): Likewise.
7166 (aarch64_emit_call): Likewise.
7167 (aarch64_emit_reg): Likewise.
7168 (aarch64_emit_pop): Likewise.
7169 (aarch64_emit_stack_flush): Likewise.
7170 (aarch64_emit_zero_ext): Likewise.
7171 (aarch64_emit_swap): Likewise.
7172 (aarch64_emit_stack_adjust): Likewise.
7173 (aarch64_emit_int_call_1): Likewise.
7174 (aarch64_emit_void_call_2): Likewise.
7175 (aarch64_emit_eq_goto): Likewise.
7176 (aarch64_emit_ne_goto): Likewise.
7177 (aarch64_emit_lt_goto): Likewise.
7178 (aarch64_emit_le_goto): Likewise.
7179 (aarch64_emit_gt_goto): Likewise.
7180 (aarch64_emit_ge_got): Likewise.
7181 (aarch64_emit_ops_impl): New static global variable.
7182 (aarch64_emit_ops): New target function, return
7183 &aarch64_emit_ops_impl.
7184 (struct linux_target_ops): Install it.
7186 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7188 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7189 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7191 * linux-aarch64-ipa.c: New file.
7192 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7194 (aarch64_get_thread_area): New target method.
7195 (extract_signed_bitfield): New helper function.
7196 (aarch64_decode_ldr_literal): New function.
7197 (enum aarch64_opcodes): New enum.
7198 (struct aarch64_register): New struct.
7199 (struct aarch64_operand): New struct.
7200 (x0): New static global.
7209 (aarch64_register): New helper function.
7210 (register_operand): Likewise.
7211 (immediate_operand): Likewise.
7212 (struct aarch64_memory_operand): New struct.
7213 (offset_memory_operand): New helper function.
7214 (preindex_memory_operand): Likewise.
7215 (enum aarch64_system_control_registers): New enum.
7216 (ENCODE): New macro.
7217 (emit_insn): New helper function.
7218 (emit_b): New function.
7219 (emit_bcond): Likewise.
7220 (emit_cb): Likewise.
7221 (emit_tb): Likewise.
7222 (emit_blr): Likewise.
7223 (emit_stp): Likewise.
7224 (emit_ldp_q_offset): Likewise.
7225 (emit_stp_q_offset): Likewise.
7226 (emit_load_store): Likewise.
7227 (emit_ldr): Likewise.
7228 (emit_ldrsw): Likewise.
7229 (emit_str): Likewise.
7230 (emit_ldaxr): Likewise.
7231 (emit_stxr): Likewise.
7232 (emit_stlr): Likewise.
7233 (emit_data_processing_reg): Likewise.
7234 (emit_data_processing): Likewise.
7235 (emit_add): Likewise.
7236 (emit_sub): Likewise.
7237 (emit_mov): Likewise.
7238 (emit_movk): Likewise.
7239 (emit_mov_addr): Likewise.
7240 (emit_mrs): Likewise.
7241 (emit_msr): Likewise.
7242 (emit_sevl): Likewise.
7243 (emit_wfe): Likewise.
7244 (append_insns): Likewise.
7245 (can_encode_int32_in): New helper function.
7246 (aarch64_relocate_instruction): New function.
7247 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7248 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7249 (struct linux_target_ops): Install aarch64_get_thread_area,
7250 aarch64_install_fast_tracepoint_jump_pad and
7251 aarch64_get_min_fast_tracepoint_insn_len.
7253 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7255 * Makefile.in (aarch64-insn.o): New rule.
7256 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7258 2015-09-21 Yao Qi <yao.qi@linaro.org>
7260 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7262 2015-09-21 Yao Qi <yao.qi@linaro.org>
7264 * tracepoint.c (max_jump_pad_size): Remove.
7266 2015-09-18 Yao Qi <yao.qi@linaro.org>
7268 * linux-aarch64-low.c: Don't include sys/uio.h.
7269 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7271 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7273 * tracepoint.c (eval_result_type): Change prototype.
7274 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7276 2015-09-15 Pedro Alves <palves@redhat.com>
7278 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7279 Check whether to report exec events instead of checking whether
7280 multiprocess is enabled.
7282 2015-09-15 Pedro Alves <palves@redhat.com>
7285 * remote-utils.c (prepare_resume_reply): Merge
7286 TARGET_WAITKIND_VFORK_DONE switch case with the
7287 TARGET_WAITKIND_FORKED case.
7289 2015-09-15 Yao Qi <yao.qi@linaro.org>
7291 * server.c (handle_query): Check string comparison using
7292 "else if" instead of "if".
7294 2015-09-15 Yao Qi <yao.qi@linaro.org>
7296 * server.c (vCont_supported): New global variable.
7297 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7298 matches. Append ";vContSupported+" to own_buf.
7299 (handle_v_requests): Append ";s;S" to own_buf if target supports
7300 hardware single step or vCont_supported is false.
7301 (capture_main): Set vCont_supported to zero.
7303 2015-09-15 Yao Qi <yao.qi@linaro.org>
7305 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7307 (linux_supports_hardware_single_step): ... New function.
7308 (linux_target_ops): Update.
7309 * lynx-low.c (lynx_target_ops): Set field
7310 supports_hardware_single_step to target_can_do_hardware_single_step.
7311 * nto-low.c (nto_target_ops): Likewise.
7312 * spu-low.c (spu_target_ops): Likewise.
7313 * win32-low.c (win32_target_ops): Likewise.
7314 * target.c (target_can_do_hardware_single_step): New function.
7315 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7316 Remove. <supports_hardware_single_step>: New field.
7317 (target_supports_conditional_breakpoints): Remove.
7318 (target_supports_hardware_single_step): New macro.
7319 (target_can_do_hardware_single_step): Declare.
7320 * server.c (handle_query): Use target_supports_hardware_single_step
7321 instead of target_supports_conditional_breakpoints.
7323 2015-09-15 Yao Qi <yao.qi@linaro.org>
7325 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7327 (struct linux_target_ops the_low_target): Install
7328 aarch64_linux_siginfo_fixup.
7330 2015-09-11 Don Breazeal <donb@codesourcery.com>
7331 Luis Machado <lgustavo@codesourcery.com>
7333 * linux-low.c (linux_mourn): Static declaration.
7334 (linux_arch_setup): Move in front of
7335 handle_extended_wait.
7336 (linux_arch_setup_thread): New function.
7337 (handle_extended_wait): Handle exec events. Call
7338 linux_arch_setup_thread. Make event_lwp argument a
7339 pointer-to-a-pointer.
7340 (check_zombie_leaders): Do not check stopped threads.
7341 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7342 (linux_low_filter_event): Add lwp and thread for exec'ing
7343 non-leader thread if leader thread has been deleted.
7344 Refactor code into linux_arch_setup_thread and call it.
7345 Pass child lwp pointer by reference to handle_extended_wait.
7346 (linux_wait_for_event_filtered): Update comment.
7347 (linux_wait_1): Prevent clobbering exec event status.
7348 (linux_supports_exec_events): New function.
7349 (linux_target_ops) <supports_exec_events>: Initialize new member.
7350 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7352 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7353 * server.c (report_exec_events): New global variable.
7354 (handle_query): Handle qSupported query for exec-events feature.
7355 (captured_main): Initialize report_exec_events.
7356 * server.h (report_exec_events): Declare new global variable.
7357 * target.h (struct target_ops) <supports_exec_events>: New
7359 (target_supports_exec_events): New macro.
7360 * win32-low.c (win32_target_ops) <supports_exec_events>:
7361 Initialize new member.
7363 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7365 * linux-low.c (linux_low_enable_btrace): Remove.
7366 (linux_target_ops): Replace linux_low_enable_btrace with
7367 linux_enable_btrace.
7369 2015-09-03 Yao Qi <yao.qi@linaro.org>
7371 * linux-aarch64-low.c (aarch64_insert_point): Call
7372 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7375 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7377 * linux-low.c (check_stopped_by_breakpoint): Use
7378 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7380 2015-08-27 Pedro Alves <palves@redhat.com>
7382 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7384 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7386 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7387 the XNEW-family equivalent.
7388 (compile_bytecodes): Likewise.
7389 * dll.c (loaded_dll): Likewise.
7390 * event-loop.c (append_callback_event): Likewise.
7391 (create_file_handler): Likewise.
7392 (create_file_event): Likewise.
7393 * hostio.c (handle_open): Likewise.
7394 * inferiors.c (add_thread): Likewise.
7395 (add_process): Likewise.
7396 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7397 * linux-arm-low.c (arm_new_process): Likewise.
7398 (arm_new_thread): Likewise.
7399 * linux-low.c (add_to_pid_list): Likewise.
7400 (linux_add_process): Likewise.
7401 (handle_extended_wait): Likewise.
7402 (add_lwp): Likewise.
7403 (enqueue_one_deferred_signal): Likewise.
7404 (enqueue_pending_signal): Likewise.
7405 (linux_resume_one_lwp_throw): Likewise.
7406 (linux_resume_one_thread): Likewise.
7407 (linux_read_memory): Likewise.
7408 (linux_write_memory): Likewise.
7409 * linux-mips-low.c (mips_linux_new_process): Likewise.
7410 (mips_linux_new_thread): Likewise.
7411 (mips_add_watchpoint): Likewise.
7412 * linux-x86-low.c (initialize_low_arch): Likewise.
7413 * lynx-low.c (lynx_add_process): Likewise.
7414 * mem-break.c (set_raw_breakpoint_at): Likewise.
7415 (set_breakpoint): Likewise.
7416 (add_condition_to_breakpoint): Likewise.
7417 (add_commands_to_breakpoint): Likewise.
7418 (clone_agent_expr): Likewise.
7419 (clone_one_breakpoint): Likewise.
7420 * regcache.c (new_register_cache): Likewise.
7421 * remote-utils.c (look_up_one_symbol): Likewise.
7422 * server.c (queue_stop_reply): Likewise.
7423 (start_inferior): Likewise.
7424 (queue_stop_reply_callback): Likewise.
7425 (handle_target_event): Likewise.
7426 * spu-low.c (fetch_ppc_memory): Likewise.
7427 (store_ppc_memory): Likewise.
7428 * target.c (set_target_ops): Likewise.
7429 * thread-db.c (thread_db_load_search): Likewise.
7430 (try_thread_db_load_1): Likewise.
7431 * tracepoint.c (add_tracepoint): Likewise.
7432 (add_tracepoint_action): Likewise.
7433 (create_trace_state_variable): Likewise.
7434 (cmd_qtdpsrc): Likewise.
7435 (cmd_qtro): Likewise.
7436 (add_while_stepping_state): Likewise.
7437 * win32-low.c (child_add_thread): Likewise.
7438 (get_image_name): Likewise.
7440 2015-08-25 Yao Qi <yao.qi@linaro.org>
7442 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7444 2015-08-25 Yao Qi <yao.qi@linaro.org>
7446 * Makefile.in (aarch64-linux.o): New rule.
7447 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7449 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7450 (aarch64_init_debug_reg_state): Make it extern.
7451 (aarch64_linux_prepare_to_resume): Remove.
7453 2015-08-25 Yao Qi <yao.qi@linaro.org>
7455 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7456 lwp_arch_private_info and ptid_of_lwp.
7458 2015-08-25 Yao Qi <yao.qi@linaro.org>
7460 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7461 Find proc_info by find_process_pid. All callers updated.
7463 2015-08-25 Yao Qi <yao.qi@linaro.org>
7465 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7467 (debug_reg_change_callback): Remove.
7468 (aarch64_notify_debug_reg_change): Remove.
7470 2015-08-25 Yao Qi <yao.qi@linaro.org>
7472 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7473 Call current_lwp_ptid.
7475 2015-08-25 Yao Qi <yao.qi@linaro.org>
7477 * linux-aarch64-low.c (debug_reg_change_callback): Use
7480 2015-08-25 Yao Qi <yao.qi@linaro.org>
7482 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7484 2015-08-25 Yao Qi <yao.qi@linaro.org>
7486 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7488 2015-08-25 Yao Qi <yao.qi@linaro.org>
7490 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7493 2015-08-25 Yao Qi <yao.qi@linaro.org>
7495 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7497 (debug_reg_change_callback): Remove argument entry and add argument
7498 lwp. Remove local variable thread. Don't print thread id in the
7499 debugging output. Don't check whether pid of thread equals to pid.
7500 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7501 iterate_over_lwps instead find_inferior.
7503 2015-08-24 Pedro Alves <palves@redhat.com>
7505 * inferiors.c (get_first_process): New function.
7506 * inferiors.h (get_first_process): New declaration.
7507 * remote-utils.c (read_ptid): Default to the first process in the
7508 list, instead of to the current thread's process.
7510 2015-08-24 Pedro Alves <palves@redhat.com>
7512 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7513 * event-loop.c: Likewise.
7514 * remote-utils.c: Likewise.
7515 * tracepoint.c: Likewise.
7517 2015-08-24 Pedro Alves <palves@redhat.com>
7519 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7522 2015-08-21 Pedro Alves <palves@redhat.com>
7524 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7525 instead of literal 1.
7527 2015-08-21 Pedro Alves <palves@redhat.com>
7529 * tdesc.c (default_description): Explicitly zero-initialize.
7531 2015-08-21 Pedro Alves <palves@redhat.com>
7534 * inferiors.c (remove_thread): Discard any pending stop reply for
7536 * server.c (remove_all_on_match_pid): Rename to ...
7537 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7539 (discard_queued_stop_replies): Change parameter to a ptid. Now
7541 (handle_v_kill, kill_inferior_callback, captured_main)
7542 (process_serial_event): Adjust.
7543 * server.h (discard_queued_stop_replies): Declare.
7545 2015-08-21 Pedro Alves <palves@redhat.com>
7547 * linux-low.c (wait_for_sigstop): Always switch to no thread
7548 selected if the previously current thread dies.
7549 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7550 process instead of the current thread's.
7551 * remote-utils.c (input_interrupt): Don't check if there's no
7553 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7554 current thread to the general thread fails, error out.
7555 (handle_qxfer_auxv, handle_qxfer_libraries)
7556 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7557 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7558 (handle_query): Check if there's a thread selected instead of
7559 checking whether there's any thread in the thread list.
7560 (handle_qxfer_threads, handle_qxfer_btrace)
7561 (handle_qxfer_btrace_conf): Don't error out early if there's no
7562 thread in the thread list.
7563 (handle_v_cont, myresume): Don't set the current thread to the
7565 (process_serial_event) <Hg handling>: Also set thread_id if the
7566 previous general thread is still alive.
7567 (process_serial_event) <g/G handling>: If setting the current
7568 thread to the general thread fails, error out.
7569 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7570 thread's lwp instead of the current thread's.
7571 * target.c (set_desired_thread): If the desired thread was not
7572 found, leave the current thread pointing to NULL. Return an int
7573 (boolean) indicating success.
7574 * target.h (set_desired_thread): Change return type to int.
7576 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7578 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7579 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7581 (ps_get_thread_area): New function.
7583 2015-08-19 Gary Benson <gbenson@redhat.com>
7585 * hostio.c (handle_pread): Do not attempt to read more data
7586 than hostio_reply_with_data can fit in a packet.
7588 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7590 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7592 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7594 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7596 2015-08-06 Pedro Alves <palves@redhat.com>
7598 * tracepoint.c (expr_eval_result): Now an int.
7600 2015-08-06 Pedro Alves <palves@redhat.com>
7602 * gdbthread.h (struct regcache): Forward declare.
7603 (struct thread_info) <regcache_data>: Now a struct regcache
7605 * inferiors.c (inferior_regcache_data)
7606 (set_inferior_regcache_data): Now work with struct regcache
7608 * inferiors.h (struct regcache): Forward declare.
7609 (inferior_regcache_data, set_inferior_regcache_data): Now work
7610 with struct regcache pointers.
7611 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7612 (free_register_cache_thread): Remove struct regcache pointer
7615 2015-08-06 Pedro Alves <palves@redhat.com>
7617 * server.c (captured_main): On error, print the exception message
7618 to stderr, and if run_once is set, throw a quit.
7620 2015-08-06 Pedro Alves <palves@redhat.com>
7622 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7625 2015-08-06 Pedro Alves <palves@redhat.com>
7627 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7628 reading beyond the passed in buffer length.
7630 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7632 * tracepoint.c (symbol_list) <required>: Remove.
7634 2015-08-06 Pedro Alves <palves@redhat.com>
7636 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7637 count if stopping and suspending threads.
7638 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7639 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7640 (linux_detach): Complete an ongoing step-over.
7641 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7643 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7644 (linux_wait_1): If passing a signal to the inferior after
7645 finishing a step-over, unsuspend and re-resume all lwps. If we
7646 see a single-step event but the thread should be continuing, don't
7647 pass the trap to gdb.
7648 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7649 internal_error instead of gdb_assert.
7650 (enqueue_pending_signal): New function.
7651 (check_ptrace_stopped_lwp_gone): Add debug output.
7652 (start_step_over): Use internal_error instead of gdb_assert.
7653 (complete_ongoing_step_over): New function.
7654 (linux_resume_one_thread): Don't resume a suspended thread.
7655 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7658 2015-08-06 Pedro Alves <palves@redhat.com>
7660 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7661 (linux_thread_alive): Use lwp_is_marked_dead.
7662 (extended_event_reported): Delete.
7663 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7664 instead of extended_event_reported.
7665 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7667 (lwp_is_marked_dead): New function.
7668 (lwp_running): Use lwp_is_marked_dead.
7669 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7672 2015-08-06 Pedro Alves <palves@redhat.com>
7674 * linux-low.c (linux_wait_1): Move fork event output out of the
7675 !report_to_gdb check. Pass event_child->waitstatus to
7676 target_waitstatus_to_string instead of ourstatus.
7678 2015-08-04 Yao Qi <yao.qi@linaro.org>
7680 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7681 if current_thread is 32 bit.
7683 2015-08-04 Yao Qi <yao.qi@linaro.org>
7685 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7686 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7687 * server.c (extended_protocol): Remove "static".
7688 * server.h (extended_protocol): Declare it.
7690 2015-08-04 Yao Qi <yao.qi@linaro.org>
7692 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7693 both aarch64 and aarch32.
7694 (aarch64_set_pc): Likewise.
7696 2015-08-04 Yao Qi <yao.qi@linaro.org>
7698 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7699 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7700 arm-with-neon.xml to srv_xmlfiles.
7701 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7702 (is_64bit_tdesc): New function.
7703 (aarch64_linux_read_description): New function.
7704 (aarch64_arch_setup): Call aarch64_linux_read_description.
7705 (regs_info): Rename to regs_info_aarch64.
7706 (aarch64_regs_info): Return right regs_info.
7707 (initialize_low_arch): Call initialize_low_arch_aarch32.
7709 2015-08-04 Yao Qi <yao.qi@linaro.org>
7711 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7712 * linux-aarch32-low.c: New file.
7713 * linux-aarch32-low.h: New file.
7714 * linux-arm-low.c (arm_fill_gregset): Move it to
7715 linux-aarch32-low.c.
7716 (arm_store_gregset): Likewise.
7717 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7718 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7719 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7720 (regs_info): Rename to regs_info_arm.
7721 (arm_regs_info): Return regs_info_aarch32 if
7722 have_ptrace_getregset is 1 and target description is
7723 arm_with_neon or arm_with_vfpv3.
7724 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7725 Call initialize_low_arch_aarch32 instead.
7727 2015-08-04 Yao Qi <yao.qi@linaro.org>
7729 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7730 * linux-low.c: ... here.
7731 * linux-low.h (have_ptrace_getregset): Declare it.
7733 2015-08-04 Pedro Alves <palves@redhat.com>
7735 * thread-db.c (struct thread_db): Use new typedefs.
7736 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7738 (disable_thread_event_reporting): Cast result of dlsym to
7739 destination function pointer type.
7740 (thread_db_mourn): Use td_ta_delete_ftype.
7742 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7744 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7746 (CDX_BREAKPOINT): Define for R2.
7747 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7748 (the_low_target): Add comments.
7750 2015-07-30 Yao Qi <yao.qi@linaro.org>
7752 * linux-arm-low.c (arm_hwcap): Remove it.
7753 (arm_read_description): New local variable arm_hwcap. Don't
7754 set arm_hwcap to zero.
7756 2015-07-30 Yao Qi <yao.qi@linaro.org>
7758 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7759 Use regcache->tdesc instead.
7760 (arm_store_wmmxregset): Likewise.
7761 (arm_fill_vfpregset): Likewise.
7762 (arm_store_vfpregset): Likewise.
7764 2015-07-30 Yao Qi <yao.qi@linaro.org>
7766 * linux-arm-low.c: Include arch/arm.h.
7767 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7768 (arm_store_gregset): Likewise.
7770 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7772 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7773 ptrace's 4th parameter.
7775 2015-07-27 Yao Qi <yao.qi@linaro.org>
7777 * configure.srv (case aarch64*-*-linux*): Don't set
7780 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7782 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7784 * linux-arm-low.c: Likewise.
7785 * linux-cris-low.c: Likewise.
7786 * linux-crisv32-low.c: Likewise.
7787 * linux-low.c: Likewise.
7788 * linux-m68k-low.c: Likewise.
7789 * linux-mips-low.c: Likewise.
7790 * linux-nios2-low.c: Likewise.
7791 * linux-s390-low.c: Likewise.
7792 * linux-sparc-low.c: Likewise.
7793 * linux-tic6x-low.c: Likewise.
7794 * linux-tile-low.c: Likewise.
7795 * linux-x86-low.c: Likewise.
7797 2015-07-24 Pedro Alves <palves@redhat.com>
7799 * config.in: Regenerate.
7800 * configure: Regenerate.
7802 2015-07-24 Pedro Alves <palves@redhat.com>
7804 * acinclude.m4: Include ../ptrace.m4.
7805 * configure.ac: Call GDB_AC_PTRACE.
7806 * config.in, configure: Regenerate.
7808 2015-07-24 Yao Qi <yao.qi@linaro.org>
7810 * linux-low.c (linux_create_inferior): Remove setting to
7811 proc->priv->new_inferior.
7812 (linux_attach): Likewise.
7813 (linux_low_filter_event): Likewise.
7814 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7816 2015-07-24 Yao Qi <yao.qi@linaro.org>
7818 * linux-low.c (linux_arch_setup): New function.
7819 (linux_low_filter_event): If proc->tdesc is NULL and
7820 proc->attached is true, call the_low_target.arch_setup.
7821 Otherwise, keep status pending, and return.
7822 (linux_resume_one_lwp_throw): Don't call get_pc if
7823 thread->while_stepping isn't NULL. Don't call
7824 get_thread_regcache if proc->tdesc is NULL.
7825 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7826 (linux_target_ops): Install arch_setup.
7827 * server.c (start_inferior): Call the_target->arch_setup.
7828 * target.h (struct target_ops) <arch_setup>: New field.
7829 (target_arch_setup): New marco.
7830 * lynx-low.c (lynx_target_ops): Update.
7831 * nto-low.c (nto_target_ops): Update.
7832 * spu-low.c (spu_target_ops): Update.
7833 * win32-low.c (win32_target_ops): Update.
7835 2015-07-24 Yao Qi <yao.qi@linaro.org>
7837 * linux-low.c (linux_add_process): Don't set
7838 proc->priv->new_inferior.
7839 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7840 (linux_attach): Likewise.
7842 2015-07-24 Yao Qi <yao.qi@linaro.org>
7844 * server.c (start_inferior): Code refactor.
7846 2015-07-24 Yao Qi <yao.qi@linaro.org>
7848 * server.c (process_serial_event): Set general_thread.
7850 2015-07-21 Yao Qi <yao.qi@linaro.org>
7852 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7853 aarch64_linux_get_debug_reg_capacity.
7855 2015-07-17 Yao Qi <yao.qi@linaro.org>
7857 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7858 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7859 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7860 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7861 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7862 (AARCH64_HWP_ALIGNMENT): Likewise.
7863 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7864 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7865 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7866 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7867 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7868 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7869 (struct aarch64_debug_reg_state): Likewise.
7870 (struct arch_lwp_info): Likewise.
7871 (aarch64_align_watchpoint): Likewise.
7872 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7873 (aarch64_watchpoint_length): Likewise.
7874 (aarch64_point_encode_ctrl_reg): Likewise
7875 (aarch64_point_is_aligned): Likewise.
7876 (aarch64_align_watchpoint): Likewise.
7877 (aarch64_linux_set_debug_regs):
7878 (aarch64_dr_state_insert_one_point): Likewise.
7879 (aarch64_dr_state_remove_one_point): Likewise.
7880 (aarch64_handle_breakpoint): Likewise.
7881 (aarch64_handle_aligned_watchpoint): Likewise.
7882 (aarch64_handle_unaligned_watchpoint): Likewise.
7883 (aarch64_handle_watchpoint): Likewise.
7885 2015-07-17 Yao Qi <yao.qi@linaro.org>
7887 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7888 and don't aarch64_get_debug_reg_state. All callers update.
7889 (aarch64_handle_aligned_watchpoint): Likewise.
7890 (aarch64_handle_unaligned_watchpoint): Likewise.
7891 (aarch64_handle_watchpoint): Likewise.
7892 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7893 (aarch64_remove_point): Likewise.
7895 2015-07-17 Yao Qi <yao.qi@linaro.org>
7897 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7899 (aarch64_handle_unaligned_watchpoint): Likewise.
7901 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7903 Revert the previous 3 commits:
7904 Move gdb_regex* to common/
7905 Move linux_find_memory_regions_full & co.
7906 gdbserver build-id attribute generator
7908 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7909 Jan Kratochvil <jan.kratochvil@redhat.com>
7911 gdbserver build-id attribute generator.
7912 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7913 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7914 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7916 (get_dynamic): Use find_pdhr to traverse program headers.
7917 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7918 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7919 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7920 (get_hex_build_id): New.
7921 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7922 to reply XML document.
7924 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7925 Jan Kratochvil <jan.kratochvil@redhat.com>
7927 * target.c: Include target/target-utils.h and fcntl.h.
7928 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7929 (target_fileio_read_stralloc): New functions.
7931 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7933 * Makefile.in (OBS): Add gdb_regex.o.
7935 * config.in: Rebuilt.
7936 * configure: Rebuilt.
7938 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7939 Jan Kratochvil <jan.kratochvil@redhat.com>
7941 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7942 * Makefile.in (OBS): Add target-utils.o.
7943 (linux-maps.o, target-utils.o): New.
7944 * configure.srv (srv_linux_obj): Add linux-maps.o.
7946 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7948 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7950 (the_low_target): Install it.
7952 2015-07-14 Pedro Alves <palves@redhat.com>
7954 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7955 Instead, ignore ECHILD, and throw an error for other errnos.
7957 2015-07-10 Pedro Alves <palves@redhat.com>
7959 * event-loop.c (struct callback_event) <data>: Change type to
7960 gdb_client_data instance instead of gdb_client_data pointer.
7961 (append_callback_event): Adjust.
7963 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7965 * linux-aarch64-low.c: Add comments for each linux_target_ops
7966 method. Remove comments already covered in target_ops and
7967 linux_target_ops definitions.
7968 (the_low_target): Add comments for each unimplemented method.
7970 2015-07-09 Yao Qi <yao.qi@linaro.org>
7972 * linux-aarch64-low.c (aarch64_regmap): Remove.
7973 (aarch64_usrregs_info): Remove.
7974 (regs_info): Set field usrregs to NULL.
7976 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7978 * linux-low.c: Include "rsp-low.h"
7979 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7980 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7981 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7982 (handle_btrace_enable_pt): New.
7983 (handle_btrace_general_set): Support "pt".
7984 (handle_btrace_conf_general_set): Support "pt:size".
7986 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7988 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7991 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7993 * linux-aarch64-low.c: Remove comment about endianness.
7994 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7995 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7998 2015-06-24 Gary Benson <gbenson@redhat.com>
8000 * linux-i386-ipa.c (stdint.h): Do not include.
8001 * lynx-i386-low.c (stdint.h): Likewise.
8002 * lynx-ppc-low.c (stdint.h): Likewise.
8003 * mem-break.c (stdint.h): Likewise.
8004 * thread-db.c (stdint.h): Likewise.
8005 * tracepoint.c (stdint.h): Likewise.
8006 * win32-low.c (stdint.h): Likewise.
8008 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8010 * server.c (write_qxfer_response): Update call to
8011 remote_escape_output.
8013 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8014 Jan Kratochvil <jan.kratochvil@redhat.com>
8016 Merge multiple hex conversions.
8017 * gdbreplay.c (tohex): Rename to 'fromhex'.
8018 (logchar): Use fromhex.
8020 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8022 * server.c (handle_qxfer_libraries): Set `version' attribute for
8025 2015-06-10 Gary Benson <gbenson@redhat.com>
8027 * target.h (struct target_ops) <multifs_open>: New field.
8028 <multifs_unlink>: Likewise.
8029 <multifs_readlink>: Likewise.
8030 * linux-low.c (nat/linux-namespaces.h): New include.
8031 (linux_target_ops): Initialize the_target->multifs_open,
8032 the_target->multifs_unlink and the_target->multifs_readlink.
8033 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8034 * hostio.c (hostio_fs_pid): New static variable.
8035 (hostio_handle_new_gdb_connection): New function.
8036 (handle_setfs): Likewise.
8037 (handle_open): Use the_target->multifs_open as appropriate.
8038 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8039 (handle_readlink): Use the_target->multifs_readlink as
8041 (handle_vFile): Handle vFile:setfs packets.
8042 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8043 after target_handle_new_gdb_connection.
8045 2015-06-10 Gary Benson <gbenson@redhat.com>
8047 * configure.ac (AC_CHECK_FUNCS): Add setns.
8048 * config.in: Regenerate.
8049 * configure: Likewise.
8050 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8051 (linux-namespaces.o): New rule.
8052 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8054 2015-06-09 Gary Benson <gbenson@redhat.com>
8056 * hostio.c (handle_open): Process mode argument with
8057 fileio_to_host_mode.
8059 2015-06-01 Yao Qi <yao.qi@linaro.org>
8061 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8062 * linux-x86-low.c: Likewise.
8064 2015-05-28 Don Breazeal <donb@codesourcery.com>
8066 * linux-low.c (handle_extended_wait): Initialize
8067 thread_info.last_resume_kind for new fork children.
8069 2015-05-15 Pedro Alves <palves@redhat.com>
8071 * target.h (target_handle_new_gdb_connection): Rewrite using if
8072 wrapped in do/while.
8074 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8076 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8077 * configure, config.in: Regenerate.
8078 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8081 2015-05-12 Don Breazeal <donb@codesourcery.com>
8083 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8084 PTRACE_EVENT_VFORK_DONE.
8085 (linux_low_ptrace_options, extended_event_reported): Add vfork
8087 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8088 and "vforkdone" for RSP 'T' Stop Reply Packet.
8089 * server.h (report_vfork_events): Declare
8092 2015-05-12 Don Breazeal <donb@codesourcery.com>
8094 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8095 (the_low_target) <new_fork>: Initialize new member.
8096 * linux-arm-low.c (arm_new_fork): New function.
8097 (the_low_target) <new_fork>: Initialize new member.
8098 * linux-low.c (handle_extended_wait): Call new target function
8100 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8101 * linux-mips-low.c (mips_add_watchpoint): New function
8102 extracted from mips_insert_point.
8103 (the_low_target) <new_fork>: Initialize new member.
8104 (mips_linux_new_fork): New function.
8105 (mips_insert_point): Call mips_add_watchpoint.
8106 * linux-x86-low.c (x86_linux_new_fork): New function.
8107 (the_low_target) <new_fork>: Initialize new member.
8109 2015-05-12 Don Breazeal <donb@codesourcery.com>
8111 * linux-low.c (handle_extended_wait): Implement return value,
8112 rename argument 'event_child' to 'event_lwp', handle
8113 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8114 (linux_low_ptrace_options): New function.
8115 (linux_low_filter_event): Call linux_low_ptrace_options,
8116 use different argument fo linux_enable_event_reporting,
8117 use return value from handle_extended_wait.
8118 (extended_event_reported): New function.
8119 (linux_wait_1): Call extended_event_reported and set
8120 status to report fork events.
8121 (linux_write_memory): Add pid to debug message.
8122 (reset_lwp_ptrace_options_callback): New function.
8123 (linux_handle_new_gdb_connection): New function.
8124 (linux_target_ops): Initialize new structure member.
8125 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8126 * lynx-low.c: Initialize new structure member.
8127 * remote-utils.c (prepare_resume_reply): Implement stop reason
8128 "fork" for "T" stop message.
8129 * server.c (handle_query): Call handle_new_gdb_connection.
8130 * server.h (report_fork_events): Declare global flag.
8131 * target.h (struct target_ops) <handle_new_gdb_connection>:
8133 (target_handle_new_gdb_connection): New macro.
8134 * win32-low.c: Initialize new structure member.
8136 2015-05-12 Don Breazeal <donb@codesourcery.com>
8138 * mem-break.c (APPEND_TO_LIST): Define macro.
8139 (clone_agent_expr): New function.
8140 (clone_one_breakpoint): New function.
8141 (clone_all_breakpoints): New function.
8142 * mem-break.h: Declare new functions.
8144 2015-05-12 Don Breazeal <donb@codesourcery.com>
8146 * linux-low.c (linux_supports_fork_events): New function.
8147 (linux_supports_vfork_events): New function.
8148 (linux_target_ops): Initialize new structure members.
8149 (initialize_low): Call linux_check_ptrace_features.
8150 * lynx-low.c (lynx_target_ops): Initialize new structure
8152 * server.c (report_fork_events, report_vfork_events):
8154 (handle_query): Add new features to qSupported packet and
8156 (captured_main): Initialize new global variables.
8157 * target.h (struct target_ops) <supports_fork_events>:
8159 <supports_vfork_events>: New member.
8160 (target_supports_fork_events): New macro.
8161 (target_supports_vfork_events): New macro.
8162 * win32-low.c (win32_target_ops): Initialize new structure
8165 2015-05-12 Gary Benson <gbenson@redhat.com>
8167 * server.c (handle_qxfer_exec_file): Use current process
8170 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8172 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8173 Remove HAVE_PTRACE_GETREGS conditionals.
8174 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8175 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8177 2015-05-08 Yao Qi <yao.qi@linaro.org>
8179 * linux-low.c (linux_supports_conditional_breakpoints): New
8181 (linux_target_ops): Install new target method.
8182 * lynx-low.c (lynx_target_ops): Install NULL hook for
8183 supports_conditional_breakpoints.
8184 * nto-low.c (nto_target_ops): Likewise.
8185 * spu-low.c (spu_target_ops): Likewise.
8186 * win32-low.c (win32_target_ops): Likewise.
8187 * server.c (handle_query): Check
8188 target_supports_conditional_breakpoints.
8189 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8191 (target_supports_conditional_breakpoints): New macro.
8193 2015-05-06 Pedro Alves <palves@redhat.com>
8196 * server.c (start_inferior): If the process exits, mourn it.
8198 2015-04-21 Gary Benson <gbenson@redhat.com>
8200 * hostio.c (fileio_open_flags_to_host): Factored out to
8201 fileio_to_host_openflags in common/fileio.c. Single use
8204 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8206 * linux-xtensa-low.c (xtensa_fill_gregset)
8207 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8210 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8212 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8213 (regs_info): Replace usrregs pointer with NULL.
8215 2015-04-17 Gary Benson <gbenson@redhat.com>
8217 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8218 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8219 * server.c (handle_qxfer_exec_file): New function.
8220 (qxfer_packets): Add exec-file entry.
8221 (handle_query): Report qXfer:exec-file:read as supported packet.
8223 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8225 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8227 2015-04-09 Gary Benson <gbenson@redhat.com>
8229 * hostio-errno.c (errno_to_fileio_error): Remove function.
8230 Update caller to use remote_fileio_to_fio_error.
8232 2015-04-09 Yao Qi <yao.qi@linaro.org>
8234 * linux-low.c (linux_insert_point): Call
8235 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8236 (linux_remove_point): Call remove_memory_breakpoint if type is
8238 * linux-x86-low.c (x86_insert_point): Don't call
8239 insert_memory_breakpoint.
8240 (x86_remove_point): Don't call remove_memory_breakpoint.
8242 2015-04-01 Pedro Alves <palves@redhat.com>
8243 Cleber Rosa <crosa@redhat.com>
8245 * server.c (gdbserver_usage): Reorganize and extend the usage
8248 2015-03-24 Pedro Alves <palves@redhat.com>
8250 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8251 output. Also dump TRAP_TRACE.
8252 (linux_low_filter_event): In debug output, distinguish a
8253 resume_stop SIGSTOP from a delayed SIGSTOP.
8255 2015-03-24 Gary Benson <gbenson@redhat.com>
8257 * linux-x86-low.c (x86_linux_new_thread): Moved to
8259 (x86_linux_prepare_to_resume): Likewise.
8261 2015-03-24 Gary Benson <gbenson@redhat.com>
8263 * Makefile.in (x86-linux-dregs.o): New rule.
8264 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8265 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8266 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8267 (x86_linux_dr_get): Likewise.
8268 (x86_linux_dr_set): Likewise.
8269 (update_debug_registers_callback): Likewise.
8270 (x86_linux_dr_set_addr): Likewise.
8271 (x86_linux_dr_get_addr): Likewise.
8272 (x86_linux_dr_set_control): Likewise.
8273 (x86_linux_dr_get_control): Likewise.
8274 (x86_linux_dr_get_status): Likewise.
8275 (x86_linux_update_debug_registers): Likewise.
8277 2015-03-24 Gary Benson <gbenson@redhat.com>
8279 * linux-x86-low.c (x86_linux_update_debug_registers):
8280 New function, factored out from...
8281 (x86_linux_prepare_to_resume): ...this.
8283 2015-03-24 Gary Benson <gbenson@redhat.com>
8285 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8286 (x86_linux_dr_set): Likewise.
8287 (update_debug_registers_callback): Likewise.
8288 (x86_linux_dr_set_addr): Likewise.
8289 (x86_linux_dr_get_addr): Likewise.
8290 (x86_linux_dr_set_control): Likewise.
8291 (x86_linux_dr_get_control): Likewise.
8292 (x86_linux_dr_get_status): Likewise.
8293 (x86_linux_prepare_to_resume): Likewise.
8295 2015-03-24 Gary Benson <gbenson@redhat.com>
8297 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8298 Use perror_with_name. Pass string through gettext.
8299 (x86_linux_dr_set): Likewise.
8301 2015-03-24 Gary Benson <gbenson@redhat.com>
8303 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8304 (x86_linux_dr_set_addr): ...this.
8305 (x86_dr_low_get_addr): Rename to...
8306 (x86_linux_dr_get_addr): ...this.
8307 (x86_dr_low_set_control): Rename to...
8308 (x86_linux_dr_set_control): ...this.
8309 (x86_dr_low_get_control): Rename to...
8310 (x86_linux_dr_get_control): ...this.
8311 (x86_dr_low_get_status): Rename to...
8312 (x86_linux_dr_get_status): ...this.
8313 (x86_dr_low): Update with new function names.
8315 2015-03-24 Gary Benson <gbenson@redhat.com>
8317 * Makefile.in (x86-linux.o): New rule.
8318 * configure.srv: Add x86-linux.o to relevant targets.
8319 * linux-low.c (lwp_set_arch_private_info): New function.
8320 (lwp_arch_private_info): Likewise.
8321 * linux-x86-low.c: Include nat/x86-linux.h.
8322 (arch_lwp_info): Removed structure.
8323 (update_debug_registers_callback):
8324 Use lwp_set_debug_registers_changed.
8325 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8326 and lwp_set_debug_registers_changed.
8327 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8329 2015-03-24 Gary Benson <gbenson@redhat.com>
8331 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8332 * linux-arm-low.c (arm_new_thread): Likewise.
8333 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8334 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8335 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8336 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8338 2015-03-24 Gary Benson <gbenson@redhat.com>
8340 * linux-low.c (ptid_of_lwp): New function.
8341 (lwp_is_stopped): Likewise.
8342 (lwp_stop_reason): Likewise.
8343 * linux-x86-low.c (update_debug_registers_callback):
8345 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8348 2015-03-24 Gary Benson <gbenson@redhat.com>
8350 * linux-low.h (linux_stop_lwp): Remove declaration.
8352 2015-03-24 Gary Benson <gbenson@redhat.com>
8354 * linux-low.h: Include nat/linux-nat.h.
8355 * linux-low.c (iterate_over_lwps_args): New structure.
8356 (iterate_over_lwps_filter): New function.
8357 (iterate_over_lwps): Likewise.
8358 * linux-x86-low.c (update_debug_registers_callback):
8359 Update signature to what iterate_over_lwps expects.
8360 Remove PID check that iterate_over_lwps now performs.
8361 (x86_dr_low_set_addr): Use iterate_over_lwps.
8362 (x86_dr_low_set_control): Likewise.
8364 2015-03-24 Gary Benson <gbenson@redhat.com>
8366 * linux-x86-low.c (x86_debug_reg_state): New function.
8367 (x86_linux_prepare_to_resume): Use the above.
8369 2015-03-24 Gary Benson <gbenson@redhat.com>
8371 * linux-low.c (current_lwp_ptid): New function.
8372 * linux-x86-low.c: Include nat/linux-nat.h.
8373 (x86_dr_low_get_addr): Use current_lwp_ptid.
8374 (x86_dr_low_get_control): Likewise.
8375 (x86_dr_low_get_status): Likewise.
8377 2015-03-20 Pedro Alves <palves@redhat.com>
8379 * tracepoint.c (cmd_qtstatus): Make "str" const.
8381 2015-03-20 Pedro Alves <palves@redhat.com>
8383 * server.c (handle_general_set): Make "req_str" const.
8385 2015-03-19 Pedro Alves <palves@redhat.com>
8387 * linux-low.c (linux_resume_one_lwp): Rename to ...
8388 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8389 instead call perror_with_name.
8390 (check_ptrace_stopped_lwp_gone): New function.
8391 (linux_resume_one_lwp): Reimplement as wrapper around
8392 linux_resume_one_lwp_throw that swallows errors if the LWP is
8395 2015-03-19 Pedro Alves <palves@redhat.com>
8397 * linux-low.c (count_events_callback, select_event_lwp_callback):
8398 No longer check whether the thread has resume_stop as last resume
8401 2015-03-19 Pedro Alves <palves@redhat.com>
8403 * linux-low.c (count_events_callback, select_event_lwp_callback):
8404 Use the lwp's status_pending_p field, not the thread's.
8406 2015-03-19 Pedro Alves <palves@redhat.com>
8408 * linux-low.c (select_event_lwp_callback): Update comments to
8409 no longer mention SIGTRAP.
8411 2015-03-18 Gary Benson <gbenson@redhat.com>
8413 * server.c (handle_query): Do not report vFile:fstat as supported.
8415 2015-03-11 Gary Benson <gbenson@redhat.com>
8417 * hostio.c (sys/types.h): New include.
8418 (sys/stat.h): Likewise.
8419 (common-remote-fileio.h): Likewise.
8420 (handle_fstat): New function.
8421 (handle_vFile): Handle vFile:fstat packets.
8423 2015-03-11 Gary Benson <gbenson@redhat.com>
8425 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8426 struct stat.st_blocks and struct stat.st_blksize.
8427 * configure: Regenerate.
8428 * config.in: Likewise.
8429 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8430 (OBS): Add common-remote-fileio.o.
8431 (common-remote-fileio.o): New rule.
8433 2015-03-09 Pedro Alves <palves@redhat.com>
8435 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8436 'struct sockaddr' pointer in 'accept' call.
8438 2015-03-09 Pedro Alves <palves@redhat.com>
8441 2015-03-07 Pedro Alves <palves@redhat.com>
8442 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8443 or <winsock2.h> here. Instead include "gdb_socket.h".
8444 (remote_open): Use union gdb_sockaddr_u.
8445 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8446 or <winsock2.h> here. Instead include "gdb_socket.h".
8447 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8448 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8450 (init_named_socket, gdb_agent_helper_thread): Use union
8453 2015-03-07 Pedro Alves <palves@redhat.com>
8455 * configure.ac (build_warnings): Move
8456 -Wdeclaration-after-statement to the C-specific set.
8457 * configure: Regenerate.
8459 2015-03-07 Pedro Alves <palves@redhat.com>
8461 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8462 or <winsock2.h> here. Instead include "gdb_socket.h".
8463 (remote_open): Use union gdb_sockaddr_u.
8464 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8465 or <winsock2.h> here. Instead include "gdb_socket.h".
8466 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8467 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8469 (init_named_socket, gdb_agent_helper_thread): Use union
8472 2015-03-07 Pedro Alves <palves@redhat.com>
8474 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8477 2015-03-06 Yao Qi <yao.qi@linaro.org>
8479 * linux-aarch64-low.c (aarch64_insert_point): Use
8480 show_debug_regs as a boolean.
8481 (aarch64_remove_point): Likewise.
8483 2015-03-05 Pedro Alves <palves@redhat.com>
8485 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8486 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8487 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8488 * nto-low.c (nto_target_ops): Likewise.
8489 * spu-low.c (spu_target_ops): Likewise.
8490 * win32-low.c (win32_target_ops): Likewise.
8492 2015-03-04 Pedro Alves <palves@redhat.com>
8494 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8495 Decide whether a breakpoint triggered based on the SIGTRAP's
8497 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8498 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8499 (linux_low_filter_event): Check for breakpoints before checking
8501 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8503 (linux_stopped_by_sw_breakpoint)
8504 (linux_supports_stopped_by_sw_breakpoint)
8505 (linux_stopped_by_hw_breakpoint)
8506 (linux_supports_stopped_by_hw_breakpoint): New functions.
8507 (linux_target_ops): Install new target methods.
8509 2015-03-04 Pedro Alves <palves@redhat.com>
8511 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8512 * server.c (swbreak_feature, hwbreak_feature): New globals.
8513 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8514 (captured_main): Clear swbreak_feature and hwbreak_feature.
8515 * server.h (swbreak_feature, hwbreak_feature): Declare.
8516 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8517 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8518 supports_stopped_by_hw_breakpoint>: New fields.
8519 (target_supports_stopped_by_sw_breakpoint)
8520 (target_stopped_by_sw_breakpoint)
8521 (target_supports_stopped_by_hw_breakpoint)
8522 (target_stopped_by_hw_breakpoint): Declare.
8524 2015-03-04 Pedro Alves <palves@redhat.com>
8526 enum lwp_stop_reason -> enum target_stop_reason
8527 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8528 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8529 (linux_wait_1, stuck_in_jump_pad_callback)
8530 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8531 (linux_stopped_by_watchpoint):
8532 * linux-low.h (enum lwp_stop_reason): Delete.
8533 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8534 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8536 2015-03-04 Yao Qi <yao.qi@linaro.org>
8538 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8540 2015-03-03 Gary Benson <gbenson@redhat.com>
8542 * hostio.c (handle_vFile): Fix prefix lengths.
8544 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8546 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8549 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8551 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8552 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8553 (clean): Add "rm -f" for above C files.
8554 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8555 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8556 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8557 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8558 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8559 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8560 (init_registers_s390x_vx_linux64)
8561 (init_registers_s390x_tevx_linux64)
8562 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8563 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8565 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8566 (s390_store_vxrs_high): New functions.
8567 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8569 (s390_arch_setup): Add logic for selecting one of the new target
8570 descriptions. Activate the new vector regsets if applicable.
8571 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8572 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8573 and init_registers_s390x_tevx_linux64.
8575 2015-03-01 Pedro Alves <palves@redhat.com>
8577 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8580 2015-02-27 Pedro Alves <palves@redhat.com>
8582 * linux-x86-low.c (u_debugreg_offset): New function.
8583 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8585 2015-02-27 Pedro Alves <palves@redhat.com>
8587 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8588 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8589 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8590 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8591 (ps_lsetfpregs, ps_getpid)
8592 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8593 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8594 (ps_lsetxregs, ps_plog): Declare.
8596 2015-02-27 Pedro Alves <palves@redhat.com>
8598 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8599 IP_AGENT_EXPORT_FUNC.
8600 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8601 IP_AGENT_EXPORT_FUNC.
8602 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8603 (IP_AGENT_EXPORT): Delete.
8604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8605 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8606 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8607 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8608 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8609 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8610 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8611 (traceframe_read_count, traceframe_write_count)
8612 (traceframes_created, trace_state_variables, get_raw_reg)
8613 (get_trace_state_variable_value, set_trace_state_variable_value)
8614 (ust_loaded, helper_thread_id, cmd_buf): Use
8615 IPA_SYM_EXPORTED_NAME.
8616 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8617 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8618 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8619 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8620 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8621 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8622 EXTERN_C_PUSH/EXTERN_C_POP.
8623 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8624 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8625 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8626 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8627 (traceframe_write_count, traceframe_read_count)
8628 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8629 (about_to_request_buffer_space, get_trace_state_variable_value)
8630 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8631 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8632 EXTERN_C_PUSH/EXTERN_C_POP.
8633 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8634 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8635 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8636 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8637 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8638 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8639 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8640 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8642 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8643 (IP_AGENT_EXPORT_VAR_DECL): Define.
8645 (gdb_agent_get_raw_reg): Declare.
8647 2015-02-27 Tom Tromey <tromey@redhat.com>
8648 Pedro Alves <palves@redhat.com>
8650 Rename symbols whose names are reserved C++ keywords throughout.
8652 2015-02-27 Pedro Alves <palves@redhat.com>
8654 * Makefile.in (COMPILER): New, get it from autoconf.
8655 (CXX): Get from autoconf instead.
8656 (COMPILE.pre): Use COMPILER.
8657 (CC-LD): Rename to ...
8658 (CC_LD): ... this. Use COMPILER.
8659 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8660 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8661 * acinclude.m4: Include build-with-cxx.m4.
8662 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8663 Disable -Werror by default if building in C++ mode.
8664 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8665 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8666 the C++ compiler. Save/restore CXXFLAGS too.
8667 * configure: Regenerate.
8669 2015-02-27 Pedro Alves <palves@redhat.com>
8671 * acinclude.m4: Include libiberty.m4.
8672 * configure.ac: Call libiberty_INIT.
8673 * config.in, configure: Regenerate.
8675 2015-02-26 Pedro Alves <palves@redhat.com>
8677 * linux-low.c (linux_wait_1): When incrementing the PC past a
8678 program breakpoint always use the_low_target.breakpoint_len as
8679 increment, rather than the maximum between that and
8680 the_low_target.decr_pc_after_break.
8682 2015-02-23 Pedro Alves <palves@redhat.com>
8684 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8685 thread was doing a step-over; always adjust the PC if
8686 we stepped over a permanent breakpoint.
8687 (linux_wait_1): If we stepped over breakpoint that was on top of a
8688 permanent breakpoint, manually advance the PC past it.
8690 2015-02-23 Pedro Alves <palves@redhat.com>
8692 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8694 (x86_fill_gregset, x86_store_gregset): Use it when handling
8697 2015-02-20 Pedro Alves <palves@redhat.com>
8699 * thread-db.c: Include "nat/linux-procfs.h".
8700 (thread_db_init): Skip listing new threads if the kernel supports
8701 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8703 2015-02-20 Pedro Alves <palves@redhat.com>
8705 * linux-low.c (status_pending_p_callback): Use ptid_match.
8707 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8709 PR breakpoints/16812
8710 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8711 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8712 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8714 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8716 PR breakpoints/15956
8717 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8719 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8721 * linux-low.c (linux_low_btrace_conf): Print size.
8722 * server.c (handle_btrace_conf_general_set): New.
8723 (hanle_general_set): Call handle_btrace_conf_general_set.
8724 (handle_query): Report Qbtrace-conf:bts:size as supported.
8726 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8728 * linux-low.c (linux_low_enable_btrace): Update parameters.
8729 (linux_low_btrace_conf): New.
8730 (linux_target_ops)<to_btrace_conf>: Initialize.
8731 * server.c (current_btrace_conf): New.
8732 (handle_btrace_enable): Rename to ...
8733 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8734 to target_enable_btrace. Update comment. Update users.
8735 (handle_qxfer_btrace_conf): New.
8736 (qxfer_packets): Add btrace-conf entry.
8737 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8738 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8739 (target_ops)<read_btrace_conf>: New.
8740 (target_enable_btrace): Update parameters.
8741 (target_read_btrace_conf): New.
8743 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8745 * server.c (handle_btrace_general_set): Remove call to
8746 target_supports_btrace.
8747 (supported_btrace_packets): New.
8748 (handle_query): Call supported_btrace_packets.
8749 * target.h: include btrace-common.h.
8750 (btrace_target_info): Removed.
8751 (supports_btrace, target_supports_btrace): Update parameters.
8753 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8755 * Makefile.in (SFILES): Add common/btrace-common.c.
8756 (OBS): Add common/btrace-common.o.
8757 (btrace-common.o): Add build rules.
8758 * linux-low: Include btrace-common.h.
8759 (linux_low_read_btrace): Use struct btrace_data. Call
8760 btrace_data_init and btrace_data_fini.
8762 2015-02-06 Pedro Alves <palves@redhat.com>
8764 * thread-db.c (find_new_threads_callback): Add debug output.
8766 2015-02-04 Pedro Alves <palves@redhat.com>
8768 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8769 (resume_stopped_resumed_lwps): New function.
8770 (linux_wait_for_event_filtered): Use it.
8772 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8774 * Makefile.in (SFILES): Add linux-personality.c.
8775 (linux-personality.o): New rule.
8776 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8777 list of objects to be built.
8778 * linux-low.c: Include nat/linux-personality.h.
8779 (linux_create_inferior): Remove code to disable address space
8780 randomization (moved to ../nat/linux-personality.c). Create
8781 cleanup to disable address space randomization.
8783 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8785 * Makefile.in (posix-strerror.o): New rule.
8786 (mingw-strerror.o): Likewise.
8787 * configure: Regenerated.
8788 * configure.ac: Source file ../common/common.host. Initialize new
8789 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8791 2015-01-14 Yao Qi <yao@codesourcery.com>
8793 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8794 (ppc-linux.o): New rule.
8795 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8796 * configure.ac: AC_CHECK_FUNCS(getauxval).
8797 * config.in: Re-generated.
8798 * configure: Re-generated.
8799 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8800 ppc64_64bit_inferior_p
8802 2015-01-14 Yao Qi <yao@codesourcery.com>
8804 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8805 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8806 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8807 (PT_ORIG_R3, PT_TRAP): Likewise.
8808 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8809 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8810 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8812 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8814 * i387-fp.c (i387_cache_to_xsave): In look over
8815 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8816 zmmh_low_space field by use of zmmh_high_space.
8818 2015-01-09 Pedro Alves <palves@redhat.com>
8820 * linux-low.c (step_over_bkpt): Move higher up in the file.
8821 (handle_extended_wait): Don't store the stop_pc here.
8822 (get_stop_pc): Adjust comments and rename to ...
8823 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8824 stopped for a software breakpoint or hardware breakpoint.
8825 (thread_still_has_status_pending_p): New function.
8826 (status_pending_p_callback): Use
8827 thread_still_has_status_pending_p. If the event is no longer
8828 interesting, resume the LWP.
8829 (handle_tracepoints): Add assert.
8830 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8831 (wstatus_maybe_breakpoint): New function.
8832 (cancel_breakpoint): Delete function.
8833 (check_stopped_by_watchpoint): New function, factored out from
8834 linux_low_filter_event.
8835 (lp_status_maybe_breakpoint): Delete function.
8836 (linux_low_filter_event): Remove filter_ptid argument.
8837 Leave thread group exits pending here. Store the LWP's stop PC.
8838 Always leave events pending.
8839 (linux_wait_for_event_filtered): Pull all events out of the
8840 kernel, and leave them all pending.
8841 (count_events_callback, select_event_lwp_callback): Consider all
8843 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8844 (select_event_lwp): Only give preference to the stepping LWP in
8845 all-stop mode. Adjust comments.
8846 (ignore_event): New function.
8847 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8848 references to cancel_breakpoints. Adjust to renames. Also give
8849 equal priority to all LWPs that have had events in non-stop mode.
8850 If reporting a software breakpoint event, unadjust the LWP's PC.
8851 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8852 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8854 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8855 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8856 (linux_stopped_by_watchpoint): Adjust.
8857 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8858 * linux-low.h (enum lwp_stop_reason): New.
8859 (struct lwp_info) <stop_pc>: Adjust comment.
8860 <stopped_by_watchpoint>: Delete field.
8861 <stop_reason>: New field.
8862 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8863 * mem-break.c (software_breakpoint_inserted_here)
8864 (hardware_breakpoint_inserted_here): New function.
8865 * mem-break.h (software_breakpoint_inserted_here)
8866 (hardware_breakpoint_inserted_here): Declare.
8867 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8868 (cancel_breakpoints): Delete.
8869 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8870 (upload_fast_traceframes): Remove references to
8873 2015-01-09 Pedro Alves <palves@redhat.com>
8875 * thread-db.c (find_new_threads_callback): Ignore thread if the
8876 kernel thread ID is -1.
8878 2015-01-09 Pedro Alves <palves@redhat.com>
8880 * linux-low.c (linux_attach_fail_reason_string): Move to
8881 nat/linux-ptrace.c, and rename.
8882 (linux_attach_lwp): Update comment.
8883 (attach_proc_task_lwp_callback): New function.
8884 (linux_attach): Adjust to rename and use
8885 linux_proc_attach_tgid_threads.
8886 (linux_attach_fail_reason_string): Delete declaration.
8888 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8890 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8891 * server.c (gdbserver_version): Likewise.
8893 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8895 * remote-utils.c: Include ctype.h.
8896 (input_interrupt): Explicitly handle the case when the char
8897 received is the NUL byte. Improve the printing of non-ASCII
8900 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8902 * linux-low.c (linux_low_filter_event): Update call to
8903 linux_enable_event_reporting following the addition of
8904 a new parameter to that function.
8906 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8909 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8910 (AARCH64_FPCR_REGNO): Likewise.
8911 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8912 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8913 (aarch64_store_fpregset): Likewise.
8915 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8917 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8918 Remove FIXME comment about assumption about N.
8920 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8922 * configure.ac: If large-file support is disabled in GDBserver,
8923 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8924 * configure: Regenerate.
8926 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8928 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8929 warning upon ENODATA from ptrace.
8930 * linux-s390-low.c (s390_store_tdb): New.
8931 (s390_regsets): Add regset for NT_S390_TDB.
8933 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8935 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8936 without a fill_function.
8937 * linux-s390-low.c (s390_fill_last_break): Remove.
8938 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8939 (s390_arch_setup): Use regset's size instead of fill_function for
8942 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8944 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8945 the regset's store function when ptrace returned an error.
8946 * regcache.c (get_thread_regcache): Invalidate register cache
8947 before fetching inferior's registers.
8949 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8951 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8952 while-loop as for-loop.
8953 (regsets_store_inferior_registers): Likewise.
8955 2014-11-28 Yao Qi <yao@codesourcery.com>
8957 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8958 * config.in, configure: Re-generate.
8959 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8962 2014-11-21 Yao Qi <yao@codesourcery.com>
8964 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8965 (AC_CHECK_HEADERS): Remove malloc.h.
8966 * configure: Re-generated.
8967 * config.in: Re-generated.
8968 * server.h: Don't include alloca.h and malloc.h.
8969 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8970 Don't include malloc.h.
8972 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8974 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8975 corresponding ERRNO check in same block.
8977 2014-11-12 Pedro Alves <palves@redhat.com>
8979 * server.c (cont_thread): Update comment.
8980 (start_inferior, attach_inferior): No longer clear cont_thread.
8981 (handle_v_cont): No longer set cont_thread.
8982 (captured_main): Clear cont_thread each time a GDB connects.
8984 2014-11-12 Pedro Alves <palves@redhat.com>
8986 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8987 thread, and don't resume all threads if the Hc thread has exited.
8989 2014-11-12 Pedro Alves <palves@redhat.com>
8991 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8992 the process group instead of to a specific LWP.
8994 2014-10-15 Pedro Alves <palves@redhat.com>
8997 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8999 (arm_set_thread_context): Delete.
9000 (the_low_target): Adjust.
9001 * win32-i386-low.c (debug_registers_changed)
9002 (debug_registers_used): Delete.
9003 (update_debug_registers_callback): New function.
9004 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9005 needing to update their debug registers.
9006 (win32_get_current_dr): New function.
9007 (x86_dr_low_get_addr, x86_dr_low_get_control)
9008 (x86_dr_low_get_status): Fetch the debug register from the thread
9010 (i386_initial_stuff): Adjust.
9011 (i386_get_thread_context): Remove current_event parameter. Don't
9012 clear debug_registers_changed nor copy DR values to
9014 (i386_set_thread_context): Delete.
9015 (i386_prepare_to_resume): New function.
9016 (i386_thread_added): Mark the thread as needing to update irs
9018 (the_low_target): Remove i386_set_thread_context and install
9019 i386_prepare_to_resume.
9020 * win32-low.c (win32_get_thread_context): Adjust.
9021 (win32_set_thread_context): Use SetThreadContext
9023 (win32_prepare_to_resume): New function.
9024 (win32_require_context): New function, factored out from ...
9025 (thread_rec): ... this.
9026 (continue_one_thread): Call win32_prepare_to_resume on each thread
9027 we're about to continue.
9028 (win32_resume): Call win32_prepare_to_resume on the event thread.
9029 * win32-low.h (struct win32_thread_info)
9030 <debug_registers_changed>: New field.
9031 (struct win32_target_ops): Change prototype of set_thread_context,
9032 delete set_thread_context and add prepare_to_resume.
9033 (win32_require_context): New declaration.
9035 2014-10-08 Gary Benson <gbenson@redhat.com>
9037 * server.h: Do not include common-exceptions.h.
9039 2014-10-08 Gary Benson <gbenson@redhat.com>
9041 * server.h: Do not include cleanups.h.
9043 2014-09-30 James Hogan <james.hogan@imgtec.com>
9045 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9048 2014-09-23 Yao Qi <yao@codesourcery.com>
9050 * linux-low.c (lp_status_maybe_breakpoint): New function.
9051 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9052 (count_events_callback): Likewise.
9053 (select_event_lwp_callback): Likewise.
9054 (cancel_breakpoints_callback): Likewise.
9056 2014-09-19 Don Breazeal <donb@codesourcery.com>
9058 * linux-low.c (handle_extended_wait): Call
9059 linux_ptrace_get_extended_event.
9060 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9061 linux_is_extended_waitstatus.
9063 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9065 * Makefile.in (CPPFLAGS): Define.
9066 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9067 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9069 2014-09-16 Gary Benson <gbenson@redhat.com>
9071 * inferiors.h (current_inferior): Renamed as...
9072 (current_thread): New variable. All uses updated.
9073 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9074 (maybe_move_out_of_jump_pad): Likewise.
9075 (cancel_breakpoint): Likewise.
9076 (linux_low_filter_event): Likewise.
9077 (wait_for_sigstop): Likewise.
9078 (linux_resume_one_lwp): Likewise.
9079 (need_step_over_p): Likewise.
9080 (start_step_over): Likewise.
9081 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9082 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9083 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9084 and save_inferior as saved_thread.
9085 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9087 (regcache_invalidate_thread): Likewise.
9088 * remote-utils.c (prepare_resume_reply): Likewise.
9089 * thread-db.c (thread_db_get_tls_address): Likewise.
9090 (disable_thread_event_reporting): Likewise.
9091 (remove_thread_event_breakpoints): Likewise.
9092 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9094 * target.h (set_desired_inferior): Renamed as...
9095 (set_desired_thread): New declaration. All uses updated.
9096 * server.c (myresume): Updated comment to reference thread instead
9098 (handle_serial_event): Likewise.
9099 (handle_target_event): Likewise.
9101 2014-09-12 Tom Tromey <tromey@redhat.com>
9102 Gary Benson <gbenson@redhat.com>
9104 * regcache.h: Include common-regcache.h.
9105 (regcache_read_pc): Don't declare.
9106 * regcache.c (get_thread_regcache_for_ptid): New function.
9108 2014-09-11 Tom Tromey <tromey@redhat.com>
9109 Gary Benson <gbenson@redhat.com>
9111 * symbol.c: New file.
9112 * Makefile.in (SFILES): Add symbol.c.
9113 (OBS): Add symbol.o.
9115 2014-09-11 Gary Benson <gbenson@redhat.com>
9117 * target.c (target_stop_ptid, target_continue_ptid): New
9120 2014-09-11 Tom Tromey <tromey@redhat.com>
9121 Gary Benson <gbenson@redhat.com>
9123 * target.h: Include target/target.h.
9124 * target.c (target_read_memory, target_read_uint32)
9125 (target_write_memory): New functions.
9127 2014-09-11 Gary Benson <gbenson@redhat.com>
9129 * server.h (debug_hw_points): Don't declare.
9130 * server.c (debug_hw_points): Don't define. Replace all uses
9131 with show_debug_regs.
9132 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9133 all uses with show_debug_regs.
9135 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9137 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9138 endianness into account.
9139 (ppc_supply_ptrace_register): Likewise.
9141 2014-09-03 James Hogan <james.hogan@imgtec.com>
9143 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9144 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9146 2014-09-03 Gary Benson <gbenson@redhat.com>
9148 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9149 ALL_DEBUG_ADDRESS_REGISTERS.
9151 2014-09-02 Gary Benson <gbenson@redhat.com>
9153 * i386-low.h: Renamed as...
9154 * x86-low.h: New file. All type, function and variable name
9155 prefixes changed from "i386_" to "x86_". All references updated.
9156 * i386-low.c: Renamed as...
9157 * x86-low.c: New file. All type, function and variable name
9158 prefixes changed from "i386_" to "x86_". All references updated.
9160 2014-09-02 Gary Benson <gbenson@redhat.com>
9162 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9163 (x86_linux_new_thread): Likewise.
9165 2014-08-29 Gary Benson <gbenson@redhat.com>
9167 * server.h (setjmp.h): Do not include.
9168 (toplevel): Do not declare.
9169 (common-exceptions.h): Include.
9170 (cleanups.h): Likewise.
9171 * server.c (toplevel): Do not define.
9172 (exit_code): New static global.
9173 (detach_or_kill_for_exit_cleanup): New function.
9174 (main): New function. Original main renamed to...
9175 (captured_main): New function.
9176 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9178 2014-08-29 Gary Benson <gbenson@redhat.com>
9180 * Makefile.in (SFILES): Add common/common-exceptions.c.
9181 (OBS): Add common-exceptions.o.
9182 (common-exceptions.o): New rule.
9183 * utils.c (prepare_to_throw_exception): New function.
9185 2014-08-29 Gary Benson <gbenson@redhat.com>
9187 * config.in: Regenerate.
9188 * configure: Likewise.
9190 2014-08-29 Gary Benson <gbenson@redhat.com>
9192 * Makefile.in (SFILES): Add common/cleanups.c.
9194 (cleanups.o): New rule.
9196 2014-08-29 Gary Benson <gbenson@redhat.com>
9198 * utils.c (internal_vwarning): New function.
9200 2014-08-28 Gary Benson <gbenson@redhat.com>
9202 * utils.h (fatal): Remove declaration.
9203 * utils.c (fatal): Remove function.
9205 2014-08-28 Gary Benson <gbenson@redhat.com>
9207 * tracepoint.c (gdb_agent_init): Replace fatal with
9209 (initialize_tracepoint): Likewise.
9211 2014-08-28 Gary Benson <gbenson@redhat.com>
9213 * remote-utils.c (remote_prepare): Replace fatal with error.
9215 2014-08-28 Gary Benson <gbenson@redhat.com>
9217 * linux-low.c (linux_async): Replace fatal with warning.
9219 (linux_start_non_stop): Return -1 if linux_async failed.
9221 2014-08-28 Gary Benson <gbenson@redhat.com>
9223 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9225 (i386_dr_low_get_addr): Remove vague comment.
9226 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9229 2014-08-28 Gary Benson <gbenson@redhat.com>
9231 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9232 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9234 (linux_resume_one_lwp): Likewise.
9235 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9237 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9238 with internal_error.
9239 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9240 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9241 (find_register_by_name): Replace fatal with internal_error.
9242 (find_regno): Likewise.
9243 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9244 * thread-db.c (thread_db_create_event): Likewise.
9245 (thread_db_load_search): Likewise.
9246 (try_thread_db_load_1): Likewise.
9247 * tracepoint.c (get_jump_space_head): Replace fatal with
9249 (claim_trampoline_space): Likewise.
9250 (have_fast_tracepoint_trampoline_buffer): Likewise.
9251 (cmd_qtstart): Likewise.
9252 (stop_tracing): Likewise.
9253 (fast_tracepoint_collecting): Likewise.
9254 (target_malloc): Likewise.
9255 (download_tracepoint): Likewise.
9256 (download_trace_state_variables): Replace check with gdb_assert.
9257 (upload_fast_traceframes): Replace fatal with internal_error.
9259 2014-08-19 Tom Tromey <tromey@redhat.com>
9260 Gary Benson <gbenson@redhat.com>
9262 * Makefile.in (SFILES): Add common/common-debug.c.
9263 (OBS): Add common-debug.o.
9264 (common-debug.o): New rule.
9265 * debug.h (debug_printf): Don't declare.
9266 * debug.c (debug_printf): Renamed and rewritten as...
9267 (debug_vprintf): New function.
9269 2014-08-19 Gary Benson <gbenson@redhat.com>
9271 * utils.h: Do not include print-utils.h.
9273 2014-08-19 Tom Tromey <tromey@redhat.com>
9274 Gary Benson <gbenson@redhat.com>
9276 * server.h: Add static assertion.
9277 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9279 2014-08-19 Tom Tromey <tromey@redhat.com>
9280 Gary Benson <gbenson@redhat.com>
9282 * Makefile.in (SFILES): Add common/errors.c.
9283 (OBS): Add errors.o.
9284 (IPA_OBS): Add errors-ipa.o.
9285 (errors.o): New rule.
9286 (errors-ipa.o): Likewise.
9287 * utils.h (perror_with_name, error, warning): Don't declare.
9288 * utils.c (warning): Renamed and rewritten as...
9289 (vwarning): New function.
9290 (error): Renamed and rewritten as...
9291 (verror): New function.
9292 (internal_error): Renamed and rewritten as...
9293 (internal_verror): New function.
9295 2014-08-07 Gary Benson <gbenson@redhat.com>
9297 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9298 * configure: Regenerate.
9299 * config.in: Likewise.
9300 * server.h: Do not include errno.h.
9301 * event-loop.c: Likewise.
9302 * hostio-errno.c: Likewise.
9303 * linux-low.c: Likewise.
9304 * remote-utils.c: Likewise.
9305 * spu-low.c: Likewise.
9306 * utils.c: Likewise.
9307 * gdbreplay.c: Unconditionally include errno.h.
9309 2014-08-07 Gary Benson <gbenson@redhat.com>
9311 * server.h: Do not include string.h.
9312 * event-loop.c: Likewise.
9313 * linux-low.c: Likewise.
9314 * regcache.c: Likewise.
9315 * remote-utils.c: Likewise.
9316 * spu-low.c: Likewise.
9317 * utils.c: Likewise.
9319 2014-08-07 Gary Benson <gbenson@redhat.com>
9321 * server.h: Do not include gdb_assert.h.
9323 2014-08-07 Gary Benson <gbenson@redhat.com>
9325 * server.h: Do not include common-utils.h.
9327 2014-08-07 Gary Benson <gbenson@redhat.com>
9329 * server.h: Do not include ptid.h.
9330 * notif.h: Likewise.
9332 2014-08-07 Gary Benson <gbenson@redhat.com>
9334 * server.h: Do not include gdb_locale.h.
9336 2014-08-07 Gary Benson <gbenson@redhat.com>
9338 * server.h: Do not include gdb/signals.h.
9339 * win32-low.c: Likewise.
9341 2014-08-07 Gary Benson <gbenson@redhat.com>
9343 * server.h: Do not include pathmax.h.
9345 2014-08-07 Gary Benson <gbenson@redhat.com>
9347 * server.h: Do not include libiberty.h.
9348 * linux-bfin-low.c: Likewise.
9350 2014-08-07 Gary Benson <gbenson@redhat.com>
9352 * server.h: Do not include ansidecl.h.
9354 2014-08-07 Gary Benson <gbenson@redhat.com>
9356 * linux-x86-low.c: Do not include stddef.h.
9357 * lynx-ppc-low.c: Likewise.
9358 * tracepoint.c: Likewise.
9360 2014-08-07 Gary Benson <gbenson@redhat.com>
9362 * server.h: Do not include stdarg.h.
9363 * nto-low.c: Likewise.
9365 2014-08-07 Gary Benson <gbenson@redhat.com>
9367 * server.h: Do not include stdlib.h.
9368 * inferiors.c: Likewise.
9369 * linux-low.c: Likewise.
9370 * regcache.c: Likewise.
9371 * spu-low.c: Likewise.
9372 * tracepoint.c: Likewise.
9373 * utils.c: Likewise.
9375 2014-08-07 Gary Benson <gbenson@redhat.com>
9377 * server.h: Do not include stdio.h.
9378 * linux-low.c: Likewise.
9379 * remote-utils.c: Likewise.
9380 * spu-low.c: Likewise.
9381 * utils.c: Likewise.
9382 * wincecompat.c: Likewise.
9384 2014-08-06 Gary Benson <gbenson@redhat.com>
9386 * regcache.c (init_register_cache): Move conditionals inside if.
9388 2014-08-06 Gary Benson <gbenson@redhat.com>
9390 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9392 2014-07-31 Gary Benson <gbenson@redhat.com>
9394 * ax.h: Do not include server.h.
9395 * gdbthread.h: Likewise.
9396 * lynx-low.h: Likewise.
9397 * notif.h: Likewise.
9399 2014-07-30 Gary Benson <gbenson@redhat.com>
9401 * server.h: Include common-defs.h.
9402 Do not include config.h or build-gnulib-gdbserver/config.h.
9404 2014-07-30 Gary Benson <gbenson@redhat.com>
9406 * hostio-errno.c: Move server.h to top of includes list.
9407 * inferiors.c: Likewise.
9408 * linux-x86-low.c: Likewise.
9409 * notif.c: Include server.h.
9411 2014-07-24 Tom Tromey <tromey@redhat.com>
9412 Gary Benson <gbenson@redhat.com>
9414 * server.h (CORE_ADDR): Now unsigned.
9416 2014-07-16 Pedro Alves <palves@redhat.com>
9418 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9420 2014-07-15 Pedro Alves <palves@redhat.com>
9422 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9425 2014-07-11 Pedro Alves <palves@redhat.com>
9427 * linux-low.c (kill_wait_lwp): New function, based on
9428 kill_one_lwp_callback, but use my_waitpid directly.
9429 (kill_one_lwp_callback, linux_kill): Use it.
9431 2014-06-23 Pedro Alves <palves@redhat.com>
9433 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9434 before setting DR0..DR3.
9436 2014-06-20 Gary Benson <gbenson@redhat.com>
9438 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9439 * configure: Regenerated.
9440 * config.in: Likewise.
9442 2014-06-20 Gary Benson <gbenson@redhat.com>
9444 * Makefile.in (SFILES): Update locations for files moved
9446 (object file files): Reordered.
9448 2014-06-20 Gary Benson <gbenson@redhat.com>
9450 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9451 (i386_dr_low_set_addr): Likewise.
9452 (i386_dr_low_get_addr): Likewise.
9453 (i386_dr_low_can_set_control): Likewise.
9454 (i386_dr_low_set_control): Likewise.
9455 (i386_dr_low_get_control): Likewise.
9456 (i386_dr_low_get_status): Likewise.
9457 (i386_get_debug_register_length): Likewise.
9458 * linux-x86-low.c (i386_dr_low_set_addr):
9459 Changed signature. Made static.
9460 (i386_dr_low_get_addr): Likewise.
9461 (i386_dr_low_set_control): Likewise.
9462 (i386_dr_low_get_control): Likewise.
9463 (i386_dr_low_get_status): Likewise.
9464 (i386_dr_low): New global variable.
9465 * win32-i386-low.c (i386_dr_low_set_addr):
9466 Changed signature. Made static.
9467 (i386_dr_low_get_addr): Likewise.
9468 (i386_dr_low_set_control): Likewise.
9469 (i386_dr_low_get_control): Likewise.
9470 (i386_dr_low_get_status): Likewise.
9471 (i386_dr_low): New global variable.
9473 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9475 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9476 * Makefile.in (AR, AR_FLAGS): Define.
9477 * configure: Regenerate.
9479 2014-06-19 Gary Benson <gbenson@redhat.com>
9481 * Makefile.in (i386-dregs.o): New rule.
9482 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9483 * i386-low.c (target.h): Remove include.
9484 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9485 (DR_CONTROL_SHIFT): Likewise.
9486 (DR_CONTROL_SIZE): Likewise.
9487 (DR_RW_EXECUTE): Likewise.
9488 (DR_RW_WRITE): Likewise.
9489 (DR_RW_READ): Likewise.
9490 (DR_RW_IORW): Likewise.
9491 (DR_LEN_1): Likewise.
9492 (DR_LEN_2): Likewise.
9493 (DR_LEN_4): Likewise.
9494 (DR_LEN_8): Likewise.
9495 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9496 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9497 (DR_ENABLE_SIZE): Likewise.
9498 (DR_LOCAL_SLOWDOWN): Likewise.
9499 (DR_GLOBAL_SLOWDOWN): Likewise.
9500 (DR_CONTROL_RESERVED): Likewise.
9501 (I386_DR_CONTROL_MASK): Likewise.
9502 (I386_DR_VACANT): Likewise.
9503 (I386_DR_LOCAL_ENABLE): Likewise.
9504 (I386_DR_GLOBAL_ENABLE): Likewise.
9505 (I386_DR_DISABLE): Likewise.
9506 (I386_DR_SET_RW_LEN): Likewise.
9507 (I386_DR_GET_RW_LEN): Likewise.
9508 (I386_DR_WATCH_HIT): Likewise.
9509 (i386_wp_op_t): Likewise.
9510 (i386_show_dr): Likewise.
9511 (i386_length_and_rw_bits): Likewise.
9512 (i386_insert_aligned_watchpoint): Likewise.
9513 (i386_remove_aligned_watchpoint): Likewise.
9514 (i386_handle_nonaligned_watchpoint): Likewise.
9515 i386_update_inferior_debug_regs(): Likewise.
9516 (i386_dr_insert_watchpoint): Likewise.
9517 (i386_dr_remove_watchpoint): Likewise.
9518 (i386_dr_region_ok_for_watchpoint): Likewise.
9519 (i386_dr_stopped_data_address): Likewise.
9520 (i386_dr_stopped_by_watchpoint): Likewise.
9522 2014-06-19 Gary Benson <gbenson@redhat.com>
9524 * i386-low.c (i386_dr_show): Renamed to
9525 i386_show_dr and made static. All uses updated.
9526 (i386_dr_length_and_rw_bits): Renamed to
9527 i386_length_and_rw_bits and made static.
9529 (i386_dr_insert_aligned_watchpoint): Renamed to
9530 i386_insert_aligned_watchpoint and made static.
9532 (i386_dr_remove_aligned_watchpoint): Renamed to
9533 i386_remove_aligned_watchpoint and made static.
9535 (i386_dr_update_inferior_debug_regs): Renamed to
9536 i386_update_inferior_debug_regs and made static.
9539 2014-06-18 Gary Benson <gbenson@redhat.com>
9541 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9542 (i386_dr_low_can_set_control): Likewise.
9543 (i386_get_debug_register_length): Likewise.
9544 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9545 (i386_dr_low_can_set_control): Likewise.
9546 (i386_get_debug_register_length): Likewise.
9548 2014-06-17 Gary Benson <gbenson@redhat.com>
9550 * i386-low.h (i386-dregs.h): New include.
9551 (DR_FIRSTADDR): Now in i386-dregs.h.
9552 (DR_LASTADDR): Likewise.
9553 (DR_NADDR): Likewise.
9554 (DR_STATUS): Likewise.
9555 (DR_CONTROL): Likewise.
9556 (i386_debug_reg_state): Likewise.
9557 (i386_dr_insert_watchpoint): Likewise.
9558 (i386_dr_remove_watchpoint): Likewise.
9559 (i386_dr_region_ok_for_watchpoint): Likewise.
9560 (i386_dr_stopped_data_address): Likewise.
9561 (i386_dr_stopped_by_watchpoint): Likewise.
9562 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9564 2014-06-18 Gary Benson <gbenson@redhat.com>
9566 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9567 i386_dr_insert_watchpoint.
9568 (i386_low_remove_watchpoint): Renamed to
9569 i386_dr_remove_watchpoint.
9570 (i386_low_region_ok_for_watchpoint): Renamed to
9571 i386_dr_region_ok_for_watchpoint.
9572 (i386_low_stopped_data_address): Renamed to
9573 i386_dr_stopped_data_address.
9574 (i386_low_stopped_by_watchpoint): Renamed to
9575 i386_dr_stopped_by_watchpoint.
9576 * i386-low.c (i386_show_dr): Renamed to
9577 i386_dr_show and made nonstatic. All uses updated.
9578 (i386_length_and_rw_bits): Renamed to
9579 i386_dr_length_and_rw_bits and made nonstatic.
9581 (i386_insert_aligned_watchpoint): Renamed to
9582 i386_dr_insert_aligned_watchpoint and made nonstatic.
9584 (i386_remove_aligned_watchpoint): Renamed to
9585 i386_dr_remove_aligned_watchpoint and made nonstatic.
9587 (i386_update_inferior_debug_regs): Renamed to
9588 i386_dr_update_inferior_debug_regs and made nonstatic.
9590 (i386_low_insert_watchpoint): Renamed to
9591 i386_dr_insert_watchpoint. All uses updated.
9592 (i386_low_remove_watchpoint): Renamed to
9593 i386_dr_remove_watchpoint. All uses updated.
9594 (i386_low_region_ok_for_watchpoint): Renamed to
9595 i386_dr_region_ok_for_watchpoint. All uses updated.
9596 (i386_low_stopped_data_address): Renamed to
9597 i386_dr_stopped_data_address. All uses updated.
9598 (i386_low_stopped_by_watchpoint): Renamed to
9599 i386_dr_stopped_by_watchpoint. All uses updated.
9601 2014-06-18 Gary Benson <gbenson@redhat.com>
9603 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9604 (i386_dr_low_can_set_control): Likewise.
9605 (i386_insert_aligned_watchpoint): New check.
9607 2014-06-18 Gary Benson <gbenson@redhat.com>
9609 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9612 2014-06-18 Gary Benson <gbenson@redhat.com>
9614 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9615 instead of fatal and error.
9616 (i386_handle_nonaligned_watchpoint): Likewise.
9618 2014-06-18 Gary Benson <gbenson@redhat.com>
9620 * i386-low.c (i386_get_debug_register_length): New macro.
9621 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9622 (i386_show_dr): Use debug_printf instead of fprintf. Use
9623 phex to format values.
9625 2014-06-18 Gary Benson <gbenson@redhat.com>
9627 * i386-low.h: Comment changes.
9628 * i386-low.c: Likewise.
9630 2014-06-18 Gary Benson <gbenson@redhat.com>
9632 * i386-low.c: Whitespace changes.
9634 2014-06-12 Tom Tromey <tromey@redhat.com>
9636 * utils.c (freeargv): Remove.
9638 2014-06-12 Tom Tromey <tromey@redhat.com>
9640 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9641 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9642 (parse_debug_format_options): Likewise.
9643 (gdbserver_usage): Likewise.
9644 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9645 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9646 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9648 ($(LIBGNU)): Depend on libiberty.
9649 (all-lib): Recurse into all subdirs.
9650 (install-only): Invoke "install" target in subdirs.
9651 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9653 * configure: Rebuild.
9654 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9655 for vasprintf, vsnprintf, or gettimeofday.
9656 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9659 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9661 * development.sh: Delete.
9662 * Makefile.in (config.status): Adjust dependency on development.sh.
9663 * configure.ac: Adjust development.sh source call.
9664 * configure: Regenerate.
9666 2014-06-02 Pedro Alves <palves@redhat.com>
9668 * ax.c (gdb_free_agent_expr): New function.
9669 * ax.h (gdb_free_agent_expr): New declaration.
9670 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9672 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9674 (clear_breakpoint_conditions_and_commands): New function.
9675 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9676 (clear_breakpoint_conditions_and_commands): New declaration.
9678 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9680 * linux-aarch64-low.c (asm/ptrace.h): Include.
9682 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9684 Fix TLS access for -static -pthread.
9685 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9686 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9687 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9689 2014-05-20 Pedro Alves <palves@redhat.com>
9691 * linux-aarch64-low.c (aarch64_insert_point)
9692 (aarch64_remove_point): No longer check whether the type is
9693 supported here. Adjust to new interface.
9694 (the_low_target): Install aarch64_supports_z_point_type as
9695 supports_z_point_type method.
9696 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9697 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9698 instead of a Z packet char. Adjust.
9699 (arm_supports_z_point_type): New function.
9700 (arm_insert_point, arm_remove_point): Adjust to new interface.
9701 (the_low_target): Install arm_supports_z_point_type.
9702 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9703 (cris_insert_point, cris_remove_point): Adjust to new interface.
9704 Don't check whether the type is supported here.
9705 (the_low_target): Install cris_supports_z_point_type.
9706 * linux-low.c (linux_supports_z_point_type): New function.
9707 (linux_insert_point, linux_remove_point): Adjust to new interface.
9708 * linux-low.h (struct linux_target_ops) <insert_point,
9709 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9710 raw_breakpoint pointer parameter.
9711 <supports_z_point_type>: New method.
9712 * linux-mips-low.c (mips_supports_z_point_type): New function.
9713 (mips_insert_point, mips_remove_point): Adjust to new interface.
9714 Use mips_supports_z_point_type.
9715 (the_low_target): Install mips_supports_z_point_type.
9716 * linux-ppc-low.c (the_low_target): Install NULL as
9717 supports_z_point_type method.
9718 * linux-s390-low.c (the_low_target): Install NULL as
9719 supports_z_point_type method.
9720 * linux-sparc-low.c (the_low_target): Install NULL as
9721 supports_z_point_type method.
9722 * linux-x86-low.c (x86_supports_z_point_type): New function.
9723 (x86_insert_point): Adjust to new insert_point interface. Use
9724 insert_memory_breakpoint. Adjust to new
9725 i386_low_insert_watchpoint interface.
9726 (x86_remove_point): Adjust to remove_point interface. Use
9727 remove_memory_breakpoint. Adjust to new
9728 i386_low_remove_watchpoint interface.
9729 (the_low_target): Install x86_supports_z_point_type.
9730 * lynx-low.c (lynx_target_ops): Install NULL as
9731 supports_z_point_type callback.
9732 * nto-low.c (nto_supports_z_point_type): New.
9733 (nto_insert_point, nto_remove_point): Adjust to new interface.
9734 (nto_target_ops): Install nto_supports_z_point_type.
9735 * mem-break.c: Adjust intro comment.
9736 (struct raw_breakpoint) <raw_type, size>: New fields.
9737 <inserted>: Update comment.
9738 <shlib_disabled>: Delete field.
9739 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9740 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9741 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9742 (raw_bkpt_type_to_target_hw_bp_type): New function.
9743 (find_enabled_raw_code_breakpoint_at): New function.
9744 (find_raw_breakpoint_at): New type and size parameters. Use them.
9745 (insert_memory_breakpoint): New function, based off
9746 set_raw_breakpoint_at.
9747 (remove_memory_breakpoint): New function.
9748 (set_raw_breakpoint_at): Reimplement.
9749 (set_breakpoint): New, based on set_breakpoint_at.
9750 (set_breakpoint_at): Reimplement.
9751 (delete_raw_breakpoint): Go through the_target->remove_point
9752 instead of assuming memory breakpoints.
9753 (find_gdb_breakpoint_at): Delete.
9754 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9755 (find_gdb_breakpoint): New function.
9756 (set_gdb_breakpoint_at): Delete.
9757 (z_type_supported): New function.
9758 (set_gdb_breakpoint_1): New function, loosely based off
9759 set_gdb_breakpoint_at.
9760 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9761 (delete_gdb_breakpoint_at): Delete.
9762 (delete_gdb_breakpoint_1): New function, loosely based off
9763 delete_gdb_breakpoint_at.
9764 (delete_gdb_breakpoint): New function.
9765 (clear_gdb_breakpoint_conditions): Rename to ...
9766 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9768 (add_condition_to_breakpoint): Make static.
9769 (add_breakpoint_condition): Take a struct breakpoint pointer
9770 instead of an address. Adjust.
9771 (gdb_condition_true_at_breakpoint): Rename to ...
9772 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9774 (gdb_condition_true_at_breakpoint): Reimplement.
9775 (add_breakpoint_commands): Take a struct breakpoint pointer
9776 instead of an address. Adjust.
9777 (gdb_no_commands_at_breakpoint): Rename to ...
9778 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9779 parameter. Return true if no breakpoint was found. Change debug
9781 (gdb_no_commands_at_breakpoint): Reimplement.
9782 (run_breakpoint_commands): Rename to ...
9783 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9784 and change return type to boolean.
9785 (run_breakpoint_commands): New function.
9786 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9787 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9788 breakpoint. Go through the_target->remove_point instead of
9789 assuming memory breakpoint.
9790 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9791 software and hardware breakpoints.
9792 (reinsert_raw_breakpoint): Go through the_target->insert_point
9793 instead of assuming memory breakpoint.
9794 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9795 software and hardware breakpoints.
9796 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9797 Check both software and hardware breakpoints.
9798 (validate_inserted_breakpoint): Assert the breakpoint is a
9799 software breakpoint. Set the inserted flag to -1 instead of
9800 setting shlib_disabled.
9801 (delete_disabled_breakpoints): Adjust.
9802 (validate_breakpoints): Only validate software breakpoints.
9803 Adjust to inserted flag change.
9804 (check_mem_read, check_mem_write): Skip breakpoint types other
9805 than software breakpoints. Adjust to inserted flag change.
9806 * mem-break.h (enum raw_bkpt_type): New enum.
9807 (raw_breakpoint, struct process_info): Forward declare.
9808 (Z_packet_to_target_hw_bp_type): Delete declaration.
9809 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9810 (set_gdb_breakpoint, delete_gdb_breakpoint)
9811 (clear_breakpoint_conditions): New declarations.
9812 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9813 (breakpoint_inserted_here): Update comment.
9814 (add_breakpoint_condition, add_breakpoint_commands): Replace
9815 address parameter with a breakpoint pointer parameter.
9816 (gdb_breakpoint_here): Update comment.
9817 (delete_gdb_breakpoint_at): Delete.
9818 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9819 * server.c (process_point_options): Take a struct breakpoint
9820 pointer instead of an address. Adjust.
9821 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9822 delete_gdb_breakpoint.
9823 * spu-low.c (spu_target_ops): Install NULL as
9824 supports_z_point_type method.
9825 * target.h: Include mem-break.h.
9826 (struct target_ops) <prepare_to_access_memory>: Update comment.
9827 <supports_z_point_type>: New field.
9828 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9829 instead of a char. Also take a raw breakpoint pointer.
9830 * win32-arm-low.c (the_low_target): Install NULL as
9831 supports_z_point_type.
9832 * win32-i386-low.c (i386_supports_z_point_type): New function.
9833 (i386_insert_point, i386_remove_point): Adjust to new interface.
9834 (the_low_target): Install i386_supports_z_point_type.
9835 * win32-low.c (win32_supports_z_point_type): New function.
9836 (win32_insert_point, win32_remove_point): Adjust to new interface.
9837 (win32_target_ops): Install win32_supports_z_point_type.
9838 * win32-low.h (struct win32_target_ops):
9839 <supports_z_point_type>: New method.
9840 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9841 instead of a char. Also take a raw breakpoint pointer.
9843 2014-05-20 Pedro Alves <palves@redhat.com>
9845 * mem-break.h: Include break-common.h.
9846 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9847 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9848 (Z_packet_to_target_hw_bp_type): New declaration.
9849 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9850 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9851 (Z_PACKET_ACCESS_WP): Delete macros.
9852 (Z_packet_to_hw_type): Delete function.
9853 * i386-low.h: Don't include break-common.h here.
9854 (Z_packet_to_hw_type): Delete declaration.
9855 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9856 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9857 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9858 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9859 * linux-aarch64-low.c: Don't include break-common.h here.
9860 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9861 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9862 (Z_packet_to_target_hw_bp_type): Delete function.
9863 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9865 (mips_insert_point, mips_remove_point): Use
9866 Z_packet_to_target_hw_bp_type.
9868 2014-05-20 Pedro Alves <palves@redhat.com>
9870 * linux-aarch64-low.c: Include break-common.h.
9871 (enum target_point_type): Delete.
9872 (Z_packet_to_point_type): Rename to ...
9873 (Z_packet_to_target_hw_bp_type): ... this, and return a
9874 target_hw_bp_type instead.
9875 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9876 instead of an enum target_point_type.
9877 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9879 (aarch64_dr_state_insert_one_point)
9880 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9881 (aarch64_handle_aligned_watchpoint)
9882 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9883 Take an enum target_hw_bp_type instead of an enum
9885 (aarch64_supports_z_point_type): New function.
9886 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9887 use Z_packet_to_target_hw_bp_type.
9889 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9891 * configure.ac: Only use -Werror by default when DEVELOPMENT
9893 * configure: Regenerate.
9895 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9897 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9898 * linux-x86-low.c (X86_64_USER_REGS): New.
9899 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9901 2014-04-28 Yao Qi <yao@codesourcery.com>
9903 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9906 2014-04-25 Pedro Alves <palves@redhat.com>
9909 * linux-low.c (linux_attach_fail_reason_string): New function.
9910 (linux_attach_lwp): Delete.
9911 (linux_attach_lwp_1): Rename to ...
9912 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9913 argument. Remove "initial" parameter. Return int instead of
9914 void. Don't error or warn here.
9915 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9916 failure to attach to the tgid. Call warning when failing to
9918 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9919 argument. Remove "initial" parameter. Return int instead of
9920 void. Don't error or warn here.
9921 (linux_attach_fail_reason_string): New declaration.
9922 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9923 interface change. Use linux_attach_fail_reason_string.
9925 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9926 Walfred Tedeschi <walfred.tedeschi@intel.com>
9928 * Makefile.in: Added rules to handle new files
9929 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9930 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9931 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9932 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9933 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9934 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9936 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9937 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9938 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9939 i386/x32-avx512.xml.
9940 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9941 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9942 i386/x32-avx512-linux.xml.
9943 * i387-fp.c (num_avx512_k_registers): New constant for number
9945 (num_avx512_zmmh_low_registers): New constant for number of
9946 lower ZMM registers (0-15).
9947 (num_avx512_zmmh_high_registers): New constant for number of
9948 higher ZMM registers (16-31).
9949 (num_avx512_ymmh_registers): New contant for number of higher
9950 YMM registers (ymm16-31 added by avx521 on x86_64).
9951 (num_avx512_xmm_registers): New constant for number of higher
9952 XMM registers (xmm16-31 added by AVX512 on x86_64).
9953 (struct i387_xsave): Add space for AVX512 registers.
9954 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9955 Add code to handle AVX512 registers.
9956 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9957 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9958 prototypei from generated file.
9959 (tdesc_amd64_avx512_linux): Likewise.
9960 (init_registers_x32_avx512_linux): Likewise.
9961 (tdesc_x32_avx512_linux): Likewise.
9962 (init_registers_i386_avx512_linux): Likewise.
9963 (tdesc_i386_avx512_linux): Likewise.
9964 (x86_64_regmap): Add AVX512 registers.
9965 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9967 (initialize_low_arch): Add code to initialize AVX512 registers.
9969 2014-04-23 Pedro Alves <palves@redhat.com>
9971 * mem-break.c (find_gdb_breakpoint_at): Make static.
9972 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9974 2014-04-23 Pedro Alves <palves@redhat.com>
9976 * i386-low.c: Don't include break-common.h here.
9977 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9978 prototype to take target_hw_bp_type as argument instead of a Z
9980 * i386-low.h: Include break-common.h here.
9981 (Z_packet_to_hw_type): Declare.
9982 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9984 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9985 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9986 (x86_remove_point): Convert the packet number to a
9987 target_hw_bp_type before calling i386_low_remove_watchpoint.
9988 * win32-i386-low.c (i386_insert_point): Convert the packet number
9989 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9990 (i386_remove_point): Convert the packet number to a
9991 target_hw_bp_type before calling i386_low_remove_watchpoint.
9993 2014-04-23 Pedro Alves <palves@redhat.com>
9995 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9997 2014-04-10 Pedro Alves <palves@redhat.com>
9999 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10000 Check if the condition or command is NULL before checking if the
10001 breakpoint is known. On success, return true.
10002 * mem-break.h (add_breakpoint_condition): Document return.
10003 (add_breakpoint_commands): Add describing comment.
10004 * server.c (skip_to_semicolon): New function.
10005 (process_point_options): Use it.
10007 2014-04-09 Pedro Alves <palves@redhat.com>
10009 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10012 2014-02-27 Pedro Alves <palves@redhat.com>
10015 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10017 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10019 (last_thread_of_process_p): Take a PID argument instead of a
10021 (linux_wait_for_lwp): Delete.
10022 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10024 (linux_low_filter_event): New function, party factored out from
10025 linux_wait_for_event.
10026 (linux_wait_for_event): Rename to ...
10027 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10028 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10029 sigsuspend. Check for zombie leaders.
10030 (linux_wait_for_event): Reimplement as wrapper around
10031 linux_wait_for_event_filtered.
10032 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10033 a normal or signal exit is seen, it's the whole process exiting.
10034 (wait_for_sigstop): No longer a for_each_inferior callback.
10035 Rewrite on top of linux_wait_for_event_filtered.
10036 (stop_all_lwps): Call wait_for_sigstop directly.
10037 * server.c (resume, handle_target_event): Handle
10038 TARGET_WAITKIND_NO_RESUMED.
10040 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10042 * win32-low.c (psapi_get_dll_name,
10043 * win32_CreateToolhelp32Snapshot): Delete.
10044 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10045 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10047 (handle_load_dll): Add function description.
10048 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10050 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10052 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10054 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10055 base address when calling win32_add_one_solib.
10056 (handle_load_dll): Delete local variable load_addr.
10057 Remove 0x1000 offset applied to DLL base address when calling
10058 win32_add_one_solib.
10059 (handle_unload_dll): Add comment.
10061 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10063 * win32-low.c (win32_add_all_dlls): Renames
10064 win32_ensure_ntdll_loaded. Rewrite function documentation.
10065 Adjust implementation to always load all DLLs.
10066 Add 0x1000 offset to DLL base address when calling
10067 win32_add_one_solib.
10068 (child_initialization_done): New static global.
10069 (do_initial_child_stuff): Set child_initialization_done to
10070 zero during child initialization, and 1 after. Replace call
10071 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10073 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10074 (handle_unload_dll): Add function documentation.
10075 (get_child_debug_event): Ignore load and unload DLL events
10076 during child initialization.
10078 2014-02-20 Doug Evans <dje@google.com>
10080 Remove global all_lwps.
10081 * inferiors.h (ptid_of): Move here from linux-low.h.
10082 (pid_of, lwpid_of): Ditto.
10083 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10084 parameter is a struct thread_info * now.
10085 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10086 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10087 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10089 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10090 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10091 * linux-arm-low.c (update_registers_callback): Update, "entry"
10092 parameter is a struct thread_info * now.
10093 Fetch lwpid from current_inferior directly.
10094 (arm_insert_point): Pass &all_threads to find_inferior instead of
10096 (arm_remove_point): Ditto.
10097 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10098 (arm_prepare_to_resume): Fetch pid from thread.
10099 (arm_read_description): Fetch lwpid from current_inferior directly.
10100 * linux-low.c (all_lwps): Delete.
10101 (delete_lwp): Delete call to remove_inferior.
10102 (handle_extended_wait): Fetch lwpid from thread.
10103 (add_lwp): Don't set lwp->entry.id. Remove call to
10104 add_inferior_to_list.
10105 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10106 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10107 (kill_one_lwp_callback): Ditto.
10108 (linux_kill): Don't dereference NULL pointer.
10109 Fetch ptid,lwpid from thread.
10110 (get_detach_signal): Fetch ptid from thread.
10111 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10112 Simplify call to regcache_invalidate_thread.
10113 (delete_lwp_callback): Update, "entry" parameter is a
10114 struct thread_info * now. Fetch pid from thread.
10115 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10116 (status_pending_p_callback): Update, "entry" parameter is a
10117 struct thread_info * now. Fetch ptid from thread.
10118 (find_lwp_pid): Update, "entry" parameter is a
10119 struct thread_info * now.
10120 (linux_wait_for_lwp): Fetch pid from thread.
10121 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10122 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10123 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10124 (dequeue_one_deferred_signal): Ditto.
10125 (cancel_breakpoint): Fetch ptid from current_inferior.
10126 (linux_wait_for_event): Pass &all_threads to find_inferior,
10127 not &all_lwps. Fetch ptid, lwpid from thread.
10128 (count_events_callback): Update, "entry" parameter is a
10129 struct thread_info * now.
10130 (select_singlestep_lwp_callback): Ditto.
10131 (select_event_lwp_callback): Ditto.
10132 (cancel_breakpoints_callback): Ditto.
10133 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10135 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10136 (unsuspend_one_lwp): Update, "entry" parameter is a
10137 struct thread_info * now.
10138 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10140 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10141 Fetch lwpid from thread, not lwp.
10142 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10143 Pass &all_threads to find_inferior, not &all_lwps.
10144 (send_sigstop): Fetch lwpid from thread, not lwp.
10145 (send_sigstop_callback): Update, "entry" parameter is a
10146 struct thread_info * now.
10147 (suspend_and_send_sigstop_callback): Ditto.
10148 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10149 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10150 struct thread_info * now.
10151 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10153 (lwp_running): Update, "entry" parameter is a
10154 struct thread_info * now.
10155 (stop_all_lwps): Fetch ptid from thread.
10156 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10157 (linux_resume_one_lwp): Fetch lwpid from thread.
10158 (linux_set_resume_request): Update, "entry" parameter is a
10159 struct thread_info * now. Fetch pid, lwpid from thread.
10160 (resume_status_pending_p): Update, "entry" parameter is a
10161 struct thread_info * now.
10162 (need_step_over_p): Ditto. Fetch lwpid from thread.
10163 (start_step_over): Fetch lwpid from thread.
10164 (linux_resume_one_thread): Update, "entry" parameter is a
10165 struct thread_info * now. Fetch lwpid from thread.
10166 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10167 (proceed_one_lwp): Update, "entry" parameter is a
10168 struct thread_info * now. Fetch lwpid from thread.
10169 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10170 struct thread_info * now.
10171 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10172 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10173 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10175 (regsets_store_inferior_registers): Ditto.
10176 (fetch_register, store_register): Ditto.
10177 (linux_read_memory, linux_write_memory): Ditto.
10178 (linux_request_interrupt): Ditto.
10179 (linux_read_auxv): Ditto.
10180 (linux_xfer_siginfo): Ditto.
10181 (linux_qxfer_spu): Ditto.
10182 (linux_qxfer_libraries_svr4): Ditto.
10183 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10184 moved to inferiors.h.
10186 (get_thread_lwp): Update.
10187 (struct lwp_info): Delete member "entry". Simplify comment for
10189 (all_lwps): Delete.
10190 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10191 current_inferior directly.
10192 (update_watch_registers_callback): Update, "entry" parameter is a
10193 struct thread_info * now. Fetch pid from thread.
10194 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10195 (mips_insert_point): Fetch lwpid from current_inferior.
10196 Pass &all_threads to find_inferior, not &all_lwps.
10197 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10198 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10200 (mips_stopped_data_address): Ditto.
10201 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10203 * linux-tile-low.c (tile_arch_setup): Ditto.
10204 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10205 (update_debug_registers_callback): Update, "entry" parameter is a
10206 struct thread_info * now. Fetch pid from thread.
10207 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10208 Pass &all_threads to find_inferior, not &all_lwps.
10209 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10210 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10211 Pass &all_threads to find_inferior, not &all_lwps.
10212 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10213 (i386_dr_low_get_status): Ditto.
10214 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10215 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10216 (x86_linux_read_description): Ditto.
10217 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10219 2014-02-20 Doug Evans <dje@google.com>
10221 * inferiors.c (get_first_inferior): Fix buglet.
10223 2014-02-19 Doug Evans <dje@google.com>
10225 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10226 * inferiors.c (add_thread): Change result type to struct thread_info *.
10227 All callers updated.
10228 (add_lwp): Call add_thread here instead of in callers.
10229 All callers updated.
10230 * linux-low.h (get_lwp_thread): Rewrite.
10231 (struct lwp_info): New member "thread".
10233 2014-02-19 Doug Evans <dje@google.com>
10235 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10236 All callers updated.
10238 2014-02-19 Doug Evans <dje@google.com>
10240 * inferiors.c (add_thread): Fix whitespace.
10242 2014-02-19 Doug Evans <dje@google.com>
10244 * dll.c (clear_dlls): Replace accessing list implemention details
10246 * gdbthread.h (get_first_thread): Declare.
10247 * inferiors.c (for_each_inferior_with_data): New function.
10248 (get_first_thread): New function.
10249 (find_thread_ptid): Simplify.
10250 (get_first_inferior): New function.
10251 (clear_list): Delete.
10252 (one_inferior_p): New function.
10253 (clear_inferior_list): New function.
10254 (clear_inferiors): Update.
10255 * inferiors.h (for_each_inferior_with_data): Declare.
10256 (clear_inferior_list): Declare.
10257 (one_inferior_p): Declare.
10258 (get_first_inferior): Declare.
10259 * linux-low.c (linux_wait_for_event): Replace accessing list
10260 implemention details with API function.
10261 * server.c (target_running): Ditto.
10262 (accumulate_file_name_length): New function.
10263 (emit_dll_description): New function.
10264 (handle_qxfer_libraries): Replace accessing list implemention
10265 details with API function.
10266 (handle_qxfer_threads_worker): New function.
10267 (handle_qxfer_threads_proper): Replace accessing list implemention
10268 details with API function.
10269 (handle_query): Ditto.
10270 (visit_actioned_threads_callback_ftype): New typedef.
10271 (visit_actioned_threads_data): New struct.
10272 (visit_actioned_threads): Rewrite to be find_inferior callback.
10273 (resume): Call find_inferior.
10274 (handle_status): Replace accessing list implemention
10275 details with API function.
10276 (process_serial_event): Replace accessing list implemention details
10278 * target.c (set_desired_inferior): Replace accessing list implemention
10279 details with API function.
10280 * tracepoint.c (same_process_p): New function.
10281 (gdb_agent_about_to_close): Replace accessing list implemention
10282 details with API function.
10283 * win32-low.c (child_delete_thread): Replace accessing list
10284 implemention details with API function.
10285 (match_dll_by_basename): New function.
10286 (dll_is_loaded_by_basename): New function.
10287 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10288 details call to dll_is_loaded_by_basename.
10290 2014-02-19 Doug Evans <dje@google.com>
10292 * dll.h (struct dll_info): Add comment.
10293 * gdbthread.h (struct thread_info): Add comment.
10294 (current_ptid): Simplify.
10295 * inferiors.c (add_process): Update.
10296 (remove_process): Update.
10297 * inferiors.h (struct process_info): Rename member "head" to "entry".
10298 * linux-low.c (delete_lwp): Update.
10300 (last_thread_of_process_p): Update.
10301 (kill_one_lwp_callback, linux_kill): Update.
10302 (status_pending_p_callback): Update.
10303 (wait_for_sigstop): Update. Simplify read of ptid.
10304 (start_step_over): Update.
10305 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10306 (get_lwp_thread): Update.
10307 (struct lwp_info): Rename member "head" to "entry".
10308 * regcache.h (inferior_list_entry): Delete.
10309 * server.c (kill_inferior_callback): Update.
10310 (detach_or_kill_inferior_callback): Update.
10311 (print_started_pid): Update.
10312 (print_attached_pid): Update.
10313 (process_serial_event): Simplify read of ptid.
10314 * thread-db.c (thread_db_create_event): Update.
10315 (thread_db_get_tls_address): Update.
10316 * win32-low.c (current_inferior_ptid): Simplify.
10318 2014-02-19 Tom Tromey <tromey@redhat.com>
10320 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10322 (target_supports_btrace): Update.
10324 2014-02-14 Yao Qi <yao@codesourcery.com>
10326 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10327 (rsp-low-ipa.o): New target.
10329 2014-02-12 Tom Tromey <tromey@redhat.com>
10331 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10332 convert_ascii_to_int.
10333 * regcache.c (registers_to_string): Likewise.
10334 * remote-utils.c (decode_M_packet): Likewise.
10335 * server.c (process_serial_event): Likewise.
10337 2014-02-12 Tom Tromey <tromey@redhat.com>
10339 * server.c (handle_query, handle_v_run): Use hex2bin, not
10341 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10343 2014-02-12 Tom Tromey <tromey@redhat.com>
10345 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10346 convert_int_to_ascii.
10347 * regcache.c (registers_to_string, collect_register_as_string):
10349 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10351 * server.c (process_serial_event): Likewise.
10352 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10353 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10355 2014-02-12 Tom Tromey <tromey@redhat.com>
10357 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10358 bin2hex, not hexify.
10359 * tracepoint.c (cmd_qtstatus): Likewise.
10361 2014-02-12 Tom Tromey <tromey@redhat.com>
10363 * remote-utils.c (monitor_output): Pass explicit length to
10366 2014-02-12 Tom Tromey <tromey@redhat.com>
10368 * tracepoint.c: Include rsp-low.h.
10369 * server.c: Include rsp-low.h.
10370 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10371 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10373 * remote-utils.c: Include rsp-low.h.
10374 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10375 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10376 (convert_int_to_ascii, convert_ascii_to_int): Move to
10378 * regcache.c: Include rsp-low.h.
10379 * ax.c: Include rsp-low.h.
10380 * Makefile.in (SFILES): Add common/rsp-low.c.
10381 (OBS): Add rsp-low.o.
10382 (rsp-low.o): New target.
10384 2014-02-12 Tom Tromey <tromey@redhat.com>
10386 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10387 Include print-utils.h.
10388 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10389 (plongest, thirty_two, phex_nz): Remove.
10390 * Makefile.in (SFILES): Add common/print-utils.c.
10391 (OBS): Add print-utils.o.
10392 (print-utils-ipa.o): New target.
10393 (print-utils.o): New target.
10394 (IPA_OBJS): Add print-utils-ipa.o.
10396 2014-02-06 Tom Tromey <tromey@redhat.com>
10398 * Makefile.in (SFILES): Fix indentation.
10400 2014-02-05 Doug Evans <dje@google.com>
10402 * linux-low.c (linux_wait_for_event): Improve comment.
10403 (linux_wait_1): Keep current_inferior in sync with event_child.
10405 2014-01-22 Doug Evans <dje@google.com>
10407 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10409 2014-01-22 Doug Evans <dje@google.com>
10411 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10412 * configure: Regenerate.
10413 * config.in: Regenerate.
10414 * Makefile.in (SFILES): Add debug.c.
10415 (OBS): Add debug.o.
10416 * debug.c: New file.
10417 * debug.h: New file.
10418 * linux-aarch64-low.c (*): Update all debugging printfs to use
10419 debug_printf instead of fprintf.
10420 * linux-arm-low.c (*): Ditto.
10421 * linux-cris-low.c (*): Ditto.
10422 * linux-crisv32-low.c (*): Ditto.
10423 * linux-m32r-low.c (*): Ditto.
10424 * linux-sparc-low.c (*): Ditto.
10425 * linux-x86.c (*): Ditto.
10426 * linux-low.c (*): Ditto.
10427 (linux_wait_1): Add calls to debug_enter, debug_exit.
10428 (linux_wait): Remove redundant debugging printf.
10429 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10430 (linux_resume, unstop_all_lwps): Ditto.
10431 * mem-break.c (*): Update all debugging printfs to use
10432 debug_printf instead of fprintf.
10433 * remote-utils.c (*): Ditto.
10434 * thread-db.c (*): Ditto.
10435 * server.c #include <ctype.h>, "gdb_vecs.h".
10436 (debug_threads): Moved to debug.c.
10437 (*): Update all debugging printfs to use debug_printf instead of
10439 (start_inferior): Replace call to fflush with call to debug_flush.
10440 (monitor_show_help): Mention set debug-format.
10441 (parse_debug_format_options): New function.
10442 (handle_monitor_command): Handle "monitor set debug-format".
10443 (gdbserver_usage): Mention --debug-format.
10444 (main): Parse --debug-format.
10445 * server.h (debug_threads): Declaration moved to debug.h.
10446 #include "debug.h".
10447 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10448 trace_debug_1 that uses debug_printf.
10449 (tracepoint_look_up_symbols): Update all debugging printfs to use
10450 debug_printf instead of fprintf.
10452 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10454 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10457 2014-01-17 Pedro Alves <palves@redhat.com>
10460 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10461 defined after including gdb_proc_service.h.
10463 2014-01-16 Doug Evans <dje@google.com>
10465 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10466 (match_dll): Use it.
10468 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10470 * target.h (target_ops) <read_btrace>: Change parameters and
10471 return type to allow error reporting.
10472 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10473 trace reading errors on.
10474 * linux-low.c (linux_low_read_btrace): Pass trace reading
10476 (linux_low_disable_btrace): New.
10478 2014-01-15 Doug Evans <dje@google.com>
10480 * inferiors.c (thread_id_to_gdb_id): Delete.
10481 * inferiors.h (thread_id_to_gdb_id): Delete.
10483 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10485 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10486 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10489 2014-01-08 Pedro Alves <palves@redhat.com>
10491 * server.c (handle_status): Don't discard previous queued stop
10492 replies or thread's pending status here.
10493 (main) <disconnection>: Do it here instead.
10495 2014-01-08 Pedro Alves <palves@redhat.com>
10497 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10498 * server.c (visit_actioned_threads, handle_pending_status): New
10500 (handle_v_cont): Factor out parts to ...
10501 (resume): ... this new function. If in all-stop, and a thread
10502 being resumed has a pending status, report it without actually
10504 (myresume): Adjust to use the new 'resume' function.
10505 (clear_pending_status_callback, set_pending_status_callback)
10506 (find_status_pending_thread_callback): New functions.
10507 (handle_status): Handle the case of multiple threads having
10508 interesting statuses to report. Report threads' real last signal
10509 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10510 with an interesting thread to report the status for, instead of
10511 always reporting the status of the first thread.
10513 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10515 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10516 * gdbreplay.c (gdbreplay_version): Likewise.
10518 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10520 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10521 iov.iov_len with the real length in use.
10523 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10525 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10526 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10527 for all targets that use win32-low.c.
10528 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10529 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10531 2013-12-13 Pedro Alves <palves@redhat.com>
10533 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10534 if equal to TARGET_WAITKIND_LOADED.
10535 * win32-low.c (cached_status): New static global.
10536 (win32_wait): Add declaration.
10537 (do_initial_child_stuff): Flush all initial pending debug events
10538 up to the initial breakpoint.
10539 (win32_wait): If CACHED_STATUS was set, return that instead
10540 of doing a real wait. Remove the code resuming the execution
10541 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10542 during the initial phase. Also remove the code changing
10543 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10544 TARGET_WAITKIND_STOPPED.
10546 2013-12-11 Yao Qi <yao@codesourcery.com>
10548 * notif.c (handle_notif_ack): Return 0 if no notification
10551 2013-11-20 Doug Evans <dje@google.com>
10553 * linux-low.c (linux_set_resume_request): Fix comment.
10555 2013-11-20 Doug Evans <dje@google.com>
10557 * linux-low.c (resume_status_pending_p): Tweak comment.
10559 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10561 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10562 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10563 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10564 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10565 (srv_amd64_regobj): Add amd64-mpx.o.
10566 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10567 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10568 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10569 * i387-fp.c (num_pl_bnd_register) Added constant.
10570 (num_pl_bnd_cfg_registers) Added constant.
10571 (struct i387_xsave) Added reserved area and MPX fields.
10572 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10573 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10575 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10576 (init_registers_amd64_mpx_linux): Declare new function.
10577 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10578 (x86_64_regmap): Add MPX registers.
10579 (x86_linux_read_description): Add MPX case.
10580 (initialize_low_arch): Initialize MPX targets.
10582 2013-11-18 Tom Tromey <tromey@redhat.com>
10584 * configure: Rebuild.
10585 * configure.ac: Don't check for stdlib.h.
10586 * gdbreplay.c: Unconditionally include stdlib.h.
10588 2013-11-18 Tom Tromey <tromey@redhat.com>
10590 * config.in: Rebuild.
10591 * configure: Rebuild.
10592 * configure.ac: Don't use AC_HEADER_DIRENT.
10594 2013-11-18 Tom Tromey <tromey@redhat.com>
10596 * server.h: Don't check HAVE_STRING_H.
10597 * gdbreplay.c: Don't check HAVE_STRING_H.
10598 * configure: Rebuild.
10600 2013-11-18 Tom Tromey <tromey@redhat.com>
10602 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10605 2013-11-08 Tom Tromey <tromey@redhat.com>
10607 * configure, config.in: Rebuild.
10608 * configure.ac: Remove unused configury.
10610 2013-11-08 Tom Tromey <tromey@redhat.com>
10612 * acinclude.m4: Include common.m4, codeset.m4.
10613 * configure, config.in: Rebuild.
10614 * configure.ac: Use GDB_AC_COMMON.
10616 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10618 * linux-s390-low.c (HWCAP_S390_TE): New define.
10619 (s390_arch_setup): Consider the TE field in the HWCAP for
10620 determining 'have_regset_tdb'.
10622 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10625 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10628 2013-10-02 Pedro Alves <palves@redhat.com>
10630 * server.c (process_serial_event): Don't output "GDBserver
10631 exiting" if GDB is connected through stdio.
10632 * target.c (mywait): Likewise, be silent if GDB is connected
10635 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10637 * lynx-low.c (lynx_add_threads_after_attach): New function.
10638 (lynx_attach): Remove call to add_thread. Add call to
10639 lynx_add_threads_after_attach instead.
10641 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10643 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10644 * config.in, configure: Regenerated.
10646 2013-09-18 Yao Qi <yao@codesourcery.com>
10649 * server.c (start_inferior): Clear 'resume_info'.
10651 2013-09-16 Jiong Wang <jiwang@tilera.com>
10653 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10656 2013-09-16 Jiong Wang <jiwang@tilera.com>
10658 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10659 linux-tile-low.o to srv_tgtobj.
10661 2013-09-16 Will Newton <will.newton@linaro.org>
10663 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10666 2013-09-06 Pedro Alves <palves@redhat.com>
10668 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10669 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10670 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10671 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10672 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10673 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10675 2013-09-06 Pedro Alves <palves@redhat.com>
10677 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10678 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10680 2013-09-06 Pedro Alves <palves@redhat.com>
10682 * linux-amd64-ipa.c: Include tracepoint.h.
10683 * linux-i386-ipa.c: Include tracepoint.h.
10685 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10687 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10688 (ps_get_thread_area): New function.
10690 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10692 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10693 (initialize_low_arch): Call init_registers_crisv32 rather than
10694 init_register_crisv32.
10696 2013-09-05 Pedro Alves <palves@redhat.com>
10698 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10700 * hostio.h: ... this new file.
10701 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10702 win32-low.c: Include hostio.h.
10704 2013-09-05 Pedro Alves <palves@redhat.com>
10706 * server.h (gdb_client_data, handler_func, callback_handler_func)
10707 (delete_file_handler, add_file_handler, append_callback_event)
10708 (delete_callback_event, start_event_loop, initialize_event_loop):
10709 Move to event-loop.h and include it.
10710 * event-loop.h: New file.
10712 2013-09-05 Pedro Alves <palves@redhat.com>
10714 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10715 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10716 (loaded_dll, unloaded_dll): Move to ...
10717 * dll.h: ... this new file.
10718 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10720 2013-09-05 Pedro Alves <palves@redhat.com>
10722 * server.h (current_process, get_thread_process, all_processes)
10723 (add_inferior_to_list, for_each_inferior, current_inferior)
10724 (remove_inferior, add_process, remove_process, find_process_pid)
10725 (have_started_inferiors_p, have_attached_inferiors_p)
10726 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10727 (clear_inferiors, find_inferior, find_inferior_id)
10728 (inferior_target_data, set_inferior_target_data)
10729 (inferior_regcache_data, set_inferior_regcache_data): Move to
10730 inferiors.h, and include it.
10731 * inferiors.h: New file.
10733 2013-09-05 Pedro Alves <palves@redhat.com>
10735 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10739 2013-09-05 Pedro Alves <palves@redhat.com>
10741 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10743 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10744 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10745 (handle_tracepoint_general_set, handle_tracepoint_query)
10746 (tracepoint_finished_step, tracepoint_was_hit)
10747 (release_while_stepping_state_list, current_traceframe)
10748 (in_readonly_region, traceframe_read_mem)
10749 (fetch_traceframe_registers, traceframe_read_sdata)
10750 (traceframe_read_info, struct fast_tpoint_collect_status)
10751 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10752 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10753 (supply_fast_tracepoint_registers)
10754 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10755 (ipa_tdesc, claim_trampoline_space)
10756 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10757 (agent_mem_read, agent_get_trace_state_variable_value)
10758 (agent_set_trace_state_variable_value, agent_tsv_read)
10759 (agent_mem_read_string, get_raw_reg_func_addr)
10760 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10761 * tracepoint.h: ... this new file.
10763 2013-09-05 Pedro Alves <palves@redhat.com>
10765 * server.h (perror_with_name, error, fatal, warning, paddress)
10766 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10768 * utils.h: New file.
10770 2013-09-05 Pedro Alves <palves@redhat.com>
10772 * server.h (remote_debug, noack_mode, transport_is_reliable)
10773 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10774 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10775 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10776 (write_enn, initialize_async_io, enable_async_io)
10777 (disable_async_io, check_remote_input_interrupt_request)
10778 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10779 (dead_thread_notify, prepare_resume_reply)
10780 (decode_address_to_semicolon, decode_address, decode_m_packet)
10781 (decode_M_packet, decode_X_packet, decode_xfer_write)
10782 (decode_search_memory_packet, unhexify, hexify)
10783 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10784 (look_up_one_symbol, relocate_instruction)
10785 (monitor_output): Move to remote-utils.h, and include it.
10786 * remote-utils.h: New file.
10788 2013-09-05 Pedro Alves <palves@redhat.com>
10790 * server.h (_): Delete.
10792 2013-09-02 Pedro Alves <palves@redhat.com>
10794 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10795 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10797 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10799 2013-09-02 Pierre Muller <muller@sourceware.org>
10801 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10802 or WriteProcessMemory complete successfully and handle
10803 ERROR_PARTIAL_COPY error.
10805 2013-09-02 Pedro Alves <palves@redhat.com>
10807 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10808 error instead of EIO.
10810 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10813 * linux-low.c: Include filestuff.h.
10814 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10815 * lynx-low.c: Include filestuff.h.
10816 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10817 * server.c: Include filestuff.h.
10818 (main): Call notice_open_fds.
10819 * spu-low.c: Include filestuff.h.
10820 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10822 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10824 * Makefile.in: Explain why ../target and ../nat are not
10825 listed as include file search paths.
10826 (linux-waitpid.o): New object file rule.
10827 * configure.srv (srv_native_linux_obj): New variable.
10828 Replace all occurrences of linux native object files with
10829 $srv_native_linux_obj.
10830 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10831 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10832 (linux_enable_event_reporting): Remove declaration.
10833 (my_waitpid): Moved to common/linux-waitpid.c.
10834 (linux_wait_for_event): Pass ptid when calling
10835 linux_enable_event_reporting.
10836 (linux_supports_tracefork_flag): Remove.
10837 (linux_enable_event_reporting): Likewise.
10838 (linux_tracefork_grandchild): Remove.
10839 (STACK_SIZE): Moved to common/linux-ptrace.c.
10840 (linux_tracefork_child): Remove.
10841 (linux_test_for_tracefork): Remove.
10842 (linux_look_up_symbols): Call linux_supports_traceclone.
10843 (initialize_low): Remove call to linux_test_for_tracefork.
10844 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10845 common/linux-ptrace.h.
10846 (PTRACE_TYPE_ARG4): Likewise.
10847 Include linux-ptrace.h.
10849 2013-08-21 Pedro Alves <palves@redhat.com>
10851 * config.in: Renegerate.
10853 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10855 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10856 (SFILES): Remove $(srcdir)/common/target-common.c and
10857 add $(srcdir)/target/waitstatus.c.
10858 (OBS): Remove target-common.o and add waitstatus.o.
10859 (server_h): Remove $(srcdir)/../common/target-common.h and
10860 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10861 and $(srcdir)/../target/waitstatus.h.
10862 (target-common.o): Remove.
10863 (waitstatus.o): New target object file.
10864 * target.h: Do not include target-common.h and
10865 include target/resume.h, target/wait.h and
10866 target/waitstatus.h.
10868 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10870 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10871 to PTRACE_TYPE_ARG3.
10872 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10873 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10875 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10876 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10878 2013-07-27 Jie Zhang <jie@codesourcery.com>
10879 Daniel Jacobowitz <dan@codesourcery.com>
10880 Yao Qi <yao@codesourcery.com>
10882 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10883 (mips-linux-watch.o): New rule.
10884 (mips_linux_watch_h): New variable.
10885 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10887 * linux-mips-low.c: Include mips-linux-watch.h.
10888 (struct arch_process_info, struct arch_lwp_info): New.
10889 (update_watch_registers_callback): New function.
10890 (mips_linux_new_process, mips_linux_new_thread) New functions.
10891 (mips_linux_prepare_to_resume, mips_insert_point): New
10893 (mips_remove_point, mips_stopped_by_watchpoint): New
10895 (rsp_bp_type_to_target_hw_bp_type): New function.
10896 (mips_stopped_data_address): New function.
10897 (the_low_target): Add watchpoint support functions.
10899 2013-07-27 Yao Qi <yao@codesourcery.com>
10901 * i386-low.c: Include break-common.h.
10902 (enum target_hw_bp_type): Remove.
10904 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10906 * Makefile.in (SFILES): /common/target-common.c.
10907 (OBS): Add target-common.o.
10908 (server_h): Add $(srcdir)/../common/target-common.h.
10909 (target-common.o): New target.
10910 * server.c (queue_stop_reply_callback): Free
10911 status string after use.
10912 * target.c (target_waitstatus_to_string): Remove.
10913 * target.h: Include target-common.h.
10914 (resume_kind): Likewise.
10915 (target_waitkind): Likewise.
10916 (target_waitstatus): Likewise.
10917 (TARGET_WNOHANG): Likewise.
10919 2013-07-04 Yao Qi <yao@codesourcery.com>
10921 * Makefile.in (host_alias): Use @host_noncanonical@.
10922 (target_alias): Use @target_noncanonical@.
10923 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10924 ACX_NONCANONICAL_HOST.
10925 * configure: Regenerated.
10928 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10930 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10931 * configure: Rebuild.
10932 * Makefile.in (version_host, version_target): Get from configure.
10933 (version.c): Use $(version_host) and $(version_target).
10935 2013-07-03 Pedro Alves <palves@redhat.com>
10937 * Makefile.in (config.status): Depend on development.sh.
10938 * acinclude.m4: Include libmcheck.m4.
10939 * configure: Regenerate.
10941 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10943 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10944 attribute inside the parentheses.
10945 (winapi_DebugSetProcessKillOnExit): Ditto.
10946 (winapi_DebugBreakProcess): Ditto.
10947 (winapi_GenerateConsoleCtrlEvent): Ditto.
10949 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10951 * notif.h (notif_event): Add a dummy member to avoid compiler
10954 2013-07-01 Pedro Alves <palves@redhat.com>
10956 * hostio.c (HOSTIO_PATH_MAX): Define.
10957 (require_filename, handle_open, handle_unlink, handle_readlink):
10960 2013-07-01 Pedro Alves <palves@redhat.com>
10962 * server.h: Include "pathmax.h".
10963 * linux-low.c: Don't include sys/param.h.
10964 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10966 * win32-low.c: Don't include sys/param.h.
10967 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10969 2013-07-01 Pedro Alves <palves@redhat.com>
10971 * event-loop.c: Don't check HAVE_UNISTD_H before including
10973 * gdbreplay.c: Likewise.
10974 * remote-utils.c: Likewise.
10975 * server.c: Likewise.
10976 * configure.ac: Don't check for unistd.h.
10977 * configure: Regenerate.
10979 2013-06-28 Tom Tromey <tromey@redhat.com>
10981 * Makefile.in (version.c): Use version.in, not
10984 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10986 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10987 * configure: Rebuild.
10988 * Makefile.in (version_host, version_target): Get from configure.
10989 (version.c): Use $(version_host) and $(version_target).
10991 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10993 Fix trace-status to output user name without trailing colon.
10994 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10996 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10998 Fix trace-status to output proper start-time and stop-time.
10999 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11000 output start time and stop time in hex as gdb expects.
11002 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11004 * tracepoint.c (build_traceframe_info_xml): Output trace state
11005 variables present in the trace buffer.
11007 2013-06-24 Tom Tromey <tromey@redhat.com>
11009 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11011 (version.o): Remove.
11012 * gdbreplay.c: Include version.h.
11013 (version, host_name): Don't declare.
11014 * server.h: Include version.h.
11015 (version, host_name): Don't declare.
11017 2013-06-12 Pedro Alves <palves@redhat.com>
11019 * linux-x86-low.c (linux_is_elf64): Delete global.
11020 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11021 with local linux_pid_exe_is_elf_64_file use.
11023 2013-06-11 Pedro Alves <palves@redhat.com>
11025 * linux-low.c (regset_disabled, disable_regset): New functions.
11026 (regsets_fetch_inferior_registers)
11027 (regsets_store_inferior_registers): Use them.
11028 (initialize_regsets_info); Don't allocate the disabled_regsets
11030 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11033 2013-06-11 Pedro Alves <palves@redhat.com>
11035 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11038 2013-06-11 Pedro Alves <palves@redhat.com>
11040 * linux-x86-low.c (initialize_low_arch): Call
11041 init_registers_x32_avx_linux.
11043 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11045 Fix compatibility with Android Bionic.
11046 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11049 2013-06-07 Pedro Alves <palves@redhat.com>
11052 * Makefile.in (OBS): Add tdesc.o.
11053 (IPA_OBJS): Add tdesc-ipa.o.
11054 (tdesc-ipa.o): New rule.
11055 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11057 * linux-low.c (new_inferior): Delete.
11058 (disabled_regsets, num_regsets): Delete.
11059 (linux_add_process): Adjust to set the new per-process
11061 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11062 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11063 was a stop. When calling arch_setup, switch the current inferior
11064 to the thread that got an event.
11065 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11066 (regsets_fetch_inferior_registers)
11067 (regsets_store_inferior_registers): New regsets_info parameter.
11069 (linux_register_in_regsets): New regs_info parameter. Adjust to
11071 (register_addr, fetch_register, store_register): New usrregs_info
11072 parameter. Adjust to use it.
11073 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11074 parameter regs_info. Adjust to use it.
11075 (linux_fetch_registers): Get the current inferior's regs_info, and
11077 (linux_store_registers): Ditto.
11078 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11079 (initialize_low): Don't initialize the target_regsets here. Call
11080 initialize_low_arch.
11081 * linux-low.h (target_regsets): Delete declaration.
11082 (struct regsets_info): New.
11083 (struct usrregs_info): New.
11084 (struct regs_info): New.
11085 (struct process_info_private) <new_inferior>: New field.
11086 (struct linux_target_ops): Delete the num_regs, regmap, and
11087 regset_bitmap fields. New field regs_info.
11088 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11089 * i387-fp.c (num_xmm_registers): Delete.
11090 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11091 calls to new interface.
11092 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11093 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11094 Infer the number of xmm registers from the regcache's target
11096 * i387-fp.h (num_xmm_registers): Delete.
11097 * inferiors.c (add_thread): Don't install the thread's regcache
11099 * proc-service.c (gregset_info): Fetch the current inferior's
11100 regs_info. Adjust to use it.
11101 * regcache.c: Include tdesc.h.
11102 (register_bytes, reg_defs, num_registers)
11103 (gdbserver_expedite_regs): Delete.
11104 (get_thread_regcache): If the thread doesn't have a regcache yet,
11105 create one, instead of aborting gdbserver.
11106 (regcache_invalidate_one): Rename to ...
11107 (regcache_invalidate_thread): ... this.
11108 (regcache_invalidate_one): New.
11109 (regcache_invalidate): Only invalidate registers of the current
11111 (init_register_cache): Add target_desc parameter, and use it.
11112 (new_register_cache): Ditto. Assert the target description has a
11113 non zero registers_size.
11114 (regcache_cpy): Add assertions. Adjust.
11115 (realloc_register_cache, set_register_cache): Delete.
11116 (registers_to_string, registers_from_string): Adjust.
11117 (find_register_by_name, find_regno, find_register_by_number)
11118 (register_cache_size): Add target_desc parameter, and use it.
11119 (free_register_cache_thread, free_register_cache_thread_one)
11120 (regcache_release, register_cache_size): New.
11121 (register_size): Add target_desc parameter, and use it.
11122 (register_data, supply_register, supply_register_zeroed)
11123 (supply_regblock, supply_register_by_name, collect_register)
11124 (collect_register_as_string, collect_register_by_name): Adjust.
11125 * regcache.h (struct target_desc): Forward declare.
11126 (struct regcache) <tdesc>: New field.
11127 (init_register_cache, new_register_cache): Add target_desc
11129 (regcache_invalidate_thread): Declare.
11130 (regcache_invalidate_one): Delete declaration.
11131 (regcache_release): Declare.
11132 (find_register_by_number, register_cache_size, register_size)
11133 (find_regno): Add target_desc parameter.
11134 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11136 * remote-utils.c: Include tdesc.h.
11137 (outreg, prepare_resume_reply): Adjust.
11138 * server.c: Include tdesc.h.
11139 (gdbserver_xmltarget): Delete declaration.
11140 (get_features_xml, process_serial_event): Adjust.
11141 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11143 (struct process_info) <tdesc>: New field.
11144 (ipa_tdesc): Declare.
11145 * tdesc.c: New file.
11146 * tdesc.h: New file.
11147 * tracepoint.c: Include tdesc.h.
11148 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11149 (get_context_regcache): Adjust to pass ipa_tdesc down.
11150 (do_action_at_tracepoint): Adjust to get the register cache size
11151 from the context regcache's description.
11152 (traceframe_walk_blocks): Adjust to get the register cache size
11153 from the current trace frame's description.
11154 (traceframe_get_pc): Adjust to get current trace frame's
11155 description and pass it down.
11156 (gdb_collect): Adjust to get the register cache size from the
11158 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11159 (gdbserver_xmltarget): Delete.
11160 (initialize_low_tracepoint): Set the ipa's target description.
11161 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11162 (initialize_low_tracepoint): Set the ipa's target description.
11163 * linux-x86-low.c: Include tdesc.h.
11164 [__x86_64__] (is_64bit_tdesc): New.
11165 (ps_get_thread_area, x86_get_thread_area): Use it.
11166 (i386_cannot_store_register): Rename to ...
11167 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11168 (i386_cannot_fetch_register): Rename to ...
11169 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11170 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11172 (target_regsets): Rename to ...
11173 (x86_regsets): ... this.
11174 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11176 (x86_siginfo_fixup): Use is_64bit_tdesc.
11177 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11178 (tdesc_x32_avx_linux, tdesc_x32_linux)
11179 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11181 (x86_linux_update_xmltarget): Delete.
11182 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11183 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11184 (AMD64_LINUX_USER64_CS): New.
11185 (x86_linux_read_description): New, based on
11186 x86_linux_update_xmltarget.
11187 (same_process_callback): New.
11188 (x86_arch_setup_process_callback): New.
11189 (x86_linux_update_xmltarget): New.
11190 (x86_regsets_info): New.
11191 (amd64_linux_regs_info): New.
11192 (i386_linux_usrregs_info): New.
11193 (i386_linux_regs_info): New.
11194 (x86_linux_regs_info): New.
11195 (x86_arch_setup): Reimplement.
11196 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11197 (x86_emit_ops): Ditto.
11198 (the_low_target): Adjust. Install x86_linux_regs_info,
11199 x86_cannot_fetch_register, and x86_cannot_store_register.
11200 (initialize_low_arch): New.
11201 * linux-ia64-low.c (tdesc_ia64): Declare.
11202 (ia64_fetch_register): Adjust.
11203 (ia64_usrregs_info, regs_info): New globals.
11204 (ia64_regs_info): New function.
11205 (the_low_target): Adjust.
11206 (initialize_low_arch): New function.
11207 * linux-sparc-low.c (tdesc_sparc64): Declare.
11208 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11210 (sparc_arch_setup): New function.
11211 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11212 (the_low_target): Adjust.
11213 (initialize_low_arch): New function.
11214 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11215 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11216 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11217 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11218 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11219 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11220 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11221 (tdesc_powerpc_isa205_vsx64l): Declare.
11222 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11223 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11224 (ppc_set_pc, ppc_get_hwcap): Adjust.
11225 (ppc_usrregs_info): Forward declare.
11226 (!__powerpc64__) ppc_regmap_adjusted: New global.
11227 (ppc_arch_setup): Adjust to the current process'es target
11229 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11230 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11231 (ppc_store_evrregset): Adjust.
11232 (target_regsets): Rename to ...
11233 (ppc_regsets): ... this, and make static.
11234 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11235 (ppc_regs_info): New function.
11236 (the_low_target): Adjust.
11237 (initialize_low_arch): New function.
11238 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11239 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11240 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11241 (tdesc_s390x_linux64v2): Declare.
11242 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11243 (s390_fill_gregset, s390_store_last_break): Adjust.
11244 (target_regsets): Rename to ...
11245 (s390_regsets): ... this, and make static.
11246 (s390_get_pc, s390_set_pc): Adjust.
11247 (s390_get_hwcap): New target_desc parameter, and use it.
11248 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11249 (s390_arch_setup): Adjust to set the current process'es target
11250 description. Don't adjust the regmap.
11251 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11252 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11253 (regs_info_3264): New globals.
11254 (s390_regs_info): New function.
11255 (the_low_target): Adjust.
11256 (initialize_low_arch): New function.
11257 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11258 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11259 [__mips64] (init_registers_mips_linux)
11260 (init_registers_mips_dsp_linux): Delete defines.
11261 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11262 (have_dsp): New global.
11263 (mips_read_description): New, based on mips_arch_setup.
11264 (mips_arch_setup): Reimplement.
11265 (get_usrregs_info): New function.
11266 (mips_cannot_fetch_register, mips_cannot_store_register)
11267 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11268 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11269 (target_regsets): Rename to ...
11270 (mips_regsets): ... this, and make static.
11271 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11272 (dsp_regs_info, regs_info): New globals.
11273 (mips_regs_info): New function.
11274 (the_low_target): Adjust.
11275 (initialize_low_arch): New function.
11276 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11277 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11279 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11280 (arm_read_description): New, with bits factored from
11282 (arm_arch_setup): Reimplement.
11283 (target_regsets): Rename to ...
11284 (arm_regsets): ... this, and make static.
11285 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11286 (arm_regs_info): New function.
11287 (the_low_target): Adjust.
11288 (initialize_low_arch): New function.
11289 * linux-m68k-low.c (tdesc_m68k): Declare.
11290 (target_regsets): Rename to ...
11291 (m68k_regsets): ... this, and make static.
11292 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11293 (m68k_regs_info): New function.
11294 (m68k_arch_setup): New function.
11295 (the_low_target): Adjust.
11296 (initialize_low_arch): New function.
11297 * linux-sh-low.c (tdesc_sharch): Declare.
11298 (target_regsets): Rename to ...
11299 (sh_regsets): ... this, and make static.
11300 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11301 (sh_regs_info, sh_arch_setup): New functions.
11302 (the_low_target): Adjust.
11303 (initialize_low_arch): New function.
11304 * linux-bfin-low.c (tdesc_bfin): Declare.
11305 (bfin_arch_setup): New function.
11306 (bfin_usrregs_info, regs_info): New globals.
11307 (bfin_regs_info): New function.
11308 (the_low_target): Adjust.
11309 (initialize_low_arch): New function.
11310 * linux-cris-low.c (tdesc_cris): Declare.
11311 (cris_arch_setup): New function.
11312 (cris_usrregs_info, regs_info): New globals.
11313 (cris_regs_info): New function.
11314 (the_low_target): Adjust.
11315 (initialize_low_arch): New function.
11316 * linux-cris-low.c (tdesc_crisv32): Declare.
11317 (cris_arch_setup): New function.
11318 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11319 (cris_regs_info): New function.
11320 (the_low_target): Adjust.
11321 (initialize_low_arch): New function.
11322 * linux-m32r-low.c (tdesc_m32r): Declare.
11323 (m32r_arch_setup): New function.
11324 (m32r_usrregs_info, regs_info): New globals.
11325 (m32r_regs_info): Adjust.
11326 (initialize_low_arch): New function.
11327 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11328 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11329 (tic6x_usrregs_info): Forward declare.
11330 (tic6x_read_description): New function, based on ...
11331 (tic6x_arch_setup): ... this. Reimplement.
11332 (target_regsets): Rename to ...
11333 (tic6x_regsets): ... this, and make static.
11334 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11335 (tic6x_regs_info): New function.
11336 (the_low_target): Adjust.
11337 (initialize_low_arch): New function.
11338 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11339 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11340 (target_regsets): Rename to ...
11341 (xtensa_regsets): ... this, and make static.
11342 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11344 (xtensa_arch_setup, xtensa_regs_info): New functions.
11345 (the_low_target): Adjust.
11346 (initialize_low_arch): New function.
11347 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11348 (nios2_arch_setup): Set the current process'es tdesc.
11349 (target_regsets): Rename to ...
11350 (nios2_regsets): ... this.
11351 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11352 (nios2_regs_info): New function.
11353 (the_low_target): Adjust.
11354 (initialize_low_arch): New function.
11355 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11356 (aarch64_arch_setup): Set the current process'es tdesc.
11357 (target_regsets): Rename to ...
11358 (aarch64_regsets): ... this.
11359 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11360 (aarch64_regs_info): New function.
11361 (the_low_target): Adjust.
11362 (initialize_low_arch): New function.
11363 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11365 (target_regsets): Rename to ...
11366 (tile_regsets): ... this.
11367 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11368 (tile_regs_info): New function.
11369 (tile_arch_setup): Set the current process'es tdesc.
11370 (the_low_target): Adjust.
11371 (initialize_low_arch): New function.
11372 * spu-low.c (tdesc_spu): Declare.
11373 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11374 * win32-arm-low.c (tdesc_arm): Declare.
11375 (arm_arch_setup): New function.
11376 (the_low_target): Install arm_arch_setup instead of
11377 init_registers_arm.
11378 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11379 (init_windows_x86): Rename to ...
11380 (i386_arch_setup): ... this. Set `win32_tdesc'.
11381 (the_low_target): Adjust.
11382 * win32-low.c (win32_tdesc): New global.
11383 (child_add_thread): Don't create the thread cache here.
11384 (do_initial_child_stuff): Set the new process'es tdesc.
11385 * win32-low.h (struct target_desc): Forward declare.
11386 (win32_tdesc): Declare.
11387 * lynx-i386-low.c (tdesc_i386): Declare global.
11388 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11389 * lynx-low.c (lynx_tdesc): New global.
11390 (lynx_add_process): Set the new process'es tdesc.
11391 * lynx-low.h (struct target_desc): Forward declare.
11392 (lynx_tdesc): Declare global.
11393 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11394 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11395 * nto-low.c (nto_tdesc): New global.
11396 (do_attach): Set the new process'es tdesc.
11397 * nto-low.h (struct target_desc): Forward declare.
11398 (nto_tdesc): Declare.
11399 * nto-x86-low.c (tdesc_i386): Declare.
11400 (nto_x86_arch_setup): Set `nto_tdesc'.
11402 2013-06-04 Gary Benson <gbenson@redhat.com>
11404 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11405 to qSupported response when appropriate.
11406 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11407 with nonzero-length annex.
11408 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11409 arguments supplied in annex.
11411 2013-05-31 Doug Evans <dje@google.com>
11414 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11415 64 bits in 64-cross-32 environment.
11417 2013-05-28 Pedro Alves <palves@redhat.com>
11419 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11420 (aarch64-without-fpu.c): Delete rule.
11421 * configure.srv (aarch64*-*-linux*): Remove references to
11422 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11423 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11426 2013-05-24 Pedro Alves <palves@redhat.com>
11428 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11429 instead of strchr/decode_address. Error if the range isn't split
11430 with a ','. Don't assume there's be a ':' in the action.
11432 2013-05-23 Yao Qi <yao@codesourcery.com>
11433 Pedro Alves <palves@redhat.com>
11435 * linux-low.c (lwp_in_step_range): New function.
11436 (linux_wait_1): If the thread was range stepping and stopped
11437 outside the stepping range, report the stop to GDB. Otherwise,
11438 continue stepping. Add range stepping debug output.
11439 (linux_set_resume_request): Copy the step range from the resume
11440 request to the lwp.
11441 (linux_supports_range_stepping): New.
11442 (linux_target_ops) <supports_range_stepping>: Set to
11443 linux_supports_range_stepping.
11444 * linux-low.h (struct linux_target_ops)
11445 <supports_range_stepping>: New field.
11446 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11447 * linux-x86-low.c (x86_supports_range_stepping): New.
11448 (the_low_target) <supports_range_stepping>: Set to
11449 x86_supports_range_stepping.
11450 * server.c (handle_v_cont): Handle 'r' action.
11451 (handle_v_requests): Append ";r" if the target supports range
11453 * target.h (struct thread_resume) <step_range_start,
11454 step_range_end>: New fields.
11455 (struct target_ops) <supports_range_stepping>:
11457 (target_supports_range_stepping): New macro.
11459 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11461 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11462 confusion in comment.
11464 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11466 * lynx-low.c (struct process_info_private): New type.
11467 (lynx_add_process): New function.
11468 (lynx_create_inferior, lynx_attach): Replace calls to
11469 add_process by calls to lynx_add_process.
11470 (lynx_resume): If PTID is null, then try using
11471 current_process()->private->last_wait_event_ptid.
11473 (lynx_clear_inferiors): Delete. The contents of that function
11474 has been inlined in lynx_mourn;
11475 (lynx_wait_1): Save the ptid in the process's private data.
11476 (lynx_mourn): Free the process' private data. Replace call
11477 to lynx_clear_inferiors by call to clear_inferiors.
11479 2013-05-17 Yao Qi <yao@codesourcery.com>
11481 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11484 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11486 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11487 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11488 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11489 PT_TEXT_END_ADDR guards. Update comments.
11490 (linux_target_op) <read_offsets>: Conditionally define to
11491 linux_read_offsets if the target is UCLIBC and if it defines
11492 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11494 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11495 Andrew Jenner <andrew@codesourcery.com>
11497 * Makefile.in (SFILES): Add linux-nios2-low.c.
11498 (clean): Add action to delete nios2-linux.c.
11499 (nios2-linux.c): New rule.
11500 * configure.srv: Add nios2*-*-linux*.
11501 * linux-nios2-low.c: New.
11503 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11505 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11507 2013-04-25 Hui Zhu <hui@codesourcery.com>
11510 * ax.c (ax_printf): Add fflush.
11512 2013-04-22 Tom Tromey <tromey@redhat.com>
11514 * Makefile.in (SFILES): Add filestuff.c.
11515 (OBS): Add filestuff.o.
11516 (filestuff.o): New target.
11517 * config.in, configure: Rebuild.
11518 * configure.ac: Check for fdwalk, pipe2.
11520 2013-04-17 Pedro Alves <palves@redhat.com>
11522 * configure.ac (USE_THREAD_DB): Delete variable.
11523 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11524 Don't AC_SUBST USE_THREAD_DB.
11525 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11526 * config.in, configure: Regenerate.
11528 2013-04-16 Pedro Alves <palves@redhat.com>
11530 * linux-low.h (struct lwp_info) <thread_known>: Move under
11531 the USE_THREAD_DB #ifdef.
11533 2013-04-16 Pedro Alves <palves@redhat.com>
11535 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11536 (linux-low.o): Delete rule.
11537 * linux-low.h: Always include "gdb_thread_db.h" instead of
11538 conditionally including thread_db.h.
11539 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11542 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11544 * Makefile.in (install-only): Fix make install regression.
11546 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11548 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11549 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11551 * gdbserver.1: Remove.
11553 2013-03-22 Pedro Alves <palves@redhat.com>
11555 * linux-low.c (handle_extended_wait): Don't call
11556 linux_enable_event_reporting.
11558 2013-03-15 Tony Theodore <tonyt@logyst.com>
11561 * Makefile.in (SHELL): Use @SHELL@.
11563 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11565 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11568 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11570 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11571 Remove extraneous NULL element.
11573 2013-03-13 Yao Qi <yao@codesourcery.com>
11575 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11576 'V' block in trace frame.
11578 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11580 * target.h (struct target_ops): Add btrace ops.
11581 (target_supports_btrace): New macro.
11582 (target_enable_btrace): New macro.
11583 (target_disable_btrace): New macro.
11584 (target_read_btrace): New macro.
11585 * gdbthread.h (struct thread_info): Add btrace field.
11586 * server.c: Include btrace-common.h.
11587 (handle_btrace_general_set): New function.
11588 (handle_btrace_enable): New function.
11589 (handle_btrace_disable): New function.
11590 (handle_general_set): Call handle_btrace_general_set.
11591 (handle_qxfer_btrace): New function.
11592 (struct qxfer qxfer_packets[]): Add btrace entry.
11593 * inferiors.c (remove_thread): Disable btrace.
11594 * linux-low: Include linux-btrace.h.
11595 (linux_low_enable_btrace): New function.
11596 (linux_low_read_btrace): New function.
11597 (linux_target_ops): Add btrace ops.
11598 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11599 Add srv_linux_btrace=yes.
11600 (x86_64-*-linux*): Add linux-btrace.o.
11601 Add srv_linux_btrace=yes.
11602 * configure.ac: Define HAVE_LINUX_BTRACE.
11603 * config.in: Regenerated.
11604 * configure: Regenerated.
11606 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11608 * server.c (handle_qxfer): Preserve error message if -3 is
11610 (qxfer): Document the -3 return value.
11612 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11614 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11615 (linux_btrace_h): New variable.
11616 (linux-btrace.o): New rule.
11618 2013-03-08 Stan Shebs <stan@codesourcery.com>
11619 Hafiz Abid Qadeer <abidh@codesourcery.com>
11621 * tracepoint.c (trace_buffer_size): New global.
11622 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11623 (init_trace_buffer): Change to one-argument function. Allocate
11624 trace buffer memory.
11625 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11626 handle QTBuffer:size packet.
11627 (cmd_bigqtbuffer_size): New function.
11628 (initialize_tracepoint): Call init_trace_buffer with
11629 DEFAULT_TRACE_BUFFER_SIZE.
11630 * server.c (handle_query): Add QTBuffer:size in the
11633 2013-03-07 Yao Qi <yao@codesourcery.com>
11635 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11636 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11638 (cmd_qtsp): Adjust condition. Do post increment.
11639 Set cur_action and cur_step_action back to 0.
11641 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11644 * linux-low.c (linux_write_memory): Return early success if LEN is
11647 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11649 * configure.srv: Add x86_64-*-cygwin* as target.
11651 2013-02-28 Tom Tromey <tromey@redhat.com>
11653 * configure.ac: Invoke AC_SYS_LARGEFILE.
11654 * configure, config.in: Rebuild.
11656 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11658 * win32-low.c: Throughout, fix format strings and casts of
11659 printf-like functions to avoid type related warnings on all
11661 (get_child_debug_event): Print dwDebugEventCode as hex since
11662 that's how it's usually documented.
11664 2013-02-28 Yao Qi <yao@codesourcery.com>
11666 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11669 2013-02-27 Jiong Wang <jiwang@tilera.com>
11671 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11672 (reg-tilegx32.c): New rule.
11673 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11674 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11675 different register info initializer according to elf class.
11676 (init_registers_tilgx32): New function. The tilegx32 register info
11678 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11679 (tile_store_gregset): Likewise.
11681 2013-02-27 Yao Qi <yao@codesourcery.com>
11683 * server.c (process_point_options): Print debug message when
11684 debug_threads is true.
11686 2013-02-26 Yao Qi <yao@codesourcery.com>
11688 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11690 2013-02-19 Pedro Alves <palves@redhat.com>
11691 Kai Tietz <ktietz@redhat.com>
11695 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11696 instead of strtoul to extract address from packet.
11697 (process_serial_event) <'z'>: Likewise.
11699 2013-02-18 Yao Qi <yao@codesourcery.com>
11701 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11703 2013-02-14 Pedro Alves <palves@redhat.com>
11707 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11708 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11710 2013-02-14 Pedro Alves <palves@redhat.com>
11712 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11714 2013-02-14 Pedro Alves <palves@redhat.com>
11716 * tracepoint.c (save_string): Delete.
11717 (add_tracepoint_action): Use savestring instead of save_string.
11719 2013-02-12 Pedro Alves <palves@redhat.com>
11721 * linux-xtensa-low.c: Ditto.
11722 * xtensa-xtregs.c: Ditto.
11724 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11726 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11729 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11731 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11732 aarch64_num_wp_regs and aarch64_num_bp_regs to
11733 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11735 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11737 * linux-aarch64-low.c (ps_get_thread_area): Replace
11738 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11740 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11741 Marcus Shawcroft <marcus.shawcroft@arm.com>
11742 Nigel Stephens <nigel.stephens@arm.com>
11743 Yufeng Zhang <yufeng.zhang@arm.com>
11745 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11746 (aarch64.c, aarch64-without-fpu.c): New targets.
11747 * configure.srv (aarch64*-*-linux*): New.
11748 * linux-aarch64-low.c: New file.
11750 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11752 * linux-low.c (handle_extended_wait, linux_create_inferior)
11753 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11754 (dequeue_one_deferred_signal, linux_resume_one_thread)
11755 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11756 (linux_tracefork_grandchild, linux_test_for_tracefork)
11757 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11758 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11759 where the argument is 0.
11761 2013-01-25 Yao Qi <yao@codesourcery.com>
11763 * event-loop.c: Include "queue.h".
11764 (gdb_event_p): New typedef.
11765 (struct gdb_event) <next_event>: Remove.
11766 (event_queue): Change to QUEUE(gdb_event_p).
11767 (async_queue_event): Remove.
11768 (gdb_event_xfree): New.
11769 (initialize_event_loop): New.
11770 (process_event): Use API from QUEUE.
11771 (wait_for_event): Likewise.
11772 * server.c (main): Call initialize_event_loop.
11773 * server.h (initialize_event_loop): Declare.
11775 2013-01-18 Yao Qi <yao@codesourcery.com>
11777 * ax.h (struct eval_agent_expr_context): New.
11778 (gdb_eval_agent_expr): Update declaration.
11779 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11780 TFRAME. Add new argument CTX.
11781 * server.h (struct eval_agent_expr_context): Declare.
11782 (agent_mem_read, agent_tsv_read): Update declaration.
11783 (agent_mem_read_string): Likewise.
11784 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11785 (add_traceframe_block): Add new argument TPOINT.
11786 Increase TPOINT->traceframe_usage.
11787 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11788 eval_tracepoint_agent_expr.
11789 (condition_true_at_tracepoint): Likewise.
11790 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11791 (agent_mem_read_string, agent_tsv_read): Likewise.
11793 2013-01-16 Yao Qi <yao@codesourcery.com>
11795 * linux-low.c (linux_resume_one_lwp): Don't check
11796 'lwp->bp_reinsert != 0'.
11798 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11799 Pedro Alves <palves@redhat.com>
11801 * lynx-low.c (ptrace_request_to_str): Define a temporary
11802 macro and use it to simplify this function's implementation.
11804 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11806 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11809 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11811 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11813 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11815 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11817 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11819 * lynx-low.c (lynx_resume): Use the resume_info parameter
11820 to determine the ptid for the lynx_ptrace call, unless
11821 it is equal to minus_one_ptid, in which case we use the
11822 ptid of the current_inferior.
11823 (lynx_wait_1): After having received a thread create/exit
11824 event, resume the inferior's execution using the signaling
11825 thread's ptid, rather than the old ptid.
11827 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11829 * lynx-low.c (lynx_resume): Delete variable ret.
11831 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11833 * gdbreplay.c (gdbreplay_version): Update copyright year.
11834 * server.c (gdbserver_version): Likewise.
11836 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11838 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11841 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11843 * lynx-low.c (ptrace_request_to_str): Add handling for
11844 PTRACE_GETTRACESIG.
11846 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11848 * lynx-low.c (lynx_attach): Delete variable new_process.
11850 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11852 * lynx-low.c (lynx_create_inferior): Delete variable
11855 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11857 * lynx-low.c (ptrace_request_to_str): Do not handle
11858 PTRACE_GETTHREADLIST if this macro does not exist.
11860 2012-12-15 Yao Qi <yao@codesourcery.com>
11862 * Makefile.in (OBS): Add notif.o.
11863 * notif.c, notif.h: New.
11864 * server.c: Include "notif.h".
11865 (struct vstop_notif) <next>: Remove.
11867 (queue_stop_reply): Update.
11868 (push_event, send_next_stop_reply): Remove.
11869 (discard_queued_stop_replies): Update.
11870 (notif_stop): New variable.
11871 (handle_v_stopped): Remove.
11872 (handle_v_requests): Don't call handle_v_stopped. Call
11873 handle_ack_notif instead.
11874 (queue_stop_reply_callback): Call notif_event_enque instead
11875 of queue_stop_reply.
11876 (handle_status): Don't call send_next_stop_reply, call
11877 notif_write_event instead.
11878 (kill_inferior_callback): Likewise.
11879 (detach_or_kill_inferior_callback): Likewise.
11880 (main): Call initialize_notif.
11881 (process_serial_event): Call QUEUE_is_empty.
11882 (handle_target_event): Call notif_push instead of push event.
11883 * server.h (push_event): Remove declaration.
11885 2012-12-10 Tom Tromey <tromey@redhat.com>
11887 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11888 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11891 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11892 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11893 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11894 (amd64-linux-ipa.o, ax.o): Rewrite.
11895 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11896 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11897 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11898 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11899 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11900 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11901 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11902 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11903 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11904 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11905 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11906 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11907 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11908 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11909 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11910 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11911 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11912 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11913 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11914 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11915 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11916 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11917 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11918 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11919 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11920 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11921 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11922 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11923 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11924 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11925 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11926 (reg-tilegx.o): Remove.
11927 (all_object_files): New macro.
11928 Include .deps files.
11929 * aclocal.m4, configure: Rebuild.
11930 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11931 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11932 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11934 2012-12-05 Tom Tromey <tromey@redhat.com>
11937 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11939 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11941 * configure.ac: Check for linux/perf_event.h.
11942 * config.in: Regenerated.
11943 * configure: Regenerated.
11945 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11947 * hostio.c (handle_readlink): Decrease buffer size
11948 parameter passed to readlink by one byte.
11950 2012-11-26 Yao Qi <yao@codesourcery.com>
11952 * configure.ac (build_warnings): Append '-Wempty-body'.
11953 * configure: Regenerated.
11954 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11957 2012-11-15 Pierre Muller <muller@sourceware.org>
11959 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11960 * config.in: Regenerate.
11961 * configure: Regenerate.
11962 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11963 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11964 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11965 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11967 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11968 instead of <sys/wait.h> header.
11969 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11971 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11973 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11974 (various make rules): Remove -DGDBSERVER
11976 2012-11-09 Yao Qi <yao@codesourcery.com>
11978 * spu-low.c (current_ptid): Move it to ..
11979 * gdbthread.h: ... here. New.
11980 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11981 * server.c (myresume, process_serial_event): Likewise.
11982 * thread-db.c (thread_db_find_new_threads): Likewise.
11983 * tracepoint.c (run_inferior_command): Likewise.
11985 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11987 * server.c (handle_search_memory_1): Include access length in
11990 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11992 * linux-crisv32-low.c: Fix compile errors.
11994 2012-09-04 Yao Qi <yao@codesourcery.com>
11996 * tracepoint.c (cmd_qtsv): Adjust debug message.
11997 Don't check CUR_TPOINT.
11999 2012-08-28 Yao Qi <yao@codesourcery.com>
12001 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12002 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12003 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12004 Remove declarations of xmalloc, xreallloc, xstrdup and
12006 * Makefile.in (libiberty_h): New.
12007 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12008 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12010 2012-08-23 Yao Qi <yao@codesourcery.com>
12012 * server.h: Remove declaration of 'xsnprintf'.
12014 2012-08-22 Keith Seitz <keiths@redhat.com>
12016 * server.h: Include build-gnulib-gbserver/config.h.
12017 * gdbreplay.c: Likewise.
12019 2012-08-08 Doug Evans <dje@google.com>
12021 * Makefile.in (SFILES): Add gdb_vecs.c.
12022 (OBS): Add gdb_vecs.o.
12023 (gdb_vecs_h, host_defs_h): New variables.
12024 (thread-db.o): Add $(gdb_vecs_h) dependency.
12025 (gdb_vecs.o): New rule.
12026 * thread-db.c: #include "gdb_vecs.h".
12027 (thread_db_load_search): Use a vector to iterate over path elements.
12028 Handle text appearing after "$pdir".
12030 * configure.ac: Add check for strstr.
12031 * config.in: Regenerate.
12032 * configure: Regenerate.
12034 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12036 * hostio.c (handle_pread): If pread fails, fall back to attempting
12038 (handle_pwrite): Likewise for pwrite.
12040 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12042 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12043 between unsupported TYPE and unimplementable ADDR/LEN combination.
12044 (arm_insert_point): Act on new return value.
12046 2012-07-31 Pedro Alves <palves@redhat.com>
12048 * server.c (process_point_options): Only skip tokens if we find
12049 one that is unrecognized. Don't treat 'X' specially while
12050 skipping unrecognized tokens.
12052 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12054 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12055 to 4-byte-align HW breakpoint addresses for Thumb.
12057 2012-07-27 Yao Qi <yao@codesourcery.com>
12061 * server.h: Declare gdb_agent_about_to_close.
12062 * target.c (kill_inferior): Include "agent.h".
12063 New. Send command 'kill'.
12064 * target.h (kill_inferior): Removed macro.
12065 * tracepoint.c (gdb_agent_about_to_close): New.
12066 (gdb_agent_helper_thread): Handle command 'close'.
12067 Wait endlessly until the inferior stops.
12068 Install gdb_agent_remove_socket to atexit hook.
12069 (agent_socket_name): New static variable.
12070 (gdb_agent_socket_init): Replace local variable 'name' with
12071 'agent_socket_name'.
12072 (gdb_agent_remove_socket): New.
12074 2012-07-27 Yao Qi <yao@codesourcery.com>
12076 * server.c (process_point_options): Stop at 'X' when parsing.
12078 2012-07-19 Michael Eager <eager@eagercon.com>
12080 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12082 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12083 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12084 hardware breakpoint.
12086 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12088 * gdbserver/linux-low.c (initialize_low): Call
12089 linux_ptrace_init_warnings.
12091 2012-07-02 Doug Evans <dje@google.com>
12093 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12096 2012-07-02 Stan Shebs <stan@codesourcery.com>
12098 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12099 (ax.o): Add it to build rule.
12101 (OBS): Add format.o.
12102 (IPA_OBS): Add format.o.
12103 * server.c (handle_query): Claim support for breakpoint commands.
12104 (process_point_options): Add command case.
12105 (process_serial_event): Leave running if there are printfs in
12107 * mem-break.h (any_persistent_commands): Declare.
12108 (add_breakpoint_commands): Declare.
12109 (gdb_no_commands_at_breakpoint): Declare.
12110 (run_breakpoint_commands): Declare.
12111 * mem-break.c (struct point_command_list): New struct.
12112 (struct breakpoint): New field command_list.
12113 (any_persistent_commands): New function.
12114 (add_commands_to_breakpoint): New function.
12115 (add_breakpoint_commands): New function.
12116 (gdb_no_commands_at_breakpoint): New function.
12117 (run_breakpoint_commands): New function.
12118 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12120 * ax.c: Include format.h.
12121 (ax_printf): New function.
12122 (gdb_eval_agent_expr): Add printf opcode.
12124 2012-06-13 Yao Qi <yao@codesourcery.com>
12126 * server.c (start_inferior): Remove duplicated writes to fields
12127 'last_resume_kind' and 'last_status' of 'current_inferior'.
12129 2012-06-12 Yao Qi <yao@codesourcery.com>
12130 Pedro Alves <palves@redhat.com>
12132 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12134 * server.c (handle_v_cont): Extend comment.
12136 2012-06-11 Yao Qi <yao@codesourcery.com>
12138 * linux-low.c (linux_attach): Add 'static'.
12140 2012-06-06 Yao Qi <yao@codesourcery.com>
12142 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12144 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12146 Fix gcc -flto compilation warning.
12147 * server.c (main): Make variable multi_mode and attach volatile.
12149 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12151 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12152 if the platform doesn't know about it.
12154 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12156 * Makefile.in (SFILES): Add linux-tile-low.c.
12157 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12158 * configure.srv: Handle tilegx-*-linux*.
12159 * linux-tile-low.c: New file.
12161 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12163 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12165 2012-05-24 Pedro Alves <palves@redhat.com>
12169 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12171 2012-05-24 Pedro Alves <palves@redhat.com>
12175 Replace target_signal with gdb_signal throughout.
12177 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12179 * linux-low.c (linux_store_registers): Avoid the copying sequence
12180 when no data has been retrieved by ptrace.
12182 2012-05-22 Will Deacon <will.deacon@arm.com>
12184 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12185 Include asm/ptrace.h.
12186 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12189 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12191 * linux-low.c (linux_store_registers): Don't re-retrieve data
12192 with ptrace that has already been obtained from /proc. Always
12193 copy any data retrieved with ptrace to the buffer supplied.
12195 2012-05-11 Yao Qi <yao@codesourcery.com>
12196 Pedro Alves <palves@redhat.com>
12198 * linux-low.c (enum stopping_threads_kind): New.
12199 (stopping_threads): Change type to `enum stopping_threads_kind'.
12200 (handle_extended_wait): If stopping and suspending threads, leave
12201 the new_lwp suspended too.
12202 (linux_wait_for_event): Adjust.
12203 (stop_all_lwps): Set `stopping_threads' to
12204 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12205 whether we're suspending threads or just stopping them. Assert no
12208 2012-04-29 Yao Qi <yao@codesourcery.com>
12210 * server.h: Move some code to ...
12211 * gdbthread.h: ... here. New.
12212 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12213 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12214 (nto-low.o, win32-low.o): Likewise.
12215 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12216 * regcache.c, remote-utils.c, server.c: Likewise.
12217 * target.c, tracepoint.c, win32-low.c: Likewise.
12219 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12221 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12222 (PTRACE_ARG4_TYPE): Likewise.
12223 (PTRACE_XFER_TYPE): Likewise.
12224 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12225 ptrace to PTRACE_ARG3_TYPE.
12226 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12227 (PTRACE_ARG4_TYPE): Likewise.
12228 (PTRACE_XFER_TYPE): Likewise.
12229 (linux_detach_one_lwp): Cast fourth argument of
12230 ptrace to long then PTRACE_ARG4_TYPE.
12231 (regsets_fetch_inferior_registers): Cast third argument of
12232 ptrace to long then PTRACE_ARG3_TYPE.
12233 (regsets_store_inferior_registers): Likewise.
12235 2012-04-20 Pedro Alves <palves@redhat.com>
12237 * configure: Regenerate.
12239 2012-04-19 Pedro Alves <palves@redhat.com>
12241 * Makefile.in (GNULIB_BUILDDIR): New.
12242 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12243 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12244 (all, install-only, uninstall, clean-info, all-lib, clean): No
12245 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12246 (maintainer-clean realclean distclean): Use subdir_do.
12248 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12249 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12250 * acinclude.m4: Include acx_configure_dir.m4.
12251 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12252 calls. Call AC_PROG_RANLIB. Configure gnulib using
12255 (GNULIB_STDINT_H): Adjust.
12256 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12257 * gdbreplay.c: Include build-gnulib/config.h.
12258 * server.h: Likewise.
12259 * aclocal.m4: Regenerate.
12260 * config.in: Regenerate.
12261 * configure: Regenerate.
12263 2012-04-19 Pedro Alves <palves@redhat.com>
12265 * Makefile.in (LIBGNU, INCGNU): Adjust.
12266 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12267 (all, install-only, uninstall, clean-info, all-lib, clean)
12268 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12269 * configure.ac: Adjust AC_OUTPUT output.
12270 * aclocal.m4: Regenerate.
12271 * configure: Regenerate.
12273 2012-04-19 Pedro Alves <palves@redhat.com>
12275 * Makefile.in (generated_files): New.
12276 (server_h): Remove the explicit dependency on config.h, and depend
12277 on $generated_files.
12279 2012-04-19 Pedro Alves <palves@redhat.com>
12281 * Makefile.in (INCGNU): Add -Ignulib.
12283 2012-04-19 Pedro Alves <palves@redhat.com>
12285 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12286 (INCGNU): ... this, and spell out -I here.
12287 (GNULIB_LIB): Rename to ...
12288 (LIBGNU): ... this.
12289 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12291 2012-04-19 Pedro Alves <palves@redhat.com>
12293 * config.in: Regenerate.
12295 2012-04-19 Pedro Alves <palves@redhat.com>
12297 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12298 * server.h (memmem): Remove declaration.
12299 * config.in: Regenerate.
12300 * configure: Regenerate.
12302 2012-04-19 Yao Qi <yao@codesourcery.com>
12304 * Makefile.in (SFILES): Add common/vec.c.
12308 2012-04-19 Yao Qi <yao@codesourcery.com>
12310 * remote-utils.c (prepare_resume_reply): Replace with macro
12311 target_core_of_thread.
12312 * server.c (handle_qxfer_threads_proper): Likewise.
12313 * target.h (traget_core_of_thread): New macro.
12315 2012-04-18 Pedro Alves <palves@redhat.com>
12317 * aclocal.m4: Regenerate.
12318 * configure: Regenerate.
12320 2012-04-16 Yao Qi <yao@codesourcery.com>
12322 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12323 duplicated on address.
12325 2012-04-16 Yao Qi <yao@codesourcery.com>
12327 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12328 (struct tracepoint_action_ops) <send>: New field.
12329 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12330 (agent_expr_send, x_tracepoint_action_send): New.
12331 (l_tracepoint_action_send): New.
12332 (cmd_qtdp): Download and install tracepoint
12333 according to `use_agent'.
12334 (run_inferior_command): Add one more parameter `len'.
12336 (tracepoint_send_agent): New.
12337 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12339 2012-04-16 Yao Qi <yao@codesourcery.com>
12341 * tracepoint.c (download_tracepoints): Moved to ...
12342 (cmd_qtstart): ... here.
12344 2012-04-14 Yao Qi <yao@codesourcery.com>
12346 * tracepoint.c: Include inttypes.h.
12347 (struct collect_memory_action): Use sized types.
12348 (struct tracepoint): Likewise.
12349 (cmd_qtdp, stop_tracing): Update print specifiers.
12350 (cmd_qtp, response_tracepoint): Likewise.
12351 (collect_data_at_tracepoint): Likewise.
12352 (collect_data_at_step): Likewise.
12354 2012-04-14 Yao Qi <yao@codesourcery.com>
12356 Import gnulib module inttypes.
12357 * aclocal.m4, config.in, configure: Regenerated.
12359 2012-04-14 Yao Qi <yao@codesourcery.com>
12361 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12362 Makefile and config.status at last.
12364 2012-04-13 Yao Qi <yao@codesourcery.com>
12366 * tracepoint.c: Include stdint.h unconditionally.
12368 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12370 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12371 on BFD_HAVE_SYS_PROCFS_TYPE.
12372 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12373 * configure: Regenerate.
12374 * config.in: Likewise.
12376 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12378 * Makefile.in (clean): Also remove x32.c x32-linux.c
12379 x32-avx.c x32-avx-linux.c.
12380 (x32.o): New target.
12382 (x32-linux.o): Likewise.
12383 (x32-linux.c): Likewise.
12384 (x32-avx.o): Likewise.
12385 (x32-avx.c): Likewise.
12386 (x32-avx-linux.o): Likewise.
12387 (x32-avx-linux.c): Likewise.
12389 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12390 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12391 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12392 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12393 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12394 i386/x32-avx-linux.xml.
12396 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12397 (init_registers_x32_avx_linux): Likwise.
12398 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12399 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12401 2012-04-13 Pedro Alves <palves@redhat.com>
12403 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12404 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12405 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12406 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12409 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12411 * linux-x86-low.c (compat_x32_clock_t): New.
12412 (compat_x32_siginfo_t): Likewise.
12413 (compat_x32_siginfo_from_siginfo): Likewise.
12414 (siginfo_from_compat_x32_siginfo): Likewise.
12415 (linux_is_elf64): Likewise.
12416 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12417 and siginfo_from_compat_x32_siginfo for x32.
12418 (x86_arch_setup): Set linux_is_elf64.
12420 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12423 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12425 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12426 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12427 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12428 compatible with process.
12430 2012-04-12 Yao Qi <yao@codesourcery.com>
12432 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12433 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12434 (install-only, install-info, clean): Handle sub dir gnulib.
12435 (all-lib, am--refresh): New targets.
12436 (memmem.o): Remove target.
12437 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12438 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12439 (AC_REPLACE_FUNCS): Remove memmem.
12440 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12441 (AC_OUTPUT): Generate Makefile in gnulib/.
12442 * aclocal.m4, config.in, configure: Regenerated.
12444 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12446 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12448 2012-04-05 Pedro Alves <palves@redhat.com>
12450 -Werror=strict-aliasing
12452 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12455 2012-04-04 Pedro Alves <palves@redhat.com>
12457 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12458 (sparc_store_gregset_from_stack, sparc_store_gregset)
12459 (sparc_breakpoint_at): Fix formatting.
12461 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12463 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12465 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12466 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12467 * config.in: Regenerate.
12468 * configure: Likewise.
12470 2012-03-29 Pedro Alves <palves@redhat.com>
12472 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12473 Correct ptrace arguments.
12475 2012-03-28 Pedro Alves <palves@redhat.com>
12477 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12478 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12479 (IA64_FR1_REGNUM): New defines.
12480 (ia64_fetch_register): New.
12481 (the_low_target): Install it.
12482 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12484 * linux-low.c (linux_fetch_registers): Try the
12485 the_low_target.fetch_register hook first.
12487 * linux-arm-low.c (the_low_target): Adjust.
12488 * linux-bfin-low.c (the_low_target): Adjust.
12489 * linux-cris-low.c (the_low_target): Adjust.
12490 * linux-crisv32-low.c (the_low_target): Adjust.
12491 * linux-m32r-low.c (the_low_target): Adjust.
12492 * linux-m68k-low.c (the_low_target): Adjust.
12493 * linux-mips-low.c (the_low_target): Adjust.
12494 * linux-ppc-low.c (the_low_target): Adjust.
12495 * linux-s390-low.c (the_low_target): Adjust.
12496 * linux-sh-low.c (the_low_target): Adjust.
12497 * linux-sparc-low.c (the_low_target): Adjust.
12498 * linux-tic6x-low.c (the_low_target): Adjust.
12499 * linux-x86-low.c (the_low_target): Adjust.
12500 * linux-xtensa-low.c (the_low_target): Adjust.
12502 2012-03-26 Pedro Alves <palves@redhat.com>
12504 * server.c (handle_qxfer_libraries): Don't bail early if
12505 the_target->qxfer_libraries_svr4 is not NULL.
12507 2012-03-26 Pedro Alves <palves@redhat.com>
12509 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12511 2012-03-23 Pedro Alves <palves@redhat.com>
12513 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12514 "library-list-svr4" element's start tag when the the DSO list is
12517 2012-03-23 Pedro Alves <palves@redhat.com>
12519 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12520 a variable whose type size is the same as the inferior's pointer
12523 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12525 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12527 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12528 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12529 * linux-low.h: Include <signal.h>.
12530 (struct siginfo): Remove forward declaration.
12531 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12534 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12536 * .gitignore: Ignore more files.
12538 2012-03-19 Pedro Alves <palves@redhat.com>
12539 Jan Kratochvil <jan.kratochvil@redhat.com>
12541 * server.c (cont_thread, general_thread): Add describing comments.
12542 (start_inferior): Clear `cont_thread'.
12543 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12546 2012-03-15 Yao Qi <yao@codesourcery.com>
12548 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12550 (cmd_qtdp): ... here.
12552 2012-03-15 Yao Qi <yao@codesourcery.com>
12554 * tracepoint.c (struct tracepoint_action_ops): New.
12555 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12556 (m_tracepoint_action_download): New.
12557 (r_tracepoint_action_download): New.
12558 (x_tracepoint_action_download): New.
12559 (l_tracepoint_action_download): New.
12560 (add_tracepoint_action): Install `action->ops' according type.
12561 (download_tracepoint_1): Move code `download' function pointer
12562 of various tracepoint_action_ops.
12564 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12566 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12567 linux_ptrace_attach_warnings.
12569 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12571 * Makefile.in (linux-ptrace.o): New.
12572 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12573 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12574 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12575 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12576 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12578 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12580 2012-03-08 Yao Qi <yao@codesourcery.com>
12581 Pedro Alves <palves@redhat.com>
12583 Fix PR server/13392.
12584 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12585 offset of JMP insn.
12586 * tracepoint.c (remove_tracepoint): New.
12587 (cmd_qtdp): Call remove_tracepoint when failed to install.
12589 2012-03-07 Pedro Alves <palves@redhat.com>
12591 * linux-low.c (get_detach_signal): New.
12592 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12593 Pass on pending signals to PTRACE_DETACH. Check the result of the
12595 * server.c (program_signals, program_signals_p): New.
12596 (handle_general_set): Handle QProgramSignals.
12597 * server.h (program_signals, program_signals_p): Declare.
12599 2012-03-05 Pedro Alves <palves@redhat.com>
12600 Jan Kratochvil <jan.kratochvil@redhat.com>
12602 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12605 2012-03-03 Yao Qi <yao@codesourcery.com>
12607 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12608 agent_look_up_symbols.
12610 2012-03-03 Yao Qi <yao@codesourcery.com>
12612 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12613 (linux-x86-low.o): Likewise.
12614 * server.h: Remove in_process_agent_loaded.
12615 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12619 2012-03-03 Yao Qi <yao@codesourcery.com>
12621 * tracepoint.c (gdb_agent_capability): New global.
12622 (in_process_agent_loaded_ust): Renamed to
12623 `in_process_agent_supports_ust'.
12625 (in_process_agent_supports_ust): Call agent_capability_check.
12626 (clear_installed_tracepoints): Assert that agent supports
12629 2012-03-03 Yao Qi <yao@codesourcery.com>
12631 * linux-low.c (linux_supports_agent): New.
12632 (linux_target_ops): Initialize field `supports_agent' with
12633 linux_supports_agent.
12634 * target.h (struct target_ops) <supports_agent>: New.
12635 (target_supports_agent): New macro.
12636 * server.c (handle_general_set): Handle packet 'QAgent'.
12637 (handle_query): Send `QAgent+'.
12638 * Makefile.in (server.o): Depends on agent.h.
12640 2012-03-03 Yao Qi <yao@codesourcery.com>
12642 * Makefile.in (OBS): Add agent.o.
12643 Add new rule for agent.o.
12644 Track dependence of tracepoint.c on agent.h.
12645 * tracepoint.c (run_inferior_command_1):
12646 (run_inferior_command): Call agent_run_command.
12647 (gdb_ust_connect_sync_socket): Deleted. Move it to
12649 (resume_thread, stop_thread): Likewise.
12650 (gdb_ust_socket_init): Renamed to ...
12651 (gdb_agent_socket_init): ... New.
12652 (gdb_ust_thread): Renamed to ...
12653 (gdb_agent_helper_thread): ... New.
12654 (gdb_ust_init): Move some code to ...
12655 (gdb_agent_init): ... here. New.
12656 [HAVE_UST]: Call gdb_ust_init.
12657 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12658 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12659 * config.in, configure: Regenerated.
12661 2012-03-02 Pedro Alves <palves@redhat.com>
12663 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12664 * linux-low.c (struct simple_pid_list): New.
12665 (stopped_pids): New a struct simple_pid_list pointer.
12666 (add_to_pid_list, pull_pid_from_list): New.
12667 (handle_extended_wait): Don't assume the first signal new children
12668 report is SIGSTOP. Adjust call to pull_pid_from_list.
12669 (linux_wait_for_lwp): Adjust.
12671 2012-03-02 Yao Qi <yao@codesourcery.com>
12673 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12676 2012-03-02 Yao Qi <yao@codesourcery.com>
12678 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12679 `stop_pc' and `tpoint'. Update caller.
12681 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12683 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12684 * linux-low.c (use_linux_regsets): New macro.
12685 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12686 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12687 (linux_register_in_regsets): New function.
12688 (usr_fetch_inferior_registers): Skip registers covered by
12690 (usr_store_inferior_registers): Likewise.
12691 (usr_fetch_inferior_registers): New macro.
12692 (usr_store_inferior_registers): Likewise.
12693 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12694 (linux_store_registers): Likewise.
12695 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12697 (init_registers_mips64_dsp_linux): Likewise.
12698 (init_registers_mips_linux): New macro.
12699 (init_registers_mips_dsp_linux): Likewise.
12700 (mips_dsp_num_regs): Likewise.
12701 (DSP_BASE, DSP_CONTROL): New fallback macros.
12702 (mips_base_regs): New macro.
12703 (mips_regmap): Use it. Fix the size.
12704 (mips_dsp_regmap): New variable.
12705 (mips_dsp_regset_bitmap): Likewise.
12706 (mips_arch_setup): New function.
12707 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12709 (mips_cannot_store_register): Likewise.
12710 (the_low_target): Update .arch_setup, .num_regs and .regmap
12711 initializers. Add .regset_bitmap initializer.
12712 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12714 * linux-bfin-low.c (the_low_target): Likewise.
12715 * linux-cris-low.c (the_low_target): Likewise.
12716 * linux-crisv32-low.c (the_low_target): Likewise.
12717 * linux-ia64-low.c (the_low_target): Likewise.
12718 * linux-m32r-low.c (the_low_target): Likewise.
12719 * linux-m68k-low.c (the_low_target): Likewise.
12720 * linux-ppc-low.c (the_low_target): Likewise.
12721 * linux-s390-low.c (the_low_target): Likewise.
12722 * linux-sh-low.c (the_low_target): Likewise.
12723 * linux-sparc-low.c (the_low_target): Likewise.
12724 * linux-tic6x-low.c (the_low_target): Likewise.
12725 * linux-x86-low.c (the_low_target): Likewise.
12726 * linux-xtensa-low.c (the_low_target): Likewise.
12727 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12728 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12729 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12731 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12732 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12734 2012-02-29 Yao Qi <yao@codesourcery.com>
12735 Pedro Alves <palves@redhat.com>
12737 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12738 `step_over_finished' is true.
12740 2012-02-27 Pedro Alves <palves@redhat.com>
12742 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12743 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12745 2012-02-27 Pedro Alves <palves@redhat.com>
12748 * linux-low.c (pid_is_stopped): New.
12749 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12751 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12753 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12756 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12758 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12760 2012-02-24 Luis Machado <lgustavo@codesourcery>
12762 * server.c (handle_query): Advertise support for target-side
12763 breakpoint condition evaluation.
12764 (process_point_options): New function.
12765 (process_serial_event): When inserting a breakpoint, check for
12766 a target-side condition that should be evaluated.
12768 * mem-break.c: Include regcache.h and ax.h.
12769 (point_cond_list_t): New data structure.
12770 (breakpoint) <cond_list>: New field.
12771 (find_gdb_breakpoint_at): Make non-static.
12772 (delete_gdb_breakpoint_at): Clear any target-side
12774 (clear_gdb_breakpoint_conditions): New function.
12775 (add_condition_to_breakpoint): Likewise.
12776 (add_breakpoint_condition): Likewise.
12777 (gdb_condition_true_at_breakpoint): Likewise.
12778 (gdb_breakpoint_here): Return result directly instead
12779 of going through a local variable.
12781 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12782 (clear_gdb_breakpoint_conditions): Likewise.
12783 (add_breakpoint_condition): Likewise.
12784 (gdb_condition_true_at_breakpoint): Likewise.
12786 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12787 (need_step_over_p): Take target-side breakpoint condition into
12790 2012-02-24 Luis Machado <lgustavo@codesourcery>
12792 * server.h: Include tracepoint.h.
12793 (agent_mem_read, agent_get_trace_state_variable_value,
12794 agent_set_trace_state_variable_value,
12795 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12796 get_set_tsv_func_addr): New prototypes.
12798 * ax.h: New include file.
12799 * ax.c: New source file.
12801 * tracepoint.c: Include ax.h.
12802 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12803 agent_expr, eval_result_type): Move to ax.h.
12804 (parse_agent_expr): Rename to ...
12805 (gdb_parse_agent_expr): ... this, make it non-static and move
12807 (unparse_agent_expr) Rename to ...
12808 (gdb_unparse_agent_expr): ... this, make it non-static and move
12810 (eval_agent_expr): Rename to ...
12811 (eval_tracepoint_agent_expr): ... this.
12812 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12813 forward declarations.
12814 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12815 (agent_get_trace_state_variable_value): New function.
12816 (agent_set_trace_state_variable_value): New function.
12817 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12818 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12819 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12820 (condition_true_at_tracepoint): Likewise.
12821 (parse_agent_expr): Rename to ...
12822 (gdb_parse_agent_expr): ... this and move to ax.c.
12823 (unparse_agent_expr): Rename to ...
12824 (gdb_unparse_agent_expr): ... this and move to ax.c.
12825 (gdb_agent_op_name): Move to ax.c.
12826 (eval_agent_expr): Rename to ...
12827 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12829 (eval_tracepoint_agent_expr): New function.
12830 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12832 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12834 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12835 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12836 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12837 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12838 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12839 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12840 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12841 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12842 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12843 (compile_bytecodes): Remove forward declaration.
12844 (is_goto_target): Move to ax.c.
12845 (compile_bytecodes): Move to ax.c and call
12846 agent_get_trace_state_variable_value (...) and
12847 agent_set_trace_state_variable_value (...).
12849 * Makefile.in: Update ax.c and IPA dependencies.
12851 2012-02-24 Pedro Alves <palves@redhat.com>
12853 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12854 (cmd_bigqtbuffer_circular): ... this. Only handle
12855 'QTBuffer:circular:'.
12856 (handle_tracepoint_general_set): Adjust.
12858 2012-02-16 Yao Qi <yao@codesourcery.com>
12860 * inferiors.c: Move code to ...
12861 * dll.c: .... here. New.
12862 * server.h: Declare clear_dlls.
12863 * Makefile.in (SFILES): Add dll.c.
12867 2012-02-11 Yao Qi <yao@codesourcery.com>
12869 * server.c: (handle_monitor_command): Add a new parameter
12871 (handle_query): Update caller.
12873 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12875 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12876 * configure, config.in: Regenerate.
12877 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12880 2012-02-02 Pedro Alves <palves@redhat.com>
12882 Try SIGKILL first, then PTRACE_KILL.
12883 * linux-low.c (linux_kill_one_lwp): New.
12884 (linux_kill_one_lwp): Rename to ...
12885 (kill_one_lwp_callback): ... this. Use the new
12886 linux_kill_one_lwp.
12888 2012-02-02 Pedro Alves <palves@redhat.com>
12890 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12893 2012-01-27 Pedro Alves <palves@redhat.com>
12895 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12896 (elf_64_file_p): Make static.
12897 (linux_pid_exe_is_elf_64_file): New.
12898 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12899 Delete declarations.
12900 (linux_pid_exe_is_elf_64_file): Declare.
12901 * linux-x86-low.c (x86_arch_setup): Use
12902 linux_pid_exe_is_elf_64_file.
12904 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12906 * linux-low.c (linux_wait_for_event_1): Rename to ...
12907 (linux_wait_for_event): ... here and merge it with former
12908 linux_wait_for_event - new variable wait_ptid, use it.
12909 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12911 2012-01-23 Pedro Alves <palves@redhat.com>
12913 * server.c (main): Avoid yet another case of infinite loop while
12914 detaching/killing after a longjmp.
12916 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12919 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12921 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12923 * hostio.c (handle_readlink): New function.
12924 (handle_vFile): Call it to handle "vFile:readlink" packets.
12926 2012-01-20 Pedro Alves <palves@redhat.com>
12927 Ulrich Weigand <ulrich.weigand@linaro.org>
12929 * server.c (handle_v_requests): Only support vAttach and vRun to
12930 start multiple processes when in extended protocol mode.
12932 2012-01-17 Pedro Alves <palves@redhat.com>
12934 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12935 memalign plus mprotect to allocate the scratch buffer.
12937 2012-01-13 Pedro Alves <palves@redhat.com>
12939 * server.c (attach_inferior): Clear `cont_thread'.
12941 2012-01-13 Pedro Alves <palves@redhat.com>
12943 * server.c (main): Avoid infinite loop while detaching/killing
12946 2012-01-09 Doug Evans <dje@google.com>
12948 * server.c (start_inferior): Set last_ptid in --wrapper case.
12950 2012-01-06 Yao Qi <yao@codesourcery.com>
12952 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12954 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12956 2012-01-04 Yao Qi <yao@codesourcery.com>
12958 * tracepoint.c (cmd_qtdp): Print debug message
12959 for static tracepoint.
12961 2012-01-04 Yao Qi <yao@codesourcery.com>
12963 * tracepoint.c (trace_vdebug): Differentiate debug message
12964 between gdbserver and IPA.
12966 2012-01-03 Yao Qi <yao@codesourcery.com>
12968 * tracepoint.c (tracepoint_was_hit): Don't collect for
12971 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12973 * terminal.h: Reformat copyright header.
12975 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12977 * server.c (gdbserver_version): Update copyright year.
12978 * gdbreplay.c (gdbreplay_version): Likewise.
12980 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12982 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12985 2011-12-18 Hui Zhu <teawater@gmail.com>
12986 * linux-low.c (linux_create_inferior): Save return value to ret.
12988 2011-12-18 Hui Zhu <teawater@gmail.com>
12990 * linux-low.c (linux_create_inferior): Save return value to ret.
12992 2011-12-16 Doug Evans <dje@google.com>
12994 * linux-low.c (linux_create_inferior): If stdio connection,
12995 redirect stdin from /dev/null, stdout to stderr.
12996 * remote-utils.c (remote_is_stdio): New static global.
12997 (remote_connection_is_stdio): New function.
12998 (remote_prepare): Handle stdio connection.
12999 (remote_open): Ditto.
13000 (remote_close): Don't close stdin for stdio connections.
13001 (read_prim,write_prim): New functions. Replace all calls to
13002 read/write to these.
13003 * server.c (main): Watch for "-" argument. Move call to
13004 remote_prepare before start_inferior.
13005 * server.h (STDIO_CONNECTION_NAME): New macro.
13006 (remote_connection_is_stdio): Declare.
13008 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13009 in debugging output.
13011 2011-12-15 Yao Qi <yao@codesourcery.com>
13013 * tracepoint.c: Include sys/syscall.h.
13014 (gdb_ust_thread): Remove preprocessor conditional.
13016 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13018 * linux-low.c (linux_detach_one_lwp): Call
13019 the_low_target.prepare_to_resume before detaching.
13021 2011-12-14 Yao Qi <yao@codesourcery.com>
13023 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13026 2011-12-14 Yao Qi <yao@codesourcery.com>
13028 * i386-low.c (i386_low_stopped_data_address): Initialize local
13029 variable `control'.
13031 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13035 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13036 DR_CONTROL unless necessary. Extend comments.
13037 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13038 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13040 2011-12-13 Yao Qi <yao@codesourcery.com>
13042 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13044 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13046 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13048 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13049 Print new debug message for such case.
13051 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13053 Fix overlapping memcpy.
13054 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13055 the read_inferior_memory transfer.
13056 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13057 write_inferior_memory transfer.
13058 (set_fast_tracepoint_jump): New variable buf. Use it for the
13059 read_inferior_memory and write_inferior_memory transfers.
13060 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13061 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13062 Use it for the write_inferior_memory transfer.
13063 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13066 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13068 * linux-low.c (fetch_register, store_register): Make code
13069 consistent, fix formatting.
13071 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13073 * linux-low.c (usr_store_inferior_registers): Factor out code
13074 to handle individual registers into...
13075 (store_register): ... this new function.
13077 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13079 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13080 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13081 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13082 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13083 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13084 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13085 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13086 (srv_xmlfiles): Add new XML files.
13088 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13090 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13091 (init_registers_s390_linux32v1): Add prototype.
13092 (init_registers_s390_linux32v2): Likewise.
13093 (init_registers_s390_linux64v1): Likewise.
13094 (init_registers_s390_linux64v2): Likewise.
13095 (init_registers_s390x_linux64v1): Likewise.
13096 (init_registers_s390x_linux64v2): Likewise.
13097 (s390_num_regs): Increment to 52.
13098 (s390_regmap): Add orig_r2 register.
13099 (s390_num_regs_3264): Increment to 68.
13100 (s390_regmap_3264): Add orig_r2 register.
13101 (s390_collect_ptrace_register): Handle orig_r2 register.
13102 (s390_supply_ptrace_register): Likewise.
13103 (s390_fill_last_break): New function.
13104 (s390_store_last_break): Likewise.
13105 (s390_fill_system_call): New function.
13106 (s390_store_system_call): Likewise.
13107 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13109 (s390_check_regset): New function.
13110 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13111 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13112 Update target_regsets for available register sets.
13114 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13115 Jan Kratochvil <jan.kratochvil@redhat.com>
13117 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13118 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13120 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13121 * linux-low.h (struct process_info_private): New member r_debug.
13122 * server.c (handle_qxfer_libraries): Call
13123 the_target->qxfer_libraries_svr4.
13124 (handle_qxfer_libraries_svr4): New function.
13125 (qxfer_packets): New entry "libraries-svr4".
13126 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13127 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13128 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13129 PACKET_qXfer_libraries_svr4.
13131 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13133 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13134 PSW address/mask between 8-byte and 16-byte formats.
13135 (s390_supply_ptrace_register): Likewise.
13136 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13137 basic addressing mode bit.
13139 2011-11-24 Stan Shebs <stan@codesourcery.com>
13141 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13143 2011-11-17 Stan Shebs <stan@codesourcery.com>
13145 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13146 (tracing_start_time): New global.
13147 (tracing_stop_time): New global.
13148 (tracing_user_name): New global.
13149 (tracing_notes): New global.
13150 (tracing_stop_note): New global.
13151 (cmd_qtstart): Set traceframe_usage, start_time.
13152 (stop_tracing): Set stop_time.
13153 (cmd_qtstatus): Report additional status.
13154 (cmd_qtp): New function.
13155 (handle_tracepoint_query): Call it.
13156 (cmd_qtnotes): New function.
13157 (handle_tracepoint_general_set): Call it.
13158 (get_timestamp): Rename from tsv_get_timestamp.
13160 2011-11-14 Stan Shebs <stan@codesourcery.com>
13161 Kwok Cheung Yeung <kcy@codesourcery.com>
13163 * linux-x86-low.c (small_jump_insn): New.
13164 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13165 trampoline and error message, build a trampoline and issue a small
13166 jump instruction to it.
13167 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13168 trampoline and error message.
13169 (x86_get_min_fast_tracepoint_insn_len): New.
13170 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13171 * linux-low.h (struct linux_target_ops): Add arguments to
13172 install_fast_tracepoint_jump_pad operation, add new operation.
13173 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13175 (linux_get_min_fast_tracepoint_insn_len): New function.
13176 (linux_target_op): Add new operation.
13177 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13178 (gdb_trampoline_buffer_end): Ditto.
13179 (gdb_trampoline_buffer_error): Ditto.
13180 (struct ipa_sym_addresses): Add fields for new IPA variables.
13181 (symbol_list): Add entries for new IPA variables.
13182 (struct tracepoint): Add fields to hold the address range of the
13183 trampoline used by the tracepoint.
13184 (trampoline_buffer_head): New static variable.
13185 (trampoline_buffer_tail): Ditto.
13186 (claim_trampoline_space): New function.
13187 (have_fast_tracepoint_trampoline_buffer): New function.
13188 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13190 (install_fast_tracepoint): Ditto, also add error buffer argument.
13191 (cmd_qtminftpilen): New function.
13192 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13193 (fast_tracepoint_from_trampoline_address): New function.
13194 (fast_tracepoint_collecting): Handle trampoline as part of jump
13196 (set_trampoline_buffer_space): New function.
13197 (initialize_tracepoint): Initialize new IPA variables.
13198 * target.h (struct target_ops): Add arguments to
13199 install_fast_tracepoint_jump_pad operation, add new
13200 get_min_fast_tracepoint_insn_len operation.
13201 (target_get_min_fast_tracepoint_insn_len): New.
13202 (install_fast_tracepoint_jump_pad): Add arguments.
13203 * server.h (IPA_BUFSIZ): Define.
13204 * linux-i386-ipa.c: Include extra header files.
13205 (initialize_fast_tracepoint_trampoline_buffer): New function.
13206 (initialize_low_tracepoint): Call it.
13207 * server.h (set_trampoline_buffer_space): Declare.
13208 (claim_trampoline_space): Ditto.
13209 (have_fast_tracepoint_trampoline_buffer): Ditto.
13211 2011-11-14 Yao Qi <yao@codesourcery.com>
13213 * server.c (handle_query): Handle InstallInTrace for qSupported.
13214 * tracepoint.c (add_tracepoint): Sort list.
13215 (install_tracepoint, download_tracepoint): New.
13216 (cmd_qtdp): Call them to install and download tracepoints.
13217 (sort_tracepoints): Removed.
13218 (cmd_qtstart): Update.
13220 2011-11-14 Yao Qi <yao@codesourcery.com>
13222 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13223 * mem-break.h: Declare.
13224 * tracepoint.c (cmd_qtstart): Move some code to ...
13225 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13227 (download_tracepoints): Move some code to ...
13228 (download_tracepoint_1): ... here. New.
13230 2011-11-08 Yao Qi <yao@codesourcery.com>
13232 * remote-utils.c (relocate_instruction): A comment fix.
13234 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13236 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13237 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13238 dr_status_mirror and dr_control_mirror from debug_reg_state.
13239 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13240 (i386_initial_stuff): Remove use of deleted globals.
13241 (i386_get_thread_context, i386_set_thread_context,
13242 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13243 from debug_reg_state.
13245 2011-11-05 Yao Qi <yao@codesourcery.com>
13247 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13248 address as TPOINT's.
13250 2011-11-02 Stan Shebs <stan@codesourcery.com>
13252 * tracepoint.c (agent_mem_read_string): New function.
13253 (eval_agent_expr): Call it for tracenz.
13254 * server.c (handle_query): Report support for tracenz.
13256 2011-11-02 Yao Qi <yao@codesourcery.com>
13258 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13260 2011-11-02 Yao Qi <yao@codesourcery.com>
13262 * target.h: Fix a typo in comment.
13264 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13266 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13267 clobber the breakpoints' shadows with fast tracepoint jumps.
13268 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13269 * target.c (write_inferior_memory): Also pass MYADDR down to
13272 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13274 * configure.ac: Check support for personality routine.
13275 * configure: Regenerate.
13276 * config.in: Likewise.
13277 * linux-low.c: Include <sys/personality.h>.
13278 Define ADDR_NO_RANDOMIZE if necessary.
13279 (linux_create_inferior): Disable address space randomization when
13280 forking inferior, if requested.
13281 (linux_supports_disable_randomization): New function.
13282 (linux_target_ops): Install it.
13283 * server.h (disable_randomization): Declare.
13284 * server.c (disable_randomization): New global variable.
13285 (handle_general_set): Handle QDisableRandomization.
13286 (handle_query): Likewise for qSupported.
13287 (main): Support --disable-randomization and --no-disable-randomization
13288 command line arguments.
13289 * target.h (struct target_ops): Add supports_disable_randomization.
13290 (target_supports_disable_randomization): New macro.
13292 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13294 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13296 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13297 [!PT_GETDSBT] (target_loadmap): New definition.
13298 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13299 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13300 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13301 and PT_GETDSBT to LINUX_LOADMAP.
13302 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13303 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13305 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13307 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13308 (arm_linux_hwbp_cap): New static variable.
13309 (arm_linux_get_hwbp_cap): Replace by ...
13310 (arm_linux_init_hwbp_cap): ... this new function.
13311 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13312 (arm_linux_get_hw_watchpoint_count): Likewise.
13313 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13314 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13315 (arm_prepare_to_resume): Use perror_with_name instead of error.
13317 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13319 * linux-arm-low.c: Include <signal.h>.
13320 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13321 (struct arm_linux_hwbp_cap): New data type.
13322 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13323 (struct arm_linux_hw_breakpoint): New data type.
13324 (MAX_BPTS, MAX_WPTS): Define.
13325 (struct arch_process_info, struct arch_lwp_info): New data types.
13326 (arm_linux_get_hwbp_cap): New function.
13327 (arm_linux_get_hw_breakpoint_count): Likewise.
13328 (arm_linux_get_hw_watchpoint_count): Likewise.
13329 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13330 (arm_hwbp_control_initialize): Likewise.
13331 (arm_hwbp_control_is_enabled): Likewise.
13332 (arm_hwbp_control_is_initialized): Likewise.
13333 (arm_hwbp_control_disable): Likewise.
13334 (arm_linux_hw_breakpoint_equal): Likewise.
13335 (arm_linux_hw_point_initialize): Likewise.
13336 (struct update_registers_data): New data structure.
13337 (update_registers_callback: New function.
13338 (arm_insert_point): Likewise.
13339 (arm_remove_point): Likewise.
13340 (arm_stopped_by_watchpoint): Likewise.
13341 (arm_stopped_data_address): Likewise.
13342 (arm_new_process): Likewise.
13343 (arm_new_thread): Likewise.
13344 (arm_prepare_to_resume): Likewise.
13345 (the_low_target): Register arm_insert_point, arm_remove_point,
13346 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13347 arm_new_thread, and arm_prepare_to_resume.
13349 2011-09-15 Stan Shebs <stan@codesourcery.com>
13351 * server.h (struct emit_ops): Add compare-goto fields.
13352 * tracepoint.c (gdb_agent_op_sizes): New table.
13353 (emit_eq_goto): New function.
13354 (emit_ne_goto): New function.
13355 (emit_lt_goto): New function.
13356 (emit_le_goto): New function.
13357 (emit_gt_goto): New function.
13358 (emit_ge_goto): New function.
13359 (is_goto_target): New function.
13360 (compile_bytecodes): Recognize special cases of compare-goto
13361 combinations and call specialized emitters for them.
13362 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13363 (amd64_emit_ne_goto): New function.
13364 (amd64_emit_lt_goto): New function.
13365 (amd64_emit_le_goto): New function.
13366 (amd64_emit_gt_goto): New function.
13367 (amd64_emit_ge_goto): New function.
13368 (amd64_emit_ops): Add the new functions.
13369 (i386_emit_eq_goto): New function.
13370 (i386_emit_ne_goto): New function.
13371 (i386_emit_lt_goto): New function.
13372 (i386_emit_le_goto): New function.
13373 (i386_emit_gt_goto): New function.
13374 (i386_emit_ge_goto): New function.
13375 (i386_emit_ops): Add the new functions.
13377 2011-09-08 Stan Shebs <stan@codesourcery.com>
13379 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13380 (i386_emit_epilogue): Restore %ebx.
13382 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13384 * server.c (step_thread): Remove definition.
13385 (process_serial_event): Don't handle Hs.
13386 * server.h (step_thread): Remove declaration.
13387 * target.c (set_desired_inferior): Remove use of step_thread.
13389 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13391 * linux-low.c: Include linux-procfs.h.
13392 (linux_attach_lwp_1): Update comments.
13393 (linux_attach): Scan for existing threads when attaching to a
13394 process that is the tgid.
13395 * Makefile.in: Update dependencies.
13397 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13399 * configure.srv: Add linux-procfs.o dependencies.
13401 2011-08-14 Yao Qi <yao@codesourcery.com>
13403 * target.h (struct target_ops): Fix indent.
13404 * win32-low.c (win32_target_ops): Fix comment.
13406 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13407 Yao Qi <yao@codesourcery.com>
13409 * Makefile.in (clean): Remove tic6x-*.c files.
13410 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13411 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13412 (tic6x-c64xp-linux.c): Likewise.
13413 * configure.srv: Add support for tic6x-*-uclinux.
13414 * linux-tic6x-low.c: New.
13415 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13417 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13418 Yao Qi <yao@codesourcery.com>
13420 * target.h (struct target_ops): Add read_loadmap.
13421 * linux-low.c (struct target_loadseg): New type.
13422 (struct target_loadmap): New type.
13423 (linux_read_loadmap): New function.
13424 (linux_target_ops): Add linux_read_loadmap.
13425 * server.c (handle_query): Support qXfer:fdpic:read packet.
13426 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13429 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13431 * win32-low.c: Include <stdint.h>.
13433 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13435 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13436 to the inferior here.
13437 (i386_remove_aligned_watchpoint): Ditto.
13438 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13439 fit part of the watchpoint in the debug registers.
13440 (i386_update_inferior_debug_regs): New.
13441 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13442 registers, and only update the inferior on success.
13443 (i386_low_remove_watchpoint): Ditto.
13445 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13447 * linux-low.c (compare_ints, unique, list_threads, show_process,
13448 linux_core_of_thread): Delete.
13449 (linux_target_ops): Change linux_core_of_thread to
13450 linux_common_core_of_thread.
13451 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13452 * utils.c (malloc_failure): Change type of argument.
13453 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13454 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13455 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13456 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13457 (IPA_OBJS): Add common-utils-ipa.o.
13458 (ptid_h, linux_osdata_h): New macros.
13459 (server_h): Add common/common-utils.h, common/xml-utils.h,
13460 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13462 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13463 ptid.o, buffer.o): New rules.
13464 (linux-low.o): Add common/linux-osdata.h as a dependency.
13465 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13466 * configure.ac: Add AC_HEADER_DIRENT check.
13467 * config.in: Regenerate.
13468 * configure: Regenerate.
13469 * remote-utils.c (xml_escape_text): Delete.
13470 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13471 buffer_xml_printf): Move to common/buffer.c.
13472 * server.c (main): Remove call to initialize_inferiors.
13473 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13474 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13475 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13476 internal_error, gdb_assert, gdb_assert_fail): Delete.
13477 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13478 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13480 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13481 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13482 initialize_inferiors): Delete.
13484 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13486 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13489 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13491 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13493 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13495 2011-05-26 Yao Qi <yao@codesourcery.com>
13497 * Makefile.in (thread-db.o): Track dependence to
13498 common/gdb_thread_db.h.
13499 * thread-db.c: include gdb_thread_db.h from right place.
13501 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13503 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13504 __FILE__ and __LINE__ to internal_error.
13506 2011-05-13 Doug Evans <dje@google.com>
13508 * thread-db.c (try_thread_db_load_from_sdir): New function.
13509 (try_thread_db_load_from_dir): New function.
13510 (thread_db_load_search): Handle $sdir, ignore $pdir.
13511 Remove trying of system directories if search of
13512 libthread-db-search-path fails, that is now done via $sdir.
13514 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13516 * server.c (handle_query): Add EnableDisableTracepoints to the list
13517 of supported features.
13518 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13520 (cmd_qtenable_disable): New.
13521 (cmd_qtstart): Install tracepoints even if disabled.
13522 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13523 receiving a QTEnable or QTDisable packet.
13524 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13525 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13527 (gdb_probe): Skip data collection if static tracepoint is disabled.
13529 2011-05-10 Doug Evans <dje@google.com>
13531 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13533 2011-05-04 Doug Evans <dje@google.com>
13535 * linux-low.c (linux_join): Skip process lookup.
13536 * spu-low.c (spu_join): Ditto.
13537 * server.c (join_inferiors_callback): Delete.
13538 (process_serial_event): For 'D' packet (detach) call join_inferior
13541 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13543 * README: Don't mention xscale*-*-linux*.
13544 * configure.srv (xscale*-*-linux*): Don't handle target.
13546 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13548 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13550 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13551 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13552 (i386_emit_void_call_2): Likewise.
13554 2011-04-26 Yao Qi <yao@codesourcery.com>
13556 * linux-low.c: Move common macros to linux-ptrace.h.
13557 Include linux-ptrace.h.
13558 * Makefile.in (linux_ptrace_h): New.
13559 (linux-low.o): Depends on linux-ptrace.h.
13561 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13563 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13564 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13565 (remote_prepare): New function with most of the TCP code from ...
13566 (remote_open): ... here. Detect PORT here unconditionally. Move also
13567 setting transport_is_reliable.
13568 * server.c (run_once): New variable.
13569 (gdbserver_usage): Document it.
13570 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13571 the first run if RUN_ONCE.
13572 * server.h (run_once, remote_prepare): New declarations.
13574 2011-04-19 Tom Tromey <tromey@redhat.com>
13576 * win32-low.c (handle_load_dll): Remove duplicate "the".
13578 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13580 Remove support for old Cygwin 1.5 versions.
13581 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13582 function to avoid warning.
13583 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13586 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13588 * gdbserver/server.h (Macro _): Define it if not available.
13590 2011-03-14 Michael Snyder <msnyder@vmware.com>
13592 * hostio.c (handle_close): Remove unnecessary null test.
13594 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13596 * Makefile.in (maintainer-clean realclean distclean): Remove
13597 "make ... subdir_do" command.
13599 2011-03-10 Michael Snyder <msnyder@vmware.com>
13601 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13603 * server.c (handle_v_run): Free alloced buffer on early return.
13605 2011-03-09 Yao Qi <yao@codesourcery.com>
13608 2011-03-04 Yao Qi <yao@codesourcery.com>
13610 * Makefile.in: Remove GNU make feature --directory.
13612 2011-03-05 Yao Qi <yao@codesourcery.com>
13614 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13615 (subdir_do): New make target. Copied from gdb/Makefile.
13616 (maintainer-clean, realclean, distclean, clean): Call corresponding
13617 make targets in common/Makefile.
13619 2011-02-11 Yao Qi <yao@codesourcery.com>
13621 * configure.ac: Call AC_PROG_RANLIB.
13622 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13623 * configure: Regenerate.
13625 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13627 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13629 2011-03-06 Yao Qi <yao@codesourcery.com>
13631 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13633 2011-03-05 Yao Qi <yao@codesourcery.com>
13635 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13636 (subdir_do): New make target. Copied from gdb/Makefile.
13637 (maintainer-clean, realclean, distclean, clean): Call corresponding
13638 make targets in common/Makefile.
13640 2011-03-04 Yao Qi <yao@codesourcery.com>
13642 * Makefile.in: Remove GNU make feature --directory.
13644 2011-03-04 Michael Snyder <msnyder@vmware.com>
13646 * server.c (queue_stop_reply): Call xmalloc not malloc.
13648 2011-03-02 Michael Snyder <msnyder@vmware.com>
13650 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13652 2011-02-28 Michael Snyder <msnyder@vmware.com>
13654 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13655 (cmd_qtframe): Ditto.
13656 (cmd_qtbuffer): Ditto.
13657 (cmd_bigqtbuffer): Ditto.
13659 * utils.c (decimal2str): Initialize 'width' to nine, then
13660 don't mess with it.
13662 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13664 * hostio.c (require_data): Free *data, not data.
13666 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13668 * hostio.c (require_data): Use free, not xfree.
13670 2011-02-27 Michael Snyder <msnyder@vmware.com>
13672 * server.c (handle_query): Discard unused value.
13674 * hostio.c (require_data): Free malloc memory before returning
13677 2011-02-26 Michael Snyder <msnyder@vmware.com>
13679 * linux-low.c (list_threads): Call closedir for dirent.
13681 2011-02-27 Michael Snyder <msnyder@vmware.com>
13683 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13684 a case statement falls through.
13686 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13688 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13691 2011-02-26 Michael Snyder <msnyder@vmware.com>
13693 * utils.c (decimal2str): Eliminate dead code and dead param.
13694 (pulongest): Drop dead param from call to decimal2str.
13697 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13699 Revert the following patch (not approved yet):
13700 2011-02-21 Hui Zhu <teawater@gmail.com>
13701 * tracepoint.c (tp_printf): New function.
13702 (eval_agent_expr): Handle gdb_agent_op_printf.
13704 2011-02-21 Hui Zhu <teawater@gmail.com>
13706 * tracepoint.c (tp_printf): New function.
13707 (eval_agent_expr): Handle gdb_agent_op_printf.
13709 2011-02-18 Tom Tromey <tromey@redhat.com>
13711 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13712 (tracepoint.o): Likewise.
13713 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13714 (gdb_agent_op_names): Likewise.
13716 2011-02-18 Tom Tromey <tromey@redhat.com>
13718 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13719 gdb_agent_op_rot>: New constants.
13720 (gdb_agent_op_names): Add pick and roll.
13721 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13724 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13726 * aclocal.m4: Regenerated with aclocal-1.11.1.
13728 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13730 * server.c (handle_qxfer_traceframe_info): New.
13731 (qxfer_packets): Register "traceframe-info".
13732 (handle_query): Report support for qXfer:traceframe-info:read+.
13733 * tracepoint.c (match_blocktype): New.
13734 (traceframe_find_block_type): Rename to ...
13735 (traceframe_walk_blocks): ... this. Add callback filter argument,
13737 (traceframe_find_block_type): New, reimplemented on top of
13738 traceframe_walk_blocks.
13739 (build_traceframe_info_xml): New.
13740 (traceframe_read_info): New.
13741 * server.h (traceframe_read_info): Declare.
13743 2011-02-11 Yao Qi <yao@codesourcery.com>
13745 * configure.ac: Call AC_PROG_RANLIB.
13746 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13747 * configure: Regenerate.
13749 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13751 * server.c (gdb_read_memory): Change return semantics to allow
13753 (handle_search_memory_1): Adjust.
13754 (process_serial_event) <'m' packet>: Handle partial transfers.
13755 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13757 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13759 * regcache.c (init_register_cache): Initialize
13760 regcache->register_status.
13761 (free_register_cache): Release regcache->register_status.
13762 (regcache_cpy): Copy register_status.
13763 (registers_to_string): Print 'x's for unavailable registers.
13764 (supply_register): Mark the register's status valid or
13765 unavailable, depending on whether a buffer was passed in or not.
13766 (supply_register_zeroed): New.
13767 (supply_regblock): Mark the registers' status valid or
13768 unavailable, depending on whether a buffer was passed in or not.
13769 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13770 (struct regcache): New `register_status' field.
13771 (supply_register_zeroed): Declare.
13772 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13773 supply_register_zeroed, rather than passing a NULL buffer to
13775 * tracepoint.c (fetch_traceframe_registers): Update comment.
13777 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13779 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13782 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13784 * server.h (decode_xfer_write): Change prototype.
13785 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13786 and don't extract the annex here.
13787 * server.c (decode_xfer_read): Remove `annex' parameter,
13788 and don't extract the annex here.
13789 (decode_xfer): New.
13790 (struct qxfer): New.
13791 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13792 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13793 (handle_qxfer_statictrace): New functions, abstracted out from
13794 handle_query, and made to use the struct qxfer interface.
13795 (handle_threads_qxfer_proper): Rename to ...
13796 (handle_qxfer_threads_proper): ... this.
13797 (handle_threads_qxfer): Rename to ...
13798 (handle_qxfer_threads): ... this. Adjust.
13799 (qxfer_packets): New array.
13800 (handle_qxfer): New function.
13801 (handle_query): Use handle_qxfer.
13803 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13805 * gdbreplay.c: Shorten lines of >= 80 columns.
13806 * linux-low.c: Ditto.
13807 * linux-ppc-low.c: Ditto.
13808 * linux-s390-low.c: Ditto.
13809 * linux-sparc-low.c: Ditto.
13810 * linux-x86-low.c: Ditto.
13811 * linux-xtensa-low.c: Ditto.
13812 * mem-break.c: Ditto.
13813 * nto-low.c: Ditto.
13814 * regcache.h: Ditto.
13815 * remote-utils.c: Ditto.
13818 * thread-db.c: Ditto.
13819 * tracepoint.c: Ditto.
13821 * win32-low.h: Ditto.
13823 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13825 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13828 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13830 * server.c (gdbserver_version): Update copyright year in version
13832 * gdbreplay.c (gdbreplay_version): Ditto.
13834 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13836 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13837 * linux-bfin-low.c: New file.
13838 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13839 PT_DATA_ADDR for BFIN targets.
13840 * Makefile.in (SFILES): Add linux-bfin-low.c.
13841 (clean): Remove reg-bfin.c.
13842 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13843 * README: Mention supported Blackfin targets.
13845 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13847 * .gitignore: New file.
13849 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13851 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13853 2010-10-22 Jie Zhang <jie@codesourcery.com>
13855 * Makefile.in: Add FLAGS_TO_PASS variable.
13856 (install): Remove dependency of install-only and recursively
13857 invoke make for install-only.
13859 2010-10-04 Doug Evans <dje@google.com>
13861 * Makefile.in (uninstall): Use $(DESTDIR).
13863 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13867 * linux-x86-low.c (compat_siginfo_from_siginfo)
13868 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13869 si_code is < 0. Check for si_code == SI_TIMER before checking for
13872 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13874 * lynx-i386-low.c: New file.
13875 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13877 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13879 * lynx-low.c (ptrace_request_to_str): Remove handling for
13880 request values that have been removed in LynxOS 5.x.
13882 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13884 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13887 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13889 * configure.ac: Add --enable-inprocess-agent option.
13890 * configure: Rebuilt.
13892 2010-09-06 Yao Qi <yao@codesourcery.com>
13894 * linux-low.c (linux_kill): Remove unused variable.
13895 (linux_stabilize_threads): Likewise.
13896 * server.c (start_inferior): Likewise.
13897 (queue_stop_reply_callback): Likewise.
13898 * tracepoint.c (do_action_at_tracepoint): Likewise.
13900 2010-09-06 Yao Qi <yao@codesourcery.com>
13902 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13905 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13907 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13909 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13911 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13914 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13916 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13917 gdbserver/lynx-ppc-low.c: New files.
13918 * Makefile.in (lynx_low_h): New variable.
13919 (lynx-low.o, lynx-ppc-low.o): New rules.
13920 * configure.ac: On LynxOS, link with -lnetinet.
13921 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13922 * configure: regenerate.
13924 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13926 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13927 * configure.ac: Add check for vasprintf and vsnprintf.
13928 * configure, config.in: Regenerate.
13929 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13933 * gdbreplay.c: Move include of alloca.h up, next to include of
13935 * server.h: Add include of malloc.h.
13936 * mem-break.c: Remove include of malloc.h.
13937 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13939 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13941 * Makefile.in (memmem.o): Build with -Wno-error.
13943 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13945 * utils.c (xsnprintf): Make non-static.
13946 * server.h: Add xsnprintf declaration.
13947 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13948 replace calls to snprintf by calls to xsnprintf throughout.
13950 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13952 * configure.ac: Add configure check for alloca.
13953 * configure, config.in: Regenerate.
13954 * server.h: Include alloca.h if it exists.
13955 * gdbreplay.c: Include alloca.h if it exists.
13957 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13959 * linux-low.c (__SIGRTMIN): Define if not already defined.
13960 (linux_create_inferior): Check for __ANDROID__ rather than
13962 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13963 are already deferred.
13964 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13965 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13966 stopped and already has a pending signal to report.
13967 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13968 a pending signal to report or is moving out of a jump pad.
13969 (linux_init_signals): Check for __ANDROID__ rather than
13972 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13974 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13975 debug_threads check. Avoid a linear search when not doing debug
13978 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13980 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13981 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13982 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13983 (process_event): Change local fd's type to gdb_fildes_t.
13984 (create_file_handler): Adjust prototype.
13985 (delete_file_handler): Adjust prototype.
13986 (handle_file_event): Adjust prototype. Use pfildes.
13987 (create_file_event): Adjsut prototype.
13988 * remote-utils.c (remote_desc, listen_desc): Change type to
13990 * server.h: New gdb_fildes_t typedef.
13991 [USE_WIN32API]: Include winsock2.h.
13992 (delete_file_handler, add_file_handler): Adjust prototypes.
13993 (pfildes): Declare.
13994 * utils.c (pfildes): New.
13996 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13998 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13999 * configure: Regenerate.
14001 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14003 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14004 (linux_done_accessing_memory): ... this.
14005 (linux_target_ops): Adjust.
14006 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14007 * nto-low.c (nto_target_ops): Adjust comment.
14008 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14009 * spu-low.c (spu_target_ops): Adjust comment.
14010 * target.h (target_ops): Rename unprepare_to_access_memory field
14011 to done_accessing_memory.
14012 (unprepare_to_access_memory): Rename to ...
14013 (done_accessing_memory): ... this.
14015 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14017 * linux-low.c (linux_prepare_to_access_memory): New.
14018 (linux_unprepare_to_access_memory): New.
14019 (linux_target_ops): Install them.
14020 * server.c (read_memory): Rename to ...
14021 (gdb_read_memory): ... this. Use
14022 prepare_to_access_memory/prepare_to_access_memory.
14023 (write_memory): Rename to ...
14024 (gdb_write_memory): ... this. Use
14025 prepare_to_access_memory/prepare_to_access_memory.
14026 (handle_search_memory_1): Adjust.
14027 (process_serial_event): Adjust.
14028 * target.h (struct target_ops): New fields
14029 prepare_to_access_memory and unprepare_to_access_memory.
14030 (prepare_to_access_memory, unprepare_to_access_memory): New.
14031 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14032 prepare_to_access_memory/prepare_to_access_memory.
14033 * nto-low.c (nto_target_ops): Adjust.
14034 * spu-low.c (spu_target_ops): Adjust.
14035 * win32-low.c (win32_target_ops): Adjust.
14037 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14039 * Makefile.in (WARN_CFLAGS): Get it from configure.
14040 (WERROR_CFLAGS): New.
14041 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14042 * configure.ac: Introduce --enable-werror, which adds -Werror to
14043 the compiler command line. Enabled by default. Disable with
14044 --disable-werror. Add -Wdeclaration-after-statement
14045 Wpointer-arith and -Wformat-nonliteral to warning flags.
14046 * configure: Regenerate.
14048 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14050 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14052 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14054 * gdbreplay.c (remote_error): New.
14056 (expect): Use gdbchar. Check for error reading from GDB.
14057 Clarify sync error output.
14058 (play): Check for errors writing to GDB.
14059 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14060 * remote-utils.c (getpkt): Check for errors writing to the remote
14063 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14065 * linux-low.c (linux_wait_1): Move non-debugging code out of
14066 `debug_threads' control.
14068 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14070 * linux-low.c (linux_wait_1): Don't set last_status here.
14071 * server.c (push_event, queue_stop_reply_callback): Assert we're
14072 not pushing a TARGET_WAITKIND_IGNORE event.
14073 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14074 (myresume, handle_target_event): Set the thread's last_resume_kind
14075 and last_status from the target returned status.
14077 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14081 * linux-x86-low.c (update_debug_registers_callback): New.
14082 (i386_dr_low_set_addr): Use it.
14083 (i386_dr_low_get_addr): New.
14084 (i386_dr_low_set_control): Use update_debug_registers_callback.
14085 (i386_dr_low_get_control): New.
14086 (i386_dr_low_get_status): Adjust.
14087 * linux-low.c (linux_stop_lwp): New.
14088 * linux-low.h (linux_stop_lwp): Declare.
14090 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14091 argument instead of a i386_debug_reg_state.
14092 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14093 a i386_debug_reg_state.
14094 (i386_insert_aligned_watchpoint): Adjust.
14095 (i386_remove_aligned_watchpoint): Adjust.
14096 (i386_low_stopped_data_address): Read the debug registers from the
14097 inferior instead of from the mirrors.
14098 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14099 (i386_dr_low_get_addr): Declare.
14100 (i386_dr_low_get_control): Declare.
14101 (i386_dr_low_get_status): Change prototype.
14103 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14104 (i386_dr_low_get_addr): New.
14105 (i386_dr_low_get_control): New.
14106 (i386_dr_low_get_status): Adjust prototype. Return
14108 (i386_initial_stuff): Clear dr_status_mirror and
14110 (i386_get_thread_context): Adjust.
14111 (i386_set_thread_context): Adjust.
14112 (i386_thread_added): Adjust.
14114 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14116 * linux-low.h (linux_thread_area): Delete declaration.
14118 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14120 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14121 after its termination.
14123 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14125 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14126 (gdb_wants_all_stopped): Delete.
14127 (linux_wait_1): Don't call them.
14128 * server.c (handle_v_cont): Tag all threads as want-stopped.
14129 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14130 stopped as "client-wants-stopped".
14132 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14134 * Makefile.in (signals_h): New.
14135 (server_h): Depend on it.
14136 (server.o): Don't depend on $(signals_def).
14137 (signals.o): Depend on $(signals_def).
14139 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14141 * Makefile.in (signals_def): New.
14142 (server_h): Append include/gdb/signals.h and signals_def.
14143 (server.o): Append signals_def.
14145 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14147 * server.c (handle_target_event): Use target_signal_to_host for
14148 resume_info.sig initialization.
14149 * target.h (struct thread_resume) <sig>: New comment.
14151 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14153 * server.c (handle_query): strcpy() the returned string from paddress()
14154 instead of sprintf().
14155 * utils.c (paddress): Return phex_nz().
14157 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14159 * server.c (handle_v_cont): Call mourn_inferior if process
14161 (myresume): Likewise.
14163 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14165 Static tracepoints, and integration with UST.
14167 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14168 * mem-break.c (uninsert_all_breakpoints)
14169 (reinsert_all_breakpoints): New.
14170 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14171 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14172 (gdb_agent_ust_loaded, helper_thread_id)
14173 (gdb_agent_helper_thread_id): New macros.
14174 (struct ipa_sym_addresses): Add addr_ust_loaded,
14175 addr_helper_thread_id, addr_cmd_buf.
14176 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14177 (in_process_agent_loaded_ust): New.
14178 (write_e_ust_not_loaded): New.
14179 (maybe_write_ipa_ust_not_loaded): New.
14180 (struct collect_static_trace_data_action): New.
14181 (enum tracepoint_type) <static_tracepoint>: New.
14182 (struct tracepoint) <handle>: Mention static tracepoints.
14183 (struct static_tracepoint_ctx): New.
14184 (CMD_BUF_SIZE): New.
14185 (add_tracepoint_action): Handle static tracepoint actions.
14186 (unprobe_marker_at): New.
14187 (clear_installed_tracepoints): Handle static tracepoints.
14188 (cmd_qtdp): Handle static tracepoints.
14189 (probe_marker_at): New.
14190 (cmd_qtstart): Handle static tracepoints.
14191 (response_tracepoint): Handle static tracepoints.
14192 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14193 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14194 (get_context_regcache): Handle static tracepoints.
14195 (do_action_at_tracepoint): Handle static tracepoint actions.
14196 (traceframe_find_block_type): Handle static trace data blocks.
14197 (traceframe_read_sdata): New.
14198 (download_tracepoints): Download static tracepoint actions.
14199 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14200 (GDB_PROBE_NAME): New.
14202 (GET_UST_SYM): New.
14205 (ust_marker_to_static_tracepoint): New.
14207 (collect_ust_data_at_tracepoint): New.
14208 (gdb_ust_probe): New.
14209 (UNIX_PATH_MAX, SOCK_DIR): New.
14210 (gdb_ust_connect_sync_socket): New.
14211 (resume_thread, stop_thread): New.
14212 (run_inferior_command): New.
14213 (init_named_socket): New.
14214 (gdb_ust_socket_init): New.
14215 (cstr_to_hexstr): New.
14217 (first_marker, next_marker): New.
14218 (response_ust_marker): New.
14219 (cmd_qtfstm, cmd_qtsstm): New.
14220 (unprobe_marker_at, probe_marker_at): New.
14221 (cmd_qtstmat, gdb_ust_thread): New.
14222 (gdb_ust_init): New.
14223 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14224 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14225 (ST_REGENTRY): New.
14226 (x86_64_st_collect_regmap): New.
14227 (X86_64_NUM_ST_COLLECT_GREGS): New.
14228 (AMD64_RIP_REGNUM): New.
14229 (supply_static_tracepoint_registers): New.
14230 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14231 (ST_REGENTRY): New.
14232 (i386_st_collect_regmap): New.
14233 (i386_NUM_ST_COLLECT_GREGS): New.
14234 (supply_static_tracepoint_registers): New.
14235 * server.c (handle_query): Handle qXfer:statictrace:read.
14236 <qSupported>: Report support for StaticTracepoints, and
14237 qXfer:statictrace:read features.
14238 * server.h (traceframe_read_sdata)
14239 (supply_static_tracepoint_registers): Declare.
14240 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14241 (unpack_varlen_hex): Include in IPA build.
14242 * Makefile.in (ustlibs, ustinc): New.
14243 (IPA_OBJS): Add remote-utils-ipa.o.
14244 ($(IPA_LIB)): Link -ldl and -lpthread.
14246 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14247 * config.in, configure: Regenerate.
14249 2010-06-20 Ian Lance Taylor <iant@google.com>
14250 Pedro Alves <pedro@codesourcery.com>
14252 * linux-x86-low.c (always_true): Delete.
14253 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14254 trying to fool the compiler with always_true.
14256 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14258 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14259 conditions in gdbserver.
14261 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14263 * spu-low.c (spu_read_memory): Wrap around local store limit.
14264 (spu_write_memory): Likewise.
14266 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14268 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14269 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14271 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14273 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14274 uses with LONGEST uses.
14276 2010-06-14 Stan Shebs <stan@codesourcery.com>
14277 Pedro Alves <pedro@codesourcery.com>
14281 * linux-x86-low.c: Include limits.h.
14283 (always_true): New.
14286 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14287 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14288 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14289 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14290 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14291 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14292 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14293 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14294 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14295 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14296 (amd64_emit_void_call_2): New.
14297 (amd64_emit_ops): New.
14298 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14299 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14300 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14301 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14302 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14303 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14304 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14305 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14306 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14307 (i386_emit_stack_adjust, i386_emit_int_call_1)
14308 (i386_emit_void_call_2): New.
14309 (i386_emit_ops): New.
14310 (x86_emit_ops): New.
14311 (the_low_target): Install x86_emit_ops.
14312 * server.h (struct emit_ops): New.
14313 (get_raw_reg_func_addr): Declare.
14314 (current_insn_ptr, emit_error): Declare.
14315 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14316 (set_trace_state_variable_value): New defines.
14317 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14318 addr_get_trace_state_variable_value and
14319 addr_set_trace_state_variable_value.
14320 (symbol_list): New fields for get_raw_reg,
14321 get_trace_state_variable_value and set_trace_state_variable_value.
14322 (condfn): New typedef.
14323 (struct tracepoint): New field `compiled_cond'.
14324 (do_action_at_tracepoint): Clear compiled_cond.
14325 (get_trace_state_variable_value, set_trace_state_variable_value):
14327 (condition_true_at_tracepoint): If there's a compiled condition,
14329 (current_insn_ptr, emit_error): New globals.
14330 (struct bytecode_address): New.
14331 (get_raw_reg_func_addr): New.
14332 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14333 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14334 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14335 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14336 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14337 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14338 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14339 (compile_tracepoint_condition, compile_bytecodes): New.
14340 * target.h (emit_ops): Forward declare.
14341 (struct target_ops): New field emit_ops.
14342 (target_emit_ops): New.
14343 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14344 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14345 * linux-low.c (linux_emit_ops): New.
14346 (linux_target_ops): Install it.
14347 * linux-low.h (struct linux_target_ops): New field emit_ops.
14349 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14351 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14352 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14354 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14355 Stan Shebs <stan@codesourcery.com>
14357 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14358 (all): Depend on $(extra_libraries).
14359 (install-only): Install the IPA.
14360 (IPA_OBJS, IPA_LIB): New.
14361 (clean): Remove the IPA lib.
14362 (IPAGENT_CFLAGS): New.
14363 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14364 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14365 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14366 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14367 * configure.ac: Check for atomic builtins support in the compiler.
14368 (IPA_DEPFILES, extra_libraries): Define.
14369 * configure.srv (ipa_obj): Add description.
14370 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14371 (i[34567]86-*-linux*): Set ipa_obj.
14372 (x86_64-*-linux*): Set ipa_obj.
14373 * linux-low.c (stabilizing_threads): New.
14374 (supports_fast_tracepoints): New.
14375 (linux_detach): Stabilize threads before detaching.
14376 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14377 the lwp is either not stabilizing, or is moving out of a jump pad.
14378 (linux_fast_tracepoint_collecting): New.
14379 (maybe_move_out_of_jump_pad): New.
14380 (enqueue_one_deferred_signal): New.
14381 (dequeue_one_deferred_signal): New.
14382 (linux_wait_for_event_1): If moving out of a jump pad, defer
14383 pending signals to later.
14384 (linux_stabilize_threads): New.
14385 (linux_wait_1): Check if threads need moving out of jump pads, and
14387 (stuck_in_jump_pad_callback): New.
14388 (move_out_of_jump_pad_callback): New.
14389 (lwp_running): New.
14390 (linux_resume_one_lwp): Handle moving out of jump pads.
14391 (linux_set_resume_request): Dequeue deferred signals.
14392 (need_step_over_p): Also step over fast tracepoint jumps.
14393 (start_step_over): Also uninsert fast tracepoint jumps.
14394 (finish_step_over): Also reinsert fast tracepoint jumps.
14395 (linux_install_fast_tracepoint_jump): New.
14396 (linux_target_ops): Install linux_stabilize_threads and
14397 linux_install_fast_tracepoint_jump_pad.
14398 * linux-low.h (linux_target_ops) <get_thread_area,
14399 install_fast_tracepoint_jump_pad>: New fields.
14400 (struct lwp_info) <collecting_fast_tracepoint,
14401 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14402 (linux_get_thread_area): Declare.
14403 * linux-x86-low.c (jump_insn): New.
14404 (x86_get_thread_area): New.
14405 (append_insns): New.
14406 (push_opcode): New.
14407 (amd64_install_fast_tracepoint_jump_pad): New.
14408 (i386_install_fast_tracepoint_jump_pad): New.
14409 (x86_install_fast_tracepoint_jump_pad): New.
14410 (the_low_target): Install x86_get_thread_area and
14411 x86_install_fast_tracepoint_jump_pad.
14412 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14413 (struct fast_tracepoint_jump): New.
14414 (fast_tracepoint_jump_insn): New.
14415 (fast_tracepoint_jump_shadow): New.
14416 (find_fast_tracepoint_jump_at): New.
14417 (fast_tracepoint_jump_here): New.
14418 (delete_fast_tracepoint_jump): New.
14419 (set_fast_tracepoint_jump): New.
14420 (uninsert_fast_tracepoint_jumps_at): New.
14421 (reinsert_fast_tracepoint_jumps_at): New.
14422 (set_breakpoint_at): Use write_inferior_memory.
14423 (uninsert_raw_breakpoint): Use write_inferior_memory.
14424 (check_mem_read): Mask out fast tracepoint jumps.
14425 (check_mem_write): Mask out fast tracepoint jumps.
14426 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14427 (set_fast_tracepoint_jump): Declare.
14428 (delete_fast_tracepoint_jump)
14429 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14430 (reinsert_fast_tracepoint_jumps_at): Declare.
14431 * regcache.c: Don't compile many functions when building the
14432 in-process agent library.
14433 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14434 the register buffer in the heap.
14435 (free_register_cache): If the register buffer isn't owned by the
14436 regcache, don't free it.
14437 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14438 pre-existing register caches.
14439 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14441 (convert_ascii_to_int): : Constify `from' parameter type.
14442 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14443 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14444 the needed buffer in-place.
14445 (relocate_instruction): New.
14446 * server.c (handle_query) <qSymbols>: If the target supports
14447 tracepoints, give it a chance of looking up symbols. Report
14448 support for fast tracepoints.
14449 (handle_status): Stabilize threads.
14450 (process_serial_event): Adjust.
14451 * server.h (struct fast_tracepoint_jump): Forward declare.
14452 (struct process_info) <fast_tracepoint_jumps>: New field.
14453 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14454 (decode_X_packet, decode_M_packet): Adjust.
14455 (relocate_instruction): Declare.
14456 (in_process_agent_loaded): Declare.
14457 (tracepoint_look_up_symbols): Declare.
14458 (struct fast_tpoint_collect_status): Declare.
14459 (fast_tracepoint_collecting): Declare.
14460 (force_unlock_trace_buffer): Declare.
14461 (handle_tracepoint_bkpts): Declare.
14462 (initialize_low_tracepoint)
14463 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14464 * target.h (struct target_ops) <stabilize_threads,
14465 install_fast_tracepoint_jump_pad>: New fields.
14466 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14467 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14468 [HAVE_STDINT_H]: Include stdint.h.
14469 (trace_debug_1): Rename to ...
14470 (trace_vdebug): ... this.
14471 (trace_debug): Rename to ...
14472 (trace_debug_1): ... this. Add `level' parameter.
14473 (trace_debug): New.
14474 (ATTR_USED, ATTR_NOINLINE): New.
14475 (IP_AGENT_EXPORT): New.
14476 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14477 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14478 (about_to_request_buffer_space, trace_buffer_is_full)
14479 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14480 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14481 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14482 (traceframe_write_count, traceframes_created)
14483 (trace_state_variables)
14484 New renaming defines.
14485 (struct ipa_sym_addresses): New.
14486 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14487 (symbol_list): New.
14488 (ipa_sym_addrs): New.
14489 (all_tracepoint_symbols_looked_up): New.
14490 (in_process_agent_loaded): New.
14491 (write_e_ipa_not_loaded): New.
14492 (maybe_write_ipa_not_loaded): New.
14493 (tracepoint_look_up_symbols): New.
14494 (debug_threads) [IN_PROCESS_AGENT]: New.
14495 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14496 (UNKNOWN_SIDE_EFFECTS): New.
14497 (stop_tracing): New.
14498 (flush_trace_buffer): New.
14499 (stop_tracing_bkpt): New.
14500 (flush_trace_buffer_bkpt): New.
14501 (read_inferior_integer): New.
14502 (read_inferior_uinteger): New.
14503 (read_inferior_data_pointer): New.
14504 (write_inferior_data_pointer): New.
14505 (write_inferior_integer): New.
14506 (write_inferior_uinteger): New.
14507 (struct collect_static_trace_data_action): Delete.
14508 (enum tracepoint_type): New.
14509 (struct tracepoint) <type>: New field `type'.
14510 <actions_str, step_actions, step_actions_str>: Only include in
14512 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14513 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14514 (tracepoints): Use IP_AGENT_EXPORT.
14515 (last_tracepoint): Don't include in the IPA.
14516 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14517 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14518 (alloced_trace_state_variables): New.
14519 (trace_state_variables): Use IP_AGENT_EXPORT.
14520 (traceframe_t): Delete unused variable.
14521 (circular_trace_buffer): Don't include in the IPA.
14522 (trace_buffer_start): Delete.
14523 (struct trace_buffer_control): New.
14524 (trace_buffer_free): Delete.
14525 (struct ipa_trace_buffer_control): New.
14526 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14527 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14529 (trace_buffer_ctrl): New.
14530 (TRACE_BUFFER_CTRL_CURR): New.
14531 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14532 Reimplement as macros.
14533 (trace_buffer_wrap): Delete.
14534 (traceframe_write_count, traceframe_read_count)
14535 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14536 (struct tracepoint_hit_ctx) <type>: New field.
14537 (struct fast_tracepoint_ctx): New.
14538 (memory_barrier): New.
14540 (record_tracepoint_error): Update atomically in the IPA.
14541 (clear_inferior_trace_buffer): New.
14542 (about_to_request_buffer_space): New.
14543 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14544 updating the same buffer.
14545 (add_tracepoint): Default the tracepoint's type to trap
14546 tracepoint, and orig_size to -1.
14547 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14548 internal variables.
14549 (create_trace_state_variable): New parameter `gdb'. Handle it.
14550 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14551 (cmd_qtdp): Handle fast tracepoints.
14552 (cmd_qtdv): Adjust.
14553 (max_jump_pad_size): New.
14554 (gdb_jump_pad_head): New.
14555 (get_jump_space_head): New.
14556 (claim_jump_space): New.
14557 (sort_tracepoints): New.
14558 (MAX_JUMP_SIZE): New.
14559 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14561 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14562 support. Upload fast traceframes, and delete internal IPA
14564 (stop_tracing_handler): New.
14565 (flush_trace_buffer_handler): New.
14566 (cmd_qtstop): Upload fast tracepoints.
14567 (response_tracepoint): Handle fast tracepoints.
14568 (tracepoint_finished_step): Upload fast traceframes. Set the
14569 tracepoint hit context's tracepoint type.
14570 (handle_tracepoint_bkpts): New.
14571 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14572 type. Add comment about fast tracepoints.
14573 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14574 non-existing action_str field.
14575 (get_context_regcache): Handle fast tracepoints.
14576 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14578 (fast_tracepoint_from_jump_pad_address): New.
14579 (fast_tracepoint_from_ipa_tpoint_address): New.
14580 (collecting_t): New.
14581 (force_unlock_trace_buffer): New.
14582 (fast_tracepoint_collecting): New.
14584 (gdb_collect): New.
14585 (write_inferior_data_ptr): New.
14586 (target_tp_heap): New.
14587 (target_malloc): New.
14588 (download_agent_expr): New.
14590 (download_tracepoints): New.
14591 (download_trace_state_variables): New.
14592 (upload_fast_traceframes): New.
14593 (IPA_FIRST_TRACEFRAME): New.
14594 (IPA_NEXT_TRACEFRAME_1): New.
14595 (IPA_NEXT_TRACEFRAME): New.
14596 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14597 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14598 (gdb_jump_pad_buffer_end): New.
14599 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14600 (initialize_tracepoint): Adjust.
14601 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14602 buffer. Initialize the low module.
14603 * utils.c (PREFIX, TOOLNAME): New.
14604 (malloc_failure): Use PREFIX.
14605 (error): In the IPA, an error causes an exit.
14606 (fatal, warning): Use PREFIX.
14607 (internal_error): Use TOOLNAME.
14608 (NUMCELLS): Increase to 10.
14609 * configure, config.in: Regenerate.
14611 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14613 * server.c (handle_query) <qSupported>: Do two passes over the
14614 qSupported string to avoid nesting strtok.
14616 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14618 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14620 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14621 -Wl,--dynamic-list.
14622 * configure: Regenerate.
14623 * proc-service.list: New.
14625 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14627 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14630 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14632 * gdbreplay.c (remote_open): Check error return from socket() call by
14633 its equality to -1 not by it being negative.
14634 * remote-utils.c (remote_open): Likewise.
14636 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14638 * config.h: Regenerate.
14640 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14642 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14643 doesn't provide PTRACE_GET_THREAD_AREA.
14645 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14647 * linux-m68k-low.c: Include <asm/ptrace.h>
14648 (ps_get_thread_area): Implement.
14650 2010-05-03 Doug Evans <dje@google.com>
14652 * event-loop.c (struct callback_event): New struct.
14653 (callback_list): New global.
14654 (append_callback_event, delete_callback_event): New functions.
14655 (process_callback): New function.
14656 (start_event_loop): Call it.
14657 * remote-utils.c (NOT_SCHEDULED): Define.
14658 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14659 moved out of readchar.
14660 (readchar): Rewrite. Call reschedule before returning.
14661 (reset_readchar): New function.
14662 (remote_close): Call it.
14663 (process_remaining, reschedule): New functions.
14664 * server.h (callback_handler_func): New typedef.
14665 (append_callback_event, delete_callback_event): Declare.
14667 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14669 * proc-service.c (ps_pglobal_lookup): Use
14670 thread_db_look_up_one_symbol.
14671 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14672 parameter. Use it instead of all_symbols_looked_up.
14673 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14675 (all_symbols_looked_up): Don't declare.
14676 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14677 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14679 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14680 Set all_symbols_looked_up here.
14681 (thread_db_look_up_one_symbol): New.
14682 (thread_db_get_tls_address): Adjust.
14683 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14684 thread_db object on the heap, and tentatively set it in the
14686 (thread_db_init): Don't set all_symbols_looked_up here.
14687 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14689 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14691 * linux-low.c (linux_kill, linux_detach): Adjust.
14692 (status_pending_p_callback): Remove redundant statement. Check
14693 for !TARGET_WAITIKIND_IGNORE, instead of
14694 TARGET_WAITKIND_STOPPED.
14695 (handle_tracepoints): Make sure LWP is locked. Adjust.
14696 (linux_wait_for_event_1): Adjust.
14697 (linux_cancel_breakpoints): New.
14698 (unsuspend_one_lwp): New.
14699 (unsuspend_all_lwps): New.
14700 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14701 (send_sigstop_callback): Change return type to int, add new
14702 `except' parameter and handle it.
14703 (suspend_and_send_sigstop_callback): New.
14704 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14705 pass them down. If SUSPEND, also increment the lwp's suspend
14707 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14708 (need_step_over_p): Don't consider suspended LWPs.
14709 (start_step_over): Adjust.
14710 (proceed_one_lwp): Change return type to int, add new `except'
14711 parameter and handle it.
14712 (unsuspend_and_proceed_one_lwp): New.
14713 (proceed_all_lwps): Use find_inferior instead of
14715 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14716 also decrement the suspend count of LWPs. Pass `except' down,
14717 instead of hacking its suspend count.
14718 (linux_pause_all): Add `freeze' parameter. Adjust.
14719 (linux_unpause_all): New.
14720 (linux_target_ops): Install linux_unpause_all.
14721 * server.c (handle_status): Adjust.
14722 * target.h (struct target_ops): New fields `unpause_all' and
14723 `cancel_breakpoints'. Add new parameter to `pause_all'.
14724 (pause_all): Add new `freeze' parameter.
14725 (unpause_all): New.
14726 (cancel_breakpoints): New.
14727 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14728 cancel breakpoints.
14729 (cmd_qtstart): Pause threads.
14730 (stop_tracing): Pause threads, and cancel breakpoints.
14731 * win32-low.c (win32_target_ops): Adjust.
14733 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14735 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14736 the inferior right away from here...
14737 (linux_wait_1): ... to here, and adjust to check the thread's
14738 last_resume_kind instead of the lwp's step or stop_expected flags.
14740 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14742 * README: Use consistent `GDB' and `GDBserver' spellings.
14744 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14746 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14747 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14748 (linux_detach_one_lwp): Assume the lwp is stopped.
14749 (any_thread_of): Delete.
14750 (linux_detach): Stop all lwps here. Don't blindly delete all
14752 (delete_lwp_callback): New.
14753 (linux_mourn): Delete all lwps of the process that is gone.
14754 (linux_wait_1): Don't delete the last lwp of the process here.
14755 * mem-break.h (mark_breakpoints_out): Declare.
14756 * mem-break.c (mark_breakpoints_out): New.
14757 (free_all_breakpoints): Use it.
14758 * server.c (handle_target_event): If the process is gone, mark
14760 * thread-db.c (struct thread_db) <create_bp>: New field.
14761 (thread_db_enable_reporting): Fix prototype. Store a thread event
14762 breakpoint reference in the thread_db struct.
14763 (thread_db_load_search): Clear the thread_db object.
14764 (try_thread_db_load_1): Ditto.
14765 (switch_to_process): New.
14766 (disable_thread_event_reporting): Use it.
14767 (remove_thread_event_breakpoints): New.
14768 (thread_db_detach, thread_db_mourn): Use it.
14770 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14772 * linux-low.c (linux_enable_event_reporting): New.
14773 (linux_wait_for_event_1, handle_extended_wait): Use it.
14775 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14777 * linux-low.c (linux_kill_one_lwp, linux_kill)
14778 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14779 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14780 SIGSTOP even if the LWP is stopped.
14781 (send_sigstop_callback): New.
14782 (stop_all_lwps): Use send_sigstop_callback instead.
14783 (linux_resume_one_thread): Adjust.
14784 (proceed_one_lwp): Still proceed an LWP that the client has
14785 requested to stop, if we haven't reported it as stopped yet. Make
14786 sure that LWPs the client want stopped, have a pending SIGSTOP.
14788 2010-04-26 Doug Evans <dje@google.com>
14790 * server.c (handle_general_set): Make static.
14792 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14793 Print received char after testing for error/eof instead of before.
14794 (input_interrupt): Tweak comment.
14796 2010-04-23 Doug Evans <dje@google.com>
14798 * server.c (start_inferior): Print inferior argv if --debug.
14800 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14802 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14803 * nto-x86-low.c: Include server.h
14805 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14807 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14808 be consistent with other sources of this directory.
14809 (init_registers_amd64): Correct name of source file of this function
14812 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14814 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14815 64-bit executables.
14817 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14819 * win32-i386-low.c: Add 64-bit support.
14820 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14821 (init_registers_amd64): Declare.
14822 (mappings): Add 64-bit version of array.
14823 (init_windows_x86): New function.
14824 (the_low_target): Change init_arch field to init_windows_x86.
14826 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14828 * win32-low.c: Adapt to support also 64-bit architecture.
14829 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14830 (get_image_name): Use SIZE_T type for local variable `done'.
14831 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14832 (toolhelp_get_dll_name): Idem.
14833 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14834 Use uintptr_t typecast to avoid warning.
14835 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14836 (handle_exception): Use phex_nz to avoid warning.
14837 (win32_wait): Remove unused local variable `process'.
14839 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14841 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14844 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14846 * configure.ac: Use `ws2_32' library for srv_mingw.
14847 * configure: Regenerate.
14848 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14849 * remote-utils.c: Likewise.
14851 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14853 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14854 if __x86_64__ is defined.
14856 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14858 * configure: Regenerate.
14860 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14862 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14863 * target.h (target_ops): New get_tib_address field.
14864 * win32-low.h (win32_thread_info): Add thread_local_base field.
14865 * win32-low.c (child_add_thread): Add tlb argument.
14866 Set thread_local_base field to TLB.
14867 (get_child_debug_event): Adapt to child_add_thread change.
14868 (win32_get_tib_address): New function.
14869 (win32_target_ops): Set get_tib_address field to
14870 win32_get_tib_address.
14871 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14873 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14875 * linux-low.c (linux_mourn): Also remove the process.
14876 * server.c (handle_target_event): Don't remove the process here.
14877 * nto-low.c (nto_mourn): New.
14878 (nto_target_ops): Install it.
14879 * spu-low.c (spu_mourn): New.
14880 (spu_target_ops): Install it.
14881 * win32-low.c (win32_mourn): New.
14882 (win32_target_ops): Install it.
14884 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14886 * server.h (buffer_xml_printf): Remove redundant `;'.
14888 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14890 * regcache.c (set_register_cache): Invalidate regcaches before
14891 changing the register cache layout.
14892 (regcache_invalidate_one): Allow a NULL regcache.
14893 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14894 regcaches before changing the register cache layout or the target
14897 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14899 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14900 variable warning on Linux/x86-64.
14902 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14904 GDBserver disconnected tracing support.
14906 * linux-low.c (linux_remove_process): Delete.
14907 (add_lwp): Don't set last_resume_kind here.
14908 (linux_kill): Use `mourn'.
14909 (linux_detach): Use `thread_db_detach', and `mourn'.
14910 (linux_mourn): New.
14911 (linux_attach_lwp_1): Adjust comment.
14912 (linux_attach): last_resume_kind moved the thread_info; adjust.
14913 (status_pending_p_callback): Adjust.
14914 (linux_wait_for_event_1): Adjust.
14915 (count_events_callback, select_singlestep_lwp_callback)
14916 (select_event_lwp_callback, cancel_breakpoints_callback)
14917 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14918 (proceed_one_lwp): Adjust.
14919 (linux_async): Add debug output.
14920 (linux_thread_stopped): New.
14921 (linux_pause_all): New.
14922 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14924 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14925 (thread_db_free): Delete declaration.
14926 (thread_db_detach, thread_db_mourn): Declare.
14927 * thread-db.c (thread_db_init): Use thread_db_mourn.
14928 (thread_db_free): Delete, split in two.
14929 (disable_thread_event_reporting): New.
14930 (thread_db_detach): New.
14931 (thread_db_mourn): New.
14933 * server.h (struct thread_info) <last_resume_kind>: New field.
14934 <attached>: Add comment.
14935 <gdb_detached>: New field.
14936 (handler_func): Change return type to int.
14937 (handle_serial_event, handle_target_event): Ditto.
14938 (gdb_connected): Declare.
14940 (disconnected_tracing): Declare.
14941 (stop_tracing): Declare.
14943 * server.c (handle_query) <qSupported>: Report support for
14944 disconnected tracing.
14945 (queue_stop_reply_callback): Account for running threads.
14946 (gdb_wants_thread_stopped): New.
14947 (gdb_wants_all_threads_stopped): New.
14948 (gdb_reattached_process): New.
14949 (handle_status): Clear the `gdb_detached' flag of all processes.
14950 In all-stop, stop all threads.
14951 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14952 (process_serial_event): If the remote connection breaks, or if an
14953 exit was forced with "monitor exit", force an event loop exit.
14954 Handle disconnected tracing on detach.
14955 (handle_serial_event): Adjust.
14956 (handle_target_event): If GDB isn't connected, forward events back
14957 to the inferior, unless the last process exited, in which case,
14958 exit gdbserver. Adjust interface.
14960 * remote-utils.c (remote_open): Don't block in accept. Instead
14961 register an event loop source on the listen socket file
14962 descriptor. Refactor bits into ...
14963 (listen_desc): ... this new global.
14964 (gdb_connected): ... this new function.
14965 (enable_async_notification): ... this new function.
14966 (handle_accept_event): ... this new function.
14967 (remote_close): Clear remote_desc.
14969 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14971 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14973 (mourn_inferior): Define.
14974 (target_process_qsupported): Avoid the dangling else problem.
14975 (thread_stopped): Define.
14976 (pause_all): Define.
14977 (target_waitstatus_to_string): Declare.
14978 * target.c (target_waitstatus_to_string): New.
14980 * tracepoint.c (tracing): Make extern.
14981 (disconnected_tracing): New.
14982 (stop_tracing): Make extern. Handle tracing stops due to GDB
14984 (cmd_qtdisconnected): New.
14985 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14986 (handle_tracepoint_general_set): Handle QTDisconnected.
14988 * event-loop.c (event_handler_func): Change return type to int.
14989 (process_event): Bail out if the event handler wants the event
14991 (handle_file_event): Ditto.
14992 (start_event_loop): Bail out if the event handler wants the event
14995 * nto-low.c (nto_target_ops): Adjust.
14996 * spu-low.c (spu_wait): Don't remove the process here.
14997 (spu_target_ops): Adjust.
14998 * win32-low.c (win32_wait): Don't remove the process here.
14999 (win32_target_ops): Adjust.
15001 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15003 * regcache.c (realloc_register_cache): Invalidate inferior's
15004 regcache before recreating it.
15006 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15008 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15010 2010-04-09 Stan Shebs <stan@codesourcery.com>
15011 Pedro Alves <pedro@codesourcery.com>
15013 * server.h (LONGEST): New.
15014 (struct thread_info) <while_stepping>: New field.
15015 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15017 (initialize_tracepoint, handle_tracepoint_general_set)
15018 (handle_tracepoint_query, tracepoint_finished_step)
15019 (tracepoint_was_hit, release_while_stepping_state_list):
15020 (current_traceframe): Declare.
15021 * server.c (handle_general_set): Handle tracepoint packets.
15022 (read_memory): New.
15023 (write_memory): New.
15024 (handle_search_memory_1): Use read_memory.
15025 (handle_query): Report support for conditional tracepoints, trace
15026 state variables, and tracepoint sources. Handle tracepoint
15028 (main): Initialize the tracepoints module.
15029 (process_serial_event): Handle traceframe reads/writes.
15031 * linux-low.c (handle_tracepoints): New.
15032 (linux_wait_1): Call it.
15033 (linux_resume_one_lwp): Handle while-stepping.
15034 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15035 (linux_target_ops): Install them.
15036 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15038 * linux-x86-low.c (x86_supports_tracepoints): New.
15039 (the_low_target). Install it.
15041 * mem-break.h (delete_breakpoint): Declare.
15042 * mem-break.c (delete_breakpoint): Make external.
15044 * target.h (struct target_ops): Add `supports_tracepoints',
15045 `read_pc', and `write_pc' fields.
15046 (target_supports_tracepoints): Define.
15047 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15050 * regcache.h (struct regcache) <registers_owned>: New field.
15051 (init_register_cache, regcache_cpy): Declare.
15052 (regcache_read_pc, regcache_write_pc): Declare.
15053 (register_cache_size): Declare.
15054 (supply_regblock): Declare.
15055 * regcache.c (init_register_cache): New.
15056 (new_register_cache): Use it.
15057 (regcache_cpy): New.
15058 (register_cache_size): New.
15059 (supply_regblock): New.
15060 (regcache_read_pc, regcache_write_pc): New.
15062 * tracepoint.c: New.
15064 * Makefile.in (OBS): Add tracepoint.o.
15065 (tracepoint.o): New rule.
15067 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15069 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15071 (i386-mmx.c): Likewise.
15072 (i386-mmx-linux.o): Likewise.
15073 (i386-mmx-linux.c): Likewise.
15075 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15076 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15077 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15078 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15080 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15081 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15082 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15084 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15086 * Makefile.in (clean): Updated.
15088 (i386-avx.c): Likewise.
15089 (i386-avx-linux.o): Likewise.
15090 (i386-avx-linux.c): Likewise.
15091 (amd64-avx.o): Likewise.
15092 (amd64-avx.c): Likewise.
15093 (amd64-avx-linux.o): Likewise.
15094 (amd64-avx-linux.c): Likewise.
15096 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15097 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15098 (srv_amd64_regobj): Add amd64-avx.o.
15099 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15100 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15101 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15102 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15103 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15104 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15105 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15107 * i387-fp.c: Include "i386-xstate.h".
15109 (i387_cache_to_xsave): Likewise.
15110 (i387_xsave_to_cache): Likewise.
15111 (x86_xcr0): Likewise.
15113 * i387-fp.h (i387_cache_to_xsave): Likewise.
15114 (i387_xsave_to_cache): Likewise.
15115 (x86_xcr0): Likewise.
15117 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15118 * linux-crisv32-low.c (target_regsets): Likewise.
15119 * linux-m68k-low.c (target_regsets): Likewise.
15120 * linux-mips-low.c (target_regsets): Likewise.
15121 * linux-ppc-low.c (target_regsets): Likewise.
15122 * linux-s390-low.c (target_regsets): Likewise.
15123 * linux-sh-low.c (target_regsets): Likewise.
15124 * linux-sparc-low.c (target_regsets): Likewise.
15125 * linux-xtensa-low.c (target_regsets): Likewise.
15127 * linux-low.c: Include <sys/uio.h>.
15128 (regsets_fetch_inferior_registers): Support nt_type.
15129 (regsets_store_inferior_registers): Likewise.
15130 (linux_process_qsupported): New.
15131 (linux_target_ops): Add linux_process_qsupported.
15133 * linux-low.h (regset_info): Add nt_type.
15134 (linux_target_ops): Add process_qsupported.
15136 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15138 (init_registers_i386_avx_linux): New.
15139 (init_registers_amd64_avx_linux): Likewise.
15140 (xmltarget_i386_linux_no_xml): Likewise.
15141 (xmltarget_amd64_linux_no_xml): Likewise.
15142 (PTRACE_GETREGSET): Likewise.
15143 (PTRACE_SETREGSET): Likewise.
15144 (x86_fill_xstateregset): Likewise.
15145 (x86_store_xstateregset): Likewise.
15146 (use_xml): Likewise.
15147 (x86_linux_update_xmltarget): Likewise.
15148 (x86_linux_process_qsupported): Likewise.
15149 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15150 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15151 init_registers_i386_linux here. Call
15152 x86_linux_update_xmltarget.
15153 (the_low_target): Add x86_linux_process_qsupported.
15155 * server.c (handle_query): Call target_process_qsupported.
15157 * target.h (target_ops): Add process_qsupported.
15158 (target_process_qsupported): New.
15160 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15162 * inferiors.c (add_thread): Set last_status kind to
15163 TARGET_WAITKIND_IGNORE.
15164 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15165 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15166 (linux_wait_1): Move `thread' local definition to block that uses
15167 it. Don't NULL initialize `event_child'.
15168 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15169 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15170 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15172 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15174 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15175 an extended waitstatus, or by a watchpoint.
15176 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15177 thread was stepping or has been stopped by a watchpoint.
15179 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15181 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15182 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15183 of another, then delete the previous, and validate all
15185 (validate_inserted_breakpoint): New.
15186 (delete_disabled_breakpoints): New.
15187 (validate_breakpoints): New.
15188 (check_mem_read): Validate breakpoints before trusting their
15189 shadow. Delete disabled breakpoints.
15190 (check_mem_write): Validate breakpoints before trusting they
15191 should be inserted. Delete disabled breakpoints.
15192 * mem-break.h (validate_breakpoints):
15193 * server.c (handle_query): Validate breakpoints when we see a
15196 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15198 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15199 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15200 if we could tell there's a GDB breakpoint at stop_pc.
15201 (need_step_over_p): Don't do a step over if we find a GDB
15202 breakpoint at the resume PC.
15204 * mem-break.c (struct raw_breakpoint): New.
15205 (enum bkpt_type): New type `gdb_breakpoint'.
15206 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15207 fields. New field `raw'.
15208 (find_raw_breakpoint_at): New.
15209 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15210 breakpoint instead.
15211 (set_breakpoint_at): Adjust.
15212 (delete_raw_breakpoint): New.
15213 (release_breakpoint): New.
15214 (delete_breakpoint): Rename to...
15215 (delete_breakpoint_1): ... this. Add proc parameter. Use
15216 release_breakpoint. Return ENOENT.
15217 (delete_breakpoint): Reimplement.
15218 (find_breakpoint_at): Delete.
15219 (find_gdb_breakpoint_at): New.
15220 (delete_breakpoint_at): Delete.
15221 (set_gdb_breakpoint_at): New.
15222 (delete_gdb_breakpoint_at): New.
15223 (gdb_breakpoint_here): New.
15224 (set_reinsert_breakpoint): Use release_breakpoint.
15225 (uninsert_breakpoint): Rename to ...
15226 (uninsert_raw_breakpoint): ... this.
15227 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15228 (reinsert_raw_breakpoint): Change parameter type to
15230 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15232 (check_breakpoints): Adjust. Use release_breakpoint.
15233 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15234 (breakpoint_inserted_here): Ditto.
15235 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15236 Don't trust the breakpoint's shadow if it is not inserted.
15237 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15238 (delete_all_breakpoints): Adjust.
15239 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15240 use delete_breakpoint_1.
15242 * mem-break.h (breakpoints_supported): Delete declaration.
15243 (set_gdb_breakpoint_at): Declare.
15244 (gdb_breakpoint_here): Declare.
15245 (delete_breakpoint_at): Delete.
15246 (delete_gdb_breakpoint_at): Declare.
15248 * server.h (struct raw_breakpoint): Forward declare.
15249 (struct process_info): New field `raw_breakpoints'.
15251 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15254 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15256 * linux-low.c (status_pending_p_callback): Fix comment.
15257 (linux_wait_for_event_1): Move most of the internal breakpoint
15258 handling from here...
15259 (linux_wait_1): ... to here.
15260 (count_events_callback): New.
15261 (select_singlestep_lwp_callback): New.
15262 (select_event_lwp_callback): New.
15263 (cancel_breakpoints_callback): New.
15264 (select_event_lwp): New.
15265 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15266 priority to all LWPs that have had events that should be reported
15267 to the client. Cancel breakpoints when about to reporting the
15268 event to the client, not while stopping lwps. No longer cancel
15269 finished single-steps here.
15270 (cancel_finished_single_step): Delete.
15271 (cancel_finished_single_steps): Delete.
15273 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15275 * mem-break.c (enum bkpt_type): New.
15276 (struct breakpoint): New field `type'.
15277 (set_breakpoint_at): Change return type to struct breakpoint
15278 pointer. Set type to `other_breakpoint' by default.
15279 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15280 in the breakpoint list.
15281 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15282 (reinsert_breakpoint): Rename to ...
15283 (reinsert_raw_breakpoint): ... this.
15284 (reinsert_breakpoints_at): Adjust.
15285 * mem-break.h (struct breakpoint): Declare.
15286 (set_breakpoint_at): Change return type to struct breakpoint
15289 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15291 * server.c (handle_query): Assign, not compare.
15293 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15295 Teach linux gdbserver to step-over-breakpoints.
15297 * linux-low.c (can_hardware_single_step): New.
15298 (supports_breakpoints): New.
15299 (handle_extended_wait): If stopping threads, read the stop pc of
15300 the new cloned LWP.
15302 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15303 low target doesn't support retrieving the PC.
15304 (add_lwp): Set last_resume_kind to resume_continue.
15305 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15306 (linux_attach): Don't clear stop_expected. Set the lwp's
15307 last_resume_kind to resume_stop.
15308 (linux_detach_one_lwp): Don't check for removed breakpoints.
15309 (check_removed_breakpoint): Delete.
15310 (status_pending_p): Rename to ...
15311 (status_pending_p_callback): ... this. Don't check for removed
15312 breakpoints. Don't consider threads that are stopped from GDB's
15314 (linux_wait_for_lwp): Always read the stop_pc here.
15315 (cancel_breakpoint): New.
15316 (step_over_bkpt): New global.
15317 (linux_wait_for_event_1): Implement stepping over breakpoints.
15318 (gdb_wants_lwp_stopped): New.
15319 (gdb_wants_all_stopped): New.
15320 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15321 single-step traps here. Store the thread's last reported target
15323 (send_sigstop): Don't clear stop_expected. Always set it,
15325 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15326 (cancel_finished_single_step): New.
15327 (cancel_finished_single_steps): New.
15328 (wait_for_sigstop): Don't cancel finished single-step traps here.
15329 (linux_resume_one_lwp): Don't check for removed breakpoints.
15330 Don't set `step' on non-hardware step archs.
15331 (linux_set_resume_request): Ignore resume_stop requests if already
15332 stopping or stopped. Set the lwp's last_resume_kind.
15333 (resume_status_pending_p): Don't check for removed breakpoints.
15334 (need_step_over_p): New.
15335 (start_step_over): New.
15336 (finish_step_over): New.
15337 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15338 requests. Clear the thread's last reported target waitstatus.
15339 Don't use the `suspended' flag. Don't consider pending breakpoints.
15340 (linux_resume): Start a step-over if necessary.
15341 (proceed_one_lwp): New.
15342 (proceed_all_lwps): New.
15343 (unstop_all_lwps): New.
15344 * linux-low.h (struct lwp_info): Rewrite comment for the
15345 `suspended' flag. Add the `stop_pc' field. Delete the
15346 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15347 Add `'last_resume_kind' and `need_step_over' fields.
15348 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15349 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15350 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15351 (set_raw_breakpoint_at): New.
15352 (set_breakpoint_at): Rewrite to use it.
15353 (reinsert_breakpoint_handler): Delete.
15354 (set_reinsert_breakpoint): New.
15355 (reinsert_breakpoint_by_bp): Delete.
15356 (delete_reinsert_breakpoints): New.
15357 (uninsert_breakpoint): Rewrite.
15358 (uninsert_breakpoints_at): New.
15359 (reinsert_breakpoint): Rewrite.
15360 (reinsert_breakpoints_at): New.
15361 (check_breakpoints): Rewrite.
15362 (breakpoint_here): New.
15363 (breakpoint_inserted_here): New.
15364 (check_mem_read): Adjust.
15365 * mem-break.h (breakpoints_supported, breakpoint_here)
15366 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15367 (reinsert_breakpoint_by_bp): Delete declaration.
15368 (delete_reinsert_breakpoints): Declare.
15369 (reinsert_breakpoint): Delete declaration.
15370 (reinsert_breakpoints_at): Declare.
15371 (uninsert_breakpoint): Delete declaration.
15372 (uninsert_breakpoints_at): Declare.
15373 (check_breakpoints): Adjust prototype.
15374 * server.h: Adjust include order.
15375 (struct thread_info): Declare here. Add a `last_status' field.
15377 2010-03-23 Michael Snyder <msnyder@vmware.com>
15379 * server.c (crc32): New function.
15380 (handle_query): Add handling for 'qCRC:' request.
15382 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15384 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15385 lwp had been stopped by a watchpoint.
15387 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15389 * server.h (internal_error): Declare.
15390 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15391 * utils.c (internal_error): New function.
15393 2010-03-15 Andreas Schwab <schwab@redhat.com>
15395 * configure.srv: Fix typo setting srv_regobj.
15397 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15399 * linux-low.c (fetch_register): Avoid passing a non string literal
15401 (usr_store_inferior_registers): Ditto.
15403 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15405 * linux-low.c (linux_write_memory): Bail out early if peeking
15408 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15410 * linux-low.h (struct lwp_info): New fields
15411 `stopped_by_watchpoint' and `stopped_data_address'.
15412 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15413 here, and cache them in the lwp object.
15414 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15416 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15418 (linux_stopped_by_watchpoint): Rewrite.
15419 (linux_stopped_data_address): Rewrite.
15421 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15423 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15424 switching the current inferior, not before.
15426 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15428 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15429 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15430 i386-linux.c and amd64-linux.c.
15431 (reg-i386.o): Removed.
15432 (reg-i386.c): Likewise.
15433 (reg-i386-linux.o): Likewise.
15434 (reg-i386-linux.c): Likewise.
15435 (reg-x86-64.o): Likewise.
15436 (reg-x86-64.c): Likewise.
15437 (reg-x86-64-linux.o): Likewise.
15438 (reg-x86-64-linux.c): Likewise.
15440 (i386.c): Likewise.
15441 (i386-linux.o): Likewise.
15442 (i386-linux.c): Likewise.
15443 (amd64.o): Likewise.
15444 (amd64.c): Likewise.
15445 (amd64-linux.o): Likewise.
15446 (amd64-linux.c): Likewise.
15448 * configure.srv (srv_i386_regobj): New.
15449 (srv_i386_linux_regobj): Likewise.
15450 (srv_amd64_regobj): Likewise.
15451 (srv_amd64_linux_regobj): Likewise.
15452 (srv_i386_32bit_xmlfiles): Likewise.
15453 (srv_i386_64bit_xmlfiles): Likewise.
15454 (srv_i386_xmlfiles): Likewise.
15455 (srv_amd64_xmlfiles): Likewise.
15456 (srv_i386_linux_xmlfiles): Likewise.
15457 (srv_amd64_linux_xmlfiles): Likewise.
15458 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15459 srv_xmlfiles to $srv_i386_xmlfiles.
15460 (i[34567]86-*-mingw32ce*): Likewise.
15461 (i[34567]86-*-mingw*): Likewise.
15462 (i[34567]86-*-nto*): Likewise.
15463 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15464 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15465 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15466 (x86_64-*-linux*): Likewise.
15468 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15469 (init_registers_amd64_linux): New.
15470 (x86_arch_setup): Replace init_registers_x86_64_linux with
15471 init_registers_amd64_linux.
15473 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15475 * configure.ac: Check for libdl. If it is not available link against
15476 static libthread_db.
15477 * configure: Regenerate.
15479 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15483 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15484 handing a read watchpoint.
15485 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15487 2010-02-12 Doug Evans <dje@google.com>
15489 * linux-low.c (linux_supports_tracefork_flag): Document.
15490 (linux_look_up_symbols): Add comment.
15492 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15494 * regcache.c (supply_register): Clear regcache if buf is NULL.
15496 2010-02-02 Nicolas Roche <roche@sourceware.org>
15497 Joel Brobecker <brobecker@adacore.com>
15499 * inferiors.c (find_inferior): Add function documentation.
15500 (unloaded_dll): Handle the case where the unloaded dll has not
15501 been previously registered in the dll list.
15503 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15505 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15506 (thumb2_breakpoint): New.
15507 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15509 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15511 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15512 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15515 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15517 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15519 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15521 * linux-s390-low.c (s390_collect_ptrace_register)
15522 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15524 2010-01-21 Doug Evans <dje@google.com>
15526 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15527 (PTRACE_ARG4_TYPE): New macro.
15528 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15529 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15530 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15531 (usr_store_inferior_registers): Ditto.
15532 (linux_read_memory, linux_write_memory): Ditto.
15533 (linux_test_for_tracefork): Ditto.
15535 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15536 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15538 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15540 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15543 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15545 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15546 prototype to take a regcache. Adjust.
15548 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15550 * regcache.h (struct thread_info): Forward declare.
15551 (struct regcache): New.
15552 (new_register_cache): Adjust prototype.
15553 (get_thread_regcache): Declare.
15554 (free_register_cache): Adjust prototype.
15555 (registers_to_string, registers_from_string): Ditto.
15556 (supply_register, supply_register_by_name, collect_register)
15557 (collect_register_as_string, collect_register_by_name): Ditto.
15558 * regcache.c (struct inferior_regcache_data): Delete.
15559 (get_regcache): Rename to ...
15560 (get_thread_regcache): ... this. Adjust. Switch inferior before
15561 fetching registers.
15562 (regcache_invalidate_one): Adjust.
15563 (regcache_invalidate): Fix prototype.
15564 (new_register_cache): Return the new register cache.
15565 (free_register_cache): Change prototype.
15566 (realloc_register_cache): Adjust.
15567 (registers_to_string): Change prototype to take a regcache. Adjust.
15568 (registers_from_string): Ditto.
15569 (register_data): Ditto.
15570 (supply_register): Ditto.
15571 (supply_register_by_name): Ditto.
15572 (collect_register): Ditto.
15573 (collect_register_as_string): Ditto.
15574 (collect_register_by_name): Ditto.
15575 * server.c (process_serial_event): Adjust.
15576 * linux-low.h (regset_fill_func, regset_store_func): Change
15578 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15580 * linux-low.c (get_stop_pc): Adjust.
15581 (check_removed_breakpoint): Adjust.
15582 (linux_wait_for_event): Adjust.
15583 (linux_resume_one_lwp): Adjust.
15584 (fetch_register): Add regcache parameter. Adjust.
15585 (usr_store_inferior_registers): Ditto.
15586 (regsets_fetch_inferior_registers): Ditto.
15587 (regsets_store_inferior_registers): Ditto.
15588 (linux_fetch_registers, linux_store_registers): Ditto.
15589 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15591 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15593 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15594 prototype to take a regcache.
15595 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15596 * remote-utils.c (convert_ascii_to_int, outreg)
15597 (prepare_resume_reply): Change prototype to take a regcache.
15599 * target.h (struct target_ops) <fetch_registers, store_registers>:
15600 Change prototype to take a regcache.
15601 (fetch_inferior_registers, store_inferior_registers): Change
15602 prototype to take a regcache. Adjust.
15603 * proc-service.c (ps_lgetregs): Adjust.
15604 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15605 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15606 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15607 take a regcache. Adjust.
15608 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15609 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15610 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15611 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15612 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15613 (cris_cannot_fetch_register):
15614 (cris_breakpoint_at): Change prototype to take a regcache.
15616 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15617 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15618 to take a regcache. Adjust.
15619 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15621 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15622 take a regcache. Adjust.
15623 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15624 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15625 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15626 * linux-mips-low.c (mips_get_pc):
15627 (mips_set_pc): Change prototype to take a regcache. Adjust.
15628 (mips_reinsert_addr): Adjust.
15629 (mips_collect_register): Change prototype to take a regcache.
15631 (mips_supply_register):
15632 (mips_collect_register_32bit, mips_supply_register_32bit)
15633 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15634 (mips_store_fpregset): Ditto.
15635 * linux-ppc-low.c (ppc_supply_ptrace_register)
15636 (ppc_supply_ptrace_register): Ditto.
15637 (parse_spufs_run): Adjust.
15638 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15639 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15640 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15641 take a regcache. Adjust.
15642 * linux-s390-low.c (s390_collect_ptrace_register)
15643 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15644 (s390_set_pc): Change prototype to take a regcache. Adjust.
15645 (s390_arch_setup): Adjust.
15646 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15647 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15648 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15649 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15650 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15652 (sparc_breakpoint_at): Adjust.
15653 * linux-xtensa-low.c (xtensa_fill_gregset):
15654 (xtensa_store_gregset):
15655 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15656 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15657 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15658 prototype to take a regcache. Adjust.
15659 * win32-arm-low.c (arm_fetch_inferior_register)
15660 (arm_store_inferior_register): Change prototype to take a
15662 * win32-i386-low.c (i386_fetch_inferior_register)
15663 (i386_store_inferior_register): Change prototype to take a
15665 * win32-low.c (child_fetch_inferior_registers)
15666 (child_store_inferior_registers): Change prototype to take a
15668 (win32_wait): Adjust.
15669 (win32_fetch_inferior_registers): Change prototype to take a
15671 (win32_store_inferior_registers): Adjust.
15672 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15673 store_inferior_register>: Change prototype to take a regcache.
15675 2010-01-20 Doug Evans <dje@google.com>
15677 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15679 (linux_wait_for_event1, linux_init_signals): Ditto.
15680 (W_STOPCODE): Provide definition if missing.
15682 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15684 * linux-low.c (linux_core_of_thread): New.
15685 (compare_ints, show_process, list_threads): New.
15686 (linux_qxfer_osdata): Report threads and cores.
15687 (linux_target_op): Register linux_core_of_thread.
15688 * remote-utils.c (prepare_resume_reply): Report the core.
15689 (buffer_xml_printf): Support %d specifier.
15690 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15692 (handle_query): Handle qXfer:threads. Announce availability
15694 * target.h (struct target_ops): New field core_of_thread.
15696 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15698 * Makefile.in (clean): Remove new generated files.
15699 (reg-s390.o, reg-s390.c): Remove rules.
15700 (reg-s390x.o, reg-s390x.c): Likewise.
15701 (s390-linux32.o, s390-linux32.c): Add rules.
15702 (s390-linux64.o, s390-linux64.c): Likewise.
15703 (s390x-linux64.o, s390x-linux64.c): Likewise.
15704 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15705 * linux-s390-low.c: Include <elf.h>.
15706 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15707 (init_registers_s390): Remove prototype.
15708 (init_registers_s390x): Likewise.
15709 (init_registers_s390_linux32): Add prototype.
15710 (init_registers_s390_linux64): Likewise.
15711 (init_registers_s390x_linux64): Likewise.
15712 (s390_num_regs_3264): New define.
15713 (s390_regmap_3264): New global variable.
15714 (s390_cannot_fetch_register): Remove obsolete check.
15715 (s390_cannot_store_register): Likewise.
15716 (s390_collect_ptrace_register): Handle upper/lower register halves.
15717 (s390_supply_ptrace_register): Likewise.
15718 (s390_fill_gregset): Update to register number changes.
15719 (s390_get_hwcap): New routine.
15720 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15721 Install appropriate regmap and register set.
15723 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15725 * server.c (gdbserver_version): Update copyright year to 2010.
15726 * gdbreplay.c (gdbreplay_version): Likewise.
15728 2009-12-28 Doug Evans <dje@google.com>
15730 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15731 elf/external.h. Include <elf.h> instead but only if necessary.
15733 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15735 * linux-low.c (linux_remove_process): Remove `detaching'
15736 parameter. Don't release/detach from thread_db here.
15737 (linux_kill): Release/detach from thread_db here, ...
15738 (linux_detach): ... and here, before actually detaching.
15739 (linux_wait_1): ... and here, when a process exits.
15740 * thread-db.c (any_thread_of): New.
15741 (thread_db_free): Switch the current inferior to a thread of the
15744 2009-12-21 Doug Evans <dje@google.com>
15746 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15748 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15749 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15750 warning ifndef __NR_tkill. Move setting of errno there too.
15751 Delete unnecessary resetting of errno after syscall.
15752 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15754 * configure.ac: Check for dladdr.
15755 * config.in: Regenerate.
15756 * configure: Regenerate.
15757 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15758 (try_thread_db_load): Update.
15760 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15762 2009-12-18 Doug Evans <dje@google.com>
15764 * event-loop.c: Include unistd.h if it exists.
15766 * linux-low.c (my_waitpid): Move definition away from being in
15767 between linux_tracefork_child/linux_test_for_tracefork.
15769 * gdb_proc_service.h (psaddr_t): Fix type.
15770 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15771 signature to match glibc.
15773 2009-12-16 Doug Evans <dje@google.com>
15775 * linux-low.c (linux_read_memory): Fix argument to read.
15777 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15779 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15780 events, don't leave current_inferior pointing at null.
15782 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15784 * win32-low.c (LOG): Delete.
15785 (OUTMSG): Output to stderr.
15786 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15787 on compile time LOG macro.
15788 (win32_wait): Fix debug output.
15790 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15792 * win32-low.c (win32_add_one_solib): If the dll name is
15793 "ntdll.dll", prepend the system directory to the dll path.
15795 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15797 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15799 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15800 Vladimir Prus <vladimir@codesourcery.com>
15802 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15803 * configure.ac: Check for __mcoldfire__ and set
15804 gdb_cv_m68k_is_coldfire.
15805 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15806 reg-cf.o and reg-m68k.o.
15807 * configure: Regenerated.
15809 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15811 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15812 Pass it to thread_db_free.
15813 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15814 proper `detaching' argument to linux_remove_process.
15815 * linux-low.h (thread_db_free): Add `detaching' parameter.
15816 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15818 (thread_db_free): Add `detaching' parameter. Only
15819 call td_ta_clear_event if detaching from process.
15821 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15823 * thread-db.c (thread_db_free): Fix typo.
15825 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15828 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15830 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15832 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15833 with an i686 compiler.
15834 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15836 * configure: Rebuilt.
15838 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15842 * server.c (handle_search_memory_1): Correct read_addr initialization
15843 in loop for searching subsequent chunks.
15845 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15847 * configure.ac: New --with-libthread-db option.
15848 * thread-db.c: Allow direct dependence on libthread_db.
15849 (thread_db_free): Adjust.
15850 * config.in: Regenerate.
15851 * configure: Likewise.
15853 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15856 * thread-db.c (attach_thread): New function.
15857 (maybe_attach_thread): Return success/failure.
15858 (find_new_threads_callback): Adjust.
15859 (thread_db_find_new_threads): Loop until no new threads.
15861 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15863 * proc-service.c (ps_lgetregs): Formatting.
15865 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15867 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15868 * configure.ac: Adjust.
15869 * linux-low.h (struct process_info_private): Move members to struct
15871 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15872 * linux-low.c (linux_remove_process): Adjust.
15873 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15874 * server.c (handle_query): Move code ...
15875 (handle_monitor_command): ... here. New function.
15876 * target.h (struct target_ops): New member.
15877 * thread-db.c (struct thread_db): New.
15878 (libthread_db_search_path): New variable.
15879 (thread_db_create_event, thread_db_enable_reporting)
15880 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15881 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15882 (try_thread_db_load_1, dladdr_to_soname): New functions.
15883 (try_thread_db_load, thread_db_load_search): New functions.
15884 (thread_db_init): Search for libthread_db.
15885 (thread_db_free): New function.
15886 (thread_db_handle_monitor_command): Likewise.
15887 * config.in: Regenerate.
15888 * configure: Regenerate.
15890 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15892 * spu-low.c (spu_kill): Wait for inferior to terminate.
15893 Call clear_inferiors.
15894 (spu_detach): Call clear_inferiors.
15896 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15898 * aclocal.m4: Regenerate.
15899 * config.in: Likewise.
15900 * configure: Likewise.
15902 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15904 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15905 (parse_spufs_run): New function.
15906 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15907 (ppc_breakpoint_at): Handle SPU breakpoints.
15909 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15911 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15912 (SPUFS_MAGIC): Define.
15913 (spu_enumerate_spu_ids): New function.
15914 (linux_qxfer_spu): New function.
15915 (linux_target_ops): Install linux_qxfer_spu.
15917 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15919 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15920 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15921 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15922 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15923 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15924 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15925 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15926 (init_registers_powerpc_cell32l): Add prototype.
15927 (init_registers_powerpc_cell64l): Likewise.
15928 (ppc_arch_setup): Detect Cell/B.E. architecture.
15930 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15932 * Makefile.in (datarootdir): New variable.
15934 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15936 * linux-low.c (linux_write_memory): Update debugging output.
15937 * Makefile.in (clean): Add new descriptions.
15938 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15939 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15940 * configure.srv: Add new files for arm*-*-linux*.
15941 * linux-arm-low.c: Add new declarations.
15942 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15943 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15944 (HWCAP_VFPv3D16): New.
15945 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15946 instead of __IWMMXT__.
15947 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15948 (arm_arch_setup): New.
15949 (target_regsets): Remove #ifdef. Add VFP regset.
15950 (the_low_target): Use arm_arch_setup.
15952 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15954 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15955 the main thread again.
15957 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15959 Adding Neutrino gdbserver.
15960 * configure: Regenerated.
15961 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15962 * configure.srv (i[34567]86-*-nto*): New target.
15963 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15964 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15965 (nto_comctrl) [__QNX__]: New function.
15966 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15968 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15970 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15973 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15974 Pedro Alves <pedro@codesourcery.com>
15976 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15977 don't support CONTEXT_EXTENDED_REGISTERS.
15978 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15979 (the_low_target): Install them.
15980 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15981 failing with ERROR_PIPE_NOT_CONNECTED.
15983 2009-06-30 Doug Evans <dje@google.com>
15984 Pierre Muller <muller@ics.u-strasbg.fr>
15986 Add h/w watchpoint support to x86-linux, win32-i386.
15987 * Makefile.in (SFILES): Add i386-low.c
15988 (i386_low_h): Define.
15989 (i386-low.o): Add dependencies.
15990 (linux-x86-low.o): Add i386-low.h dependency.
15991 (win32-i386-low.o): Ditto.
15992 * i386-low.c: New file.
15993 * i386-low.h: New file.
15994 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15995 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15996 * linux-low.c (linux_add_process): Initialize arch_private.
15997 (linux_remove_process): Free arch_private.
15998 (add_lwp): Initialize arch_private.
15999 (delete_lwp): Free arch_private.
16000 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16002 * linux-low.h (process_info_private): New member arch_private.
16003 (lwp_info): New member arch_private.
16004 (linux_target_ops): New members new_process, new_thread,
16006 (ptid_of): New macro.
16007 * linux-x86-low.c: Include stddef.h, i386-low.h.
16008 (arch_process_info): New struct.
16009 (arch_lwp_info): New struct.
16010 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16011 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16012 (i386_dr_low_get_status): New function.
16013 (x86_insert_point, x86_remove_point): New functions.
16014 (x86_stopped_by_watchpoint): New function.
16015 (x86_stopped_data_address): New function.
16016 (x86_linux_new_process, x86_linux_new_thread): New functions.
16017 (x86_linux_prepare_to_resume): New function.
16018 (the_low_target): Add entries for insert_point, remove_point,
16019 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16021 * server.c (debug_hw_points): New global.
16022 (monitor_show_help): Document set debug-hw-points.
16023 (handle_query): Process "set debug-hw-points".
16024 * server.h (debug_hw_points): Declare.
16025 (paddress): Declare.
16026 * utils.c (NUMCELLS, CELLSIZE): New macros.
16027 (get_sell, xsnprintf, paddress): New functions.
16028 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16029 remove_point, stopped_by_watchpoint, stopped_data_address.
16030 * win32-i386-low.c: Include i386-low.h.
16031 (debug_reg_state): Replaces dr.
16032 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16033 (i386_dr_low_get_status): New function.
16034 (i386_insert_point, i386_remove_point): New functions.
16035 (i386_stopped_by_watchpoint): New function.
16036 (i386_stopped_data_address): New function.
16037 (i386_initial_stuff): Update.
16038 (get_thread_context,set_thread_context,i386_thread_added): Update.
16039 (the_low_target): Add entries for insert_point,
16040 remove_point, stopped_by_watchpoint, stopped_data_address.
16041 * win32-low.c (win32_insert_watchpoint): New function.
16042 (win32_remove_watchpoint): New function.
16043 (win32_stopped_by_watchpoint): New function.
16044 (win32_stopped_data_address): New function.
16045 (win32_target_ops): Add entries for insert_watchpoint,
16046 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16047 * win32-low.h (win32_target_ops): New members insert_point,
16048 remove_point, stopped_by_watchpoint, stopped_data_address.
16050 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16052 * server.c (process_serial_event): Re-return unsupported, not
16053 error, if the type isn't recognized. Re-allow supporting only
16054 insert or remove packets. Also call require_running for
16055 breakpoints. Add missing break statement to default case. Tidy.
16056 * target.h (struct target_ops): Rename insert_watchpoint to
16057 insert_point, and remove_watchpoint to remove_point.
16059 * linux-low.h (struct linux_target_ops): Likewise.
16060 * linux-low.c (linux_insert_watchpoint): Rename to ...
16061 (linux_insert_point): ... this. Adjust.
16062 (linux_remove_watchpoint): Rename to ...
16063 (linux_remove_point): ... this. Adjust.
16064 (linux_target_ops): Adjust.
16065 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16066 (cris_insert_point): ... this.
16067 (cris_remove_watchpoint): Rename to ...
16068 (cris_remove_point): ... this.
16069 (the_low_target): Adjust.
16071 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16073 * server.c (handle_v_kill): Pass signal_pid to
16074 kill_inferior if multi_process is zero.
16076 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16078 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16079 * target.h (target_ops): Comment for *_watchpoint to make it clear
16080 the functions can get types '0' and '1'.
16082 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16084 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16085 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16086 * regcache.c (get_regcache): Likewise.
16087 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16088 * win32-low.c (child_fetch_inferior_registers): Remove check for
16091 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16092 Pedro Alves <pedro@codesourcery.com>
16094 * target.h (struct target_ops) <supports_multi_process>: New
16096 (target_supports_multi_process): New.
16097 * server.c (handle_query): Even if GDB reports support, only
16098 enable multi-process if the target also supports it. Report
16099 multi-process support only if the target backend supports it.
16100 * linux-low.c (linux_supports_multi_process): New function.
16101 (linux_target_ops): Install it as target_supports_multi_process
16104 2009-05-24 Doug Evans <dje@google.com>
16106 Global renaming of find_thread_pid to find_thread_ptid.
16107 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16108 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16109 All callers updated.
16111 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16112 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16115 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16116 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16117 (linux_resume_one_lwp): Ditto.
16119 2009-05-23 Doug Evans <dje@google.com>
16121 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16122 from struct inferior_list_entry * to struct lwp_info *.
16123 All callers updated.
16125 2009-05-13 Doug Evans <dje@google.com>
16127 * linux-x86-low.c: Don't include assert.h.
16128 (x86_siginfo_fixup): Use fatal, not assert.
16129 (x86_arch_setup): Fix comment.
16131 2009-05-12 Doug Evans <dje@google.com>
16133 Biarch support for i386/amd64 gdbserver.
16134 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16135 Add linux-x86-low.c.
16136 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16137 (linux-x86-low.o): Add.
16138 * linux-x86-64-low.c: Delete.
16139 * linux-i386-low.c: Delete.
16140 * linux-x86-low.c: New file.
16141 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16143 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16145 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16146 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16147 (linux_child_pid_to_exec_file): New function.
16148 (elf_64_header_p, elf_64_file_p): New functions.
16149 (siginfo_fixup): New function.
16150 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16151 give target a chance to convert layout.
16152 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16153 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16155 2009-05-07 Doug Evans <dje@google.com>
16157 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16158 (regsets_store_inferior_registers): Ditto.
16160 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16164 * linux-low.c (must_set_ptrace_flags): Delete.
16165 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16167 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16168 `lwp->must_set_ptrace_flags' instead.
16169 (linux_wait_for_event_1): Set ptrace options here.
16170 (linux_wait_1): ... not here.
16172 2009-04-30 Doug Evans <dje@google.com>
16174 * inferiors.c (started_inferior_callback): New function.
16175 (attached_inferior_callback): New function.
16176 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16177 * server.c (print_started_pid, print_attached_pid): New functions.
16178 (detach_or_kill_for_exit): New function.
16179 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16180 * server.h (have_started_inferiors_p): Declare.
16181 (have_attached_inferiors_p): Declare.
16183 * inferiors.c (remove_process): Fix memory leak, free process.
16184 * linux-low.c (linux_remove_process): New function.
16185 (linux_kill): Call it instead of remove_process.
16186 (linux_detach, linux_wait_1): Ditto.
16188 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16190 * configure.srv: Add x86 Windows CE target.
16192 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16194 * inferiors.c (get_thread_process): Make global.
16195 * server.h (get_thread_process): Add prototype.
16196 * thread-db.c (find_one_thread): Use get_thread_process
16197 instead of current_process.
16198 (thread_db_get_tls_address): Do not crash if called when
16199 thread layer is not yet initialized.
16201 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16203 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16204 * spu-low.c (current_tid): Rename to ...
16205 (current_ptid): ... this.
16206 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16207 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16208 ptid_get_lwp (current_ptid) instead of current_tid.
16209 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16210 instead of current_tid. Use find_process_pid to verify pid
16211 argument is valid. Pass proper argument to remove_process.
16212 (spu_thread_alive): Compare current_ptid instead of current_tid.
16213 (spu_resume): Likewise.
16215 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16217 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16222 Implement the multiprocess extensions, and add linux multiprocess
16225 * server.h (ULONGEST): Declare.
16226 (struct ptid, ptid_t): New.
16227 (minus_one_ptid, null_ptid): Declare.
16228 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16229 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16230 (struct inferior_list_entry): Change `id' type from unsigned from
16232 (struct sym_cache, struct breakpoint, struct
16233 process_info_private): Forward declare.
16234 (struct process_info): Declare.
16235 (current_process): Declare.
16236 (all_processes): Declare.
16237 (initialize_inferiors): Declare.
16238 (add_thread): Adjust to use ptid_t.
16239 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16240 (add_process, remove_process, find_thread_pid): Declare.
16241 (find_inferior_id): Adjust to use ptid_t.
16242 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16243 (multi_process): Declare.
16244 (push_event): Adjust to use ptid_t.
16245 (read_ptid, write_ptid): Declare.
16246 (prepare_resume_reply): Adjust to use ptid_t.
16247 (clear_symbol_cache): Declare.
16248 * inferiors.c (all_processes): New.
16249 (null_ptid, minus_one_ptid): New.
16250 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16251 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16252 (add_thread): Change unsigned long to ptid. Remove gdb_id
16254 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16255 (gdb_id_to_thread): Rename to ...
16256 (find_thread_pid): ... this. Change unsigned long to ptid.
16257 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16258 (loaded_dll, pull_pid_from_list): Adjust.
16259 (add_process, remove_process, find_process_pid)
16260 (get_thread_process, current_process, initialize_inferiors): New.
16261 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16262 (struct target_waitstatus) <related_pid>: Ditto.
16263 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16264 return type to int.
16265 (struct target_ops) <join>: Add `pid' argument.
16266 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16267 (struct target_ops) <wait>: Add `ptid' field. Change return type
16269 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16270 (mywait): Add `ptid' argument. Change return type to ptid_t.
16271 (target_pid_to_str): Declare.
16272 * target.c (set_desired_inferior): Adjust to use ptids.
16273 (mywait): Add new `ptid' argument. Adjust.
16274 (target_pid_to_str): New.
16275 * mem-break.h (free_all_breakpoints): Declare.
16276 * mem-break.c (breakpoints): Delelete.
16277 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16278 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16279 to use per-process breakpoint list.
16280 (free_all_breakpoints): New.
16281 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16282 (symbol_cache, all_symbols_looked_up): Delete.
16284 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16286 (prepare_resume_reply): Change ptid argument's type from unsigned
16287 long to ptid_t. Adjust. Implement W;process and X;process.
16288 (free_sym_cache, clear_symbol_cache): New.
16289 (look_up_one_symbol): Adjust to per-process symbol cache. *
16290 * server.c (cont_thread, general_thread, step_thread): Change type
16292 (attached): Delete.
16293 (multi_process): New.
16294 (last_ptid): Change type to ptid_t.
16295 (struct vstop_notif) <ptid>: Change type to ptid_t.
16296 (queue_stop_reply, push_event): Change `ptid' argument's type to
16298 (discard_queued_stop_replies): Add `pid' argument.
16299 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16300 changes. Don't reference the `attached' global.
16301 (attach_inferior): Adjust to mywait interface changes.
16302 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16303 features. Handle and report "multiprocess+". Handle
16305 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16307 (handle_v_kill): New.
16308 (handle_v_stopped): Adjust to use target_pid_to_str.
16309 (handle_v_requests): Allow multiple attaches and runs when
16310 multiprocess extensions are in effect. Handle "vKill".
16311 (myresume): Adjust to use ptids.
16312 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16313 (handle_status): Adjust to discard_queued_stop_replies interface
16315 (first_thread_of, kill_inferior_callback)
16316 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16317 (main): Call initialize_inferiors. Adjust to use ptids, killing
16318 and detaching from all inferiors. Handle multiprocess packet
16320 * linux-low.h: Include gdb_proc_service.h.
16321 (struct process_info_private): New.
16322 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16323 <lwpid_of>: Use ptid_get_lwp.
16324 (get_lwp_thread): Adjust.
16325 (struct lwp_info): Add `dead' member.
16326 (find_lwp_pid): Declare.
16327 * linux-low.c (thread_db_active): Delete.
16328 (new_inferior): Adjust comment.
16329 (inferior_pid): Delete.
16330 (linux_add_process): New.
16331 (handle_extended_wait): Adjust.
16332 (add_lwp): Change unsigned long to ptid.
16333 (linux_create_inferior): Add process to processes table. Adjust
16334 to use ptids. Don't set new_inferior here.
16335 (linux_attach_lwp): Rename to ...
16336 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16337 it. Adjust to use ptids.
16338 (linux_attach_lwp): New.
16339 (linux_attach): Add process to processes table. Don't set
16341 (struct counter): New.
16342 (second_thread_of_pid_p, last_thread_of_process_p): New.
16343 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16344 multiple processes.
16345 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16346 processes. Remove process from process table.
16347 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16348 to multiple processes.
16349 (any_thread_of): New.
16350 (linux_detach): Add `pid' argument, and handle it. Remove process
16351 from processes table.
16352 (linux_join): Add `pid' argument. Handle it.
16353 (linux_thread_alive): Change unsighed long argument to ptid_t.
16354 Consider dead lwps as not being alive.
16355 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16356 threads we're not interested in.
16357 (same_lwp, find_lwp_pid): New.
16358 (linux_wait_for_lwp): Change `pid' argument's type from int to
16360 (linux_wait_for_event): Rename to ...
16361 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16362 from int to ptid_t. Adjust.
16363 (linux_wait_for_event): New.
16364 (linux_wait_1): Add `ptid' argument. Change return type to
16365 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16366 that exit from the process table.
16367 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16369 (mark_lwp_dead): New.
16370 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16371 stopping all threads, mark its main lwp as dead.
16372 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16374 (fetch_register, usr_store_inferior_registers)
16375 (regsets_fetch_inferior_registers)
16376 (regsets_store_inferior_registers, linux_read_memory)
16377 (linux_write_memory): Inline `inferior_pid'.
16378 (linux_look_up_symbols): Adjust to use per-process
16379 `thread_db_active'.
16380 (linux_request_interrupt): Adjust to use ptids.
16381 (linux_read_auxv): Inline `inferior_pid'.
16382 (initialize_low): Don't reference thread_db_active.
16383 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16384 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16385 (ps_getpid): Return the pid of the current inferior.
16386 * thread-db.c (proc_handle, thread_agent): Delete.
16387 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16389 (find_one_thread): Change argument type to ptid_t. Adjust to
16391 (maybe_attach_thread): Adjust to per-process data and ptids.
16392 (thread_db_find_new_threads): Ditto.
16393 (thread_db_init): Ditto.
16394 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16395 processes table. Adjust to use ptids.
16396 (spu_kill, spu_detach): Adjust interface. Remove process from
16398 (spu_join, spu_thread_alive): Adjust interface.
16399 (spu_wait): Adjust interface. Remove process from processes
16400 table. Adjust to use ptids.
16401 * win32-low.c (current_inferior_tid): Delete.
16402 (current_inferior_ptid): New.
16403 (debug_event_ptid): New.
16404 (thread_rec): Take a ptid. Adjust.
16405 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16406 (child_delete_thread): Ditto.
16407 (do_initial_child_stuff): Add `attached' argument. Add process to
16409 (child_fetch_inferior_registers, child_store_inferior_registers):
16411 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16412 (win32_attach): Pass 1 to do_initial_child_stuff.
16413 (win32_kill): Adjust interface. Remove process from processes
16415 (win32_detach): Ditto.
16416 (win32_join): Adjust interface.
16417 (win32_thread_alive): Take a ptid.
16418 (win32_resume): Adjust to use ptids.
16419 (get_child_debug_event): Ditto.
16420 (win32_wait): Adjust interface. Remove exiting process from
16423 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16425 Non-stop mode support.
16427 * server.h (non_stop): Declare.
16428 (gdb_client_data, handler_func): Declare.
16429 (delete_file_handler, add_file_handler, start_event_loop):
16431 (handle_serial_event, handle_target_event, push_event)
16432 (putpkt_notif): Declare.
16433 * target.h (enum resume_kind): New.
16434 (struct thread_resume): Replace `step' field by `kind' field.
16435 (TARGET_WNOHANG): Define.
16436 (struct target_ops) <wait>: Add `options' argument.
16437 <supports_non_stop, async, start_non_stop>: New fields.
16438 (target_supports_non_stop, target_async): New.
16439 (start_non_stop): Declare.
16440 (mywait): Add `options' argument.
16441 * target.c (mywait): Add `options' argument. Print child exit
16442 notifications here.
16443 (start_non_stop): New.
16444 * server.c (non_stop, own_buf, mem_buf): New globals.
16445 (struct vstop_notif): New.
16446 (notif_queue): New global.
16447 (queue_stop_reply, push_event, discard_queued_stop_replies)
16448 (send_next_stop_reply): New.
16449 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16451 (attach_inferior): In non-stop mode, don't wait for the target
16453 (handle_general_set): Handle QNonStop.
16454 (handle_query): When handling qC, return the current general
16455 thread, instead of the first thread of the list.
16456 (handle_query): If the backend supports non-stop mode, include
16457 QNonStop+ in the qSupported query response.
16458 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16460 (handle_v_attach, handle_v_run): Handle non-stop mode.
16461 (handle_v_stopped): New.
16462 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16463 (myresume): Adjust to use resume_kind. Handle non-stop.
16464 (queue_stop_reply_callback): New.
16465 (handle_status): Handle non-stop mode.
16466 (main): Clear non_stop flag on reconnection. Use the event-loop.
16467 Refactor serial protocol handling from here ...
16468 (process_serial_event): ... to this new function. When GDB
16469 selects any thread, select one here. In non-stop mode, wait until
16470 GDB acks all pending events before exiting.
16471 (handle_serial_event, handle_target_event): New.
16472 * remote-utils.c (remote_open): Install remote_desc in the event
16474 (remote_close): Remove remote_desc from the event loop.
16475 (putpkt_binary): Rename to...
16476 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16477 (putpkt_binary): New as wrapper around putpkt_binary_1.
16478 (putpkt_notif): New.
16479 (prepare_resume_reply): In non-stop mode, don't change the
16481 * event-loop.c: New.
16482 * Makefile.in (OBJ): Add event-loop.o.
16483 (event-loop.o): New rule.
16485 * linux-low.h (pid_of): Moved here.
16487 (get_lwp_thread): Use lwpid_of.
16488 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16489 * linux-low.c (pid_of): Delete.
16490 (inferior_pid): Use lwpid_of.
16491 (linux_event_pipe): New.
16492 (target_is_async_p): New.
16494 (handle_extended_wait): Use lwpid_of.
16495 (add_lwp): Don't set lwpid field.
16496 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16497 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16498 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16499 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16500 first. Adjust to linux_wait_for_event interface changes. Use
16502 (linux_detach): Don't delete the main lwp here.
16503 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16504 (status_pending_p): Don't consider explicitly suspended lwps.
16505 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16506 pointer. Add OPTIONS argument. Change return type to int. Use
16507 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16508 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16509 pointer. Add status pointer argument. Return a pid instead of a
16510 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16511 changes. In non-stop mode, don't switch to a random thread.
16512 (linux_wait): Rename to...
16513 (linux_wait_1): ... this. Add target_options argument, and handle
16514 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16515 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16516 clean exit and signal exit code. Don't stop all threads in
16517 non-stop mode. In all-stop mode, only stop all threads when
16518 reporting a stop to GDB. Handle explicit thread stop requests.
16519 (async_file_flush, async_file_mark): New.
16521 (send_sigstop): Use lwpid_of.
16522 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16523 interface changes. In non-stop mode, don't switch to a random
16525 (linux_resume_one_lwp): Use lwpid_of.
16526 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16527 (linux_resume_one_thread): ... this. Handle resume_stop. In
16528 non-stop mode, don't look for pending flag in all threads.
16529 (resume_status_pending_p): Don't consider explicitly suspended
16531 (my_waitpid): Reimplement. Emulate __WALL.
16532 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16534 (sigchld_handler, linux_supports_non_stop, linux_async)
16535 (linux_start_non_stop): New.
16536 (linux_target_ops): Register linux_supports_non_stop, linux_async
16537 and linux_start_non_stop.
16538 (initialize_low): Install SIGCHLD handler.
16539 * thread-db.c (thread_db_create_event, find_one_thread)
16540 (thread_db_get_tls_address): Use lwpid_of.
16541 * win32-low.c (win32_detach): Adjust to use resume_kind.
16542 (win32_wait): Add `options' argument.
16543 * spu-low.c (spu_resume): Adjust to use resume_kind.
16544 (spu_wait): Add `options' argument.
16546 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16548 Decouple target code from remote protocol.
16550 * target.h (enum target_waitkind): New.
16551 (struct target_waitstatus): New.
16552 (struct target_ops) <wait>: Return an unsigned long. Take a
16553 target_waitstatus pointer instead of a char pointer.
16554 (mywait): Likewise.
16555 * target.c (mywait): Change prototype to return an unsigned long.
16556 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16557 * server.h (thread_from_wait, old_thread_from_wait): Delete
16559 (prepare_resume_reply): Change prototype to take a
16561 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16562 (last_status, last_ptid): New.
16563 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16564 pid instead of a signal.
16565 (attach_inferior): Remove "status" and "signal" parameters.
16567 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16569 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16570 (handle_v_requests, myresume): Remove "status" and "signal"
16571 parameters. Adjust.
16572 (handle_status): New.
16573 (main): Delete local `status'. Adjust.
16574 * remote-utils.c: Include target.h.
16575 (prepare_resume_reply): Change prototype to take a
16576 target_waitstatus. Adjust.
16578 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16580 * spu-low.c (spu_wait): Adjust.
16581 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16583 (win32_wait): Adjust.
16585 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16587 * target.h (struct thread_resume): Delete leave_stopped member.
16588 (struct target_ops): Add a `n' argument to the `resume' callback.
16589 * server.c (start_inferior): Adjust.
16590 (handle_v_cont, myresume): Adjust.
16591 * linux-low.c (check_removed_breakpoint): Adjust to resume
16592 interface change, and to removed leave_stopped field.
16593 (resume_ptr): Delete.
16594 (struct thread_resume_array): New.
16595 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16596 resume interface change.
16597 (linux_continue_one_thread, linux_queue_one_thread)
16598 (resume_status_pending_p): Check if the resume field is NULL
16599 instead of checking the leave_stopped member.
16600 (linux_resume): Adjust to the target resume interface change.
16601 * spu-low.c (spu_resume): Adjust to the target resume interface
16603 * win32-low.c (win32_detach, win32_resume): Ditto.
16605 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16607 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16609 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16611 (linux_continue_one_thread): Only preserve the stepping flag if
16612 there's a pending breakpoint.
16614 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16616 * server.c (main): After the inferior having exited, call
16617 remote_close before exiting gdbserver.
16619 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16621 Fix size of FPSCR in Power 7 processors.
16622 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16623 (PPC_FEATURE_HAS_DFP): New #define.
16624 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16627 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16629 * server.c (handle_query) Whitespace and formatting.
16631 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16633 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16634 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16635 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16636 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16637 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16638 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16639 Makefile.in, configure.ac: Fix whitespace throughout.
16640 * configure: Regenerate.
16642 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16644 * inferiors.c (find_inferior): Make it safe for the callback
16645 function to delete the currently iterated inferior.
16647 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16649 * Makefile.in (linuw_low_h): Move higher.
16650 (thread-db.o): Depend on $(linux_low_h).
16652 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16654 Rename "process" to "lwp" throughout.
16656 * linux-low.c (all_processes): Rename to...
16657 (all_lwps): ... this.
16658 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16659 (add_process): Rename to ...
16660 (add_lwp): ... this. Adjust.
16661 (linux_create_inferior): Adjust.
16662 (linux_attach_lwp): Adjust.
16663 (linux_attach): Adjust.
16664 (linux_kill_one_process): Rename to ...
16665 (linux_kill_one_lwp): ... this. Adjust.
16666 (linux_kill): Adjust.
16667 (linux_detach_one_process): Rename to ...
16668 (linux_detach_one_lwp): ... this. Adjust.
16669 (linux_detach): Adjust.
16670 (check_removed_breakpoint): Adjust.
16671 (status_pending_p): Adjust.
16672 (linux_wait_for_process): Rename to ...
16673 (linux_wait_for_lwp): ... this. Adjust.
16674 (linux_wait_for_event): Adjust.
16675 (send_sigstop): Adjust.
16676 (wait_for_sigstop): Adjust.
16677 (stop_all_processes): Rename to ...
16678 (stop_all_lwps): ... this.
16679 (linux_resume_one_process): Rename to ...
16680 (linux_resume_one_lwp): ... this. Adjust.
16681 (linux_set_resume_request, linux_continue_one_thread)
16682 (linux_queue_one_thread, resume_status_pending_p)
16683 (usr_store_inferior_registers, regsets_store_inferior_registers)
16684 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16686 * linux-low.h (get_process): Rename to ...
16687 (get_lwp): ... this. Adjust.
16688 (get_thread_process): Rename to ...
16689 (get_thread_lwp): ... this. Adjust.
16690 (get_process_thread): Rename to ...
16691 (get_lwp_thread): ... this. Adjust.
16692 (struct process_info): Rename to ...
16693 (struct lwp_info): ... this.
16694 (all_processes): Rename to ...
16695 (all_lwps): ... this.
16696 * proc-service.c (ps_lgetregs): Adjust.
16697 * thread-db.c (thread_db_create_event, find_one_thread)
16698 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16700 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16702 * server.c (handle_query): Handle "qAttached".
16704 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16706 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16707 GPLv3, update license URL.
16709 2009-03-01 Doug Evans <dje@google.com>
16711 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16712 (server_h): Add gdb_signals.h.
16713 (signals.o): Update.
16714 * server.h (target_signal_from_host,target_signal_to_host_p)
16715 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16717 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16719 * remote-utils.c (getpkt): Also generate remote-debug
16720 information if noack_mode is set.
16722 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16724 * server.c (handle_query): Report qXfer:siginfo:read and
16725 qXfer:siginfo:write as supported and handle them.
16726 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16727 * linux-low.c (linux_xfer_siginfo): New.
16728 (linux_target_ops): Set it.
16730 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16732 * server.c (gdbserver_usage): Mention --remote-debug.
16733 (main): Accept '--remote-debug' switch.
16735 2009-01-18 Doug Evans <dje@google.com>
16737 * regcache.c (new_register_cache): No need to check result of xcalloc.
16738 * server.c (handle_search_memory): Back out calls to xmalloc,
16739 result is checked and error is returned to user upon failure.
16740 (handle_query): Ditto. Add more checks for result of malloc.
16741 (handle_v_cont): Check result of malloc, report error back to
16743 (handle_v_run): Ditto. Call freeargv.
16744 * server.h (freeargv): Declare.
16745 * utils.c (freeargv): New fn.
16747 2009-01-15 Doug Evans <dje@google.com>
16749 * gdbreplay.c (perror_with_name): Make arg const char *.
16750 * server.h (target_signal_to_name): Make return type const char *.
16751 * thread-db.c (thread_db_err_str): Make return type const char *.
16752 * utils.c (perror_with_name): Make arg const char *.
16754 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16756 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16757 when handling a EXIT_PROCESS_DEBUG_EVENT.
16759 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16761 * gdbreplay.c (gdbreplay_version): Update copyright year.
16762 * server.c (gdbserver_version): Likewise.
16764 2009-01-05 Doug Evans <dje@google.com>
16766 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16767 (handle_extended_wait): Improve comment.
16769 2008-12-13 Doug Evans <dje@google.com>
16771 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16772 * server.h (ATTR_MALLOC): New macro.
16773 (xmalloc,xcalloc,xstrdup): Declare.
16774 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16775 * inferiors.c: Ditto.
16776 * linux-low.c: Ditto.
16777 * mem-break.c: Ditto.
16778 * regcache.c: Ditto.
16779 * remote-utils.c: Ditto.
16782 * win32-low.c: Ditto.
16784 2008-12-12 Doug Evans <dje@google.com>
16786 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16787 in debugging printf.
16789 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16791 2008-12-09 Doug Evans <dje@google.com>
16793 * linux-low.h (struct process_info): Delete member tid, unused.
16794 * thread-db.c (find_one_thread): Update.
16795 (maybe_attach_thread): Update.
16797 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16799 * target.h (struct target_ops): Add qxfer_osdata member.
16800 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16802 (linux_qxfer_osdata): New functions.
16803 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16805 * server.c (handle_query): Handle "qXfer:osdata:read:".
16806 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16807 (buffer_xml_printf): New functions.
16808 * server.h (struct buffer): New.
16809 (buffer_grow_str, buffer_grow_str0): New macros.
16810 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16811 (buffer_xml_printf): Declare.
16813 2008-11-24 Doug Evans <dje@google.com>
16815 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16817 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16819 * server.c (handle_v_run): Always use the supplied argument list.
16821 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16823 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16824 (xtensa_regmap_table): Add entry for scompare1.
16826 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16828 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16829 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16830 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16831 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16832 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16833 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16834 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16835 XML target descriptions.
16836 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16837 when inferior is running on an ISA 2.05 or later processor. Add
16838 special case to return offset for full 64-bit slot of FPSCR when
16841 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16843 * Makefile.in (SFILES, clean): Added sparc64 files.
16844 (reg-sparc64.o, reg-sparc64.c): New.
16845 * configure.srv (sparc*-*-linux*): New configuration.
16846 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16847 syscall arguments for SPARC.
16848 (regsets_store_inferior_registers): Likewise.
16849 * linux-sparc-low.c: New file.
16851 2008-10-21 Doug Evans <dje@google.com>
16853 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16854 (READLINE_DIR,READLINE_DEP): Delete.
16855 (INTERNAL_CFLAGS): Update.
16856 (LINTFLAGS): Update.
16858 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16860 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16861 whole argv from the last run, not just argv[0].
16863 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16865 * regcache.c (new_register_cache): Return NULL if the register
16866 cache size isn't known yet.
16867 (free_register_cache): Avoid dereferencing a NULL regcache.
16869 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16871 * configure.srv: Merge MIPS and MIPS64.
16873 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16875 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16877 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16879 * Makefile.in: Add required vsx dependencies.
16881 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16882 Declare init_registers_powerpc_vsx32l.
16883 Declare init_registers_powerpc_vsx64l.
16884 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16885 (ppc_arch_setup): Check for VSX in hwcap.
16886 (ppc_fill_vsxregset): New function.
16887 (ppc_store_vsxregset): New function.
16888 Add new VSX entry in regset_info target_regsets.
16890 * configure.srv: Add new VSX dependencies.
16892 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16894 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16895 (remote_open): Set or clear transport_is_reliable.
16896 (putpkt_binary): Don't expect acks in noack mode.
16897 (getpkt): Don't send ack/nac in noack mode.
16898 * server.c (handle_general_set): Handle QStartNoAckMode.
16899 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16901 (main): Reset noack_mode on every connection.
16902 * server.h (noack_mode): Declare.
16904 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16906 * Makefile.in (GDBREPLAY_OBS): New variable.
16907 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16909 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16910 Daniel Jacobowitz <dan@codesourcery.com>
16912 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16913 (usr_store_inferior_registers): Likewise.
16914 (regsets_store_inferior_registers): Likewise.
16916 2008-07-31 Rolf Jansen <rj@surtec.com>
16917 Pedro Alves <pedro@codesourcery.com>
16919 * configure.ac: Check for memmem declaration.
16920 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16921 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16922 (disable_packet_qfThreadInfo): Unconditionally compile.
16923 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16924 * configure, config.in: Regenerate.
16926 2008-07-28 Doug Kwan <dougkwan@google.com>
16928 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16929 (linux_write_memory): Remove declaration of errno.
16931 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16933 * linux-low.c (handle_extended_wait): Do not use "status"
16934 variable uninitialized.
16936 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16938 * server.c (handle_v_attach): Inhibit reporting dll changes.
16940 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16942 * remote-utils.c (prepare_resume_reply): If requested, don't
16943 output "thread:TID" in the T stop reply.
16945 * server.c (disable_packet_vCont, disable_packet_Tthread)
16946 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16947 (handle_query): If requested, disable support for qC, qfThreadInfo
16949 (handle_v_requests): If requested, disable support for vCont.
16950 (gdbserver_show_disableable): New.
16951 (main): Handle --disable-packet and --disable-packet=LIST.
16953 * server.h (disable_packet_vCont, disable_packet_Tthread)
16954 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16956 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16958 * server.c (gdbserver_usage): Mention --version.
16960 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16962 * Makefile.in (gdbreplay.o): New rule.
16964 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16966 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16967 message, not gdbserver.
16969 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16970 Nathan Sidwell <nathan@codesourcery.com>
16971 Joseph Myers <joseph@codesourcery.com>
16973 * acinclude.m4: Include ../../config/acx.m4.
16974 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16975 * configure, config.in: Regenerate.
16976 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16977 * server.c (gdbserver_version): Print PKGVERSION.
16978 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16979 (main): Adjust gdbserver_usage calls.
16980 * gdbreplay.c (version, host_name): Add declarations.
16981 (gdbreplay_version, gdbreplay_usage): New.
16982 (main): Accept --version and --help options.
16984 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16986 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16987 (arm_breakpoint_at): Handle Thumb.
16988 (the_low_target): Add comment.
16990 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16992 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16994 2008-05-09 Doug Evans <dje@google.com>
16996 * server.h (decode_search_memory_packet): Declare.
16997 * remote-utils.c (decode_search_memory_packet): New fn.
16998 * server.c (handle_search_memory_1): New fn.
16999 (handle_search_memory): New fn.
17000 (handle_query): Process qSearch:memory packets.
17002 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17004 * regcache.c (registers_length): Remove.
17005 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17006 full register packet.
17007 * regcache.h (registers_length): Remove prototype.
17008 * server.h (PBUFSIZ): Define to 16384.
17010 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17012 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17013 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17014 powerpc-64l.o, and powerpc-altivec64l.o.
17015 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17016 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17017 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17018 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17019 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17022 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17023 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17024 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17025 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17026 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17027 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17028 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17029 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17030 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17031 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17034 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17035 (init_registers_powerpc_32l): ... this new prototype.
17036 (init_registers_powerpc_32): Remove, replace by ...
17037 (init_registers_powerpc_altivec32l): ... this new prototype.
17038 (init_registers_powerpc_e500): Remove, replace by ...
17039 (init_registers_powerpc_e500l): ... this new prototype.
17040 (init_registers_ppc64): Remove, replace by ...
17041 (init_registers_powerpc_64l): ... this new prototype.
17042 (init_registers_powerpc_64): Remove, replace by ...
17043 (init_registers_powerpc_altivec64l): ... this new prototype.
17044 (ppc_num_regs): Set to 73.
17045 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17046 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17047 (ppc_cannot_store_register): Handle orig_r3 and trap.
17048 (ppc_arch_setup): Update init_registers_... calls.
17049 (ppc_fill_gregset): Handle orig_r3 and trap.
17051 * inferiors.c (clear_inferiors): Reset current_inferior.
17053 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17055 * acinclude.m4: Add override.m4.
17056 * configure: Regenerate.
17058 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17060 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17061 initial call to init_register_ppc64.
17063 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17065 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17066 single powerpc*-*-linux* case.
17067 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17069 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17071 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17072 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17074 * linux-ppc-low.c: Include <elf.h>.
17075 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17076 (ppc_hwcap): New global variable.
17077 (ppc_regmap): Remove __SPE__ #ifdef sections.
17078 (ppc_regmap_e500): New global variable.
17079 (ppc_cannot_store_register): Update __SPE__ special case.
17080 (ppc_get_hwcap): New function.
17081 (ppc_arch_setup): Use it to determine whether inferior supports
17082 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17083 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17084 Do not access registers if target does not support AltiVec.
17085 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17086 Do not access registers if target does not support SPE.
17087 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17089 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17091 * linux-low.c (disabled_regsets, num_regsets): New.
17092 (use_regsets_p): Delete.
17093 (linux_wait_for_process): Clear disabled_regsets.
17094 (regsets_fetch_inferior_registers): Check and set it.
17095 (regsets_store_inferior_registers): Likewise.
17096 (linux_fetch_registers, linux_store_registers): Do not use
17098 (initialize_low): Allocate disabled_regsets.
17100 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17102 * Makefile.in (LIBOBJS): New.
17103 (OBS): Use LIBOBJS.
17104 (memmem.o): New rule.
17105 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17106 * configure: Regenerated.
17108 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17110 * server.c (handle_query): Never return "unsupported" for
17111 qXfer:features:read queries.
17113 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17115 * server.c (get_features_xml): Fix inverted condition.
17116 (handle_query): Always support qXfer:feature:read.
17118 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17120 * server.c (wrapper_argv): New.
17121 (start_inferior): Handle wrapper_argv. If set, expect an extra
17123 (gdbserver_usage): Document --wrapper.
17124 (main): Parse --wrapper.
17126 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17128 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17129 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17130 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17131 (ppc_set_pc): Likewise.
17132 (ppc_arch_setup): New function.
17133 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17134 of collect_register.
17135 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17137 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17139 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17140 instead of linux-ppc64-low.o.
17141 * linux-ppc64-low.c: Remove file.
17142 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17143 (linux-ppc64-low.o): Remove rule.
17145 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17146 (init_registers_powerpc_64): Likewise.
17147 (ppc_regmap): Conditionally define depending on __powerpc64__.
17148 (ppc_cannot_store_register): Do not special-case "fpscr" when
17149 compiled on __powerpc64__.
17150 (ppc_collect_ptrace_register): New function.
17151 (ppc_supply_ptrace_register): New function.
17152 (ppc_breakpoint): Change type to "unsigned int".
17153 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17154 (the_low_target): Conditionally provide initializers for the
17155 arch_setup member depending on __powerpc64__. Install
17156 collect_ptrace_register and supply_ptrace_register members.
17158 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17160 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17161 * server.c (gdbserver_xmltarget): Define.
17162 (get_features_xml): Use it to replace "target.xml" and arch_string.
17164 * configure.srv: Remove srv_xmltarget. Add XML files that were
17165 mentioned there to srv_xmlfiles instead. Remove conditional tests
17166 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17167 srv_xmlfiles and srv_regobj to include all possible choices.
17168 * configure.ac (srv_xmltarget): Remove.
17169 (srv_xmlfiles): Do not add "target.xml".
17170 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17171 checks for supplementary target information.
17172 * configure: Regenerate.
17173 * Makefile.in (XML_TARGET): Remove.
17174 (target.xml): Remove rule.
17175 (clean): Do not clean up target.xml.
17176 (.PRECIOUS): Do not mention target.xml.
17178 * target.h (struct target_ops): Remove arch_string member.
17179 * linux-low.c (linux_arch_string): Remove.
17180 (linux_target_ops): Remove arch_string initializer.
17181 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17182 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17183 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17184 * spu-low.c (spu_arch_string): Remove.
17185 (spu_target_ops): Remove arch_string initializer.
17186 * win32-low.c (win32_arch_string): Remove.
17187 (win32_target_ops): Remove arch_string initializer.
17188 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17189 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17190 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17192 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17194 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17195 by collect_ptrace_register and supply_ptrace_register hooks.
17196 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17197 instead of checking for the_low_target.left_pad_xfer.
17198 (usr_store_inferior_registers): Use collect_ptrace_register callback
17199 instead of checking for the_low_target.left_pad_xfer.
17201 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17202 (s390_supply_ptrace_register): Likewise.
17203 (s390_fill_gregset): Call s390_collect_ptrace_register.
17204 (the_low_target): Update.
17206 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17207 (ppc_supply_ptrace_register): Likewise.
17208 (the_low_target): Update.
17210 * linux-i386-low.c (the_low_target): Update.
17211 * linux-x86-64-low.c (the_low_target): Update.
17213 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17215 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17216 reg-s390.o and reg-s390x.o.
17218 * linux-low.c (new_inferior): New global variable.
17219 (linux_create_inferior, linux_attach): Set it.
17220 (linux_wait_for_process): Call the_low_target.arch_setup after the
17221 target has stopped for the first time.
17222 (initialize_low): Do not call the_low_target.arch_setup.
17224 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17225 (s390_set_pc): Likewise.
17226 (s390_arch_setup): New function.
17227 (the_low_target): Use s390_arch_setup as arch_setup routine.
17229 * regcache.c (realloc_register_cache): New function.
17230 (set_register_cache): Call it for each existing regcache.
17232 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17234 * server.h (init_registers): Remove prototype.
17236 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17237 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17238 instead of init_registers ().
17239 * linux-arm-low.c (init_registers_arm): Add prototype.
17240 (init_registers_arm_with_iwmmxt): Likewise.
17241 (the_low_target): Add initializer for arch_setup field.
17242 * linux-cris-low.c (init_registers_cris): Add prototype.
17243 (the_low_target): Add initializer for arch_setup field.
17244 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17245 (the_low_target): Add initializer for arch_setup field.
17246 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17247 (the_low_target): Add initializer for arch_setup field.
17248 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17249 (the_low_target): Add initializer for arch_setup field.
17250 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17251 (the_low_target): Add initializer for arch_setup field.
17252 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17253 (the_low_target): Add initializer for arch_setup field.
17254 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17255 (init_registers_mips64_linux): Likewise.
17256 (the_low_target): Add initializer for arch_setup field.
17257 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17258 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17259 (the_low_target): Add initializer for arch_setup field.
17260 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17261 (init_registers_powerpc_64): Likewise.
17262 (the_low_target): Add initializer for arch_setup field.
17263 * linux-s390-low.c (init_registers_s390): Add prototype.
17264 (init_registers_s390x): Likewise.
17265 (the_low_target): Add initializer for arch_setup field.
17266 * linux-sh-low.c (init_registers_sh): Add prototype.
17267 (the_low_target): Add initializer for arch_setup field.
17268 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17269 (the_low_target): Add initializer for arch_setup field.
17270 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17271 (the_low_target): Add initializer for arch_setup field.
17273 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17274 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17275 instead of init_registers ().
17276 * win32-arm-low.c (init_registers_arm): Add prototype.
17277 (the_low_target): Add initializer for arch_setup field.
17278 * win32-i386-low.c (init_registers_i386): Add prototype.
17279 (the_low_target): Add initializer for arch_setup field.
17281 * spu-low.c (init_registers_spu): Add prototype.
17282 (initialize_low): Call initialie_registers_spu () instead of
17283 initialize_registers ().
17285 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17287 * server.c (handle_v_requests): When handling the vRun and vAttach
17288 packets, if already debugging a process, don't kill it. Return an
17291 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17293 * server.c (handle_query): Correct length check.
17295 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17297 * win32-low.c (do_initial_child_stuff): Add process handle
17298 parameter. Set current_process_handle and current_process_id from the
17299 parameters. Clear globals.
17300 (win32_create_inferior): Don't set current_process_handle and
17301 current_process_id here. Instead pass them on the call to
17302 do_initial_child_stuff.
17303 (win32_attach): Likewise.
17304 (win32_clear_inferiors): New.
17305 (win32_kill): Don't close the current process handle or the
17306 current thread handle here. Instead call win32_clear_inferiors.
17307 (win32_detach): Don't open a new handle to the process. Call
17308 win32_clear_inferiors.
17309 (win32_join): Don't rely on current_process_handle; open a new
17310 handle using the process id.
17311 (win32_wait): Call win32_clear_inferiors when the inferior process
17314 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17316 * server.c (monitor_show_help): Add "exit".
17318 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17320 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17321 (clean): Add reg-xtensa.c.
17322 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17323 * configure.srv (xtensa*-*-linux*) New target.
17324 * linux-xtensa-low.c: New.
17325 * xtensa-xtregs.c: New.
17327 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17329 * hostio.c: Don't include errno.h.
17330 (errno_to_fileio_errno): Move to hostio-errno.
17331 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17332 error number outputting to the target->hostio_last_error callback.
17333 (hostio_packet_error): Use FILEIO_EINVAL directly.
17334 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17335 calls to hostio_error.
17336 * hostio-errno.c: New.
17337 * server.h (hostio_last_error_from_errno): Declare.
17338 * target.h (target_ops): Add hostio_last_error member.
17339 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17340 as hostio_last_error handler.
17341 * spu-low.c (spu_target_ops): Likewise.
17342 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17343 (wince_hostio_last_error): New functions.
17344 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17345 as hostio_last_error handler.
17346 (win32_target_ops) [!_WIN32_WCE]: Register
17347 hostio_last_error_from_errno as hostio_last_error handler.
17348 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17349 (hostio-errno.o): New rule.
17350 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17351 * configure.srv (srv_hostio_err_objs): New variable. Default to
17353 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17354 * configure: Regenerate.
17356 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17358 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17359 (linux_kill, linux_detach): Clean up the process list.
17360 * remote-utils.c (remote_open): Improve port number parsing.
17361 (putpkt_binary, input_interrupt): Only send interrupts if the target
17363 * server.c (extended_protocol): Make static.
17364 (attached): Define earlier.
17365 (exit_requested, response_needed, program_argv): New variables.
17366 (target_running): New.
17367 (start_inferior): Clear attached here.
17368 (attach_inferior): Set attached here.
17369 (require_running): Define.
17370 (handle_query): Use require_running and target_running. Implement
17372 (handle_v_attach, handle_v_run): New.
17373 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17374 (gdbserver_usage): Update.
17375 (main): Redo argument parsing. Handle --debug and --multi. Handle
17376 --attach along with other options or after the port. Save
17377 program_argv. Support no initial program. Resynchronize
17378 communication with GDB after an error. Handle "monitor exit".
17379 Use require_running and target_running. Always allow the extended
17380 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17381 restart in extended mode.
17382 * README: Refer to the GDB manual. Update --attach usage.
17384 2007-12-20 Andreas Schwab <schwab@suse.de>
17386 * linux-low.c (STACK_SIZE): Define.
17387 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17388 (linux_test_for_tracefork): Likewise.
17390 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17392 * linux-low.c (linux_wait_for_event): Update messages. Do not
17393 reinsert auto-delete breakpoints.
17394 * mem-break.c (struct breakpoint): Change return type of handler to
17396 (set_breakpoint_at): Update handler type.
17397 (reinsert_breakpoint_handler): Return 1 instead of calling
17399 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17401 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17402 * mem-break.h (set_breakpoint_at): Update handler type.
17403 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17404 * win32-low.c (auto_delete_breakpoint): New.
17405 (get_child_debug_event): Use it.
17407 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17409 * configure.ac: Check for pread and pwrite.
17410 * hostio.c (handle_pread): Fall back to lseek and read.
17411 (handle_pwrite): Fall back to lseek and write.
17412 * config.in, configure: Regenerated.
17414 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17416 * server.c (myresume): Add own_buf argument.
17417 (main): Update calls.
17419 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17421 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17422 * remote-utils.c (remote_open): Do not call disable_async_io.
17423 (block_async_io): Delete.
17424 (unblock_async_io): Make static.
17425 (initialize_async_io): New.
17426 * server.c (handle_v_cont): Handle async I/O here.
17427 (myresume): Likewise. Move other common resume tasks here...
17428 (main): ... from here. Call initialize_async_io. Disable async
17429 I/O before the main loop.
17430 * server.h (initialize_async_io): Declare.
17431 (block_async_io, unblock_async_io): Delete prototypes.
17432 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17434 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17436 * remote-utils.c (readchar): Allow binary data in received messages.
17438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17440 * win32-low.c (attaching): New global.
17441 (win32_create_inferior): Clear the `attaching' global.
17442 (win32_attach): Set the `attaching' global.
17443 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17444 attaching. Only set a breakpoint at the entry point if not
17447 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17449 * server.c (main): Don't report dll events on the initial
17450 connection on attaches.
17452 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17454 * server.c (main): Relax numerical bases supported for the pid of
17455 the --attach command line argument.
17457 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17459 * win32-low.c (win32_attach): Call OpenProcess before
17460 DebugActiveProcess, not after. Add last error output to error
17463 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17465 * win32-low.c (win32_get_thread_context)
17466 (win32_set_thread_context): New functions.
17467 (thread_rec): Use win32_get_thread_context.
17468 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17469 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17472 2007-12-03 Leo Zayas
17473 Pedro Alves <pedro_alves@portugalmail.pt>
17475 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17477 (child_add_thread): Minor cleanup.
17478 (child_continue): Resume artificially suspended threads before
17479 calling ContinueDebugEvent.
17480 (suspend_one_thread): New.
17481 (fake_breakpoint_event): New.
17482 (get_child_debug_event): Change return type to int. Check here if
17483 gdb sent an interrupt request. If a soft interrupt was requested,
17484 fake a breakpoint event. Return 0 if there is no event to handle,
17486 (win32_wait): Don't check here if gdb sent an interrupt request.
17487 Ensure there is a valid event to handle.
17488 (win32_request_interrupt): Add soft interruption method as last
17491 2007-12-03 Leo Zayas
17492 Pedro Alves <pedro_alves@portugalmail.pt>
17494 * win32-low.h (win32_thread_info): Add descriptions to the
17495 structure members. Replace `suspend_count' counter by a
17497 * win32-low.c (thread_rec): Update condition of when to get the
17498 context from the inferior. Rely on ContextFlags being set if it
17499 has already been retrieved. Only suspend the inferior thread if
17500 we haven't already. Warn if that fails.
17501 (continue_one_thread): s/suspend_count/suspended/. Only call
17502 ResumeThread once. Warn if that fails.
17504 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17506 * win32-low.c (win32_wait): Don't read from the inferior when it
17507 has already exited.
17509 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17511 * Makefile.in (win32_low_h): New variable.
17512 (win32-low.o): Add dependency on $(win32_low_h).
17513 (win32-arm-low.o, win32-i386-low.o): New rules.
17515 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17517 * hostio.c: Correct copyright year.
17519 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17521 * Makefile.in (OBS): Add hostio.o.
17522 (hostio.o): New rule.
17523 * server.h (handle_vFile): Declare.
17524 * hostio.c: New file.
17525 * server.c (handle_v_requests): Take packet_len and new_packet_len
17526 for binary packets. Call handle_vFile.
17527 (main): Update call to handle_v_requests.
17529 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17531 * linux-low.c: Include <sched.h>.
17533 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17535 * linux-low.c (linux_tracefork_grandchild): New.
17536 (linux_tracefork_child): Use clone.
17537 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17539 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17541 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17543 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17545 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17547 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17549 * inferiors.c (change_inferior_id): Delete.
17550 (add_pid_to_list, pull_pid_from_list): New.
17551 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17552 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17553 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17554 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17555 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17556 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17557 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17558 (using_threads): Always set to 1.
17559 (handle_extended_wait): New.
17560 (add_process): Do not set TID.
17561 (linux_create_inferior): Set must_set_ptrace_flags.
17562 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17563 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17564 (linux_thread_alive): Rename TID argument to LWPID.
17565 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17566 (linux_wait_for_event): Do not use TID or check using_threads. Update
17567 call to dead_thread_notify. Call handle_extended_wait.
17568 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17569 (send_sigstop): Delete sigstop_sent.
17570 (wait_for_sigstop): Avoid TID.
17571 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17572 (linux_test_for_tracefork): New.
17573 (linux_lookup_signals): Use thread_db_active and
17574 linux_supports_tracefork_flag.
17575 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17576 * linux-low.h (get_process_thread): Avoid TID.
17577 (struct process_ifo): Move thread_known and tid to the end. Remove
17579 (linux_attach_lwp, thread_db_init): Update prototypes.
17580 * server.h (change_inferior_id): Delete prototype.
17581 (add_pid_to_list, pull_pid_from_list): New prototypes.
17582 * thread-db.c (thread_db_use_events): New.
17583 (find_first_thread): Rename to...
17584 (find_one_thread): ...this. Update callers and messages. Do not
17585 call fatal. Check thread_db_use_events. Do not call
17586 change_inferior_id or new_thread_notify.
17587 (maybe_attach_thread): Update. Do not call new_thread_notify.
17588 (thread_db_init): Set thread_db_use_events. Check use_events.
17589 * utils.c (fatal, warning): Correct message prefix.
17591 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17593 * Makefile.in (clean): Remove new files.
17594 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17595 (powerpc-64.o, powerpc-64.c): New rules.
17596 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17597 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17599 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17601 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17602 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17603 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17604 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17605 (target_regsets): Add AltiVec and SPE register sets.
17606 * configure.ac: Check for AltiVec and SPE.
17607 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17608 (ppc_fill_vrregset, ppc_store_vrregset): New.
17609 (target_regsets): Add AltiVec register set.
17610 * configure: Regenerated.
17612 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17614 * linux-low.c (O_LARGEFILE): Define.
17615 (linux_read_memory): Use /proc/PID/mem.
17616 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17617 * configure, config.in: Regenerated.
17619 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17621 * linux-low.c (linux_wait_for_event): Do not pass signals while
17624 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17626 * win32-low.c (create_process): New.
17627 (win32_create_inferior): Use create_process instead of
17628 CreateProcess. If create_process failed retry appending an ".exe"
17629 suffix. Store the GetLastError result immediatelly after
17630 create_process calls and use it on the call to error.
17632 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17634 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17636 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17638 * configure.ac: Switch license to GPLv3.
17640 2007-08-01 Michael Snyder <msnyder@access-company.com>
17642 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17644 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17646 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17648 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17649 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17650 CloseToolhelp32Snapshot.
17651 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17652 CloseToolhelp32Snapshot.
17654 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17656 * server.c (main): Check for inferior exit before main loop.
17658 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17660 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17661 instead of on tmp_desc.
17663 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17664 Daniel Jacobowitz <dan@codesourcery.com>
17666 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17667 (add_thread): Minor cleanups.
17668 (clear_inferiors): Move lower in the file. Clear the DLL
17670 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17671 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17672 (xml_escape_text): New.
17673 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17675 (handle_v_cont): Report errors.
17676 (gdbserver_version): Update.
17677 (main): Correct size of own_buf. Do not report initial DLL events.
17678 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17679 (unloaded_dll, xml_escape_text): New.
17680 * win32-low.c (enum target_waitkind): Update comments.
17681 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17682 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17683 (win32_EnumProcessModules, win32_GetModuleInformation)
17684 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17685 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17686 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17687 (win32_Module32First, win32_Module32Next, load_toolhelp)
17688 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17689 (get_child_debug_event): Handle DLL events.
17690 (win32_wait): Likewise.
17692 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17694 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17695 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17697 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17699 * win32-low.c (handle_output_debug_string): Ignore event if not
17702 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17704 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17706 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17708 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17710 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17712 * inferiors.c (change_inferior_id): Add comment.
17713 * linux-low.c (check_removed_breakpoint): Add an early
17714 prototype. Improve debug output.
17715 (linux_attach): Doc update.
17716 (linux_detach_one_process, linux_detach): Clean up before releasing
17718 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17719 * linux-low.h (struct process_info): Doc improvement.
17720 * mem-break.c (delete_all_breakpoints): New.
17721 * mem-break.h (delete_all_breakpoints): New prototype.
17722 * thread-db.c (find_first_thread): New.
17723 (thread_db_create_event): Call it instead of
17724 thread_db_find_new_threads. Clean up unused variables.
17725 (maybe_attach_thread): Remove first thread handling.
17726 (thread_db_find_new_threads): Use find_first_thread.
17727 (thread_db_get_tls_address): Likewise.
17729 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17731 * thread-db.c (thread_db_find_new_threads): Add prototype.
17732 (thread_db_create_event): Check for the main thread before adding
17734 (maybe_attach_thread): Only enable event reporting if TID == 0.
17735 (thread_db_get_tls_address): Check for new threads.
17737 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17739 * linux-low.c (linux_create_inferior): Try execv before execvp.
17740 * spu-low.c (spu_create_inferior): Likewise.
17742 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17744 * linux-low.c (linux_create_inferior): Change execv to execvp.
17745 * spu-low.c (spu_create_inferior): Likewies.
17747 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17749 * Makefile.in (clean): Clean new files instead of deleted ones.
17750 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17751 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17753 * configure.srv: Specify XML files and new regformats for MIPS and
17755 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17756 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17757 an entry for the restart register.
17758 (mips_cannot_fetch_register, mips_cannot_store_register)
17759 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17760 register names to match the XML descriptions.
17761 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17762 restart register instead of $0.
17764 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17765 Markus Deuling <deuling@de.ibm.com>
17767 * remote-utils.c (decode_xfer_write): New function.
17768 * server.h (decode_xfer_write): Add prototype.
17769 * server.c (handle_query): Add PACKET_LEN argument. Support
17770 qXfer:spu:read and qXfer:spu:write packets.
17771 (main): Pass packet_len to handle_query.
17772 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17773 * target.h (target_ops): Add qxfer_spu.
17775 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17777 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17778 accessing non-seekable spufs files.
17780 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17782 * server.c (handle_query): Add reply for qC packet.
17784 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17785 Leo Zayas <lerele@champenstudios@com>
17787 * server.h (check_remote_input_interrupt_request): New function.
17788 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17789 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17790 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17791 (check_remote_input_interrupt_request): New function.
17792 * server.h (check_remote_input_interrupt_request): Declare.
17793 * win32-low.c (winapi_DebugBreakProcess,
17794 winapi_GenerateConsoleCtrlEvent): New typedefs.
17795 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17797 (win32_wait): Check for remote interrupt request
17798 with check_remote_input_interrupt_request.
17799 (win32_request_interrupt): New function.
17800 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17802 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17804 * win32-low.c (debug_registers_changed,
17805 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17806 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17807 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17808 (thread_rec): Get context using the low target.
17809 (child_add_thread): Call thread_added on the low target,
17810 which does the same thing.
17812 (do_initial_child_stuff): Remove debug registers references.
17813 Set context using the low target. Resume threads after
17814 setting the contexts.
17815 (child_continue): Remove dead variable. Remove debug
17816 registers references.
17817 (child_fetch_inferior_registers): Go through the low target.
17818 (do_child_store_inferior_registers): Remove.
17819 (child_store_inferior_registers): Go through the low target.
17820 (win32_resume): Remove debug registers references.
17821 Set context using the low target.
17822 (handle_exception): Change return type to void. Don't record
17823 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17824 first chance exception.
17825 (get_child_debug_event): Change return type to void. Remove
17826 goto loop. Always return after waiting for debug event.
17827 (win32_wait): Convert to switch statement. Handle spurious
17830 * win32-i386-low.c (debug_registers_changed,
17831 debug_registers_used): New.
17832 (initial_stuff): Rename to ...
17833 (i386_initial_stuff): ... this. Clear debug registers
17835 (store_debug_registers): Delete.
17836 (i386_get_thread_context): New.
17837 (load_debug_registers): Delete.
17838 (i386_set_thread_context): New.
17839 (i386_thread_added): New.
17840 (single_step): Rename to ...
17841 (i386_single_step): ... this.
17842 (do_fetch_inferior_registers): Rename to ...
17843 (i386_fetch_inferior_register): ... this.
17844 (i386_store_inferior_register): New.
17845 (the_low_target): Adapt to new interface.
17847 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17848 (arm_get_thread_context): New.
17849 (arm_set_thread_context): New.
17851 (do_fetch_inferior_registers): Rename to ...
17852 (arm_fetch_inferior_register): ... this.
17853 (arm_store_inferior_register): New.
17854 (arm_wince_breakpoint): Reimplement as unsigned long.
17855 (arm_wince_breakpoint_len): Define.
17856 (the_low_target): Adapt to new interface.
17858 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17859 load_debug_registers. Add get_thread_context, set_thread_context,
17860 thread_added and store_inferior_register. Rename
17861 fetch_inferior_registers to fetch_inferior_register.
17862 (regptr): Remove declaration.
17864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17866 * linux-low.c (linux_detach): Change return type to int. Return 0.
17867 * spu-low.c (spu_detach): Likewise.
17869 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17871 * target.h (target_ops): Change return type of detach to int.
17873 (join_inferior): New.
17874 * server.c (main): Don't skip detach support on mingw32.
17875 If the inferior doesn't support detaching return error.
17876 Call join_inferior instead of using waitpid.
17877 * linux-low.c (linux_join): New.
17878 (linux_target_op): Add linux_join.
17879 * spu-low.c (spu_join): New.
17880 (spu_target_ops): Add spu_join.
17881 * win32-low.c (win32_detach): Adapt to new interface.
17882 Reopen current_process_handle before detaching. Issue a child
17883 resume before detaching.
17885 (win32_target_op): Add win32_join.
17887 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17889 * win32-low.c (win32-attach): Fix return value.
17890 * target.h (target_ops): Describe ATTACH return values.
17892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17894 * win32-low.c (GETPROCADDRESS): Define.
17895 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17896 (winapi_DebugSetProcessKillOnExit): Likewise.
17897 (win32_create_inferior): Force usage of ansi CreateProcessA.
17898 (win32_attach): Use GETPROCADDRESS.
17899 (win32_detach): Likewise.
17901 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17903 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17905 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17907 * win32-low.c: Commit leftover changes from 2007-03-29.
17909 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17911 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17912 fields short instead of int. Add explicit padding.
17913 (i387_cache_to_fsave): Remove unnecessary casts.
17914 (i387_fsave_to_cache): Doc fix.
17915 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17917 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17919 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17920 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17922 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17924 * configure.srv (arm*-*-mingw32ce*): Move near the other
17927 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17929 * configure.ac: Add errno checking.
17930 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17931 sys/file.h and malloc.h.
17932 (AC_CHECK_DECLS): Add perror.
17933 (srv_mingwce): Handle.
17934 * configure.srv (i[34567]86-*-cygwin*): Add
17935 win32-i386-low.o to srv_tgtobj.
17936 (i[34567]86-*-mingw*): Likewise.
17937 (arm*-*-mingw32ce*): Add case.
17938 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17939 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17940 [__MINGW32CE__] (strerror): New function.
17941 [__MINGW32CE__] (errno): Define to GetLastError.
17942 [__MINGW32CE__] (COUNTOF): New macro.
17943 (remote_open): Remove extra close call.
17944 * mem-break.c (delete_breakpoint_at): New function.
17945 * mem-break.h (delete_breakpoint_at): Declare.
17946 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17947 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17948 [USE_WIN32API] (read, write): Add char* casts.
17949 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17950 * server.h: Include wincecompat.h on Windows CE.
17951 [HAVE_ERRNO_H]: Check.
17952 (perror): Declare if not declared.
17953 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17954 (perror_with_name): Remove errno declaration.
17955 * wincecompat.h: New.
17956 * wincecompat.c: New.
17957 * win32-low.h: New.
17958 * win32-arm-low.c: New.
17959 * win32-i386-low.c: New.
17960 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17961 (OUTMSG2): Make it safe.
17963 (COUNTOF): New macro.
17964 (NUM_REGS): Get it from the low target.
17965 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17966 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17967 (thread_rec): Let low target handle debug registers.
17968 (child_add_thread): Likewise.
17969 (child_init_thread_list): Likewise.
17970 (continue_one_thread): Likewise.
17972 (do_child_fetch_inferior_registers): Move to ...
17973 * win32-i386-low.c: ... here, and rename to ...
17974 (do_fetch_inferior_registers): ... this.
17975 * win32-low.c (child_fetch_inferior_registers):
17976 Go through the low target.
17977 (do_child_store_inferior_registers): Use regptr.
17978 (strwinerror): New function.
17979 (win32_create_inferior): Handle Windows CE.
17980 Use strwinerror instead of strerror on Windows error
17981 codes. Add program to the error output.
17982 Don't close the main thread handle on Windows CE.
17983 (win32_attach): Use coredll.dll on Windows CE.
17984 (win32_kill): Close current process and current
17986 (win32_detach): Use coredll.dll on Windows CE.
17987 (win32_resume): Let low target handle debug registers, and
17989 (handle_exception): Add/Remove initial breakpoint. Avoid
17990 non-existant WSTOPSIG on Windows CE.
17991 (win32_read_inferior_memory): Cast to remove warning.
17992 (win32_arch_string): Go through the low target.
17993 (initialize_low): Call set_breakpoint_data with the low
17994 target's breakpoint.
17995 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17996 FOP_REGNUM, mappings): Move to ...
17997 * win32-i386-low.c: ... here.
17998 * win32-low.c (win32_thread_info): Move to ...
17999 * win32-low.h: ... here.
18000 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18001 win32-arm-low.c and wincecompat.c.
18002 (all:): Add $EXEEXT.
18003 (install-only:): Likewise.
18004 (gdbserver:): Likewise.
18005 (gdbreplay:): Likewise.
18006 * config.in: Regenerate.
18007 * configure: Regenerate.
18009 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18011 * win32-low.c: Rename typedef thread_info to
18012 win32_thread_info throughout.
18014 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18016 * win32-i386-low.c: Rename to ...
18017 * win32-low.c: ... this.
18018 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18019 * Makefile.in: Likewise.
18021 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18023 * remote-utils.c (monitor_output): Constify msg parameter.
18024 * server.h (monitor_output): Likewise.
18025 * win32-i386-low.c (handle_output_debug_string): New.
18026 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18027 handle_output_debug_string.
18028 (get_child_debug_event): Likewise.
18030 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18032 * server.c (main): Correct strtoul check.
18034 2007-03-27 Jon Ringle <jon@ringle.org>
18036 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18038 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18040 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18042 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18044 * terminal.h: Check HAVE_SGTTY_H.
18046 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18048 * remote-utils.c (remote_open): Print out the assigned port number.
18050 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18052 * remote-utils.c (monitor_output): New function.
18053 * server.c (debug_threads): Define here.
18054 (monitor_show_help): New function.
18055 (handle_query): Handle qRcmd.
18056 (main): Do not handle 'd' packet.
18057 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18058 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18061 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18063 * Makefile.in (EXEEXT): New.
18064 (clean): Use $(EXEEXT).
18066 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18068 * target.h (target_ops): Rename send_signal to request_interrupt,
18069 and remove enum target_signal parameter.
18070 * linux-low.c (linux_request_interrupt): Rename from
18071 linux_send_signal, and always send SIGINT.
18072 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18073 and always send SIGINT.
18074 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18076 (input_interrupt): Likewise.
18078 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18080 * server.c (get_features_xml): Check if target implemented
18082 * win32-i386-low.c (win32_arch_string): New.
18083 (win32_target_ops): Add win32_arch_string as arch_string member.
18085 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18087 * spu-low.c (spu_arch_string): New.
18088 (spu_target_ops): Add spu_arch_string.
18090 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18092 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18093 * configure.ac: Do not check for terminal.h.
18094 * configure, config.in: Regenerated.
18096 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18098 * Makefile.in (OBS): Add $(XML_BUILTIN).
18099 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18101 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18102 (arm-with-iwmmxt.c): New.
18103 * config.in, configure: Regenerate.
18104 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18105 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18106 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18107 (arm*-*-linux*): Add iWMMXt and regset support.
18108 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18109 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18110 (arm_store_wmmxregset, target_regsets): New.
18111 * server.c (get_features_xml): Take annex argument. Check builtin
18113 (handle_query): Handle multiple annexes.
18115 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18117 * remote-utils.c [USE_WIN32API] (read, write): Define.
18118 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18121 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18123 * linux-i386-low.c (the_low_target): Set arch_string.
18124 * linux-x86-64-low.c (the_low_target): Likewise.
18125 * linux-low.c (linux_arch_string): New.
18126 (linux_target_ops): Add it.
18127 * linux-low.h (struct linux_target_ops): Add arch_string.
18128 * server.c (write_qxfer_response): Use const void * for DATA.
18129 (get_features_xml): New.
18130 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18131 * target.h (struct target_ops): Add arch_string method.
18133 2007-01-03 Denis Pilat <denis.pilat@st.com>
18134 Daniel Jacobowitz <dan@codesourcery.com>
18136 * linux-low.c (linux_kill): Handle being called with no threads.
18137 * win32-i386-low.c (win32_kill): Likewise.
18138 (get_child_debug_event): Clear current_process_handle.
18140 2006-12-30 Denis PILAT <denis.pilat@st.com>
18141 Daniel Jacobowitz <dan@codesourcery.com>
18143 * remote-utils.c (remote_open): Check the type of specified
18144 serial port devices before opening them.
18145 * server.c (main): Kill the inferior if an error occurs during
18146 the first remote_open.
18148 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18150 * README: Update supported targets.
18152 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18154 * Makefile.in (clean): Remove reg-mips64.c.
18155 (reg-mips64.c, reg-mips64.o): New rules.
18156 * configure.srv: Handle mips64. Include regset support for mips.
18157 * linux-mips-low.c (union mips_register): New.
18158 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18159 (mips_breakpoint, mips_breakpoint_at): Use int.
18160 (mips_collect_register, mips_supply_register)
18161 (mips_collect_register_32bit, mips_supply_register_32bit)
18162 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18163 (mips_store_fpregset, target_regsets): New.
18164 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18166 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18168 * configure.srv: Add target "spu*-*-*".
18169 * Makefile.in (clean): Remove reg-spu.c.
18170 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18171 * spu-low.c: New file.
18173 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18175 * configure.ac: Correct td_thr_tls_get_addr test.
18176 * configure: Regenerated.
18178 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18180 * linux-low.c (linux_wait_for_event): Reformat. Use the
18181 pass_signals array.
18182 * remote-utils.c (decode_address_to_semicolon): New.
18183 * server.c (pass_signals, handle_general_set): New.
18184 (handle_query): Mention QPassSignals for qSupported.
18185 (main): Call handle_general_set.
18186 * server.h (pass_signals, decode_address_to_semicolon): New.
18188 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18190 * server.c (handle_query): Correct error handling for read_auxv.
18192 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18194 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18195 and srv_linux_thread_db to yes.
18196 * linux-s390-low.c (s390_fill_gregset): New function.
18197 (target_regsets): Define data structure.
18199 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18201 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18202 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18203 * config.in, configure: Regenerated.
18204 * inferiors.c (gdb_id_to_thread): New function.
18205 (gdb_id_to_thread_id): Use it.
18206 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18207 * linux-low.h (struct process_info): Add th member.
18208 (thread_db_get_tls_address): New prototype.
18209 * remote-utils.c (decode_address): Make non-static.
18210 * server.c (handle_query): Handle qGetTLSAddr.
18211 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18212 * target.h (struct target_ops): Add get_tls_address.
18213 * thread-db.c (maybe_attach_thread): Save the thread handle.
18214 (thread_db_get_tls_address): New.
18216 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18218 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18219 (linux_resume_one_process): Take a siginfo_t *. Update all
18220 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18221 (struct pending_signals): Add a siginfo_t.
18222 (linux_wait_for_process): Always set last_status.
18223 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18224 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18225 * linux-low.h (struct process_info): Add last_status.
18227 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18229 * remote-utils.c (try_rle): New function.
18230 (putpkt_binary): Use it.
18232 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18234 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18235 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18236 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18237 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18238 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18241 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18243 * server.c (terminal_fd): New variable.
18244 (old_foreground_pgrp): Likewise.
18245 (restore_old_foreground_pgrp): New function.
18246 (start_inferior): Record the terminal file descriptor in terminal_fd
18247 and its original foreground group in old_foreground_pgrp. Register
18248 restore_old_foreground_pgrp with atexit().
18250 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18252 * server.c (handle_query): Correct qPart to qXfer.
18254 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18256 * configure.ac: Check for more headers which are missing on
18257 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18258 * configure.srv: Add Cygwin and mingw32.
18259 * remote-utils.c: Don't include headers unconditionally which
18260 are missing on mingw32. Include <winsock.h> for mingw32.
18261 (remote_open): Adjust for mingw32 support. Flush
18262 standard error after writing to it.
18263 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18264 (unblock_async_io, enable_async_io, disable_async_io)
18265 (readchar, getpkt): Update for Winsock support.
18266 (prepare_resume_reply): Expect a protocol signal number.
18267 * server.c: Disable <sys/wait.h> on mingw32.
18268 (start_inferior): Adjust for mingw32 support. Flush
18269 standard error after writing to it.
18270 (attach_inferior): Likewise. Use protocol signal
18272 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18274 * win32-i386-low.c: New file.
18275 * Makefile.in (XM_CLIBS): Set.
18276 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18277 (win32-i386-low.o): New dependency rule.
18278 * linux-low.c (linux_wait): Use target signal numbers.
18279 * target.h (struct target_ops): Doc fix.
18280 * server.h (target_signal_to_name): New prototype.
18281 * gdbreplay.c: Don't include headers unconditionally which
18282 are missing on mingw32. Include <winsock.h> for mingw32.
18283 (remote_close, remote_open): Adjust for Winsock support.
18284 * configure, config.in: Regenerated.
18286 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18288 * server.c (decode_xfer_read, write_qxfer_response): New.
18289 (handle_query): Take a packet length argument. Handle
18290 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18291 the qSupported response.
18292 (main): Update call to handle_query.
18294 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18296 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18297 (putpkt_binary): Renamed from putpkt and adjusted for binary
18299 (putpkt): New wrapper for putpkt_binary.
18300 (readchar): Don't mask off the high bit.
18301 (decode_X_packet): New function.
18302 * server.c (main): Call putpkt_binary if a handler sets the packet
18303 length. Save the length of the incoming packet. Handle 'X'.
18304 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18306 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18308 * server.c (handle_query): Handle qSupported.
18310 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18312 * remote-utils.c (all_symbols_looked_up): New variable.
18313 (look_up_one_symbol): Check it.
18314 * server.h (look_up_one_symbol): New declaration.
18315 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18317 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18319 * Makefile.in (linux-arm-low.o): Update dependencies.
18320 * linux-arm-low.c: Include "gdb_proc_service.h".
18321 (PTRACE_GET_THREAD_AREA): Define.
18322 (ps_get_thread_area): New function.
18324 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18326 * configure.srv (m68k*-*-uclinux*): New target.
18327 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18328 (linux_resume_one_process): Remove extraneous cast.
18329 (linux_read_offsets): New.
18330 (linux_target_op): Add linux_read_offsets on mmuless systems.
18331 * server.c (handle_query): Add qOffsets logic.
18332 * target.h (struct target_ops): Add read_offsets.
18334 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18336 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18337 (PTRACE_GET_THREAD_AREA): Define.
18338 (ps_get_thread_area): New function.
18339 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18340 (linux-x86-64-low.o): Update.
18342 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18344 * configure.ac: Remove checks for prfpregset_t.
18345 * gdb_proc_service.h: New file.
18346 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18347 new "gdb_proc_service.h".
18348 * proc-service.c: Likewise.
18349 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18350 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18351 * Makefile.in (gdb_proc_service_h): Updated.
18352 * configure, config.in: Regenerated.
18354 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18356 * remote-utils.c (prepare_resume_reply): Move declaration
18357 of gdb_id_from_wait to the top of the block.
18359 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18361 * linux-low.c (regsets_store_inferior_registers): Read the regset
18362 from the target before filling it.
18364 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18366 * server.c (attach_inferior): Return SIGTRAP for a successful
18369 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18371 * Makefile.in (OBS): Add version.o.
18372 (STAGESTUFF): Delete.
18373 (version.o): Add dependencies.
18374 (version.c): Replace rule.
18375 (clean): Remove version.c.
18376 * server.c (gdbserver_version): New.
18377 (gdbserver_usage): Use printf.
18378 (main): Handle --version and --help.
18379 * server.h (version, host_name): Add declarations.
18381 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18393 * linux-x86-64-low.c:
18395 * linux-s390-low.c:
18396 * linux-ppc64-low.c:
18398 * linux-mips-low.c:
18399 * linux-m68k-low.c:
18400 * linux-m32r-low.c:
18403 * linux-ia64-low.c:
18404 * linux-i386-low.c:
18405 * linux-crisv32-low.c:
18417 * gdbserver.1: Add (C) after Copyright. Update the FSF
18420 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18422 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18423 (arm_breakpoint_at): Recognize both breakpoints.
18424 (the_low_target): Use the correct breakpoint instruction.
18426 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18428 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18429 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18430 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18431 (the_low_target): Update.
18433 2005-10-25 Andreas Schwab <schwab@suse.de>
18435 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18437 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18438 (ia64_num_regs): Reduce to 462.
18440 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18442 * acinclude.m4: Correct quoting.
18443 * aclocal.m4: Regenerated.
18445 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18446 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18447 (thread_db_init): Call thread_db_err_str.
18448 * configure.ac: Check for TD_VERSION.
18449 * config.in, configure: Regenerated.
18451 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18453 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18455 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18457 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18458 is not available. Define HAVE_PTRACE_GETREGS if it is.
18459 * config.in, configure: Regenerated.
18460 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18461 * linux-i386-low.c, linux-m68k-low.c: Update to use
18462 HAVE_PTRACE_GETREGS.
18463 * linux-low.c (regsets_fetch_inferior_registers)
18464 (regsets_store_inferior_registers): Only return 0 if we processed
18466 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18467 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18469 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18471 * inferiors.c (struct thread_info): Add gdb_id.
18472 (add_thread): Add gdb_id argument.
18473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18474 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18475 calls to add_thread.
18476 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18477 * server.c (handle_query): Use thread_to_gdb_id.
18478 (handle_v_cont, main): Use gdb_id_to_thread_id.
18479 * server.h (add_thread): Update prototype.
18480 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18483 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18485 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18486 left-padded registers.
18487 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18488 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18490 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18492 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18493 * configure: Regenerate.
18494 * config.in: Regenerate.
18495 * server.h (NEED_DECLARATION_STRERROR):
18496 Replace with !HAVE_DECL_STRERROR.
18498 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18500 * linux-low.c (linux_wait, linux_send_signal): Don't test
18501 an unsigned long variable for > 0 if it could be MAX_ULONG.
18502 * server.c (myresume): Likewise.
18503 * target.c (set_desired_inferior): Likewise.
18505 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18507 * configure.ac: Simplify and improve check for socklen_t.
18508 * configure, config.in: Regenerate.
18510 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18512 * acconfig.h: Remove.
18513 * configure.ac: Add a test for socklen_t. Use three-argument
18514 AC_DEFINE throughout.
18515 * config.in: Regenerated using autoheader 2.59.
18516 * configure: Regenerated.
18518 * gdbreplay.c (socklen_t): Provide a default.
18519 (remote_open): Use socklen_t.
18520 * remote-utils.c (socklen_t): Provide a default.
18521 (remote_open): Use socklen_t.
18522 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18525 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18527 * linux-low.c (linux_read_memory, linux_write_memory)
18528 (linux_read_auxv): Likewise.
18529 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18530 (check_mem_write): Likewise.
18531 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18533 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18534 (registers_from_string, register_data): Likewise.
18535 * server.c (handle_query, main): Likewise.
18536 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18537 (decode_M_packet): Likewise.
18538 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18539 * target.h (struct target_ops): Update read_memory, write_memory,
18541 (read_inferior_memory, write_inferior_memory): Update.
18542 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18543 to unsigned char *.
18544 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18545 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18546 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18547 linux-s390-low.c, linux-sh-low.c: Update for changes in
18548 read_inferior_memory and the_low_target->breakpoint.
18550 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18552 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18553 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18554 * configure.srv: Add powerpc64-*-linux*.
18555 * linux-ppc64-low.c: New file.
18557 2005-05-23 Orjan Friberg <orjanf@axis.com>
18559 * linux-cris-low.c: New file with support for CRIS.
18560 * linux-crisv32-low.c: Ditto for CRISv32.
18561 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18562 (clean): Add reg-cris.c and reg-crisv32.c.
18563 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18564 reg-crisv32.o, and reg-crisv32.c to make rules.
18565 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18566 recognized targets.
18568 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18570 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18571 of sizeof (PTRACE_XFER_TYPE).
18572 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18574 2005-05-12 Orjan Friberg <orjanf@axis.com>
18576 * target.h (struct target_ops): Add insert_watchpoint,
18577 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18578 pointers for hardware watchpoint support.
18579 * linux-low.h (struct linux_target_ops): Ditto.
18580 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18581 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18582 to linux_target_ops.
18583 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18585 * server.c (main): Recognize 'Z' and 'z' packets.
18587 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18589 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18590 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18591 (the_low_target): Add new members.
18593 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18595 * proc-service.c (ps_lgetregs): Search all_processes instead of
18598 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18600 * server.c (start_inferior): Change return type to int.
18601 (attach_inferior): Change sigptr to int *.
18602 (handle_v_cont, handle_v_requests): Change signal to int *.
18603 (main): Change signal to int.
18605 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18607 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18608 * configure.srv: Add m32r*-*-linux*.
18609 * linux-m32r-low.c: New file.
18611 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18613 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18615 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18617 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18618 Take unsigned long arguments for PIDs.
18619 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18620 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18621 (wait_for_sigstop, linux_resume_one_process)
18622 (regsets_fetch_inferior_registers, linux_send_signal)
18623 (linux_read_auxv): Likewise. Update the types of variables holding
18624 PIDs. Update format string specifiers.
18625 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18626 * remote-utils.c (prepare_resume_reply): Likewise.
18627 * server.c (cont_thread, general_thread, step_thread)
18628 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18630 (handle_query): Update format specifiers.
18631 (handle_v_cont, main): Use strtoul for thread IDs.
18632 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18633 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18634 (general_thread, step_thread, thread_from_wait)
18635 (old_thread_from_wait): Update.
18636 * target.h (struct thread_resume): Use unsigned long for THREAD.
18637 (struct target_ops): Use unsigned long for arguments to attach and
18640 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18642 * acinclude.m4: Include bfd/bfd.m4 directly.
18643 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18644 <agriffis@toolchain.org>.
18645 * aclocal.m4, configure: Regenerated.
18647 2005-01-07 Andrew Cagney <cagney@gnu.org>
18649 * configure.ac: Rename configure.in, require autoconf 2.59.
18650 * configure: Re-generate.
18652 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18654 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18655 LIBS when finished.
18656 * aclocal.m4: Regenerated.
18657 * configure: Regenerated.
18659 2004-11-21 Andreas Schwab <schwab@suse.de>
18661 * linux-m68k-low.c (m68k_num_gregs): Define.
18662 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18663 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18664 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18665 (m68k_breakpoint_at): New. Add to the_low_target.
18667 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18668 srv_linux_thread_db to yes.
18670 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18672 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18673 (ARCH_SET_FS): Likewise.
18674 (ARCH_GET_FS): Likewise.
18675 (ARCH_GET_GS): Likewise.
18677 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18679 * linux-i386-low.c (ps_get_thread_area): New.
18680 * linux-x86-64-low.c (ps_get_thread_area): New.
18681 * linux-low.c: Include <sys/syscall.h>.
18682 (linux_kill_one_process): Don't kill the first thread here.
18683 (linux_kill): Kill the first thread here.
18684 (kill_lwp): New function.
18685 (send_sigstop, linux_send_signal): Use it.
18686 * proc-service.c: Clean up #ifdefs.
18687 (fpregset_info): Delete.
18688 (ps_lgetregs): Update and enable implementation.
18689 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18691 * remote-utils.c (struct sym_cache, symbol_cache): New.
18692 (input_interrupt): Print a clearer message.
18693 (async_io_enabled): New variable.
18694 (enable_async_io, disable_async_io): Use it. Update comments.
18695 (look_up_one_symbol): Use the symbol cache.
18696 * thread-db.c (thread_db_look_up_symbols): New function.
18697 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18699 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18701 * configure.in: Test for -rdynamic.
18702 * configure: Regenerated.
18703 * Makefile (INTERNAL_LDFLAGS): New.
18704 (gdbserver, gdbreplay): Use it.
18706 2004-09-02 Andrew Cagney <cagney@gnu.org>
18708 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18710 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18712 * linux-low.c (linux_wait): Clear all_processes list also.
18714 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18716 * linux-low.c: Include <errno.h>. Remove extern declaration of
18719 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18721 * gdbreplay.c, server.h, utils.c: Update copyright years.
18723 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18725 * server.c (main): Print child status or termination signal from
18726 variable 'signal', not 'sig'.
18728 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18730 * linux-low.c (linux_read_memory): Change return type to
18731 int. Check for and return error from ptrace().
18732 * target.c (read_inferior_memory): Change return type to int. Pass
18733 back return status from the_target->read_memory().
18734 * target.h (struct target_ops): Adapt *read_memory() prototype.
18736 (read_inferior_memory): Adapt prototype.
18737 * server.c (main): Return an error packet if
18738 read_inferior_memory() returns an error.
18740 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18742 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18743 Unify with other clean targets.
18745 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18747 * server.c (handle_v_cont): Call set_desired_inferior.
18749 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18751 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18753 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18755 * linux-low.c (linux_wait): Unblock async I/O.
18756 (linux_resume): Block and enable async I/O.
18757 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18758 * server.h (block_async_io, unblock_async_io): Add prototypes.
18760 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18762 * remote-utils.c (remote_open): Print a status notice after
18763 opening a TCP port.
18764 * server.c (attach_inferior): Print a status notice after
18767 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18769 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18771 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18773 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18775 * server.c, target.h: Update copyright years.
18777 2004-02-25 Roland McGrath <roland@redhat.com>
18779 * target.h (struct target_ops): New member `read_auxv'.
18780 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18781 * linux-low.c (linux_read_auxv): New function.
18782 (linux_target_ops): Initialize `read_auxv' member to that.
18784 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18786 Committed by Jim Blandy <jimb@redhat.com>.
18788 * linux-s390-low.c (s390_num_regs): Update.
18789 (s390_regmap): Remove control registers. Use __s390x__ predefine
18790 instead of GPR_SIZE to distiguish s390 and s390x targets.
18792 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18794 * linux-low.c: Update copyright year.
18795 (check_removed_breakpoint): Clear pending_is_breakpoint.
18796 (linux_set_resume_request, linux_queue_one_thread)
18797 (resume_status_pending_p): New functions.
18798 (linux_continue_one_thread): Use process->resume.
18799 (linux_resume): Only resume threads if there are no pending events.
18800 * linux-low.h (struct process_info): Add resume request
18803 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18805 * regcache.c (new_register_cache): Clear the allocated register
18806 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18808 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18810 * linux-low.c (linux_resume): Take a struct thread_resume *
18812 (linux_wait): Update call.
18813 (resume_ptr): New static variable.
18814 (linux_continue_one_thread): Renamed from
18815 linux_continue_one_process. Use resume_ptr.
18816 (linux_resume): Use linux_continue_one_thread.
18817 * server.c (handle_v_cont, handle_v_requests): New functions.
18818 (myresume): New function.
18819 (main): Handle 'v' case.
18820 * target.h (struct thread_resume): New type.
18821 (struct target_ops): Change argument of "resume" to struct
18823 (myresume): Delete macro.
18825 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18827 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18828 (uninstall): Support DESTDIR.
18830 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18832 * configure.srv: Add xscale*linux copy of arm*linux entry.
18834 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18836 * linux-arm-low.c (arm_reinsert_addr): New function.
18837 (the_low_target): Add arm_reinsert_addr.
18839 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18841 * mem-break.c: Remove whitespace at end of file.
18843 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18845 * configure.in: Check whether we need to prototype strerror.
18846 * server.h: Optionally prototype strerror.
18847 * gdbreplay.c (perror_with_name): Use strerror.
18848 * linux-low.c (linux_attach_lwp): Use strerror.
18849 * utils.c (perror_with_name): Use strerror.
18850 * config.in, configure: Regenerated.
18852 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18854 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18855 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18857 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18859 * Makefile.in (SFILES): Update.
18860 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18861 low-sun3.c: Remove files.
18863 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18865 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18866 (linux_detach_one_process, linux_detach): New functions.
18867 (linux_target_ops): Add linux_detach.
18868 * server.c (main): Handle 'D' packet.
18869 * target.h (struct target_ops): Add "detach" member.
18870 (detach_inferior): Define.
18872 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18874 From Kelley Cook <kelleycook@wideopenwest.com>:
18875 * configure.srv: Accept i[34567]86 variants.
18877 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18879 * linux-low.c (linux_wait_for_event): Correct comment typos.
18880 (linux_resume_one_process): Call check_removed_breakpoint.
18881 (linux_send_signal): New function.
18882 (linux_target_ops): Add linux_send_signal.
18883 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18885 * target.h (struct target_ops): Add send_signal.
18887 2003-05-29 Jim Blandy <jimb@redhat.com>
18889 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18890 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18891 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18892 away part of the register's value.
18894 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18896 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18897 (linux_wait_for_event, linux_init_signals): Likewise.
18899 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18901 * configure.in: Check for stdlib.h.
18902 * configure: Regenerated.
18903 * config.in: Regenerated.
18905 2003-01-04 Andreas Schwab <schwab@suse.de>
18907 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18909 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18911 * Makefile.in: Remove obsolete code.
18913 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18915 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18916 defined(PT_FPR0_HI).
18918 2002-11-17 Stuart Hughes <seh@zee2.com>
18920 * linux-arm-low.c (arm_num_regs): Increase.
18921 (arm_regmap): Include status register.
18923 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18925 * linux-low.c (register_addr): Remove incorrect -1 check.
18927 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18929 * linux-low.c (linux_create_inferior): Call setpgid. Return
18931 (unstopped_p, linux_signal_pid): Remove.
18932 (linux_target_ops): Remove linux_signal_pid.
18933 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18934 global instead of target method.
18935 * target.h (struct target_ops): Remove signal_pid. Update comment
18936 for create_inferior.
18937 * server.c (signal_pid): New variable.
18938 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18939 gdbserver. Set the child to be the foreground process group.
18940 (attach_inferior): Set signal_pid.
18942 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18944 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18946 2002-08-20 Jim Blandy <jimb@redhat.com>
18948 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18951 2002-08-01 Andrew Cagney <cagney@redhat.com>
18953 * Makefile.in: Make chill references obsolete.
18955 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18957 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18958 * configure: Regenerate.
18959 * config.in: Regenerate.
18961 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18963 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18964 (perror_with_name, remote_close, remote_open, expect, play): Static.
18966 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18968 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18969 byte offsets instead of an array of indexes.
18970 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18972 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18974 * regcache.c: Add comment.
18976 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18978 * thread-db.c: New file.
18979 * proc-service.c: New file.
18980 * acinclude.m4: New file.
18981 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18982 proc-service.o, and thread-db.o.
18983 (linux-low.o): Add USE_THREAD_DB.
18984 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18985 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18986 * aclocal.m4: Regenerated.
18987 * config.in: Regenerated.
18988 * configure: Regenerated.
18989 * configure.in: Check for proc_service.h, sys/procfs.h,
18990 thread_db.h, and linux/elf.h headrs.
18991 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18992 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18993 Check for -lthread_db and thread support.
18994 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18995 PowerPC, and SuperH.
18996 * i387-fp.c: Constify arguments.
18997 * i387-fp.h: Likewise.
18998 * inferiors.c: (struct thread_info): Renamed from
18999 `struct inferior_info'. Remove PID member. Use generic inferior
19000 list header. All uses updated.
19001 (inferiors, signal_pid): Removed.
19002 (all_threads): New variable.
19003 (get_thread): Define.
19004 (add_inferior_to_list): New function.
19005 (for_each_inferior): New function.
19006 (change_inferior_id): New function.
19007 (add_inferior): Removed.
19008 (remove_inferior): New function.
19009 (add_thread): New function.
19010 (free_one_thread): New function.
19011 (remove_thread): New function.
19012 (clear_inferiors): Use for_each_inferior and free_one_thread.
19013 (find_inferior): New function.
19014 (find_inferior_id): New function.
19015 (inferior_target_data): Update argument type.
19016 (set_inferior_target_data): Likewise.
19017 (inferior_regcache_data): Likewise.
19018 (set_inferior_regcache_data): Likewise.
19019 * linux-low.c (linux_bp_reinsert): Remove.
19020 (all_processes, stopping_threads, using_thrads)
19021 (struct pending_signals, debug_threads, pid_of): New.
19022 (inferior_pid): Replace with macro.
19023 (struct inferior_linux_data): Remove.
19024 (get_stop_pc, add_process): New functions.
19025 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19026 Use add_process and add_thread.
19027 (linux_attach_lwp): New function, based on old linux_attach. Use
19028 add_process and add_thread. Set stop_expected for new threads.
19029 (linux_attach): New function.
19030 (linux_kill_one_process): New function.
19031 (linux_kill): Kill all LWPs.
19032 (linux_thread_alive): Use find_inferior_id.
19033 (check_removed_breakpoints, status_pending_p): New functions.
19034 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19035 Update. Use WNOHANG. Wait for cloned processes also. Update process
19036 struct for the found process.
19037 (linux_wait_for_event): New function.
19038 (linux_wait): Use it. Support LWPs.
19039 (send_sigstop, wait_for_sigstop, stop_all_processes)
19040 (linux_resume_one_process, linux_continue_one_process): New functions.
19041 (linux_resume): Support LWPs.
19042 (REGISTER_RAW_SIZE): Remove.
19043 (fetch_register): Use register_size instead. Call supply_register.
19044 (usr_store_inferior_registers): Likewise. Call collect_register.
19045 Fix recursive case.
19046 (regsets_fetch_inferior_registers): Improve error message.
19047 (regsets_store_inferior_registers): Add debugging.
19048 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19049 (unstopped_p, linux_signal_pid): New functions.
19050 (linux_target_ops): Add linux_signal_pid.
19051 (linux_init_signals): New function.
19052 (initialize_low): Call it. Initialize using_threads.
19053 * regcache.c (inferior_regcache_data): Add valid
19055 (get_regcache): Fetch registers lazily. Add fetch argument
19056 and update all callers.
19057 (regcache_invalidate_one, regcache_invalidate): New
19059 (new_register_cache): Renamed from create_register_cache.
19060 Return the new regcache.
19061 (free_register_cache): Change argument to a void *.
19062 (registers_to_string, registers_from_string): Call get_regcache
19063 with fetch flag set.
19064 (register_data): Make static. Pass fetch flag to get_regcache.
19065 (supply_register): Call get_regcache with fetch flag clear.
19066 (collect_register): Call get_regcache with fetch flag set.
19067 (collect_register_as_string): New function.
19068 * regcache.h: Update.
19069 * remote-utils.c (putpkt): Flush after debug output and use
19071 Handle input interrupts while waiting for an ACK.
19072 (input_interrupt): Use signal_pid method.
19073 (getpkt): Flush after debug output and use stderr.
19074 (outreg): Use collect_register_as_string.
19075 (new_thread_notify, dead_thread_notify): New functions.
19076 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19077 and general_thread.
19078 (look_up_one_symbol): Flush after debug output.
19079 * server.c (step_thread, server_waiting): New variables.
19080 (start_inferior): Don't use signal_pid. Update call to mywait.
19081 (attach_inferior): Update call to mywait.
19082 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19083 (main): Don't fetch/store registers explicitly. Use
19084 set_desired_inferior. Support proposed ``Hs'' packet. Update
19086 * server.h: Update.
19087 (struct inferior_list, struct_inferior_list_entry): New.
19088 * target.c (set_desired_inferior): New.
19089 (write_inferior_memory): Constify.
19090 (mywait): New function.
19091 * target.h: Update.
19092 (struct target_ops): New signal_pid method.
19093 (mywait): Removed macro, added prototype.
19095 * linux-low.h (regset_func): Removed.
19096 (regset_fill_func, regset_store_func): New.
19097 (enum regset_type): New.
19098 (struct regset_info): Add type field. Use new operation types.
19099 (struct linux_target_ops): stop_pc renamed to get_pc.
19100 Add decr_pc_after_break and breakpoint_at.
19101 (get_process, get_thread_proess, get_process_thread)
19102 (strut process_info, all_processes, linux_attach_lwp)
19103 (thread_db_init): New.
19105 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19106 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19107 (the_low_target): Add new members.
19108 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19109 (i386_store_fpxregset): Constify.
19110 (target_regsets): Add new kind identifier.
19111 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19112 (i386_set_pc): Add debugging.
19113 (i386_breakpoint_at): New function.
19114 (the_low_target): Add new members.
19115 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19116 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19117 (mips_breakpoint_at): New.
19118 (the_low_target): Add new members.
19119 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19120 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19121 (the_low_target): Add new members.
19122 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19123 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19124 (the_low_target): Add new members.
19125 * linux-x86-64-low.c (target_regsets): Add new kind
19128 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19130 From Martin Pool <mbp@samba.org>:
19131 * server.c (gdbserver_usage): New function.
19134 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19136 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19137 stop_at -> stop_pc.
19139 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19141 * Makefile.in: Remove obsolete code.
19143 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19145 * linux-low.c (regsets_fetch_inferior_registers),
19146 (regsets_store_inferior_registers): Removed cast to int from
19148 * regcache.h: Added declaration of struct inferior_info.
19150 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19152 * inferiors.c (struct inferior_info): Add regcache_data.
19153 (add_inferior): Call create_register_cache.
19154 (clear_inferiors): Call free_register_cache.
19155 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19156 * regcache.c (struct inferior_regcache_data): New.
19157 (registers): Remove.
19158 (get_regcache): New function.
19159 (create_register_cache, free_register_cache): New functions.
19160 (set_register_cache): Don't initialize the register cache here.
19161 (registers_to_string, registers_from_string, register_data): Call
19163 * regcache.h: Add prototypes.
19164 * server.h: Likewise.
19166 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19168 * mem-break.c: New file.
19169 * mem-break.h: New file.
19170 * Makefile.in: Add mem-break.o rule; update server.h
19172 * inferiors.c (struct inferior_info): Add target_data
19174 (clear_inferiors): Free target_data member if set.
19175 (inferior_target_data, set_inferior_target_data): New functions.
19176 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19177 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19178 * linux-low.c (linux_bp_reinsert): New variable.
19179 (struct inferior_linux_data): New.
19180 (linux_create_inferior): Use set_inferior_target_data.
19181 (linux_attach): Likewise. Call add_inferior.
19182 (linux_wait_for_one_inferior): New function.
19183 (linux_wait): Call it.
19184 (linux_write_memory): Add const.
19185 (initialize_low): Call set_breakpoint_data.
19186 * linux-low.h (struct linux_target_ops): Add breakpoint
19188 * server.c (attach_inferior): Remove extra add_inferior
19190 * server.h: Include mem-break.h. Update inferior.c
19192 * target.c (read_inferior_memory)
19193 (write_inferior_memory): New functions.
19194 * target.h (read_inferior_memory)
19195 (write_inferior_memory): Change macros to prototypes.
19196 (struct target_ops): Update comments. Add const to write_memory
19199 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19201 * linux-low.c (usr_store_inferior_registers): Support
19202 registers which are allowed to fail to store.
19203 * linux-low.h (linux_target_ops): Likewise.
19204 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19205 (ppc_cannot_store_register): FPSCR may not be storable.
19207 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19209 * server.h: Include <string.h> if HAVE_STRING_H.
19210 * ChangeLog: Correct paths in last ChangeLog entry.
19212 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19214 * linux-low.h: Remove obsolete prototypes.
19215 (struct linux_target_ops): New.
19216 (extern the_low_target): New.
19217 * linux-low.c (num_regs, regmap): Remove declarations.
19218 (register_addr): Use the_low_target explicitly.
19219 (fetch_register): Likewise.
19220 (usr_fetch_inferior_registers): Likewise.
19221 (usr_store_inferior_registers): Likewise.
19222 * linux-arm-low.c (num_regs): Remove.
19223 (arm_num_regs): Define.
19224 (arm_regmap): Renamed from regmap, made static.
19225 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19227 (arm_cannot_store_register): Renamed from cannot_store_register,
19229 (the_low_target): New.
19230 * linux-i386-low.c (num_regs): Remove.
19231 (i386_num_regs): Define.
19232 (i386_regmap): Renamed from regmap, made static.
19233 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19235 (i386_cannot_store_register): Renamed from cannot_store_register,
19237 (the_low_target): New.
19238 * linux-ia64-low.c (num_regs): Remove.
19239 (ia64_num_regs): Define.
19240 (ia64_regmap): Renamed from regmap, made static.
19241 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19243 (ia64_cannot_store_register): Renamed from cannot_store_register,
19245 (the_low_target): New.
19246 * linux-m68k-low.c (num_regs): Remove.
19247 (m68k_num_regs): Define.
19248 (m68k_regmap): Renamed from regmap, made static.
19249 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19251 (m68k_cannot_store_register): Renamed from cannot_store_register,
19253 (the_low_target): New.
19254 * linux-mips-low.c (num_regs): Remove.
19255 (mips_num_regs): Define.
19256 (mips_regmap): Renamed from regmap, made static.
19257 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19259 (mips_cannot_store_register): Renamed from cannot_store_register,
19261 (the_low_target): New.
19262 * linux-ppc-low.c (num_regs): Remove.
19263 (ppc_num_regs): Define.
19264 (ppc_regmap): Renamed from regmap, made static.
19265 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19267 (ppc_cannot_store_register): Renamed from cannot_store_register,
19269 (the_low_target): New.
19270 * linux-s390-low.c (num_regs): Remove.
19271 (s390_num_regs): Define.
19272 (s390_regmap): Renamed from regmap, made static.
19273 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19275 (s390_cannot_store_register): Renamed from cannot_store_register,
19277 (the_low_target): New.
19278 * linux-sh-low.c (num_regs): Remove.
19279 (sh_num_regs): Define.
19280 (sh_regmap): Renamed from regmap, made static.
19281 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19283 (sh_cannot_store_register): Renamed from cannot_store_register,
19285 (the_low_target): New.
19286 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19287 (the_low_target): New.
19289 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19291 * Makefile.in: Add stamp-h target.
19292 * configure.in: Create stamp-h.
19293 * configure: Regenerated.
19295 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19297 * inferiors.c: New file.
19298 * target.c: New file.
19299 * target.h: New file.
19300 * Makefile.in: Add target.o and inferiors.o. Update
19302 * linux-low.c (inferior_pid): New static variable,
19303 moved from server.c.
19304 (linux_create_inferior): Renamed from create_inferior.
19305 Call add_inferior. Return 0 on success instead of a PID.
19306 (linux_attach): Renamed from myattach.
19307 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19308 (linux_thread_alive): Renamed from mythread_alive.
19309 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19311 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19312 (regsets_store_inferior_registers): Correct error message.
19313 Add missing ``return 0''.
19314 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19315 (linux_store_registers): Renamed from store_inferior_registers.
19316 (linux_read_memory): Renamed from read_inferior_memory.
19317 (linux_write_memory): Renamed from write_inferior_memory.
19318 (linux_target_ops): New structure.
19319 (initialize_low): Call set_target_ops ().
19320 * remote-utils.c (unhexify): New function.
19321 (hexify): New function.
19322 (input_interrupt): Send signals to ``signal_pid''.
19323 * server.c (inferior_pid): Remove.
19324 (start_inferior): Update create_inferior call.
19325 (attach_inferior): Call add_inferior.
19326 (handle_query): New function.
19327 (main): Call handle_query for `q' packets.
19328 * server.h: Include "target.h". Remove obsolete prototypes.
19329 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19331 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19333 * Makefile.in: Add WARN_CFLAGS. Update configury
19335 * configure.in: Check for <string.h>
19336 * configure: Regenerate.
19337 * config.in: Regenerate.
19338 * gdbreplay.c: Include needed system headers.
19339 (remote_open): Remove strchr prototype.
19340 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19341 * regcache.c (supply_register): Change buf argument to const void *.
19342 (supply_register_by_name): Likewise.
19343 (collect_register): Change buf argument to void *.
19344 (collect_register_by_name): Likewise.
19345 * regcache.h: Add missing prototypes.
19346 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19347 * server.c (handle_query): New function.
19348 (attached): New static variable, moved out of main.
19349 (main): Quiet longjmp clobber warnings.
19350 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19351 * utils.c (error): Remove NORETURN.