1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's supports_software_single_step op
4 into a method of process_target.
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_supports_software_single_step): Update the macro.
9 * target.cc (process_target::supports_software_single_step): Define.
11 Update the derived classes and callers below.
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_software_single_step): Turn into ...
15 (linux_process_target::supports_software_single_step): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
21 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
23 Turn process_stratum_target's thread_name and thread_handle ops
24 into methods of process_target.
26 * target.h (struct process_stratum_target): Remove the target ops.
27 (class process_target): Add the target ops.
28 (target_thread_name): Update the macro.
29 (target_thread_handle): Update the macro.
30 * target.cc (process_target::thread_name): Define.
31 (process_target::thread_handle): Define.
33 Update the derived classes and callers below.
35 * linux-low.cc (linux_target_ops): Update.
36 (linux_process_target::thread_name): Define.
37 (linux_process_target::thread_handle): Define.
38 * linux-low.h (class linux_process_target): Update.
39 * lynx-low.cc (lynx_target_ops): Update.
40 * nto-low.cc (nto_target_ops): Update.
41 * win32-low.cc (win32_target_ops): Update.
43 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
45 Turn process_stratum_target's breakpoint_kind_from_pc,
46 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
47 ops into methods of process_target.
49 * target.h (struct process_stratum_target): Remove the target op.
50 (class process_target): Add the target op.
51 (target_breakpoint_kind_from_pc): Update the macro.
52 (target_breakpoint_kind_from_current_state): Update the macro.
53 (default_breakpoint_kind_from_pc): Remove declaration.
54 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
55 (process_target::breakpoint_kind_from_pc): ... this.
56 (process_target::breakpoint_kind_from_current_state): Define.
58 Update the derived classes and callers below.
60 * mem-break.cc (bp_size): Update.
62 * linux-low.cc (linux_target_ops): Update.
63 (linux_wait_1): Update.
64 (linux_breakpoint_kind_from_pc): Turn into ...
65 (linux_process_target::breakpoint_kind_from_pc): ... this.
66 (linux_sw_breakpoint_from_kind): Turn into ...
67 (linux_process_target::sw_breakpoint_from_kind): ... this.
68 (linux_breakpoint_kind_from_current_state): Turn into ...
69 (linux_process_target::breakpoint_kind_from_current_state): ... this.
70 * linux-low.h (class linux_process_target): Update.
71 * lynx-low.cc (lynx_target_ops): Update.
72 (lynx_process_target::sw_breakpoint_from_kind): Define.
73 * lynx-low.h (class lynx_process_target): Update.
74 * nto-low.cc (nto_target_ops): Update.
75 (nto_sw_breakpoint_from_kind): Turn into ...
76 (nto_process_target::sw_breakpoint_from_kind): ... this.
77 * nto-low.h (class nto_process_target): Update.
78 * win32-low.cc (win32_target_ops): Update.
79 (win32_sw_breakpoint_from_kind): Turn into ...
80 (win32_process_target::sw_breakpoint_from_kind): ... this.
81 * win32-low.h (class win32_process_target): Update.
83 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
85 Turn process_stratum_target's multifs_open, multifs_readlink,
86 multifs_unlink ops into methods of process_target.
88 * target.h (struct process_stratum_target): Remove the target ops.
89 (class process_target): Add the target ops. Also add
91 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
93 (process_target::supports_multifs): Define.
94 (process_target::multifs_open): Define.
95 (process_target::multifs_readlink): Define.
96 (process_target::multifs_unlink): Define.
98 Update the derived classes and callers below.
100 * hostio.cc (handle_setfs): Update.
101 (handle_open): Update.
102 (handle_unlink): Update.
103 (handle_readlink): Update.
104 * linux-low.cc (linux_target_ops): Update.
105 (linux_process_target::supports_multifs): Define.
106 (linux_process_target::multifs_open): Define.
107 (linux_process_target::multifs_readlink): Define.
108 (linux_process_target::multifs_unlink): Define.
109 * linux-low.h (class linux_process_target): Update.
110 * lynx-low.cc (lynx_target_ops): Update.
111 * nto-low.cc (nto_target_ops): Update.
112 * win32-low.cc (win32_target_ops): Update.
114 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
116 Turn process_stratum_target's pid_to_exec_file op into a method
119 * target.h (struct process_stratum_target): Remove the target op.
120 (class process_target): Add the target op. Also add
121 'supports_pid_to_exec_file'.
122 * target.cc (process_target::pid_to_exec_file): Define.
123 (process_target::supports_pid_to_exec_file): Define.
125 Update the derived classes and callers below.
127 * server.cc (handle_qxfer_exec_file): Update.
128 (handle_query): Update.
129 * linux-low.cc (linux_target_ops): Update.
130 (linux_process_target::supports_pid_to_exec_file): Define.
131 (linux_process_target::pid_to_exec_file): Define.
132 * linux-low.h (class linux_process_target): Update.
133 * lynx-low.cc (lynx_target_ops): Update.
134 * nto-low.cc (nto_target_ops): Update.
135 * win32-low.cc (win32_target_ops): Update.
137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
139 Turn process_stratum_target's supports_range_stepping op into a
140 method of process_target.
142 * target.h (struct process_stratum_target): Remove the target op.
143 (class process_target): Add the target op.
144 (target_supports_range_stepping): Update the macro.
145 * target.cc (process_target::supports_range_stepping): Define.
147 Update the derived classes and callers below.
149 * linux-low.cc (linux_target_ops): Update.
150 (linux_supports_range_stepping): Turn into ...
151 (linux_process_target::supports_range_stepping): ... this.
152 * linux-low.h (class linux_process_target): Update.
153 * lynx-low.cc (lynx_target_ops): Update.
154 * nto-low.cc (nto_target_ops): Update.
155 * win32-low.cc (win32_target_ops): Update.
157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
159 Turn process_stratum_target's btrace-related ops (enable_btrace,
160 disable_btrace, read_btrace, read_btrace_conf) into methods of
163 * target.h (struct process_stratum_target): Remove the target ops.
164 (class process_target): Add the target ops.
165 (target_enable_btrace): Update.
166 (target_disable_btrace): Update.
167 (target_read_btrace): Update.
168 (target_read_btrace_conf): Update.
169 * target.cc (process_target::enable_btrace): Define.
170 (process_target::disable_btrace): Define.
171 (process_target::read_btrace): Define.
172 (process_target::read_btrace_conf): Define.
174 Update the derived classes and callers below.
176 * linux-low.cc (linux_target_ops): Update.
177 (linux_process_target:enable_btrace): Define as a wrapper around
179 (linux_low_disable_btrace): Turn into ...
180 (linux_process_target::disable_btrace): ... this.
181 (linux_low_read_btrace): Turn into ...
182 (linux_process_target::read_btrace): ... this.
183 (linux_low_btrace_conf): Turn into ...
184 (linux_process_target::read_btrace_conf): ... this.
185 * linux-low.h (class linux_process_target): Update.
186 * lynx-low.cc (lynx_target_ops): Update.
187 * nto-low.cc (nto_target_ops): Update.
188 * win32-low.cc (win32_target_ops): Update.
190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
192 Turn process_stratum_target's supports_agent op into a method of
195 * target.h (struct process_stratum_target): Remove the target op.
196 (class process_target): Add the target op.
197 (target_supports_agent): Update the macro.
198 * target.cc (process_target::supports_agent): Define.
200 Update the derived classes and callers below.
202 * linux-low.cc (linux_target_ops): Update.
203 (linux_supports_agent): Turn into ...
204 (linux_process_target::supports_agent): ... this.
205 * linux-low.h (class linux_process_target): Update.
206 * lynx-low.cc (lynx_target_ops): Update.
207 * nto-low.cc (nto_target_ops): Update.
208 * win32-low.cc (win32_target_ops): Update.
210 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
212 Turn process_stratum_target's qxfer_libraries_svr4 op into a
213 method of process_target.
215 * target.h (struct process_stratum_target): Remove the target op.
216 (class process_target): Add the target op. Also add
217 'supports_qxfer_libraries_svr4'.
218 * target.cc (process_target::qxfer_libraries_svr4): Define.
219 (process_target::supports_qxfer_libraries_svr4): Define.
221 Update the derived classes and callers below.
223 * server.cc (handle_qxfer_libraries_svr4): Update.
224 (handle_query): Update.
225 * linux-low.cc (linux_target_ops): Update.
226 (linux_process_target::supports_qxfer_libraries_svr4): Define.
227 (linux_qxfer_libraries_svr4): Turn into ...
228 (linux_process_target::qxfer_libraries_svr4): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 * win32-low.cc (win32_target_ops): Update.
234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
236 Turn process_stratum_target's supports_disable_randomization op
237 into a method of process_target.
239 * target.h (struct process_stratum_target): Remove the target op.
240 (class process_target): Add the target op.
241 (target_supports_disable_randomization): Update the macro.
242 * target.cc (process_target::supports_disable_randomization): Define.
244 Update the derived classes and callers below.
246 * linux-low.cc (linux_target_ops): Update.
247 (linux_supports_disable_randomization): Turn into ...
248 (linux_process_target::supports_disable_randomization): ... this.
249 * linux-low.h (class linux_process_target): Update.
250 * lynx-low.cc (lynx_target_ops): Update.
251 * nto-low.cc (nto_target_ops): Update.
252 * win32-low.cc (win32_target_ops): Update.
254 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
256 Turn process_stratum_target's emit_ops op into a method of
259 * target.h (struct process_stratum_target): Remove the target op.
260 (class process_target): Add the target op.
261 (target_emit_ops): Update the macro.
262 * target.cc (process_target::emit_ops): Define.
264 Update the derived classes and callers below.
266 * linux-low.cc (linux_target_ops): Update.
267 (linux_emit_ops): Turn into ...
268 (linux_process_target::emit_ops): ... this.
269 * linux-low.h (class linux_process_target): Update.
270 * lynx-low.cc (lynx_target_ops): Update.
271 * nto-low.cc (nto_target_ops): Update.
272 * win32-low.cc (win32_target_ops): Update.
274 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
276 Turn process_stratum_target's install_fast_tracepoint_jump_pad
277 and get_min_fast_tracepoint_insn_len ops into methods of
280 * target.h (struct process_stratum_target): Remove the target ops.
281 (class process_target): Add the target ops. Also add
282 'supports_fast_tracepoints'.
283 (target_supports_fast_tracepoints): Update the macro.
284 (target_get_min_fast_tracepoint_insn_len): Update the macro.
285 (install_fast_tracepoint_jump_pad): Update and rename the macro
287 (target_install_fast_tracepoint_jump_pad): ... this.
288 * target.cc (process_target::supports_fast_tracepoints): Define.
289 (process_target::install_fast_tracepoint_jump_pad): Define.
290 (process_target::get_min_fast_tracepoint_insn_len): Define.
292 Update the derived classes and callers below.
294 * tracepoint.cc (install_fast_tracepoint): Update.
295 * linux-low.cc (linux_target_ops): Update.
296 (linux_process_target::supports_fast_tracepoints): Define.
297 (linux_install_fast_tracepoint_jump_pad): Turn into ...
298 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
299 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
300 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
301 * linux-low.h (class linux_process_target): Update.
302 * lynx-low.cc (lynx_target_ops): Update.
303 * nto-low.cc (nto_target_ops): Update.
304 * win32-low.cc (win32_target_ops): Update.
306 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
308 Turn process_stratum_target's stabilize_threads op into a
309 method of process_target.
311 * target.h (struct process_stratum_target): Remove the target op.
312 (class process_target): Add the target op.
313 (target_stabilize_threads): Update the macro.
314 * target.cc (process_target::stabilize_threads): Define.
316 Update the derived classes and callers below.
318 * server.cc (handle_status): Update.
319 * tracepoint.cc (cmd_qtdp): Update.
320 (cmd_qtstart): Update.
321 * linux-low.cc (linux_target_ops): Update.
322 (linux_stabilize_threads): Turn into ...
323 (linux_process_target::stabilize_threads): ... this.
324 (linux_wait_1): Update.
325 * linux-low.h (class linux_process_target): Update.
326 * lynx-low.cc (lynx_target_ops): Update.
327 * nto-low.cc (nto_target_ops): Update.
328 * win32-low.cc (win32_target_ops): Update.
330 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
332 Turn process_stratum_target's pause_all and unpause_all ops
333 into methods of process_target.
335 * target.h (struct process_stratum_target): Remove the target ops.
336 (class process_target): Add the target ops.
337 (pause_all): Update the macro and rename to...
338 (target_pause_all): ... this.
339 (unpause_all): Update the macro and rename to...
340 (target_unpause_all): ... this.
341 * target.cc (process_target::pause_all): Define.
342 (process_target::unpause_all): Define.
344 Update the derived classes and callers below.
346 * server.cc (handle_status): Update.
347 * tracepoint.cc (clear_installed_tracepoints): Update.
349 (cmd_qtstart): Update.
350 (stop_tracing): Update.
351 (cmd_qtstatus): Update.
352 (upload_fast_traceframes): Update.
353 (run_inferior_command): Update.
354 * linux-low.cc (linux_target_ops): Update.
355 (linux_pause_all): Turn into ...
356 (linux_process_target::pause_all): ... this.
357 (linux_unpause_all): Turn into ...
358 (linux_process_target::unpause_all): ... this.
359 (linux_process_target::prepare_to_access_memory): Update.
360 (linux_process_target::done_accessing_memory): Update.
361 * linux-low.h (class linux_process_target): Update.
362 * lynx-low.cc (lynx_target_ops): Update.
363 * nto-low.cc (nto_target_ops): Update.
364 * win32-low.cc (win32_target_ops): Update.
366 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
368 Turn process_stratum_target's get_tib_address op into a method of
371 * target.h (struct process_stratum_target): Remove the target op.
372 (class process_target): Add the target op. Also add
373 'supports_get_tib_address'.
374 * target.cc (process_target::get_tib_address): Define.
375 (process_target::supports_get_tib_address): Define.
377 Update the derived classes and callers below.
379 * server.cc (handle_query): Update.
380 * linux-low.cc (win32_target_ops): 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.
384 (win32_process_target::supports_get_tib_address): Define.
385 (win32_get_tib_address): Turn into ...
386 (win32_process_target::get_tib_address): ... this.
387 * win32-low.h (class win32_process_target): Update.
389 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
391 Turn process_stratum_target's thread_stopped op into a method of
394 * target.h (struct process_stratum_target): Remove the target op.
395 (class process_target): Add the target op. Also add
396 'supports_thread_stopped'.
397 (target_thread_stopped): Update the macro.
398 * target.cc (process_target::thread_stopped): Define.
399 (process_target::supports_thread_stopped): Define.
400 (prepare_to_access_memory): Update.
402 Update the derived classes and callers below.
404 * server.cc (queue_stop_reply_callback): Update.
405 * linux-low.cc (linux_target_ops): Update.
406 (linux_process_target::supports_thread_stopped): Define.
407 (linux_thread_stopped): Turn into ...
408 (linux_process_target::thread_stopped): ... this.
409 * linux-low.h (class linux_process_target): Update.
410 * lynx-low.cc (lynx_target_ops): Update.
411 * nto-low.cc (nto_target_ops): Update.
412 * win32-low.cc (win32_target_ops): Update.
414 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
416 Turn process_stratum_target's read_pc and write_pc ops into
417 methods of process_target.
419 * target.h (struct process_stratum_target): Remove the target ops.
420 (class process_target): Add the target ops.
421 * target.cc (process_target::read_pc): Define.
422 (process_target::write_pc): Define.
424 Update the derived classes and callers below.
426 * regcache.cc (regcache_read_pc): Update.
427 (regcache_write_pc): Update.
428 * linux-low.cc (linux_target_ops): Update.
429 (linux_read_pc): Turn into ...
430 (linux_process_target::read_pc): ... this.
431 (linux_write_pc): Turn into ...
432 (linux_process_target::write_pc): ... this.
433 * linux-low.h (class linux_process_target): Update.
434 * lynx-low.cc (lynx_target_ops): Update.
435 * nto-low.cc (nto_target_ops): Update.
436 * win32-low.cc (win32_target_ops): Update.
438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
440 Turn process_stratum_target's supports_tracepoints op into a
441 method of process_target.
443 * target.h (struct process_stratum_target): Remove the target op.
444 (class process_target): Add the target op.
445 (target_supports_tracepoints): Update the macro.
446 * target.cc (process_target::supports_tracepoints): Define.
448 Update the derived classes and callers below.
450 * linux-low.cc (linux_target_ops): Update.
451 (linux_supports_tracepoints): Turn into ...
452 (linux_process_target::supports_tracepoints): ... this.
453 * linux-low.h (class linux_process_target): Update.
454 * lynx-low.cc (lynx_target_ops): Update.
455 * nto-low.cc (nto_target_ops): Update.
456 * win32-low.cc (win32_target_ops): Update.
458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
460 Turn process_stratum_target's process_qsupported op into a method
463 * target.h (struct process_stratum_target): Remove the target op.
464 (class process_target): Add the target op.
465 (target_process_qsupported): Update the macro.
466 * target.cc (process_target::process_qsupported): Define.
468 Update the derived classes and callers below.
470 * linux-low.cc (linux_target_ops): Update.
471 (linux_process_qsupported): Turn into ...
472 (linux_process_target::process_qsupported): ... this.
473 * linux-low.h (class linux_process_target): Update.
474 * lynx-low.cc (lynx_target_ops): Update.
475 * nto-low.cc (nto_target_ops): Update.
476 * win32-low.cc (win32_target_ops): Update.
478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
480 Turn process_stratum_target's read_loadmap op into a method of
483 * target.h (struct process_stratum_target): Remove the target op.
484 (class process_target): Add the target op. Also add
485 'supports_read_loadmap'.
486 * target.cc (process_target::read_loadmap): Define.
487 (process_target::supports_read_loadmap): Define.
489 Update the derived classes and callers below.
491 * server.cc (handle_qxfer_fdpic): Update.
492 (handle_query): Update.
493 * linux-low.cc (linux_target_ops): Update.
494 (linux_process_target::supports_read_loadmap): Define.
495 (linux_read_loadmap): Turn into ...
496 (linux_process_target::read_loadmap): ... this.
497 * linux-low.h (class linux_process_target): Update.
498 * lynx-low.cc (lynx_target_ops): Update.
499 * nto-low.cc (nto_target_ops): Update.
500 * win32-low.cc (win32_target_ops): Update.
502 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
504 Turn process_stratum_target's core_of_thread op into a method of
507 * target.h (struct process_stratum_target): Remove the target op.
508 (class process_target): Add the target op.
509 (target_core_of_thread): Update the macro.
510 * target.cc (process_target::core_of_thread): Define.
512 Update the derived classes and callers below.
514 * linux-low.cc (linux_target_ops): Update.
515 (linux_process_target::core_of_thread): Define.
516 * linux-low.h (class linux_process_target): Update.
517 * lynx-low.cc (lynx_target_ops): Update.
518 * nto-low.cc (nto_target_ops): Update.
519 * win32-low.cc (win32_target_ops): Update.
521 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
523 Turn process_stratum_target's handle_monitor_command op into a
524 method of process_target.
526 * target.h (struct process_stratum_target): Remove the target op.
527 (class process_target): Add the target op.
528 (target_handle_monitor_command): Update the macro.
529 * target.cc (process_target::handle_monitor_command): Define.
531 Update the derived classes and callers below.
533 * server.cc (handle_query): Update.
534 * linux-low.cc (linux_target_ops): Update.
535 (linux_process_target::handle_monitor_command): Define.
536 * linux-low.h (class linux_process_target): Update.
537 * lynx-low.cc (lynx_target_ops): Update.
538 * nto-low.cc (nto_target_ops): Update.
539 * win32-low.cc (win32_target_ops): Update.
541 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
543 Turn process_stratum_target's handle_new_gdb_connection op into a
544 method of process_target.
546 * target.h (struct process_stratum_target): Remove the target op.
547 (class process_target): Add the target op.
548 (target_handle_new_gdb_connection): Update the macro.
549 * target.cc (process_target::handle_new_gdb_connection): Define.
551 Update the derived classes and callers below.
553 * linux-low.cc (linux_target_ops): Update.
554 (linux_handle_new_gdb_connection): Turn into ...
555 (linux_process_target::handle_new_gdb_connection): ... this.
556 * linux-low.h (class linux_process_target): Update.
557 * lynx-low.cc (lynx_target_ops): Update.
558 * nto-low.cc (nto_target_ops): Update.
559 * win32-low.cc (win32_target_ops): Update.
561 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
563 Turn process_stratum_target's supports_fork_events,
564 supports_vfork_events, and supports_exec_events ops into methods
567 * target.h (struct process_stratum_target): Remove the target ops.
568 (class process_target): Add the target ops.
569 (target_supports_fork_events): Update the macro.
570 (target_supports_vfork_events): Update the macro.
571 (target_supports_exec_events): Update the macro.
572 * target.cc (process_target::supports_fork_events): Define.
573 (process_target::supports_vfork_events): Define.
574 (process_target::supports_exec_events): Define.
576 Update the derived classes and callers below.
578 * linux-low.cc (linux_target_ops): Update.
579 (linux_supports_fork_events): Turn into ...
580 (linux_process_target::supports_fork_events): ... this.
581 (linux_supports_vfork_events): Turn into ...
582 (linux_process_target::supports_vfork_events): ... this.
583 (linux_supports_exec_events): Turn into ...
584 (linux_process_target::supports_exec_events): ... this.
585 * linux-low.h (class linux_process_target): Update.
586 * lynx-low.cc (lynx_target_ops): Update.
587 * nto-low.cc (nto_target_ops): Update.
588 * win32-low.cc (win32_target_ops): Update.
590 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
592 Turn process_stratum_target's supports_multi_process op into a
593 method of process_target.
595 * target.h (struct process_stratum_target): Remove the target op.
596 (class process_target): Add the target op.
597 * target.cc (process_target::supports_multi_process): Define.
598 (target_supports_multi_process): Update.
600 Update the derived classes and callers below.
602 * linux-low.cc (linux_target_ops): Update.
603 (linux_supports_multi_process): Turn into ...
604 (linux_process_target::supports_multi_process): ... this.
605 * linux-low.h (class linux_process_target): Update.
606 * lynx-low.cc (lynx_target_ops): Update.
607 * nto-low.cc (nto_target_ops): Update.
608 * win32-low.cc (win32_target_ops): Update.
610 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
612 Turn process_stratum_target's supports_non_stop, async, and
613 start_non_stop ops into methods of process_target.
615 * target.h (struct process_stratum_target): Remove the target ops.
616 (class process_target): Add the target ops.
617 (target_supports_non_stop): Update the macro.
618 (target_async): Update the macro.
619 (start_non_stop): Remove declaration.
620 * target.cc (process_target::supports_non_stop): Define.
621 (process_target::async): Define.
622 (process_target::start_non_stop): Define.
623 (start_non_stop): Remove.
625 Update the derived classes and callers below.
627 * server.cc (handle_qxfer_siginfo): Update.
628 (handle_query): Update.
629 * linux-low.cc (linux_target_ops): Update.
630 (linux_supports_non_stop): Turn into ...
631 (linux_process_target::supports_non_stop): ... this.
632 (linux_async): Turn into ...
633 (linux_process_target::async): ... this.
634 (linux_start_non_stop): Turn into ...
635 (linux_process_target::start_non_stop): ... this.
636 * linux-low.h (class linux_process_target): Update.
637 * lynx-low.cc (lynx_target_ops): Update.
638 * nto-low.cc (nto_target_ops): Update.
639 (nto_supports_non_stop): Remove; rely on the default behavior
641 * win32-low.cc (win32_target_ops): Update.
643 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
645 Turn process_stratum_target's qxfer_siginfo op into a method of
648 * target.h (struct process_stratum_target): Remove the target op.
649 (class process_target): Add the target op. Also add
650 'supports_qxfer_siginfo'.
651 * target.cc (process_target::qxfer_siginfo): Define.
652 (process_target::supports_qxfer_siginfo): Define.
654 Update the derived classes and callers below.
656 * server.cc (handle_qxfer_siginfo): Update.
657 (handle_query): Update.
658 * linux-low.cc (linux_target_ops): Update.
659 (linux_process_target::supports_qxfer_siginfo): Define.
660 (linux_xfer_siginfo): Turn into ...
661 (linux_process_target::qxfer_siginfo): ... this.
662 * linux-low.h (class linux_process_target): Update.
663 * lynx-low.cc (lynx_target_ops): Update.
664 * nto-low.cc (nto_target_ops): Update.
665 * win32-low.cc (win32_target_ops): Update.
667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
669 Turn process_stratum_target's qxfer_osdata op into a method of
672 * target.h (struct process_stratum_target): Remove the target op.
673 (class process_target): Add the target op. Also add
674 'supports_qxfer_osdata'.
675 * target.cc (process_target::qxfer_osdata): Define.
676 (process_target::supports_qxfer_osdata): Define.
678 Update the derived classes and callers below.
680 * server.cc (handle_qxfer_osdata): Update.
681 (handle_query): Update.
682 * linux-low.cc (linux_target_ops): Update.
683 (linux_process_target::supports_qxfer_osdata): Define.
684 (linux_qxfer_osdata): Turn into ...
685 (linux_process_target::qxfer_osdata): ... this.
686 * linux-low.h (class linux_process_target): Update.
687 * lynx-low.cc (lynx_target_ops): Update.
688 * nto-low.cc (nto_target_ops): Update.
689 * win32-low.cc (win32_target_ops): Update.
691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
693 Turn process_stratum_target's hostio_last_error op into a
694 method of process_target.
696 * target.h (struct process_stratum_target): Remove the target op.
697 (class process_target): Add the target op.
698 * target.cc: Add "hostio.h" to includes.
699 (process_target::hostio_last_error): Define.
701 Update the derived classes and callers below.
703 * hostio.cc (hostio_error): Update.
704 * linux-low.cc: Remove "hostio.h" from includes.
705 (linux_target_ops): Update.
706 * lynx-low.cc (lynx_target_ops): Update.
707 * nto-low.cc (nto_target_ops): Update.
708 * win32-low.h (class win32_process_target): Update.
709 * win32-low.cc (win32_target_ops): Update.
710 (wince_hostio_last_error): Turn into ...
711 (win32_process_target::hostio_last_error): ... this.
713 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
715 Turn process_stratum_target's get_tls_address op into a method of
718 * target.h (struct process_stratum_target): Remove the target op.
719 (class process_target): Add the target op. Also add
720 'supports_get_tls_address'.
721 * target.cc (process_target::get_tls_address): Define.
722 (process_target::supports_get_tls_address): Define.
724 Update the derived classes and callers below.
726 * server.cc (handle_query): Update.
727 * linux-low.cc (linux_target_ops): Update.
728 (linux_process_target::supports_get_tls_address): Define.
729 (linux_process_target::get_tls_address): Define.
730 * linux-low.h (class linux_process_target): Update.
731 * lynx-low.cc (lynx_target_ops): Update.
732 * nto-low.cc (nto_target_ops): Update.
733 * win32-low.cc (win32_target_ops): Update.
735 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
737 Turn process_stratum_target's read_offsets op into a method of
740 * target.h (struct process_stratum_target): Remove the target op.
741 (class process_target): Add the target op. Also add
742 'supports_read_offsets'.
743 * target.cc (process_target::read_offsets): Define.
744 (process_target::supports_read_offsets): Define.
746 Update the derived classes and callers below.
748 * server.cc (handle_query): Update.
749 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
750 (linux_target_ops): Update.
751 (linux_process_target::supports_read_offsets): Define.
752 (linux_read_offsets): Turn into ...
753 (linux_process_target::read_offsets): ... this.
754 * linux-low.h (class linux_process_target): Update.
755 * lynx-low.cc (lynx_target_ops): Update.
756 * nto-low.cc (nto_target_ops): Update.
757 * win32-low.cc (win32_target_ops): Update.
759 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
761 Turn process_stratum_target's stopped_by_watchpoint and
762 stopped_data_address ops into methods of process_target.
764 * target.h (struct process_stratum_target): Remove the target ops.
765 (class process_target): Add the target ops.
766 * target.cc (process_target::stopped_by_watchpoint): Define.
767 (process_target::stopped_data_address): Define.
769 Update the derived classes and callers below.
771 * remote-utils.cc (prepare_resume_reply): Update.
772 * linux-low.cc (linux_target_ops): Update.
773 (linux_stopped_by_watchpoint): Turn into ...
774 (linux_process_target::stopped_by_watchpoint): ... this.
775 (linux_stopped_data_address): Turn into ...
776 (linux_process_target::stopped_data_address): ... this.
777 * linux-low.h (class linux_process_target): Update.
778 * lynx-low.cc (lynx_target_ops): Update.
779 * nto-low.cc (nto_target_ops): Update.
780 (nto_stopped_by_watchpoint): Turn into ...
781 (nto_process_target::stopped_by_watchpoint): ... this.
782 (nto_stopped_data_address): Turn into ...
783 (nto_process_target::stopped_data_address): ... this.
784 * nto-low.h (class nto_process_target): Update.
785 * win32-low.cc (win32_target_ops): Update.
786 (win32_stopped_by_watchpoint): Turn into ...
787 (win32_process_target::stopped_by_watchpoint): ... this.
788 (win32_stopped_data_address): Turn into ...
789 (win32_process_target::stopped_data_address): ... this.
790 * win32-low.h (class win32_process_target): Update.
792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
794 Turn process_stratum_target's supports_hardware_single_step op into
795 a method of process_target.
797 * target.h (struct process_stratum_target): Remove the target op.
798 (class process_target): Add the target op.
799 (target_supports_hardware_single_step): Update the macro.
800 (target_can_do_hardware_single_step): Remove declaration.
801 * target.cc (process_target::supports_hardware_single_step): Define.
802 (target_can_do_hardware_single_step): Remove.
804 Update the derived classes and callers below.
806 * linux-low.h (class linux_process_target): Update.
807 * linux-low.cc (linux_target_ops): Update.
808 (linux_supports_hardware_single_step): Turn into ...
809 (linux_process_target::supports_hardware_single_step): ... this.
810 * lynx-low.h (class lynx_process_target): Update.
811 * lynx-low.cc (lynx_target_ops): Update.
812 (lynx_process_target::supports_hardware_single_step): Define.
813 * nto-low.h (class nto_process_target): Update.
814 * nto-low.cc (nto_target_ops): Update.
815 (nto_process_target::supports_hardware_single_step): Define.
816 * win32-low.h (class win32_process_target): Update.
817 * win32-low.cc (win32_target_ops): Update.
818 (win32_process_target::supports_hardware_single_step): Define.
820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
822 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
823 ops into methods of process_target.
825 * target.h (struct process_stratum_target): Remove the target ops.
826 (class process_target): Add the target ops.
827 (target_stopped_by_hw_breakpoint): Update the macro.
828 (target_supports_stopped_by_hw_breakpoint): Update the macro.
829 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
830 (process_target::supports_stopped_by_hw_breakpoint): Define.
832 Update the derived classes and callers below.
834 * linux-low.cc (linux_target_ops): Update.
835 (linux_stopped_by_hw_breakpoint): Turn into ...
836 (linux_process_target::stopped_by_hw_breakpoint): ... this.
837 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
838 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
839 * linux-low.h (class linux_process_target): Update.
840 * lynx-low.cc (lynx_target_ops): Update.
841 * nto-low.cc (nto_target_ops): Update.
842 * win32-low.cc (win32_target_ops): Update.
844 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
846 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
847 ops into methods of process_target.
849 * target.h (struct process_stratum_target): Remove the target ops.
850 (class process_target): Add the target ops.
851 (target_stopped_by_sw_breakpoint): Update the macro.
852 (target_supports_stopped_by_sw_breakpoint): Update the macro.
853 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
854 (process_target::supports_stopped_by_sw_breakpoint): Define.
856 Update the derived classes and callers below.
858 * linux-low.cc (linux_target_ops): Update.
859 (linux_stopped_by_sw_breakpoint): Turn into ...
860 (linux_process_target::stopped_by_sw_breakpoint): ... this.
861 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
862 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
863 * linux-low.h (class linux_process_target): Update.
864 * lynx-low.cc (lynx_target_ops): Update.
865 * nto-low.cc (nto_target_ops): Update.
866 * win32-low.cc (win32_target_ops): Update.
868 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
870 Turn process_stratum_target's insert_point and remove_point ops
871 into methods of process_target.
873 * target.h (struct process_stratum_target): Remove the target ops.
874 (class process_target): Add the target ops.
875 * target.cc (process_target::insert_point): Define.
876 (process_target::remove_point): Define.
878 Update the derived classes and callers below.
880 * mem-break.cc (set_raw_breakpoint_at): Update.
881 (delete_raw_breakpoint): Update.
882 (uninsert_raw_breakpoint): Update.
883 (reinsert_raw_breakpoint): Update.
884 * linux-low.cc (linux_target_ops): Update.
885 (linux_insert_point): Turn into ...
886 (linux_process_target::insert_point): ... this.
887 (linux_remove_point): Turn into ...
888 (linux_process_target::remove_point): ... this.
889 * linux-low.h (class linux_process_target): Update.
890 * lynx-low.cc (lynx_target_ops): Update.
891 * nto-low.cc (nto_target_ops): Update.
892 (nto_insert_point): Turn into ...
893 (nto_process_target::insert_point): ... this.
894 (nto_remove_point): Turn into ...
895 (nto_process_target::remove_point): ... this.
896 * nto-low.h (class nto_process_target): Update.
897 * win32-low.cc (win32_target_ops): Update.
898 (win32_insert_point): Turn into ...
899 (win32_process_target::insert_point): ... this.
900 (win32_remove_point): Turn into ...
901 (win32_process_target::remove_point): ... this.
902 * win32-low.h (class win32_process_target): Update.
904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
906 Turn process_stratum_target's supports_z_point_type op into a
907 method of process_target.
909 * target.h (struct process_stratum_target): Remove the target op.
910 (class process_target): Add the target op.
911 * target.cc (process_target::supports_z_point_type): Define.
913 Update the derived classes and callers below.
915 * mem-break.cc (z_type_supported): Update.
916 * linux-low.cc (linux_target_ops): Update.
917 (linux_supports_z_point_type): Turn into ...
918 (linux_process_target::supports_z_point_type): ... this.
919 * linux-low.h (class linux_process_target): Update.
920 * lynx-low.cc (lynx_target_ops): Update.
921 * nto-low.cc (nto_target_ops): Update.
922 (nto_supports_z_point_type): Turn into ...
923 (nto_process_target::supports_z_point_type): ... this.
924 * nto-low.h (class nto_process_target): Update.
925 * win32-low.cc (win32_target_ops): Update.
926 (win32_supports_z_point_type): Turn into ...
927 (win32_process_target::supports_z_point_type): ... this.
928 * win32-low.h (class win32_process_target): Update.
930 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
932 Turn process_stratum_target's read_auxv op into a method of
935 * target.h (class process_stratum_target): Remove the target op.
936 (struct process_target): Add the target op. Also add
937 'supports_read_auxv'.
938 * target.cc (process_target::read_auxv): Define.
939 (process_target::supports_read_auxv): Define.
941 Update the derived classes and callers below.
943 * server.cc (handle_qxfer_auxv): Update.
944 (handle_query): Update.
945 * linux-low.cc (linux_target_ops): Update.
946 (linux_process_target::supports_read_auxv): Define.
947 (linux_read_auxv): Turn into ...
948 (linux_process_target::read_auxv): ... this.
949 * linux-low.h (class linux_process_target): Update.
950 * lynx-low.cc (lynx_target_ops): Update.
951 * nto-low.cc (nto_target_ops): Update.
952 (nto_process_target::supports_read_auxv): Define.
953 (nto_read_auxv): Turn into ...
954 (nto_process_target::read_auxv): ... this.
955 * nto-low.h (class nto_process_target): Update.
956 * win32-low.cc (win32_target_ops): Update.
958 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
960 Turn process_stratum_target's request_interrupt op into a method of
963 * target.h (struct process_stratum_target): Remove the target op.
964 (class process_target): Add the target op.
966 Update the derived classes and callers below.
968 * remote-utils.cc (putpkt_binary_1): Update.
969 (input_interrupt): Update.
971 * server.cc (handle_v_requests): Update.
972 * linux-low.cc (linux_target_ops): Update.
973 (linux_request_interrupt): Turn into ...
974 (linux_process_target::request_interrupt): ... this.
975 * linux-low.h (class linux_process_target): Update.
976 * lynx-low.cc (lynx_target_ops): Update.
977 (lynx_request_interrupt): Turn into ...
978 (lynx_process_target::request_interrupt): ... this.
979 * lynx-low.h (class lynx_process_target): Update.
980 * nto-low.cc (nto_target_ops): Update.
981 (nto_request_interrupt): Turn into ...
982 (nto_process_target::request_interrupt): ... this.
983 * nto-low.h (class nto_process_target): Update.
984 * win32-low.cc (win32_target_ops): Update.
985 (win32_request_interrupt): Turn into ...
986 (win32_process_target::request_interrupt): ... this.
987 * win32-low.h (class win32_process_target): Update.
989 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
991 Turn process_stratum_target's look_up_symbols op into a method of
994 * target.h (struct process_stratum_target): Remove the target op.
995 (class process_target): Add the target op.
996 * target.cc (process_target::look_up_symbols): Define.
998 Update the derived classes and callers below.
1000 * server.cc (handle_query): Update.
1001 * linux-low.cc (linux_target_ops): Update.
1002 (linux_look_up_symbols): Turn into ...
1003 (linux_process_target::look_up_symbols): ... this.
1004 * linux-low.h (class linux_process_target): Update.
1005 * lynx-low.cc (lynx_target_ops): Update.
1006 * nto-low.cc (nto_target_ops): Update.
1007 * win32-low.cc (win32_target_ops): Update.
1009 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1011 Turn process_stratum_target's read_memory and write_memory
1012 ops into methods of process_target.
1014 * target.h (struct process_stratum_target): Remove the target ops.
1015 (class process_target): Add the target ops.
1017 Update the derived classes and callers below.
1019 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1020 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1021 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1022 (arm_get_syscall_trapinfo): Update.
1023 * linux-cris-low.cc (cris_breakpoint_at): Update.
1024 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1025 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1026 * linux-mips-low.cc (mips_breakpoint_at): Update.
1027 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1028 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1029 * linux-sh-low.cc (sh_breakpoint_at): Update.
1030 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1031 (sparc_store_gregset_from_stack): Update.
1032 (sparc_breakpoint_at): Update.
1033 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1034 * linux-tile-low.cc (tile_breakpoint_at): Update.
1035 * linux-x86-low.cc (x86_breakpoint_at): Update.
1036 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1037 * mem-brea.cc (insert_memory_breakpoint): Update.
1038 (validate_inserted_breakpoint): Update.
1039 * target.cc (read_inferior_memory): Update.
1040 (target_write_memory): Update.
1041 * linux-low.cc (linux_target_ops): Update.
1042 (linux_read_memory): Make a wrapper around the read_memory target
1044 (linux_process_target::read_memory): Rename from linux_read_memory.
1045 (linux_write_memory): Turn into ...
1046 (linux_process_target::write_memory): ... this.
1047 * linux-low.h (class linux_process_target): Update.
1048 * lynx-low.cc (lynx_target_ops): Update.
1049 (lynx_read_memory): Turn into ...
1050 (lynx_process_target::read_memory): ... this.
1051 (lynx_write_memory): Turn into ...
1052 (lynx_process_target::write_memory): ... this.
1053 * lynx-low.h (class lynx_process_target): Update.
1054 * nto-low.cc (nto_target_ops): Update.
1055 (nto_read_memory): Turn into ...
1056 (nto_process_target::read_memory): ... this.
1057 (nto_write_memory): Turn into ...
1058 (nto_process_target::write_memory): ... this.
1059 * nto-low.h (class nto_process_target): Update.
1060 * win32-low.cc (win32_target_ops): Update.
1061 (win32_read_inferior_memory): Turn into ...
1062 (win32_process_target::read_memory): ... this.
1063 (win32_write_inferior_memory): Turn into ...
1064 (win32_process_target::write_memory): ... this.
1065 * win32-low.h (class win32_process_target): Update.
1067 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1069 Turn process_stratum_target's prepare_to_access_memory and
1070 done_accessing_memory ops into methods of process_target.
1072 * target.h (struct process_stratum_target): Remove the target ops.
1073 (class process_target): Add the target ops.
1074 * target.cc (process_target::prepare_to_access_memory): Define.
1075 (process_target::done_accessing_memory): Define.
1076 (prepare_to_access_memory): Update.
1077 (done_accessing_memory): Update.
1079 Update the derived classes and callers below.
1081 * linux-low.cc (linux_target_ops): Update.
1082 (linux_prepare_to_access_memory): Turn into ...
1083 (linux_process_target::prepare_to_access_memory): ... this.
1084 (linux_done_accessing_memory): Turn into ...
1085 (linux_process_target::done_accessing_memory): ... this.
1086 * linux-low.h (class linux_process_target): Update.
1087 * lynx-low.cc (lynx_target_ops): Update.
1088 * nto-low.cc (nto_target_ops): Update.
1089 * win32-low.cc (win32_target_ops): Update.
1091 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1093 Turn process_stratum_target's fetch_registers and store_registers
1094 ops into methods of process_target.
1096 * target.h (struct process_stratum_target): Remove the target ops.
1097 (class process_target): Add the target ops.
1098 (fetch_inferior_registers): Update the macro.
1099 (store_inferior_registers): Update the macro.
1101 Update the derived classes and callers below.
1103 * linux-low.cc (linux_target_ops): Update.
1104 (linux_fetch_registers): Turn into ...
1105 (linux_process_target::fetch_registers): ... this.
1106 (linux_store_registers): Turn into ...
1107 (linux_process_target::store_registers): ... this.
1108 * linux-low.h (class linux_process_target): Update.
1109 * lynx-low.cc (lynx_target_ops): Update.
1110 (lynx_fetch_registers): Turn into ...
1111 (lynx_process_target::fetch_registers): ... this.
1112 (lynx_store_registers): Turn into ...
1113 (lynx_process_target::store_registers): ... this.
1114 * lynx-low.h (class lynx_process_target): Update.
1115 * nto-low.cc (nto_target_ops): Update.
1116 (nto_fetch_registers): Turn into ...
1117 (nto_process_target::fetch_registers): ... this.
1118 (nto_store_registers): Turn into ...
1119 (nto_process_target::store_registers): ... this.
1120 * nto-low.h (class nto_process_target): Update.
1121 * win32-low.cc (win32_target_ops): Update.
1122 (win32_fetch_inferior_registers): Turn into ...
1123 (win32_process_target::fetch_registers): ... this.
1124 (win32_store_inferior_registers): Turn into ...
1125 (win32_process_target::store_registers): ... this.
1126 * win32-low.h (class win32_process_target): Update.
1128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1130 Turn process_stratum_target's wait op into a method of
1133 * target.h (struct process_stratum_target): Remove the target op.
1134 (class process_target): Add the target op.
1136 Update the derived classes and callers below.
1138 * target.cc (target_wait): Update.
1139 * linux-low.cc (linux_target_ops): Update.
1140 (linux_wait): Turn into ...
1141 (linux_process_target::wait): ... this.
1142 * linux-low.h (class linux_process_target): Update.
1143 * lynx-low.cc (lynx_target_ops): Update.
1144 (lynx_wait): Turn into ...
1145 (lynx_process_target::wait): ... this.
1146 * lynx-low.h (class lynx_process_target): Update.
1147 * nto-low.cc (nto_target_ops): Update.
1148 (nto_wait): Turn into ...
1149 (nto_process_target::wait): ... this.
1150 * nto-low.h (class nto_process_target): Update.
1151 * win32-low.cc (win32_target_ops): Update.
1152 (win32_wait): Turn into ...
1153 (win32_process_target::wait): ... this.
1154 (do_initial_child_stuff): Update.
1155 * win32-low.h (class win32_process_target): Update.
1157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1159 Turn process_stratum_target's resume op into a method of
1162 * target.h (struct process_stratum_target): Remove the target op.
1163 (class process_target): Add the target op.
1165 Update the derived classes and callers below.
1167 * server.cc (resume): Update.
1168 * target.cc (target_stop_and_wait): Update.
1169 (target_continue_no_signal): Update.
1170 (target_continue): Update.
1171 * linux-low.cc (linux_target_ops): Update.
1172 (linux_resume): Turn into ...
1173 (linux_process_target::resume): ... this.
1174 * linux-low.h (class linux_process_target): Update.
1175 * lynx-low.cc (lynx_target_ops): Update.
1176 (lynx_resume): Turn into ...
1177 (lynx_process_target::resume): ... this.
1178 * lynx-low.h (class lynx_process_target): Update.
1179 * nto-low.cc (nto_target_ops): Update.
1180 (nto_resume): Turn into ...
1181 (nto_process_target::resume): ... this.
1182 * nto-low.h (class nto_process_target): Update.
1183 * win32-low.cc (win32_target_ops): Update.
1184 (win32_resume): Turn into ...
1185 (win32_process_target::resume): ... this.
1186 (win32_process_target::detach): Update.
1187 (do_initial_child_stuff): Update.
1188 * win32-low.h (class win32_process_target): Update.
1190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1192 Turn process_stratum_target's thread_alive op into a method of
1195 * target.h (struct process_stratum_target): Remove the target op.
1196 (class process_target): Add the target op.
1197 (mythread_alive): Update the macro.
1199 Update the derived classes and callers below.
1201 * linux-low.cc (linux_target_ops): Update.
1202 (linux_thread_alive): Turn into ...
1203 (linux_process_target::thread_alive): ... this.
1204 (wait_for_sigstop): Update.
1205 * linux-low.h (class linux_process_target): Update.
1206 * lynx-low.cc (lynx_target_ops): Update.
1207 (lynx_thread_alive): Turn into ...
1208 (lynx_process_target::thread_alive): ... this.
1209 * lynx-low.h (class lynx_process_target): Update.
1210 * nto-low.cc (nto_target_ops): Update.
1211 (nto_thread_alive): Turn into ...
1212 (nto_process_target::thread_alive): ... this.
1213 * nto-low.h (class nto_process_target): Update.
1214 * win32-low.cc (win32_target_ops): Update.
1215 (win32_thread_alive): Turn into ...
1216 (win32_process_target::thread_alive): ... this.
1217 * win32-low.h (class win32_process_target): Update.
1219 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1221 Turn process_stratum_target's join op into a method of
1224 * target.h (struct process_stratum_target): Remove the target op.
1225 (class process_target): Add the target op.
1226 (join_inferior): Update the macro.
1228 Update the derived classes and callers below.
1230 * linux-low.cc (linux_target_ops): Update.
1231 (linux_join): Turn into ...
1232 (linux_process_target::join): ... this.
1233 * linux-low.h (class linux_process_target): Update.
1234 * lynx-low.cc (lynx_target_ops): Update.
1235 (lynx_join): Turn into ...
1236 (lynx_process_target::join): ... this.
1237 * lynx-low.h (class lynx_process_target): Update.
1238 * nto-low.cc (nto_target_ops): Update.
1239 (nto_process_target::join): Define.
1240 * nto-low.h (class nto_process_target): Update.
1241 * win32-low.cc (win32_target_ops): Update.
1242 (win32_join): Turn into ...
1243 (win32_process_target::join): ... this.
1244 * win32-low.h (class win32_process_target): Update.
1246 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1248 Turn process_stratum_target's mourn op into a method of
1251 * target.h (struct process_stratum_target): Remove the target op.
1252 (class process_target): Add the target op.
1254 Update the derived classes and callers below.
1256 * target.cc (target_mourn_inferior): Update.
1257 * linux-low.cc (linux_target_ops): Update.
1258 (linux_mourn): Turn into ...
1259 (linux_process_target::mourn): ... this.
1260 (handle_extended_wait): Update.
1261 (linux_process_target::kill): Update.
1262 (linux_process_target::detach): Update.
1263 * linux-low.h (class linux_process_target): Update.
1264 * lynx-low.cc (lynx_target_ops): Update.
1265 (lynx_mourn): Turn into ...
1266 (lynx_process_target::mourn): ... this.
1267 * lynx-low.h (class lynx_process_target): Update.
1268 * nto-low.cc (nto_target_ops): Update.
1269 (nto_mourn): Turn into ...
1270 (nto_process_target::mourn): ... this.
1271 * nto-low.h (class nto_process_target): Update.
1272 * win32-low.cc (win32_target_ops): Update.
1273 (win32_mourn): Turn into ...
1274 (win32_process_target::mourn): ... this.
1275 * win32-low.h (class win32_process_target): Update.
1277 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1279 Turn process_stratum_target's detach op into a method of
1282 * target.h (struct process_stratum_target): Remove the target op.
1283 (class process_target): Add the target op.
1284 (detach_inferior): Update the macro.
1286 Update the derived classes and callers below.
1288 * linux-low.cc (linux_target_ops): Update.
1289 (linux_detach): Turn into ...
1290 (linux_process_target::detach): ... this.
1291 * linux-low.h (class linux_process_target): Update.
1292 * lynx-low.cc (lynx_target_ops): Update.
1293 (lynx_detach): Turn into ...
1294 (lynx_process_target::detach): ... this.
1295 * lynx-low.h (class lynx_process_target): Update.
1296 * nto-low.cc (nto_target_ops): Update.
1297 (nto_detach): Turn into ...
1298 (nto_process_target::detach): ... this.
1299 * nto-low.h (class nto_process_target): Update.
1300 * win32-low.cc (win32_target_ops): Update.
1301 (win32_detach): Turn into ...
1302 (win32_process_target::detach): ... this.
1303 * win32-low.h (class win32_process_target): Update.
1305 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1307 Turn process_stratum_target's kill op into a method of
1310 * target.h (struct process_stratum_target): Remove the target op.
1311 (class process_target): Add the target op.
1313 Update the derived classes and callers below.
1315 * target.cc (kill_inferior): Update.
1316 * linux-low.cc (linux_target_ops): Update.
1317 (linux_kill): Turn into ...
1318 (linux_process_target::kill): ... this.
1319 * linux-low.h (class linux_process_target): Update.
1320 * lynx-low.cc (lynx_target_ops): Update.
1321 (lynx_kill): Turn into ...
1322 (lynx_process_target::kill): ... this.
1323 * lynx-low.h (class lynx_process_target): Update.
1324 * nto-low.cc (nto_target_ops): Update.
1325 (nto_kill): Turn into ...
1326 (nto_process_target::kill): ... this.
1327 * nto-low.h (class nto_process_target): Update.
1328 * win32-low.cc (win32_target_ops): Update.
1329 (win32_kill): Turn into ...
1330 (win32_process_target::kill): ... this.
1331 * win32-low.h (class win32_process_target): Update.
1333 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1335 Turn process_stratum_target's attach op into a method of
1338 * target.h (struct process_stratum_target): Remove the target op.
1339 (class process_target): Add the target op.
1340 (myattach): Update the macro.
1342 Update the derived classes and callers below.
1344 * linux-low.cc (linux_target_ops): Update.
1345 (linux_attach): Turn into ...
1346 (linux_process_target::attach): ... this.
1347 * linux-low.h (class linux_process_target): Update.
1348 * lynx-low.cc (lynx_target_ops): Update.
1349 (lynx_attach): Turn into ...
1350 (lynx_process_target::attach): ... this.
1351 * lynx-low.h (class lynx_process_target): Update.
1352 * nto-low.cc (nto_target_ops): Update.
1353 (nto_attach): Turn into ...
1354 (nto_process_target::attach): ... this.
1355 * nto-low.h (class nto_process_target): Update.
1356 * win32-low.cc (win32_target_ops): Update.
1357 (win32_attach): Turn into ...
1358 (win32_process_target::attach): ... this.
1359 * win32-low.h (class win32_process_target): Update.
1361 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1363 Turn process_stratum_target's post_create_inferior op into a method
1366 * target.h (struct process_stratum_target): Remove the target op.
1367 (class process_target): Add the target op.
1368 (target_post_create_inferior): Update the macro.
1369 * target.cc (process_target::post_create_inferior): Define.
1371 Update the derived classes and callers below.
1373 * linux-low.cc (linux_target_ops): Update.
1374 (linux_post_create_inferior): Turn into ...
1375 (linux_process_target::post_create_inferior): ... this.
1376 * linux-low.h (class linux_process_target): Update.
1377 * lynx-low.cc (lynx_target_ops): Update.
1378 * nto-low.cc (nto_target_ops): Update.
1379 * win32-low.cc (win32_target_ops): Update.
1381 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1383 Turn process_stratum_target's create_inferior op into a method of
1386 * target.h (struct process_stratum_target): Remove the target op.
1387 (class process_target): Add the target op.
1388 (create_inferior): Rename the macro to ...
1389 (target_create_inferior): ... this.
1391 Update the derived classes and callers below.
1393 * server.cc (handle_v_run): Update.
1394 (captured_main): Update.
1395 (process_serial_event): Update.
1396 * linux-low.cc (linux_target_ops): Update.
1397 (linux_create_inferior): Turn into ...
1398 (linux_process_target::create_inferior): ... this.
1399 * linux-low.h (class linux_process_target): Update.
1400 * lynx-low.cc (lynx_target_ops): Update.
1401 (lynx_create_inferior): Turn into ...
1402 (lynx_process_target::create_inferior): ... this.
1403 * lynx-low.h (class lynx_process_target): Update.
1404 * nto-low.cc (nto_target_ops): Update.
1405 (nto_create_inferior): Turn into ...
1406 (nto_process_target::create_inferior): ... this.
1407 * nto-low.h (class nto_process_target): Update.
1408 * win32-low.cc (win32_target_ops): Update.
1409 (win32_create_inferior): Turn into ...
1410 (win32_process_target::create_inferior): ... this.
1411 * win32-low.h (class win32_process_target): Update.
1413 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1415 * target.h (class process_target): New class definition.
1416 (struct process_stratum_target) <pt>: New field with type
1418 * linux-low.h (class linux_process_target): Define as a derived
1419 class of 'process_target'.
1420 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1422 * lynx-low.h (class lynx_process_target): Define as a derived
1423 class of 'process_target'.
1424 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1426 * nto-low.h (class nto_process_target): Define as a derived
1427 class of 'process_target'.
1428 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1430 * win32-low.h (class win32_process_target): Define as a derived
1431 class of 'process_target'.
1432 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1435 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1437 * configure: Regenerate.
1439 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1440 Andrew Burgess <andrew.burgess@embecosm.com>
1442 * linux-riscv-low.cc: New file.
1443 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1444 and nat/riscv-linux-tdesc.c.
1445 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1446 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1449 2020-02-14 Tom Tromey <tom@tromey.com>
1451 * acinclude.m4: Don't include acx_configure_dir.m4.
1452 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1453 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1454 (all, install-only, uninstall, clean-info, clean)
1455 (maintainer-clean): Don't recurse.
1456 (subdir_do, all-lib): Remove.
1457 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1459 (generated_files): Update.
1460 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1461 * configure: Rebuild.
1462 * configure.ac: Don't configure gnulib or libiberty.
1465 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1467 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1468 preparing the command line for CreateProcess.
1469 (win32_create_inferior): Reflect the program name in debugging
1470 output that shows the process and its command line.
1472 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1474 * Makefile.in: Rename source files from .c to .cc.
1475 * %.c: Rename to %.cc.
1476 * configure.ac: Rename server.c to server.cc.
1477 * configure: Re-generate.
1479 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1481 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1483 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1485 * win32-low.c (win32_create_inferior): Set signal_pid.
1487 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1488 Pedro Alves <palves@redhat.com>
1490 Skip building gdbserver in a cross-configuration.
1491 * configure.srv: Set $gdbserver_host depending on whether $target
1492 is $host. Use $gdbserver_host instead of $host.
1494 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1496 * configure: Re-generate.
1498 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1500 * configure: Re-generate.
1502 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1504 * acinclude.m4: Update warning.m4 path.
1506 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1508 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1509 (handle_exception): Set siginfo_er.
1510 (win32_xfer_siginfo): New function.
1512 2020-02-07 Tom Tromey <tom@tromey.com>
1513 Pedro Alves <palves@redhat.com>
1515 * README: Update build documentation.
1516 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1518 * configure.ac: Update paths.
1519 * configure: Rebuild.
1520 * acinclude.m4: Update paths.
1521 * Makefile.in: Update include paths.
1522 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1523 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1524 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1525 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1526 (%-generated.c): Update paths.
1527 * Move entire directory from ../gdb/gdbserver.
1529 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1531 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1533 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1535 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1536 assignment instead of srv_linux_obj.
1538 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1540 * server.c (handle_qxfer_libraries): Write segment-address with
1543 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1545 * Makefile.in (install-strip): New target.
1546 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1547 * aclocal.m4: Regenerate.
1548 * configure: Regenerate.
1549 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1551 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1553 * Makefile.in (SFILES): Adjust paths to point to real files.
1554 (OBS): Move waitstatus.o to target/waitstatus.o.
1555 (TAGS): Transform paths appropriately.
1557 (nat/%.o): ... this pattern rule.
1559 (target/%.o): ... this pattern rule.
1560 * configure.srv: Adjust paths throughout to include nat/ prefix
1561 with the revant files.
1562 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1563 * configure: Regenerate.
1565 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1567 * Makefile.in (TAGS): Remove config files from the recipe.
1569 2020-01-14 Tom Tromey <tom@tromey.com>
1571 * configure: Rebuild.
1572 * configure.ac: Remove any checks that were added to common.m4.
1573 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1576 2020-01-14 Tom Tromey <tom@tromey.com>
1578 * server.h: Include config.h.
1579 * gdbreplay.c: Include config.h.
1580 * configure: Rebuild.
1581 * configure.ac: Don't source common.host.
1582 * acinclude.m4: Update path.
1583 * Makefile.in (INCSUPPORT): New variable.
1584 (INCLUDE_CFLAGS): Add INCSUPPORT.
1585 (SFILES): Update paths.
1586 (version-generated.c): Update path to create-version.sh.
1587 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1589 2020-01-14 Tom Tromey <tom@tromey.com>
1591 * configure.ac (LIBS): Use WIN32APILIBS.
1592 (USE_WIN32API): Don't define.
1593 * configure: Rebuild.
1595 2020-01-14 Tom Tromey <tom@tromey.com>
1597 * configure: Rebuild.
1599 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1601 * Makefile.in (%-generated.c): Remove rule for files from
1604 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1606 * configure: Re-generate.
1608 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1610 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1612 * tracepoint.c (stop_tracing, flush_trace_buffer,
1613 about_to_request_buffer_space, get_trace_state_variable_value,
1614 set_trace_state_variable_value, gdb_collect): Add declaration.
1616 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1618 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1619 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1620 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1621 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1622 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1625 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1627 * inferiors.c: Include gdbsupport/common-inferior.h.
1629 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1631 * hostio-errno.c: Include hostio.h.
1633 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1635 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1638 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1640 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1641 * linux-arm-tdesc.h: Include arch/arm.h.
1643 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1645 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1647 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1649 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1650 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1652 2020-01-10 Pedro Alves <palves@redhat.com>
1654 * fork-child.c (post_fork_inferior): Pass target down to
1656 * inferiors.c (switch_to_thread): Add process_stratum_target
1658 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1659 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1660 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1661 * remote-utils.c (prepare_resume_reply): Pass the target to
1663 * target.c (the_target): Now a process_stratum_target.
1664 (done_accessing_memory): Pass the target to switch_to_thread.
1665 (set_target_ops): Ajust to use process_stratum_target.
1666 * target.h (struct target_ops): Rename to ...
1667 (struct process_stratum_target): ... this.
1668 (the_target, set_target_ops): Adjust.
1669 (prepare_to_access_memory): Adjust comment.
1670 * win32-low.c (child_xfer_memory): Adjust to use
1671 process_stratum_target.
1672 (win32_target_ops): Now a process_stratum_target.
1674 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1675 Pedro Alves <palves@redhat.com>
1677 * win32-low.c (get_child_debug_event): Extract the fatal exception
1678 from the exit status and convert to the equivalent Posix signal
1680 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1681 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1683 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1685 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1687 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1689 * server.c (gdbserver_version): Change copyright year to 2020.
1690 * gdbreplay.c (gdbreplay_version): Likewise.
1692 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1694 * configure: Regenerate.
1695 * configure.ac: Quote variable arguments of test.
1697 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1699 * Makefile.in: Fix build with GNU Make 3.81
1701 2019-12-16 Tom Tromey <tromey@adacore.com>
1703 * server.c (get_exec_file): Constify result.
1705 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1707 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1708 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1709 * config.in: Regenerate.
1710 * configure: Regenerate.
1711 * configure.ac: Don't check for strerror.
1712 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1713 Call safe_strerror instead of strerror.
1714 * server.h (strerror): Remove this now-unnecessary declaration.
1715 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1717 (gdb_agent_helper_thread): Likewise.
1718 * utils.c (perror_with_name): Likewise.
1720 2019-11-26 Tom Tromey <tom@tromey.com>
1722 * configure, config.in: Rebuild.
1724 2019-11-26 Tom Tromey <tom@tromey.com>
1726 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1727 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1729 * configure, config.in: Rebuild.
1731 2019-11-26 Tom Tromey <tom@tromey.com>
1733 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1734 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1735 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1736 * acinclude.m4: Include ax_pthread.m4.
1737 * config.in, configure: Rebuild.
1739 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1741 * debug.c (debug_set_output): Call safe_strerror instead of
1743 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1744 (linux_kill_one_lwp): Likewise.
1745 (linux_detach_one_lwp): Likewise.
1746 (linux_wait_for_event_filtered): Likewise.
1747 (store_register): Likewise.
1748 * lynx-low.c (lynx_attach): Likewise.
1749 * mem-break.c (insert_memory_breakpoint): Likewise.
1750 (remove_memory_breakpoint): Likewise.
1751 (delete_fast_tracepoint_jump): Likewise.
1752 (set_fast_tracepoint_jump): Likewise.
1753 (uninsert_fast_tracepoint_jumps_at): Likewise.
1754 (reinsert_fast_tracepoint_jumps_at): Likewise.
1755 * nto-low.c (nto_xfer_memory): Likewise.
1756 (nto_resume): Likewise.
1758 2019-11-20 Luis Machado <luis.machado@linaro.org>
1760 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1761 instead of register count.
1762 * tdesc.c (tdesc_contains_feature): New function.
1763 * tdesc.h (tdesc_contains_feature): New prototype.
1765 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1767 * Makefile.in: Add safe-strerror.c.
1768 * configure: Regenerate.
1769 * configure.ac: Don't source common.host.
1771 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1773 * config.in: Regenerate.
1774 * configure: Regenerate.
1776 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1778 * ax.c (ax_printf): Handle size_t_arg.
1780 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1782 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1783 * mi/mi-main.c (output_cores): Likewise.
1784 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1785 (linux_xfer_osdata_modules): Likewise.
1786 * remote.c (register_remote_support_xml): Likewise.
1787 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1788 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1790 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1792 * configure: Regenerate.
1793 * configure.ac: Remove check for strerror_r.
1795 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1797 * config.in: Regenerate.
1798 * configure: Regenerate.
1799 * configure.ac: Also check for strerror_r.
1801 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1803 * ax.h (debug_agent): Remove duplicate declaration.
1805 2019-10-26 Tom de Vries <tdevries@suse.de>
1807 * linux-aarch64-low.c: Fix typos in comments.
1808 * linux-arm-low.c: Same.
1809 * linux-low.c: Same.
1810 * linux-ppc-low.c: Same.
1811 * proc-service.c: Same.
1814 * tracepoint.c: Same.
1815 * win32-low.c: Same.
1817 2019-10-25 Tom Tromey <tromey@adacore.com>
1819 * utils.c (xstrdup): Remove.
1821 2019-10-23 Tom Tromey <tom@tromey.com>
1823 * configure, config.in: Rebuild.
1825 2019-10-23 Tom Tromey <tom@tromey.com>
1827 * configure: Rebuild.
1828 * acinclude.m4: Use m4_include, not sinclude.
1830 2019-10-17 Tom Tromey <tromey@adacore.com>
1832 * configure: Rebuild.
1833 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1834 in AC_CONFIG_FILES invocation.
1835 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1838 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1840 * server.c: Include xml-builtin.h.
1841 (get_xml_features): Don't declare xml_builtins here.
1843 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1845 * Makefile.in: Remove references to vec-ipa.o.
1847 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1849 * Makefile.in: Remove references to vec.c.
1851 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1853 * server.c (server_waiting): Change to bool.
1854 (extended_protocol): Likewise.
1855 (response_needed): Likewise.
1856 (exit_requested): Likewise.
1857 (run_once): Likewise.
1858 (report_no_resumed): Likewise.
1859 (non_stop): Likewise.
1860 (disable_packet_vCont): Likewise.
1861 (disable_packet_Tthread): Likewise.
1862 (disable_packet_qC): Likewise.
1863 (disable_packet_qfThreadInfo): Likewise.
1864 (handle_general_set): Update.
1865 (handle_detach): Update.
1866 (handle_monitor_command): Update.
1867 (handle_query): Update.
1868 (captured_main): Update.
1869 (process_serial_event): Update.
1870 * server.h (server_waiting): Change to bool.
1871 (disable_packet_vCont): Likewise.
1872 (disable_packet_Tthread): Likewise.
1873 (disable_packet_qC): Likewise.
1874 (disable_packet_qfThreadInfo): Likewise.
1875 (run_once): Likewise.
1876 (non_stop): Likewise.
1877 * target.c (target_stop_and_wait): Update.
1879 2019-10-02 Tom Tromey <tromey@adacore.com>
1881 * Makefile.in (SFILES): Add common-inferior.c.
1882 (OBS): Add common-inferior.o.
1883 * server.c (startup_with_shell): Don't define.
1885 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1887 * linux-low.c (linux_low_read_btrace): Update for change to
1890 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1892 * debug.c (debug_threads): Remove comment in favor of the header.
1893 * debug.h (using_threads): Add declaration.
1894 (debug_threads): Add comment.
1895 * linux-aarch64-low.c: Include debug.h and remove declaration of
1897 * nto-low.c: Likewise.
1898 * remote-utils.c: Likewise.
1899 * thread-db.c: Likewise.
1901 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1903 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1904 and powerpc-cell64l-ipa.o.
1905 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1906 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1907 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1910 * spu-low.c: Remove file.
1912 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1913 (parse_spufs_run): Remove.
1914 (ppc_get_pc): Remove Cell/B.E. support.
1915 (ppc_set_pc): Likewise.
1916 (ppc_breakpoint_at): Likewise.
1917 (ppc_arch_setup): Likewise.
1918 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1919 tdesc_powerpc_cell32l.
1920 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1921 or init_registers_powerpc_cell32l.
1922 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1923 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1924 or init_registers_powerpc_cell32l.
1925 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1926 (init_registers_powerpc_cell32l): Remove prototype.
1927 (init_registers_powerpc_cell64l): Likewise.
1929 * target.h (struct target_ops): Remove qxfer_spu member.
1930 * server.c (handle_qxfer_spu): Remove.
1931 (qxfer_packets): Remove entry for "spu".
1932 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1933 * linux-low.c (SPUFS_MAGIC): Remove.
1934 (spu_enumerate_spu_ids): Remove.
1935 (linux_qxfer_spu): Remove.
1936 (linux_target_ops): Remove qxfer_spu member.
1937 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1938 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1939 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1941 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1943 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1944 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1945 * config.in: Regenerate.
1946 * configure: Regenerate.
1948 2019-08-15 Tom Tromey <tromey@adacore.com>
1950 * target.c (target_write_memory): Use gdb::byte_vector.
1952 2019-08-15 Tom Tromey <tromey@adacore.com>
1954 * tracepoint.c (write_inferior_data_pointer)
1955 (write_inferior_integer, write_inferior_int8)
1956 (write_inferior_uinteger, m_tracepoint_action_download)
1957 (r_tracepoint_action_download, x_tracepoint_action_download)
1958 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1959 (download_agent_expr, download_tracepoint_1)
1960 (download_trace_state_variables, upload_fast_traceframes): Update.
1961 * server.c (gdb_write_memory): Update.
1962 * remote-utils.c (relocate_instruction): Update.
1963 * proc-service.c (ps_pdwrite): Update.
1964 * mem-break.c (remove_memory_breakpoint)
1965 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1966 (uninsert_fast_tracepoint_jumps_at)
1967 (reinsert_fast_tracepoint_jumps_at): Update.
1968 * linux-x86-low.c (append_insns)
1969 (i386_install_fast_tracepoint_jump_pad)
1970 (amd64_write_goto_address, i386_write_goto_address): Update.
1971 * linux-s390-low.c (append_insns, s390_write_goto_address):
1973 * linux-ppc-low.c (ppc_relocate_instruction)
1974 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1975 (ppc_write_goto_address): Update.
1976 * linux-aarch64-low.c (append_insns): Update.
1977 * target.h (struct target_ops): Update.
1978 (write_inferior_memory): Don't declare.
1979 * target.c (target_write_memory): Rename from
1980 write_inferior_memory. Remove old target_write_memory.
1982 2019-08-15 Tom Tromey <tromey@adacore.com>
1984 * target.c (write_inferior_memory): Use std::vector.
1986 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1989 * configure.ac: Drop enable-libmcheck support.
1990 * configure, config.in: Rebuild.
1991 * acinclude.m4: Don't include it.
1993 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1995 * configure.srv: Remove Arm xml files.
1997 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1999 * configure.srv: Add new files. Remove xml generated files.
2000 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2002 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2003 * linux-aarch32-tdesc.c: New file.
2004 * linux-aarch32-tdesc.h: New file.
2005 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2006 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2007 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2008 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2009 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2010 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2011 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2012 (arm_read_description): Call arm_linux_read_description.
2013 (initialize_low_arch): Don't init registers.
2014 * linux-arm-tdesc.c: New file.
2015 * linux-arm-tdesc.h: New file.
2017 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2019 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2020 Move counter inside for.
2021 (arm_read_description): Check ptrace earlier.
2022 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2024 2019-07-09 Tom Tromey <tom@tromey.com>
2026 * configure: Rebuild.
2027 * configure.ac: Change common to gdbsupport.
2028 * acinclude.m4: Change common to gdbsupport.
2029 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2030 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2031 common to gdbsupport.
2032 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2033 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2034 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2035 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2036 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2037 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2038 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2039 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2040 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2041 common to gdbsupport.
2043 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2045 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2047 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2049 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2051 * configure.srv: Remove legacy xml.
2052 * linux-aarch64-low.c (initialize_low_arch): Remove
2053 initialize_low_tdesc call.
2054 * linux-aarch64-tdesc-selftest.c: Remove file.
2055 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2056 * linux-x86-low.c (initialize_low_arch): Remove
2057 initialize_low_tdesc call.
2058 * linux-x86-tdesc-selftest.c: Remove file.
2059 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2061 2019-06-20 Tom de Vries <tdevries@suse.de>
2063 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2064 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2066 2019-06-19 Tom de Vries <tdevries@suse.de>
2068 * debug.h (debug_write): Change return type to ssize_t.
2069 * debug.c (debug_write): Same.
2071 2019-06-14 Tom Tromey <tom@tromey.com>
2073 * configure.ac: Use new path to gnulib.
2074 * configure: Rebuild.
2075 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2078 2019-06-11 Tom Tromey <tom@tromey.com>
2080 * Makefile.in (SFILES): Add alloc.c.
2082 (IPA_OBJS): Add alloc-ipa.o.
2083 (alloc-ipa.o): New target.
2084 (%.o: ../%.c): New pattern rule.
2086 2019-06-10 Tom Tromey <tromey@adacore.com>
2088 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2089 end warning with a newline.
2090 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2092 * thread-db.c (attach_thread): Don't end warning with a newline.
2093 (thread_db_notice_clone): Likewise.
2094 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2096 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2097 end warning with a newline.
2099 2019-06-04 Pedro Alves <palves@redhat.com>
2101 * server.c (captured_main): Use make_unique_xstrdup.
2103 2019-06-02 Tom Tromey <tom@tromey.com>
2105 * gdbreplay.c (fromhex): Remove.
2106 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2108 2019-05-29 Tom Tromey <tromey@adacore.com>
2110 * configure: Rebuild.
2112 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2114 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2115 sign extension code on 32-bit builds.
2117 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2120 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2122 2019-04-19 Tom Tromey <tom@tromey.com>
2124 * server.c (struct vstop_notif): Derive from notif_event.
2126 (queue_stop_reply): Update.
2127 (remove_all_on_match_ptid): Change type. Rewrite.
2128 (discard_queued_stop_replies): Rewrite.
2129 (in_queued_stop_replies_ptid): Change type.
2130 (in_queued_stop_replies): Rewrite.
2131 (notif_stop): Update.
2132 (queue_stop_reply_callback): Update.
2133 (captured_main): Don't call initialize_notif.
2134 (push_stop_notification): Update.
2135 * notif.c (notif_write_event, handle_notif_ack)
2136 (notif_event_enque, notif_push): Update.
2137 (notif_event_xfree, initialize_notif): Remove.
2138 * notif.h (struct notif_event): Include <list>, not
2140 (struct notif_server) <queue>: Now a std::list.
2141 (notif_event_p): Remove typedef.
2142 (initialize_notif): Don't declare.
2143 (struct notif_event): Add virtual destructor.
2145 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2147 * ax.c (ax_vdebug): Call debug_printf.
2148 * debug.c (debug_write): New function.
2149 * debug.h (debug_write): New declaration.
2150 * linux-low.c (sigchld_handler): Call debug_write.
2152 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2154 * debug.c (debug_set_output): New function.
2155 (debug_vprintf): Send output to debug_file.
2156 (debug_flush): Likewise.
2157 * debug.h (debug_set_output): New declaration.
2158 * server.c (handle_monitor_command): Add debug-file option.
2159 (captured_main): Likewise.
2161 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2163 * debug.c (remote_debug): Add definition.
2164 * debug.h (remote_debug): Add declaration.
2165 * hostio.c (remote_debug): Remove declaration.
2166 * remote-utils.c (struct ui_file): Likewise.
2167 (remote_debug): Likewise.
2168 * remote-utils.h (remote_debug): Likewise,
2169 * server.c (remote_debug): Remove definition.
2171 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2173 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2174 when using a 64-bit gdbserver.
2176 2019-04-09 Tom Tromey <tromey@adacore.com>
2178 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2180 2019-04-08 Tom Tromey <tom@tromey.com>
2182 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2184 (linux_resume_one_lwp): Likewise.
2186 2019-04-08 Tom Tromey <tom@tromey.com>
2188 * gdbreplay.c: Update.
2189 * linux-low.c: Update.
2192 2019-04-08 Tom Tromey <tom@tromey.com>
2194 * server.c: Use C++ exception handling.
2195 * linux-low.c: Use C++ exception handling.
2196 * gdbreplay.c: Use C++ exception handling.
2198 2019-04-08 Tom Tromey <tom@tromey.com>
2200 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2201 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2202 (captured_main, main): Update.
2203 * gdbreplay.c (main): Update.
2205 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2207 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2208 value in argument pointer, return 1 if the entry is found and 0
2209 otherwise. Move comment.
2210 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2211 * linux-low.h (linux_get_auxv): Declare.
2212 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2214 2019-04-05 Tom Tromey <tromey@adacore.com>
2216 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2219 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2221 * linux-low.c (AT_HWCAP2): Add define if not already included.
2223 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2225 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2226 (aarch64_arch_setup): Call linux_get_hwcap.
2227 * linux-arm-low.c (arm_get_hwcap): Remove function.
2228 (arm_read_description): Call linux_get_hwcap.
2229 * linux-low.c (linux_get_auxv): New function.
2230 (linux_get_hwcap): Likewise.
2231 (linux_get_hwcap2): Likewise.
2232 * linux-low.h (linux_get_hwcap): New declaration.
2233 (linux_get_hwcap2): Likewise.
2234 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2235 (ppc_arch_setup): Call linux_get_hwcap.
2236 * linux-s390-low.c (s390_get_hwcap): Remove function.
2237 (s390_arch_setup): Call linux_get_hwcap.
2239 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2240 Jiong Wang <jiong.wang@arm.com>
2242 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2243 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2245 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2247 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2248 Jiong Wang <jiong.wang@arm.com>
2250 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2251 (aarch64_get_hwcap): New function.
2252 (aarch64_arch_setup): Read APIA hwcap.
2254 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2255 Jiong Wang <jiong.wang@arm.com>
2257 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2258 (initialize_low_tracepoint): Likewise.
2259 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2260 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2261 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2262 (aarch64_linux_read_description): Likewise.
2263 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2265 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2267 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2268 i386_create_target_description for 'segments' parameter.
2269 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2270 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2271 * win32-i386-low.c (i386_arch_setup): Likewise.
2273 2019-03-12 Tom Tromey <tromey@adacore.com>
2275 * linux-low.c (iterate_over_lwps): Update.
2277 2019-03-06 Tom Tromey <tom@tromey.com>
2279 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2280 (captured_main): Use SCOPE_EXIT.
2282 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2284 * configure.srv: Use '$enable_unittest' instead of '$development'
2285 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2288 2019-02-27 Tom Tromey <tromey@adacore.com>
2290 * gdbreplay.c (logchar): Handle \r\n.
2292 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2294 * linux-low.c (linux_attach): Add process before lwp.
2295 * server.c (attach_inferior): Check if already attached.
2297 2019-02-07 Tom Tromey <tom@tromey.com>
2299 * x86-tdesc.h: Rename include guard.
2300 * x86-low.h: Add include guard.
2301 * wincecompat.h: Rename include guard.
2302 * win32-low.h: Add include guard.
2303 * utils.h: Rename include guard.
2304 * tracepoint.h: Rename include guard.
2305 * tdesc.h: Rename include guard.
2306 * target.h: Rename include guard.
2307 * server.h: Rename include guard.
2308 * remote-utils.h: Rename include guard.
2309 * regcache.h: Rename include guard.
2310 * nto-low.h: Rename include guard.
2311 * notif.h: Add include guard.
2312 * mem-break.h: Rename include guard.
2313 * lynx-low.h: Add include guard.
2314 * linux-x86-tdesc.h: Add include guard.
2315 * linux-s390-tdesc.h: Add include guard.
2316 * linux-ppc-tdesc-init.h: Add include guard.
2317 * linux-low.h: Add include guard.
2318 * linux-aarch64-tdesc.h: Add include guard.
2319 * linux-aarch32-low.h: Add include guard.
2320 * inferiors.h: Rename include guard.
2321 * i387-fp.h: Rename include guard.
2322 * hostio.h: Rename include guard.
2323 * gdbthread.h: Rename include guard.
2324 * gdb_proc_service.h: Rename include guard.
2325 * event-loop.h: Rename include guard.
2326 * dll.h: Rename include guard.
2327 * debug.h: Rename include guard.
2328 * ax.h: Rename include guard.
2330 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2333 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2334 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2336 2019-01-25 Tom Tromey <tom@tromey.com>
2338 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2340 2019-01-25 Tom Tromey <tom@tromey.com>
2342 * win32-low.c: Fix common/ includes.
2343 * win32-i386-low.c: Fix common/ includes.
2344 * tracepoint.c: Fix common/ includes.
2345 * thread-db.c: Fix common/ includes.
2346 * target.h: Fix common/ includes.
2347 * symbol.c: Fix common/ includes.
2348 * spu-low.c: Fix common/ includes.
2349 * server.h: Fix common/ includes.
2350 * server.c: Fix common/ includes.
2351 * remote-utils.c: Fix common/ includes.
2352 * regcache.h: Fix common/ includes.
2353 * regcache.c: Fix common/ includes.
2354 * nto-x86-low.c: Fix common/ includes.
2355 * notif.h: Fix common/ includes.
2356 * mem-break.h: Fix common/ includes.
2357 * lynx-low.c: Fix common/ includes.
2358 * lynx-i386-low.c: Fix common/ includes.
2359 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2360 * linux-x86-low.c: Fix common/ includes.
2361 * linux-low.c: Fix common/ includes.
2362 * inferiors.h: Fix common/ includes.
2363 * i387-fp.c: Fix common/ includes.
2364 * hostio.c: Fix common/ includes.
2365 * hostio-errno.c: Fix common/ includes.
2366 * gdbthread.h: Fix common/ includes.
2367 * gdbreplay.c: Fix common/ includes.
2368 * fork-child.c: Fix common/ includes.
2369 * event-loop.c: Fix common/ includes.
2371 (enum gdb_agent_op): Fix common/ includes.
2373 2019-01-21 Tom Tromey <tom@tromey.com>
2375 * tracepoint.c: Fix includes.
2376 * remote-utils.c: Fix includes.
2377 * linux-x86-low.c: Fix includes.
2379 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2381 * gdbreplay.c (gdbreplay_version): Update copyright year in
2383 * server.c (gdbserver_version): Likewise.
2385 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2387 * linux-low.c (add_lwp): Switch ordering.
2389 2018-11-29 Tom Tromey <tom@tromey.com>
2391 * win32-low.c (win32_join): Take pid, not process.
2392 * target.h (struct target_ops) <join>: Change argument type.
2393 (join_inferior): Change argument name.
2394 * spu-low.c (spu_join): Take pid, not process.
2395 * server.c (handle_detach): Preserve pid before destroying
2397 * lynx-low.c (lynx_join): Take pid, not process.
2398 * linux-low.c (linux_join): Take pid, not process.
2400 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2402 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2403 (aarch64_cannot_fetch_register): Likewise.
2404 (struct linux_target_ops): Update references.
2406 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2408 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2410 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2412 * configure.srv (ipa_ppc_linux_regobj): Add
2413 powerpc-isa207-htm-vsx32l-ipa.o and
2414 powerpc-isa207-htm-vsx64l-ipa.o.
2415 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2416 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2417 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2418 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2419 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2420 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2421 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2422 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2423 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2424 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2425 (init_registers_powerpc_isa207_htm_vsx32l)
2426 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2427 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2428 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2429 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2430 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2431 (ppc_store_tm_ctarregset): New functions.
2432 (ppc_regsets): Add entries for HTM regsets.
2433 (ppc_arch_setup): Set htm in features struct when needed. Set
2434 sizes for the HTM regsets.
2435 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2436 (initialize_low_arch): Call
2437 init_registers_powerpc_isa207_htm_vsx32l and
2438 init_registers_powerpc_isa207_htm_vsx64l.
2439 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2440 PPC_TDESC_ISA207_HTM_VSX.
2441 (initialize_low_tracepoint): Call
2442 init_registers_powerpc_isa207_htm_vsx32l and
2443 init_registers_powerpc_isa207_htm_vsx64l.
2445 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2447 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2448 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2449 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2450 (ppc_store_pmuregset): New functions.
2451 (ppc_regsets): Add entries for ebb and pmu regsets.
2452 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2453 pmu regsets are available. Set sizes for these regsets.
2455 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2457 * configure.srv (ipa_ppc_linux_regobj): Add
2458 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2459 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2460 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2461 rs6000/powerpc-isa207-vsx32l.xml, and
2462 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2463 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2464 <PPC_TDESC_ISA207_VSX>: New enum value.
2465 (init_registers_powerpc_isa207_vsx32l): Declare.
2466 (init_registers_powerpc_isa207_vsx64l): Declare.
2467 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2468 (ppc_store_tarregset): New function.
2469 (ppc_regsets): Add entry for the TAR regset.
2470 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2471 size for the TAR regsets.
2472 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2473 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2474 and init_registers_powerpc_isa207_vsx64l.
2475 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2476 (initialize_low_tracepoint): Call
2477 init_registers_powerpc_isa207_vsx32l and
2478 init_registers_powerpc_isa207_vsx64l.
2480 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2481 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2483 * configure.srv (ipa_ppc_linux_regobj): Add
2484 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2485 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2486 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2487 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2488 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2489 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2490 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2491 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2492 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2493 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2494 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2495 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2496 (ppc_hwcap): Add comment.
2497 (ppc_hwcap2): New global.
2498 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2499 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2500 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2501 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2502 when needed. Set sizes for the the DSCR and PPR regsets.
2503 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2504 (initialize_low_arch): Call
2505 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2506 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2507 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2508 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2509 (initialize_low_tracepoint): Call
2510 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2511 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2513 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2515 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2517 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2518 Simon Marchi <simark@simark.ca>
2520 * acinclude.m4: Include "../selftest.m4".
2521 * configure: Regenerate.
2522 * configure.ac: Use "GDB_AC_SELFTEST".
2523 * configure.srv: Use "$enable_unittests" instead of
2524 "$development" when checking whether unit tests have been
2526 * server.c (captured_main): Update message informing that
2527 selftests have been disabled.
2529 2018-10-04 Tom Tromey <tom@tromey.com>
2531 * configure: Rebuild.
2533 2018-10-04 Tom Tromey <tom@tromey.com>
2535 * server.c (handle_status): Rename inner "thread".
2536 (process_serial_event): Declare "res" in 'm' case.
2537 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2538 (iterate_over_lwps): Rename inner "thread".
2539 (linux_qxfer_libraries_svr4): Rename inner "len".
2540 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2542 2018-10-01 Gary Benson <gbenson@redhat.com>
2544 * gdb_proc_service.h: Moved common code to
2545 common/gdb_proc_service.h.
2547 2018-10-01 Gary Benson <gbenson@redhat.com>
2549 * gdb_proc_service.h: Synchronize comments and whitespace with
2550 GDB's version of this file.
2552 2018-09-25 Tom Tromey <tom@tromey.com>
2554 * configure: Rebuild.
2555 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2557 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2559 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2560 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2561 ($(IPA_LIB)): Sort IPA_OBJS.
2563 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2565 * Makefile.in: Remove references to $(ADD_DEPS).
2567 2018-09-16 Tom Tromey <tom@tromey.com>
2569 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2571 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2574 2018-09-05 Tom Tromey <tom@tromey.com>
2576 * configure: Rebuild.
2578 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2581 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2583 2018-08-27 Tom Tromey <tom@tromey.com>
2586 * configure: Rebuild.
2588 2018-08-27 Tom Tromey <tom@tromey.com>
2590 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2591 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2592 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2593 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2594 (s390x_emit_stack_adjust): Add casts to unsigned char.
2596 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2600 * server.h (struct client_state) <disable_randomization>:
2603 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2605 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2607 (mips_supply_ptrace_register): Likewise.
2609 2018-07-22 Tom Tromey <tom@tromey.com>
2611 * configure: Rebuild.
2613 2018-07-22 Tom Tromey <tom@tromey.com>
2615 * win32-low.c (win32_create_inferior): Remove unused variables.
2616 * gdbreplay.c (remote_open): Remove unused variable.
2617 * remote-utils.c (remote_prepare): Remove unused variable.
2618 * x86-tdesc.h (X86_TDESC_H): Define.
2619 (amd64_expedite_regs): Define conditionally.
2620 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2621 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2622 * remote-utils.c (readchar): Remove unused variable.
2624 2018-07-13 Pedro Alves <palves@redhat.com>
2626 * linux-low.c (linux_kill): Change parameter to process_info
2627 pointer instead of pid. Adjust.
2628 * lynx-low.c (lynx_kill): Likewise.
2629 * nto-low.c (nto_kill): Likewise.
2630 * spu-low.c (spu_kill): Likewise.
2631 * win32-low.c (win32_kill): Likewise.
2632 * server.c (handle_v_kill, kill_inferior_callback)
2633 (detach_or_kill_for_exit): Adjust.
2634 * target.c (kill_inferior): Change parameter to process_info
2635 pointer instead of pid. Adjust.
2636 * target.h (struct target_ops) <kill>: Change parameter to
2637 process_info pointer instead of pid. Adjust all implementations
2639 (kill_inferior): Likewise.
2641 2018-07-13 Pedro Alves <palves@redhat.com>
2643 * linux-low.c (linux_detach, linux_join): Change parameter to
2644 process_info pointer instead of pid. Adjust.
2645 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2646 * nto-low.c (nto_detach): Likewise.
2647 * spu-low.c (spu_detach, spu_join): Likewise.
2648 * win32-low.c (win32_detach, win32_join): Likewise.
2649 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2650 * target.h (struct target_ops) <detach, join>: Change parameter to
2651 process_info pointer instead of pid. Adjust all implementations
2653 (detach_inferior, join_inferior): Rename 'pid' parameter to
2656 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2657 Jan Kratochvil <jan.kratochvil@redhat.com>
2658 Paul Fertser <fercerpav@gmail.com>
2659 Tsutomu Seki <sekiriki@gmail.com>
2661 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2662 (OBS): Add 'common/netstuff.o'.
2663 (GDBREPLAY_OBS): Likewise.
2664 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2665 (remote_open): Implement support for IPv6
2667 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2669 (handle_accept_event): Accept connections from IPv6 sources.
2670 (remote_prepare): Handle IPv6-style hostnames; implement
2671 support for IPv6 connections.
2672 (remote_open): Implement support for printing connections from
2675 2018-07-11 Pedro Alves <palves@redhat.com>
2678 * mem-break.c (any_persistent_commands): Add process_info
2679 parameter and use it instead of relying on the current process.
2680 Change return type to bool.
2681 * mem-break.h (any_persistent_commands): Add process_info
2682 parameter and change return type to bool.
2683 * server.c (handle_detach): Remove require_running_or_return call.
2684 Look up the process_info for the process we're about to detach.
2685 If not found, return back error to GDB. Adjust
2686 any_persistent_commands call to pass down a process pointer.
2688 2018-07-11 Pedro Alves <palves@redhat.com>
2690 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2691 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2692 instead of collect_register_by_name.
2693 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2694 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2696 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2697 Pedro Alves <palves@redhat.com>
2699 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2701 2018-07-03 Tom Tromey <tom@tromey.com>
2703 * linux-low.c: Update.
2704 * lynx-low.c: Update.
2705 * mem-break.c: Update.
2706 * nto-low.c: Update.
2707 * remote-utils.c: Update.
2709 * spu-low.c: Update.
2711 * win32-low.c: Update.
2713 2018-07-03 Tom Tromey <tom@tromey.com>
2717 2018-07-03 Tom Tromey <tom@tromey.com>
2719 * linux-low.c: Update.
2721 2018-07-03 Tom Tromey <tom@tromey.com>
2725 2018-07-03 Tom Tromey <tom@tromey.com>
2727 * linux-low.c: Update.
2728 * linux-mips-low.c: Update.
2729 * lynx-low.c: Update.
2730 * nto-low.c: Update.
2731 * remote-utils.c: Update.
2733 * spu-low.c: Update.
2735 * thread-db.c: Update.
2737 2018-07-03 Tom Tromey <tom@tromey.com>
2739 * linux-low.c: Update.
2740 * linux-mips-low.c: Update.
2741 * lynx-low.c: Update.
2742 * mem-break.c: Update.
2743 * nto-low.c: Update.
2744 * remote-utils.c: Update.
2746 * spu-low.c: Update.
2748 * tracepoint.c: Update.
2750 2018-07-03 Tom Tromey <tom@tromey.com>
2752 * linux-low.c: Update.
2753 * linux-ppc-low.c: Update.
2754 * linux-x86-low.c: Update.
2755 * proc-service.c: Update.
2757 * spu-low.c: Update.
2758 * thread-db.c: Update.
2759 * win32-low.c: Update.
2761 2018-07-03 Tom Tromey <tom@tromey.com>
2763 * linux-low.c: Update.
2764 * lynx-low.c: Update.
2765 * nto-low.c: Update.
2766 * remote-utils.c: Update.
2767 * spu-low.c: Update.
2768 * thread-db.c: Update.
2769 * win32-low.c: Update.
2771 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2773 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2774 parameter in call to 'amd64_create_target_description'.
2776 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2778 * x86-tdesc.h: Remove executable permission flag.
2780 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2782 * configure.ac: Remove AC_PREREQ, add missing quoting.
2783 * configure: Re-generate.
2784 * config.in: Re-generate.
2785 * aclocal.m4: Re-generate.
2787 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2789 * tracepoint.h (current_traceframe): Remove declaration.
2791 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2793 * linux-aarch64-low.c (is_sve_tdesc): New function.
2794 (aarch64_sve_regs_copy_to_regcache): Likewise.
2795 (aarch64_sve_regs_copy_from_regcache): Likewise.
2796 (aarch64_regs_info): Add SVE checks.
2797 (initialize_low_arch): Initialize SVE.
2799 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2801 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2803 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2805 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2806 (initialize_low_tracepoint): Likewise
2807 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2808 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2810 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2812 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2814 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2816 * server.h (PBUFSIZ): Increase size
2818 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2820 * regcache.c (regcache::raw_compare): New function.
2821 * regcache.h (regcache::raw_compare): New declaration.
2823 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2825 * regcache.c (new_register_cache): Use new.
2826 (free_register_cache): Use delete.
2827 (register_data): Use const.
2828 (supply_register): Move body inside regcache.
2829 (regcache::raw_supply): New override function.
2830 (collect_register): Move body inside regcache.
2831 (regcache::raw_collect): New override function.
2832 (regcache::get_register_status): New override function.
2833 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2835 2018-06-09 Tom Tromey <tom@tromey.com>
2837 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2839 (event_queue): Use std::queue.
2840 (gdb_event_xfree): Remove.
2841 (initialize_event_loop, process_event, wait_for_event): Update.
2843 2018-06-08 Stan Cox <scox@redhat.com>
2845 * win32-low.c (win32_create_inferior): last_ptid and last_status
2846 moved to client_state.
2848 2018-06-08 Pedro Alves <palves@redhat.com>
2850 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2851 common/common-exceptions.o, common/common-utils.o,
2852 common/errors.o, common/print-utils.o and utils.o.
2853 * gdbreplay.c: Include "common-defs.h" instead of the two
2854 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2855 string.h or alloca.h.
2856 (perror_with_name): Delete.
2857 (remote_open): Use xstrdup instead of strdup.
2858 (main): Rename to ...
2859 (captured_main): ... this.
2862 2018-06-08 Tom Tromey <tom@tromey.com>
2864 * linux-low.c (linux_low_read_btrace): Update.
2866 2018-06-04 Stan Cox <scox@redhat.com>
2868 * server.h (struct client_state): New.
2869 * server.c (cont_thread, general_thread, multi_process)
2870 (report_fork_events, report_vfork_events, report_exec_events)
2871 (report_thread_events, swbreak_feature, hwbreak_feature)
2872 (vCont_supported, disable_randomization, pass_signals)
2873 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2874 Moved to client_state.
2875 * remote-utils.c (remote_debug, noack_mode)
2876 (transport_is_reliable): Moved to client_state.
2877 * tracepoint.c (current_traceframe): Moved to client_state.
2880 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2881 linux-low.c, remote-utils.h, target.c: Use client_state.
2883 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2885 * configure.srv: Add new c/h file.
2887 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2889 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2892 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2894 * gdb.arch/mips-fpregset-core.exp: New test.
2895 * gdb.arch/mips-fpregset-core.c: New test source.
2897 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2900 * hostio.c (require_int): Do not report overflow for integers
2901 between 0xfffffff and 0x7fffffff.
2903 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2905 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2906 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2907 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2909 (the_low_target): Wire them.
2911 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2913 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2914 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2915 mode. Call collect_register_by_name with vscr using
2916 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2917 (ppc_store_vrregset): Add and set vscr_offset variable as in
2918 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2921 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2923 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2924 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2925 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2927 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2929 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2930 (ppc_store_vsxregset): Likewise.
2931 (ppc_fill_vrregset): Likewise.
2932 (ppc_store_vrregset): Likewise.
2933 (ppc_fill_evrregset): Likewise.
2934 (ppc_store_evrregset): Likewise.
2935 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2936 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2939 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2941 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2942 wordsize of the inferior. Call ppc_linux_target_wordsize.
2944 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2946 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2947 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2948 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2949 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2950 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2951 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2952 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2953 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2954 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2955 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2956 (tdesc_powerpc_e500l): Remove.
2957 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2958 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2959 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2960 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2962 (ppc_arch_setup): Remove target description matching code. Fill a
2963 ppc_linux_features struct and call ppc_linux_match_description
2966 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2968 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2969 width of the requested register exceeds the width of the
2971 (mips_cannot_store_register): Likewise.
2973 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2975 * linux-mips-low.c (mips_fetch_register): New function. Update
2977 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2978 (the_low_target): Wire `mips_fetch_register'.
2980 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2982 * lynx-i386-low.c (LYNXOS_178): New macro.
2983 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2984 the layout on LynxOS-178.
2985 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2986 handle floating point registers that are not supported by
2989 2018-05-10 Tom Tromey <tom@tromey.com>
2991 * configure: Rebuild.
2993 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2996 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2997 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2998 Use it to set the expedite_regs field in the given tdesc.
2999 * x86-tdesc.h: New file.
3000 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3001 Adjust following the addition of the new expedite_regs parameter
3002 to init_target_desc.
3003 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3004 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3005 (i386_linux_read_description, amd64_linux_read_description):
3006 Adjust following the addition of the new expedite_regs parameter
3007 to init_target_desc.
3008 * lynx-i386-low.c: #include "x86-tdesc.h".
3009 (lynx_i386_arch_setup): Adjust following the addition of the new
3010 expedite_regs parameter to init_target_desc.
3011 * nto-x86-low.c: #include "x86-tdesc.h".
3012 (nto_x86_arch_setup): Adjust following the addition of the new
3013 expedite_regs parameter to init_target_desc.
3014 * win32-i386-low.c: #include "x86-tdesc.h".
3015 (i386_arch_setup): Adjust following the addition of the new
3016 expedite_regs parameter to init_target_desc.
3018 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3021 * win32-low.c (win32_create_inferior): Add call to my_wait
3022 setting last_status global.
3024 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3027 * win32-low.c (create_process): Only call gdb_tilde_expand if
3028 inferior_cwd is not NULL.
3030 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3032 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3033 registers to the cache if their values have changed.
3034 (i387_xsave_to_cache): Provide default values for x87 control
3035 registers when these features are available, but disabled.
3036 * regcache.c (supply_register_by_name_zeroed): New function.
3037 * regcache.h (supply_register_by_name_zeroed): Declare new
3040 2018-05-07 Tom Tromey <tom@tromey.com>
3042 * configure: Rebuild.
3044 2018-05-04 Tom Tromey <tom@tromey.com>
3046 * configure: Rebuild.
3048 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3049 Pedro Alves <palves@redhat.com>
3051 * linux-aarch64-low.c (aarch64_stopped_data_address):
3054 2018-04-27 Tom Tromey <tom@tromey.com>
3056 * configure: Rebuild.
3058 2018-04-23 Tom Tromey <tom@tromey.com>
3060 * configure: Rebuild.
3062 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3064 * Makefile.in (depcomp): Add "..".
3065 (all_deps_files): New and use it.
3067 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3069 * configure.srv (aarch64*-*-linux*): Don't include xml.
3070 (i[34567]86-*-cygwin*): Likewise.
3071 (i[34567]86-*-linux*): Likewise.
3072 (i[34567]86-*-lynxos*): Likewise.
3073 (i[34567]86-*-mingw32ce*): Likewise.
3074 (i[34567]86-*-mingw*): Likewise.
3075 (i[34567]86-*-nto*): Likewise.
3076 (tic6x-*-uclinux): Likewise.
3077 (x86_64-*-linux*): Likewise.
3078 (x86_64-*-mingw*): Likewise.
3079 (x86_64-*-cygwin*): Likewise.
3081 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3083 * tdesc.c: Remove xml parameter.
3085 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3087 * server.c (get_features_xml): Remove cast.
3088 * tdesc.c (void target_desc::accept): Fill in function.
3089 (tdesc_get_features_xml): Remove old xml creation.
3090 (print_xml_feature::visit_pre): Add xml vistor.
3091 * tdesc.h (struct target_desc): Make xmltarget mutable.
3092 (tdesc_get_features_xml): Remove declaration.
3094 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3096 * tdesc.c (tdesc_architecture_name): Add new function.
3097 (tdesc_osabi_name): Likewise.
3098 (tdesc_get_features_xml): Use new functions.
3100 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3102 * tdesc.c (tdesc_create_flags): Remove.
3103 (tdesc_add_flag): Likewise.
3104 (tdesc_named_type): Likewise.
3105 (tdesc_create_union): Likewise.
3106 (tdesc_create_struct): Likewise.
3107 (tdesc_create_vector): Likewise.
3108 (tdesc_add_bitfield): Likewise.
3109 (tdesc_add_field): Likewise.
3110 (tdesc_set_struct_size): Likewise.
3112 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3114 * tdesc.c (~target_desc): Remove implictly deleted items.
3115 (init_target_desc): Iterate all features.
3116 (tdesc_get_features_xml): Use vector.
3117 (tdesc_create_feature): Create feature.
3118 * tdesc.h (tdesc_feature) Remove
3119 (target_desc): Add features.
3121 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3123 * Makefile.in: Add common/tdesc.c
3124 * tdesc.c (init_target_desc): init all reg_defs from register
3126 (tdesc_create_reg): Create tdesc_reg.
3127 * tdesc.h (tdesc_feature): Add register vector.
3129 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3131 * tdesc.h (struct target_desc) <features>: Change type to
3132 std::vector<std::string>.
3133 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3135 (tdesc_get_features_xml): Likewise.
3136 (tdesc_create_feature): Likewise.
3138 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3140 * regcache.c (find_register_by_number): Return a ref.
3141 (find_regno): Use references.
3142 (register_size): Likewise.
3143 (register_data): Likewise.
3144 * tdesc.c (target_desc::~target_desc): Remove free calls.
3145 (target_desc::operator==): Use std::vector compare.
3146 (init_target_desc): Use reference.
3147 (tdesc_create_reg): Use reg constructors.
3148 * tdesc.h (struct target_desc): Replace pointer with object.
3150 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3152 * regcache.c (find_register_by_number): Make static.
3153 (find_regno): Use find_register_by_number
3154 * regcache.h (struct reg): Remove declaration.
3156 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3158 * tdesc.c (target_desc::~target_desc): Move to here.
3159 (target_desc::operator==): Likewise.
3160 * tdesc.h (target_desc::~target_desc): Move from here.
3161 (target_desc::operator==): Likewise.
3163 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3165 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3167 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3169 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3171 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3172 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3173 and init_registers_s390_gs_linux64.
3175 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3177 * linux-s390-low.c (s390_fill_gs): Remove function.
3178 (s390_fill_gsbc): Remove function.
3179 (s390_regsets): Set fill functions for the guarded storage regsets
3182 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3184 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3185 the word size. Add comment.
3186 (s390_get_wordsize): New function.
3187 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3188 pswm with it. Instead, use s390_get_wordsize to determine the
3189 word size first and derive the correct tdesc from that directly.
3191 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3193 * Makefile.in: Include silent-rules.mk.
3194 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3195 (COMPILE): Add ECHO_CXX.
3196 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3197 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3198 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3199 (version-generated.c): Add ECHO_GEN.
3200 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3201 (IPAGENT_COMPILE): Add ECHO_CXX.
3202 (%-generated.c): Add ECHO_REGDAT.
3204 2018-03-14 Tom Tromey <tom@tromey.com>
3207 * ax.c (ax_printf): Special case for NULL.
3209 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3211 * linux-low.c (linux_qxfer_libraries_svr4): Use
3212 xml_escape_text_append.
3214 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3216 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3218 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3220 * server.c (handle_general_set): Remove unnecessary xstrdup.
3222 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3224 * server.c (parse_debug_format_options): Adjust to
3225 delim_string_to_char_ptr_vec changes.
3226 * thread-db.c (thread_db_load_search): Adjust to
3227 dirnames_to_char_ptr_vec changes.
3229 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3231 * target.h (target_enable_btrace, target_disable_btrace)
3232 (target_read_btrace, target_read_btrace_conf): Turn macro into
3233 inline function. Throw error if target method is not defined.
3234 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3235 check for btrace target method. Be prepared to handle exceptions
3236 from btrace target methods.
3238 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3240 * server.c (captured_main): Change order of error message printed
3241 when the current working directory cannot be found.
3243 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3245 * server.c: Include "filenames.h" and "pathstuff.h".
3246 (program_name): Delete variable.
3247 (program_path): New anonymous class.
3248 (get_exec_wrapper): Use "program_path" instead of
3250 (handle_v_run): Likewise.
3251 (captured_main): Likewise.
3252 (process_serial_event): Likewise.
3254 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3256 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3257 (OBJS): Add "pathstuff.o".
3258 * server.c (current_directory): New global variable.
3259 (captured_main): Initialize "current_directory".
3261 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3263 * tdesc.c: Use common/tdesc.h.
3264 * tdesc.h: Likewise.
3266 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3267 Simon Marchi <simon.marchi@ericsson.com>
3269 * Makefile.in: Switch order of make rules.
3271 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3273 * Makefile.in: Add common directory in build.
3274 * configure.ac: Add common reference.
3275 * configure: Regenerate.
3277 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3279 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3280 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3281 * spu-low.c (spu_target_ops): Likewise.
3282 * win32-low.c (win32_target_ops): Likewise.
3283 * server.c (supported_btrace_packets): Report packets unconditionally.
3284 * target.h (target_ops) <supports_btrace>: Remove.
3285 (target_supports_btrace): Remove.
3287 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3289 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3290 (handle_btrace_disable): Change return type to void. Use exceptions
3292 (handle_btrace_general_set): Catch exception and copy message to
3295 2018-02-08 Tom Tromey <tom@tromey.com>
3297 * linux-low.c (install_software_single_step_breakpoints): Use
3298 make_scoped_restore.
3299 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3300 (do_restore_current_thread_cleanup): Remove.
3301 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3304 2018-02-08 Tom Tromey <tom@tromey.com>
3306 * mem-break.c (set_raw_breakpoint_at): Use
3307 gdb::unique_xmalloc_ptr.
3309 2018-01-30 Pedro Alves <palves@redhat.com>
3312 * target.c (target_terminal::terminal_state): Rename to ...
3313 (target_terminal::m_terminal_state): ... this.
3315 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3317 * linux-low.c (handle_extended_wait): Surround call to
3318 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3320 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3322 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3323 linux_ptrace_attach_fail_reason_string now returning an
3325 (linux_attach): Likewise.
3326 * thread-db.c (attach_thread): Likewise.
3328 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3331 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3332 checking for fs_base/gs_base fields in struct user_regs_struct.
3333 * configure: Regenerate.
3335 2018-01-16 Yao Qi <yao.qi@linaro.org>
3338 * linux-low.c (fetch_register): Call supply_register instead of
3341 2018-01-08 Yao Qi <yao.qi@linaro.org>
3342 Simon Marchi <simon.marchi@ericsson.com>
3344 * Makefile.in (OBS): Remove selftest.o.
3345 * configure.ac: Set srv_selftest_objs if $development is true.
3346 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3347 * configure: Re-generated.
3348 * server.c (captured_main): Wrap variable selftest_filter with
3351 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3353 * server.c (parse_debug_format_options): Return std::string.
3354 (handle_monitor_command, captured_main): Adjust.
3356 2018-01-05 Pedro Alves <palves@redhat.com>
3359 * server.c (captured_main): Pass quiet=false to
3360 save_original_signals_state.
3362 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3364 * gdbreplay.c (gdbreplay_version): Update copyright year in
3366 * server.c (gdbserver_version): Likewise.
3368 2017-12-08 Tom Tromey <tom@tromey.com>
3370 * ax.c (ax_printf): Update.
3372 2017-12-07 Yao Qi <yao.qi@linaro.org>
3374 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3375 aarch64_linux_read_description.
3376 * linux-amd64-ipa.c (idx2mask): New array.
3377 (get_ipa_tdesc): Move idx2mask out.
3378 (initialize_low_tracepoint): Initialize target descriptions.
3379 * linux-i386-ipa.c (idx2mask): New array.
3380 (get_ipa_tdesc): Move idx2mask out.
3381 (initialize_low_tracepoint): Initialize target descriptions.
3383 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3385 * tdesc.c (struct tdesc_type): Change return type.
3386 (tdesc_add_flag): Change parameter type.
3387 (tdesc_add_bitfield): Likewise.
3388 (tdesc_add_field): Likewise.
3389 (tdesc_set_struct_size): Likewise.
3391 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3393 * regcache.c (registers_to_string): Remove unused variable.
3395 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3397 * inferiors.c (for_each_inferior_with_data): Remove.
3398 * inferiors.h (for_each_inferior_with_data): Remove.
3399 * server.c (handle_qxfer_threads_worker): Change parameter type.
3400 (handle_qxfer_threads_proper): Use for_each_thread.
3402 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3404 * inferiors.c (for_each_inferior): Remove.
3405 (clear_inferiors): Use for_each_thread.
3406 * inferiors.h (for_each_inferior): Remove.
3407 * linux-low.c (linux_wait_for_event_filtered): Use
3409 (linux_stabilize_threads): Likewise.
3410 * regcache.c (regcache_release): Likewise.
3411 * server.c (gdb_wants_all_threads_stopped): Likewise.
3412 (clear_pending_status_callback): Remove.
3413 (handle_status): Use for_each_thread.
3414 (captured_main): Likewise.
3415 * win32-low.c (child_init_thread_list): Likewise.
3416 (win32_clear_inferiors): Likewise.
3417 (fake_breakpoint_event): Likewise.
3419 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3421 * inferiors.h (find_inferior): Remove.
3422 * inferiors.c (find_inferior): Remove.
3424 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3426 * linux-low.c (resume_status_pending_p): Update comment.
3427 (need_step_over_p): Update comment.
3429 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3431 * linux-low.c (proceed_one_lwp): Return void, change parameter
3433 (unsuspend_and_proceed_one_lwp): Likewise.
3434 (proceed_all_lwps): Use for_each_thread.
3435 (unstop_all_lwps): Likewise.
3437 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3439 * linux-low.c (linux_resume_one_thread): Return void, take
3441 (linux_resume): Use for_each_thread.
3443 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3445 * linux-low.c (send_sigstop_callback): Return void, change
3446 parameter type. Rename to...
3447 (send_sigstop): ... this.
3448 (suspend_and_send_sigstop_callback): Return void, change parameter
3450 (suspend_and_send_sigstop): ... this.
3451 (stop_all_lwps): Use for_each_thread.
3453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3455 * linux-low.c (lwp_running): Return bool, remove unused
3457 (linux_stabilize_threads): Use find_thread.
3459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3461 * linux-low.c (select_singlestep_lwp_callback): Remove.
3462 (count_events_callback): Remove.
3463 (select_event_lwp_callback): Remove.
3464 (select_event_lwp): Use find_thread/for_each_thread.
3466 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3468 * linux-low.c (not_stopped_callback): Return bool, take filter
3470 (linux_wait_for_event_filtered): Use find_thread.
3471 (linux_wait_1): Likewise.
3473 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3475 * linux-low.c (same_lwp): Remove.
3476 (find_lwp_pid): Use find_thread.
3478 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3480 * linux-low.c (delete_lwp_callback): Remove.
3481 (linux_mourn): Use for_each_thread.
3483 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3485 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3486 args parameter, don't check for pid.
3487 (linux_detach): Use for_each_thread.
3489 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3491 * linux-low.c (struct counter): Remove.
3492 (second_thread_of_pid_p): Remove.
3493 (last_thread_of_process_p): Use find_thread.
3495 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3497 * inferiors.c (find_inferior_in_random): Remove.
3498 * inferiors.h (find_inferior_in_random): Remove.
3499 * linux-low.c (status_pending_p_callback): Return bool, accept
3500 parameter ptid directly.
3501 (linux_wait_for_event_filtered): Use find_thread_in_random.
3502 (linux_wait_1): Likewise.
3504 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3506 * inferiors.c (find_inferior_id): Remove.
3507 (find_thread_ptid): Move implemention from find_inferior_id to
3509 * inferiors.h (find_inferior_id): Remove.
3510 * server.c (handle_status): Use find_thread_ptid.
3511 (process_serial_event): Likewise.
3512 * thread-db.c (find_one_thread): Likewise.
3513 (thread_db_thread_handle): Likewise.
3514 * win32-low.c (thread_rec): Likewise.
3515 (child_delete_thread): Likewise.
3516 (win32_thread_alive): Likewise.
3517 (get_child_debug_event): Likewise.
3519 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3521 * linux-mips-low.c (update_watch_registers_callback): Return
3522 void, remove pid_p parameter, don't check for pid.
3523 (mips_insert_point, mips_remove_point): Use for_each_thread.
3525 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3527 * lynx.low (lynx_delete_thread_callback): Remove.
3528 (lynx_mourn): Use for_each_thread.
3530 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3532 * regcache.c (regcache_invalidate_one): Remove.
3533 (regcache_invalidate_pid): use for_each_thread.
3535 2017-11-26 Tom Tromey <tom@tromey.com>
3537 * linux-low.c (linux_create_inferior): Update.
3539 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3541 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3543 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3545 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3546 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3547 * linux-aarch64-tdesc-selftest.c: New file.
3548 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3550 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3552 * configure.srv: Add new file.
3553 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3554 * linux-aarch64-tdesc-selftest.c: New file.
3555 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3557 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3559 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3560 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3561 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3563 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3565 * configure.srv: Add new files.
3566 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3567 aarch64_linux_read_description.
3568 * linux-aarch64-low.c (aarch64_linux_read_description):
3569 Merge with aarch64_arch_setup.
3570 (aarch64_arch_setup): Call aarch64_linux_read_description.
3571 * linux-aarch64-tdesc.c: New file.
3572 * linux-aarch64-tdesc.h: New file.
3574 2017-11-24 Yao Qi <yao.qi@linaro.org>
3576 * configure.srv: Set $srv_regobj for tic6x-linux.
3577 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3578 (tic6x_read_description): Move some code to tic6x_arch_setup.
3579 (tic6x_tdesc_test): New function.
3580 (initialize_low_arch): Call selftests::register_test.
3582 2017-11-22 Yao Qi <yao.qi@linaro.org>
3584 * remote-utils.c (prepare_resume_reply): Use memcpy.
3586 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3588 * linux-low.c (kill_one_lwp_callback): Return void, take
3589 argument directly, don't filter on pid.
3590 (linux_kill): Use for_each_thread.
3592 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3594 * linux-low.c (need_step_over_p): Return bool, remove dummy
3596 (linux_resume, proceed_all_lwps): Use find_thread.
3598 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3600 * linux-low.c (resume_status_pending_p): Return bool, remove
3602 (linux_resume): Use find_thread.
3604 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3606 * linux-low.c (struct thread_resume_array): Remove.
3607 (linux_set_resume_request): Return void, take arguments
3609 (linux_resume): Use for_each_thread.
3611 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3613 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3614 return bool, remove data argument.
3615 (linux_stabilize_threads): Use find_thread.
3617 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3619 * linux-low.c (unsuspend_one_lwp): Remove.
3620 (unsuspend_all_lwps): Use for_each_thread, inline code from
3623 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3625 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3626 * linux-low.c (struct iterate_over_lwps_args): Remove.
3627 (iterate_over_lwps_filter): Remove.
3628 (iterate_over_lwps): Use find_thread.
3630 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3632 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3633 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3634 code from reset_lwp_ptrace_options_callback.
3636 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3638 * linux-arm-low.c (struct update_registers_data): Remove.
3639 (update_registers_callback): Return void, take arguments
3640 directly, don't check thread's pid.
3641 (arm_insert_point, arm_remove_point): Use for_each_thread.
3643 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3645 * win32-low.c (continue_one_thread): Return void, take argument
3647 (child_continue): Use for_each_thread.
3649 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3651 * win32-i386-low.c (update_debug_registers_callback): Rename
3653 (update_debug_registers): ... this, return void, remove pid_p arg.
3654 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3656 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3658 * inferiors.h (struct process_info): Add constructor, initialize
3660 <syscalls_to_catch>: Change type to std::vector<int>.
3661 * inferiors.c (add_process): Allocate process_info with new.
3662 (remove_process): Free process_info with delete.
3663 * linux-low.c (handle_extended_wait): Adjust.
3664 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3665 * server.c (handle_general_set): Adjust.
3667 2017-11-16 Pedro Alves <palves@redhat.com>
3669 * remote-utils.c (remote_close): Block SIGIO signals instead of
3670 uninstalling the SIGIO handler.
3672 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3674 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3676 2017-11-16 Yao Qi <yao.qi@linaro.org>
3678 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3679 (tic6x_store_gregset): Likewise.
3680 (tic6x_usrregs_info): Move it up.
3682 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3684 * Makefile.in: Update arch rules.
3685 * configure.srv: Explicitly mark arch/ files.
3687 2017-11-13 Andreas Schwab <schwab@suse.de>
3689 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3691 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3693 2017-11-06 Pedro Alves <palves@redhat.com>
3695 * config.in, configure: Regenerate.
3697 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3699 * target.c (struct thread_search): Remove.
3700 (thread_search_callback): Remove.
3701 (prepare_to_access_memory): Use for_each_thread instead of
3702 find_inferior. Inline code from thread_search_callback.
3704 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3706 * server.c (struct visit_actioned_threads_data): Remove.
3707 (visit_actioned_threads): Change prototype to take arguments
3709 (resume): Use find_thread instead of find_inferior.
3711 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3713 * server.c (queue_stop_reply_callback): Change prototype, return
3715 (find_status_pending_thread_callback): Remove.
3716 (handle_status): Replace find_inferior with find_thread and
3719 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3721 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3723 (aarch64_store_gregset): Likewise.
3724 (aarch64_fill_fpregset): Likewise.
3725 (aarch64_store_fpregset): Likewise.
3727 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3729 * gdbthread.h (find_thread, for_each_thread): New functions.
3730 * inferiors.c (thread_of_pid): Remove.
3731 (find_any_thread_of_pid): Use find_thread.
3732 * linux-low.c (num_lwps): Use for_each_thread.
3734 2017-10-17 Yao Qi <yao.qi@linaro.org>
3736 * Makefile.in: Remove one rule.
3737 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3739 2017-10-17 Yao Qi <yao.qi@linaro.org>
3741 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3742 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3744 2017-10-17 Yao Qi <yao.qi@linaro.org>
3746 * configure.srv: Rename arm.o with arch/arm.o.
3748 2017-10-17 Yao Qi <yao.qi@linaro.org>
3750 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3751 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3752 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3753 (arch-i386.o, arch-amd64.o): Remove rules.
3754 (arch/%.o): New rule.
3755 Update POSTCOMPILE and COMPILE.pre.
3756 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3757 * configure: Re-generated.
3758 * configure.srv: Replace arch-i386.o with arch/i386.o.
3759 Replace arch-amd64.o with arch/amd64.o.
3761 2017-10-16 Yao Qi <yao.qi@linaro.org>
3763 * configure: Regenerated.
3765 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3767 * inferiors.h: (struct inferior_list): Remove.
3768 (struct inferior_list_entry); Remove.
3769 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3770 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3771 get_first_inferior): Remove.
3772 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3773 find_inferior_id, find_inferior_in_random): Change signature.
3774 * inferiors.c (all_threads): Change type to
3775 std::list<thread_info *>.
3776 (get_thread): Remove macro.
3777 (find_inferior, find_inferior_id): Change signature, implement
3779 (find_inferior_in_random): Change signature, implement using
3780 find_thread_in_random.
3781 (for_each_inferior, for_each_inferior_with_data): Change
3782 signature, implement using for_each_thread.
3783 (add_inferior_to_list, remove_inferior): Remove.
3784 (add_thread, get_first_thread, thread_of_pid,
3785 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3786 (get_first_inferior, one_inferior_p, clear_inferior_list):
3788 (clear_inferiors, get_thread_process): Update.
3789 * gdbthread.h: Include <list>.
3790 (struct thread_info) <entry>: Remove field.
3792 (all_threads): Change type to std::list<thread_info *>.
3793 (get_first_inferior): Add doc.
3794 (find_thread, for_each_thread, find_thread_in_random): New
3796 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3797 * linux-arm-low.c (update_registers_callback): Update.
3798 * linux-low.c (second_thread_of_pid_p): Update.
3799 (kill_one_lwp_callback, linux_detach_lwp_callback,
3800 delete_lwp_callback, status_pending_p_callback, same_lwp,
3801 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3802 iterate_over_lwps, not_stopped_callback,
3803 resume_stopped_resumed_lwps, count_events_callback,
3804 select_singlestep_lwp_callback, select_event_lwp_callback,
3805 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3806 suspend_and_send_sigstop_callback, wait_for_sigstop,
3807 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3808 lwp_running, linux_set_resume_request, resume_status_pending_p,
3809 need_step_over_p, start_step_over, linux_resume_one_thread,
3810 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3811 reset_lwp_ptrace_options_callback): Update.
3812 * linux-mips-low.c (update_watch_registers_callback): Update.
3813 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3815 (free_register_cache_thread_one): Remove.
3816 (regcache_release): Update.
3817 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3818 handle_qxfer_threads_worker): Update.
3819 (handle_query): Update, use list iterator.
3820 (visit_actioned_threads, handle_pending_status,
3821 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3822 clear_pending_status_callback, set_pending_status_callback,
3823 find_status_pending_thread_callback, handle_status,
3824 process_serial_event): Update.
3825 * target.c (thread_search_callback): Update.
3826 * thread-db.c (thread_db_get_tls_address): Update.
3827 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3829 * win32-i386-low.c (update_debug_registers_callback): Update.
3830 * win32-low.c (delete_thread_info, child_delete_thread,
3831 continue_one_thread, suspend_one_thread,
3832 get_child_debug_event): Adjust.
3834 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3836 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3837 * inferiors.h: Include <list>.
3838 (struct process_info) <entry>: Remove field.
3840 (pid_of): Change macro to function.
3841 (ptid_of, lwpid_of): Remove macro.
3842 (all_processes): Change type to std::list<process_info *>.
3843 (ALL_PROCESSES): Remove macro.
3844 (for_each_process, find_process): New function.
3845 * inferiors.c (all_processes): Change type to
3846 std::list<process_info *>.
3847 (find_thread_process): Adjust.
3848 (add_process): Likewise.
3849 (remove_process): Likewise.
3850 (find_process_pid): Likewise.
3851 (get_first_process): Likewise.
3852 (started_inferior_callback): Remove.
3853 (have_started_inferiors_p): Adjust.
3854 (attached_inferior_callback): Remove.
3855 (have_attached_inferiors_p): Adjust.
3856 * linux-low.c (check_zombie_leaders): Likewise.
3857 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3858 (x86_linux_update_xmltarget): Adjust.
3859 * server.c (handle_query): Likewise.
3860 (gdb_reattached_process): Remove.
3861 (handle_status): Adjust.
3862 (kill_inferior_callback): Likewise.
3863 (detach_or_kill_inferior): Remove.
3864 (print_started_pid): Likewise.
3865 (print_attached_pid): Likewise.
3866 (detach_or_kill_for_exit): Update.
3867 (process_serial_event): Likewise.
3868 * linux-arm-low.c (arm_new_fork): Likewise.
3870 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3872 * dll.h: Include <list>.
3873 (struct dll_info): Add constructor.
3874 <entry>: Remove field.
3875 (all_dlls): Change type to std::list<dll_info>.
3876 * dll.c: Include <algorithm>.
3877 (get_dll): Remove macro.
3878 (all_dlls): Change type to std::list<dll_info *>.
3879 (free_one_dll): Remove.
3880 (match_dll): Likewise.
3881 (loaded_dll): Adjust.
3882 (unloaded_dll): Adjust to all_dlls type change, use
3883 std::find_if. Inline code from match_dll.
3884 (clear_dlls): Adjust to all_dlls type change.
3885 * server.c (emit_dll_description): Remove.
3886 (handle_qxfer_libraries): Adjust to all_dlls type change,
3887 integrate emit_dll_description's functionality.
3889 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3891 * linux-low.h (struct linux_target_ops) <delete_process>: New
3893 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3894 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3895 (struct linux_target_ops): Add delete_process callback.
3896 * linux-arm-low.c (arm_delete_process): New.
3897 (struct linux_target_ops): Add delete_process callback.
3898 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3899 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3900 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3901 * linux-mips-low.c (mips_linux_delete_process): New.
3902 (struct linux_target_ops): Add delete_process callback.
3903 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3904 * linux-s390-low.c (struct linux_target_ops): Likewise.
3905 * linux-sh-low.c (struct linux_target_ops): Likewise.
3906 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3907 * linux-tile-low.c (struct linux_target_ops): Likewise.
3908 * linux-x86-low.c (x86_linux_delete_process): New.
3909 (struct linux_target_ops): Add delete_process callback.
3910 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3912 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3914 * linux-aarch64-low.c (the_low_target): Add thread delete
3916 * linux-arm-low.c (arm_delete_thread): New function.
3917 (the_low_target): Add thread delete callback.
3918 * linux-bfin-low.c (the_low_target): Likewise.
3919 * linux-crisv32-low.c (the_low_target): Likewise.
3920 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3922 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3924 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3925 * linux-mips-low.c (mips_linux_delete_thread): New function.
3926 (the_low_target): Add thread delete callback.
3927 * linux-ppc-low.c (the_low_target): Likewise.
3928 * linux-s390-low.c (the_low_target): Likewise.
3929 * linux-sh-low.c (the_low_target): Likewise.
3930 * linux-tic6x-low.c (the_low_target): Likewise.
3931 * linux-tile-low.c (the_low_target): Likewise.
3932 * linux-x86-low.c (the_low_target): Likewise.
3933 * linux-xtensa-low.c (the_low_target): Likewise.
3935 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3937 * win32-low.c: Include "common-inferior.h".
3939 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3941 * inferiors.c (set_inferior_cwd): New function.
3942 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3943 (handle_query): Inform that QSetWorkingDir is supported.
3944 * win32-low.c (create_process): Pass the inferior's cwd to
3947 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3949 * inferiors.c (current_inferior_cwd): New global variable.
3950 (get_inferior_cwd): New function.
3951 * inferiors.h (struct process_info) <cwd>: New field.
3953 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3955 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3956 (OBS): Add gdb_tilde_expand.o.
3958 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3960 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3961 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3963 2017-09-29 Pedro Alves <palves@redhat.com>
3965 * ax.c (gdb_parse_agent_expr): Constify.
3966 * ax.h (gdb_parse_agent_expr): Constify.
3967 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3969 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3970 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3971 * remote-utils.h (read_ptid): Constify.
3972 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3973 (process_point_options, process_serial_event): Constify.
3974 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3975 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3976 (cmd_qtbuffer): Constify.
3978 2017-09-29 Pedro Alves <palves@redhat.com>
3980 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3983 2017-09-29 Pedro Alves <palves@redhat.com>
3985 * linux-low.c (handle_extended_wait): Pass parent thread instead
3986 of process to thread_db_notice_clone.
3987 * linux-low.h (thread_db_notice_clone): Replace parent process
3988 parameter with parent thread parameter.
3989 * thread-db.c (find_one_thread): Add comment.
3990 (thread_db_notice_clone): Replace parent process parameter with
3991 parent thread parameter. Temporarily switch to the parent thread.
3993 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3995 * gdbthread.h: Include "common-gdbthread.h".
3996 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3997 "if" when validating the ptid.
3998 * remote-utils.c: Include "gdbthread.h".
3999 (prepare_resume_reply): Use "switch_to_thread".
4000 * target.c (done_accessing_memory): Likewise.
4002 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4004 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4005 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4006 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4007 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4008 s390x-gs-linux64-ipa.o to ipa_obj.
4009 * linux-s390-low.c (HWCAP_S390_GS): New define.
4010 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4012 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4013 (s390_arch_setup): Check for guarded-storage support and choose
4015 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4016 init_registers_s390x_gs_linux64.
4017 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4019 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4020 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4022 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4024 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4026 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4028 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4029 (thread_db_thread_handle): Declare.
4030 * linux-low.c (linux_target_ops): Initialize thread_handle.
4031 * server.c (handle_qxfer_threads_worker): Add support for
4033 * target.h (struct target_ops): Add new function pointer,
4035 (target_thread_handle): Define.
4036 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4038 (thread_db_thread_handle): New function.
4040 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4042 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4043 * linux-low.h (thread_db_notice_clone): Declare.
4044 * thread-db.c (thread_db_notice_clone): New function.
4046 2017-09-21 Pedro Alves <palves@redhat.com>
4048 * server.c (gdb_read_memory, handle_status, process_serial_event)
4049 (handle_serial_event, handle_target_event): Adjust to
4050 set_desired_thread prototype change.
4051 * target.c (set_desired_thread): Remove 'use_general' parameter
4053 * target.h (set_desired_thread): Remove 'use_general' parameter.
4055 2017-09-20 Tom Tromey <tom@tromey.com>
4057 * target.c (target_terminal::terminal_state): Define.
4058 (target_terminal::init): Rename from target_terminal_init.
4059 (target_terminal::inferior): Rename from
4060 target_terminal_inferior.
4061 (target_terminal::ours): Rename from target_terminal_ours.
4062 (target_terminal::ours_for_output, target_terminal::info): New.
4064 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4066 * server.c (accumulate_file_name_length): Remove.
4067 (emit_dll_description): Adjust to std::string change.
4068 (handle_qxfer_libraries): Use std::string to hold document.
4070 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4072 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4073 return type of xml_escape_text.
4074 * server.c (emit_dll_description): Likewise.
4076 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4078 * server.c (captured_main): Accept argument for --selftest.
4079 Update run_tests call.
4080 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4081 when registering selftests.
4083 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4085 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4086 instead of "VEC" for "target_desc.reg_defs".
4087 (regcache_cpy): Likewise.
4088 (registers_to_string): Likewise.
4089 (registers_from_string): Likewise.
4090 (find_regno): Likewise.
4091 (supply_regblock): Likewise.
4092 (regcache_raw_read_unsigned): Likewise.
4093 * tdesc.c (init_target_desc): Likewise.
4094 (tdesc_create_reg): Likewise.
4095 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4096 (struct target_desc) <reg_defs>: Convert to "std::vector".
4097 (target_desc): Do not initialize "reg_defs".
4098 (~target_desc): Update code to use "std::vector" instead of "VEC"
4099 for "target_desc.reg_defs".
4100 (operator==): Likewise.
4102 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4104 * inferiors.h (thread_to_gdb_id): Remove.
4105 * inferiors.c (thread_to_gdb_id): Remove.
4106 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4107 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4108 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4110 * nto-low.c (nto_fetch_registers, nto_store_registers,
4111 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4113 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4115 * inferiors.h (gdb_id_to_thread_id): Remove.
4116 * inferiors.c (gdb_id_to_thread_id): Remove.
4117 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4118 removal. Move pid declaration closer to where it's used.
4120 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4122 * server.c (handle_detach): New function.
4123 (process_serial_event): Move code out, call handle_detach.
4125 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4127 * server.c (require_running): Rename to ...
4128 (require_running_or_return): ... this ...
4129 (require_running_or_break): ... and this.
4130 (handle_query, process_serial_event): Adjust.
4132 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4134 * linux-low.c (linux_set_resume_request): Remove unused
4137 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4139 * server.c (first_thread_of): Remove.
4140 (process_serial_event): Replace usage of first_thread_of with
4141 find_any_thread_of_pid.
4142 * tracepoint.c (same_process_p): Remove.
4143 (gdb_agent_about_to_close): Replace usage of same_process_p with
4144 find_any_thread_of_pid.
4145 * linux-x86-low.c (same_process_callback): Remove.
4146 (x86_arch_setup_process_callback): Replace usage of
4147 same_process_callback with find_any_thread_of_pid.
4148 * thread-db.c (any_thread_of): Remove.
4149 (switch_to_process): Replace usage of any_thread_of with
4150 find_any_thread_of_pid.
4151 * inferiors.c (thread_pid_matches_callback): Remove.
4152 (find_thread_process): Adjust to use find_any_thread_of_pid.
4154 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4156 * regcache.c (get_thread_regcache): Guard calls to "memset"
4159 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4161 * linux-low.c (handle_extended_wait): Use
4162 "allocate_target_description" instead of "XNEW".
4163 * linux-x86-low.c (initialize_low_arch): Likewise.
4165 2017-09-05 Yao Qi <yao.qi@linaro.org>
4167 * configure.srv (srv_i386_regobj): Remove.
4168 (srv_amd64_regobj): Remove.
4169 (srv_regobj): Set it to "" for x86 non-linux targets.
4170 * linux-x86-tdesc.c (i386_linux_read_description):
4171 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4172 (init_registers_i386): Remove the declaration.
4173 (tdesc_i386): Remove the declaration.
4174 (lynx_i386_arch_setup): Call i386_create_target_description.
4175 * nto-x86-low.c: Likewise.
4176 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4177 [!__x86_64__]: include arch/i386.h.
4178 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4180 2017-09-05 Yao Qi <yao.qi@linaro.org>
4182 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4183 i386/amd64-XXX-linux from it.
4185 2017-09-05 Yao Qi <yao.qi@linaro.org>
4187 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4189 (ipa_amd64_linux_regobj): Remove.
4190 (ipa_x32_linux_regobj): Remove.
4192 2017-09-05 Yao Qi <yao.qi@linaro.org>
4194 * Makefile.in (arch-amd64.o): New rule.
4195 * configure.srv: Append arch-amd64.o.
4196 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4197 (get_ipa_tdesc): Call amd64_linux_read_description.
4198 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4199 and init_registers_amd64_XXX.
4200 * linux-x86-low.c (x86_linux_read_description): Call
4201 amd64_linux_read_description.
4202 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4203 (initialize_low_arch): Don't call init_registers_x32_XXX and
4204 init_registers_amd64_XXX.
4205 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4206 and tdesc_amd64_XXX.
4207 [__x86_64__] (amd64_tdesc_test): New function.
4208 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4209 and init_registers_amd64_XXX.
4210 * linux-x86-tdesc.c: Include arch/amd64.h.
4211 (xcr0_to_tdesc_idx): New function.
4212 (i386_linux_read_description): New function.
4213 (amd64_get_ipa_tdesc_idx): New function.
4214 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4215 (amd64_get_ipa_tdesc): Declare.
4217 2017-09-05 Yao Qi <yao.qi@linaro.org>
4219 * configure.srv (srv_i386_linux_xmlfiles): Remove
4220 i386/i386-XXX-linux.xml from it.
4222 2017-09-05 Yao Qi <yao.qi@linaro.org>
4224 * configure.srv: Set srv_i386_linux_regobj empty if $development
4226 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4227 initialize_low_tdesc.
4228 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4229 with #if initialize_low_tdesc.
4230 * linux-x86-tdesc-selftest.c: New file.
4231 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4233 2017-09-05 Yao Qi <yao.qi@linaro.org>
4235 * Makefile.in (arch-i386.o): New rule.
4236 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4237 (x86_64-*-linux*): Likewise.
4238 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4239 include arch/i386.h.
4240 (i386_linux_read_description): Remove code and call
4241 i386_create_target_description.
4242 * tdesc.c (allocate_target_description): New function.
4243 * tdesc.h (set_tdesc_architecture): Remove declaration.
4244 (set_tdesc_osabi): Likewise.
4246 2017-09-05 Yao Qi <yao.qi@linaro.org>
4248 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4249 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4250 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4252 * server.c (get_features_xml): Call tdesc_get_features_xml.
4253 * tdesc.c (set_tdesc_architecture): New function.
4254 (set_tdesc_osabi): New function.
4255 (tdesc_get_features_xml): New function.
4256 (tdesc_create_feature): Add an argument.
4257 * tdesc.h (struct target_desc) <features>: New field.
4258 <arch, osabi>: New field.
4259 (~target_desc): xfree features, arch, and osabi.
4260 (target_desc::oerator==): Don't compare .xmltarget.
4261 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4262 (set_tdesc_osabi): Likewise.
4263 (tdesc_get_features_xml): Likewise.
4265 2017-09-05 Yao Qi <yao.qi@linaro.org>
4267 * linux-x86-tdesc.c: Include selftest.h.
4268 (i386_tdesc_test): New function.
4269 (initialize_low_tdesc): Call selftests::register_test.
4270 * tdesc.h: Include regdef.h.
4271 (target_desc): Override operator == and !=.
4273 2017-09-05 Yao Qi <yao.qi@linaro.org>
4275 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4276 (ipa_obj): Likewise.
4277 * linux-i386-ipa.c: Include common/x86-xstate.h
4278 (get_ipa_tdesc): Call i386_linux_read_description.
4279 (initialize_low_tracepoint): Don't call init_registers_XXX
4280 functions, call initialize_low_tdesc instead.
4281 * linux-x86-low.c (x86_linux_read_description): Call
4282 i386_linux_read_description.
4283 (initialize_low_arch): Don't call init_registers_i386_XXX
4284 functions, call initialize_low_tdesc.
4285 * linux-x86-tdesc.c: New file.
4286 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4287 (i386_get_ipa_tdesc_idx): Declare.
4288 (i386_get_ipa_tdesc): Declare.
4289 (initialize_low_tdesc): Declare.
4291 2017-09-05 Yao Qi <yao.qi@linaro.org>
4293 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4296 2017-09-05 Yao Qi <yao.qi@linaro.org>
4298 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4299 * regcache.c (get_thread_regcache): Use VEC_length.
4300 (init_register_cache): Likewise.
4301 (regcache_cpy): Likewise.
4302 (registers_to_string): Iterate reg_defs via VEC_iterate.
4303 (find_regno): Likewise.
4304 (find_register_by_number): Use VEC_index.
4305 (register_size): Call find_register_by_number.
4306 (register_data): Call find_register_by_number.
4307 (supply_regblock): Use VEC_length.
4308 (regcache_raw_read_unsigned): Likewise.
4309 * tdesc.c (init_target_desc): Iterate reg_defs via
4311 (default_description): Update initializer.
4312 (copy_target_description): Don't update field num_registers.
4313 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4314 <num_registers>: Remove.
4316 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4318 * Makefile.in (.SECONDARY): Define target.
4320 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4322 * linux-low.c (linux_wait_1): Adjust.
4323 * server.c (queue_stop_reply_callback): Adjust.
4325 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4327 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4328 QEnvironmentUnset and QEnvironmentReset packets.
4329 (handle_query): Inform remote that QEnvironmentHexEncoded,
4330 QEnvironmentUnset and QEnvironmentReset are supported.
4332 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4334 * inferiors.h (inferior_target_data): Rename to ...
4335 (thread_target_data): ... this.
4336 (inferior_regcache_data): Rename to ...
4337 (thread_regcache_data): ... this.
4338 (set_inferior_regcache_data): Rename to ...
4339 (set_thread_regcache_data): ... this.
4340 * inferiors.c (inferior_target_data): Rename to ...
4341 (thread_target_data): ... this.
4342 (inferior_regcache_data): Rename to ...
4343 (thread_regcache_data): ... this.
4344 (set_inferior_regcache_data): Rename to ...
4345 (set_thread_regcache_data): ... this.
4346 (free_one_thread): Update.
4347 * linux-low.h (get_thread_lwp): Update.
4348 * regcache.c (get_thread_regcache): Update.
4349 (regcache_invalidate_thread): Update.
4350 (free_register_cache_thread): Update.
4351 * win32-i386-low.c (update_debug_registers_callback): Update.
4352 (win32_get_current_dr): Update.
4353 * win32-low.c (thread_rec): Update.
4354 (delete_thread_info): Update.
4355 (continue_one_thread): Update.
4356 (suspend_one_thread): Update.
4358 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4360 * inferiors.c (set_inferior_target_data): Remove.
4361 * inferiors.h (set_inferior_target_data): Remove.
4363 2017-08-18 Yao Qi <yao.qi@linaro.org>
4365 * Makefile.in (OBS): Add selftest.o.
4366 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4367 * configure, config.in: Re-generated.
4368 * server.c: Include common/sefltest.h.
4369 (captured_main): Handle option --selftest.
4371 2017-08-09 Yao Qi <yao.qi@linaro.org>
4373 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4374 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4375 i386-avx-mpx.o and i386-mmx.o.
4376 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4377 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4378 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4379 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4380 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4381 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4382 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4383 i386/amd64-avx-mpx.xml.
4385 2017-08-09 Yao Qi <yao.qi@linaro.org>
4387 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4388 and x32-avx-avx512.o.
4389 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4390 i386/x32-avx-avx512.xml.
4392 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4394 * tracepoint.h (enum class fast_tpoint_collect_result): New
4396 (fast_tracepoint_collecting): Change return type to
4397 fast_tpoint_collect_result.
4398 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4399 * linux-low.h: Include tracepoint.h.
4400 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4401 fast_tpoint_collect_result.
4402 * linux-low.c (handle_tracepoints): Adjust.
4403 (linux_fast_tracepoint_collecting): Change return type to
4404 fast_tpoint_collect_result.
4405 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4406 linux_wait_1, stuck_in_jump_pad_callback,
4407 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4408 proceed_one_lwp): Adjust to type change.
4410 2017-07-10 Yao Qi <yao.qi@linaro.org>
4412 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4414 2017-06-29 Yao Qi <yao.qi@linaro.org>
4416 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4418 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4420 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4422 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4424 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4426 * linux-low.c (linux_create_inferior): Adjust code to access the
4427 environment information via 'gdb_environ' class.
4428 * lynx-low.c (lynx_create_inferior): Likewise.
4429 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4430 (get_environ): Return a pointer to 'our_environ'.
4431 (captured_main): Initialize 'our_environ'.
4432 * server.h (get_environ): Adjust prototype.
4433 * spu-low.c (spu_create_inferior): Adjust code to access the
4434 environment information via 'gdb_environ' class.
4436 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4438 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4439 usage of "register" keyword.
4441 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4443 * configure: Re-generate.
4445 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4447 * configure: Re-generate.
4449 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4451 * Makefile.in (COMPILE.pre): Add "-x c++".
4453 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4455 * fork-child.c: Conditionally include <signal.h>.
4457 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4459 * server.c (handle_general_set): Handle new packet
4460 "QStartupWithShell".
4461 (handle_query): Add "QStartupWithShell" to the list of supported
4463 (gdbserver_usage): Add help text explaining the
4464 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4466 (captured_main): Recognize and act upon the presence of the new
4469 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4470 Pedro Alves <palves@redhat.com>
4472 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4473 * configure: Regenerate.
4474 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4476 (i[34567]86-*-lynxos*): Likewise.
4477 (spu*-*-*): Likewise.
4478 * fork-child.c: New file.
4479 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4481 (linux_ptrace_fun): New function.
4482 (linux_create_inferior): Adjust function prototype to reflect
4483 change on "target.h". Adjust function code to use
4485 (linux_request_interrupt): Delete "signal_pid".
4486 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4487 (lynx_ptrace_fun): New function.
4488 (lynx_create_inferior): Adjust function prototype to reflect
4489 change on "target.h". Adjust function code to use
4491 * nto-low.c (nto_create_inferior): Adjust function prototype and
4492 code to reflect change on "target.h". Update comments.
4493 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4494 "common-terminal.h" and "environ.h".
4495 (terminal_fd): Moved to fork-child.c.
4496 (old_foreground_pgrp): Likewise.
4497 (restore_old_foreground_pgrp): Likewise.
4498 (last_status): Make it global.
4499 (last_ptid): Likewise.
4500 (our_environ): New variable.
4501 (startup_with_shell): Likewise.
4502 (program_name): Likewise.
4503 (program_argv): Rename to...
4504 (program_args): ...this.
4505 (wrapper_argv): New variable.
4506 (start_inferior): Delete function.
4507 (get_exec_wrapper): New function.
4508 (get_exec_file): Likewise.
4509 (get_environ): Likewise.
4510 (prefork_hook): Likewise.
4511 (post_fork_inferior): Likewise.
4512 (postfork_hook): Likewise.
4513 (postfork_child_hook): Likewise.
4514 (handle_v_run): Update code to deal with arguments coming from the
4515 remote host. Update calls from "start_inferior" to
4517 (captured_main): Likewise. Initialize environment variable. Call
4519 * server.h (post_fork_inferior): New prototype.
4520 (get_environ): Likewise.
4521 (last_status): Declare.
4522 (last_ptid): Likewise.
4523 (signal_pid): Likewise.
4524 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4525 (spu_ptrace_fun): New function.
4526 (spu_create_inferior): Adjust function prototype to reflect change
4527 on "target.h". Adjust function code to use "fork_inferior".
4528 * target.c (target_terminal_init): New function.
4529 (target_terminal_inferior): Likewise.
4530 (target_terminal_ours): Likewise.
4531 * target.h: Include <vector>.
4532 (struct target_ops) <create_inferior>: Update prototype.
4533 (create_inferior): Update macro.
4534 * utils.c (gdb_flush_out_err): New function.
4535 * win32-low.c (win32_create_inferior): Adjust function prototype
4536 and code to reflect change on "target.h".
4538 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4540 * inferiors.c (switch_to_thread): New function.
4542 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4544 * Makefile.in (SFILE): Add "common/job-control.c".
4545 (OBS): Add "job-control.o".
4547 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4549 * Makefile: Remove "@host_makefile_frag@".
4551 2017-05-05 Pedro Alves <palves@redhat.com>
4553 * configure: Regenerate.
4555 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4557 * configure: Regenerate.
4559 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4561 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4562 software_single_step change of return type to
4563 std::vector<CORE_ADDR>.
4564 * linux-low.c (install_software_single_step_breakpoints):
4566 * linux-low.h (install_software_single_step_breakpoints):
4569 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4571 * remote-utils.c: Include "gdb_termios.h" instead of
4573 * terminal.h: Delete file.
4575 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4577 * server.c: Include <vector>.
4578 <program_argv, wrapper_argv>: Convert to std::vector.
4579 (start_inferior): Rewrite function to use C++.
4580 (handle_v_run): Likewise. Update code that calculates the argv
4581 based on the vRun packet; use C++.
4582 (captured_main): Likewise.
4584 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4586 * server.c (handle_v_cont): Initialize thread_resume::thread
4589 2017-04-05 Pedro Alves <palves@redhat.com>
4591 * configure: Regenerate.
4593 2017-04-05 Pedro Alves <palves@redhat.com>
4595 * gdbreplay.c (sync_error): Constify.
4596 * linux-x86-low.c (push_opcode): Constify.
4598 2017-04-05 Pedro Alves <palves@redhat.com>
4600 * win32-low.c (get_child_debug_event)
4601 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4602 Report TARGET_WAITKIND_SPURIOUS instead.
4604 2017-04-05 Pedro Alves <palves@redhat.com>
4606 * remote-utils.c (remote_prepare, remote_open): Constify.
4607 * remote-utils.h (remote_prepare, remote_open): Constify.
4608 * server.c (captured_main): Constify 'port' handling.
4610 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4612 * Makefile.in (clean): Clear .deps.
4614 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4616 * .gitignore: Remove generated files, replace with wildcard.
4617 * (clean): Replace removal of generated files with wildcard.
4618 (version.c): Replace with...
4619 (version-generated.c): ...this.
4620 (xml-builtin.c): Replace with...
4621 (xml-builtin-generated.c): ...this.
4622 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4623 (%.c: *regformats*): Replace with...
4624 (%-generated.c: *regformats*): ...this.
4626 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4628 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4629 (xtensa_fill_gregset): Call collect_register_by_name for
4631 (xtensa_store_gregset): Call supply_register_by_name for
4634 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4636 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4637 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4638 (xtensa_store_gregset): Call supply_register for all registers in
4639 a0_regnum..a0_regnum + C0_NREGS range.
4641 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4643 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4644 (ax-ipa.o: ax.c): Remove.
4645 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4646 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4647 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4648 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4649 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4651 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4653 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4654 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4655 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4656 (errors-ipa.o: ../common/errors.c): Remove.
4657 (format-ipa.o: ../common/format.c): Remove.
4658 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4660 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4662 * Makefile.in (%-ipa.o: %.c): New rule.
4663 (tracepoint-ipa.o: tracepoint.c): Remove.
4664 (utils-ipa.o: utils.c): Remove.
4665 (remote-utils-ipa.o: remote-utils.c): Remove.
4666 (regcache-ipa.o: regcache.c): Remove.
4667 (i386-linux-ipa.o: i386-linux.c): Remove.
4668 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4669 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4670 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4671 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4672 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4673 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4674 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4675 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4676 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4677 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4678 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4679 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4680 (aarch64-ipa.o: aarch64.c): Remove.
4681 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4682 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4683 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4684 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4685 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4686 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4687 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4688 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4689 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4690 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4691 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4692 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4693 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4694 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4695 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4696 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4697 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4698 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4699 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4700 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4701 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4702 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4703 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4704 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4705 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4706 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4707 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4708 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4709 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4710 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4711 (tdesc-ipa.o: tdesc.c): Remove.
4712 (x32-linux-ipa.o: x32-linux.c): Remove.
4713 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4714 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4716 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4718 * Makefile.in (%.o: ../arch/%.c): New rule.
4719 (arm.o: ../arch/arm.c): Remove.
4720 (arm-linux.o: ../arch/arm-linux.c): Remove.
4721 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4722 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4724 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4726 * Makefile.in (%.o: ../nat/%.c): New rule.
4727 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4728 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4729 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4730 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4731 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4732 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4733 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4734 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4735 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4736 (linux-personality.o: ../nat/linux-personality.c): Remove.
4737 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4738 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4739 (x86-linux.o: ../nat/x86-linux.c): Remove.
4740 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4741 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4743 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4745 * Makefile.in (%.o: ../common/%.c): New rule.
4746 (signals.o: ../common/signals.c): Remove.
4747 (print-utils.o: ../common/print-utils.c): Remove.
4748 (rsp-low.o: ../common/rsp-low.c): Remove.
4749 (common-utils.o: ../common/common-utils.c): Remove.
4750 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4751 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4752 (vec.o: ../common/vec.c): Remove.
4753 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4754 (xml-utils.o: ../common/xml-utils.c): Remove.
4755 (ptid.o: ../common/ptid.c): Remove.
4756 (buffer.o: ../common/buffer.c): Remove.
4757 (format.o: ../common/format.c): Remove.
4758 (filestuff.o: ../common/filestuff.c): Remove.
4759 (agent.o: ../common/agent.c): Remove.
4760 (errors.o: ../common/errors.c): Remove.
4761 (environ.o: ../common/environ.c): Remove.
4762 (common-debug.o: ../common/common-debug.c): Remove.
4763 (cleanups.o: ../common/cleanups.c): Remove.
4764 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4765 (fileio.o: ../common/fileio.c): Remove.
4766 (common-regcache.o: ../common/common-regcache.c): Remove.
4767 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4768 (new-op.o: ../common/new-op.c): Remove.
4769 (btrace-common.o: ../common/btrace-common.c): Remove.
4771 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4773 * Makefile.in (%.o: ../target/%.c): New rule.
4774 (waitstatus.o: ../target/waitstatus.c): Remove.
4776 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4779 (%.c: ../regformats/%.dat,
4780 (%.c: ../regformats/arm/%.dat,
4781 (%.c: ../regformats/i386/%.dat,
4782 (%.c: ../regformats/rs6000/%.dat): New rules.
4783 (aarch64.c): Remove.
4784 (reg-arm.c): Remove.
4785 (arm-with-iwmmxt.c): Remove.
4786 (arm-with-vfpv2.c): Remove.
4787 (arm-with-vfpv3.c): Remove.
4788 (arm-with-neon.c): Remove.
4789 (reg-bfin.c): Remove.
4790 (reg-cris.c): Remove.
4791 (reg-crisv32.c): Remove.
4793 (i386-linux.c): Remove.
4794 (i386-avx.c): Remove.
4795 (i386-avx-linux.c): Remove.
4796 (i386-avx-avx512.c): Remove.
4797 (i386-avx-avx512-linux.c): Remove.
4798 (i386-mpx.c): Remove.
4799 (i386-mpx-linux.c): Remove.
4800 (i386-avx-mpx-avx512-pku.c): Remove.
4801 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4802 (i386-avx-mpx.c): Remove.
4803 (i386-avx-mpx-linux.c): Remove.
4804 (i386-mmx.c): Remove.
4805 (i386-mmx-linux.c): Remove.
4806 (reg-ia64.c): Remove.
4807 (reg-m32r.c): Remove.
4808 (reg-m68k.c): Remove.
4810 (mips-linux.c): Remove.
4811 (mips-dsp-linux.c): Remove.
4812 (mips64-linux.c): Remove.
4813 (mips64-dsp-linux.c): Remove.
4814 (nios2-linux.c): Remove.
4815 (powerpc-32.c): Remove.
4816 (powerpc-32l.c): Remove.
4817 (powerpc-altivec32l.c): Remove.
4818 (powerpc-cell32l.c): Remove.
4819 (powerpc-vsx32l.c): Remove.
4820 (powerpc-isa205-32l.c): Remove.
4821 (powerpc-isa205-altivec32l.c): Remove.
4822 (powerpc-isa205-vsx32l.c): Remove.
4823 (powerpc-e500l.c): Remove.
4824 (powerpc-64l.c): Remove.
4825 (powerpc-altivec64l.c): Remove.
4826 (powerpc-cell64l.c): Remove.
4827 (powerpc-vsx64l.c): Remove.
4828 (powerpc-isa205-64l.c): Remove.
4829 (powerpc-isa205-altivec64l.c): Remove.
4830 (powerpc-isa205-vsx64l.c): Remove.
4831 (s390-linux32.c): Remove.
4832 (s390-linux32v1.c): Remove.
4833 (s390-linux32v2.c): Remove.
4834 (s390-linux64.c): Remove.
4835 (s390-linux64v1.c): Remove.
4836 (s390-linux64v2.c): Remove.
4837 (s390-te-linux64.c): Remove.
4838 (s390-vx-linux64.c): Remove.
4839 (s390-tevx-linux64.c): Remove.
4840 (s390x-linux64.c): Remove.
4841 (s390x-linux64v1.c): Remove.
4842 (s390x-linux64v2.c): Remove.
4843 (s390x-te-linux64.c): Remove.
4844 (s390x-vx-linux64.c): Remove.
4845 (s390x-tevx-linux64.c): Remove.
4846 (tic6x-c64xp-linux.c): Remove.
4847 (tic6x-c64x-linux.c): Remove.
4848 (tic6x-c62x-linux.c): Remove.
4850 (reg-sparc64.c): Remove.
4851 (reg-spu.c): Remove.
4853 (amd64-linux.c): Remove.
4854 (amd64-avx.c): Remove.
4855 (amd64-avx-linux.c): Remove.
4856 (amd64-avx-avx512.c): Remove.
4857 (amd64-avx-avx512-linux.c): Remove.
4858 (amd64-mpx.c): Remove.
4859 (amd64-mpx-linux.c): Remove.
4860 (amd64-avx-mpx-avx512-pku.c): Remove.
4861 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4862 (amd64-avx-mpx.c): Remove.
4863 (amd64-avx-mpx-linux.c): Remove.
4865 (x32-linux.c): Remove.
4866 (x32-avx.c): Remove.
4867 (x32-avx-linux.c): Remove.
4868 (x32-avx-avx512.c): Remove.
4869 (x32-avx-avx512-linux.c): Remove.
4870 (reg-xtensa.c): Remove.
4871 (reg-tilegx.c): Remove.
4872 (reg-tilegx32.c): Remove.
4874 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4876 * Makefile.in (SFILES): Add "common/environ.c".
4877 (OBJS): Add "common/environ.h".
4879 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4881 * configure.ac: Check if the fs_base and gs_base members of
4882 `struct user_regs_struct' exist.
4883 * config.in: Regenerated.
4884 * configure: Likewise.
4886 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4888 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4890 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4891 (get_next_pcs_syscall_next_pc): Likewise.
4893 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4895 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4896 * nto-x86-low.c: Likewise.
4898 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4900 * Makefile.in: Include disable-implicit-rules.mk.
4902 2016-11-23 Pedro Alves <palves@redhat.com>
4904 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4905 (debug_vprintf): Use std::chrono::steady_clock instead of
4906 gettimeofday. Use '.' instead of ':'.
4907 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4908 (get_timestamp): Use std::chrono::steady_clock instead of
4911 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4913 * Makefile.in: Fix whitespace formatting.
4915 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4917 * Makefile.in (SFILES, OBS): Flatten list and order
4920 2016-11-23 Pedro Alves <palves@redhat.com>
4922 * event-loop.c (handle_file_event): Use warning.
4923 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4924 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4927 2016-11-23 Pedro Alves <palves@redhat.com>
4929 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4931 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4932 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4933 debug_printf and debug_flush for debug output.
4934 * server.c (handle_general_set): Likewise.
4935 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4938 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4940 * Makefile.in (.c.o): Replace rule with ...
4941 (%.o: %.c): ... this one.
4943 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4945 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4946 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4948 * configure.ac: Remove checks for the make program.
4949 * configure: Re-generate.
4951 2016-10-28 Pedro Alves <palves@redhat.com>
4953 * Makefile.in (CXX_DIALECT): Get from configure.
4954 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4955 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4956 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4957 * config.in: Regenerate.
4958 * configure: Regenerate.
4960 2016-10-27 Yao Qi <yao.qi@linaro.org>
4962 * linux-low.c (linux_supports_range_stepping): Return true if
4963 can_software_single_step return true.
4965 2016-10-27 Yao Qi <yao.qi@linaro.org>
4967 * inferiors.c (find_inferior_in_random): New function.
4968 * inferiors.h (find_inferior_in_random): Declare.
4969 * linux-low.c (linux_wait_for_event_filtered): Call
4970 find_inferior_in_random instead of find_inferior.
4972 2016-10-27 Yao Qi <yao.qi@linaro.org>
4974 * linux-low.c (linux_wait_1): If single-step breakpoints are
4975 inserted, remove them.
4977 2016-10-26 Pedro Alves <palves@redhat.com>
4979 * linux-low.c (handle_extended_wait): Link parent/child fork
4981 (linux_wait_1): Unlink them.
4982 (linux_set_resume_request): Ignore resume requests for
4983 already-resumed and unhandled fork child threads.
4984 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4985 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4987 (handle_v_requests) <vCont>: Don't call require_running.
4988 * server.h (in_queued_stop_replies): New declaration.
4990 2016-10-24 Yao Qi <yao.qi@linaro.org>
4993 * linux-aarch64-low.c (append_insns): Cast the return value to
4996 2016-10-10 Yao Qi <yao.qi@linaro.org>
4998 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5000 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5002 * target.c (target_supports_multi_process): New function, moved
5004 * target.h (target_supports_multi_process): ... here. Remove
5007 2016-10-05 Tom Tromey <tom@tromey.com>
5010 * tracepoint.c (handle_tracepoint_bkpts): Check
5011 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5013 2016-10-05 Yao Qi <yao.qi@linaro.org>
5015 * configure.srv: Update the path of arm-*.xml files.
5017 2016-10-05 Terry Guo <terry.guo@arm.com>
5018 Yao Qi <yao.qi@linaro.org>
5020 * Makefile.in: Adjust the path of rules.
5021 * configure.srv: Update the path of xml files.
5022 * regformats/arm-with-iwmmxt.dat: Regenerated.
5023 * regformats/arm-with-neon.dat: Likewise.
5024 * regformats/arm-with-vfpv2.dat: Likewise.
5025 * regformats/arm-with-vfpv3.dat Likewise.
5027 2016-09-30 Yao Qi <yao.qi@linaro.org>
5030 * target.c (target_stop_and_wait): Don't call
5031 target_continue_no_signal, use resume_stop instead.
5033 2016-09-26 Yao Qi <yao.qi@linaro.org>
5035 * linux-low.c (linux_wait_1): Call debug_exit.
5037 2016-09-23 Pedro Alves <palves@redhat.com>
5039 * Makefile.in (SFILES): Add common/new-op.c.
5040 (OBS): Add common/new-op.o.
5041 (new-op.o): New rule.
5043 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5045 * .gitinore: Ignore more files.
5047 2016-09-21 Yao Qi <yao.qi@linaro.org>
5049 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5052 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5054 * server.c (start_inferior): Call target_mourn_inferior instead of
5055 mourn_inferior; pass ptid_t argument to it.
5057 (handle_target_event): Likewise.
5058 * target.c (target_mourn_inferior): New function.
5059 * target.h (mourn_inferior): Delete macro.
5061 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5063 * linux-low.c (lwp_is_stepping): New function.
5065 2016-09-06 Carl Love <cel@us.ibm.com>
5067 * server.c (start_inferior): Fixed comment, requested comment change
5068 didn't get updated correctly. Removed reference to ptrace () call as
5069 it is only true on Linux systems.
5071 2016-09-06 Carl Love <cel@us.ibm.com>
5073 * server.c (start_inferior): Do not call
5074 function target_post_create_inferior () if the
5075 inferior process has already exited.
5077 2016-09-05 Pedro Alves <palves@redhat.com>
5079 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5080 (COMPILE.pre, CC_LD): Use CXX directly.
5081 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5082 * acinclude.m4: Don't include build-with-cxx.m4.
5083 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5084 * configure: Regenerate.
5086 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5089 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5090 call writing data to own_buf.
5092 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5094 * target.c (mywait): Call target_wait instead of
5096 (target_wait): New function.
5098 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5100 * server.c (start_inferior): New variable 'ptid'. Replace calls
5101 to the_target->resume by target_continue{,_no_signal}, depending
5103 * target.c (target_stop_and_wait): Call target_continue_no_signal
5104 instead of the_target->resume.
5105 (target_continue): New function.
5107 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5109 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5111 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5114 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5116 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5117 * linux-arm-low.c (ps_get_thread_area): Likewise.
5118 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5119 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5120 * linux-mips-low.c (ps_get_thread_area): Likewise.
5121 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5122 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5123 * linux-x86-low.c (ps_get_thread_area): Likewise.
5124 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5126 2016-08-19 Pedro Alves <palves@redhat.com>
5128 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5130 2016-08-19 Pedro Alves <palves@redhat.com>
5132 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5133 comment. Use memcpy instead of casting through unsigned long.
5135 2016-08-19 Pedro Alves <palves@redhat.com>
5137 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5138 allocating around 0x80000000.
5140 2016-08-19 Pedro Alves <palves@redhat.com>
5143 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5144 (x32-avx512-linux-ipa.o): New rules.
5145 * configure.ac (x86_64-*-linux*): New x32 check.
5146 * configure.srv (ipa_x32_linux_regobj): New.
5147 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5148 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5150 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5152 * configure: Regenerate.
5154 2016-08-09 Pedro Alves <palves@redhat.com>
5157 * Makefile.in (OBS): Add signals-state-save-restore.o.
5158 (signals-state-save-restore.o): New rule.
5159 * config.in: Regenerate.
5160 * configure: Regenerate.
5161 * linux-low.c: Include "signals-state-save-restore.h".
5162 (linux_create_inferior): Call
5163 restore_original_signals_state.
5164 * server.c: Include "dispositions-save-restore.h".
5165 (captured_main): Call save_original_signals_state.
5167 2016-08-05 Pedro Alves <palves@redhat.com>
5169 * configure: Regenerate.
5171 2016-08-04 Yao Qi <yao.qi@linaro.org>
5173 * linux-low.c (regsets_fetch_inferior_registers): Check
5174 errno is ESRCH or not.
5176 2016-08-02 Yao Qi <yao.qi@linaro.org>
5178 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5179 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5180 (thread_db_load_search): Update.
5181 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5182 td_ta_set_event and td_ta_event_getmsg.
5184 2016-07-26 Pedro Alves <palves@redhat.com>
5187 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5188 of unsigned long for 64-bit registers and use uint32_t instead of
5189 unsigned int for 32-bit registers.
5191 2016-07-26 Pedro Alves <palves@redhat.com>
5193 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5196 2016-07-21 Tom Tromey <tom@tromey.com>
5198 * configure: Rebuild.
5200 2016-07-21 Yao Qi <yao.qi@linaro.org>
5202 * mem-break.c (find_gdb_breakpoint): Cast bp to
5203 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5205 2016-07-21 Yao Qi <yao.qi@linaro.org>
5207 * server.c (handle_v_requests): Support s and S actions
5208 if target_supports_software_single_step return true.
5210 2016-07-21 Yao Qi <yao.qi@linaro.org>
5212 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5213 is resume_step, call maybe_hw_step.
5214 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5216 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5218 (proceed_one_lwp): If resume request is resume_step, install
5219 reinsert breakpoints and call maybe_hw_step.
5221 2016-07-21 Yao Qi <yao.qi@linaro.org>
5223 * linux-low.c (proceed_one_lwp): Declare.
5224 (linux_resume_one_thread): Remove local variable 'step'.
5225 Lift code enqueue signal. Call proceed_one_lwp instead of
5226 linux_resume_one_lwp.
5228 2016-07-21 Yao Qi <yao.qi@linaro.org>
5230 * linux-low.c (linux_resume_one_thread): Call
5231 enqueue_pending_signal.
5233 2016-07-21 Yao Qi <yao.qi@linaro.org>
5235 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5236 * inferiors.c (do_restore_current_thread_cleanup): New function.
5237 (make_cleanup_restore_current_thread): Likewise.
5238 * linux-low.c (install_software_single_step_breakpoints): Call
5239 make_cleanup_restore_current_thread. Switch current_thread to
5242 2016-07-21 Yao Qi <yao.qi@linaro.org>
5244 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5245 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5246 (clone_one_breakpoint): Likewise.
5247 (delete_reinsert_breakpoints): Change parameter to thread.
5249 (has_reinsert_breakpoints): Likewise.
5250 (uninsert_reinsert_breakpoints): Likewise.
5251 (reinsert_reinsert_breakpoints): Likewise.
5252 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5253 (delete_reinsert_breakpoints): Likewise.
5254 (reinsert_reinsert_breakpoints): Likewise.
5255 (uninsert_reinsert_breakpoints): Likewise.
5256 (has_reinsert_breakpoints): Likewise.
5258 2016-07-21 Yao Qi <yao.qi@linaro.org>
5260 * inferiors.c (get_thread_process): Make parameter const.
5261 * inferiors.h (get_thread_process): Update declaration.
5262 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5263 Add new parameters child_thread and parent_thread. Callers
5265 * mem-break.h (clone_all_breakpoints): Update declaration.
5267 2016-07-21 Yao Qi <yao.qi@linaro.org>
5269 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5270 <command_list, handler>: Remove.
5271 (struct gdb_breakpoint): New.
5272 (struct other_breakpoint): New.
5273 (struct reinsert_breakpoint): New.
5274 (is_gdb_breakpoint): New function.
5275 (any_persistent_commands): Update command_list if
5276 is_gdb_breakpoint returns true.
5277 (set_breakpoint): Create breakpoints according to their types.
5278 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5279 (set_gdb_breakpoint_1): Likewise.
5280 (set_gdb_breakpoint): Likewise.
5281 (clear_breakpoint_conditions): Change parameter type to
5282 'struct gdb_breakpoint *'.
5283 (clear_breakpoint_commands): Likewise.
5284 (clear_breakpoint_conditions_and_commands): Likewise.
5285 (add_condition_to_breakpoint): Likewise.
5286 (add_breakpoint_condition): Likewise.
5287 (add_commands_to_breakpoint): Likewise.
5288 (check_breakpoints): Check other_breakpoint.
5289 (clone_one_breakpoint): Clone breakpopint according to its type.
5290 * mem-break.h (struct gdb_breakpoint): Declare.
5291 (set_gdb_breakpoint): Update declaration.
5292 (clear_breakpoint_conditions_and_commands): Likewise.
5293 (add_breakpoint_condition): Likewise.
5294 (add_breakpoint_commands): Likewise.
5295 * server.c (process_point_options): Change parameter type to
5296 'struct gdb_breakpoint *'.
5298 2016-07-21 Yao Qi <yao.qi@linaro.org>
5300 * mem-break.c (set_breakpoint_at): Rename it to ...
5301 (set_breakpoint_type_at): ... it.
5302 (set_breakpoint_at): Call set_breakpoint_type_at.
5303 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5304 * mem-break.h (set_breakpoint_at): Update comments.
5306 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5308 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5310 (nios2_store_gregset): Likewise.
5312 2016-07-01 Pedro Alves <palves@redhat.com>
5313 Antoine Tremblay <antoine.tremblay@ericsson.com>
5315 * linux-low.c: Change interface to take the target lwp_info
5316 pointer directly and return void. Handle detaching from a zombie
5318 (linux_detach_lwp_callback): New function.
5319 (linux_detach): Detach from the leader thread after detaching from
5322 2016-06-28 Yao Qi <yao.qi@linaro.org>
5324 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5325 for variable new_offset.
5326 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5327 (aarch64_ftrace_insn_reloc_cb): Likewise.
5328 (aarch64_ftrace_insn_reloc_tb): Likewise.
5329 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5330 PRIx64 instead of PRIx32.
5332 2016-06-28 Yao Qi <yao.qi@linaro.org>
5334 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5335 (the_low_target): Install arm_get_syscall_trapinfo.
5337 2016-06-28 Yao Qi <yao.qi@linaro.org>
5339 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5341 (the_low_target): Install aarch64_get_syscall_trapinfo.
5343 2016-06-28 Yao Qi <yao.qi@linaro.org>
5345 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5347 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5348 Remove parameter sysno.
5349 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5352 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5354 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5355 (s390_emit_ne_goto): Likewise.
5356 (s390_emit_lt_goto): Likewise.
5357 (s390_emit_le_goto): Likewise.
5358 (s390_emit_gt_goto): Likewise.
5359 (s390_emit_ge_goto): Likewise.
5360 (s390x_emit_eq_goto): Likewise.
5361 (s390x_emit_ne_goto): Likewise.
5362 (s390x_emit_lt_goto): Likewise.
5363 (s390x_emit_le_goto): Likewise.
5364 (s390x_emit_gt_goto): Likewise.
5365 (s390x_emit_ge_goto): Likewise.
5366 (s390_emit_ops_impl): Mark variable static.
5367 (s390x_emit_ops): Likewise.
5369 2016-06-17 Yao Qi <yao.qi@linaro.org>
5371 * linux-low.c (handle_extended_wait): Call
5372 uninsert_reinsert_breakpoints for the parent process. Remove
5373 reinsert breakpoints from the child process. Reinsert them to
5374 the parent process when vfork is done.
5375 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5376 (reinsert_reinsert_breakpoints): New function.
5377 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5378 (reinsert_reinsert_breakpoints): Declare.
5380 2016-06-17 Yao Qi <yao.qi@linaro.org>
5382 * linux-low.c (handle_extended_wait): If the parent is doing
5383 step-over, remove the reinsert breakpoints from the forked child.
5385 2016-06-17 Yao Qi <yao.qi@linaro.org>
5387 * linux-low.c (unsuspend_all_lwps): Declare.
5388 (linux_low_filter_event): If thread exited, call finish_step_over.
5389 If step-over is finished, unsuspend other threads.
5391 2016-06-17 Yao Qi <yao.qi@linaro.org>
5393 * linux-low.c (linux_resume_one_lwp_throw): Assert
5394 has_reinsert_breakpoints returns false.
5395 * mem-break.c (delete_disabled_breakpoints): Assert
5396 bp type isn't reinsert_breakpoint.
5398 2016-06-17 Yao Qi <yao.qi@linaro.org>
5400 * linux-low.c (maybe_hw_step): New function.
5401 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5402 (finish_step_over): Switch current_thread to lwp temporarily,
5403 and assert has_reinsert_breakpoints returns true.
5404 (proceed_one_lwp): Call maybe_hw_step.
5405 * mem-break.c (has_reinsert_breakpoints): New function.
5406 * mem-break.h (has_reinsert_breakpoints): Declare.
5408 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5410 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5412 2016-05-17 Yao Qi <yao.qi@linaro.org>
5414 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5415 instead of find_inferior.
5417 2016-05-05 Yao Qi <yao.qi@linaro.org>
5419 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5420 Initialize res to zero.
5422 2016-05-05 Yao Qi <yao.qi@linaro.org>
5424 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5427 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5429 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5430 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5431 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5433 2016-04-28 Par Olsson <par.olsson@windriver.com>
5434 Simon Marchi <simon.marchi@ericsson.com>
5436 * tracepoint.c (write_inferior_int8): New function.
5437 (cmd_qtenable_disable): Write enable flag using
5438 write_inferior_int8.
5440 2016-04-25 Yao Qi <yao.qi@linaro.org>
5442 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5443 (need_step_over_p): Return zero if the LWP has pending signals
5444 can be delivered on software single step target.
5446 2016-04-25 Yao Qi <yao.qi@linaro.org>
5448 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5449 return instead of error.
5451 2016-04-22 Yao Qi <yao.qi@linaro.org>
5453 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5456 2016-04-22 Yao Qi <yao.qi@linaro.org>
5458 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5459 signal when stepping over breakpoint with software single
5462 2016-04-21 Pedro Alves <palves@redhat.com>
5464 * linux-s390-low.c (s390_collect_ptrace_register)
5465 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5467 (s390_check_regset): Use void * instead of gdb_byte *.
5469 2016-04-20 Pedro Alves <palves@redhat.com>
5471 * configure: Renegerate.
5473 2016-04-20 Yao Qi <yao.qi@linaro.org>
5475 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5476 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5478 (arm_store_gregset): Likewise.
5480 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5482 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5483 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5484 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5485 (amd64-avx-mpx-linux.c): New rules.
5486 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5487 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5488 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5489 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5490 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5491 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5492 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5493 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5494 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5495 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5496 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5497 * linux-x86-low.c (x86_linux_read_description): Add case for
5498 X86_XSTATE_AVX_MPX_MASK.
5499 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5500 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5501 init_registers_i386_avx_mpx_linux.
5502 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5503 (initialize_low_tracepoint): Call
5504 init_registers_i386_avx_mpx_linux.
5505 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5506 (initialize_low_tracepoint): Call
5507 init_registers_amd64_avx_mpx_linux.
5508 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5509 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5510 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5513 2016-04-18 Pedro Alves <palves@redhat.com>
5515 * configure: Regenerate.
5517 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5519 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5520 (aarch64_emit_sub): Likewise.
5522 2016-04-12 Pedro Alves <palves@redhat.com>
5524 * utils.c (prepare_to_throw_exception): Delete.
5526 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5528 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5530 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5532 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5534 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5536 * linux-aarch64-ipa.c: Add <elf.h> include.
5537 * linux-ppc-ipa.c: Add <elf.h> include.
5538 * linux-s390-ipa.c: Add <elf.h> include.
5540 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5542 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5543 (get_raw_reg_ptr): Likewise.
5544 (get_trace_state_variable_value_ptr): Likewise.
5545 (set_trace_state_variable_value_ptr): Likewise.
5546 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5549 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5550 Marcin Kościelnicki <koriakin@0x04.net>
5553 * linux-ppc-low.c (emit_insns): New function.
5554 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5555 (ppc_emit_prologue): New function.
5556 (ppc_emit_epilogue): New function.
5557 (ppc_emit_add): New function.
5558 (ppc_emit_sub): New function.
5559 (ppc_emit_mul): New function.
5560 (ppc_emit_lsh): New function.
5561 (ppc_emit_rsh_signed): New function.
5562 (ppc_emit_rsh_unsigned): New function.
5563 (ppc_emit_ext): New function.
5564 (ppc_emit_zero_ext): New function.
5565 (ppc_emit_log_not): New function.
5566 (ppc_emit_bit_and): New function.
5567 (ppc_emit_bit_or): New function.
5568 (ppc_emit_bit_xor): New function.
5569 (ppc_emit_bit_not): New function.
5570 (ppc_emit_equal): New function.
5571 (ppc_emit_less_signed): New function.
5572 (ppc_emit_less_unsigned): New function.
5573 (ppc_emit_ref): New function.
5574 (ppc_emit_const): New function.
5575 (ppc_emit_reg): New function.
5576 (ppc_emit_pop): New function.
5577 (ppc_emit_stack_flush): New function.
5578 (ppc_emit_swap): New function.
5579 (ppc_emit_stack_adjust): New function.
5580 (ppc_emit_call): New function.
5581 (ppc_emit_int_call_1): New function.
5582 (ppc_emit_void_call_2): New function.
5583 (ppc_emit_if_goto): New function.
5584 (ppc_emit_goto): New function.
5585 (ppc_emit_eq_goto): New function.
5586 (ppc_emit_ne_goto): New function.
5587 (ppc_emit_lt_goto): New function.
5588 (ppc_emit_le_goto): New function.
5589 (ppc_emit_gt_goto): New function.
5590 (ppc_emit_ge_goto): New function.
5591 (ppc_write_goto_address): New function.
5592 (ppc_emit_ops_impl): New static variable.
5593 (ppc64v1_emit_prologue): New function.
5594 (ppc64v2_emit_prologue): New function.
5595 (ppc64_emit_epilogue): New function.
5596 (ppc64_emit_add): New function.
5597 (ppc64_emit_sub): New function.
5598 (ppc64_emit_mul): New function.
5599 (ppc64_emit_lsh): New function.
5600 (ppc64_emit_rsh_signed): New function.
5601 (ppc64_emit_rsh_unsigned): New function.
5602 (ppc64_emit_ext): New function.
5603 (ppc64_emit_zero_ext): New function.
5604 (ppc64_emit_log_not): New function.
5605 (ppc64_emit_bit_and): New function.
5606 (ppc64_emit_bit_or): New function.
5607 (ppc64_emit_bit_xor): New function.
5608 (ppc64_emit_bit_not): New function.
5609 (ppc64_emit_equal): New function.
5610 (ppc64_emit_less_signed): New function.
5611 (ppc64_emit_less_unsigned): New function.
5612 (ppc64_emit_ref): New function.
5613 (ppc64_emit_const): New function.
5614 (ppc64v1_emit_reg): New function.
5615 (ppc64v2_emit_reg): New function.
5616 (ppc64_emit_pop): New function.
5617 (ppc64_emit_stack_flush): New function.
5618 (ppc64_emit_swap): New function.
5619 (ppc64v1_emit_call): New function.
5620 (ppc64v2_emit_call): New function.
5621 (ppc64v1_emit_int_call_1): New function.
5622 (ppc64v2_emit_int_call_1): New function.
5623 (ppc64v1_emit_void_call_2): New function.
5624 (ppc64v2_emit_void_call_2): New function.
5625 (ppc64_emit_if_goto): New function.
5626 (ppc64_emit_eq_goto): New function.
5627 (ppc64_emit_ne_goto): New function.
5628 (ppc64_emit_lt_goto): New function.
5629 (ppc64_emit_le_goto): New function.
5630 (ppc64_emit_gt_goto): New function.
5631 (ppc64_emit_ge_goto): New function.
5632 (ppc64v1_emit_ops_impl): New static variable.
5633 (ppc64v2_emit_ops_impl): New static variable.
5634 (ppc_emit_ops): New function.
5635 (linux_low_target): Wire in ppc_emit_ops.
5637 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5638 Marcin Kościelnicki <koriakin@0x04.net>
5641 * Makefile.in: Add powerpc-*-ipa.o
5642 * configure.srv: Add ipa_obj for powerpc*-linux.
5643 * linux-ppc-ipa.c: New file.
5644 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5646 (PPC_FIELD): New macro.
5647 (PPC_SEXT): New macro.
5648 (PPC_OP6): New macro.
5649 (PPC_BO): New macro.
5650 (PPC_LI): New macro.
5651 (PPC_BD): New macro.
5652 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5653 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5654 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5655 (ppc_get_thread_area): New function.
5656 (is_elfv2_inferior): New function.
5657 (gen_ds_form): New function.
5658 (GEN_STD): New macro.
5659 (GEN_STDU): New macro.
5660 (GEN_LD): New macro.
5661 (GEN_LDU): New macro.
5662 (gen_d_form): New function.
5663 (GEN_ADDI): New macro.
5664 (GEN_ADDIS): New macro.
5665 (GEN_LI): New macro.
5666 (GEN_LIS): New macro.
5667 (GEN_ORI): New macro.
5668 (GEN_ORIS): New macro.
5669 (GEN_LWZ): New macro.
5670 (GEN_STW): New macro.
5671 (GEN_STWU): New macro.
5672 (gen_xfx_form): New function.
5673 (GEN_MFSPR): New macro.
5674 (GEN_MTSPR): New macro.
5675 (GEN_MFCR): New macro.
5676 (GEN_MTCR): New macro.
5677 (GEN_SYNC): New macro.
5678 (GEN_LWSYNC): New macro.
5679 (gen_x_form): New function.
5680 (GEN_OR): New macro.
5681 (GEN_MR): New macro.
5682 (GEN_LWARX): New macro.
5683 (GEN_STWCX): New macro.
5684 (GEN_CMPW): New macro.
5685 (gen_md_form): New function.
5686 (GEN_RLDICL): New macro.
5687 (GEN_RLDICR): New macro.
5688 (gen_i_form): New function.
5690 (GEN_BL): New macro.
5691 (gen_b_form): New function.
5692 (GEN_BNE): New macro.
5693 (GEN_LOAD): New macro.
5694 (GEN_STORE): New macro.
5695 (gen_limm): New function.
5696 (gen_atomic_xchg): New function.
5697 (gen_call): New function.
5698 (ppc_relocate_instruction): New function.
5699 (ppc_install_fast_tracepoint_jump_pad): New function.
5700 (ppc_get_min_fast_tracepoint_insn_len): New function.
5701 (ppc_get_ipa_tdesc_idx): New function.
5702 (the_low_target): Wire in the new functions.
5703 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5705 * linux-ppc-tdesc.h: New file.
5707 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5709 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5710 (alloc_jump_pad_buffer): New function.
5711 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5712 (alloc_jump_pad_buffer): New function.
5713 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5714 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5715 (alloc_jump_pad_buffer): New function.
5716 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5717 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5718 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5719 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5721 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5723 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5724 * linux-amd64-ipa.c: Likewise.
5725 * linux-i386-ipa.c: Likewise.
5726 * linux-s390-ipa.c: Likewise.
5727 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5728 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5729 set_trace_state_variable_value_ptr.
5730 (struct ipa_sym_addresses): Likewise.
5731 (symbol_list): Likewise.
5732 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5733 accessing gdb_collect directly.
5734 (gdb_collect_ptr_type): New typedef.
5735 (get_raw_reg_ptr_type): New typedef.
5736 (get_trace_state_variable_value_ptr_type): New typedef.
5737 (set_trace_state_variable_value_ptr_type): New typedef.
5738 (gdb_collect_ptr): New global.
5739 (get_raw_reg_ptr): New global.
5740 (get_trace_state_variable_value_ptr): New global.
5741 (set_trace_state_variable_value_ptr): New global.
5742 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5743 accessing get_raw_reg directly.
5744 (get_get_tsv_func_addr): Likewise for
5745 get_trace_state_variable_value_ptr.
5746 (get_set_tsv_func_addr): Likewise for
5747 set_trace_state_variable_value_ptr.
5748 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5750 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5752 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5754 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5756 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5758 (relocate_instruction): Remove own_buf.
5759 * server.c (own_buf): Make global.
5760 (handle_v_requests): Make global.
5761 * server.h (own_buf): New declaration.
5762 (handle_v_requests): New prototype.
5764 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5767 * linux-s390-low.c (add_insns): New function.
5768 (s390_emit_prologue): New function.
5769 (s390_emit_epilogue): New function.
5770 (s390_emit_add): New function.
5771 (s390_emit_sub): New function.
5772 (s390_emit_mul): New function.
5773 (s390_emit_lsh): New function.
5774 (s390_emit_rsh_signed): New function.
5775 (s390_emit_rsh_unsigned): New function.
5776 (s390_emit_ext): New function.
5777 (s390_emit_log_not): New function.
5778 (s390_emit_bit_and): New function.
5779 (s390_emit_bit_or): New function.
5780 (s390_emit_bit_xor): New function.
5781 (s390_emit_bit_not): New function.
5782 (s390_emit_equal): New function.
5783 (s390_emit_less_signed): New function.
5784 (s390_emit_less_unsigned): New function.
5785 (s390_emit_ref): New function.
5786 (s390_emit_if_goto): New function.
5787 (s390_emit_goto): New function.
5788 (s390_write_goto_address): New function.
5789 (s390_emit_litpool): New function.
5790 (s390_emit_const): New function.
5791 (s390_emit_call): New function.
5792 (s390_emit_reg): New function.
5793 (s390_emit_pop): New function.
5794 (s390_emit_stack_flush): New function.
5795 (s390_emit_zero_ext): New function.
5796 (s390_emit_swap): New function.
5797 (s390_emit_stack_adjust): New function.
5798 (s390_emit_set_r2): New function.
5799 (s390_emit_int_call_1): New function.
5800 (s390_emit_void_call_2): New function.
5801 (s390_emit_eq_goto): New function.
5802 (s390_emit_ne_goto): New function.
5803 (s390_emit_lt_goto): New function.
5804 (s390_emit_le_goto): New function.
5805 (s390_emit_gt_goto): New function.
5806 (s390_emit_ge_goto): New function.
5807 (s390x_emit_prologue): New function.
5808 (s390x_emit_epilogue): New function.
5809 (s390x_emit_add): New function.
5810 (s390x_emit_sub): New function.
5811 (s390x_emit_mul): New function.
5812 (s390x_emit_lsh): New function.
5813 (s390x_emit_rsh_signed): New function.
5814 (s390x_emit_rsh_unsigned): New function.
5815 (s390x_emit_ext): New function.
5816 (s390x_emit_log_not): New function.
5817 (s390x_emit_bit_and): New function.
5818 (s390x_emit_bit_or): New function.
5819 (s390x_emit_bit_xor): New function.
5820 (s390x_emit_bit_not): New function.
5821 (s390x_emit_equal): New function.
5822 (s390x_emit_less_signed): New function.
5823 (s390x_emit_less_unsigned): New function.
5824 (s390x_emit_ref): New function.
5825 (s390x_emit_if_goto): New function.
5826 (s390x_emit_const): New function.
5827 (s390x_emit_call): New function.
5828 (s390x_emit_reg): New function.
5829 (s390x_emit_pop): New function.
5830 (s390x_emit_stack_flush): New function.
5831 (s390x_emit_zero_ext): New function.
5832 (s390x_emit_swap): New function.
5833 (s390x_emit_stack_adjust): New function.
5834 (s390x_emit_int_call_1): New function.
5835 (s390x_emit_void_call_2): New function.
5836 (s390x_emit_eq_goto): New function.
5837 (s390x_emit_ne_goto): New function.
5838 (s390x_emit_lt_goto): New function.
5839 (s390x_emit_le_goto): New function.
5840 (s390x_emit_gt_goto): New function.
5841 (s390x_emit_ge_goto): New function.
5842 (s390_emit_ops): New function.
5843 (struct linux_target_ops): Fill in emit_ops hook.
5845 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5848 * Makefile.in: Add s390 IPA files.
5849 * configure.srv: Build IPA for s390.
5850 * linux-s390-ipa.c: New file.
5851 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5852 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5853 (tdesc_s390_linux32): Likewise.
5854 (init_registers_s390_linux32v1): Likewise.
5855 (tdesc_s390_linux32v1): Likewise.
5856 (init_registers_s390_linux32v2): Likewise.
5857 (tdesc_s390_linux32v2): Likewise.
5858 (init_registers_s390_linux64): Likewise.
5859 (tdesc_s390_linux64): Likewise.
5860 (init_registers_s390_linux64v1): Likewise.
5861 (tdesc_s390_linux64v1): Likewise.
5862 (init_registers_s390_linux64v2): Likewise.
5863 (tdesc_s390_linux64v2): Likewise.
5864 (init_registers_s390_te_linux64): Likewise.
5865 (tdesc_s390_te_linux64): Likewise.
5866 (init_registers_s390_vx_linux64): Likewise.
5867 (tdesc_s390_vx_linux64): Likewise.
5868 (init_registers_s390_tevx_linux64): Likewise.
5869 (tdesc_s390_tevx_linux64): Likewise.
5870 (init_registers_s390x_linux64): Likewise.
5871 (tdesc_s390x_linux64): Likewise.
5872 (init_registers_s390x_linux64v1): Likewise.
5873 (tdesc_s390x_linux64v1): Likewise.
5874 (init_registers_s390x_linux64v2): Likewise.
5875 (tdesc_s390x_linux64v2): Likewise.
5876 (init_registers_s390x_te_linux64): Likewise.
5877 (tdesc_s390x_te_linux64): Likewise.
5878 (init_registers_s390x_vx_linux64): Likewise.
5879 (tdesc_s390x_vx_linux64): Likewise.
5880 (init_registers_s390x_tevx_linux64): Likewise.
5881 (tdesc_s390x_tevx_linux64): Likewise.
5882 (have_hwcap_s390_vx): New static variable.
5883 (s390_arch_setup): Fill have_hwcap_s390_vx.
5884 (s390_get_thread_area): New function.
5885 (s390_ft_entry_gpr_esa): New const.
5886 (s390_ft_entry_gpr_zarch): New const.
5887 (s390_ft_entry_misc): New const.
5888 (s390_ft_entry_fr): New const.
5889 (s390_ft_entry_vr): New const.
5890 (s390_ft_main_31): New const.
5891 (s390_ft_main_64): New const.
5892 (s390_ft_exit_fr): New const.
5893 (s390_ft_exit_vr): New const.
5894 (s390_ft_exit_misc): New const.
5895 (s390_ft_exit_gpr_esa): New const.
5896 (s390_ft_exit_gpr_zarch): New const.
5897 (append_insns): New function.
5898 (s390_relocate_instruction): New function.
5899 (s390_install_fast_tracepoint_jump_pad): New function.
5900 (s390_get_min_fast_tracepoint_insn_len): New function.
5901 (s390_get_ipa_tdesc_idx): New function.
5902 (struct linux_target_ops): Wire in the above functions.
5903 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5904 * linux-s390-tdesc.h: New file.
5906 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5908 * linux-s390-low.c (s390_supports_tracepoints): New function.
5909 (struct linux_target_ops): Fill supports_tracepoints hook.
5911 2016-03-18 Yao Qi <yao.qi@linaro.org>
5913 * linux-low.c (lwp_signal_can_be_delivered): New function.
5914 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5916 2016-03-18 Yao Qi <yao.qi@linaro.org>
5918 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5919 0 if signal is enqueued. Remove 'signal' from one debugging
5920 message. Move one debugging message to some lines below.
5921 Remove code setting 'signal' to 0.
5923 2016-03-18 Yao Qi <yao.qi@linaro.org>
5925 * linux-low.c (linux_low_filter_event): Remove redundant
5926 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5928 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5930 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5931 (struct linux_target_ops): Wire in the above.
5933 2016-03-03 Yao Qi <yao.qi@linaro.org>
5935 * linux-low.c: Update comments to start_step_over.
5937 2016-03-03 Yao Qi <yao.qi@linaro.org>
5940 * linux-low.c (handle_extended_wait): Set child suspended
5941 if event_lwp->bp_reinsert isn't zero.
5943 2016-03-02 Yao Qi <yao.qi@linaro.org>
5945 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5946 enqueue_pending_signal.
5948 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5950 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5953 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5955 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5956 (s390_regmap_3264) [!__s390x__]: New global.
5957 (s390_collect_ptrace_register): Skip map entries containing -1.
5958 (s390_supply_ptrace_register): Ditto.
5959 (s390_fill_gprs_high): New function.
5960 (s390_store_gprs_high): New function.
5961 (s390_regsets): Add NT_S390_HIGH_GPRS.
5962 (s390_get_hwcap): Enable on 31-bit.
5963 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5964 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5965 Detect NT_S390_HIGH_GPRS.
5966 (s390_usrregs_info_3264): Enable on 31-bit.
5967 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5968 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5970 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5973 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5974 * configure.srv: Ditto.
5975 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5976 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5977 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5978 (init_registers_amd64_linux): Remove prototype.
5979 (tdesc_amd64_linux): Remove declaration.
5980 (get_ipa_tdesc): New function.
5981 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5982 initialize remaining tdescs.
5983 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5984 (init_registers_i386_linux): Remove prototype.
5985 (tdesc_i386_linux): Remove declaration.
5986 (get_ipa_tdesc): New function.
5987 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5988 initialize remaining tdescs.
5989 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5990 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5991 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5992 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5993 (x86_get_ipa_tdesc_idx): New function.
5994 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5995 * linux-x86-tdesc.h: New file.
5996 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5997 (target_get_ipa_tdesc_idx): New macro.
5998 * tracepoint.c (ipa_tdesc_idx): New macro.
5999 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6000 (symbol_list): Add ipa_tdesc_idx.
6001 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6002 (ipa_tdesc): Remove.
6003 (ipa_tdesc_idx): New variable.
6004 (get_context_regcache): Use get_ipa_tdesc.
6005 (gdb_collect): Ditto.
6007 * tracepoint.h (get_ipa_tdesc): New prototype.
6008 (ipa_tdesc): Remove.
6010 2016-02-24 Pedro Alves <palves@redhat.com>
6012 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6013 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6014 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6015 Factor out common code between the USE_SIGTRAP_SIGINFO and
6016 !USE_SIGTRAP_SIGINFO blocks.
6017 (linux_low_filter_event): Call save_stop_reason instead of
6018 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6020 (linux_wait_1): Update comments.
6022 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6024 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6025 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6026 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6027 ppc_insert_point, ppc_remove_point.
6029 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6031 * linux-s390-low.c (s390_supports_z_point_type): New function.
6032 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6034 2016-02-16 Yao Qi <yao.qi@linaro.org>
6036 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6037 PC. Get pc from regcache_read_pc.
6039 2016-02-12 Yao Qi <yao.qi@linaro.org>
6041 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6042 or linux_get_pc_32bit.
6043 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6045 2016-02-12 Yao Qi <yao.qi@linaro.org>
6047 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6048 arm_linux_get_next_pcs_fixup.
6050 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6052 * tracepoint.c (x_tracepoint_action_download): Change
6053 write_inferior_data_ptr to write_inferior_data_pointer.
6054 (cmd_qtstart): Likewise.
6055 (write_inferior_data_ptr): Remove.
6056 (download_agent_expr): Change write_inferior_data_ptr to
6057 write_inferior_data_pointer.
6058 (download_tracepoint_1): Likewise.
6059 (download_tracepoint): Likewise.
6060 (download_trace_state_variables): Likewise.
6062 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6063 Marcin Kościelnicki <koriakin@0x04.net>
6065 * tracepoint.c (struct tracepoint_action_ops): Remove.
6066 (struct tracepoint_action): Remove ops.
6067 (m_tracepoint_action_download, r_tracepoint_action_download)
6068 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6069 size and offset accordingly.
6070 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6071 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6072 (tracepoint_action_send, tracepoint_action_download): New functions.
6073 Helpers for trace action handlers.
6074 (add_tracepoint_action): Remove setup actions ops.
6075 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6077 2016-02-10 Yao Qi <yao.qi@linaro.org>
6079 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6081 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6083 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6085 * configure: Regenerate.
6087 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6089 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6090 void * to gdb_byte *.
6091 * linux-low.c (siginfo_fixup): Likewise.
6092 (linux_xfer_siginfo): Likewise.
6093 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6095 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6097 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6099 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6101 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6103 * linux-x86-low.c [__x86_64__]: Include
6104 "nat/amd64-linux-siginfo.h".
6105 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6106 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6107 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6108 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6109 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6110 (cpt_si_fd, si_timerid, si_overrun): Move from
6111 nat/amd64-linux-siginfo.c.
6112 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6114 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6116 * server.c (skip_to_semicolon): Remove.
6117 (process_point_options): Use strchrnul instead of
6120 2016-01-26 Yao Qi <yao.qi@linaro.org>
6122 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6123 * linux-low.c (install_software_single_step_breakpoints): Don't
6124 call regcache_read_pc.
6125 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6128 2016-01-26 Yao Qi <yao.qi@linaro.org>
6130 * linux-low.c (install_software_single_step_breakpoints): Call
6131 regcache_read_pc instead of get_pc.
6133 2016-01-26 Yao Qi <yao.qi@linaro.org>
6135 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6136 (unblock_async_io): Rename to ...
6137 (block_unblock_async_io): ... it. New function.
6138 (enable_async_io): Don't install SIGIO handler. Unblock it
6140 (disable_async_io): Don't ignore SIGIO. Block it instead.
6141 (initialize_async_io): Install SIGIO handler. Don't call
6144 2016-01-26 Yao Qi <yao.qi@linaro.org>
6146 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6147 first character is '\003', call *the_target->request_interrupt.
6149 2016-01-25 Yao Qi <yao.qi@linaro.org>
6151 * remote-utils.c (new_thread_notify): Remove.
6152 (dead_thread_notify): Likewise.
6153 * remote-utils.h (new_thread_notify): Remove declaration.
6154 (dead_thread_notify): Likewise.
6156 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6158 * gdb.trace/pending.exp: Fix expected message on continue.
6160 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6162 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6163 it works properly on big-endian machines where sizeof (CORE_ADDR)
6166 2016-01-21 Pedro Alves <palves@redhat.com>
6168 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6169 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6170 * configure: Regenerate.
6172 2016-01-21 Yao Qi <yao.qi@linaro.org>
6174 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6175 is_thumb and set it according to CPSR saved on the stack.
6176 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6177 arm_sigreturn_next_pc.
6179 2016-01-18 Yao Qi <yao.qi@linaro.org>
6181 * linux-low.c (linux_set_pc_64bit): New function.
6182 (linux_get_pc_64bit): New function.
6183 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6185 * linux-sparc-low.c (debug_threads): Remove declaration.
6186 (sparc_get_pc): Remove.
6187 (the_low_target): Use linux_get_pc_64bit instead of
6189 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6190 (the_low_target): Use linux_get_pc_64bit and
6193 2016-01-18 Yao Qi <yao.qi@linaro.org>
6195 * linux-arm-low.c (debug_threads): Remove declaration.
6196 (arm_get_pc, arm_set_pc): Remove.
6197 (the_low_target): Use linux_get_pc_32bit and
6199 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6200 (the_low_target): Use linux_get_pc_32bit and
6202 * linux-cris-low.c (debug_threads): Remove declaration.
6203 (cris_get_pc, cris_set_pc,): Remove.
6204 (the_low_target): Use linux_get_pc_32bit and
6206 * linux-crisv32-low.c (debug_threads): Remove declaration.
6207 (cris_get_pc, cris_set_pc): Remove.
6208 (the_low_target): Use linux_get_pc_32bit and
6210 * linux-low.c: Include inttypes.h.
6211 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6212 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6213 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6214 (the_low_target): Use linux_get_pc_32bit and
6216 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6217 (the_low_target): Use linux_get_pc_32bit and
6219 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6220 (the_low_target): Use linux_get_pc_32bit and
6222 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6223 (the_low_target): Use linux_get_pc_32bit and
6225 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6226 (the_low_target): Use linux_get_pc_32bit and
6229 2016-01-18 Gary Benson <gbenson@redhat.com>
6231 * configure.ac (AC_FUNC_FORK): New check.
6232 * config.in: Regenerate.
6233 * configure: Likewise.
6235 2016-01-14 Yao Qi <yao.qi@linaro.org>
6237 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6238 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6239 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6240 arm_get_next_pcs_ctor.
6242 2016-01-12 Josh Stone <jistone@redhat.com>
6243 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6245 * inferiors.h: Include "gdb_vecs.h".
6246 (struct process_info): Add syscalls_to_catch.
6247 * inferiors.c (remove_process): Free syscalls_to_catch.
6248 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6249 syscall_return stops.
6250 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6251 * server.c (handle_general_set): Handle QCatchSyscalls.
6252 (handle_query): Report support for QCatchSyscalls.
6253 * target.h (struct target_ops): Add supports_catch_syscall.
6254 (target_supports_catch_syscall): New macro.
6255 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6256 (struct lwp_info): Add syscall_state.
6257 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6258 Maintain syscall_state and syscalls_to_catch across exec.
6259 (get_syscall_trapinfo): New function, proxy to the_low_target.
6260 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6261 (linux_low_filter_event): Toggle syscall_state entry/return for
6262 syscall traps, and set it ignored for all others.
6263 (gdb_catching_syscalls_p): New function.
6264 (gdb_catch_this_syscall_p): New function.
6265 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6266 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6267 (linux_supports_catch_syscall): New function.
6268 (linux_target_ops): Install it.
6269 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6270 (the_low_target): Install it.
6272 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6274 * acinclude.m4: Include new ../warning.m4 file.
6275 * configure: Regenerated.
6276 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6278 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6280 * ax.c (is_goto_target): Mark static.
6281 * linux-low.c (register_addr): Likewise.
6282 (linux_fetch_registers, linux_store_registers): Likewise.
6283 * mem-break.c (any_persistent_commands): Fix old prototype.
6284 (add_commands_to_breakpoint): Mark static.
6285 * regcache.c (find_register_by_name): Delete unused func.
6286 * remote-utils.c (hex_or_minus_one): Mark static.
6287 * server.c (monitor_show_help): Mark static.
6288 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6289 handle_v_requests): Likewise.
6291 2016-01-12 Pedro Alves <palves@redhat.com>
6293 Remove use of the registered trademark symbol throughout.
6295 2016-01-08 Yao Qi <yao.qi@linaro.org>
6297 * remote-utils.c (getpkt): If c is '\003', call target hook
6300 2016-01-06 Yao Qi <yao.qi@linaro.org>
6302 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6303 linux-aarch32-low.c.
6304 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6305 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6306 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6307 (thumb2_breakpoint): Declare.
6308 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6309 linux-aarch32-low.h.
6310 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6311 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6312 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6314 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6316 * gdbreplay.c (gdbreplay_version): Change copyright year in
6318 * server.c (gdbserver_version): Likewise.
6320 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6322 * server.c (crc32_table): Delete.
6323 (crc32): Use libiberty's xcrc32 function.
6325 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6327 * lynx-low.c (lynx_delete_thread_callback): New function.
6328 (lynx_mourn): Properly delete our process and all of its
6329 threads. Remove call to clear_inferiors.
6331 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6333 * target.c (thread_search_callback): Add check that
6334 the thread_stopped target callback is not NULL before
6337 2015-12-21 Yao Qi <yao.qi@linaro.org>
6339 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6342 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6344 * server.c (handle_query): Call target_supports_software_single_step.
6346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6348 * linux-low.c (single_step): New function.
6349 (linux_resume_one_lwp_throw): Call single_step.
6350 (start_step_over): Likewise.
6352 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6354 * Makefile.in (SFILES): Append arch/arm-linux.c,
6355 arch/arm-get-next-pcs.c.
6356 (arm-linux.o): New rule.
6357 (arm-get-next-pcs.o): New rule.
6358 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6360 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6361 to linux-aarch32-low.c.
6362 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6363 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6364 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6365 (thumb2_breakpoint_len): Likewise.
6366 (arm_is_thumb_mode): Make non-static.
6367 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6368 from linux-aarch32-low.c.
6369 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6370 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6371 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6372 (thumb2_breakpoint_len): Likewise.
6373 (arm_is_thumb_mode): New declaration.
6374 * linux-arm-low.c: Include arch/arm-linux.h
6375 aarch/arm-get-next-pcs.h, sys/syscall.h.
6376 (get_next_pcs_ops): New struct.
6377 (get_next_pcs_addr_bits_remove): New function.
6378 (get_next_pcs_is_thumb): New function.
6379 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6380 (arm_sigreturn_next_pc): Likewise.
6381 (get_next_pcs_syscall_next_pc): Likewise.
6382 (arm_gdbserver_get_next_pcs): Likewise.
6383 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6385 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6386 * server.h: Include gdb_vecs.h.
6388 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6390 * Makefile.in (SFILES): Append common/common-regcache.c.
6391 (OBS): Append common-regcache.o.
6392 (common-regcache.o): New rule.
6393 * regcache.c (init_register_cache): Initialize cache to
6395 (regcache_raw_read_unsigned): New function.
6396 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6397 register_status enum.
6399 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6401 * linux-aarch64-low.c (the_low_targets): Rename
6402 breakpoint_reinsert_addr to get_next_pcs.
6403 * linux-arm-low.c (the_low_targets): Likewise.
6404 * linux-bfin-low.c (the_low_targets): Likewise.
6405 * linux-cris-low.c (the_low_targets): Likewise.
6406 * linux-crisv32-low.c (the_low_targets): Likewise.
6407 * linux-low.c (can_software_single_step): Likewise.
6408 (install_software_single_step_breakpoints): New function.
6409 (start_step_over): Use install_software_single_step_breakpoints.
6410 * linux-low.h: New CORE_ADDR vector.
6411 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6413 * linux-mips-low.c (the_low_targets): Likewise.
6414 * linux-nios2-low.c (the_low_targets): Likewise.
6415 * linux-sparc-low.c (the_low_targets): Likewise.
6417 2015-12-17 Pedro Alves <palves@redhat.com>
6419 * linux-low.c (linux_kill_one_lwp): Remove references to
6421 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6423 (linux_init_signals): Delete.
6424 (initialize_low): Adjust.
6425 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6427 2015-12-16 Pedro Alves <palves@redhat.com>
6429 * configure.ac (compiler warning flags): When testing a
6430 -Wno-foo option, check whether -Wfoo works instead.
6431 * configure: Regenerate.
6433 2015-12-11 Don Breazeal <donb@codesourcery.com>
6435 * server.c (process_serial_event): Don't exit from gdbserver
6436 in remote mode if there are still active inferiors.
6438 2015-12-11 Yao Qi <yao.qi@linaro.org>
6440 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6441 arm_breakpoint_at if the process is 32-bit.
6443 2015-12-11 Yao Qi <yao.qi@linaro.org>
6445 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6448 2015-12-07 Yao Qi <yao.qi@linaro.org>
6450 * configure.srv: Append arm.o to srv_tgtobj for
6451 aarch64*-*-linux* target.
6452 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6453 from linux-arm-low.c.
6454 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6455 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6456 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6457 (thumb2_breakpoint_len): Likewise.
6458 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6459 (arm_breakpoint_kinds): Likewise.
6460 (arm_breakpoint_kind_from_pc): Likewise.
6461 (arm_sw_breakpoint_from_kind): Likewise.
6462 (arm_breakpoint_kind_from_current_state): Likewise.
6463 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6464 (arm_sw_breakpoint_from_kind): Declare.
6465 (arm_breakpoint_kind_from_current_state): Declare.
6466 (arm_breakpoint_at): Declare.
6467 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6468 arm_sw_breakpoint_from_kind if process is 32-bit.
6469 (aarch64_breakpoint_kind_from_pc): New function.
6470 (aarch64_breakpoint_kind_from_current_state): New function.
6471 (the_low_target): Initialize fields breakpoint_kind_from_pc
6472 and breakpoint_kind_from_current_state.
6473 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6474 linux-aarch32-low.c.
6475 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6476 (arm_breakpoint, arm_breakpoint_len): Likewise.
6477 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6478 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6479 (arm_is_thumb_mode): Likewise.
6480 (arm_breakpoint_at): Likewise.
6481 (arm_breakpoint_kind_from_pc): Likewise.
6482 (arm_sw_breakpoint_from_kind): Likewise.
6483 (arm_breakpoint_kind_from_current_state): Likewise.
6486 2015-08-04 Yao Qi <yao.qi@linaro.org>
6488 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6489 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6490 * server.c (extended_protocol): Remove "static".
6491 * server.h (extended_protocol): Declare it.
6493 2015-12-04 Josh Stone <jistone@redhat.com>
6495 * target.h (struct target_ops) <arch_setup>: Rename to ...
6496 (struct target_ops) <post_create_inferior>: ... this.
6497 (target_arch_setup): Rename to ...
6498 (target_post_create_inferior): ... this, calling post_create_inferior.
6499 * server.c (start_inferior): Update target_arch_setup calls to
6500 target_post_create_inferior.
6501 * linux-low.c (linux_low_ptrace_options): Forward declare.
6502 (linux_arch_setup): Update its comment for general use.
6503 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6504 (struct linux_target_ops): Use linux_post_create_inferior.
6505 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6506 to post_create_inferior.
6507 * nto-low.c (struct nto_target_ops): Likewise.
6508 * spu-low.c (struct spu_target_ops): Likewise.
6509 * win32-low.c (struct win32_target_ops): Likewise.
6511 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6513 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6515 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6517 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6518 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6519 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6520 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6521 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6522 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6523 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6524 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6525 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6526 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6527 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6530 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6532 * linux-low.c (linux_look_up_symbols): Don't call
6533 linux_supports_traceclone.
6534 * linux-low.h (thread_db_init): Remove use_events argument.
6535 * thread-db.c (thread_db_use_event): Remove global variable.
6536 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6537 (struct thread_db) <td_create_bp>: Remove field.
6538 (thread_db_create_event): Remove function.
6539 (thread_db_enable_reporting): Likewise.
6540 (find_one_thread): Don't check for thread_db_use_events.
6541 (attach_thread): Likewise.
6542 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6543 (try_thread_db_load_1): Don't check for thread_db_use_events.
6544 (thread_db_init): Remove use_events argument and thread events
6546 (remove_thread_event_breakpoints): Remove function.
6547 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6549 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6551 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6553 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6554 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6555 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6556 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6557 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6559 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6561 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6562 * linux-low.c (can_hardware_single_step): Use
6563 supports_hardware_single_step.
6564 (can_software_single_step): New function.
6565 (start_step_over): Call can_software_single_step.
6566 (linux_supports_hardware_single_step): New function.
6567 (struct target_ops) <supports_software_single_step>: Initialize.
6568 * linux-low.h (struct linux_target_ops)
6569 <supports_hardware_single_step>: Initialize.
6570 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6571 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6572 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6573 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6574 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6575 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6576 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6577 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6578 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6579 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6581 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6582 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6584 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6585 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6586 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6588 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6589 * target.h (struct target_ops): <supports_software_single_step>:
6591 (target_supports_software_single_step): New macro.
6593 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6595 * linux-low.c (linux_wait_1): Fix pc advance condition.
6596 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6597 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6599 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6601 * linux-arm-low.c (arm_is_thumb_mode): New function.
6602 (arm_breakpoint_at): Use arm_is_thumb_mode.
6603 (arm_breakpoint_kind_from_current_state): New function.
6604 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6606 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6607 (linux_breakpoint_kind_from_current_state): New function.
6608 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6609 * linux-low.h (struct linux_target_ops)
6610 <breakpoint_kind_from_current_state>: New field.
6611 * target.h (struct target_ops): Likewise.
6612 (target_breakpoint_kind_from_current_state): New macro.
6614 2015-11-30 Pedro Alves <palves@redhat.com>
6616 * linux-low.c (linux_resume): Wake up the event loop before
6619 2015-11-30 Pedro Alves <palves@redhat.com>
6621 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6623 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6625 * target.c (struct thread_search): New structure.
6626 (thread_search_callback): New function.
6627 (prev_general_thread): New global.
6628 (prepare_to_access_memory, done_accessing_memory): New functions.
6629 * target.h (prepare_to_access_memory, done_accessing_memory):
6630 Replace macros with function declarations.
6632 2015-11-30 Pedro Alves <palves@redhat.com>
6635 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6636 report TARGET_WAITKIND_NO_RESUMED.
6637 * remote-utils.c (prepare_resume_reply): Handle
6638 TARGET_WAITKIND_NO_RESUMED.
6639 * server.c (report_no_resumed): New global.
6640 (handle_query) <qSupported>: Handle "no-resumed+". Report
6641 "no-resumed+" support.
6642 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6643 return error if the client doesn't support no-resumed events.
6644 (push_stop_notification): New function.
6645 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6646 events if the client supports them.
6648 2015-11-30 Pedro Alves <palves@redhat.com>
6650 * linux-low.c (thread_still_has_status_pending_p): Don't check
6652 (lwp_resumed): New function.
6653 (status_pending_p_callback): Return early if the LWP is not
6654 supposed to be resumed.
6656 2015-11-30 Pedro Alves <palves@redhat.com>
6658 * linux-low.c (handle_extended_wait): Assert that the LWP's
6659 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6660 thread create events, leave the new child's status pending.
6661 (linux_low_filter_event): If GDB wants to hear about thread exit
6662 events, leave the LWP marked dead and don't delete it.
6663 (linux_wait_for_event_filtered): Don't check for thread exit.
6664 (filter_exit_event): New function.
6665 (linux_wait_1): Use it, when returning an exit event.
6666 (linux_resume_one_lwp_throw): Assert that the LWP's
6667 waitstatus is TARGET_WAITKIND_IGNORE.
6668 * remote-utils.c (prepare_resume_reply): Handle
6669 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6670 * server.c (report_thread_events): New global.
6671 (handle_general_set): Handle QThreadEvents.
6672 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6673 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6674 TARGET_WAITKIND_THREAD_EXITED.
6675 * server.h (report_thread_events): Declare.
6677 2015-11-30 Pedro Alves <palves@redhat.com>
6679 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6680 the thread's last_resume_kind was resume_stop.
6682 2015-11-30 Pedro Alves <palves@redhat.com>
6684 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6687 2015-11-30 Pedro Alves <palves@redhat.com>
6689 * server.c (handle_v_requests): Handle vCtrlC.
6691 2015-11-30 Pedro Alves <palves@redhat.com>
6693 * gdbthread.h (find_any_thread_of_pid): Declare.
6694 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6696 * server.c (handle_query): If current_thread is NULL, look for
6697 another thread of the selected process.
6699 2015-11-26 Daniel Colascione <dancol@dancol.org>
6700 Simon Marchi <simon.marchi@ericsson.com>
6702 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6703 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6705 * target.h (struct target_ops) <thread_name>: New field.
6706 (target_thread_name): New macro.
6708 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6710 * regcache.h (regcache_invalidate_pid): Add declaration.
6711 * regcache.c (regcache_invalidate_pid): New function, extracted
6712 from regcache_invalidate.
6713 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6714 Add trivial documentation comment.
6715 * lynx-low.c: Use regcache_invalidate_pid instead of
6716 regcache_invalidate.
6718 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6720 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6721 and Elf64_auxv_t if the target is Android.
6723 2015-11-22 Doug Evans <xdje42@gmail.com>
6725 * target.h: #include <sys/types.h>.
6727 2015-11-19 Pedro Alves <palves@redhat.com>
6729 * linux-low.c (linux_process_qsupported): Change prototype.
6731 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6733 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6734 and adjust to loop over all features.
6735 * server.c (handle_query) <qSupported>: Adjust to call
6736 target_process_qsupported once, passing it a vector of unprocessed
6738 * target.h (struct target_ops) <process_qsupported>: Change
6740 (target_process_qsupported): Adjust.
6742 2015-11-19 Pedro Alves <palves@redhat.com>
6744 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6746 * configure: Regenerate.
6748 2015-11-19 Pedro Alves <palves@redhat.com>
6750 * configure: Regenerate.
6752 2015-11-19 Yao Qi <yao.qi@linaro.org>
6754 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6757 2015-11-19 Yao Qi <yao.qi@linaro.org>
6759 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6760 (struct aarch64_operand): Move enum out.
6762 2015-11-19 Yao Qi <yao.qi@linaro.org>
6764 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6765 struct user_fpsimd_state *.
6766 (aarch64_store_fpregset): Likewise.
6768 2015-11-19 Yao Qi <yao.qi@linaro.org>
6770 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6771 struct user_pt_regs *.
6772 (aarch64_store_gregset): Likewise.
6774 2015-11-18 Pedro Alves <palves@redhat.com>
6776 * Makefile.in (all_object_files): Add $IPA_OBJS.
6778 2015-11-17 Pedro Alves <palves@redhat.com>
6780 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6781 GDB_SIGNAL_0 and gdb_signal_to_string.
6783 2015-11-17 Pedro Alves <palves@redhat.com>
6785 * win32-low.c (handle_output_debug_string): Remove parameter.
6786 (win32_kill): Remove our_status local and adjust call to
6787 handle_output_debug_string.
6788 (get_child_debug_event): Adjust call to
6789 handle_output_debug_string.
6791 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6793 * linux-mips-low.c (mips_fill_gregset): Add cast.
6794 (mips_store_gregset): Likewise.
6795 (mips_fill_fpregset): Likewise.
6796 (mips_store_fpregset): Likewise.
6798 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6800 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6803 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6805 * linux-mips-low.c (mips_linux_new_thread): Change type of
6806 watch_type to enum target_hw_bp_type.
6808 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6811 Change return type to arm_hwbp_type.
6813 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6815 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6816 (arm_store_gregset): Likewise.
6817 * linux-arm-low.c (arm_get_hwcap): Likewise.
6818 (arm_read_description): Likewise.
6820 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6822 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6824 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6826 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6827 (ppc_fill_vsxregset): Likewise.
6828 (ppc_store_vsxregset): Likewise.
6829 (ppc_fill_vrregset): Likewise.
6830 (ppc_store_vrregset): Likewise.
6831 (ppc_fill_evrregset): Likewise.
6832 (ppc_store_evrregset): Likewise.
6834 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6836 * linux-ppc-low.c (ppc_usrregs_info): Remove
6837 forward-declaration.
6838 (ppc_arch_setup): Move lower in file.
6840 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6842 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6843 (ps_pdwrite): Likewise.
6845 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6847 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6848 to after assert checks.
6850 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6852 * proc-service.c (ps_pdread): Add/adjust casts.
6853 (ps_pdwrite): Add/adjust casts.
6855 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6857 * server.c (handle_search_memory_1): Cast return value of
6860 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6862 * server.c (write_qxfer_response): Change type of data to
6865 2015-10-29 Pedro Alves <palves@redhat.com>
6867 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6869 2015-10-29 Pedro Alves <palves@redhat.com>
6871 * tracepoint.c (clear_installed_tracepoints): Add casts.
6873 2015-10-29 Pedro Alves <palves@redhat.com>
6875 * server.c (handle_v_cont, process_serial_event): Add enum
6876 gdb_signal casts to signal parsing code.
6878 2015-10-29 Pedro Alves <palves@redhat.com>
6880 * linux-low.h (NULL_REGSET): Define.
6881 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6882 * linux-arm-low.c (arm_regsets): Likewise.
6883 * linux-crisv32-low.c (cris_regsets): Likewise.
6884 * linux-m68k-low.c (m68k_regsets): Likewise.
6885 * linux-mips-low.c (mips_regsets): Likewise.
6886 * linux-nios2-low.c (nios2_regsets): Likewise.
6887 * linux-ppc-low.c (ppc_regsets): Likewise.
6888 * linux-s390-low.c (s390_regsets): Likewise.
6889 * linux-sh-low.c (sh_regsets): Likewise.
6890 * linux-sparc-low.c (sparc_regsets): Likewise.
6891 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6892 * linux-tile-low.c (tile_regsets): Likewise.
6893 * linux-x86-low.c (x86_regsets): Likewise.
6894 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6896 2015-10-29 Pedro Alves <palves@redhat.com>
6898 * linux-low.h (NULL_REGSET): Define.
6899 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6900 * linux-arm-low.c (arm_regsets): Likewise.
6901 * linux-crisv32-low.c (cris_regsets): Likewise.
6902 * linux-m68k-low.c (m68k_regsets): Likewise.
6903 * linux-mips-low.c (mips_regsets): Likewise.
6904 * linux-nios2-low.c (nios2_regsets): Likewise.
6905 * linux-ppc-low.c (ppc_regsets): Likewise.
6906 * linux-s390-low.c (s390_regsets): Likewise.
6907 * linux-sh-low.c (sh_regsets): Likewise.
6908 * linux-sparc-low.c (sparc_regsets): Likewise.
6909 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6910 * linux-tile-low.c (tile_regsets): Likewise.
6911 * linux-x86-low.c (x86_regsets): Likewise.
6912 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6914 2015-10-26 Doug Evans <dje@google.com>
6916 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6918 2015-10-26 Doug Evans <dje@google.com>
6920 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6922 2015-10-26 Doug Evans <dje@google.com>
6924 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6926 (attach_thread, find_new_threads_callback): Ditto.
6928 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6930 * mem-break.h (set_breakpoint_data): Remove.
6932 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6934 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6935 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6936 (initialize_low): Remove set_breakpoint_data call.
6937 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6938 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6939 (initialize_low): Remove set_breakpoint_data call.
6940 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6941 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6942 (initialize_low): Remove set_breakpoint_data call.
6944 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6946 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6947 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6948 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6949 * target.h (target_breakpoint_kind_from_pc): New macro.
6951 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6953 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6954 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6955 the default breakpoint kind.
6957 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6959 * linux-arm-low.c (arm_supports_z_point_type): Add software
6962 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6964 * linux-arm-low.c: Refactor breakpoint definitions.
6965 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6966 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6968 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6970 * Makefile.in: Add arm.c/o.
6971 * configure.srv: Likewise.
6972 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6973 (arm_breakpoint_kind_from_pc): New function.
6974 (arm_sw_breakpoint_from_kind): Return proper kind.
6975 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6977 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6979 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6981 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6982 (struct raw_breakpoint) <size>: Remove.
6983 (struct raw_breakpoint) <kind>: Add.
6984 (bp_size): New function.
6985 (bp_opcode): Likewise.
6986 (find_raw_breakpoint_at): Adjust for kind.
6987 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6988 (remove_memory_breakpoint): Adjust for kind call bp_size.
6989 (set_raw_breakpoint_at): Adjust for kind.
6990 (set_breakpoint): Likewise.
6991 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6992 (delete_raw_breakpoint): Adjust for kind.
6993 (delete_breakpoint): Likewise.
6994 (find_gdb_breakpoint): Likewise.
6995 (set_gdb_breakpoint_1): Likewise.
6996 (set_gdb_breakpoint): Likewise.
6997 (delete_gdb_breakpoint_1): Likewise.
6998 (delete_gdb_breakpoint): Likewise.
6999 (uninsert_raw_breakpoint): Likewise.
7000 (reinsert_raw_breakpoint): Likewise.
7001 (set_breakpoint_data): Remove.
7002 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7003 (check_mem_read): Adjust for kind call bp_size.
7004 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7005 (clone_one_breakpoint): Adjust for kind.
7006 * mem-break.h (set_gdb_breakpoint): Likewise.
7007 (delete_gdb_breakpoint): Likewise.
7008 * server.c (process_serial_event): Likewise.
7010 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7012 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7013 (struct linux_target_ops) <breakpoint>: Remove.
7014 (struct linux_target_ops) <breakpoint_len>: Remove.
7015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7016 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7017 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7018 (arm_sw_breakpoint_from_kind): New function.
7019 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7020 (struct linux_target_ops) <breakpoint>: Remove.
7021 (struct linux_target_ops) <breakpoint_len>: Remove.
7022 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7023 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7024 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7025 (struct linux_target_ops) <breakpoint>: Remove.
7026 (struct linux_target_ops) <breakpoint_len>: Remove.
7027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7029 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7030 (struct linux_target_ops) <breakpoint>: Remove.
7031 (struct linux_target_ops) <breakpoint_len>: Remove.
7032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7034 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7035 and sw_breakpoint_from_kind to increment the pc.
7036 (linux_breakpoint_kind_from_pc): New function.
7037 (linux_sw_breakpoint_from_kind): New function.
7038 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7039 (initialize_low): Call breakpoint_kind_from_pc and
7040 sw_breakpoint_from_kind to replace breakpoint_data/len.
7041 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7044 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7045 (struct linux_target_ops) <breakpoint>: Remove.
7046 (struct linux_target_ops) <breakpoint_len>: Remove.
7047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7049 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7050 (struct linux_target_ops) <breakpoint>: Remove.
7051 (struct linux_target_ops) <breakpoint_len>: Remove.
7052 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7053 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7054 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7055 (struct linux_target_ops) <breakpoint>: Remove.
7056 (struct linux_target_ops) <breakpoint_len>: Remove.
7057 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7059 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7060 (struct linux_target_ops) <breakpoint>: Remove.
7061 (struct linux_target_ops) <breakpoint_len>: Remove.
7062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7064 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7065 (struct linux_target_ops) <breakpoint>: Remove.
7066 (struct linux_target_ops) <breakpoint_len>: Remove.
7067 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7068 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7069 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7070 (struct linux_target_ops) <breakpoint>: Remove.
7071 (struct linux_target_ops) <breakpoint_len>: Remove.
7072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7074 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7075 (struct linux_target_ops) <breakpoint>: Remove.
7076 (struct linux_target_ops) <breakpoint_len>: Remove.
7077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7079 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7080 (struct linux_target_ops) <breakpoint>: Remove.
7081 (struct linux_target_ops) <breakpoint_len>: Remove.
7082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7084 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7085 (struct linux_target_ops) <breakpoint>: Remove.
7086 (struct linux_target_ops) <breakpoint_len>: Remove.
7087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7089 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7090 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7091 (struct linux_target_ops) <breakpoint>: Remove.
7092 (struct linux_target_ops) <breakpoint_len>: Remove.
7093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7095 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7096 (struct linux_target_ops) <breakpoint>: Remove.
7097 (struct linux_target_ops) <breakpoint_len>: Remove.
7098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7101 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7103 * linux-cris-low.c (cris_get_pc): Remove void arg.
7105 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7107 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7110 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7112 * inferiors.c (thread_pid_matches_callback): New function.
7113 (find_thread_process): New function.
7114 (remove_thread): Reset current_thread.
7115 (remove_process): Assert threads have been removed first.
7117 2015-10-15 Yao Qi <yao.qi@linaro.org>
7119 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7121 (aarch64_remove_point): Likewise.
7122 * regcache.c (regcache_register_size): New function.
7124 2015-10-12 Yao Qi <yao.qi@linaro.org>
7126 * linux-aarch64-low.c: Update all callers as emit_load_store
7127 is renamed to aarch64_emit_load_store.
7129 2015-10-12 Yao Qi <yao.qi@linaro.org>
7131 * linux-aarch64-low.c: Update all callers of function renaming
7132 from emit_insn to aarch64_emit_insn.
7134 2015-10-12 Yao Qi <yao.qi@linaro.org>
7136 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7137 arch/aarch64-insn.h.
7138 (struct aarch64_memory_operand): Likewise.
7140 (emit_insn): Move to arch/aarch64-insn.c.
7141 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7142 (emit_load_store): Move to arch/aarch64-insn.c.
7143 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7144 (can_encode_int32): Remove.
7146 2015-10-12 Yao Qi <yao.qi@linaro.org>
7148 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7149 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7150 (aarch64_relocate_instruction): Likewise.
7151 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7152 (struct aarch64_insn_visitor): Likewise.
7154 2015-10-12 Yao Qi <yao.qi@linaro.org>
7156 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7157 (struct aarch64_insn_visitor): New.
7158 (struct aarch64_insn_relocation_data): New.
7159 (aarch64_ftrace_insn_reloc_b): New function.
7160 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7161 (aarch64_ftrace_insn_reloc_cb): Likewise.
7162 (aarch64_ftrace_insn_reloc_tb): Likewise.
7163 (aarch64_ftrace_insn_reloc_adr): Likewise.
7164 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7165 (aarch64_ftrace_insn_reloc_others): Likewise.
7167 (aarch64_relocate_instruction): Use visitor.
7169 2015-10-12 Yao Qi <yao.qi@linaro.org>
7171 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7172 int. Add argument buf.
7173 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7174 aarch64_relocate_instruction.
7176 2015-10-12 Yao Qi <yao.qi@linaro.org>
7178 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7179 argument insn. Remove local variable insn. Don't call
7181 (aarch64_install_fast_tracepoint_jump_pad): Call
7184 2015-09-30 Yao Qi <yao.qi@linaro.org>
7186 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7187 (emit_load_store_pair): Likewise.
7189 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7191 * dll.c (match_dll): Add cast(s).
7192 (unloaded_dll): Likewise.
7193 * linux-low.c (second_thread_of_pid_p): Likewise.
7194 (delete_lwp_callback): Likewise.
7195 (count_events_callback): Likewise.
7196 (select_event_lwp_callback): Likewise.
7197 (linux_set_resume_request): Likewise.
7198 * server.c (accumulate_file_name_length): Likewise.
7199 (emit_dll_description): Likewise.
7200 (handle_qxfer_threads_worker): Likewise.
7201 (visit_actioned_threads): Likewise.
7202 * thread-db.c (any_thread_of): Likewise.
7203 * tracepoint.c (same_process_p): Likewise.
7204 (match_blocktype): Likewise.
7205 (build_traceframe_info_xml): Likewise.
7207 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7209 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7211 (gdb_unparse_agent_expr): Likewise.
7212 * hostio.c (require_data): Likewise.
7213 (handle_pread): Likewise.
7214 * linux-low.c (disable_regset): Likewise.
7215 (fetch_register): Likewise.
7216 (store_register): Likewise.
7217 (get_dynamic): Likewise.
7218 (linux_qxfer_libraries_svr4): Likewise.
7219 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7220 (set_fast_tracepoint_jump): Likewise.
7221 (uninsert_fast_tracepoint_jumps_at): Likewise.
7222 (reinsert_fast_tracepoint_jumps_at): Likewise.
7223 (validate_inserted_breakpoint): Likewise.
7224 (clone_agent_expr): Likewise.
7225 * regcache.c (init_register_cache): Likewise.
7226 * remote-utils.c (putpkt_binary_1): Likewise.
7227 (decode_M_packet): Likewise.
7228 (decode_X_packet): Likewise.
7229 (look_up_one_symbol): Likewise.
7230 (relocate_instruction): Likewise.
7231 (monitor_output): Likewise.
7232 * server.c (handle_search_memory): Likewise.
7233 (handle_qxfer_exec_file): Likewise.
7234 (handle_qxfer_libraries): Likewise.
7235 (handle_qxfer): Likewise.
7236 (handle_query): Likewise.
7237 (handle_v_cont): Likewise.
7238 (handle_v_run): Likewise.
7239 (captured_main): Likewise.
7240 * target.c (write_inferior_memory): Likewise.
7241 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7242 * tracepoint.c (init_trace_buffer): Likewise.
7243 (add_tracepoint_action): Likewise.
7244 (add_traceframe): Likewise.
7245 (add_traceframe_block): Likewise.
7246 (cmd_qtdpsrc): Likewise.
7247 (cmd_qtdv): Likewise.
7248 (cmd_qtstatus): Likewise.
7249 (response_source): Likewise.
7250 (response_tsv): Likewise.
7251 (cmd_qtnotes): Likewise.
7252 (gdb_collect): Likewise.
7253 (initialize_tracepoint): Likewise.
7255 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7257 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7258 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7259 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7261 (enum aarch64_condition_codes): New enum.
7262 (w0): New static global.
7265 (struct aarch64_memory_operand) <type>: New
7266 MEMORY_OPERAND_POSTINDEX type.
7267 (postindex_memory_operand): New helper function.
7268 (emit_ret): New function.
7269 (emit_load_store_pair): New function, factored out of emit_stp
7270 with support for MEMORY_OPERAND_POSTINDEX.
7271 (emit_stp): Rewrite using emit_load_store_pair.
7272 (emit_ldp): New function.
7273 (emit_load_store): Likewise.
7274 (emit_ldr): Mention post-index instruction in comment.
7275 (emit_ldrh): New function.
7276 (emit_ldrb): New function.
7277 (emit_ldrsw): Mention post-index instruction in comment.
7278 (emit_str): Likewise.
7279 (emit_subs): New function.
7280 (emit_cmp): Likewise.
7281 (emit_and): Likewise.
7282 (emit_orr): Likewise.
7283 (emit_orn): Likewise.
7284 (emit_eor): Likewise.
7285 (emit_mvn): Likewise.
7286 (emit_lslv): Likewise.
7287 (emit_lsrv): Likewise.
7288 (emit_asrv): Likewise.
7289 (emit_mul): Likewise.
7290 (emit_sbfm): Likewise.
7291 (emit_sbfx): Likewise.
7292 (emit_ubfm): Likewise.
7293 (emit_ubfx): Likewise.
7294 (emit_csinc): Likewise.
7295 (emit_cset): Likewise.
7296 (emit_nop): Likewise.
7297 (emit_ops_insns): New helper function.
7298 (emit_pop): Likewise.
7299 (emit_push): Likewise.
7300 (aarch64_emit_prologue): New function.
7301 (aarch64_emit_epilogue): Likewise.
7302 (aarch64_emit_add): Likewise.
7303 (aarch64_emit_sub): Likewise.
7304 (aarch64_emit_mul): Likewise.
7305 (aarch64_emit_lsh): Likewise.
7306 (aarch64_emit_rsh_signed): Likewise.
7307 (aarch64_emit_rsh_unsigned): Likewise.
7308 (aarch64_emit_ext): Likewise.
7309 (aarch64_emit_log_not): Likewise.
7310 (aarch64_emit_bit_and): Likewise.
7311 (aarch64_emit_bit_or): Likewise.
7312 (aarch64_emit_bit_xor): Likewise.
7313 (aarch64_emit_bit_not): Likewise.
7314 (aarch64_emit_equal): Likewise.
7315 (aarch64_emit_less_signed): Likewise.
7316 (aarch64_emit_less_unsigned): Likewise.
7317 (aarch64_emit_ref): Likewise.
7318 (aarch64_emit_if_goto): Likewise.
7319 (aarch64_emit_goto): Likewise.
7320 (aarch64_write_goto_address): Likewise.
7321 (aarch64_emit_const): Likewise.
7322 (aarch64_emit_call): Likewise.
7323 (aarch64_emit_reg): Likewise.
7324 (aarch64_emit_pop): Likewise.
7325 (aarch64_emit_stack_flush): Likewise.
7326 (aarch64_emit_zero_ext): Likewise.
7327 (aarch64_emit_swap): Likewise.
7328 (aarch64_emit_stack_adjust): Likewise.
7329 (aarch64_emit_int_call_1): Likewise.
7330 (aarch64_emit_void_call_2): Likewise.
7331 (aarch64_emit_eq_goto): Likewise.
7332 (aarch64_emit_ne_goto): Likewise.
7333 (aarch64_emit_lt_goto): Likewise.
7334 (aarch64_emit_le_goto): Likewise.
7335 (aarch64_emit_gt_goto): Likewise.
7336 (aarch64_emit_ge_got): Likewise.
7337 (aarch64_emit_ops_impl): New static global variable.
7338 (aarch64_emit_ops): New target function, return
7339 &aarch64_emit_ops_impl.
7340 (struct linux_target_ops): Install it.
7342 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7344 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7345 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7347 * linux-aarch64-ipa.c: New file.
7348 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7350 (aarch64_get_thread_area): New target method.
7351 (extract_signed_bitfield): New helper function.
7352 (aarch64_decode_ldr_literal): New function.
7353 (enum aarch64_opcodes): New enum.
7354 (struct aarch64_register): New struct.
7355 (struct aarch64_operand): New struct.
7356 (x0): New static global.
7365 (aarch64_register): New helper function.
7366 (register_operand): Likewise.
7367 (immediate_operand): Likewise.
7368 (struct aarch64_memory_operand): New struct.
7369 (offset_memory_operand): New helper function.
7370 (preindex_memory_operand): Likewise.
7371 (enum aarch64_system_control_registers): New enum.
7372 (ENCODE): New macro.
7373 (emit_insn): New helper function.
7374 (emit_b): New function.
7375 (emit_bcond): Likewise.
7376 (emit_cb): Likewise.
7377 (emit_tb): Likewise.
7378 (emit_blr): Likewise.
7379 (emit_stp): Likewise.
7380 (emit_ldp_q_offset): Likewise.
7381 (emit_stp_q_offset): Likewise.
7382 (emit_load_store): Likewise.
7383 (emit_ldr): Likewise.
7384 (emit_ldrsw): Likewise.
7385 (emit_str): Likewise.
7386 (emit_ldaxr): Likewise.
7387 (emit_stxr): Likewise.
7388 (emit_stlr): Likewise.
7389 (emit_data_processing_reg): Likewise.
7390 (emit_data_processing): Likewise.
7391 (emit_add): Likewise.
7392 (emit_sub): Likewise.
7393 (emit_mov): Likewise.
7394 (emit_movk): Likewise.
7395 (emit_mov_addr): Likewise.
7396 (emit_mrs): Likewise.
7397 (emit_msr): Likewise.
7398 (emit_sevl): Likewise.
7399 (emit_wfe): Likewise.
7400 (append_insns): Likewise.
7401 (can_encode_int32_in): New helper function.
7402 (aarch64_relocate_instruction): New function.
7403 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7404 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7405 (struct linux_target_ops): Install aarch64_get_thread_area,
7406 aarch64_install_fast_tracepoint_jump_pad and
7407 aarch64_get_min_fast_tracepoint_insn_len.
7409 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7411 * Makefile.in (aarch64-insn.o): New rule.
7412 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7414 2015-09-21 Yao Qi <yao.qi@linaro.org>
7416 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7418 2015-09-21 Yao Qi <yao.qi@linaro.org>
7420 * tracepoint.c (max_jump_pad_size): Remove.
7422 2015-09-18 Yao Qi <yao.qi@linaro.org>
7424 * linux-aarch64-low.c: Don't include sys/uio.h.
7425 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7427 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7429 * tracepoint.c (eval_result_type): Change prototype.
7430 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7432 2015-09-15 Pedro Alves <palves@redhat.com>
7434 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7435 Check whether to report exec events instead of checking whether
7436 multiprocess is enabled.
7438 2015-09-15 Pedro Alves <palves@redhat.com>
7441 * remote-utils.c (prepare_resume_reply): Merge
7442 TARGET_WAITKIND_VFORK_DONE switch case with the
7443 TARGET_WAITKIND_FORKED case.
7445 2015-09-15 Yao Qi <yao.qi@linaro.org>
7447 * server.c (handle_query): Check string comparison using
7448 "else if" instead of "if".
7450 2015-09-15 Yao Qi <yao.qi@linaro.org>
7452 * server.c (vCont_supported): New global variable.
7453 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7454 matches. Append ";vContSupported+" to own_buf.
7455 (handle_v_requests): Append ";s;S" to own_buf if target supports
7456 hardware single step or vCont_supported is false.
7457 (capture_main): Set vCont_supported to zero.
7459 2015-09-15 Yao Qi <yao.qi@linaro.org>
7461 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7463 (linux_supports_hardware_single_step): ... New function.
7464 (linux_target_ops): Update.
7465 * lynx-low.c (lynx_target_ops): Set field
7466 supports_hardware_single_step to target_can_do_hardware_single_step.
7467 * nto-low.c (nto_target_ops): Likewise.
7468 * spu-low.c (spu_target_ops): Likewise.
7469 * win32-low.c (win32_target_ops): Likewise.
7470 * target.c (target_can_do_hardware_single_step): New function.
7471 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7472 Remove. <supports_hardware_single_step>: New field.
7473 (target_supports_conditional_breakpoints): Remove.
7474 (target_supports_hardware_single_step): New macro.
7475 (target_can_do_hardware_single_step): Declare.
7476 * server.c (handle_query): Use target_supports_hardware_single_step
7477 instead of target_supports_conditional_breakpoints.
7479 2015-09-15 Yao Qi <yao.qi@linaro.org>
7481 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7483 (struct linux_target_ops the_low_target): Install
7484 aarch64_linux_siginfo_fixup.
7486 2015-09-11 Don Breazeal <donb@codesourcery.com>
7487 Luis Machado <lgustavo@codesourcery.com>
7489 * linux-low.c (linux_mourn): Static declaration.
7490 (linux_arch_setup): Move in front of
7491 handle_extended_wait.
7492 (linux_arch_setup_thread): New function.
7493 (handle_extended_wait): Handle exec events. Call
7494 linux_arch_setup_thread. Make event_lwp argument a
7495 pointer-to-a-pointer.
7496 (check_zombie_leaders): Do not check stopped threads.
7497 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7498 (linux_low_filter_event): Add lwp and thread for exec'ing
7499 non-leader thread if leader thread has been deleted.
7500 Refactor code into linux_arch_setup_thread and call it.
7501 Pass child lwp pointer by reference to handle_extended_wait.
7502 (linux_wait_for_event_filtered): Update comment.
7503 (linux_wait_1): Prevent clobbering exec event status.
7504 (linux_supports_exec_events): New function.
7505 (linux_target_ops) <supports_exec_events>: Initialize new member.
7506 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7508 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7509 * server.c (report_exec_events): New global variable.
7510 (handle_query): Handle qSupported query for exec-events feature.
7511 (captured_main): Initialize report_exec_events.
7512 * server.h (report_exec_events): Declare new global variable.
7513 * target.h (struct target_ops) <supports_exec_events>: New
7515 (target_supports_exec_events): New macro.
7516 * win32-low.c (win32_target_ops) <supports_exec_events>:
7517 Initialize new member.
7519 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7521 * linux-low.c (linux_low_enable_btrace): Remove.
7522 (linux_target_ops): Replace linux_low_enable_btrace with
7523 linux_enable_btrace.
7525 2015-09-03 Yao Qi <yao.qi@linaro.org>
7527 * linux-aarch64-low.c (aarch64_insert_point): Call
7528 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7531 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7533 * linux-low.c (check_stopped_by_breakpoint): Use
7534 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7536 2015-08-27 Pedro Alves <palves@redhat.com>
7538 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7540 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7542 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7543 the XNEW-family equivalent.
7544 (compile_bytecodes): Likewise.
7545 * dll.c (loaded_dll): Likewise.
7546 * event-loop.c (append_callback_event): Likewise.
7547 (create_file_handler): Likewise.
7548 (create_file_event): Likewise.
7549 * hostio.c (handle_open): Likewise.
7550 * inferiors.c (add_thread): Likewise.
7551 (add_process): Likewise.
7552 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7553 * linux-arm-low.c (arm_new_process): Likewise.
7554 (arm_new_thread): Likewise.
7555 * linux-low.c (add_to_pid_list): Likewise.
7556 (linux_add_process): Likewise.
7557 (handle_extended_wait): Likewise.
7558 (add_lwp): Likewise.
7559 (enqueue_one_deferred_signal): Likewise.
7560 (enqueue_pending_signal): Likewise.
7561 (linux_resume_one_lwp_throw): Likewise.
7562 (linux_resume_one_thread): Likewise.
7563 (linux_read_memory): Likewise.
7564 (linux_write_memory): Likewise.
7565 * linux-mips-low.c (mips_linux_new_process): Likewise.
7566 (mips_linux_new_thread): Likewise.
7567 (mips_add_watchpoint): Likewise.
7568 * linux-x86-low.c (initialize_low_arch): Likewise.
7569 * lynx-low.c (lynx_add_process): Likewise.
7570 * mem-break.c (set_raw_breakpoint_at): Likewise.
7571 (set_breakpoint): Likewise.
7572 (add_condition_to_breakpoint): Likewise.
7573 (add_commands_to_breakpoint): Likewise.
7574 (clone_agent_expr): Likewise.
7575 (clone_one_breakpoint): Likewise.
7576 * regcache.c (new_register_cache): Likewise.
7577 * remote-utils.c (look_up_one_symbol): Likewise.
7578 * server.c (queue_stop_reply): Likewise.
7579 (start_inferior): Likewise.
7580 (queue_stop_reply_callback): Likewise.
7581 (handle_target_event): Likewise.
7582 * spu-low.c (fetch_ppc_memory): Likewise.
7583 (store_ppc_memory): Likewise.
7584 * target.c (set_target_ops): Likewise.
7585 * thread-db.c (thread_db_load_search): Likewise.
7586 (try_thread_db_load_1): Likewise.
7587 * tracepoint.c (add_tracepoint): Likewise.
7588 (add_tracepoint_action): Likewise.
7589 (create_trace_state_variable): Likewise.
7590 (cmd_qtdpsrc): Likewise.
7591 (cmd_qtro): Likewise.
7592 (add_while_stepping_state): Likewise.
7593 * win32-low.c (child_add_thread): Likewise.
7594 (get_image_name): Likewise.
7596 2015-08-25 Yao Qi <yao.qi@linaro.org>
7598 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7600 2015-08-25 Yao Qi <yao.qi@linaro.org>
7602 * Makefile.in (aarch64-linux.o): New rule.
7603 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7605 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7606 (aarch64_init_debug_reg_state): Make it extern.
7607 (aarch64_linux_prepare_to_resume): Remove.
7609 2015-08-25 Yao Qi <yao.qi@linaro.org>
7611 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7612 lwp_arch_private_info and ptid_of_lwp.
7614 2015-08-25 Yao Qi <yao.qi@linaro.org>
7616 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7617 Find proc_info by find_process_pid. All callers updated.
7619 2015-08-25 Yao Qi <yao.qi@linaro.org>
7621 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7623 (debug_reg_change_callback): Remove.
7624 (aarch64_notify_debug_reg_change): Remove.
7626 2015-08-25 Yao Qi <yao.qi@linaro.org>
7628 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7629 Call current_lwp_ptid.
7631 2015-08-25 Yao Qi <yao.qi@linaro.org>
7633 * linux-aarch64-low.c (debug_reg_change_callback): Use
7636 2015-08-25 Yao Qi <yao.qi@linaro.org>
7638 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7640 2015-08-25 Yao Qi <yao.qi@linaro.org>
7642 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7644 2015-08-25 Yao Qi <yao.qi@linaro.org>
7646 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7649 2015-08-25 Yao Qi <yao.qi@linaro.org>
7651 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7653 (debug_reg_change_callback): Remove argument entry and add argument
7654 lwp. Remove local variable thread. Don't print thread id in the
7655 debugging output. Don't check whether pid of thread equals to pid.
7656 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7657 iterate_over_lwps instead find_inferior.
7659 2015-08-24 Pedro Alves <palves@redhat.com>
7661 * inferiors.c (get_first_process): New function.
7662 * inferiors.h (get_first_process): New declaration.
7663 * remote-utils.c (read_ptid): Default to the first process in the
7664 list, instead of to the current thread's process.
7666 2015-08-24 Pedro Alves <palves@redhat.com>
7668 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7669 * event-loop.c: Likewise.
7670 * remote-utils.c: Likewise.
7671 * tracepoint.c: Likewise.
7673 2015-08-24 Pedro Alves <palves@redhat.com>
7675 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7678 2015-08-21 Pedro Alves <palves@redhat.com>
7680 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7681 instead of literal 1.
7683 2015-08-21 Pedro Alves <palves@redhat.com>
7685 * tdesc.c (default_description): Explicitly zero-initialize.
7687 2015-08-21 Pedro Alves <palves@redhat.com>
7690 * inferiors.c (remove_thread): Discard any pending stop reply for
7692 * server.c (remove_all_on_match_pid): Rename to ...
7693 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7695 (discard_queued_stop_replies): Change parameter to a ptid. Now
7697 (handle_v_kill, kill_inferior_callback, captured_main)
7698 (process_serial_event): Adjust.
7699 * server.h (discard_queued_stop_replies): Declare.
7701 2015-08-21 Pedro Alves <palves@redhat.com>
7703 * linux-low.c (wait_for_sigstop): Always switch to no thread
7704 selected if the previously current thread dies.
7705 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7706 process instead of the current thread's.
7707 * remote-utils.c (input_interrupt): Don't check if there's no
7709 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7710 current thread to the general thread fails, error out.
7711 (handle_qxfer_auxv, handle_qxfer_libraries)
7712 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7713 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7714 (handle_query): Check if there's a thread selected instead of
7715 checking whether there's any thread in the thread list.
7716 (handle_qxfer_threads, handle_qxfer_btrace)
7717 (handle_qxfer_btrace_conf): Don't error out early if there's no
7718 thread in the thread list.
7719 (handle_v_cont, myresume): Don't set the current thread to the
7721 (process_serial_event) <Hg handling>: Also set thread_id if the
7722 previous general thread is still alive.
7723 (process_serial_event) <g/G handling>: If setting the current
7724 thread to the general thread fails, error out.
7725 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7726 thread's lwp instead of the current thread's.
7727 * target.c (set_desired_thread): If the desired thread was not
7728 found, leave the current thread pointing to NULL. Return an int
7729 (boolean) indicating success.
7730 * target.h (set_desired_thread): Change return type to int.
7732 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7734 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7735 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7737 (ps_get_thread_area): New function.
7739 2015-08-19 Gary Benson <gbenson@redhat.com>
7741 * hostio.c (handle_pread): Do not attempt to read more data
7742 than hostio_reply_with_data can fit in a packet.
7744 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7746 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7748 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7750 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7752 2015-08-06 Pedro Alves <palves@redhat.com>
7754 * tracepoint.c (expr_eval_result): Now an int.
7756 2015-08-06 Pedro Alves <palves@redhat.com>
7758 * gdbthread.h (struct regcache): Forward declare.
7759 (struct thread_info) <regcache_data>: Now a struct regcache
7761 * inferiors.c (inferior_regcache_data)
7762 (set_inferior_regcache_data): Now work with struct regcache
7764 * inferiors.h (struct regcache): Forward declare.
7765 (inferior_regcache_data, set_inferior_regcache_data): Now work
7766 with struct regcache pointers.
7767 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7768 (free_register_cache_thread): Remove struct regcache pointer
7771 2015-08-06 Pedro Alves <palves@redhat.com>
7773 * server.c (captured_main): On error, print the exception message
7774 to stderr, and if run_once is set, throw a quit.
7776 2015-08-06 Pedro Alves <palves@redhat.com>
7778 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7781 2015-08-06 Pedro Alves <palves@redhat.com>
7783 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7784 reading beyond the passed in buffer length.
7786 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7788 * tracepoint.c (symbol_list) <required>: Remove.
7790 2015-08-06 Pedro Alves <palves@redhat.com>
7792 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7793 count if stopping and suspending threads.
7794 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7795 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7796 (linux_detach): Complete an ongoing step-over.
7797 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7799 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7800 (linux_wait_1): If passing a signal to the inferior after
7801 finishing a step-over, unsuspend and re-resume all lwps. If we
7802 see a single-step event but the thread should be continuing, don't
7803 pass the trap to gdb.
7804 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7805 internal_error instead of gdb_assert.
7806 (enqueue_pending_signal): New function.
7807 (check_ptrace_stopped_lwp_gone): Add debug output.
7808 (start_step_over): Use internal_error instead of gdb_assert.
7809 (complete_ongoing_step_over): New function.
7810 (linux_resume_one_thread): Don't resume a suspended thread.
7811 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7814 2015-08-06 Pedro Alves <palves@redhat.com>
7816 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7817 (linux_thread_alive): Use lwp_is_marked_dead.
7818 (extended_event_reported): Delete.
7819 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7820 instead of extended_event_reported.
7821 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7823 (lwp_is_marked_dead): New function.
7824 (lwp_running): Use lwp_is_marked_dead.
7825 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7828 2015-08-06 Pedro Alves <palves@redhat.com>
7830 * linux-low.c (linux_wait_1): Move fork event output out of the
7831 !report_to_gdb check. Pass event_child->waitstatus to
7832 target_waitstatus_to_string instead of ourstatus.
7834 2015-08-04 Yao Qi <yao.qi@linaro.org>
7836 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7837 if current_thread is 32 bit.
7839 2015-08-04 Yao Qi <yao.qi@linaro.org>
7841 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7842 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7843 * server.c (extended_protocol): Remove "static".
7844 * server.h (extended_protocol): Declare it.
7846 2015-08-04 Yao Qi <yao.qi@linaro.org>
7848 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7849 both aarch64 and aarch32.
7850 (aarch64_set_pc): Likewise.
7852 2015-08-04 Yao Qi <yao.qi@linaro.org>
7854 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7855 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7856 arm-with-neon.xml to srv_xmlfiles.
7857 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7858 (is_64bit_tdesc): New function.
7859 (aarch64_linux_read_description): New function.
7860 (aarch64_arch_setup): Call aarch64_linux_read_description.
7861 (regs_info): Rename to regs_info_aarch64.
7862 (aarch64_regs_info): Return right regs_info.
7863 (initialize_low_arch): Call initialize_low_arch_aarch32.
7865 2015-08-04 Yao Qi <yao.qi@linaro.org>
7867 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7868 * linux-aarch32-low.c: New file.
7869 * linux-aarch32-low.h: New file.
7870 * linux-arm-low.c (arm_fill_gregset): Move it to
7871 linux-aarch32-low.c.
7872 (arm_store_gregset): Likewise.
7873 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7874 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7875 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7876 (regs_info): Rename to regs_info_arm.
7877 (arm_regs_info): Return regs_info_aarch32 if
7878 have_ptrace_getregset is 1 and target description is
7879 arm_with_neon or arm_with_vfpv3.
7880 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7881 Call initialize_low_arch_aarch32 instead.
7883 2015-08-04 Yao Qi <yao.qi@linaro.org>
7885 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7886 * linux-low.c: ... here.
7887 * linux-low.h (have_ptrace_getregset): Declare it.
7889 2015-08-04 Pedro Alves <palves@redhat.com>
7891 * thread-db.c (struct thread_db): Use new typedefs.
7892 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7894 (disable_thread_event_reporting): Cast result of dlsym to
7895 destination function pointer type.
7896 (thread_db_mourn): Use td_ta_delete_ftype.
7898 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7900 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7902 (CDX_BREAKPOINT): Define for R2.
7903 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7904 (the_low_target): Add comments.
7906 2015-07-30 Yao Qi <yao.qi@linaro.org>
7908 * linux-arm-low.c (arm_hwcap): Remove it.
7909 (arm_read_description): New local variable arm_hwcap. Don't
7910 set arm_hwcap to zero.
7912 2015-07-30 Yao Qi <yao.qi@linaro.org>
7914 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7915 Use regcache->tdesc instead.
7916 (arm_store_wmmxregset): Likewise.
7917 (arm_fill_vfpregset): Likewise.
7918 (arm_store_vfpregset): Likewise.
7920 2015-07-30 Yao Qi <yao.qi@linaro.org>
7922 * linux-arm-low.c: Include arch/arm.h.
7923 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7924 (arm_store_gregset): Likewise.
7926 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7928 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7929 ptrace's 4th parameter.
7931 2015-07-27 Yao Qi <yao.qi@linaro.org>
7933 * configure.srv (case aarch64*-*-linux*): Don't set
7936 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7938 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7940 * linux-arm-low.c: Likewise.
7941 * linux-cris-low.c: Likewise.
7942 * linux-crisv32-low.c: Likewise.
7943 * linux-low.c: Likewise.
7944 * linux-m68k-low.c: Likewise.
7945 * linux-mips-low.c: Likewise.
7946 * linux-nios2-low.c: Likewise.
7947 * linux-s390-low.c: Likewise.
7948 * linux-sparc-low.c: Likewise.
7949 * linux-tic6x-low.c: Likewise.
7950 * linux-tile-low.c: Likewise.
7951 * linux-x86-low.c: Likewise.
7953 2015-07-24 Pedro Alves <palves@redhat.com>
7955 * config.in: Regenerate.
7956 * configure: Regenerate.
7958 2015-07-24 Pedro Alves <palves@redhat.com>
7960 * acinclude.m4: Include ../ptrace.m4.
7961 * configure.ac: Call GDB_AC_PTRACE.
7962 * config.in, configure: Regenerate.
7964 2015-07-24 Yao Qi <yao.qi@linaro.org>
7966 * linux-low.c (linux_create_inferior): Remove setting to
7967 proc->priv->new_inferior.
7968 (linux_attach): Likewise.
7969 (linux_low_filter_event): Likewise.
7970 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7972 2015-07-24 Yao Qi <yao.qi@linaro.org>
7974 * linux-low.c (linux_arch_setup): New function.
7975 (linux_low_filter_event): If proc->tdesc is NULL and
7976 proc->attached is true, call the_low_target.arch_setup.
7977 Otherwise, keep status pending, and return.
7978 (linux_resume_one_lwp_throw): Don't call get_pc if
7979 thread->while_stepping isn't NULL. Don't call
7980 get_thread_regcache if proc->tdesc is NULL.
7981 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7982 (linux_target_ops): Install arch_setup.
7983 * server.c (start_inferior): Call the_target->arch_setup.
7984 * target.h (struct target_ops) <arch_setup>: New field.
7985 (target_arch_setup): New marco.
7986 * lynx-low.c (lynx_target_ops): Update.
7987 * nto-low.c (nto_target_ops): Update.
7988 * spu-low.c (spu_target_ops): Update.
7989 * win32-low.c (win32_target_ops): Update.
7991 2015-07-24 Yao Qi <yao.qi@linaro.org>
7993 * linux-low.c (linux_add_process): Don't set
7994 proc->priv->new_inferior.
7995 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7996 (linux_attach): Likewise.
7998 2015-07-24 Yao Qi <yao.qi@linaro.org>
8000 * server.c (start_inferior): Code refactor.
8002 2015-07-24 Yao Qi <yao.qi@linaro.org>
8004 * server.c (process_serial_event): Set general_thread.
8006 2015-07-21 Yao Qi <yao.qi@linaro.org>
8008 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8009 aarch64_linux_get_debug_reg_capacity.
8011 2015-07-17 Yao Qi <yao.qi@linaro.org>
8013 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8014 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8015 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8016 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8017 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8018 (AARCH64_HWP_ALIGNMENT): Likewise.
8019 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8020 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8021 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8022 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8023 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8024 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8025 (struct aarch64_debug_reg_state): Likewise.
8026 (struct arch_lwp_info): Likewise.
8027 (aarch64_align_watchpoint): Likewise.
8028 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8029 (aarch64_watchpoint_length): Likewise.
8030 (aarch64_point_encode_ctrl_reg): Likewise
8031 (aarch64_point_is_aligned): Likewise.
8032 (aarch64_align_watchpoint): Likewise.
8033 (aarch64_linux_set_debug_regs):
8034 (aarch64_dr_state_insert_one_point): Likewise.
8035 (aarch64_dr_state_remove_one_point): Likewise.
8036 (aarch64_handle_breakpoint): Likewise.
8037 (aarch64_handle_aligned_watchpoint): Likewise.
8038 (aarch64_handle_unaligned_watchpoint): Likewise.
8039 (aarch64_handle_watchpoint): Likewise.
8041 2015-07-17 Yao Qi <yao.qi@linaro.org>
8043 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8044 and don't aarch64_get_debug_reg_state. All callers update.
8045 (aarch64_handle_aligned_watchpoint): Likewise.
8046 (aarch64_handle_unaligned_watchpoint): Likewise.
8047 (aarch64_handle_watchpoint): Likewise.
8048 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8049 (aarch64_remove_point): Likewise.
8051 2015-07-17 Yao Qi <yao.qi@linaro.org>
8053 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8055 (aarch64_handle_unaligned_watchpoint): Likewise.
8057 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8059 Revert the previous 3 commits:
8060 Move gdb_regex* to common/
8061 Move linux_find_memory_regions_full & co.
8062 gdbserver build-id attribute generator
8064 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8065 Jan Kratochvil <jan.kratochvil@redhat.com>
8067 gdbserver build-id attribute generator.
8068 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8069 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8070 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8072 (get_dynamic): Use find_pdhr to traverse program headers.
8073 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8074 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8075 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8076 (get_hex_build_id): New.
8077 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8078 to reply XML document.
8080 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8081 Jan Kratochvil <jan.kratochvil@redhat.com>
8083 * target.c: Include target/target-utils.h and fcntl.h.
8084 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8085 (target_fileio_read_stralloc): New functions.
8087 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8089 * Makefile.in (OBS): Add gdb_regex.o.
8091 * config.in: Rebuilt.
8092 * configure: Rebuilt.
8094 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8095 Jan Kratochvil <jan.kratochvil@redhat.com>
8097 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8098 * Makefile.in (OBS): Add target-utils.o.
8099 (linux-maps.o, target-utils.o): New.
8100 * configure.srv (srv_linux_obj): Add linux-maps.o.
8102 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8104 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8106 (the_low_target): Install it.
8108 2015-07-14 Pedro Alves <palves@redhat.com>
8110 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8111 Instead, ignore ECHILD, and throw an error for other errnos.
8113 2015-07-10 Pedro Alves <palves@redhat.com>
8115 * event-loop.c (struct callback_event) <data>: Change type to
8116 gdb_client_data instance instead of gdb_client_data pointer.
8117 (append_callback_event): Adjust.
8119 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8121 * linux-aarch64-low.c: Add comments for each linux_target_ops
8122 method. Remove comments already covered in target_ops and
8123 linux_target_ops definitions.
8124 (the_low_target): Add comments for each unimplemented method.
8126 2015-07-09 Yao Qi <yao.qi@linaro.org>
8128 * linux-aarch64-low.c (aarch64_regmap): Remove.
8129 (aarch64_usrregs_info): Remove.
8130 (regs_info): Set field usrregs to NULL.
8132 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8134 * linux-low.c: Include "rsp-low.h"
8135 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8136 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8137 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8138 (handle_btrace_enable_pt): New.
8139 (handle_btrace_general_set): Support "pt".
8140 (handle_btrace_conf_general_set): Support "pt:size".
8142 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8144 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8147 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8149 * linux-aarch64-low.c: Remove comment about endianness.
8150 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8151 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8154 2015-06-24 Gary Benson <gbenson@redhat.com>
8156 * linux-i386-ipa.c (stdint.h): Do not include.
8157 * lynx-i386-low.c (stdint.h): Likewise.
8158 * lynx-ppc-low.c (stdint.h): Likewise.
8159 * mem-break.c (stdint.h): Likewise.
8160 * thread-db.c (stdint.h): Likewise.
8161 * tracepoint.c (stdint.h): Likewise.
8162 * win32-low.c (stdint.h): Likewise.
8164 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8166 * server.c (write_qxfer_response): Update call to
8167 remote_escape_output.
8169 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8170 Jan Kratochvil <jan.kratochvil@redhat.com>
8172 Merge multiple hex conversions.
8173 * gdbreplay.c (tohex): Rename to 'fromhex'.
8174 (logchar): Use fromhex.
8176 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8178 * server.c (handle_qxfer_libraries): Set `version' attribute for
8181 2015-06-10 Gary Benson <gbenson@redhat.com>
8183 * target.h (struct target_ops) <multifs_open>: New field.
8184 <multifs_unlink>: Likewise.
8185 <multifs_readlink>: Likewise.
8186 * linux-low.c (nat/linux-namespaces.h): New include.
8187 (linux_target_ops): Initialize the_target->multifs_open,
8188 the_target->multifs_unlink and the_target->multifs_readlink.
8189 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8190 * hostio.c (hostio_fs_pid): New static variable.
8191 (hostio_handle_new_gdb_connection): New function.
8192 (handle_setfs): Likewise.
8193 (handle_open): Use the_target->multifs_open as appropriate.
8194 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8195 (handle_readlink): Use the_target->multifs_readlink as
8197 (handle_vFile): Handle vFile:setfs packets.
8198 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8199 after target_handle_new_gdb_connection.
8201 2015-06-10 Gary Benson <gbenson@redhat.com>
8203 * configure.ac (AC_CHECK_FUNCS): Add setns.
8204 * config.in: Regenerate.
8205 * configure: Likewise.
8206 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8207 (linux-namespaces.o): New rule.
8208 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8210 2015-06-09 Gary Benson <gbenson@redhat.com>
8212 * hostio.c (handle_open): Process mode argument with
8213 fileio_to_host_mode.
8215 2015-06-01 Yao Qi <yao.qi@linaro.org>
8217 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8218 * linux-x86-low.c: Likewise.
8220 2015-05-28 Don Breazeal <donb@codesourcery.com>
8222 * linux-low.c (handle_extended_wait): Initialize
8223 thread_info.last_resume_kind for new fork children.
8225 2015-05-15 Pedro Alves <palves@redhat.com>
8227 * target.h (target_handle_new_gdb_connection): Rewrite using if
8228 wrapped in do/while.
8230 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8232 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8233 * configure, config.in: Regenerate.
8234 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8237 2015-05-12 Don Breazeal <donb@codesourcery.com>
8239 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8240 PTRACE_EVENT_VFORK_DONE.
8241 (linux_low_ptrace_options, extended_event_reported): Add vfork
8243 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8244 and "vforkdone" for RSP 'T' Stop Reply Packet.
8245 * server.h (report_vfork_events): Declare
8248 2015-05-12 Don Breazeal <donb@codesourcery.com>
8250 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8251 (the_low_target) <new_fork>: Initialize new member.
8252 * linux-arm-low.c (arm_new_fork): New function.
8253 (the_low_target) <new_fork>: Initialize new member.
8254 * linux-low.c (handle_extended_wait): Call new target function
8256 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8257 * linux-mips-low.c (mips_add_watchpoint): New function
8258 extracted from mips_insert_point.
8259 (the_low_target) <new_fork>: Initialize new member.
8260 (mips_linux_new_fork): New function.
8261 (mips_insert_point): Call mips_add_watchpoint.
8262 * linux-x86-low.c (x86_linux_new_fork): New function.
8263 (the_low_target) <new_fork>: Initialize new member.
8265 2015-05-12 Don Breazeal <donb@codesourcery.com>
8267 * linux-low.c (handle_extended_wait): Implement return value,
8268 rename argument 'event_child' to 'event_lwp', handle
8269 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8270 (linux_low_ptrace_options): New function.
8271 (linux_low_filter_event): Call linux_low_ptrace_options,
8272 use different argument fo linux_enable_event_reporting,
8273 use return value from handle_extended_wait.
8274 (extended_event_reported): New function.
8275 (linux_wait_1): Call extended_event_reported and set
8276 status to report fork events.
8277 (linux_write_memory): Add pid to debug message.
8278 (reset_lwp_ptrace_options_callback): New function.
8279 (linux_handle_new_gdb_connection): New function.
8280 (linux_target_ops): Initialize new structure member.
8281 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8282 * lynx-low.c: Initialize new structure member.
8283 * remote-utils.c (prepare_resume_reply): Implement stop reason
8284 "fork" for "T" stop message.
8285 * server.c (handle_query): Call handle_new_gdb_connection.
8286 * server.h (report_fork_events): Declare global flag.
8287 * target.h (struct target_ops) <handle_new_gdb_connection>:
8289 (target_handle_new_gdb_connection): New macro.
8290 * win32-low.c: Initialize new structure member.
8292 2015-05-12 Don Breazeal <donb@codesourcery.com>
8294 * mem-break.c (APPEND_TO_LIST): Define macro.
8295 (clone_agent_expr): New function.
8296 (clone_one_breakpoint): New function.
8297 (clone_all_breakpoints): New function.
8298 * mem-break.h: Declare new functions.
8300 2015-05-12 Don Breazeal <donb@codesourcery.com>
8302 * linux-low.c (linux_supports_fork_events): New function.
8303 (linux_supports_vfork_events): New function.
8304 (linux_target_ops): Initialize new structure members.
8305 (initialize_low): Call linux_check_ptrace_features.
8306 * lynx-low.c (lynx_target_ops): Initialize new structure
8308 * server.c (report_fork_events, report_vfork_events):
8310 (handle_query): Add new features to qSupported packet and
8312 (captured_main): Initialize new global variables.
8313 * target.h (struct target_ops) <supports_fork_events>:
8315 <supports_vfork_events>: New member.
8316 (target_supports_fork_events): New macro.
8317 (target_supports_vfork_events): New macro.
8318 * win32-low.c (win32_target_ops): Initialize new structure
8321 2015-05-12 Gary Benson <gbenson@redhat.com>
8323 * server.c (handle_qxfer_exec_file): Use current process
8326 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8328 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8329 Remove HAVE_PTRACE_GETREGS conditionals.
8330 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8331 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8333 2015-05-08 Yao Qi <yao.qi@linaro.org>
8335 * linux-low.c (linux_supports_conditional_breakpoints): New
8337 (linux_target_ops): Install new target method.
8338 * lynx-low.c (lynx_target_ops): Install NULL hook for
8339 supports_conditional_breakpoints.
8340 * nto-low.c (nto_target_ops): Likewise.
8341 * spu-low.c (spu_target_ops): Likewise.
8342 * win32-low.c (win32_target_ops): Likewise.
8343 * server.c (handle_query): Check
8344 target_supports_conditional_breakpoints.
8345 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8347 (target_supports_conditional_breakpoints): New macro.
8349 2015-05-06 Pedro Alves <palves@redhat.com>
8352 * server.c (start_inferior): If the process exits, mourn it.
8354 2015-04-21 Gary Benson <gbenson@redhat.com>
8356 * hostio.c (fileio_open_flags_to_host): Factored out to
8357 fileio_to_host_openflags in common/fileio.c. Single use
8360 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8362 * linux-xtensa-low.c (xtensa_fill_gregset)
8363 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8366 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8368 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8369 (regs_info): Replace usrregs pointer with NULL.
8371 2015-04-17 Gary Benson <gbenson@redhat.com>
8373 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8374 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8375 * server.c (handle_qxfer_exec_file): New function.
8376 (qxfer_packets): Add exec-file entry.
8377 (handle_query): Report qXfer:exec-file:read as supported packet.
8379 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8381 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8383 2015-04-09 Gary Benson <gbenson@redhat.com>
8385 * hostio-errno.c (errno_to_fileio_error): Remove function.
8386 Update caller to use remote_fileio_to_fio_error.
8388 2015-04-09 Yao Qi <yao.qi@linaro.org>
8390 * linux-low.c (linux_insert_point): Call
8391 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8392 (linux_remove_point): Call remove_memory_breakpoint if type is
8394 * linux-x86-low.c (x86_insert_point): Don't call
8395 insert_memory_breakpoint.
8396 (x86_remove_point): Don't call remove_memory_breakpoint.
8398 2015-04-01 Pedro Alves <palves@redhat.com>
8399 Cleber Rosa <crosa@redhat.com>
8401 * server.c (gdbserver_usage): Reorganize and extend the usage
8404 2015-03-24 Pedro Alves <palves@redhat.com>
8406 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8407 output. Also dump TRAP_TRACE.
8408 (linux_low_filter_event): In debug output, distinguish a
8409 resume_stop SIGSTOP from a delayed SIGSTOP.
8411 2015-03-24 Gary Benson <gbenson@redhat.com>
8413 * linux-x86-low.c (x86_linux_new_thread): Moved to
8415 (x86_linux_prepare_to_resume): Likewise.
8417 2015-03-24 Gary Benson <gbenson@redhat.com>
8419 * Makefile.in (x86-linux-dregs.o): New rule.
8420 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8421 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8422 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8423 (x86_linux_dr_get): Likewise.
8424 (x86_linux_dr_set): Likewise.
8425 (update_debug_registers_callback): Likewise.
8426 (x86_linux_dr_set_addr): Likewise.
8427 (x86_linux_dr_get_addr): Likewise.
8428 (x86_linux_dr_set_control): Likewise.
8429 (x86_linux_dr_get_control): Likewise.
8430 (x86_linux_dr_get_status): Likewise.
8431 (x86_linux_update_debug_registers): Likewise.
8433 2015-03-24 Gary Benson <gbenson@redhat.com>
8435 * linux-x86-low.c (x86_linux_update_debug_registers):
8436 New function, factored out from...
8437 (x86_linux_prepare_to_resume): ...this.
8439 2015-03-24 Gary Benson <gbenson@redhat.com>
8441 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8442 (x86_linux_dr_set): Likewise.
8443 (update_debug_registers_callback): Likewise.
8444 (x86_linux_dr_set_addr): Likewise.
8445 (x86_linux_dr_get_addr): Likewise.
8446 (x86_linux_dr_set_control): Likewise.
8447 (x86_linux_dr_get_control): Likewise.
8448 (x86_linux_dr_get_status): Likewise.
8449 (x86_linux_prepare_to_resume): Likewise.
8451 2015-03-24 Gary Benson <gbenson@redhat.com>
8453 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8454 Use perror_with_name. Pass string through gettext.
8455 (x86_linux_dr_set): Likewise.
8457 2015-03-24 Gary Benson <gbenson@redhat.com>
8459 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8460 (x86_linux_dr_set_addr): ...this.
8461 (x86_dr_low_get_addr): Rename to...
8462 (x86_linux_dr_get_addr): ...this.
8463 (x86_dr_low_set_control): Rename to...
8464 (x86_linux_dr_set_control): ...this.
8465 (x86_dr_low_get_control): Rename to...
8466 (x86_linux_dr_get_control): ...this.
8467 (x86_dr_low_get_status): Rename to...
8468 (x86_linux_dr_get_status): ...this.
8469 (x86_dr_low): Update with new function names.
8471 2015-03-24 Gary Benson <gbenson@redhat.com>
8473 * Makefile.in (x86-linux.o): New rule.
8474 * configure.srv: Add x86-linux.o to relevant targets.
8475 * linux-low.c (lwp_set_arch_private_info): New function.
8476 (lwp_arch_private_info): Likewise.
8477 * linux-x86-low.c: Include nat/x86-linux.h.
8478 (arch_lwp_info): Removed structure.
8479 (update_debug_registers_callback):
8480 Use lwp_set_debug_registers_changed.
8481 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8482 and lwp_set_debug_registers_changed.
8483 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8485 2015-03-24 Gary Benson <gbenson@redhat.com>
8487 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8488 * linux-arm-low.c (arm_new_thread): Likewise.
8489 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8490 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8491 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8492 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8494 2015-03-24 Gary Benson <gbenson@redhat.com>
8496 * linux-low.c (ptid_of_lwp): New function.
8497 (lwp_is_stopped): Likewise.
8498 (lwp_stop_reason): Likewise.
8499 * linux-x86-low.c (update_debug_registers_callback):
8501 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8504 2015-03-24 Gary Benson <gbenson@redhat.com>
8506 * linux-low.h (linux_stop_lwp): Remove declaration.
8508 2015-03-24 Gary Benson <gbenson@redhat.com>
8510 * linux-low.h: Include nat/linux-nat.h.
8511 * linux-low.c (iterate_over_lwps_args): New structure.
8512 (iterate_over_lwps_filter): New function.
8513 (iterate_over_lwps): Likewise.
8514 * linux-x86-low.c (update_debug_registers_callback):
8515 Update signature to what iterate_over_lwps expects.
8516 Remove PID check that iterate_over_lwps now performs.
8517 (x86_dr_low_set_addr): Use iterate_over_lwps.
8518 (x86_dr_low_set_control): Likewise.
8520 2015-03-24 Gary Benson <gbenson@redhat.com>
8522 * linux-x86-low.c (x86_debug_reg_state): New function.
8523 (x86_linux_prepare_to_resume): Use the above.
8525 2015-03-24 Gary Benson <gbenson@redhat.com>
8527 * linux-low.c (current_lwp_ptid): New function.
8528 * linux-x86-low.c: Include nat/linux-nat.h.
8529 (x86_dr_low_get_addr): Use current_lwp_ptid.
8530 (x86_dr_low_get_control): Likewise.
8531 (x86_dr_low_get_status): Likewise.
8533 2015-03-20 Pedro Alves <palves@redhat.com>
8535 * tracepoint.c (cmd_qtstatus): Make "str" const.
8537 2015-03-20 Pedro Alves <palves@redhat.com>
8539 * server.c (handle_general_set): Make "req_str" const.
8541 2015-03-19 Pedro Alves <palves@redhat.com>
8543 * linux-low.c (linux_resume_one_lwp): Rename to ...
8544 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8545 instead call perror_with_name.
8546 (check_ptrace_stopped_lwp_gone): New function.
8547 (linux_resume_one_lwp): Reimplement as wrapper around
8548 linux_resume_one_lwp_throw that swallows errors if the LWP is
8551 2015-03-19 Pedro Alves <palves@redhat.com>
8553 * linux-low.c (count_events_callback, select_event_lwp_callback):
8554 No longer check whether the thread has resume_stop as last resume
8557 2015-03-19 Pedro Alves <palves@redhat.com>
8559 * linux-low.c (count_events_callback, select_event_lwp_callback):
8560 Use the lwp's status_pending_p field, not the thread's.
8562 2015-03-19 Pedro Alves <palves@redhat.com>
8564 * linux-low.c (select_event_lwp_callback): Update comments to
8565 no longer mention SIGTRAP.
8567 2015-03-18 Gary Benson <gbenson@redhat.com>
8569 * server.c (handle_query): Do not report vFile:fstat as supported.
8571 2015-03-11 Gary Benson <gbenson@redhat.com>
8573 * hostio.c (sys/types.h): New include.
8574 (sys/stat.h): Likewise.
8575 (common-remote-fileio.h): Likewise.
8576 (handle_fstat): New function.
8577 (handle_vFile): Handle vFile:fstat packets.
8579 2015-03-11 Gary Benson <gbenson@redhat.com>
8581 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8582 struct stat.st_blocks and struct stat.st_blksize.
8583 * configure: Regenerate.
8584 * config.in: Likewise.
8585 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8586 (OBS): Add common-remote-fileio.o.
8587 (common-remote-fileio.o): New rule.
8589 2015-03-09 Pedro Alves <palves@redhat.com>
8591 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8592 'struct sockaddr' pointer in 'accept' call.
8594 2015-03-09 Pedro Alves <palves@redhat.com>
8597 2015-03-07 Pedro Alves <palves@redhat.com>
8598 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8599 or <winsock2.h> here. Instead include "gdb_socket.h".
8600 (remote_open): Use union gdb_sockaddr_u.
8601 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8602 or <winsock2.h> here. Instead include "gdb_socket.h".
8603 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8604 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8606 (init_named_socket, gdb_agent_helper_thread): Use union
8609 2015-03-07 Pedro Alves <palves@redhat.com>
8611 * configure.ac (build_warnings): Move
8612 -Wdeclaration-after-statement to the C-specific set.
8613 * configure: Regenerate.
8615 2015-03-07 Pedro Alves <palves@redhat.com>
8617 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8618 or <winsock2.h> here. Instead include "gdb_socket.h".
8619 (remote_open): Use union gdb_sockaddr_u.
8620 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8621 or <winsock2.h> here. Instead include "gdb_socket.h".
8622 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8623 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8625 (init_named_socket, gdb_agent_helper_thread): Use union
8628 2015-03-07 Pedro Alves <palves@redhat.com>
8630 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8633 2015-03-06 Yao Qi <yao.qi@linaro.org>
8635 * linux-aarch64-low.c (aarch64_insert_point): Use
8636 show_debug_regs as a boolean.
8637 (aarch64_remove_point): Likewise.
8639 2015-03-05 Pedro Alves <palves@redhat.com>
8641 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8642 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8643 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8644 * nto-low.c (nto_target_ops): Likewise.
8645 * spu-low.c (spu_target_ops): Likewise.
8646 * win32-low.c (win32_target_ops): Likewise.
8648 2015-03-04 Pedro Alves <palves@redhat.com>
8650 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8651 Decide whether a breakpoint triggered based on the SIGTRAP's
8653 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8654 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8655 (linux_low_filter_event): Check for breakpoints before checking
8657 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8659 (linux_stopped_by_sw_breakpoint)
8660 (linux_supports_stopped_by_sw_breakpoint)
8661 (linux_stopped_by_hw_breakpoint)
8662 (linux_supports_stopped_by_hw_breakpoint): New functions.
8663 (linux_target_ops): Install new target methods.
8665 2015-03-04 Pedro Alves <palves@redhat.com>
8667 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8668 * server.c (swbreak_feature, hwbreak_feature): New globals.
8669 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8670 (captured_main): Clear swbreak_feature and hwbreak_feature.
8671 * server.h (swbreak_feature, hwbreak_feature): Declare.
8672 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8673 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8674 supports_stopped_by_hw_breakpoint>: New fields.
8675 (target_supports_stopped_by_sw_breakpoint)
8676 (target_stopped_by_sw_breakpoint)
8677 (target_supports_stopped_by_hw_breakpoint)
8678 (target_stopped_by_hw_breakpoint): Declare.
8680 2015-03-04 Pedro Alves <palves@redhat.com>
8682 enum lwp_stop_reason -> enum target_stop_reason
8683 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8684 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8685 (linux_wait_1, stuck_in_jump_pad_callback)
8686 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8687 (linux_stopped_by_watchpoint):
8688 * linux-low.h (enum lwp_stop_reason): Delete.
8689 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8690 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8692 2015-03-04 Yao Qi <yao.qi@linaro.org>
8694 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8696 2015-03-03 Gary Benson <gbenson@redhat.com>
8698 * hostio.c (handle_vFile): Fix prefix lengths.
8700 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8702 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8705 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8707 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8708 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8709 (clean): Add "rm -f" for above C files.
8710 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8711 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8712 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8713 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8714 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8715 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8716 (init_registers_s390x_vx_linux64)
8717 (init_registers_s390x_tevx_linux64)
8718 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8719 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8721 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8722 (s390_store_vxrs_high): New functions.
8723 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8725 (s390_arch_setup): Add logic for selecting one of the new target
8726 descriptions. Activate the new vector regsets if applicable.
8727 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8728 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8729 and init_registers_s390x_tevx_linux64.
8731 2015-03-01 Pedro Alves <palves@redhat.com>
8733 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8736 2015-02-27 Pedro Alves <palves@redhat.com>
8738 * linux-x86-low.c (u_debugreg_offset): New function.
8739 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8741 2015-02-27 Pedro Alves <palves@redhat.com>
8743 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8744 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8745 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8746 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8747 (ps_lsetfpregs, ps_getpid)
8748 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8749 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8750 (ps_lsetxregs, ps_plog): Declare.
8752 2015-02-27 Pedro Alves <palves@redhat.com>
8754 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8755 IP_AGENT_EXPORT_FUNC.
8756 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8757 IP_AGENT_EXPORT_FUNC.
8758 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8759 (IP_AGENT_EXPORT): Delete.
8760 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8761 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8762 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8763 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8764 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8765 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8766 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8767 (traceframe_read_count, traceframe_write_count)
8768 (traceframes_created, trace_state_variables, get_raw_reg)
8769 (get_trace_state_variable_value, set_trace_state_variable_value)
8770 (ust_loaded, helper_thread_id, cmd_buf): Use
8771 IPA_SYM_EXPORTED_NAME.
8772 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8773 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8774 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8775 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8776 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8777 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8778 EXTERN_C_PUSH/EXTERN_C_POP.
8779 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8780 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8781 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8782 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8783 (traceframe_write_count, traceframe_read_count)
8784 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8785 (about_to_request_buffer_space, get_trace_state_variable_value)
8786 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8787 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8788 EXTERN_C_PUSH/EXTERN_C_POP.
8789 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8790 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8791 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8792 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8793 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8794 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8795 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8796 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8798 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8799 (IP_AGENT_EXPORT_VAR_DECL): Define.
8801 (gdb_agent_get_raw_reg): Declare.
8803 2015-02-27 Tom Tromey <tromey@redhat.com>
8804 Pedro Alves <palves@redhat.com>
8806 Rename symbols whose names are reserved C++ keywords throughout.
8808 2015-02-27 Pedro Alves <palves@redhat.com>
8810 * Makefile.in (COMPILER): New, get it from autoconf.
8811 (CXX): Get from autoconf instead.
8812 (COMPILE.pre): Use COMPILER.
8813 (CC-LD): Rename to ...
8814 (CC_LD): ... this. Use COMPILER.
8815 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8816 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8817 * acinclude.m4: Include build-with-cxx.m4.
8818 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8819 Disable -Werror by default if building in C++ mode.
8820 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8821 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8822 the C++ compiler. Save/restore CXXFLAGS too.
8823 * configure: Regenerate.
8825 2015-02-27 Pedro Alves <palves@redhat.com>
8827 * acinclude.m4: Include libiberty.m4.
8828 * configure.ac: Call libiberty_INIT.
8829 * config.in, configure: Regenerate.
8831 2015-02-26 Pedro Alves <palves@redhat.com>
8833 * linux-low.c (linux_wait_1): When incrementing the PC past a
8834 program breakpoint always use the_low_target.breakpoint_len as
8835 increment, rather than the maximum between that and
8836 the_low_target.decr_pc_after_break.
8838 2015-02-23 Pedro Alves <palves@redhat.com>
8840 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8841 thread was doing a step-over; always adjust the PC if
8842 we stepped over a permanent breakpoint.
8843 (linux_wait_1): If we stepped over breakpoint that was on top of a
8844 permanent breakpoint, manually advance the PC past it.
8846 2015-02-23 Pedro Alves <palves@redhat.com>
8848 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8850 (x86_fill_gregset, x86_store_gregset): Use it when handling
8853 2015-02-20 Pedro Alves <palves@redhat.com>
8855 * thread-db.c: Include "nat/linux-procfs.h".
8856 (thread_db_init): Skip listing new threads if the kernel supports
8857 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8859 2015-02-20 Pedro Alves <palves@redhat.com>
8861 * linux-low.c (status_pending_p_callback): Use ptid_match.
8863 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8865 PR breakpoints/16812
8866 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8867 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8868 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8870 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8872 PR breakpoints/15956
8873 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8875 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8877 * linux-low.c (linux_low_btrace_conf): Print size.
8878 * server.c (handle_btrace_conf_general_set): New.
8879 (hanle_general_set): Call handle_btrace_conf_general_set.
8880 (handle_query): Report Qbtrace-conf:bts:size as supported.
8882 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8884 * linux-low.c (linux_low_enable_btrace): Update parameters.
8885 (linux_low_btrace_conf): New.
8886 (linux_target_ops)<to_btrace_conf>: Initialize.
8887 * server.c (current_btrace_conf): New.
8888 (handle_btrace_enable): Rename to ...
8889 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8890 to target_enable_btrace. Update comment. Update users.
8891 (handle_qxfer_btrace_conf): New.
8892 (qxfer_packets): Add btrace-conf entry.
8893 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8894 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8895 (target_ops)<read_btrace_conf>: New.
8896 (target_enable_btrace): Update parameters.
8897 (target_read_btrace_conf): New.
8899 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8901 * server.c (handle_btrace_general_set): Remove call to
8902 target_supports_btrace.
8903 (supported_btrace_packets): New.
8904 (handle_query): Call supported_btrace_packets.
8905 * target.h: include btrace-common.h.
8906 (btrace_target_info): Removed.
8907 (supports_btrace, target_supports_btrace): Update parameters.
8909 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8911 * Makefile.in (SFILES): Add common/btrace-common.c.
8912 (OBS): Add common/btrace-common.o.
8913 (btrace-common.o): Add build rules.
8914 * linux-low: Include btrace-common.h.
8915 (linux_low_read_btrace): Use struct btrace_data. Call
8916 btrace_data_init and btrace_data_fini.
8918 2015-02-06 Pedro Alves <palves@redhat.com>
8920 * thread-db.c (find_new_threads_callback): Add debug output.
8922 2015-02-04 Pedro Alves <palves@redhat.com>
8924 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8925 (resume_stopped_resumed_lwps): New function.
8926 (linux_wait_for_event_filtered): Use it.
8928 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8930 * Makefile.in (SFILES): Add linux-personality.c.
8931 (linux-personality.o): New rule.
8932 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8933 list of objects to be built.
8934 * linux-low.c: Include nat/linux-personality.h.
8935 (linux_create_inferior): Remove code to disable address space
8936 randomization (moved to ../nat/linux-personality.c). Create
8937 cleanup to disable address space randomization.
8939 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8941 * Makefile.in (posix-strerror.o): New rule.
8942 (mingw-strerror.o): Likewise.
8943 * configure: Regenerated.
8944 * configure.ac: Source file ../common/common.host. Initialize new
8945 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8947 2015-01-14 Yao Qi <yao@codesourcery.com>
8949 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8950 (ppc-linux.o): New rule.
8951 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8952 * configure.ac: AC_CHECK_FUNCS(getauxval).
8953 * config.in: Re-generated.
8954 * configure: Re-generated.
8955 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8956 ppc64_64bit_inferior_p
8958 2015-01-14 Yao Qi <yao@codesourcery.com>
8960 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8961 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8962 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8963 (PT_ORIG_R3, PT_TRAP): Likewise.
8964 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8965 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8966 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8968 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8970 * i387-fp.c (i387_cache_to_xsave): In look over
8971 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8972 zmmh_low_space field by use of zmmh_high_space.
8974 2015-01-09 Pedro Alves <palves@redhat.com>
8976 * linux-low.c (step_over_bkpt): Move higher up in the file.
8977 (handle_extended_wait): Don't store the stop_pc here.
8978 (get_stop_pc): Adjust comments and rename to ...
8979 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8980 stopped for a software breakpoint or hardware breakpoint.
8981 (thread_still_has_status_pending_p): New function.
8982 (status_pending_p_callback): Use
8983 thread_still_has_status_pending_p. If the event is no longer
8984 interesting, resume the LWP.
8985 (handle_tracepoints): Add assert.
8986 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8987 (wstatus_maybe_breakpoint): New function.
8988 (cancel_breakpoint): Delete function.
8989 (check_stopped_by_watchpoint): New function, factored out from
8990 linux_low_filter_event.
8991 (lp_status_maybe_breakpoint): Delete function.
8992 (linux_low_filter_event): Remove filter_ptid argument.
8993 Leave thread group exits pending here. Store the LWP's stop PC.
8994 Always leave events pending.
8995 (linux_wait_for_event_filtered): Pull all events out of the
8996 kernel, and leave them all pending.
8997 (count_events_callback, select_event_lwp_callback): Consider all
8999 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9000 (select_event_lwp): Only give preference to the stepping LWP in
9001 all-stop mode. Adjust comments.
9002 (ignore_event): New function.
9003 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9004 references to cancel_breakpoints. Adjust to renames. Also give
9005 equal priority to all LWPs that have had events in non-stop mode.
9006 If reporting a software breakpoint event, unadjust the LWP's PC.
9007 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9008 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9010 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9011 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9012 (linux_stopped_by_watchpoint): Adjust.
9013 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9014 * linux-low.h (enum lwp_stop_reason): New.
9015 (struct lwp_info) <stop_pc>: Adjust comment.
9016 <stopped_by_watchpoint>: Delete field.
9017 <stop_reason>: New field.
9018 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9019 * mem-break.c (software_breakpoint_inserted_here)
9020 (hardware_breakpoint_inserted_here): New function.
9021 * mem-break.h (software_breakpoint_inserted_here)
9022 (hardware_breakpoint_inserted_here): Declare.
9023 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9024 (cancel_breakpoints): Delete.
9025 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9026 (upload_fast_traceframes): Remove references to
9029 2015-01-09 Pedro Alves <palves@redhat.com>
9031 * thread-db.c (find_new_threads_callback): Ignore thread if the
9032 kernel thread ID is -1.
9034 2015-01-09 Pedro Alves <palves@redhat.com>
9036 * linux-low.c (linux_attach_fail_reason_string): Move to
9037 nat/linux-ptrace.c, and rename.
9038 (linux_attach_lwp): Update comment.
9039 (attach_proc_task_lwp_callback): New function.
9040 (linux_attach): Adjust to rename and use
9041 linux_proc_attach_tgid_threads.
9042 (linux_attach_fail_reason_string): Delete declaration.
9044 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9046 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9047 * server.c (gdbserver_version): Likewise.
9049 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9051 * remote-utils.c: Include ctype.h.
9052 (input_interrupt): Explicitly handle the case when the char
9053 received is the NUL byte. Improve the printing of non-ASCII
9056 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9058 * linux-low.c (linux_low_filter_event): Update call to
9059 linux_enable_event_reporting following the addition of
9060 a new parameter to that function.
9062 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9065 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9066 (AARCH64_FPCR_REGNO): Likewise.
9067 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9068 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9069 (aarch64_store_fpregset): Likewise.
9071 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9073 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9074 Remove FIXME comment about assumption about N.
9076 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9078 * configure.ac: If large-file support is disabled in GDBserver,
9079 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9080 * configure: Regenerate.
9082 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9084 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9085 warning upon ENODATA from ptrace.
9086 * linux-s390-low.c (s390_store_tdb): New.
9087 (s390_regsets): Add regset for NT_S390_TDB.
9089 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9091 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9092 without a fill_function.
9093 * linux-s390-low.c (s390_fill_last_break): Remove.
9094 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9095 (s390_arch_setup): Use regset's size instead of fill_function for
9098 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9100 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9101 the regset's store function when ptrace returned an error.
9102 * regcache.c (get_thread_regcache): Invalidate register cache
9103 before fetching inferior's registers.
9105 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9107 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9108 while-loop as for-loop.
9109 (regsets_store_inferior_registers): Likewise.
9111 2014-11-28 Yao Qi <yao@codesourcery.com>
9113 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9114 * config.in, configure: Re-generate.
9115 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9118 2014-11-21 Yao Qi <yao@codesourcery.com>
9120 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9121 (AC_CHECK_HEADERS): Remove malloc.h.
9122 * configure: Re-generated.
9123 * config.in: Re-generated.
9124 * server.h: Don't include alloca.h and malloc.h.
9125 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9126 Don't include malloc.h.
9128 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9130 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9131 corresponding ERRNO check in same block.
9133 2014-11-12 Pedro Alves <palves@redhat.com>
9135 * server.c (cont_thread): Update comment.
9136 (start_inferior, attach_inferior): No longer clear cont_thread.
9137 (handle_v_cont): No longer set cont_thread.
9138 (captured_main): Clear cont_thread each time a GDB connects.
9140 2014-11-12 Pedro Alves <palves@redhat.com>
9142 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9143 thread, and don't resume all threads if the Hc thread has exited.
9145 2014-11-12 Pedro Alves <palves@redhat.com>
9147 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9148 the process group instead of to a specific LWP.
9150 2014-10-15 Pedro Alves <palves@redhat.com>
9153 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9155 (arm_set_thread_context): Delete.
9156 (the_low_target): Adjust.
9157 * win32-i386-low.c (debug_registers_changed)
9158 (debug_registers_used): Delete.
9159 (update_debug_registers_callback): New function.
9160 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9161 needing to update their debug registers.
9162 (win32_get_current_dr): New function.
9163 (x86_dr_low_get_addr, x86_dr_low_get_control)
9164 (x86_dr_low_get_status): Fetch the debug register from the thread
9166 (i386_initial_stuff): Adjust.
9167 (i386_get_thread_context): Remove current_event parameter. Don't
9168 clear debug_registers_changed nor copy DR values to
9170 (i386_set_thread_context): Delete.
9171 (i386_prepare_to_resume): New function.
9172 (i386_thread_added): Mark the thread as needing to update irs
9174 (the_low_target): Remove i386_set_thread_context and install
9175 i386_prepare_to_resume.
9176 * win32-low.c (win32_get_thread_context): Adjust.
9177 (win32_set_thread_context): Use SetThreadContext
9179 (win32_prepare_to_resume): New function.
9180 (win32_require_context): New function, factored out from ...
9181 (thread_rec): ... this.
9182 (continue_one_thread): Call win32_prepare_to_resume on each thread
9183 we're about to continue.
9184 (win32_resume): Call win32_prepare_to_resume on the event thread.
9185 * win32-low.h (struct win32_thread_info)
9186 <debug_registers_changed>: New field.
9187 (struct win32_target_ops): Change prototype of set_thread_context,
9188 delete set_thread_context and add prepare_to_resume.
9189 (win32_require_context): New declaration.
9191 2014-10-08 Gary Benson <gbenson@redhat.com>
9193 * server.h: Do not include common-exceptions.h.
9195 2014-10-08 Gary Benson <gbenson@redhat.com>
9197 * server.h: Do not include cleanups.h.
9199 2014-09-30 James Hogan <james.hogan@imgtec.com>
9201 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9204 2014-09-23 Yao Qi <yao@codesourcery.com>
9206 * linux-low.c (lp_status_maybe_breakpoint): New function.
9207 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9208 (count_events_callback): Likewise.
9209 (select_event_lwp_callback): Likewise.
9210 (cancel_breakpoints_callback): Likewise.
9212 2014-09-19 Don Breazeal <donb@codesourcery.com>
9214 * linux-low.c (handle_extended_wait): Call
9215 linux_ptrace_get_extended_event.
9216 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9217 linux_is_extended_waitstatus.
9219 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9221 * Makefile.in (CPPFLAGS): Define.
9222 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9223 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9225 2014-09-16 Gary Benson <gbenson@redhat.com>
9227 * inferiors.h (current_inferior): Renamed as...
9228 (current_thread): New variable. All uses updated.
9229 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9230 (maybe_move_out_of_jump_pad): Likewise.
9231 (cancel_breakpoint): Likewise.
9232 (linux_low_filter_event): Likewise.
9233 (wait_for_sigstop): Likewise.
9234 (linux_resume_one_lwp): Likewise.
9235 (need_step_over_p): Likewise.
9236 (start_step_over): Likewise.
9237 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9238 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9239 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9240 and save_inferior as saved_thread.
9241 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9243 (regcache_invalidate_thread): Likewise.
9244 * remote-utils.c (prepare_resume_reply): Likewise.
9245 * thread-db.c (thread_db_get_tls_address): Likewise.
9246 (disable_thread_event_reporting): Likewise.
9247 (remove_thread_event_breakpoints): Likewise.
9248 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9250 * target.h (set_desired_inferior): Renamed as...
9251 (set_desired_thread): New declaration. All uses updated.
9252 * server.c (myresume): Updated comment to reference thread instead
9254 (handle_serial_event): Likewise.
9255 (handle_target_event): Likewise.
9257 2014-09-12 Tom Tromey <tromey@redhat.com>
9258 Gary Benson <gbenson@redhat.com>
9260 * regcache.h: Include common-regcache.h.
9261 (regcache_read_pc): Don't declare.
9262 * regcache.c (get_thread_regcache_for_ptid): New function.
9264 2014-09-11 Tom Tromey <tromey@redhat.com>
9265 Gary Benson <gbenson@redhat.com>
9267 * symbol.c: New file.
9268 * Makefile.in (SFILES): Add symbol.c.
9269 (OBS): Add symbol.o.
9271 2014-09-11 Gary Benson <gbenson@redhat.com>
9273 * target.c (target_stop_ptid, target_continue_ptid): New
9276 2014-09-11 Tom Tromey <tromey@redhat.com>
9277 Gary Benson <gbenson@redhat.com>
9279 * target.h: Include target/target.h.
9280 * target.c (target_read_memory, target_read_uint32)
9281 (target_write_memory): New functions.
9283 2014-09-11 Gary Benson <gbenson@redhat.com>
9285 * server.h (debug_hw_points): Don't declare.
9286 * server.c (debug_hw_points): Don't define. Replace all uses
9287 with show_debug_regs.
9288 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9289 all uses with show_debug_regs.
9291 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9293 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9294 endianness into account.
9295 (ppc_supply_ptrace_register): Likewise.
9297 2014-09-03 James Hogan <james.hogan@imgtec.com>
9299 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9300 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9302 2014-09-03 Gary Benson <gbenson@redhat.com>
9304 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9305 ALL_DEBUG_ADDRESS_REGISTERS.
9307 2014-09-02 Gary Benson <gbenson@redhat.com>
9309 * i386-low.h: Renamed as...
9310 * x86-low.h: New file. All type, function and variable name
9311 prefixes changed from "i386_" to "x86_". All references updated.
9312 * i386-low.c: Renamed as...
9313 * x86-low.c: New file. All type, function and variable name
9314 prefixes changed from "i386_" to "x86_". All references updated.
9316 2014-09-02 Gary Benson <gbenson@redhat.com>
9318 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9319 (x86_linux_new_thread): Likewise.
9321 2014-08-29 Gary Benson <gbenson@redhat.com>
9323 * server.h (setjmp.h): Do not include.
9324 (toplevel): Do not declare.
9325 (common-exceptions.h): Include.
9326 (cleanups.h): Likewise.
9327 * server.c (toplevel): Do not define.
9328 (exit_code): New static global.
9329 (detach_or_kill_for_exit_cleanup): New function.
9330 (main): New function. Original main renamed to...
9331 (captured_main): New function.
9332 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9334 2014-08-29 Gary Benson <gbenson@redhat.com>
9336 * Makefile.in (SFILES): Add common/common-exceptions.c.
9337 (OBS): Add common-exceptions.o.
9338 (common-exceptions.o): New rule.
9339 * utils.c (prepare_to_throw_exception): New function.
9341 2014-08-29 Gary Benson <gbenson@redhat.com>
9343 * config.in: Regenerate.
9344 * configure: Likewise.
9346 2014-08-29 Gary Benson <gbenson@redhat.com>
9348 * Makefile.in (SFILES): Add common/cleanups.c.
9350 (cleanups.o): New rule.
9352 2014-08-29 Gary Benson <gbenson@redhat.com>
9354 * utils.c (internal_vwarning): New function.
9356 2014-08-28 Gary Benson <gbenson@redhat.com>
9358 * utils.h (fatal): Remove declaration.
9359 * utils.c (fatal): Remove function.
9361 2014-08-28 Gary Benson <gbenson@redhat.com>
9363 * tracepoint.c (gdb_agent_init): Replace fatal with
9365 (initialize_tracepoint): Likewise.
9367 2014-08-28 Gary Benson <gbenson@redhat.com>
9369 * remote-utils.c (remote_prepare): Replace fatal with error.
9371 2014-08-28 Gary Benson <gbenson@redhat.com>
9373 * linux-low.c (linux_async): Replace fatal with warning.
9375 (linux_start_non_stop): Return -1 if linux_async failed.
9377 2014-08-28 Gary Benson <gbenson@redhat.com>
9379 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9381 (i386_dr_low_get_addr): Remove vague comment.
9382 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9385 2014-08-28 Gary Benson <gbenson@redhat.com>
9387 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9388 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9390 (linux_resume_one_lwp): Likewise.
9391 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9393 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9394 with internal_error.
9395 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9396 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9397 (find_register_by_name): Replace fatal with internal_error.
9398 (find_regno): Likewise.
9399 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9400 * thread-db.c (thread_db_create_event): Likewise.
9401 (thread_db_load_search): Likewise.
9402 (try_thread_db_load_1): Likewise.
9403 * tracepoint.c (get_jump_space_head): Replace fatal with
9405 (claim_trampoline_space): Likewise.
9406 (have_fast_tracepoint_trampoline_buffer): Likewise.
9407 (cmd_qtstart): Likewise.
9408 (stop_tracing): Likewise.
9409 (fast_tracepoint_collecting): Likewise.
9410 (target_malloc): Likewise.
9411 (download_tracepoint): Likewise.
9412 (download_trace_state_variables): Replace check with gdb_assert.
9413 (upload_fast_traceframes): Replace fatal with internal_error.
9415 2014-08-19 Tom Tromey <tromey@redhat.com>
9416 Gary Benson <gbenson@redhat.com>
9418 * Makefile.in (SFILES): Add common/common-debug.c.
9419 (OBS): Add common-debug.o.
9420 (common-debug.o): New rule.
9421 * debug.h (debug_printf): Don't declare.
9422 * debug.c (debug_printf): Renamed and rewritten as...
9423 (debug_vprintf): New function.
9425 2014-08-19 Gary Benson <gbenson@redhat.com>
9427 * utils.h: Do not include print-utils.h.
9429 2014-08-19 Tom Tromey <tromey@redhat.com>
9430 Gary Benson <gbenson@redhat.com>
9432 * server.h: Add static assertion.
9433 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9435 2014-08-19 Tom Tromey <tromey@redhat.com>
9436 Gary Benson <gbenson@redhat.com>
9438 * Makefile.in (SFILES): Add common/errors.c.
9439 (OBS): Add errors.o.
9440 (IPA_OBS): Add errors-ipa.o.
9441 (errors.o): New rule.
9442 (errors-ipa.o): Likewise.
9443 * utils.h (perror_with_name, error, warning): Don't declare.
9444 * utils.c (warning): Renamed and rewritten as...
9445 (vwarning): New function.
9446 (error): Renamed and rewritten as...
9447 (verror): New function.
9448 (internal_error): Renamed and rewritten as...
9449 (internal_verror): New function.
9451 2014-08-07 Gary Benson <gbenson@redhat.com>
9453 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9454 * configure: Regenerate.
9455 * config.in: Likewise.
9456 * server.h: Do not include errno.h.
9457 * event-loop.c: Likewise.
9458 * hostio-errno.c: Likewise.
9459 * linux-low.c: Likewise.
9460 * remote-utils.c: Likewise.
9461 * spu-low.c: Likewise.
9462 * utils.c: Likewise.
9463 * gdbreplay.c: Unconditionally include errno.h.
9465 2014-08-07 Gary Benson <gbenson@redhat.com>
9467 * server.h: Do not include string.h.
9468 * event-loop.c: Likewise.
9469 * linux-low.c: Likewise.
9470 * regcache.c: Likewise.
9471 * remote-utils.c: Likewise.
9472 * spu-low.c: Likewise.
9473 * utils.c: Likewise.
9475 2014-08-07 Gary Benson <gbenson@redhat.com>
9477 * server.h: Do not include gdb_assert.h.
9479 2014-08-07 Gary Benson <gbenson@redhat.com>
9481 * server.h: Do not include common-utils.h.
9483 2014-08-07 Gary Benson <gbenson@redhat.com>
9485 * server.h: Do not include ptid.h.
9486 * notif.h: Likewise.
9488 2014-08-07 Gary Benson <gbenson@redhat.com>
9490 * server.h: Do not include gdb_locale.h.
9492 2014-08-07 Gary Benson <gbenson@redhat.com>
9494 * server.h: Do not include gdb/signals.h.
9495 * win32-low.c: Likewise.
9497 2014-08-07 Gary Benson <gbenson@redhat.com>
9499 * server.h: Do not include pathmax.h.
9501 2014-08-07 Gary Benson <gbenson@redhat.com>
9503 * server.h: Do not include libiberty.h.
9504 * linux-bfin-low.c: Likewise.
9506 2014-08-07 Gary Benson <gbenson@redhat.com>
9508 * server.h: Do not include ansidecl.h.
9510 2014-08-07 Gary Benson <gbenson@redhat.com>
9512 * linux-x86-low.c: Do not include stddef.h.
9513 * lynx-ppc-low.c: Likewise.
9514 * tracepoint.c: Likewise.
9516 2014-08-07 Gary Benson <gbenson@redhat.com>
9518 * server.h: Do not include stdarg.h.
9519 * nto-low.c: Likewise.
9521 2014-08-07 Gary Benson <gbenson@redhat.com>
9523 * server.h: Do not include stdlib.h.
9524 * inferiors.c: Likewise.
9525 * linux-low.c: Likewise.
9526 * regcache.c: Likewise.
9527 * spu-low.c: Likewise.
9528 * tracepoint.c: Likewise.
9529 * utils.c: Likewise.
9531 2014-08-07 Gary Benson <gbenson@redhat.com>
9533 * server.h: Do not include stdio.h.
9534 * linux-low.c: Likewise.
9535 * remote-utils.c: Likewise.
9536 * spu-low.c: Likewise.
9537 * utils.c: Likewise.
9538 * wincecompat.c: Likewise.
9540 2014-08-06 Gary Benson <gbenson@redhat.com>
9542 * regcache.c (init_register_cache): Move conditionals inside if.
9544 2014-08-06 Gary Benson <gbenson@redhat.com>
9546 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9548 2014-07-31 Gary Benson <gbenson@redhat.com>
9550 * ax.h: Do not include server.h.
9551 * gdbthread.h: Likewise.
9552 * lynx-low.h: Likewise.
9553 * notif.h: Likewise.
9555 2014-07-30 Gary Benson <gbenson@redhat.com>
9557 * server.h: Include common-defs.h.
9558 Do not include config.h or build-gnulib-gdbserver/config.h.
9560 2014-07-30 Gary Benson <gbenson@redhat.com>
9562 * hostio-errno.c: Move server.h to top of includes list.
9563 * inferiors.c: Likewise.
9564 * linux-x86-low.c: Likewise.
9565 * notif.c: Include server.h.
9567 2014-07-24 Tom Tromey <tromey@redhat.com>
9568 Gary Benson <gbenson@redhat.com>
9570 * server.h (CORE_ADDR): Now unsigned.
9572 2014-07-16 Pedro Alves <palves@redhat.com>
9574 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9576 2014-07-15 Pedro Alves <palves@redhat.com>
9578 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9581 2014-07-11 Pedro Alves <palves@redhat.com>
9583 * linux-low.c (kill_wait_lwp): New function, based on
9584 kill_one_lwp_callback, but use my_waitpid directly.
9585 (kill_one_lwp_callback, linux_kill): Use it.
9587 2014-06-23 Pedro Alves <palves@redhat.com>
9589 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9590 before setting DR0..DR3.
9592 2014-06-20 Gary Benson <gbenson@redhat.com>
9594 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9595 * configure: Regenerated.
9596 * config.in: Likewise.
9598 2014-06-20 Gary Benson <gbenson@redhat.com>
9600 * Makefile.in (SFILES): Update locations for files moved
9602 (object file files): Reordered.
9604 2014-06-20 Gary Benson <gbenson@redhat.com>
9606 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9607 (i386_dr_low_set_addr): Likewise.
9608 (i386_dr_low_get_addr): Likewise.
9609 (i386_dr_low_can_set_control): Likewise.
9610 (i386_dr_low_set_control): Likewise.
9611 (i386_dr_low_get_control): Likewise.
9612 (i386_dr_low_get_status): Likewise.
9613 (i386_get_debug_register_length): Likewise.
9614 * linux-x86-low.c (i386_dr_low_set_addr):
9615 Changed signature. Made static.
9616 (i386_dr_low_get_addr): Likewise.
9617 (i386_dr_low_set_control): Likewise.
9618 (i386_dr_low_get_control): Likewise.
9619 (i386_dr_low_get_status): Likewise.
9620 (i386_dr_low): New global variable.
9621 * win32-i386-low.c (i386_dr_low_set_addr):
9622 Changed signature. Made static.
9623 (i386_dr_low_get_addr): Likewise.
9624 (i386_dr_low_set_control): Likewise.
9625 (i386_dr_low_get_control): Likewise.
9626 (i386_dr_low_get_status): Likewise.
9627 (i386_dr_low): New global variable.
9629 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9631 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9632 * Makefile.in (AR, AR_FLAGS): Define.
9633 * configure: Regenerate.
9635 2014-06-19 Gary Benson <gbenson@redhat.com>
9637 * Makefile.in (i386-dregs.o): New rule.
9638 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9639 * i386-low.c (target.h): Remove include.
9640 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9641 (DR_CONTROL_SHIFT): Likewise.
9642 (DR_CONTROL_SIZE): Likewise.
9643 (DR_RW_EXECUTE): Likewise.
9644 (DR_RW_WRITE): Likewise.
9645 (DR_RW_READ): Likewise.
9646 (DR_RW_IORW): Likewise.
9647 (DR_LEN_1): Likewise.
9648 (DR_LEN_2): Likewise.
9649 (DR_LEN_4): Likewise.
9650 (DR_LEN_8): Likewise.
9651 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9652 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9653 (DR_ENABLE_SIZE): Likewise.
9654 (DR_LOCAL_SLOWDOWN): Likewise.
9655 (DR_GLOBAL_SLOWDOWN): Likewise.
9656 (DR_CONTROL_RESERVED): Likewise.
9657 (I386_DR_CONTROL_MASK): Likewise.
9658 (I386_DR_VACANT): Likewise.
9659 (I386_DR_LOCAL_ENABLE): Likewise.
9660 (I386_DR_GLOBAL_ENABLE): Likewise.
9661 (I386_DR_DISABLE): Likewise.
9662 (I386_DR_SET_RW_LEN): Likewise.
9663 (I386_DR_GET_RW_LEN): Likewise.
9664 (I386_DR_WATCH_HIT): Likewise.
9665 (i386_wp_op_t): Likewise.
9666 (i386_show_dr): Likewise.
9667 (i386_length_and_rw_bits): Likewise.
9668 (i386_insert_aligned_watchpoint): Likewise.
9669 (i386_remove_aligned_watchpoint): Likewise.
9670 (i386_handle_nonaligned_watchpoint): Likewise.
9671 i386_update_inferior_debug_regs(): Likewise.
9672 (i386_dr_insert_watchpoint): Likewise.
9673 (i386_dr_remove_watchpoint): Likewise.
9674 (i386_dr_region_ok_for_watchpoint): Likewise.
9675 (i386_dr_stopped_data_address): Likewise.
9676 (i386_dr_stopped_by_watchpoint): Likewise.
9678 2014-06-19 Gary Benson <gbenson@redhat.com>
9680 * i386-low.c (i386_dr_show): Renamed to
9681 i386_show_dr and made static. All uses updated.
9682 (i386_dr_length_and_rw_bits): Renamed to
9683 i386_length_and_rw_bits and made static.
9685 (i386_dr_insert_aligned_watchpoint): Renamed to
9686 i386_insert_aligned_watchpoint and made static.
9688 (i386_dr_remove_aligned_watchpoint): Renamed to
9689 i386_remove_aligned_watchpoint and made static.
9691 (i386_dr_update_inferior_debug_regs): Renamed to
9692 i386_update_inferior_debug_regs and made static.
9695 2014-06-18 Gary Benson <gbenson@redhat.com>
9697 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9698 (i386_dr_low_can_set_control): Likewise.
9699 (i386_get_debug_register_length): Likewise.
9700 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9701 (i386_dr_low_can_set_control): Likewise.
9702 (i386_get_debug_register_length): Likewise.
9704 2014-06-17 Gary Benson <gbenson@redhat.com>
9706 * i386-low.h (i386-dregs.h): New include.
9707 (DR_FIRSTADDR): Now in i386-dregs.h.
9708 (DR_LASTADDR): Likewise.
9709 (DR_NADDR): Likewise.
9710 (DR_STATUS): Likewise.
9711 (DR_CONTROL): Likewise.
9712 (i386_debug_reg_state): Likewise.
9713 (i386_dr_insert_watchpoint): Likewise.
9714 (i386_dr_remove_watchpoint): Likewise.
9715 (i386_dr_region_ok_for_watchpoint): Likewise.
9716 (i386_dr_stopped_data_address): Likewise.
9717 (i386_dr_stopped_by_watchpoint): Likewise.
9718 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9720 2014-06-18 Gary Benson <gbenson@redhat.com>
9722 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9723 i386_dr_insert_watchpoint.
9724 (i386_low_remove_watchpoint): Renamed to
9725 i386_dr_remove_watchpoint.
9726 (i386_low_region_ok_for_watchpoint): Renamed to
9727 i386_dr_region_ok_for_watchpoint.
9728 (i386_low_stopped_data_address): Renamed to
9729 i386_dr_stopped_data_address.
9730 (i386_low_stopped_by_watchpoint): Renamed to
9731 i386_dr_stopped_by_watchpoint.
9732 * i386-low.c (i386_show_dr): Renamed to
9733 i386_dr_show and made nonstatic. All uses updated.
9734 (i386_length_and_rw_bits): Renamed to
9735 i386_dr_length_and_rw_bits and made nonstatic.
9737 (i386_insert_aligned_watchpoint): Renamed to
9738 i386_dr_insert_aligned_watchpoint and made nonstatic.
9740 (i386_remove_aligned_watchpoint): Renamed to
9741 i386_dr_remove_aligned_watchpoint and made nonstatic.
9743 (i386_update_inferior_debug_regs): Renamed to
9744 i386_dr_update_inferior_debug_regs and made nonstatic.
9746 (i386_low_insert_watchpoint): Renamed to
9747 i386_dr_insert_watchpoint. All uses updated.
9748 (i386_low_remove_watchpoint): Renamed to
9749 i386_dr_remove_watchpoint. All uses updated.
9750 (i386_low_region_ok_for_watchpoint): Renamed to
9751 i386_dr_region_ok_for_watchpoint. All uses updated.
9752 (i386_low_stopped_data_address): Renamed to
9753 i386_dr_stopped_data_address. All uses updated.
9754 (i386_low_stopped_by_watchpoint): Renamed to
9755 i386_dr_stopped_by_watchpoint. All uses updated.
9757 2014-06-18 Gary Benson <gbenson@redhat.com>
9759 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9760 (i386_dr_low_can_set_control): Likewise.
9761 (i386_insert_aligned_watchpoint): New check.
9763 2014-06-18 Gary Benson <gbenson@redhat.com>
9765 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9768 2014-06-18 Gary Benson <gbenson@redhat.com>
9770 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9771 instead of fatal and error.
9772 (i386_handle_nonaligned_watchpoint): Likewise.
9774 2014-06-18 Gary Benson <gbenson@redhat.com>
9776 * i386-low.c (i386_get_debug_register_length): New macro.
9777 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9778 (i386_show_dr): Use debug_printf instead of fprintf. Use
9779 phex to format values.
9781 2014-06-18 Gary Benson <gbenson@redhat.com>
9783 * i386-low.h: Comment changes.
9784 * i386-low.c: Likewise.
9786 2014-06-18 Gary Benson <gbenson@redhat.com>
9788 * i386-low.c: Whitespace changes.
9790 2014-06-12 Tom Tromey <tromey@redhat.com>
9792 * utils.c (freeargv): Remove.
9794 2014-06-12 Tom Tromey <tromey@redhat.com>
9796 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9797 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9798 (parse_debug_format_options): Likewise.
9799 (gdbserver_usage): Likewise.
9800 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9801 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9802 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9804 ($(LIBGNU)): Depend on libiberty.
9805 (all-lib): Recurse into all subdirs.
9806 (install-only): Invoke "install" target in subdirs.
9807 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9809 * configure: Rebuild.
9810 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9811 for vasprintf, vsnprintf, or gettimeofday.
9812 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9815 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9817 * development.sh: Delete.
9818 * Makefile.in (config.status): Adjust dependency on development.sh.
9819 * configure.ac: Adjust development.sh source call.
9820 * configure: Regenerate.
9822 2014-06-02 Pedro Alves <palves@redhat.com>
9824 * ax.c (gdb_free_agent_expr): New function.
9825 * ax.h (gdb_free_agent_expr): New declaration.
9826 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9828 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9830 (clear_breakpoint_conditions_and_commands): New function.
9831 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9832 (clear_breakpoint_conditions_and_commands): New declaration.
9834 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9836 * linux-aarch64-low.c (asm/ptrace.h): Include.
9838 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9840 Fix TLS access for -static -pthread.
9841 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9842 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9843 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9845 2014-05-20 Pedro Alves <palves@redhat.com>
9847 * linux-aarch64-low.c (aarch64_insert_point)
9848 (aarch64_remove_point): No longer check whether the type is
9849 supported here. Adjust to new interface.
9850 (the_low_target): Install aarch64_supports_z_point_type as
9851 supports_z_point_type method.
9852 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9853 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9854 instead of a Z packet char. Adjust.
9855 (arm_supports_z_point_type): New function.
9856 (arm_insert_point, arm_remove_point): Adjust to new interface.
9857 (the_low_target): Install arm_supports_z_point_type.
9858 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9859 (cris_insert_point, cris_remove_point): Adjust to new interface.
9860 Don't check whether the type is supported here.
9861 (the_low_target): Install cris_supports_z_point_type.
9862 * linux-low.c (linux_supports_z_point_type): New function.
9863 (linux_insert_point, linux_remove_point): Adjust to new interface.
9864 * linux-low.h (struct linux_target_ops) <insert_point,
9865 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9866 raw_breakpoint pointer parameter.
9867 <supports_z_point_type>: New method.
9868 * linux-mips-low.c (mips_supports_z_point_type): New function.
9869 (mips_insert_point, mips_remove_point): Adjust to new interface.
9870 Use mips_supports_z_point_type.
9871 (the_low_target): Install mips_supports_z_point_type.
9872 * linux-ppc-low.c (the_low_target): Install NULL as
9873 supports_z_point_type method.
9874 * linux-s390-low.c (the_low_target): Install NULL as
9875 supports_z_point_type method.
9876 * linux-sparc-low.c (the_low_target): Install NULL as
9877 supports_z_point_type method.
9878 * linux-x86-low.c (x86_supports_z_point_type): New function.
9879 (x86_insert_point): Adjust to new insert_point interface. Use
9880 insert_memory_breakpoint. Adjust to new
9881 i386_low_insert_watchpoint interface.
9882 (x86_remove_point): Adjust to remove_point interface. Use
9883 remove_memory_breakpoint. Adjust to new
9884 i386_low_remove_watchpoint interface.
9885 (the_low_target): Install x86_supports_z_point_type.
9886 * lynx-low.c (lynx_target_ops): Install NULL as
9887 supports_z_point_type callback.
9888 * nto-low.c (nto_supports_z_point_type): New.
9889 (nto_insert_point, nto_remove_point): Adjust to new interface.
9890 (nto_target_ops): Install nto_supports_z_point_type.
9891 * mem-break.c: Adjust intro comment.
9892 (struct raw_breakpoint) <raw_type, size>: New fields.
9893 <inserted>: Update comment.
9894 <shlib_disabled>: Delete field.
9895 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9896 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9897 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9898 (raw_bkpt_type_to_target_hw_bp_type): New function.
9899 (find_enabled_raw_code_breakpoint_at): New function.
9900 (find_raw_breakpoint_at): New type and size parameters. Use them.
9901 (insert_memory_breakpoint): New function, based off
9902 set_raw_breakpoint_at.
9903 (remove_memory_breakpoint): New function.
9904 (set_raw_breakpoint_at): Reimplement.
9905 (set_breakpoint): New, based on set_breakpoint_at.
9906 (set_breakpoint_at): Reimplement.
9907 (delete_raw_breakpoint): Go through the_target->remove_point
9908 instead of assuming memory breakpoints.
9909 (find_gdb_breakpoint_at): Delete.
9910 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9911 (find_gdb_breakpoint): New function.
9912 (set_gdb_breakpoint_at): Delete.
9913 (z_type_supported): New function.
9914 (set_gdb_breakpoint_1): New function, loosely based off
9915 set_gdb_breakpoint_at.
9916 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9917 (delete_gdb_breakpoint_at): Delete.
9918 (delete_gdb_breakpoint_1): New function, loosely based off
9919 delete_gdb_breakpoint_at.
9920 (delete_gdb_breakpoint): New function.
9921 (clear_gdb_breakpoint_conditions): Rename to ...
9922 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9924 (add_condition_to_breakpoint): Make static.
9925 (add_breakpoint_condition): Take a struct breakpoint pointer
9926 instead of an address. Adjust.
9927 (gdb_condition_true_at_breakpoint): Rename to ...
9928 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9930 (gdb_condition_true_at_breakpoint): Reimplement.
9931 (add_breakpoint_commands): Take a struct breakpoint pointer
9932 instead of an address. Adjust.
9933 (gdb_no_commands_at_breakpoint): Rename to ...
9934 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9935 parameter. Return true if no breakpoint was found. Change debug
9937 (gdb_no_commands_at_breakpoint): Reimplement.
9938 (run_breakpoint_commands): Rename to ...
9939 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9940 and change return type to boolean.
9941 (run_breakpoint_commands): New function.
9942 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9943 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9944 breakpoint. Go through the_target->remove_point instead of
9945 assuming memory breakpoint.
9946 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9947 software and hardware breakpoints.
9948 (reinsert_raw_breakpoint): Go through the_target->insert_point
9949 instead of assuming memory breakpoint.
9950 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9951 software and hardware breakpoints.
9952 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9953 Check both software and hardware breakpoints.
9954 (validate_inserted_breakpoint): Assert the breakpoint is a
9955 software breakpoint. Set the inserted flag to -1 instead of
9956 setting shlib_disabled.
9957 (delete_disabled_breakpoints): Adjust.
9958 (validate_breakpoints): Only validate software breakpoints.
9959 Adjust to inserted flag change.
9960 (check_mem_read, check_mem_write): Skip breakpoint types other
9961 than software breakpoints. Adjust to inserted flag change.
9962 * mem-break.h (enum raw_bkpt_type): New enum.
9963 (raw_breakpoint, struct process_info): Forward declare.
9964 (Z_packet_to_target_hw_bp_type): Delete declaration.
9965 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9966 (set_gdb_breakpoint, delete_gdb_breakpoint)
9967 (clear_breakpoint_conditions): New declarations.
9968 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9969 (breakpoint_inserted_here): Update comment.
9970 (add_breakpoint_condition, add_breakpoint_commands): Replace
9971 address parameter with a breakpoint pointer parameter.
9972 (gdb_breakpoint_here): Update comment.
9973 (delete_gdb_breakpoint_at): Delete.
9974 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9975 * server.c (process_point_options): Take a struct breakpoint
9976 pointer instead of an address. Adjust.
9977 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9978 delete_gdb_breakpoint.
9979 * spu-low.c (spu_target_ops): Install NULL as
9980 supports_z_point_type method.
9981 * target.h: Include mem-break.h.
9982 (struct target_ops) <prepare_to_access_memory>: Update comment.
9983 <supports_z_point_type>: New field.
9984 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9985 instead of a char. Also take a raw breakpoint pointer.
9986 * win32-arm-low.c (the_low_target): Install NULL as
9987 supports_z_point_type.
9988 * win32-i386-low.c (i386_supports_z_point_type): New function.
9989 (i386_insert_point, i386_remove_point): Adjust to new interface.
9990 (the_low_target): Install i386_supports_z_point_type.
9991 * win32-low.c (win32_supports_z_point_type): New function.
9992 (win32_insert_point, win32_remove_point): Adjust to new interface.
9993 (win32_target_ops): Install win32_supports_z_point_type.
9994 * win32-low.h (struct win32_target_ops):
9995 <supports_z_point_type>: New method.
9996 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9997 instead of a char. Also take a raw breakpoint pointer.
9999 2014-05-20 Pedro Alves <palves@redhat.com>
10001 * mem-break.h: Include break-common.h.
10002 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10003 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10004 (Z_packet_to_target_hw_bp_type): New declaration.
10005 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10006 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10007 (Z_PACKET_ACCESS_WP): Delete macros.
10008 (Z_packet_to_hw_type): Delete function.
10009 * i386-low.h: Don't include break-common.h here.
10010 (Z_packet_to_hw_type): Delete declaration.
10011 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10012 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10013 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10014 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10015 * linux-aarch64-low.c: Don't include break-common.h here.
10016 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10017 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10018 (Z_packet_to_target_hw_bp_type): Delete function.
10019 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10021 (mips_insert_point, mips_remove_point): Use
10022 Z_packet_to_target_hw_bp_type.
10024 2014-05-20 Pedro Alves <palves@redhat.com>
10026 * linux-aarch64-low.c: Include break-common.h.
10027 (enum target_point_type): Delete.
10028 (Z_packet_to_point_type): Rename to ...
10029 (Z_packet_to_target_hw_bp_type): ... this, and return a
10030 target_hw_bp_type instead.
10031 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10032 instead of an enum target_point_type.
10033 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10035 (aarch64_dr_state_insert_one_point)
10036 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10037 (aarch64_handle_aligned_watchpoint)
10038 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10039 Take an enum target_hw_bp_type instead of an enum
10041 (aarch64_supports_z_point_type): New function.
10042 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10043 use Z_packet_to_target_hw_bp_type.
10045 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10047 * configure.ac: Only use -Werror by default when DEVELOPMENT
10049 * configure: Regenerate.
10051 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10053 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10054 * linux-x86-low.c (X86_64_USER_REGS): New.
10055 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10057 2014-04-28 Yao Qi <yao@codesourcery.com>
10059 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10062 2014-04-25 Pedro Alves <palves@redhat.com>
10065 * linux-low.c (linux_attach_fail_reason_string): New function.
10066 (linux_attach_lwp): Delete.
10067 (linux_attach_lwp_1): Rename to ...
10068 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10069 argument. Remove "initial" parameter. Return int instead of
10070 void. Don't error or warn here.
10071 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10072 failure to attach to the tgid. Call warning when failing to
10074 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10075 argument. Remove "initial" parameter. Return int instead of
10076 void. Don't error or warn here.
10077 (linux_attach_fail_reason_string): New declaration.
10078 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10079 interface change. Use linux_attach_fail_reason_string.
10081 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10082 Walfred Tedeschi <walfred.tedeschi@intel.com>
10084 * Makefile.in: Added rules to handle new files
10085 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10086 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10087 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10088 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10089 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10090 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10091 x32-avx512-linux.o.
10092 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10093 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10094 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10095 i386/x32-avx512.xml.
10096 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10097 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10098 i386/x32-avx512-linux.xml.
10099 * i387-fp.c (num_avx512_k_registers): New constant for number
10101 (num_avx512_zmmh_low_registers): New constant for number of
10102 lower ZMM registers (0-15).
10103 (num_avx512_zmmh_high_registers): New constant for number of
10104 higher ZMM registers (16-31).
10105 (num_avx512_ymmh_registers): New contant for number of higher
10106 YMM registers (ymm16-31 added by avx521 on x86_64).
10107 (num_avx512_xmm_registers): New constant for number of higher
10108 XMM registers (xmm16-31 added by AVX512 on x86_64).
10109 (struct i387_xsave): Add space for AVX512 registers.
10110 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10111 Add code to handle AVX512 registers.
10112 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10113 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10114 prototypei from generated file.
10115 (tdesc_amd64_avx512_linux): Likewise.
10116 (init_registers_x32_avx512_linux): Likewise.
10117 (tdesc_x32_avx512_linux): Likewise.
10118 (init_registers_i386_avx512_linux): Likewise.
10119 (tdesc_i386_avx512_linux): Likewise.
10120 (x86_64_regmap): Add AVX512 registers.
10121 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10123 (initialize_low_arch): Add code to initialize AVX512 registers.
10125 2014-04-23 Pedro Alves <palves@redhat.com>
10127 * mem-break.c (find_gdb_breakpoint_at): Make static.
10128 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10130 2014-04-23 Pedro Alves <palves@redhat.com>
10132 * i386-low.c: Don't include break-common.h here.
10133 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10134 prototype to take target_hw_bp_type as argument instead of a Z
10136 * i386-low.h: Include break-common.h here.
10137 (Z_packet_to_hw_type): Declare.
10138 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10140 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10141 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10142 (x86_remove_point): Convert the packet number to a
10143 target_hw_bp_type before calling i386_low_remove_watchpoint.
10144 * win32-i386-low.c (i386_insert_point): Convert the packet number
10145 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10146 (i386_remove_point): Convert the packet number to a
10147 target_hw_bp_type before calling i386_low_remove_watchpoint.
10149 2014-04-23 Pedro Alves <palves@redhat.com>
10151 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10153 2014-04-10 Pedro Alves <palves@redhat.com>
10155 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10156 Check if the condition or command is NULL before checking if the
10157 breakpoint is known. On success, return true.
10158 * mem-break.h (add_breakpoint_condition): Document return.
10159 (add_breakpoint_commands): Add describing comment.
10160 * server.c (skip_to_semicolon): New function.
10161 (process_point_options): Use it.
10163 2014-04-09 Pedro Alves <palves@redhat.com>
10165 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10168 2014-02-27 Pedro Alves <palves@redhat.com>
10171 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10173 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10175 (last_thread_of_process_p): Take a PID argument instead of a
10177 (linux_wait_for_lwp): Delete.
10178 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10180 (linux_low_filter_event): New function, party factored out from
10181 linux_wait_for_event.
10182 (linux_wait_for_event): Rename to ...
10183 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10184 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10185 sigsuspend. Check for zombie leaders.
10186 (linux_wait_for_event): Reimplement as wrapper around
10187 linux_wait_for_event_filtered.
10188 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10189 a normal or signal exit is seen, it's the whole process exiting.
10190 (wait_for_sigstop): No longer a for_each_inferior callback.
10191 Rewrite on top of linux_wait_for_event_filtered.
10192 (stop_all_lwps): Call wait_for_sigstop directly.
10193 * server.c (resume, handle_target_event): Handle
10194 TARGET_WAITKIND_NO_RESUMED.
10196 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10198 * win32-low.c (psapi_get_dll_name,
10199 * win32_CreateToolhelp32Snapshot): Delete.
10200 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10201 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10203 (handle_load_dll): Add function description.
10204 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10206 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10208 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10210 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10211 base address when calling win32_add_one_solib.
10212 (handle_load_dll): Delete local variable load_addr.
10213 Remove 0x1000 offset applied to DLL base address when calling
10214 win32_add_one_solib.
10215 (handle_unload_dll): Add comment.
10217 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10219 * win32-low.c (win32_add_all_dlls): Renames
10220 win32_ensure_ntdll_loaded. Rewrite function documentation.
10221 Adjust implementation to always load all DLLs.
10222 Add 0x1000 offset to DLL base address when calling
10223 win32_add_one_solib.
10224 (child_initialization_done): New static global.
10225 (do_initial_child_stuff): Set child_initialization_done to
10226 zero during child initialization, and 1 after. Replace call
10227 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10229 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10230 (handle_unload_dll): Add function documentation.
10231 (get_child_debug_event): Ignore load and unload DLL events
10232 during child initialization.
10234 2014-02-20 Doug Evans <dje@google.com>
10236 Remove global all_lwps.
10237 * inferiors.h (ptid_of): Move here from linux-low.h.
10238 (pid_of, lwpid_of): Ditto.
10239 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10240 parameter is a struct thread_info * now.
10241 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10242 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10243 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10245 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10246 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10247 * linux-arm-low.c (update_registers_callback): Update, "entry"
10248 parameter is a struct thread_info * now.
10249 Fetch lwpid from current_inferior directly.
10250 (arm_insert_point): Pass &all_threads to find_inferior instead of
10252 (arm_remove_point): Ditto.
10253 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10254 (arm_prepare_to_resume): Fetch pid from thread.
10255 (arm_read_description): Fetch lwpid from current_inferior directly.
10256 * linux-low.c (all_lwps): Delete.
10257 (delete_lwp): Delete call to remove_inferior.
10258 (handle_extended_wait): Fetch lwpid from thread.
10259 (add_lwp): Don't set lwp->entry.id. Remove call to
10260 add_inferior_to_list.
10261 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10262 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10263 (kill_one_lwp_callback): Ditto.
10264 (linux_kill): Don't dereference NULL pointer.
10265 Fetch ptid,lwpid from thread.
10266 (get_detach_signal): Fetch ptid from thread.
10267 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10268 Simplify call to regcache_invalidate_thread.
10269 (delete_lwp_callback): Update, "entry" parameter is a
10270 struct thread_info * now. Fetch pid from thread.
10271 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10272 (status_pending_p_callback): Update, "entry" parameter is a
10273 struct thread_info * now. Fetch ptid from thread.
10274 (find_lwp_pid): Update, "entry" parameter is a
10275 struct thread_info * now.
10276 (linux_wait_for_lwp): Fetch pid from thread.
10277 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10278 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10279 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10280 (dequeue_one_deferred_signal): Ditto.
10281 (cancel_breakpoint): Fetch ptid from current_inferior.
10282 (linux_wait_for_event): Pass &all_threads to find_inferior,
10283 not &all_lwps. Fetch ptid, lwpid from thread.
10284 (count_events_callback): Update, "entry" parameter is a
10285 struct thread_info * now.
10286 (select_singlestep_lwp_callback): Ditto.
10287 (select_event_lwp_callback): Ditto.
10288 (cancel_breakpoints_callback): Ditto.
10289 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10291 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10292 (unsuspend_one_lwp): Update, "entry" parameter is a
10293 struct thread_info * now.
10294 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10296 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10297 Fetch lwpid from thread, not lwp.
10298 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10299 Pass &all_threads to find_inferior, not &all_lwps.
10300 (send_sigstop): Fetch lwpid from thread, not lwp.
10301 (send_sigstop_callback): Update, "entry" parameter is a
10302 struct thread_info * now.
10303 (suspend_and_send_sigstop_callback): Ditto.
10304 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10305 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10306 struct thread_info * now.
10307 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10309 (lwp_running): Update, "entry" parameter is a
10310 struct thread_info * now.
10311 (stop_all_lwps): Fetch ptid from thread.
10312 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10313 (linux_resume_one_lwp): Fetch lwpid from thread.
10314 (linux_set_resume_request): Update, "entry" parameter is a
10315 struct thread_info * now. Fetch pid, lwpid from thread.
10316 (resume_status_pending_p): Update, "entry" parameter is a
10317 struct thread_info * now.
10318 (need_step_over_p): Ditto. Fetch lwpid from thread.
10319 (start_step_over): Fetch lwpid from thread.
10320 (linux_resume_one_thread): Update, "entry" parameter is a
10321 struct thread_info * now. Fetch lwpid from thread.
10322 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10323 (proceed_one_lwp): Update, "entry" parameter is a
10324 struct thread_info * now. Fetch lwpid from thread.
10325 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10326 struct thread_info * now.
10327 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10328 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10329 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10331 (regsets_store_inferior_registers): Ditto.
10332 (fetch_register, store_register): Ditto.
10333 (linux_read_memory, linux_write_memory): Ditto.
10334 (linux_request_interrupt): Ditto.
10335 (linux_read_auxv): Ditto.
10336 (linux_xfer_siginfo): Ditto.
10337 (linux_qxfer_spu): Ditto.
10338 (linux_qxfer_libraries_svr4): Ditto.
10339 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10340 moved to inferiors.h.
10342 (get_thread_lwp): Update.
10343 (struct lwp_info): Delete member "entry". Simplify comment for
10345 (all_lwps): Delete.
10346 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10347 current_inferior directly.
10348 (update_watch_registers_callback): Update, "entry" parameter is a
10349 struct thread_info * now. Fetch pid from thread.
10350 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10351 (mips_insert_point): Fetch lwpid from current_inferior.
10352 Pass &all_threads to find_inferior, not &all_lwps.
10353 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10354 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10356 (mips_stopped_data_address): Ditto.
10357 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10359 * linux-tile-low.c (tile_arch_setup): Ditto.
10360 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10361 (update_debug_registers_callback): Update, "entry" parameter is a
10362 struct thread_info * now. Fetch pid from thread.
10363 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10364 Pass &all_threads to find_inferior, not &all_lwps.
10365 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10366 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10367 Pass &all_threads to find_inferior, not &all_lwps.
10368 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10369 (i386_dr_low_get_status): Ditto.
10370 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10371 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10372 (x86_linux_read_description): Ditto.
10373 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10375 2014-02-20 Doug Evans <dje@google.com>
10377 * inferiors.c (get_first_inferior): Fix buglet.
10379 2014-02-19 Doug Evans <dje@google.com>
10381 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10382 * inferiors.c (add_thread): Change result type to struct thread_info *.
10383 All callers updated.
10384 (add_lwp): Call add_thread here instead of in callers.
10385 All callers updated.
10386 * linux-low.h (get_lwp_thread): Rewrite.
10387 (struct lwp_info): New member "thread".
10389 2014-02-19 Doug Evans <dje@google.com>
10391 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10392 All callers updated.
10394 2014-02-19 Doug Evans <dje@google.com>
10396 * inferiors.c (add_thread): Fix whitespace.
10398 2014-02-19 Doug Evans <dje@google.com>
10400 * dll.c (clear_dlls): Replace accessing list implemention details
10402 * gdbthread.h (get_first_thread): Declare.
10403 * inferiors.c (for_each_inferior_with_data): New function.
10404 (get_first_thread): New function.
10405 (find_thread_ptid): Simplify.
10406 (get_first_inferior): New function.
10407 (clear_list): Delete.
10408 (one_inferior_p): New function.
10409 (clear_inferior_list): New function.
10410 (clear_inferiors): Update.
10411 * inferiors.h (for_each_inferior_with_data): Declare.
10412 (clear_inferior_list): Declare.
10413 (one_inferior_p): Declare.
10414 (get_first_inferior): Declare.
10415 * linux-low.c (linux_wait_for_event): Replace accessing list
10416 implemention details with API function.
10417 * server.c (target_running): Ditto.
10418 (accumulate_file_name_length): New function.
10419 (emit_dll_description): New function.
10420 (handle_qxfer_libraries): Replace accessing list implemention
10421 details with API function.
10422 (handle_qxfer_threads_worker): New function.
10423 (handle_qxfer_threads_proper): Replace accessing list implemention
10424 details with API function.
10425 (handle_query): Ditto.
10426 (visit_actioned_threads_callback_ftype): New typedef.
10427 (visit_actioned_threads_data): New struct.
10428 (visit_actioned_threads): Rewrite to be find_inferior callback.
10429 (resume): Call find_inferior.
10430 (handle_status): Replace accessing list implemention
10431 details with API function.
10432 (process_serial_event): Replace accessing list implemention details
10434 * target.c (set_desired_inferior): Replace accessing list implemention
10435 details with API function.
10436 * tracepoint.c (same_process_p): New function.
10437 (gdb_agent_about_to_close): Replace accessing list implemention
10438 details with API function.
10439 * win32-low.c (child_delete_thread): Replace accessing list
10440 implemention details with API function.
10441 (match_dll_by_basename): New function.
10442 (dll_is_loaded_by_basename): New function.
10443 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10444 details call to dll_is_loaded_by_basename.
10446 2014-02-19 Doug Evans <dje@google.com>
10448 * dll.h (struct dll_info): Add comment.
10449 * gdbthread.h (struct thread_info): Add comment.
10450 (current_ptid): Simplify.
10451 * inferiors.c (add_process): Update.
10452 (remove_process): Update.
10453 * inferiors.h (struct process_info): Rename member "head" to "entry".
10454 * linux-low.c (delete_lwp): Update.
10456 (last_thread_of_process_p): Update.
10457 (kill_one_lwp_callback, linux_kill): Update.
10458 (status_pending_p_callback): Update.
10459 (wait_for_sigstop): Update. Simplify read of ptid.
10460 (start_step_over): Update.
10461 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10462 (get_lwp_thread): Update.
10463 (struct lwp_info): Rename member "head" to "entry".
10464 * regcache.h (inferior_list_entry): Delete.
10465 * server.c (kill_inferior_callback): Update.
10466 (detach_or_kill_inferior_callback): Update.
10467 (print_started_pid): Update.
10468 (print_attached_pid): Update.
10469 (process_serial_event): Simplify read of ptid.
10470 * thread-db.c (thread_db_create_event): Update.
10471 (thread_db_get_tls_address): Update.
10472 * win32-low.c (current_inferior_ptid): Simplify.
10474 2014-02-19 Tom Tromey <tromey@redhat.com>
10476 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10478 (target_supports_btrace): Update.
10480 2014-02-14 Yao Qi <yao@codesourcery.com>
10482 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10483 (rsp-low-ipa.o): New target.
10485 2014-02-12 Tom Tromey <tromey@redhat.com>
10487 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10488 convert_ascii_to_int.
10489 * regcache.c (registers_to_string): Likewise.
10490 * remote-utils.c (decode_M_packet): Likewise.
10491 * server.c (process_serial_event): Likewise.
10493 2014-02-12 Tom Tromey <tromey@redhat.com>
10495 * server.c (handle_query, handle_v_run): Use hex2bin, not
10497 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10499 2014-02-12 Tom Tromey <tromey@redhat.com>
10501 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10502 convert_int_to_ascii.
10503 * regcache.c (registers_to_string, collect_register_as_string):
10505 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10507 * server.c (process_serial_event): Likewise.
10508 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10509 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10511 2014-02-12 Tom Tromey <tromey@redhat.com>
10513 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10514 bin2hex, not hexify.
10515 * tracepoint.c (cmd_qtstatus): Likewise.
10517 2014-02-12 Tom Tromey <tromey@redhat.com>
10519 * remote-utils.c (monitor_output): Pass explicit length to
10522 2014-02-12 Tom Tromey <tromey@redhat.com>
10524 * tracepoint.c: Include rsp-low.h.
10525 * server.c: Include rsp-low.h.
10526 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10527 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10529 * remote-utils.c: Include rsp-low.h.
10530 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10531 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10532 (convert_int_to_ascii, convert_ascii_to_int): Move to
10534 * regcache.c: Include rsp-low.h.
10535 * ax.c: Include rsp-low.h.
10536 * Makefile.in (SFILES): Add common/rsp-low.c.
10537 (OBS): Add rsp-low.o.
10538 (rsp-low.o): New target.
10540 2014-02-12 Tom Tromey <tromey@redhat.com>
10542 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10543 Include print-utils.h.
10544 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10545 (plongest, thirty_two, phex_nz): Remove.
10546 * Makefile.in (SFILES): Add common/print-utils.c.
10547 (OBS): Add print-utils.o.
10548 (print-utils-ipa.o): New target.
10549 (print-utils.o): New target.
10550 (IPA_OBJS): Add print-utils-ipa.o.
10552 2014-02-06 Tom Tromey <tromey@redhat.com>
10554 * Makefile.in (SFILES): Fix indentation.
10556 2014-02-05 Doug Evans <dje@google.com>
10558 * linux-low.c (linux_wait_for_event): Improve comment.
10559 (linux_wait_1): Keep current_inferior in sync with event_child.
10561 2014-01-22 Doug Evans <dje@google.com>
10563 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10565 2014-01-22 Doug Evans <dje@google.com>
10567 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10568 * configure: Regenerate.
10569 * config.in: Regenerate.
10570 * Makefile.in (SFILES): Add debug.c.
10571 (OBS): Add debug.o.
10572 * debug.c: New file.
10573 * debug.h: New file.
10574 * linux-aarch64-low.c (*): Update all debugging printfs to use
10575 debug_printf instead of fprintf.
10576 * linux-arm-low.c (*): Ditto.
10577 * linux-cris-low.c (*): Ditto.
10578 * linux-crisv32-low.c (*): Ditto.
10579 * linux-m32r-low.c (*): Ditto.
10580 * linux-sparc-low.c (*): Ditto.
10581 * linux-x86.c (*): Ditto.
10582 * linux-low.c (*): Ditto.
10583 (linux_wait_1): Add calls to debug_enter, debug_exit.
10584 (linux_wait): Remove redundant debugging printf.
10585 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10586 (linux_resume, unstop_all_lwps): Ditto.
10587 * mem-break.c (*): Update all debugging printfs to use
10588 debug_printf instead of fprintf.
10589 * remote-utils.c (*): Ditto.
10590 * thread-db.c (*): Ditto.
10591 * server.c #include <ctype.h>, "gdb_vecs.h".
10592 (debug_threads): Moved to debug.c.
10593 (*): Update all debugging printfs to use debug_printf instead of
10595 (start_inferior): Replace call to fflush with call to debug_flush.
10596 (monitor_show_help): Mention set debug-format.
10597 (parse_debug_format_options): New function.
10598 (handle_monitor_command): Handle "monitor set debug-format".
10599 (gdbserver_usage): Mention --debug-format.
10600 (main): Parse --debug-format.
10601 * server.h (debug_threads): Declaration moved to debug.h.
10602 #include "debug.h".
10603 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10604 trace_debug_1 that uses debug_printf.
10605 (tracepoint_look_up_symbols): Update all debugging printfs to use
10606 debug_printf instead of fprintf.
10608 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10610 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10613 2014-01-17 Pedro Alves <palves@redhat.com>
10616 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10617 defined after including gdb_proc_service.h.
10619 2014-01-16 Doug Evans <dje@google.com>
10621 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10622 (match_dll): Use it.
10624 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10626 * target.h (target_ops) <read_btrace>: Change parameters and
10627 return type to allow error reporting.
10628 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10629 trace reading errors on.
10630 * linux-low.c (linux_low_read_btrace): Pass trace reading
10632 (linux_low_disable_btrace): New.
10634 2014-01-15 Doug Evans <dje@google.com>
10636 * inferiors.c (thread_id_to_gdb_id): Delete.
10637 * inferiors.h (thread_id_to_gdb_id): Delete.
10639 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10641 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10642 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10645 2014-01-08 Pedro Alves <palves@redhat.com>
10647 * server.c (handle_status): Don't discard previous queued stop
10648 replies or thread's pending status here.
10649 (main) <disconnection>: Do it here instead.
10651 2014-01-08 Pedro Alves <palves@redhat.com>
10653 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10654 * server.c (visit_actioned_threads, handle_pending_status): New
10656 (handle_v_cont): Factor out parts to ...
10657 (resume): ... this new function. If in all-stop, and a thread
10658 being resumed has a pending status, report it without actually
10660 (myresume): Adjust to use the new 'resume' function.
10661 (clear_pending_status_callback, set_pending_status_callback)
10662 (find_status_pending_thread_callback): New functions.
10663 (handle_status): Handle the case of multiple threads having
10664 interesting statuses to report. Report threads' real last signal
10665 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10666 with an interesting thread to report the status for, instead of
10667 always reporting the status of the first thread.
10669 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10671 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10672 * gdbreplay.c (gdbreplay_version): Likewise.
10674 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10676 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10677 iov.iov_len with the real length in use.
10679 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10681 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10682 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10683 for all targets that use win32-low.c.
10684 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10685 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10687 2013-12-13 Pedro Alves <palves@redhat.com>
10689 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10690 if equal to TARGET_WAITKIND_LOADED.
10691 * win32-low.c (cached_status): New static global.
10692 (win32_wait): Add declaration.
10693 (do_initial_child_stuff): Flush all initial pending debug events
10694 up to the initial breakpoint.
10695 (win32_wait): If CACHED_STATUS was set, return that instead
10696 of doing a real wait. Remove the code resuming the execution
10697 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10698 during the initial phase. Also remove the code changing
10699 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10700 TARGET_WAITKIND_STOPPED.
10702 2013-12-11 Yao Qi <yao@codesourcery.com>
10704 * notif.c (handle_notif_ack): Return 0 if no notification
10707 2013-11-20 Doug Evans <dje@google.com>
10709 * linux-low.c (linux_set_resume_request): Fix comment.
10711 2013-11-20 Doug Evans <dje@google.com>
10713 * linux-low.c (resume_status_pending_p): Tweak comment.
10715 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10717 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10718 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10719 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10720 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10721 (srv_amd64_regobj): Add amd64-mpx.o.
10722 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10723 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10724 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10725 * i387-fp.c (num_pl_bnd_register) Added constant.
10726 (num_pl_bnd_cfg_registers) Added constant.
10727 (struct i387_xsave) Added reserved area and MPX fields.
10728 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10729 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10731 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10732 (init_registers_amd64_mpx_linux): Declare new function.
10733 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10734 (x86_64_regmap): Add MPX registers.
10735 (x86_linux_read_description): Add MPX case.
10736 (initialize_low_arch): Initialize MPX targets.
10738 2013-11-18 Tom Tromey <tromey@redhat.com>
10740 * configure: Rebuild.
10741 * configure.ac: Don't check for stdlib.h.
10742 * gdbreplay.c: Unconditionally include stdlib.h.
10744 2013-11-18 Tom Tromey <tromey@redhat.com>
10746 * config.in: Rebuild.
10747 * configure: Rebuild.
10748 * configure.ac: Don't use AC_HEADER_DIRENT.
10750 2013-11-18 Tom Tromey <tromey@redhat.com>
10752 * server.h: Don't check HAVE_STRING_H.
10753 * gdbreplay.c: Don't check HAVE_STRING_H.
10754 * configure: Rebuild.
10756 2013-11-18 Tom Tromey <tromey@redhat.com>
10758 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10761 2013-11-08 Tom Tromey <tromey@redhat.com>
10763 * configure, config.in: Rebuild.
10764 * configure.ac: Remove unused configury.
10766 2013-11-08 Tom Tromey <tromey@redhat.com>
10768 * acinclude.m4: Include common.m4, codeset.m4.
10769 * configure, config.in: Rebuild.
10770 * configure.ac: Use GDB_AC_COMMON.
10772 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10774 * linux-s390-low.c (HWCAP_S390_TE): New define.
10775 (s390_arch_setup): Consider the TE field in the HWCAP for
10776 determining 'have_regset_tdb'.
10778 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10781 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10784 2013-10-02 Pedro Alves <palves@redhat.com>
10786 * server.c (process_serial_event): Don't output "GDBserver
10787 exiting" if GDB is connected through stdio.
10788 * target.c (mywait): Likewise, be silent if GDB is connected
10791 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10793 * lynx-low.c (lynx_add_threads_after_attach): New function.
10794 (lynx_attach): Remove call to add_thread. Add call to
10795 lynx_add_threads_after_attach instead.
10797 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10799 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10800 * config.in, configure: Regenerated.
10802 2013-09-18 Yao Qi <yao@codesourcery.com>
10805 * server.c (start_inferior): Clear 'resume_info'.
10807 2013-09-16 Jiong Wang <jiwang@tilera.com>
10809 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10812 2013-09-16 Jiong Wang <jiwang@tilera.com>
10814 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10815 linux-tile-low.o to srv_tgtobj.
10817 2013-09-16 Will Newton <will.newton@linaro.org>
10819 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10822 2013-09-06 Pedro Alves <palves@redhat.com>
10824 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10825 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10826 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10827 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10828 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10829 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10831 2013-09-06 Pedro Alves <palves@redhat.com>
10833 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10834 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10836 2013-09-06 Pedro Alves <palves@redhat.com>
10838 * linux-amd64-ipa.c: Include tracepoint.h.
10839 * linux-i386-ipa.c: Include tracepoint.h.
10841 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10843 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10844 (ps_get_thread_area): New function.
10846 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10848 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10849 (initialize_low_arch): Call init_registers_crisv32 rather than
10850 init_register_crisv32.
10852 2013-09-05 Pedro Alves <palves@redhat.com>
10854 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10856 * hostio.h: ... this new file.
10857 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10858 win32-low.c: Include hostio.h.
10860 2013-09-05 Pedro Alves <palves@redhat.com>
10862 * server.h (gdb_client_data, handler_func, callback_handler_func)
10863 (delete_file_handler, add_file_handler, append_callback_event)
10864 (delete_callback_event, start_event_loop, initialize_event_loop):
10865 Move to event-loop.h and include it.
10866 * event-loop.h: New file.
10868 2013-09-05 Pedro Alves <palves@redhat.com>
10870 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10871 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10872 (loaded_dll, unloaded_dll): Move to ...
10873 * dll.h: ... this new file.
10874 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10876 2013-09-05 Pedro Alves <palves@redhat.com>
10878 * server.h (current_process, get_thread_process, all_processes)
10879 (add_inferior_to_list, for_each_inferior, current_inferior)
10880 (remove_inferior, add_process, remove_process, find_process_pid)
10881 (have_started_inferiors_p, have_attached_inferiors_p)
10882 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10883 (clear_inferiors, find_inferior, find_inferior_id)
10884 (inferior_target_data, set_inferior_target_data)
10885 (inferior_regcache_data, set_inferior_regcache_data): Move to
10886 inferiors.h, and include it.
10887 * inferiors.h: New file.
10889 2013-09-05 Pedro Alves <palves@redhat.com>
10891 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10895 2013-09-05 Pedro Alves <palves@redhat.com>
10897 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10899 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10900 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10901 (handle_tracepoint_general_set, handle_tracepoint_query)
10902 (tracepoint_finished_step, tracepoint_was_hit)
10903 (release_while_stepping_state_list, current_traceframe)
10904 (in_readonly_region, traceframe_read_mem)
10905 (fetch_traceframe_registers, traceframe_read_sdata)
10906 (traceframe_read_info, struct fast_tpoint_collect_status)
10907 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10908 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10909 (supply_fast_tracepoint_registers)
10910 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10911 (ipa_tdesc, claim_trampoline_space)
10912 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10913 (agent_mem_read, agent_get_trace_state_variable_value)
10914 (agent_set_trace_state_variable_value, agent_tsv_read)
10915 (agent_mem_read_string, get_raw_reg_func_addr)
10916 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10917 * tracepoint.h: ... this new file.
10919 2013-09-05 Pedro Alves <palves@redhat.com>
10921 * server.h (perror_with_name, error, fatal, warning, paddress)
10922 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10924 * utils.h: New file.
10926 2013-09-05 Pedro Alves <palves@redhat.com>
10928 * server.h (remote_debug, noack_mode, transport_is_reliable)
10929 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10930 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10931 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10932 (write_enn, initialize_async_io, enable_async_io)
10933 (disable_async_io, check_remote_input_interrupt_request)
10934 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10935 (dead_thread_notify, prepare_resume_reply)
10936 (decode_address_to_semicolon, decode_address, decode_m_packet)
10937 (decode_M_packet, decode_X_packet, decode_xfer_write)
10938 (decode_search_memory_packet, unhexify, hexify)
10939 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10940 (look_up_one_symbol, relocate_instruction)
10941 (monitor_output): Move to remote-utils.h, and include it.
10942 * remote-utils.h: New file.
10944 2013-09-05 Pedro Alves <palves@redhat.com>
10946 * server.h (_): Delete.
10948 2013-09-02 Pedro Alves <palves@redhat.com>
10950 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10951 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10953 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10955 2013-09-02 Pierre Muller <muller@sourceware.org>
10957 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10958 or WriteProcessMemory complete successfully and handle
10959 ERROR_PARTIAL_COPY error.
10961 2013-09-02 Pedro Alves <palves@redhat.com>
10963 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10964 error instead of EIO.
10966 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10969 * linux-low.c: Include filestuff.h.
10970 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10971 * lynx-low.c: Include filestuff.h.
10972 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10973 * server.c: Include filestuff.h.
10974 (main): Call notice_open_fds.
10975 * spu-low.c: Include filestuff.h.
10976 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10978 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10980 * Makefile.in: Explain why ../target and ../nat are not
10981 listed as include file search paths.
10982 (linux-waitpid.o): New object file rule.
10983 * configure.srv (srv_native_linux_obj): New variable.
10984 Replace all occurrences of linux native object files with
10985 $srv_native_linux_obj.
10986 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10987 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10988 (linux_enable_event_reporting): Remove declaration.
10989 (my_waitpid): Moved to common/linux-waitpid.c.
10990 (linux_wait_for_event): Pass ptid when calling
10991 linux_enable_event_reporting.
10992 (linux_supports_tracefork_flag): Remove.
10993 (linux_enable_event_reporting): Likewise.
10994 (linux_tracefork_grandchild): Remove.
10995 (STACK_SIZE): Moved to common/linux-ptrace.c.
10996 (linux_tracefork_child): Remove.
10997 (linux_test_for_tracefork): Remove.
10998 (linux_look_up_symbols): Call linux_supports_traceclone.
10999 (initialize_low): Remove call to linux_test_for_tracefork.
11000 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11001 common/linux-ptrace.h.
11002 (PTRACE_TYPE_ARG4): Likewise.
11003 Include linux-ptrace.h.
11005 2013-08-21 Pedro Alves <palves@redhat.com>
11007 * config.in: Renegerate.
11009 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11011 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11012 (SFILES): Remove $(srcdir)/common/target-common.c and
11013 add $(srcdir)/target/waitstatus.c.
11014 (OBS): Remove target-common.o and add waitstatus.o.
11015 (server_h): Remove $(srcdir)/../common/target-common.h and
11016 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11017 and $(srcdir)/../target/waitstatus.h.
11018 (target-common.o): Remove.
11019 (waitstatus.o): New target object file.
11020 * target.h: Do not include target-common.h and
11021 include target/resume.h, target/wait.h and
11022 target/waitstatus.h.
11024 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11026 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11027 to PTRACE_TYPE_ARG3.
11028 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11029 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11031 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11032 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11034 2013-07-27 Jie Zhang <jie@codesourcery.com>
11035 Daniel Jacobowitz <dan@codesourcery.com>
11036 Yao Qi <yao@codesourcery.com>
11038 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11039 (mips-linux-watch.o): New rule.
11040 (mips_linux_watch_h): New variable.
11041 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11043 * linux-mips-low.c: Include mips-linux-watch.h.
11044 (struct arch_process_info, struct arch_lwp_info): New.
11045 (update_watch_registers_callback): New function.
11046 (mips_linux_new_process, mips_linux_new_thread) New functions.
11047 (mips_linux_prepare_to_resume, mips_insert_point): New
11049 (mips_remove_point, mips_stopped_by_watchpoint): New
11051 (rsp_bp_type_to_target_hw_bp_type): New function.
11052 (mips_stopped_data_address): New function.
11053 (the_low_target): Add watchpoint support functions.
11055 2013-07-27 Yao Qi <yao@codesourcery.com>
11057 * i386-low.c: Include break-common.h.
11058 (enum target_hw_bp_type): Remove.
11060 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11062 * Makefile.in (SFILES): /common/target-common.c.
11063 (OBS): Add target-common.o.
11064 (server_h): Add $(srcdir)/../common/target-common.h.
11065 (target-common.o): New target.
11066 * server.c (queue_stop_reply_callback): Free
11067 status string after use.
11068 * target.c (target_waitstatus_to_string): Remove.
11069 * target.h: Include target-common.h.
11070 (resume_kind): Likewise.
11071 (target_waitkind): Likewise.
11072 (target_waitstatus): Likewise.
11073 (TARGET_WNOHANG): Likewise.
11075 2013-07-04 Yao Qi <yao@codesourcery.com>
11077 * Makefile.in (host_alias): Use @host_noncanonical@.
11078 (target_alias): Use @target_noncanonical@.
11079 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11080 ACX_NONCANONICAL_HOST.
11081 * configure: Regenerated.
11084 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11086 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11087 * configure: Rebuild.
11088 * Makefile.in (version_host, version_target): Get from configure.
11089 (version.c): Use $(version_host) and $(version_target).
11091 2013-07-03 Pedro Alves <palves@redhat.com>
11093 * Makefile.in (config.status): Depend on development.sh.
11094 * acinclude.m4: Include libmcheck.m4.
11095 * configure: Regenerate.
11097 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11099 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11100 attribute inside the parentheses.
11101 (winapi_DebugSetProcessKillOnExit): Ditto.
11102 (winapi_DebugBreakProcess): Ditto.
11103 (winapi_GenerateConsoleCtrlEvent): Ditto.
11105 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11107 * notif.h (notif_event): Add a dummy member to avoid compiler
11110 2013-07-01 Pedro Alves <palves@redhat.com>
11112 * hostio.c (HOSTIO_PATH_MAX): Define.
11113 (require_filename, handle_open, handle_unlink, handle_readlink):
11116 2013-07-01 Pedro Alves <palves@redhat.com>
11118 * server.h: Include "pathmax.h".
11119 * linux-low.c: Don't include sys/param.h.
11120 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11122 * win32-low.c: Don't include sys/param.h.
11123 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11125 2013-07-01 Pedro Alves <palves@redhat.com>
11127 * event-loop.c: Don't check HAVE_UNISTD_H before including
11129 * gdbreplay.c: Likewise.
11130 * remote-utils.c: Likewise.
11131 * server.c: Likewise.
11132 * configure.ac: Don't check for unistd.h.
11133 * configure: Regenerate.
11135 2013-06-28 Tom Tromey <tromey@redhat.com>
11137 * Makefile.in (version.c): Use version.in, not
11140 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11142 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11143 * configure: Rebuild.
11144 * Makefile.in (version_host, version_target): Get from configure.
11145 (version.c): Use $(version_host) and $(version_target).
11147 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11149 Fix trace-status to output user name without trailing colon.
11150 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11152 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11154 Fix trace-status to output proper start-time and stop-time.
11155 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11156 output start time and stop time in hex as gdb expects.
11158 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11160 * tracepoint.c (build_traceframe_info_xml): Output trace state
11161 variables present in the trace buffer.
11163 2013-06-24 Tom Tromey <tromey@redhat.com>
11165 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11167 (version.o): Remove.
11168 * gdbreplay.c: Include version.h.
11169 (version, host_name): Don't declare.
11170 * server.h: Include version.h.
11171 (version, host_name): Don't declare.
11173 2013-06-12 Pedro Alves <palves@redhat.com>
11175 * linux-x86-low.c (linux_is_elf64): Delete global.
11176 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11177 with local linux_pid_exe_is_elf_64_file use.
11179 2013-06-11 Pedro Alves <palves@redhat.com>
11181 * linux-low.c (regset_disabled, disable_regset): New functions.
11182 (regsets_fetch_inferior_registers)
11183 (regsets_store_inferior_registers): Use them.
11184 (initialize_regsets_info); Don't allocate the disabled_regsets
11186 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11189 2013-06-11 Pedro Alves <palves@redhat.com>
11191 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11194 2013-06-11 Pedro Alves <palves@redhat.com>
11196 * linux-x86-low.c (initialize_low_arch): Call
11197 init_registers_x32_avx_linux.
11199 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11201 Fix compatibility with Android Bionic.
11202 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11205 2013-06-07 Pedro Alves <palves@redhat.com>
11208 * Makefile.in (OBS): Add tdesc.o.
11209 (IPA_OBJS): Add tdesc-ipa.o.
11210 (tdesc-ipa.o): New rule.
11211 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11213 * linux-low.c (new_inferior): Delete.
11214 (disabled_regsets, num_regsets): Delete.
11215 (linux_add_process): Adjust to set the new per-process
11217 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11218 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11219 was a stop. When calling arch_setup, switch the current inferior
11220 to the thread that got an event.
11221 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11222 (regsets_fetch_inferior_registers)
11223 (regsets_store_inferior_registers): New regsets_info parameter.
11225 (linux_register_in_regsets): New regs_info parameter. Adjust to
11227 (register_addr, fetch_register, store_register): New usrregs_info
11228 parameter. Adjust to use it.
11229 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11230 parameter regs_info. Adjust to use it.
11231 (linux_fetch_registers): Get the current inferior's regs_info, and
11233 (linux_store_registers): Ditto.
11234 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11235 (initialize_low): Don't initialize the target_regsets here. Call
11236 initialize_low_arch.
11237 * linux-low.h (target_regsets): Delete declaration.
11238 (struct regsets_info): New.
11239 (struct usrregs_info): New.
11240 (struct regs_info): New.
11241 (struct process_info_private) <new_inferior>: New field.
11242 (struct linux_target_ops): Delete the num_regs, regmap, and
11243 regset_bitmap fields. New field regs_info.
11244 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11245 * i387-fp.c (num_xmm_registers): Delete.
11246 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11247 calls to new interface.
11248 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11249 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11250 Infer the number of xmm registers from the regcache's target
11252 * i387-fp.h (num_xmm_registers): Delete.
11253 * inferiors.c (add_thread): Don't install the thread's regcache
11255 * proc-service.c (gregset_info): Fetch the current inferior's
11256 regs_info. Adjust to use it.
11257 * regcache.c: Include tdesc.h.
11258 (register_bytes, reg_defs, num_registers)
11259 (gdbserver_expedite_regs): Delete.
11260 (get_thread_regcache): If the thread doesn't have a regcache yet,
11261 create one, instead of aborting gdbserver.
11262 (regcache_invalidate_one): Rename to ...
11263 (regcache_invalidate_thread): ... this.
11264 (regcache_invalidate_one): New.
11265 (regcache_invalidate): Only invalidate registers of the current
11267 (init_register_cache): Add target_desc parameter, and use it.
11268 (new_register_cache): Ditto. Assert the target description has a
11269 non zero registers_size.
11270 (regcache_cpy): Add assertions. Adjust.
11271 (realloc_register_cache, set_register_cache): Delete.
11272 (registers_to_string, registers_from_string): Adjust.
11273 (find_register_by_name, find_regno, find_register_by_number)
11274 (register_cache_size): Add target_desc parameter, and use it.
11275 (free_register_cache_thread, free_register_cache_thread_one)
11276 (regcache_release, register_cache_size): New.
11277 (register_size): Add target_desc parameter, and use it.
11278 (register_data, supply_register, supply_register_zeroed)
11279 (supply_regblock, supply_register_by_name, collect_register)
11280 (collect_register_as_string, collect_register_by_name): Adjust.
11281 * regcache.h (struct target_desc): Forward declare.
11282 (struct regcache) <tdesc>: New field.
11283 (init_register_cache, new_register_cache): Add target_desc
11285 (regcache_invalidate_thread): Declare.
11286 (regcache_invalidate_one): Delete declaration.
11287 (regcache_release): Declare.
11288 (find_register_by_number, register_cache_size, register_size)
11289 (find_regno): Add target_desc parameter.
11290 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11292 * remote-utils.c: Include tdesc.h.
11293 (outreg, prepare_resume_reply): Adjust.
11294 * server.c: Include tdesc.h.
11295 (gdbserver_xmltarget): Delete declaration.
11296 (get_features_xml, process_serial_event): Adjust.
11297 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11299 (struct process_info) <tdesc>: New field.
11300 (ipa_tdesc): Declare.
11301 * tdesc.c: New file.
11302 * tdesc.h: New file.
11303 * tracepoint.c: Include tdesc.h.
11304 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11305 (get_context_regcache): Adjust to pass ipa_tdesc down.
11306 (do_action_at_tracepoint): Adjust to get the register cache size
11307 from the context regcache's description.
11308 (traceframe_walk_blocks): Adjust to get the register cache size
11309 from the current trace frame's description.
11310 (traceframe_get_pc): Adjust to get current trace frame's
11311 description and pass it down.
11312 (gdb_collect): Adjust to get the register cache size from the
11314 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11315 (gdbserver_xmltarget): Delete.
11316 (initialize_low_tracepoint): Set the ipa's target description.
11317 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11318 (initialize_low_tracepoint): Set the ipa's target description.
11319 * linux-x86-low.c: Include tdesc.h.
11320 [__x86_64__] (is_64bit_tdesc): New.
11321 (ps_get_thread_area, x86_get_thread_area): Use it.
11322 (i386_cannot_store_register): Rename to ...
11323 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11324 (i386_cannot_fetch_register): Rename to ...
11325 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11326 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11328 (target_regsets): Rename to ...
11329 (x86_regsets): ... this.
11330 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11332 (x86_siginfo_fixup): Use is_64bit_tdesc.
11333 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11334 (tdesc_x32_avx_linux, tdesc_x32_linux)
11335 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11337 (x86_linux_update_xmltarget): Delete.
11338 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11339 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11340 (AMD64_LINUX_USER64_CS): New.
11341 (x86_linux_read_description): New, based on
11342 x86_linux_update_xmltarget.
11343 (same_process_callback): New.
11344 (x86_arch_setup_process_callback): New.
11345 (x86_linux_update_xmltarget): New.
11346 (x86_regsets_info): New.
11347 (amd64_linux_regs_info): New.
11348 (i386_linux_usrregs_info): New.
11349 (i386_linux_regs_info): New.
11350 (x86_linux_regs_info): New.
11351 (x86_arch_setup): Reimplement.
11352 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11353 (x86_emit_ops): Ditto.
11354 (the_low_target): Adjust. Install x86_linux_regs_info,
11355 x86_cannot_fetch_register, and x86_cannot_store_register.
11356 (initialize_low_arch): New.
11357 * linux-ia64-low.c (tdesc_ia64): Declare.
11358 (ia64_fetch_register): Adjust.
11359 (ia64_usrregs_info, regs_info): New globals.
11360 (ia64_regs_info): New function.
11361 (the_low_target): Adjust.
11362 (initialize_low_arch): New function.
11363 * linux-sparc-low.c (tdesc_sparc64): Declare.
11364 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11366 (sparc_arch_setup): New function.
11367 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11368 (the_low_target): Adjust.
11369 (initialize_low_arch): New function.
11370 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11371 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11372 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11373 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11374 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11375 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11376 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11377 (tdesc_powerpc_isa205_vsx64l): Declare.
11378 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11379 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11380 (ppc_set_pc, ppc_get_hwcap): Adjust.
11381 (ppc_usrregs_info): Forward declare.
11382 (!__powerpc64__) ppc_regmap_adjusted: New global.
11383 (ppc_arch_setup): Adjust to the current process'es target
11385 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11386 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11387 (ppc_store_evrregset): Adjust.
11388 (target_regsets): Rename to ...
11389 (ppc_regsets): ... this, and make static.
11390 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11391 (ppc_regs_info): New function.
11392 (the_low_target): Adjust.
11393 (initialize_low_arch): New function.
11394 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11395 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11396 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11397 (tdesc_s390x_linux64v2): Declare.
11398 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11399 (s390_fill_gregset, s390_store_last_break): Adjust.
11400 (target_regsets): Rename to ...
11401 (s390_regsets): ... this, and make static.
11402 (s390_get_pc, s390_set_pc): Adjust.
11403 (s390_get_hwcap): New target_desc parameter, and use it.
11404 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11405 (s390_arch_setup): Adjust to set the current process'es target
11406 description. Don't adjust the regmap.
11407 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11408 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11409 (regs_info_3264): New globals.
11410 (s390_regs_info): New function.
11411 (the_low_target): Adjust.
11412 (initialize_low_arch): New function.
11413 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11414 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11415 [__mips64] (init_registers_mips_linux)
11416 (init_registers_mips_dsp_linux): Delete defines.
11417 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11418 (have_dsp): New global.
11419 (mips_read_description): New, based on mips_arch_setup.
11420 (mips_arch_setup): Reimplement.
11421 (get_usrregs_info): New function.
11422 (mips_cannot_fetch_register, mips_cannot_store_register)
11423 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11424 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11425 (target_regsets): Rename to ...
11426 (mips_regsets): ... this, and make static.
11427 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11428 (dsp_regs_info, regs_info): New globals.
11429 (mips_regs_info): New function.
11430 (the_low_target): Adjust.
11431 (initialize_low_arch): New function.
11432 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11433 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11435 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11436 (arm_read_description): New, with bits factored from
11438 (arm_arch_setup): Reimplement.
11439 (target_regsets): Rename to ...
11440 (arm_regsets): ... this, and make static.
11441 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11442 (arm_regs_info): New function.
11443 (the_low_target): Adjust.
11444 (initialize_low_arch): New function.
11445 * linux-m68k-low.c (tdesc_m68k): Declare.
11446 (target_regsets): Rename to ...
11447 (m68k_regsets): ... this, and make static.
11448 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11449 (m68k_regs_info): New function.
11450 (m68k_arch_setup): New function.
11451 (the_low_target): Adjust.
11452 (initialize_low_arch): New function.
11453 * linux-sh-low.c (tdesc_sharch): Declare.
11454 (target_regsets): Rename to ...
11455 (sh_regsets): ... this, and make static.
11456 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11457 (sh_regs_info, sh_arch_setup): New functions.
11458 (the_low_target): Adjust.
11459 (initialize_low_arch): New function.
11460 * linux-bfin-low.c (tdesc_bfin): Declare.
11461 (bfin_arch_setup): New function.
11462 (bfin_usrregs_info, regs_info): New globals.
11463 (bfin_regs_info): New function.
11464 (the_low_target): Adjust.
11465 (initialize_low_arch): New function.
11466 * linux-cris-low.c (tdesc_cris): Declare.
11467 (cris_arch_setup): New function.
11468 (cris_usrregs_info, regs_info): New globals.
11469 (cris_regs_info): New function.
11470 (the_low_target): Adjust.
11471 (initialize_low_arch): New function.
11472 * linux-cris-low.c (tdesc_crisv32): Declare.
11473 (cris_arch_setup): New function.
11474 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11475 (cris_regs_info): New function.
11476 (the_low_target): Adjust.
11477 (initialize_low_arch): New function.
11478 * linux-m32r-low.c (tdesc_m32r): Declare.
11479 (m32r_arch_setup): New function.
11480 (m32r_usrregs_info, regs_info): New globals.
11481 (m32r_regs_info): Adjust.
11482 (initialize_low_arch): New function.
11483 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11484 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11485 (tic6x_usrregs_info): Forward declare.
11486 (tic6x_read_description): New function, based on ...
11487 (tic6x_arch_setup): ... this. Reimplement.
11488 (target_regsets): Rename to ...
11489 (tic6x_regsets): ... this, and make static.
11490 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11491 (tic6x_regs_info): New function.
11492 (the_low_target): Adjust.
11493 (initialize_low_arch): New function.
11494 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11495 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11496 (target_regsets): Rename to ...
11497 (xtensa_regsets): ... this, and make static.
11498 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11500 (xtensa_arch_setup, xtensa_regs_info): New functions.
11501 (the_low_target): Adjust.
11502 (initialize_low_arch): New function.
11503 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11504 (nios2_arch_setup): Set the current process'es tdesc.
11505 (target_regsets): Rename to ...
11506 (nios2_regsets): ... this.
11507 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11508 (nios2_regs_info): New function.
11509 (the_low_target): Adjust.
11510 (initialize_low_arch): New function.
11511 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11512 (aarch64_arch_setup): Set the current process'es tdesc.
11513 (target_regsets): Rename to ...
11514 (aarch64_regsets): ... this.
11515 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11516 (aarch64_regs_info): New function.
11517 (the_low_target): Adjust.
11518 (initialize_low_arch): New function.
11519 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11521 (target_regsets): Rename to ...
11522 (tile_regsets): ... this.
11523 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11524 (tile_regs_info): New function.
11525 (tile_arch_setup): Set the current process'es tdesc.
11526 (the_low_target): Adjust.
11527 (initialize_low_arch): New function.
11528 * spu-low.c (tdesc_spu): Declare.
11529 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11530 * win32-arm-low.c (tdesc_arm): Declare.
11531 (arm_arch_setup): New function.
11532 (the_low_target): Install arm_arch_setup instead of
11533 init_registers_arm.
11534 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11535 (init_windows_x86): Rename to ...
11536 (i386_arch_setup): ... this. Set `win32_tdesc'.
11537 (the_low_target): Adjust.
11538 * win32-low.c (win32_tdesc): New global.
11539 (child_add_thread): Don't create the thread cache here.
11540 (do_initial_child_stuff): Set the new process'es tdesc.
11541 * win32-low.h (struct target_desc): Forward declare.
11542 (win32_tdesc): Declare.
11543 * lynx-i386-low.c (tdesc_i386): Declare global.
11544 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11545 * lynx-low.c (lynx_tdesc): New global.
11546 (lynx_add_process): Set the new process'es tdesc.
11547 * lynx-low.h (struct target_desc): Forward declare.
11548 (lynx_tdesc): Declare global.
11549 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11550 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11551 * nto-low.c (nto_tdesc): New global.
11552 (do_attach): Set the new process'es tdesc.
11553 * nto-low.h (struct target_desc): Forward declare.
11554 (nto_tdesc): Declare.
11555 * nto-x86-low.c (tdesc_i386): Declare.
11556 (nto_x86_arch_setup): Set `nto_tdesc'.
11558 2013-06-04 Gary Benson <gbenson@redhat.com>
11560 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11561 to qSupported response when appropriate.
11562 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11563 with nonzero-length annex.
11564 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11565 arguments supplied in annex.
11567 2013-05-31 Doug Evans <dje@google.com>
11570 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11571 64 bits in 64-cross-32 environment.
11573 2013-05-28 Pedro Alves <palves@redhat.com>
11575 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11576 (aarch64-without-fpu.c): Delete rule.
11577 * configure.srv (aarch64*-*-linux*): Remove references to
11578 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11579 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11582 2013-05-24 Pedro Alves <palves@redhat.com>
11584 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11585 instead of strchr/decode_address. Error if the range isn't split
11586 with a ','. Don't assume there's be a ':' in the action.
11588 2013-05-23 Yao Qi <yao@codesourcery.com>
11589 Pedro Alves <palves@redhat.com>
11591 * linux-low.c (lwp_in_step_range): New function.
11592 (linux_wait_1): If the thread was range stepping and stopped
11593 outside the stepping range, report the stop to GDB. Otherwise,
11594 continue stepping. Add range stepping debug output.
11595 (linux_set_resume_request): Copy the step range from the resume
11596 request to the lwp.
11597 (linux_supports_range_stepping): New.
11598 (linux_target_ops) <supports_range_stepping>: Set to
11599 linux_supports_range_stepping.
11600 * linux-low.h (struct linux_target_ops)
11601 <supports_range_stepping>: New field.
11602 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11603 * linux-x86-low.c (x86_supports_range_stepping): New.
11604 (the_low_target) <supports_range_stepping>: Set to
11605 x86_supports_range_stepping.
11606 * server.c (handle_v_cont): Handle 'r' action.
11607 (handle_v_requests): Append ";r" if the target supports range
11609 * target.h (struct thread_resume) <step_range_start,
11610 step_range_end>: New fields.
11611 (struct target_ops) <supports_range_stepping>:
11613 (target_supports_range_stepping): New macro.
11615 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11617 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11618 confusion in comment.
11620 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11622 * lynx-low.c (struct process_info_private): New type.
11623 (lynx_add_process): New function.
11624 (lynx_create_inferior, lynx_attach): Replace calls to
11625 add_process by calls to lynx_add_process.
11626 (lynx_resume): If PTID is null, then try using
11627 current_process()->private->last_wait_event_ptid.
11629 (lynx_clear_inferiors): Delete. The contents of that function
11630 has been inlined in lynx_mourn;
11631 (lynx_wait_1): Save the ptid in the process's private data.
11632 (lynx_mourn): Free the process' private data. Replace call
11633 to lynx_clear_inferiors by call to clear_inferiors.
11635 2013-05-17 Yao Qi <yao@codesourcery.com>
11637 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11640 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11642 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11643 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11644 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11645 PT_TEXT_END_ADDR guards. Update comments.
11646 (linux_target_op) <read_offsets>: Conditionally define to
11647 linux_read_offsets if the target is UCLIBC and if it defines
11648 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11650 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11651 Andrew Jenner <andrew@codesourcery.com>
11653 * Makefile.in (SFILES): Add linux-nios2-low.c.
11654 (clean): Add action to delete nios2-linux.c.
11655 (nios2-linux.c): New rule.
11656 * configure.srv: Add nios2*-*-linux*.
11657 * linux-nios2-low.c: New.
11659 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11661 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11663 2013-04-25 Hui Zhu <hui@codesourcery.com>
11666 * ax.c (ax_printf): Add fflush.
11668 2013-04-22 Tom Tromey <tromey@redhat.com>
11670 * Makefile.in (SFILES): Add filestuff.c.
11671 (OBS): Add filestuff.o.
11672 (filestuff.o): New target.
11673 * config.in, configure: Rebuild.
11674 * configure.ac: Check for fdwalk, pipe2.
11676 2013-04-17 Pedro Alves <palves@redhat.com>
11678 * configure.ac (USE_THREAD_DB): Delete variable.
11679 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11680 Don't AC_SUBST USE_THREAD_DB.
11681 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11682 * config.in, configure: Regenerate.
11684 2013-04-16 Pedro Alves <palves@redhat.com>
11686 * linux-low.h (struct lwp_info) <thread_known>: Move under
11687 the USE_THREAD_DB #ifdef.
11689 2013-04-16 Pedro Alves <palves@redhat.com>
11691 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11692 (linux-low.o): Delete rule.
11693 * linux-low.h: Always include "gdb_thread_db.h" instead of
11694 conditionally including thread_db.h.
11695 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11698 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11700 * Makefile.in (install-only): Fix make install regression.
11702 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11704 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11705 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11707 * gdbserver.1: Remove.
11709 2013-03-22 Pedro Alves <palves@redhat.com>
11711 * linux-low.c (handle_extended_wait): Don't call
11712 linux_enable_event_reporting.
11714 2013-03-15 Tony Theodore <tonyt@logyst.com>
11717 * Makefile.in (SHELL): Use @SHELL@.
11719 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11721 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11724 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11726 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11727 Remove extraneous NULL element.
11729 2013-03-13 Yao Qi <yao@codesourcery.com>
11731 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11732 'V' block in trace frame.
11734 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11736 * target.h (struct target_ops): Add btrace ops.
11737 (target_supports_btrace): New macro.
11738 (target_enable_btrace): New macro.
11739 (target_disable_btrace): New macro.
11740 (target_read_btrace): New macro.
11741 * gdbthread.h (struct thread_info): Add btrace field.
11742 * server.c: Include btrace-common.h.
11743 (handle_btrace_general_set): New function.
11744 (handle_btrace_enable): New function.
11745 (handle_btrace_disable): New function.
11746 (handle_general_set): Call handle_btrace_general_set.
11747 (handle_qxfer_btrace): New function.
11748 (struct qxfer qxfer_packets[]): Add btrace entry.
11749 * inferiors.c (remove_thread): Disable btrace.
11750 * linux-low: Include linux-btrace.h.
11751 (linux_low_enable_btrace): New function.
11752 (linux_low_read_btrace): New function.
11753 (linux_target_ops): Add btrace ops.
11754 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11755 Add srv_linux_btrace=yes.
11756 (x86_64-*-linux*): Add linux-btrace.o.
11757 Add srv_linux_btrace=yes.
11758 * configure.ac: Define HAVE_LINUX_BTRACE.
11759 * config.in: Regenerated.
11760 * configure: Regenerated.
11762 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11764 * server.c (handle_qxfer): Preserve error message if -3 is
11766 (qxfer): Document the -3 return value.
11768 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11770 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11771 (linux_btrace_h): New variable.
11772 (linux-btrace.o): New rule.
11774 2013-03-08 Stan Shebs <stan@codesourcery.com>
11775 Hafiz Abid Qadeer <abidh@codesourcery.com>
11777 * tracepoint.c (trace_buffer_size): New global.
11778 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11779 (init_trace_buffer): Change to one-argument function. Allocate
11780 trace buffer memory.
11781 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11782 handle QTBuffer:size packet.
11783 (cmd_bigqtbuffer_size): New function.
11784 (initialize_tracepoint): Call init_trace_buffer with
11785 DEFAULT_TRACE_BUFFER_SIZE.
11786 * server.c (handle_query): Add QTBuffer:size in the
11789 2013-03-07 Yao Qi <yao@codesourcery.com>
11791 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11792 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11794 (cmd_qtsp): Adjust condition. Do post increment.
11795 Set cur_action and cur_step_action back to 0.
11797 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11800 * linux-low.c (linux_write_memory): Return early success if LEN is
11803 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11805 * configure.srv: Add x86_64-*-cygwin* as target.
11807 2013-02-28 Tom Tromey <tromey@redhat.com>
11809 * configure.ac: Invoke AC_SYS_LARGEFILE.
11810 * configure, config.in: Rebuild.
11812 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11814 * win32-low.c: Throughout, fix format strings and casts of
11815 printf-like functions to avoid type related warnings on all
11817 (get_child_debug_event): Print dwDebugEventCode as hex since
11818 that's how it's usually documented.
11820 2013-02-28 Yao Qi <yao@codesourcery.com>
11822 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11825 2013-02-27 Jiong Wang <jiwang@tilera.com>
11827 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11828 (reg-tilegx32.c): New rule.
11829 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11830 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11831 different register info initializer according to elf class.
11832 (init_registers_tilgx32): New function. The tilegx32 register info
11834 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11835 (tile_store_gregset): Likewise.
11837 2013-02-27 Yao Qi <yao@codesourcery.com>
11839 * server.c (process_point_options): Print debug message when
11840 debug_threads is true.
11842 2013-02-26 Yao Qi <yao@codesourcery.com>
11844 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11846 2013-02-19 Pedro Alves <palves@redhat.com>
11847 Kai Tietz <ktietz@redhat.com>
11851 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11852 instead of strtoul to extract address from packet.
11853 (process_serial_event) <'z'>: Likewise.
11855 2013-02-18 Yao Qi <yao@codesourcery.com>
11857 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11859 2013-02-14 Pedro Alves <palves@redhat.com>
11863 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11864 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11866 2013-02-14 Pedro Alves <palves@redhat.com>
11868 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11870 2013-02-14 Pedro Alves <palves@redhat.com>
11872 * tracepoint.c (save_string): Delete.
11873 (add_tracepoint_action): Use savestring instead of save_string.
11875 2013-02-12 Pedro Alves <palves@redhat.com>
11877 * linux-xtensa-low.c: Ditto.
11878 * xtensa-xtregs.c: Ditto.
11880 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11882 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11885 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11887 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11888 aarch64_num_wp_regs and aarch64_num_bp_regs to
11889 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11891 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11893 * linux-aarch64-low.c (ps_get_thread_area): Replace
11894 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11896 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11897 Marcus Shawcroft <marcus.shawcroft@arm.com>
11898 Nigel Stephens <nigel.stephens@arm.com>
11899 Yufeng Zhang <yufeng.zhang@arm.com>
11901 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11902 (aarch64.c, aarch64-without-fpu.c): New targets.
11903 * configure.srv (aarch64*-*-linux*): New.
11904 * linux-aarch64-low.c: New file.
11906 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11908 * linux-low.c (handle_extended_wait, linux_create_inferior)
11909 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11910 (dequeue_one_deferred_signal, linux_resume_one_thread)
11911 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11912 (linux_tracefork_grandchild, linux_test_for_tracefork)
11913 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11914 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11915 where the argument is 0.
11917 2013-01-25 Yao Qi <yao@codesourcery.com>
11919 * event-loop.c: Include "queue.h".
11920 (gdb_event_p): New typedef.
11921 (struct gdb_event) <next_event>: Remove.
11922 (event_queue): Change to QUEUE(gdb_event_p).
11923 (async_queue_event): Remove.
11924 (gdb_event_xfree): New.
11925 (initialize_event_loop): New.
11926 (process_event): Use API from QUEUE.
11927 (wait_for_event): Likewise.
11928 * server.c (main): Call initialize_event_loop.
11929 * server.h (initialize_event_loop): Declare.
11931 2013-01-18 Yao Qi <yao@codesourcery.com>
11933 * ax.h (struct eval_agent_expr_context): New.
11934 (gdb_eval_agent_expr): Update declaration.
11935 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11936 TFRAME. Add new argument CTX.
11937 * server.h (struct eval_agent_expr_context): Declare.
11938 (agent_mem_read, agent_tsv_read): Update declaration.
11939 (agent_mem_read_string): Likewise.
11940 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11941 (add_traceframe_block): Add new argument TPOINT.
11942 Increase TPOINT->traceframe_usage.
11943 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11944 eval_tracepoint_agent_expr.
11945 (condition_true_at_tracepoint): Likewise.
11946 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11947 (agent_mem_read_string, agent_tsv_read): Likewise.
11949 2013-01-16 Yao Qi <yao@codesourcery.com>
11951 * linux-low.c (linux_resume_one_lwp): Don't check
11952 'lwp->bp_reinsert != 0'.
11954 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11955 Pedro Alves <palves@redhat.com>
11957 * lynx-low.c (ptrace_request_to_str): Define a temporary
11958 macro and use it to simplify this function's implementation.
11960 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11962 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11965 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11967 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11969 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11971 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11973 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11975 * lynx-low.c (lynx_resume): Use the resume_info parameter
11976 to determine the ptid for the lynx_ptrace call, unless
11977 it is equal to minus_one_ptid, in which case we use the
11978 ptid of the current_inferior.
11979 (lynx_wait_1): After having received a thread create/exit
11980 event, resume the inferior's execution using the signaling
11981 thread's ptid, rather than the old ptid.
11983 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11985 * lynx-low.c (lynx_resume): Delete variable ret.
11987 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11989 * gdbreplay.c (gdbreplay_version): Update copyright year.
11990 * server.c (gdbserver_version): Likewise.
11992 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11994 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11997 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11999 * lynx-low.c (ptrace_request_to_str): Add handling for
12000 PTRACE_GETTRACESIG.
12002 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12004 * lynx-low.c (lynx_attach): Delete variable new_process.
12006 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12008 * lynx-low.c (lynx_create_inferior): Delete variable
12011 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12013 * lynx-low.c (ptrace_request_to_str): Do not handle
12014 PTRACE_GETTHREADLIST if this macro does not exist.
12016 2012-12-15 Yao Qi <yao@codesourcery.com>
12018 * Makefile.in (OBS): Add notif.o.
12019 * notif.c, notif.h: New.
12020 * server.c: Include "notif.h".
12021 (struct vstop_notif) <next>: Remove.
12023 (queue_stop_reply): Update.
12024 (push_event, send_next_stop_reply): Remove.
12025 (discard_queued_stop_replies): Update.
12026 (notif_stop): New variable.
12027 (handle_v_stopped): Remove.
12028 (handle_v_requests): Don't call handle_v_stopped. Call
12029 handle_ack_notif instead.
12030 (queue_stop_reply_callback): Call notif_event_enque instead
12031 of queue_stop_reply.
12032 (handle_status): Don't call send_next_stop_reply, call
12033 notif_write_event instead.
12034 (kill_inferior_callback): Likewise.
12035 (detach_or_kill_inferior_callback): Likewise.
12036 (main): Call initialize_notif.
12037 (process_serial_event): Call QUEUE_is_empty.
12038 (handle_target_event): Call notif_push instead of push event.
12039 * server.h (push_event): Remove declaration.
12041 2012-12-10 Tom Tromey <tromey@redhat.com>
12043 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12044 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12047 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12048 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12049 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12050 (amd64-linux-ipa.o, ax.o): Rewrite.
12051 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12052 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12053 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12054 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12055 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12056 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12057 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12058 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12059 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12060 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12061 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12062 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12063 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12064 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12065 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12066 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12067 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12068 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12069 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12070 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12071 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12072 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12073 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12074 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12075 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12076 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12077 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12078 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12079 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12080 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12081 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12082 (reg-tilegx.o): Remove.
12083 (all_object_files): New macro.
12084 Include .deps files.
12085 * aclocal.m4, configure: Rebuild.
12086 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12087 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12088 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12090 2012-12-05 Tom Tromey <tromey@redhat.com>
12093 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12095 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12097 * configure.ac: Check for linux/perf_event.h.
12098 * config.in: Regenerated.
12099 * configure: Regenerated.
12101 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12103 * hostio.c (handle_readlink): Decrease buffer size
12104 parameter passed to readlink by one byte.
12106 2012-11-26 Yao Qi <yao@codesourcery.com>
12108 * configure.ac (build_warnings): Append '-Wempty-body'.
12109 * configure: Regenerated.
12110 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12113 2012-11-15 Pierre Muller <muller@sourceware.org>
12115 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12116 * config.in: Regenerate.
12117 * configure: Regenerate.
12118 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12119 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12120 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12121 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12123 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12124 instead of <sys/wait.h> header.
12125 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12127 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12129 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12130 (various make rules): Remove -DGDBSERVER
12132 2012-11-09 Yao Qi <yao@codesourcery.com>
12134 * spu-low.c (current_ptid): Move it to ..
12135 * gdbthread.h: ... here. New.
12136 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12137 * server.c (myresume, process_serial_event): Likewise.
12138 * thread-db.c (thread_db_find_new_threads): Likewise.
12139 * tracepoint.c (run_inferior_command): Likewise.
12141 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12143 * server.c (handle_search_memory_1): Include access length in
12146 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12148 * linux-crisv32-low.c: Fix compile errors.
12150 2012-09-04 Yao Qi <yao@codesourcery.com>
12152 * tracepoint.c (cmd_qtsv): Adjust debug message.
12153 Don't check CUR_TPOINT.
12155 2012-08-28 Yao Qi <yao@codesourcery.com>
12157 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12158 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12159 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12160 Remove declarations of xmalloc, xreallloc, xstrdup and
12162 * Makefile.in (libiberty_h): New.
12163 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12164 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12166 2012-08-23 Yao Qi <yao@codesourcery.com>
12168 * server.h: Remove declaration of 'xsnprintf'.
12170 2012-08-22 Keith Seitz <keiths@redhat.com>
12172 * server.h: Include build-gnulib-gbserver/config.h.
12173 * gdbreplay.c: Likewise.
12175 2012-08-08 Doug Evans <dje@google.com>
12177 * Makefile.in (SFILES): Add gdb_vecs.c.
12178 (OBS): Add gdb_vecs.o.
12179 (gdb_vecs_h, host_defs_h): New variables.
12180 (thread-db.o): Add $(gdb_vecs_h) dependency.
12181 (gdb_vecs.o): New rule.
12182 * thread-db.c: #include "gdb_vecs.h".
12183 (thread_db_load_search): Use a vector to iterate over path elements.
12184 Handle text appearing after "$pdir".
12186 * configure.ac: Add check for strstr.
12187 * config.in: Regenerate.
12188 * configure: Regenerate.
12190 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12192 * hostio.c (handle_pread): If pread fails, fall back to attempting
12194 (handle_pwrite): Likewise for pwrite.
12196 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12198 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12199 between unsupported TYPE and unimplementable ADDR/LEN combination.
12200 (arm_insert_point): Act on new return value.
12202 2012-07-31 Pedro Alves <palves@redhat.com>
12204 * server.c (process_point_options): Only skip tokens if we find
12205 one that is unrecognized. Don't treat 'X' specially while
12206 skipping unrecognized tokens.
12208 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12210 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12211 to 4-byte-align HW breakpoint addresses for Thumb.
12213 2012-07-27 Yao Qi <yao@codesourcery.com>
12217 * server.h: Declare gdb_agent_about_to_close.
12218 * target.c (kill_inferior): Include "agent.h".
12219 New. Send command 'kill'.
12220 * target.h (kill_inferior): Removed macro.
12221 * tracepoint.c (gdb_agent_about_to_close): New.
12222 (gdb_agent_helper_thread): Handle command 'close'.
12223 Wait endlessly until the inferior stops.
12224 Install gdb_agent_remove_socket to atexit hook.
12225 (agent_socket_name): New static variable.
12226 (gdb_agent_socket_init): Replace local variable 'name' with
12227 'agent_socket_name'.
12228 (gdb_agent_remove_socket): New.
12230 2012-07-27 Yao Qi <yao@codesourcery.com>
12232 * server.c (process_point_options): Stop at 'X' when parsing.
12234 2012-07-19 Michael Eager <eager@eagercon.com>
12236 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12238 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12239 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12240 hardware breakpoint.
12242 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12244 * gdbserver/linux-low.c (initialize_low): Call
12245 linux_ptrace_init_warnings.
12247 2012-07-02 Doug Evans <dje@google.com>
12249 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12252 2012-07-02 Stan Shebs <stan@codesourcery.com>
12254 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12255 (ax.o): Add it to build rule.
12257 (OBS): Add format.o.
12258 (IPA_OBS): Add format.o.
12259 * server.c (handle_query): Claim support for breakpoint commands.
12260 (process_point_options): Add command case.
12261 (process_serial_event): Leave running if there are printfs in
12263 * mem-break.h (any_persistent_commands): Declare.
12264 (add_breakpoint_commands): Declare.
12265 (gdb_no_commands_at_breakpoint): Declare.
12266 (run_breakpoint_commands): Declare.
12267 * mem-break.c (struct point_command_list): New struct.
12268 (struct breakpoint): New field command_list.
12269 (any_persistent_commands): New function.
12270 (add_commands_to_breakpoint): New function.
12271 (add_breakpoint_commands): New function.
12272 (gdb_no_commands_at_breakpoint): New function.
12273 (run_breakpoint_commands): New function.
12274 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12276 * ax.c: Include format.h.
12277 (ax_printf): New function.
12278 (gdb_eval_agent_expr): Add printf opcode.
12280 2012-06-13 Yao Qi <yao@codesourcery.com>
12282 * server.c (start_inferior): Remove duplicated writes to fields
12283 'last_resume_kind' and 'last_status' of 'current_inferior'.
12285 2012-06-12 Yao Qi <yao@codesourcery.com>
12286 Pedro Alves <palves@redhat.com>
12288 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12290 * server.c (handle_v_cont): Extend comment.
12292 2012-06-11 Yao Qi <yao@codesourcery.com>
12294 * linux-low.c (linux_attach): Add 'static'.
12296 2012-06-06 Yao Qi <yao@codesourcery.com>
12298 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12300 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12302 Fix gcc -flto compilation warning.
12303 * server.c (main): Make variable multi_mode and attach volatile.
12305 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12307 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12308 if the platform doesn't know about it.
12310 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12312 * Makefile.in (SFILES): Add linux-tile-low.c.
12313 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12314 * configure.srv: Handle tilegx-*-linux*.
12315 * linux-tile-low.c: New file.
12317 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12319 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12321 2012-05-24 Pedro Alves <palves@redhat.com>
12325 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12327 2012-05-24 Pedro Alves <palves@redhat.com>
12331 Replace target_signal with gdb_signal throughout.
12333 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12335 * linux-low.c (linux_store_registers): Avoid the copying sequence
12336 when no data has been retrieved by ptrace.
12338 2012-05-22 Will Deacon <will.deacon@arm.com>
12340 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12341 Include asm/ptrace.h.
12342 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12345 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12347 * linux-low.c (linux_store_registers): Don't re-retrieve data
12348 with ptrace that has already been obtained from /proc. Always
12349 copy any data retrieved with ptrace to the buffer supplied.
12351 2012-05-11 Yao Qi <yao@codesourcery.com>
12352 Pedro Alves <palves@redhat.com>
12354 * linux-low.c (enum stopping_threads_kind): New.
12355 (stopping_threads): Change type to `enum stopping_threads_kind'.
12356 (handle_extended_wait): If stopping and suspending threads, leave
12357 the new_lwp suspended too.
12358 (linux_wait_for_event): Adjust.
12359 (stop_all_lwps): Set `stopping_threads' to
12360 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12361 whether we're suspending threads or just stopping them. Assert no
12364 2012-04-29 Yao Qi <yao@codesourcery.com>
12366 * server.h: Move some code to ...
12367 * gdbthread.h: ... here. New.
12368 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12369 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12370 (nto-low.o, win32-low.o): Likewise.
12371 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12372 * regcache.c, remote-utils.c, server.c: Likewise.
12373 * target.c, tracepoint.c, win32-low.c: Likewise.
12375 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12377 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12378 (PTRACE_ARG4_TYPE): Likewise.
12379 (PTRACE_XFER_TYPE): Likewise.
12380 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12381 ptrace to PTRACE_ARG3_TYPE.
12382 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12383 (PTRACE_ARG4_TYPE): Likewise.
12384 (PTRACE_XFER_TYPE): Likewise.
12385 (linux_detach_one_lwp): Cast fourth argument of
12386 ptrace to long then PTRACE_ARG4_TYPE.
12387 (regsets_fetch_inferior_registers): Cast third argument of
12388 ptrace to long then PTRACE_ARG3_TYPE.
12389 (regsets_store_inferior_registers): Likewise.
12391 2012-04-20 Pedro Alves <palves@redhat.com>
12393 * configure: Regenerate.
12395 2012-04-19 Pedro Alves <palves@redhat.com>
12397 * Makefile.in (GNULIB_BUILDDIR): New.
12398 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12399 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12400 (all, install-only, uninstall, clean-info, all-lib, clean): No
12401 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12402 (maintainer-clean realclean distclean): Use subdir_do.
12404 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12405 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12406 * acinclude.m4: Include acx_configure_dir.m4.
12407 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12408 calls. Call AC_PROG_RANLIB. Configure gnulib using
12411 (GNULIB_STDINT_H): Adjust.
12412 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12413 * gdbreplay.c: Include build-gnulib/config.h.
12414 * server.h: Likewise.
12415 * aclocal.m4: Regenerate.
12416 * config.in: Regenerate.
12417 * configure: Regenerate.
12419 2012-04-19 Pedro Alves <palves@redhat.com>
12421 * Makefile.in (LIBGNU, INCGNU): Adjust.
12422 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12423 (all, install-only, uninstall, clean-info, all-lib, clean)
12424 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12425 * configure.ac: Adjust AC_OUTPUT output.
12426 * aclocal.m4: Regenerate.
12427 * configure: Regenerate.
12429 2012-04-19 Pedro Alves <palves@redhat.com>
12431 * Makefile.in (generated_files): New.
12432 (server_h): Remove the explicit dependency on config.h, and depend
12433 on $generated_files.
12435 2012-04-19 Pedro Alves <palves@redhat.com>
12437 * Makefile.in (INCGNU): Add -Ignulib.
12439 2012-04-19 Pedro Alves <palves@redhat.com>
12441 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12442 (INCGNU): ... this, and spell out -I here.
12443 (GNULIB_LIB): Rename to ...
12444 (LIBGNU): ... this.
12445 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12447 2012-04-19 Pedro Alves <palves@redhat.com>
12449 * config.in: Regenerate.
12451 2012-04-19 Pedro Alves <palves@redhat.com>
12453 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12454 * server.h (memmem): Remove declaration.
12455 * config.in: Regenerate.
12456 * configure: Regenerate.
12458 2012-04-19 Yao Qi <yao@codesourcery.com>
12460 * Makefile.in (SFILES): Add common/vec.c.
12464 2012-04-19 Yao Qi <yao@codesourcery.com>
12466 * remote-utils.c (prepare_resume_reply): Replace with macro
12467 target_core_of_thread.
12468 * server.c (handle_qxfer_threads_proper): Likewise.
12469 * target.h (traget_core_of_thread): New macro.
12471 2012-04-18 Pedro Alves <palves@redhat.com>
12473 * aclocal.m4: Regenerate.
12474 * configure: Regenerate.
12476 2012-04-16 Yao Qi <yao@codesourcery.com>
12478 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12479 duplicated on address.
12481 2012-04-16 Yao Qi <yao@codesourcery.com>
12483 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12484 (struct tracepoint_action_ops) <send>: New field.
12485 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12486 (agent_expr_send, x_tracepoint_action_send): New.
12487 (l_tracepoint_action_send): New.
12488 (cmd_qtdp): Download and install tracepoint
12489 according to `use_agent'.
12490 (run_inferior_command): Add one more parameter `len'.
12492 (tracepoint_send_agent): New.
12493 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12495 2012-04-16 Yao Qi <yao@codesourcery.com>
12497 * tracepoint.c (download_tracepoints): Moved to ...
12498 (cmd_qtstart): ... here.
12500 2012-04-14 Yao Qi <yao@codesourcery.com>
12502 * tracepoint.c: Include inttypes.h.
12503 (struct collect_memory_action): Use sized types.
12504 (struct tracepoint): Likewise.
12505 (cmd_qtdp, stop_tracing): Update print specifiers.
12506 (cmd_qtp, response_tracepoint): Likewise.
12507 (collect_data_at_tracepoint): Likewise.
12508 (collect_data_at_step): Likewise.
12510 2012-04-14 Yao Qi <yao@codesourcery.com>
12512 Import gnulib module inttypes.
12513 * aclocal.m4, config.in, configure: Regenerated.
12515 2012-04-14 Yao Qi <yao@codesourcery.com>
12517 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12518 Makefile and config.status at last.
12520 2012-04-13 Yao Qi <yao@codesourcery.com>
12522 * tracepoint.c: Include stdint.h unconditionally.
12524 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12526 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12527 on BFD_HAVE_SYS_PROCFS_TYPE.
12528 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12529 * configure: Regenerate.
12530 * config.in: Likewise.
12532 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12534 * Makefile.in (clean): Also remove x32.c x32-linux.c
12535 x32-avx.c x32-avx-linux.c.
12536 (x32.o): New target.
12538 (x32-linux.o): Likewise.
12539 (x32-linux.c): Likewise.
12540 (x32-avx.o): Likewise.
12541 (x32-avx.c): Likewise.
12542 (x32-avx-linux.o): Likewise.
12543 (x32-avx-linux.c): Likewise.
12545 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12546 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12547 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12548 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12549 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12550 i386/x32-avx-linux.xml.
12552 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12553 (init_registers_x32_avx_linux): Likwise.
12554 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12555 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12557 2012-04-13 Pedro Alves <palves@redhat.com>
12559 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12560 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12561 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12562 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12565 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12567 * linux-x86-low.c (compat_x32_clock_t): New.
12568 (compat_x32_siginfo_t): Likewise.
12569 (compat_x32_siginfo_from_siginfo): Likewise.
12570 (siginfo_from_compat_x32_siginfo): Likewise.
12571 (linux_is_elf64): Likewise.
12572 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12573 and siginfo_from_compat_x32_siginfo for x32.
12574 (x86_arch_setup): Set linux_is_elf64.
12576 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12579 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12581 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12582 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12583 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12584 compatible with process.
12586 2012-04-12 Yao Qi <yao@codesourcery.com>
12588 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12589 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12590 (install-only, install-info, clean): Handle sub dir gnulib.
12591 (all-lib, am--refresh): New targets.
12592 (memmem.o): Remove target.
12593 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12594 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12595 (AC_REPLACE_FUNCS): Remove memmem.
12596 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12597 (AC_OUTPUT): Generate Makefile in gnulib/.
12598 * aclocal.m4, config.in, configure: Regenerated.
12600 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12602 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12604 2012-04-05 Pedro Alves <palves@redhat.com>
12606 -Werror=strict-aliasing
12608 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12611 2012-04-04 Pedro Alves <palves@redhat.com>
12613 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12614 (sparc_store_gregset_from_stack, sparc_store_gregset)
12615 (sparc_breakpoint_at): Fix formatting.
12617 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12619 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12621 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12622 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12623 * config.in: Regenerate.
12624 * configure: Likewise.
12626 2012-03-29 Pedro Alves <palves@redhat.com>
12628 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12629 Correct ptrace arguments.
12631 2012-03-28 Pedro Alves <palves@redhat.com>
12633 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12634 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12635 (IA64_FR1_REGNUM): New defines.
12636 (ia64_fetch_register): New.
12637 (the_low_target): Install it.
12638 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12640 * linux-low.c (linux_fetch_registers): Try the
12641 the_low_target.fetch_register hook first.
12643 * linux-arm-low.c (the_low_target): Adjust.
12644 * linux-bfin-low.c (the_low_target): Adjust.
12645 * linux-cris-low.c (the_low_target): Adjust.
12646 * linux-crisv32-low.c (the_low_target): Adjust.
12647 * linux-m32r-low.c (the_low_target): Adjust.
12648 * linux-m68k-low.c (the_low_target): Adjust.
12649 * linux-mips-low.c (the_low_target): Adjust.
12650 * linux-ppc-low.c (the_low_target): Adjust.
12651 * linux-s390-low.c (the_low_target): Adjust.
12652 * linux-sh-low.c (the_low_target): Adjust.
12653 * linux-sparc-low.c (the_low_target): Adjust.
12654 * linux-tic6x-low.c (the_low_target): Adjust.
12655 * linux-x86-low.c (the_low_target): Adjust.
12656 * linux-xtensa-low.c (the_low_target): Adjust.
12658 2012-03-26 Pedro Alves <palves@redhat.com>
12660 * server.c (handle_qxfer_libraries): Don't bail early if
12661 the_target->qxfer_libraries_svr4 is not NULL.
12663 2012-03-26 Pedro Alves <palves@redhat.com>
12665 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12667 2012-03-23 Pedro Alves <palves@redhat.com>
12669 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12670 "library-list-svr4" element's start tag when the the DSO list is
12673 2012-03-23 Pedro Alves <palves@redhat.com>
12675 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12676 a variable whose type size is the same as the inferior's pointer
12679 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12681 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12683 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12684 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12685 * linux-low.h: Include <signal.h>.
12686 (struct siginfo): Remove forward declaration.
12687 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12690 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12692 * .gitignore: Ignore more files.
12694 2012-03-19 Pedro Alves <palves@redhat.com>
12695 Jan Kratochvil <jan.kratochvil@redhat.com>
12697 * server.c (cont_thread, general_thread): Add describing comments.
12698 (start_inferior): Clear `cont_thread'.
12699 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12702 2012-03-15 Yao Qi <yao@codesourcery.com>
12704 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12706 (cmd_qtdp): ... here.
12708 2012-03-15 Yao Qi <yao@codesourcery.com>
12710 * tracepoint.c (struct tracepoint_action_ops): New.
12711 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12712 (m_tracepoint_action_download): New.
12713 (r_tracepoint_action_download): New.
12714 (x_tracepoint_action_download): New.
12715 (l_tracepoint_action_download): New.
12716 (add_tracepoint_action): Install `action->ops' according type.
12717 (download_tracepoint_1): Move code `download' function pointer
12718 of various tracepoint_action_ops.
12720 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12722 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12723 linux_ptrace_attach_warnings.
12725 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12727 * Makefile.in (linux-ptrace.o): New.
12728 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12729 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12730 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12731 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12732 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12734 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12736 2012-03-08 Yao Qi <yao@codesourcery.com>
12737 Pedro Alves <palves@redhat.com>
12739 Fix PR server/13392.
12740 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12741 offset of JMP insn.
12742 * tracepoint.c (remove_tracepoint): New.
12743 (cmd_qtdp): Call remove_tracepoint when failed to install.
12745 2012-03-07 Pedro Alves <palves@redhat.com>
12747 * linux-low.c (get_detach_signal): New.
12748 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12749 Pass on pending signals to PTRACE_DETACH. Check the result of the
12751 * server.c (program_signals, program_signals_p): New.
12752 (handle_general_set): Handle QProgramSignals.
12753 * server.h (program_signals, program_signals_p): Declare.
12755 2012-03-05 Pedro Alves <palves@redhat.com>
12756 Jan Kratochvil <jan.kratochvil@redhat.com>
12758 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12761 2012-03-03 Yao Qi <yao@codesourcery.com>
12763 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12764 agent_look_up_symbols.
12766 2012-03-03 Yao Qi <yao@codesourcery.com>
12768 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12769 (linux-x86-low.o): Likewise.
12770 * server.h: Remove in_process_agent_loaded.
12771 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12775 2012-03-03 Yao Qi <yao@codesourcery.com>
12777 * tracepoint.c (gdb_agent_capability): New global.
12778 (in_process_agent_loaded_ust): Renamed to
12779 `in_process_agent_supports_ust'.
12781 (in_process_agent_supports_ust): Call agent_capability_check.
12782 (clear_installed_tracepoints): Assert that agent supports
12785 2012-03-03 Yao Qi <yao@codesourcery.com>
12787 * linux-low.c (linux_supports_agent): New.
12788 (linux_target_ops): Initialize field `supports_agent' with
12789 linux_supports_agent.
12790 * target.h (struct target_ops) <supports_agent>: New.
12791 (target_supports_agent): New macro.
12792 * server.c (handle_general_set): Handle packet 'QAgent'.
12793 (handle_query): Send `QAgent+'.
12794 * Makefile.in (server.o): Depends on agent.h.
12796 2012-03-03 Yao Qi <yao@codesourcery.com>
12798 * Makefile.in (OBS): Add agent.o.
12799 Add new rule for agent.o.
12800 Track dependence of tracepoint.c on agent.h.
12801 * tracepoint.c (run_inferior_command_1):
12802 (run_inferior_command): Call agent_run_command.
12803 (gdb_ust_connect_sync_socket): Deleted. Move it to
12805 (resume_thread, stop_thread): Likewise.
12806 (gdb_ust_socket_init): Renamed to ...
12807 (gdb_agent_socket_init): ... New.
12808 (gdb_ust_thread): Renamed to ...
12809 (gdb_agent_helper_thread): ... New.
12810 (gdb_ust_init): Move some code to ...
12811 (gdb_agent_init): ... here. New.
12812 [HAVE_UST]: Call gdb_ust_init.
12813 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12814 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12815 * config.in, configure: Regenerated.
12817 2012-03-02 Pedro Alves <palves@redhat.com>
12819 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12820 * linux-low.c (struct simple_pid_list): New.
12821 (stopped_pids): New a struct simple_pid_list pointer.
12822 (add_to_pid_list, pull_pid_from_list): New.
12823 (handle_extended_wait): Don't assume the first signal new children
12824 report is SIGSTOP. Adjust call to pull_pid_from_list.
12825 (linux_wait_for_lwp): Adjust.
12827 2012-03-02 Yao Qi <yao@codesourcery.com>
12829 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12832 2012-03-02 Yao Qi <yao@codesourcery.com>
12834 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12835 `stop_pc' and `tpoint'. Update caller.
12837 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12839 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12840 * linux-low.c (use_linux_regsets): New macro.
12841 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12842 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12843 (linux_register_in_regsets): New function.
12844 (usr_fetch_inferior_registers): Skip registers covered by
12846 (usr_store_inferior_registers): Likewise.
12847 (usr_fetch_inferior_registers): New macro.
12848 (usr_store_inferior_registers): Likewise.
12849 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12850 (linux_store_registers): Likewise.
12851 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12853 (init_registers_mips64_dsp_linux): Likewise.
12854 (init_registers_mips_linux): New macro.
12855 (init_registers_mips_dsp_linux): Likewise.
12856 (mips_dsp_num_regs): Likewise.
12857 (DSP_BASE, DSP_CONTROL): New fallback macros.
12858 (mips_base_regs): New macro.
12859 (mips_regmap): Use it. Fix the size.
12860 (mips_dsp_regmap): New variable.
12861 (mips_dsp_regset_bitmap): Likewise.
12862 (mips_arch_setup): New function.
12863 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12865 (mips_cannot_store_register): Likewise.
12866 (the_low_target): Update .arch_setup, .num_regs and .regmap
12867 initializers. Add .regset_bitmap initializer.
12868 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12870 * linux-bfin-low.c (the_low_target): Likewise.
12871 * linux-cris-low.c (the_low_target): Likewise.
12872 * linux-crisv32-low.c (the_low_target): Likewise.
12873 * linux-ia64-low.c (the_low_target): Likewise.
12874 * linux-m32r-low.c (the_low_target): Likewise.
12875 * linux-m68k-low.c (the_low_target): Likewise.
12876 * linux-ppc-low.c (the_low_target): Likewise.
12877 * linux-s390-low.c (the_low_target): Likewise.
12878 * linux-sh-low.c (the_low_target): Likewise.
12879 * linux-sparc-low.c (the_low_target): Likewise.
12880 * linux-tic6x-low.c (the_low_target): Likewise.
12881 * linux-x86-low.c (the_low_target): Likewise.
12882 * linux-xtensa-low.c (the_low_target): Likewise.
12883 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12884 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12885 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12887 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12888 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12890 2012-02-29 Yao Qi <yao@codesourcery.com>
12891 Pedro Alves <palves@redhat.com>
12893 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12894 `step_over_finished' is true.
12896 2012-02-27 Pedro Alves <palves@redhat.com>
12898 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12899 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12901 2012-02-27 Pedro Alves <palves@redhat.com>
12904 * linux-low.c (pid_is_stopped): New.
12905 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12907 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12909 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12912 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12914 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12916 2012-02-24 Luis Machado <lgustavo@codesourcery>
12918 * server.c (handle_query): Advertise support for target-side
12919 breakpoint condition evaluation.
12920 (process_point_options): New function.
12921 (process_serial_event): When inserting a breakpoint, check for
12922 a target-side condition that should be evaluated.
12924 * mem-break.c: Include regcache.h and ax.h.
12925 (point_cond_list_t): New data structure.
12926 (breakpoint) <cond_list>: New field.
12927 (find_gdb_breakpoint_at): Make non-static.
12928 (delete_gdb_breakpoint_at): Clear any target-side
12930 (clear_gdb_breakpoint_conditions): New function.
12931 (add_condition_to_breakpoint): Likewise.
12932 (add_breakpoint_condition): Likewise.
12933 (gdb_condition_true_at_breakpoint): Likewise.
12934 (gdb_breakpoint_here): Return result directly instead
12935 of going through a local variable.
12937 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12938 (clear_gdb_breakpoint_conditions): Likewise.
12939 (add_breakpoint_condition): Likewise.
12940 (gdb_condition_true_at_breakpoint): Likewise.
12942 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12943 (need_step_over_p): Take target-side breakpoint condition into
12946 2012-02-24 Luis Machado <lgustavo@codesourcery>
12948 * server.h: Include tracepoint.h.
12949 (agent_mem_read, agent_get_trace_state_variable_value,
12950 agent_set_trace_state_variable_value,
12951 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12952 get_set_tsv_func_addr): New prototypes.
12954 * ax.h: New include file.
12955 * ax.c: New source file.
12957 * tracepoint.c: Include ax.h.
12958 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12959 agent_expr, eval_result_type): Move to ax.h.
12960 (parse_agent_expr): Rename to ...
12961 (gdb_parse_agent_expr): ... this, make it non-static and move
12963 (unparse_agent_expr) Rename to ...
12964 (gdb_unparse_agent_expr): ... this, make it non-static and move
12966 (eval_agent_expr): Rename to ...
12967 (eval_tracepoint_agent_expr): ... this.
12968 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12969 forward declarations.
12970 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12971 (agent_get_trace_state_variable_value): New function.
12972 (agent_set_trace_state_variable_value): New function.
12973 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12974 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12975 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12976 (condition_true_at_tracepoint): Likewise.
12977 (parse_agent_expr): Rename to ...
12978 (gdb_parse_agent_expr): ... this and move to ax.c.
12979 (unparse_agent_expr): Rename to ...
12980 (gdb_unparse_agent_expr): ... this and move to ax.c.
12981 (gdb_agent_op_name): Move to ax.c.
12982 (eval_agent_expr): Rename to ...
12983 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12985 (eval_tracepoint_agent_expr): New function.
12986 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12988 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12990 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12991 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12992 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12993 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12994 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12995 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12996 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12997 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12998 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12999 (compile_bytecodes): Remove forward declaration.
13000 (is_goto_target): Move to ax.c.
13001 (compile_bytecodes): Move to ax.c and call
13002 agent_get_trace_state_variable_value (...) and
13003 agent_set_trace_state_variable_value (...).
13005 * Makefile.in: Update ax.c and IPA dependencies.
13007 2012-02-24 Pedro Alves <palves@redhat.com>
13009 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13010 (cmd_bigqtbuffer_circular): ... this. Only handle
13011 'QTBuffer:circular:'.
13012 (handle_tracepoint_general_set): Adjust.
13014 2012-02-16 Yao Qi <yao@codesourcery.com>
13016 * inferiors.c: Move code to ...
13017 * dll.c: .... here. New.
13018 * server.h: Declare clear_dlls.
13019 * Makefile.in (SFILES): Add dll.c.
13023 2012-02-11 Yao Qi <yao@codesourcery.com>
13025 * server.c: (handle_monitor_command): Add a new parameter
13027 (handle_query): Update caller.
13029 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13031 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13032 * configure, config.in: Regenerate.
13033 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13036 2012-02-02 Pedro Alves <palves@redhat.com>
13038 Try SIGKILL first, then PTRACE_KILL.
13039 * linux-low.c (linux_kill_one_lwp): New.
13040 (linux_kill_one_lwp): Rename to ...
13041 (kill_one_lwp_callback): ... this. Use the new
13042 linux_kill_one_lwp.
13044 2012-02-02 Pedro Alves <palves@redhat.com>
13046 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13049 2012-01-27 Pedro Alves <palves@redhat.com>
13051 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13052 (elf_64_file_p): Make static.
13053 (linux_pid_exe_is_elf_64_file): New.
13054 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13055 Delete declarations.
13056 (linux_pid_exe_is_elf_64_file): Declare.
13057 * linux-x86-low.c (x86_arch_setup): Use
13058 linux_pid_exe_is_elf_64_file.
13060 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13062 * linux-low.c (linux_wait_for_event_1): Rename to ...
13063 (linux_wait_for_event): ... here and merge it with former
13064 linux_wait_for_event - new variable wait_ptid, use it.
13065 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13067 2012-01-23 Pedro Alves <palves@redhat.com>
13069 * server.c (main): Avoid yet another case of infinite loop while
13070 detaching/killing after a longjmp.
13072 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13075 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13077 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13079 * hostio.c (handle_readlink): New function.
13080 (handle_vFile): Call it to handle "vFile:readlink" packets.
13082 2012-01-20 Pedro Alves <palves@redhat.com>
13083 Ulrich Weigand <ulrich.weigand@linaro.org>
13085 * server.c (handle_v_requests): Only support vAttach and vRun to
13086 start multiple processes when in extended protocol mode.
13088 2012-01-17 Pedro Alves <palves@redhat.com>
13090 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13091 memalign plus mprotect to allocate the scratch buffer.
13093 2012-01-13 Pedro Alves <palves@redhat.com>
13095 * server.c (attach_inferior): Clear `cont_thread'.
13097 2012-01-13 Pedro Alves <palves@redhat.com>
13099 * server.c (main): Avoid infinite loop while detaching/killing
13102 2012-01-09 Doug Evans <dje@google.com>
13104 * server.c (start_inferior): Set last_ptid in --wrapper case.
13106 2012-01-06 Yao Qi <yao@codesourcery.com>
13108 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13110 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13112 2012-01-04 Yao Qi <yao@codesourcery.com>
13114 * tracepoint.c (cmd_qtdp): Print debug message
13115 for static tracepoint.
13117 2012-01-04 Yao Qi <yao@codesourcery.com>
13119 * tracepoint.c (trace_vdebug): Differentiate debug message
13120 between gdbserver and IPA.
13122 2012-01-03 Yao Qi <yao@codesourcery.com>
13124 * tracepoint.c (tracepoint_was_hit): Don't collect for
13127 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13129 * terminal.h: Reformat copyright header.
13131 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13133 * server.c (gdbserver_version): Update copyright year.
13134 * gdbreplay.c (gdbreplay_version): Likewise.
13136 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13138 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13141 2011-12-18 Hui Zhu <teawater@gmail.com>
13142 * linux-low.c (linux_create_inferior): Save return value to ret.
13144 2011-12-18 Hui Zhu <teawater@gmail.com>
13146 * linux-low.c (linux_create_inferior): Save return value to ret.
13148 2011-12-16 Doug Evans <dje@google.com>
13150 * linux-low.c (linux_create_inferior): If stdio connection,
13151 redirect stdin from /dev/null, stdout to stderr.
13152 * remote-utils.c (remote_is_stdio): New static global.
13153 (remote_connection_is_stdio): New function.
13154 (remote_prepare): Handle stdio connection.
13155 (remote_open): Ditto.
13156 (remote_close): Don't close stdin for stdio connections.
13157 (read_prim,write_prim): New functions. Replace all calls to
13158 read/write to these.
13159 * server.c (main): Watch for "-" argument. Move call to
13160 remote_prepare before start_inferior.
13161 * server.h (STDIO_CONNECTION_NAME): New macro.
13162 (remote_connection_is_stdio): Declare.
13164 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13165 in debugging output.
13167 2011-12-15 Yao Qi <yao@codesourcery.com>
13169 * tracepoint.c: Include sys/syscall.h.
13170 (gdb_ust_thread): Remove preprocessor conditional.
13172 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13174 * linux-low.c (linux_detach_one_lwp): Call
13175 the_low_target.prepare_to_resume before detaching.
13177 2011-12-14 Yao Qi <yao@codesourcery.com>
13179 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13182 2011-12-14 Yao Qi <yao@codesourcery.com>
13184 * i386-low.c (i386_low_stopped_data_address): Initialize local
13185 variable `control'.
13187 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13191 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13192 DR_CONTROL unless necessary. Extend comments.
13193 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13194 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13196 2011-12-13 Yao Qi <yao@codesourcery.com>
13198 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13200 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13202 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13204 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13205 Print new debug message for such case.
13207 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13209 Fix overlapping memcpy.
13210 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13211 the read_inferior_memory transfer.
13212 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13213 write_inferior_memory transfer.
13214 (set_fast_tracepoint_jump): New variable buf. Use it for the
13215 read_inferior_memory and write_inferior_memory transfers.
13216 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13217 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13218 Use it for the write_inferior_memory transfer.
13219 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13222 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13224 * linux-low.c (fetch_register, store_register): Make code
13225 consistent, fix formatting.
13227 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13229 * linux-low.c (usr_store_inferior_registers): Factor out code
13230 to handle individual registers into...
13231 (store_register): ... this new function.
13233 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13235 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13236 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13237 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13238 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13239 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13240 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13241 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13242 (srv_xmlfiles): Add new XML files.
13244 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13246 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13247 (init_registers_s390_linux32v1): Add prototype.
13248 (init_registers_s390_linux32v2): Likewise.
13249 (init_registers_s390_linux64v1): Likewise.
13250 (init_registers_s390_linux64v2): Likewise.
13251 (init_registers_s390x_linux64v1): Likewise.
13252 (init_registers_s390x_linux64v2): Likewise.
13253 (s390_num_regs): Increment to 52.
13254 (s390_regmap): Add orig_r2 register.
13255 (s390_num_regs_3264): Increment to 68.
13256 (s390_regmap_3264): Add orig_r2 register.
13257 (s390_collect_ptrace_register): Handle orig_r2 register.
13258 (s390_supply_ptrace_register): Likewise.
13259 (s390_fill_last_break): New function.
13260 (s390_store_last_break): Likewise.
13261 (s390_fill_system_call): New function.
13262 (s390_store_system_call): Likewise.
13263 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13265 (s390_check_regset): New function.
13266 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13267 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13268 Update target_regsets for available register sets.
13270 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13271 Jan Kratochvil <jan.kratochvil@redhat.com>
13273 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13274 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13276 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13277 * linux-low.h (struct process_info_private): New member r_debug.
13278 * server.c (handle_qxfer_libraries): Call
13279 the_target->qxfer_libraries_svr4.
13280 (handle_qxfer_libraries_svr4): New function.
13281 (qxfer_packets): New entry "libraries-svr4".
13282 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13283 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13284 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13285 PACKET_qXfer_libraries_svr4.
13287 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13289 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13290 PSW address/mask between 8-byte and 16-byte formats.
13291 (s390_supply_ptrace_register): Likewise.
13292 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13293 basic addressing mode bit.
13295 2011-11-24 Stan Shebs <stan@codesourcery.com>
13297 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13299 2011-11-17 Stan Shebs <stan@codesourcery.com>
13301 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13302 (tracing_start_time): New global.
13303 (tracing_stop_time): New global.
13304 (tracing_user_name): New global.
13305 (tracing_notes): New global.
13306 (tracing_stop_note): New global.
13307 (cmd_qtstart): Set traceframe_usage, start_time.
13308 (stop_tracing): Set stop_time.
13309 (cmd_qtstatus): Report additional status.
13310 (cmd_qtp): New function.
13311 (handle_tracepoint_query): Call it.
13312 (cmd_qtnotes): New function.
13313 (handle_tracepoint_general_set): Call it.
13314 (get_timestamp): Rename from tsv_get_timestamp.
13316 2011-11-14 Stan Shebs <stan@codesourcery.com>
13317 Kwok Cheung Yeung <kcy@codesourcery.com>
13319 * linux-x86-low.c (small_jump_insn): New.
13320 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13321 trampoline and error message, build a trampoline and issue a small
13322 jump instruction to it.
13323 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13324 trampoline and error message.
13325 (x86_get_min_fast_tracepoint_insn_len): New.
13326 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13327 * linux-low.h (struct linux_target_ops): Add arguments to
13328 install_fast_tracepoint_jump_pad operation, add new operation.
13329 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13331 (linux_get_min_fast_tracepoint_insn_len): New function.
13332 (linux_target_op): Add new operation.
13333 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13334 (gdb_trampoline_buffer_end): Ditto.
13335 (gdb_trampoline_buffer_error): Ditto.
13336 (struct ipa_sym_addresses): Add fields for new IPA variables.
13337 (symbol_list): Add entries for new IPA variables.
13338 (struct tracepoint): Add fields to hold the address range of the
13339 trampoline used by the tracepoint.
13340 (trampoline_buffer_head): New static variable.
13341 (trampoline_buffer_tail): Ditto.
13342 (claim_trampoline_space): New function.
13343 (have_fast_tracepoint_trampoline_buffer): New function.
13344 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13346 (install_fast_tracepoint): Ditto, also add error buffer argument.
13347 (cmd_qtminftpilen): New function.
13348 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13349 (fast_tracepoint_from_trampoline_address): New function.
13350 (fast_tracepoint_collecting): Handle trampoline as part of jump
13352 (set_trampoline_buffer_space): New function.
13353 (initialize_tracepoint): Initialize new IPA variables.
13354 * target.h (struct target_ops): Add arguments to
13355 install_fast_tracepoint_jump_pad operation, add new
13356 get_min_fast_tracepoint_insn_len operation.
13357 (target_get_min_fast_tracepoint_insn_len): New.
13358 (install_fast_tracepoint_jump_pad): Add arguments.
13359 * server.h (IPA_BUFSIZ): Define.
13360 * linux-i386-ipa.c: Include extra header files.
13361 (initialize_fast_tracepoint_trampoline_buffer): New function.
13362 (initialize_low_tracepoint): Call it.
13363 * server.h (set_trampoline_buffer_space): Declare.
13364 (claim_trampoline_space): Ditto.
13365 (have_fast_tracepoint_trampoline_buffer): Ditto.
13367 2011-11-14 Yao Qi <yao@codesourcery.com>
13369 * server.c (handle_query): Handle InstallInTrace for qSupported.
13370 * tracepoint.c (add_tracepoint): Sort list.
13371 (install_tracepoint, download_tracepoint): New.
13372 (cmd_qtdp): Call them to install and download tracepoints.
13373 (sort_tracepoints): Removed.
13374 (cmd_qtstart): Update.
13376 2011-11-14 Yao Qi <yao@codesourcery.com>
13378 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13379 * mem-break.h: Declare.
13380 * tracepoint.c (cmd_qtstart): Move some code to ...
13381 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13383 (download_tracepoints): Move some code to ...
13384 (download_tracepoint_1): ... here. New.
13386 2011-11-08 Yao Qi <yao@codesourcery.com>
13388 * remote-utils.c (relocate_instruction): A comment fix.
13390 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13392 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13393 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13394 dr_status_mirror and dr_control_mirror from debug_reg_state.
13395 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13396 (i386_initial_stuff): Remove use of deleted globals.
13397 (i386_get_thread_context, i386_set_thread_context,
13398 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13399 from debug_reg_state.
13401 2011-11-05 Yao Qi <yao@codesourcery.com>
13403 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13404 address as TPOINT's.
13406 2011-11-02 Stan Shebs <stan@codesourcery.com>
13408 * tracepoint.c (agent_mem_read_string): New function.
13409 (eval_agent_expr): Call it for tracenz.
13410 * server.c (handle_query): Report support for tracenz.
13412 2011-11-02 Yao Qi <yao@codesourcery.com>
13414 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13416 2011-11-02 Yao Qi <yao@codesourcery.com>
13418 * target.h: Fix a typo in comment.
13420 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13422 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13423 clobber the breakpoints' shadows with fast tracepoint jumps.
13424 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13425 * target.c (write_inferior_memory): Also pass MYADDR down to
13428 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13430 * configure.ac: Check support for personality routine.
13431 * configure: Regenerate.
13432 * config.in: Likewise.
13433 * linux-low.c: Include <sys/personality.h>.
13434 Define ADDR_NO_RANDOMIZE if necessary.
13435 (linux_create_inferior): Disable address space randomization when
13436 forking inferior, if requested.
13437 (linux_supports_disable_randomization): New function.
13438 (linux_target_ops): Install it.
13439 * server.h (disable_randomization): Declare.
13440 * server.c (disable_randomization): New global variable.
13441 (handle_general_set): Handle QDisableRandomization.
13442 (handle_query): Likewise for qSupported.
13443 (main): Support --disable-randomization and --no-disable-randomization
13444 command line arguments.
13445 * target.h (struct target_ops): Add supports_disable_randomization.
13446 (target_supports_disable_randomization): New macro.
13448 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13450 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13452 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13453 [!PT_GETDSBT] (target_loadmap): New definition.
13454 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13455 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13456 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13457 and PT_GETDSBT to LINUX_LOADMAP.
13458 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13459 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13461 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13463 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13464 (arm_linux_hwbp_cap): New static variable.
13465 (arm_linux_get_hwbp_cap): Replace by ...
13466 (arm_linux_init_hwbp_cap): ... this new function.
13467 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13468 (arm_linux_get_hw_watchpoint_count): Likewise.
13469 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13470 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13471 (arm_prepare_to_resume): Use perror_with_name instead of error.
13473 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13475 * linux-arm-low.c: Include <signal.h>.
13476 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13477 (struct arm_linux_hwbp_cap): New data type.
13478 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13479 (struct arm_linux_hw_breakpoint): New data type.
13480 (MAX_BPTS, MAX_WPTS): Define.
13481 (struct arch_process_info, struct arch_lwp_info): New data types.
13482 (arm_linux_get_hwbp_cap): New function.
13483 (arm_linux_get_hw_breakpoint_count): Likewise.
13484 (arm_linux_get_hw_watchpoint_count): Likewise.
13485 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13486 (arm_hwbp_control_initialize): Likewise.
13487 (arm_hwbp_control_is_enabled): Likewise.
13488 (arm_hwbp_control_is_initialized): Likewise.
13489 (arm_hwbp_control_disable): Likewise.
13490 (arm_linux_hw_breakpoint_equal): Likewise.
13491 (arm_linux_hw_point_initialize): Likewise.
13492 (struct update_registers_data): New data structure.
13493 (update_registers_callback: New function.
13494 (arm_insert_point): Likewise.
13495 (arm_remove_point): Likewise.
13496 (arm_stopped_by_watchpoint): Likewise.
13497 (arm_stopped_data_address): Likewise.
13498 (arm_new_process): Likewise.
13499 (arm_new_thread): Likewise.
13500 (arm_prepare_to_resume): Likewise.
13501 (the_low_target): Register arm_insert_point, arm_remove_point,
13502 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13503 arm_new_thread, and arm_prepare_to_resume.
13505 2011-09-15 Stan Shebs <stan@codesourcery.com>
13507 * server.h (struct emit_ops): Add compare-goto fields.
13508 * tracepoint.c (gdb_agent_op_sizes): New table.
13509 (emit_eq_goto): New function.
13510 (emit_ne_goto): New function.
13511 (emit_lt_goto): New function.
13512 (emit_le_goto): New function.
13513 (emit_gt_goto): New function.
13514 (emit_ge_goto): New function.
13515 (is_goto_target): New function.
13516 (compile_bytecodes): Recognize special cases of compare-goto
13517 combinations and call specialized emitters for them.
13518 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13519 (amd64_emit_ne_goto): New function.
13520 (amd64_emit_lt_goto): New function.
13521 (amd64_emit_le_goto): New function.
13522 (amd64_emit_gt_goto): New function.
13523 (amd64_emit_ge_goto): New function.
13524 (amd64_emit_ops): Add the new functions.
13525 (i386_emit_eq_goto): New function.
13526 (i386_emit_ne_goto): New function.
13527 (i386_emit_lt_goto): New function.
13528 (i386_emit_le_goto): New function.
13529 (i386_emit_gt_goto): New function.
13530 (i386_emit_ge_goto): New function.
13531 (i386_emit_ops): Add the new functions.
13533 2011-09-08 Stan Shebs <stan@codesourcery.com>
13535 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13536 (i386_emit_epilogue): Restore %ebx.
13538 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13540 * server.c (step_thread): Remove definition.
13541 (process_serial_event): Don't handle Hs.
13542 * server.h (step_thread): Remove declaration.
13543 * target.c (set_desired_inferior): Remove use of step_thread.
13545 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13547 * linux-low.c: Include linux-procfs.h.
13548 (linux_attach_lwp_1): Update comments.
13549 (linux_attach): Scan for existing threads when attaching to a
13550 process that is the tgid.
13551 * Makefile.in: Update dependencies.
13553 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13555 * configure.srv: Add linux-procfs.o dependencies.
13557 2011-08-14 Yao Qi <yao@codesourcery.com>
13559 * target.h (struct target_ops): Fix indent.
13560 * win32-low.c (win32_target_ops): Fix comment.
13562 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13563 Yao Qi <yao@codesourcery.com>
13565 * Makefile.in (clean): Remove tic6x-*.c files.
13566 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13567 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13568 (tic6x-c64xp-linux.c): Likewise.
13569 * configure.srv: Add support for tic6x-*-uclinux.
13570 * linux-tic6x-low.c: New.
13571 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13573 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13574 Yao Qi <yao@codesourcery.com>
13576 * target.h (struct target_ops): Add read_loadmap.
13577 * linux-low.c (struct target_loadseg): New type.
13578 (struct target_loadmap): New type.
13579 (linux_read_loadmap): New function.
13580 (linux_target_ops): Add linux_read_loadmap.
13581 * server.c (handle_query): Support qXfer:fdpic:read packet.
13582 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13585 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13587 * win32-low.c: Include <stdint.h>.
13589 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13591 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13592 to the inferior here.
13593 (i386_remove_aligned_watchpoint): Ditto.
13594 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13595 fit part of the watchpoint in the debug registers.
13596 (i386_update_inferior_debug_regs): New.
13597 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13598 registers, and only update the inferior on success.
13599 (i386_low_remove_watchpoint): Ditto.
13601 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13603 * linux-low.c (compare_ints, unique, list_threads, show_process,
13604 linux_core_of_thread): Delete.
13605 (linux_target_ops): Change linux_core_of_thread to
13606 linux_common_core_of_thread.
13607 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13608 * utils.c (malloc_failure): Change type of argument.
13609 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13610 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13611 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13612 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13613 (IPA_OBJS): Add common-utils-ipa.o.
13614 (ptid_h, linux_osdata_h): New macros.
13615 (server_h): Add common/common-utils.h, common/xml-utils.h,
13616 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13618 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13619 ptid.o, buffer.o): New rules.
13620 (linux-low.o): Add common/linux-osdata.h as a dependency.
13621 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13622 * configure.ac: Add AC_HEADER_DIRENT check.
13623 * config.in: Regenerate.
13624 * configure: Regenerate.
13625 * remote-utils.c (xml_escape_text): Delete.
13626 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13627 buffer_xml_printf): Move to common/buffer.c.
13628 * server.c (main): Remove call to initialize_inferiors.
13629 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13630 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13631 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13632 internal_error, gdb_assert, gdb_assert_fail): Delete.
13633 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13634 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13636 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13637 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13638 initialize_inferiors): Delete.
13640 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13642 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13645 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13647 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13649 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13651 2011-05-26 Yao Qi <yao@codesourcery.com>
13653 * Makefile.in (thread-db.o): Track dependence to
13654 common/gdb_thread_db.h.
13655 * thread-db.c: include gdb_thread_db.h from right place.
13657 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13659 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13660 __FILE__ and __LINE__ to internal_error.
13662 2011-05-13 Doug Evans <dje@google.com>
13664 * thread-db.c (try_thread_db_load_from_sdir): New function.
13665 (try_thread_db_load_from_dir): New function.
13666 (thread_db_load_search): Handle $sdir, ignore $pdir.
13667 Remove trying of system directories if search of
13668 libthread-db-search-path fails, that is now done via $sdir.
13670 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13672 * server.c (handle_query): Add EnableDisableTracepoints to the list
13673 of supported features.
13674 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13676 (cmd_qtenable_disable): New.
13677 (cmd_qtstart): Install tracepoints even if disabled.
13678 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13679 receiving a QTEnable or QTDisable packet.
13680 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13681 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13683 (gdb_probe): Skip data collection if static tracepoint is disabled.
13685 2011-05-10 Doug Evans <dje@google.com>
13687 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13689 2011-05-04 Doug Evans <dje@google.com>
13691 * linux-low.c (linux_join): Skip process lookup.
13692 * spu-low.c (spu_join): Ditto.
13693 * server.c (join_inferiors_callback): Delete.
13694 (process_serial_event): For 'D' packet (detach) call join_inferior
13697 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13699 * README: Don't mention xscale*-*-linux*.
13700 * configure.srv (xscale*-*-linux*): Don't handle target.
13702 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13704 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13706 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13707 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13708 (i386_emit_void_call_2): Likewise.
13710 2011-04-26 Yao Qi <yao@codesourcery.com>
13712 * linux-low.c: Move common macros to linux-ptrace.h.
13713 Include linux-ptrace.h.
13714 * Makefile.in (linux_ptrace_h): New.
13715 (linux-low.o): Depends on linux-ptrace.h.
13717 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13719 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13720 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13721 (remote_prepare): New function with most of the TCP code from ...
13722 (remote_open): ... here. Detect PORT here unconditionally. Move also
13723 setting transport_is_reliable.
13724 * server.c (run_once): New variable.
13725 (gdbserver_usage): Document it.
13726 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13727 the first run if RUN_ONCE.
13728 * server.h (run_once, remote_prepare): New declarations.
13730 2011-04-19 Tom Tromey <tromey@redhat.com>
13732 * win32-low.c (handle_load_dll): Remove duplicate "the".
13734 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13736 Remove support for old Cygwin 1.5 versions.
13737 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13738 function to avoid warning.
13739 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13742 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13744 * gdbserver/server.h (Macro _): Define it if not available.
13746 2011-03-14 Michael Snyder <msnyder@vmware.com>
13748 * hostio.c (handle_close): Remove unnecessary null test.
13750 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13752 * Makefile.in (maintainer-clean realclean distclean): Remove
13753 "make ... subdir_do" command.
13755 2011-03-10 Michael Snyder <msnyder@vmware.com>
13757 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13759 * server.c (handle_v_run): Free alloced buffer on early return.
13761 2011-03-09 Yao Qi <yao@codesourcery.com>
13764 2011-03-04 Yao Qi <yao@codesourcery.com>
13766 * Makefile.in: Remove GNU make feature --directory.
13768 2011-03-05 Yao Qi <yao@codesourcery.com>
13770 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13771 (subdir_do): New make target. Copied from gdb/Makefile.
13772 (maintainer-clean, realclean, distclean, clean): Call corresponding
13773 make targets in common/Makefile.
13775 2011-02-11 Yao Qi <yao@codesourcery.com>
13777 * configure.ac: Call AC_PROG_RANLIB.
13778 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13779 * configure: Regenerate.
13781 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13783 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13785 2011-03-06 Yao Qi <yao@codesourcery.com>
13787 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13789 2011-03-05 Yao Qi <yao@codesourcery.com>
13791 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13792 (subdir_do): New make target. Copied from gdb/Makefile.
13793 (maintainer-clean, realclean, distclean, clean): Call corresponding
13794 make targets in common/Makefile.
13796 2011-03-04 Yao Qi <yao@codesourcery.com>
13798 * Makefile.in: Remove GNU make feature --directory.
13800 2011-03-04 Michael Snyder <msnyder@vmware.com>
13802 * server.c (queue_stop_reply): Call xmalloc not malloc.
13804 2011-03-02 Michael Snyder <msnyder@vmware.com>
13806 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13808 2011-02-28 Michael Snyder <msnyder@vmware.com>
13810 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13811 (cmd_qtframe): Ditto.
13812 (cmd_qtbuffer): Ditto.
13813 (cmd_bigqtbuffer): Ditto.
13815 * utils.c (decimal2str): Initialize 'width' to nine, then
13816 don't mess with it.
13818 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13820 * hostio.c (require_data): Free *data, not data.
13822 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13824 * hostio.c (require_data): Use free, not xfree.
13826 2011-02-27 Michael Snyder <msnyder@vmware.com>
13828 * server.c (handle_query): Discard unused value.
13830 * hostio.c (require_data): Free malloc memory before returning
13833 2011-02-26 Michael Snyder <msnyder@vmware.com>
13835 * linux-low.c (list_threads): Call closedir for dirent.
13837 2011-02-27 Michael Snyder <msnyder@vmware.com>
13839 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13840 a case statement falls through.
13842 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13844 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13847 2011-02-26 Michael Snyder <msnyder@vmware.com>
13849 * utils.c (decimal2str): Eliminate dead code and dead param.
13850 (pulongest): Drop dead param from call to decimal2str.
13853 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13855 Revert the following patch (not approved yet):
13856 2011-02-21 Hui Zhu <teawater@gmail.com>
13857 * tracepoint.c (tp_printf): New function.
13858 (eval_agent_expr): Handle gdb_agent_op_printf.
13860 2011-02-21 Hui Zhu <teawater@gmail.com>
13862 * tracepoint.c (tp_printf): New function.
13863 (eval_agent_expr): Handle gdb_agent_op_printf.
13865 2011-02-18 Tom Tromey <tromey@redhat.com>
13867 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13868 (tracepoint.o): Likewise.
13869 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13870 (gdb_agent_op_names): Likewise.
13872 2011-02-18 Tom Tromey <tromey@redhat.com>
13874 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13875 gdb_agent_op_rot>: New constants.
13876 (gdb_agent_op_names): Add pick and roll.
13877 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13880 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13882 * aclocal.m4: Regenerated with aclocal-1.11.1.
13884 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13886 * server.c (handle_qxfer_traceframe_info): New.
13887 (qxfer_packets): Register "traceframe-info".
13888 (handle_query): Report support for qXfer:traceframe-info:read+.
13889 * tracepoint.c (match_blocktype): New.
13890 (traceframe_find_block_type): Rename to ...
13891 (traceframe_walk_blocks): ... this. Add callback filter argument,
13893 (traceframe_find_block_type): New, reimplemented on top of
13894 traceframe_walk_blocks.
13895 (build_traceframe_info_xml): New.
13896 (traceframe_read_info): New.
13897 * server.h (traceframe_read_info): Declare.
13899 2011-02-11 Yao Qi <yao@codesourcery.com>
13901 * configure.ac: Call AC_PROG_RANLIB.
13902 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13903 * configure: Regenerate.
13905 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13907 * server.c (gdb_read_memory): Change return semantics to allow
13909 (handle_search_memory_1): Adjust.
13910 (process_serial_event) <'m' packet>: Handle partial transfers.
13911 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13913 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13915 * regcache.c (init_register_cache): Initialize
13916 regcache->register_status.
13917 (free_register_cache): Release regcache->register_status.
13918 (regcache_cpy): Copy register_status.
13919 (registers_to_string): Print 'x's for unavailable registers.
13920 (supply_register): Mark the register's status valid or
13921 unavailable, depending on whether a buffer was passed in or not.
13922 (supply_register_zeroed): New.
13923 (supply_regblock): Mark the registers' status valid or
13924 unavailable, depending on whether a buffer was passed in or not.
13925 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13926 (struct regcache): New `register_status' field.
13927 (supply_register_zeroed): Declare.
13928 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13929 supply_register_zeroed, rather than passing a NULL buffer to
13931 * tracepoint.c (fetch_traceframe_registers): Update comment.
13933 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13935 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13938 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13940 * server.h (decode_xfer_write): Change prototype.
13941 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13942 and don't extract the annex here.
13943 * server.c (decode_xfer_read): Remove `annex' parameter,
13944 and don't extract the annex here.
13945 (decode_xfer): New.
13946 (struct qxfer): New.
13947 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13948 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13949 (handle_qxfer_statictrace): New functions, abstracted out from
13950 handle_query, and made to use the struct qxfer interface.
13951 (handle_threads_qxfer_proper): Rename to ...
13952 (handle_qxfer_threads_proper): ... this.
13953 (handle_threads_qxfer): Rename to ...
13954 (handle_qxfer_threads): ... this. Adjust.
13955 (qxfer_packets): New array.
13956 (handle_qxfer): New function.
13957 (handle_query): Use handle_qxfer.
13959 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13961 * gdbreplay.c: Shorten lines of >= 80 columns.
13962 * linux-low.c: Ditto.
13963 * linux-ppc-low.c: Ditto.
13964 * linux-s390-low.c: Ditto.
13965 * linux-sparc-low.c: Ditto.
13966 * linux-x86-low.c: Ditto.
13967 * linux-xtensa-low.c: Ditto.
13968 * mem-break.c: Ditto.
13969 * nto-low.c: Ditto.
13970 * regcache.h: Ditto.
13971 * remote-utils.c: Ditto.
13974 * thread-db.c: Ditto.
13975 * tracepoint.c: Ditto.
13977 * win32-low.h: Ditto.
13979 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13981 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13984 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13986 * server.c (gdbserver_version): Update copyright year in version
13988 * gdbreplay.c (gdbreplay_version): Ditto.
13990 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13992 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13993 * linux-bfin-low.c: New file.
13994 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13995 PT_DATA_ADDR for BFIN targets.
13996 * Makefile.in (SFILES): Add linux-bfin-low.c.
13997 (clean): Remove reg-bfin.c.
13998 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13999 * README: Mention supported Blackfin targets.
14001 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14003 * .gitignore: New file.
14005 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14007 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14009 2010-10-22 Jie Zhang <jie@codesourcery.com>
14011 * Makefile.in: Add FLAGS_TO_PASS variable.
14012 (install): Remove dependency of install-only and recursively
14013 invoke make for install-only.
14015 2010-10-04 Doug Evans <dje@google.com>
14017 * Makefile.in (uninstall): Use $(DESTDIR).
14019 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14023 * linux-x86-low.c (compat_siginfo_from_siginfo)
14024 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14025 si_code is < 0. Check for si_code == SI_TIMER before checking for
14028 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14030 * lynx-i386-low.c: New file.
14031 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14033 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14035 * lynx-low.c (ptrace_request_to_str): Remove handling for
14036 request values that have been removed in LynxOS 5.x.
14038 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14040 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14043 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14045 * configure.ac: Add --enable-inprocess-agent option.
14046 * configure: Rebuilt.
14048 2010-09-06 Yao Qi <yao@codesourcery.com>
14050 * linux-low.c (linux_kill): Remove unused variable.
14051 (linux_stabilize_threads): Likewise.
14052 * server.c (start_inferior): Likewise.
14053 (queue_stop_reply_callback): Likewise.
14054 * tracepoint.c (do_action_at_tracepoint): Likewise.
14056 2010-09-06 Yao Qi <yao@codesourcery.com>
14058 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14061 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14063 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14065 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14067 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14070 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14072 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14073 gdbserver/lynx-ppc-low.c: New files.
14074 * Makefile.in (lynx_low_h): New variable.
14075 (lynx-low.o, lynx-ppc-low.o): New rules.
14076 * configure.ac: On LynxOS, link with -lnetinet.
14077 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14078 * configure: regenerate.
14080 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14082 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14083 * configure.ac: Add check for vasprintf and vsnprintf.
14084 * configure, config.in: Regenerate.
14085 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14087 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14089 * gdbreplay.c: Move include of alloca.h up, next to include of
14091 * server.h: Add include of malloc.h.
14092 * mem-break.c: Remove include of malloc.h.
14093 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14095 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14097 * Makefile.in (memmem.o): Build with -Wno-error.
14099 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14101 * utils.c (xsnprintf): Make non-static.
14102 * server.h: Add xsnprintf declaration.
14103 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14104 replace calls to snprintf by calls to xsnprintf throughout.
14106 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14108 * configure.ac: Add configure check for alloca.
14109 * configure, config.in: Regenerate.
14110 * server.h: Include alloca.h if it exists.
14111 * gdbreplay.c: Include alloca.h if it exists.
14113 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14115 * linux-low.c (__SIGRTMIN): Define if not already defined.
14116 (linux_create_inferior): Check for __ANDROID__ rather than
14118 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14119 are already deferred.
14120 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14121 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14122 stopped and already has a pending signal to report.
14123 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14124 a pending signal to report or is moving out of a jump pad.
14125 (linux_init_signals): Check for __ANDROID__ rather than
14128 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14130 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14131 debug_threads check. Avoid a linear search when not doing debug
14134 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14136 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14137 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14138 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14139 (process_event): Change local fd's type to gdb_fildes_t.
14140 (create_file_handler): Adjust prototype.
14141 (delete_file_handler): Adjust prototype.
14142 (handle_file_event): Adjust prototype. Use pfildes.
14143 (create_file_event): Adjsut prototype.
14144 * remote-utils.c (remote_desc, listen_desc): Change type to
14146 * server.h: New gdb_fildes_t typedef.
14147 [USE_WIN32API]: Include winsock2.h.
14148 (delete_file_handler, add_file_handler): Adjust prototypes.
14149 (pfildes): Declare.
14150 * utils.c (pfildes): New.
14152 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14154 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14155 * configure: Regenerate.
14157 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14159 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14160 (linux_done_accessing_memory): ... this.
14161 (linux_target_ops): Adjust.
14162 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14163 * nto-low.c (nto_target_ops): Adjust comment.
14164 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14165 * spu-low.c (spu_target_ops): Adjust comment.
14166 * target.h (target_ops): Rename unprepare_to_access_memory field
14167 to done_accessing_memory.
14168 (unprepare_to_access_memory): Rename to ...
14169 (done_accessing_memory): ... this.
14171 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14173 * linux-low.c (linux_prepare_to_access_memory): New.
14174 (linux_unprepare_to_access_memory): New.
14175 (linux_target_ops): Install them.
14176 * server.c (read_memory): Rename to ...
14177 (gdb_read_memory): ... this. Use
14178 prepare_to_access_memory/prepare_to_access_memory.
14179 (write_memory): Rename to ...
14180 (gdb_write_memory): ... this. Use
14181 prepare_to_access_memory/prepare_to_access_memory.
14182 (handle_search_memory_1): Adjust.
14183 (process_serial_event): Adjust.
14184 * target.h (struct target_ops): New fields
14185 prepare_to_access_memory and unprepare_to_access_memory.
14186 (prepare_to_access_memory, unprepare_to_access_memory): New.
14187 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14188 prepare_to_access_memory/prepare_to_access_memory.
14189 * nto-low.c (nto_target_ops): Adjust.
14190 * spu-low.c (spu_target_ops): Adjust.
14191 * win32-low.c (win32_target_ops): Adjust.
14193 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14195 * Makefile.in (WARN_CFLAGS): Get it from configure.
14196 (WERROR_CFLAGS): New.
14197 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14198 * configure.ac: Introduce --enable-werror, which adds -Werror to
14199 the compiler command line. Enabled by default. Disable with
14200 --disable-werror. Add -Wdeclaration-after-statement
14201 Wpointer-arith and -Wformat-nonliteral to warning flags.
14202 * configure: Regenerate.
14204 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14206 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14208 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14210 * gdbreplay.c (remote_error): New.
14212 (expect): Use gdbchar. Check for error reading from GDB.
14213 Clarify sync error output.
14214 (play): Check for errors writing to GDB.
14215 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14216 * remote-utils.c (getpkt): Check for errors writing to the remote
14219 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14221 * linux-low.c (linux_wait_1): Move non-debugging code out of
14222 `debug_threads' control.
14224 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14226 * linux-low.c (linux_wait_1): Don't set last_status here.
14227 * server.c (push_event, queue_stop_reply_callback): Assert we're
14228 not pushing a TARGET_WAITKIND_IGNORE event.
14229 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14230 (myresume, handle_target_event): Set the thread's last_resume_kind
14231 and last_status from the target returned status.
14233 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14237 * linux-x86-low.c (update_debug_registers_callback): New.
14238 (i386_dr_low_set_addr): Use it.
14239 (i386_dr_low_get_addr): New.
14240 (i386_dr_low_set_control): Use update_debug_registers_callback.
14241 (i386_dr_low_get_control): New.
14242 (i386_dr_low_get_status): Adjust.
14243 * linux-low.c (linux_stop_lwp): New.
14244 * linux-low.h (linux_stop_lwp): Declare.
14246 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14247 argument instead of a i386_debug_reg_state.
14248 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14249 a i386_debug_reg_state.
14250 (i386_insert_aligned_watchpoint): Adjust.
14251 (i386_remove_aligned_watchpoint): Adjust.
14252 (i386_low_stopped_data_address): Read the debug registers from the
14253 inferior instead of from the mirrors.
14254 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14255 (i386_dr_low_get_addr): Declare.
14256 (i386_dr_low_get_control): Declare.
14257 (i386_dr_low_get_status): Change prototype.
14259 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14260 (i386_dr_low_get_addr): New.
14261 (i386_dr_low_get_control): New.
14262 (i386_dr_low_get_status): Adjust prototype. Return
14264 (i386_initial_stuff): Clear dr_status_mirror and
14266 (i386_get_thread_context): Adjust.
14267 (i386_set_thread_context): Adjust.
14268 (i386_thread_added): Adjust.
14270 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14272 * linux-low.h (linux_thread_area): Delete declaration.
14274 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14276 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14277 after its termination.
14279 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14281 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14282 (gdb_wants_all_stopped): Delete.
14283 (linux_wait_1): Don't call them.
14284 * server.c (handle_v_cont): Tag all threads as want-stopped.
14285 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14286 stopped as "client-wants-stopped".
14288 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14290 * Makefile.in (signals_h): New.
14291 (server_h): Depend on it.
14292 (server.o): Don't depend on $(signals_def).
14293 (signals.o): Depend on $(signals_def).
14295 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14297 * Makefile.in (signals_def): New.
14298 (server_h): Append include/gdb/signals.h and signals_def.
14299 (server.o): Append signals_def.
14301 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14303 * server.c (handle_target_event): Use target_signal_to_host for
14304 resume_info.sig initialization.
14305 * target.h (struct thread_resume) <sig>: New comment.
14307 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14309 * server.c (handle_query): strcpy() the returned string from paddress()
14310 instead of sprintf().
14311 * utils.c (paddress): Return phex_nz().
14313 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14315 * server.c (handle_v_cont): Call mourn_inferior if process
14317 (myresume): Likewise.
14319 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14321 Static tracepoints, and integration with UST.
14323 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14324 * mem-break.c (uninsert_all_breakpoints)
14325 (reinsert_all_breakpoints): New.
14326 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14327 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14328 (gdb_agent_ust_loaded, helper_thread_id)
14329 (gdb_agent_helper_thread_id): New macros.
14330 (struct ipa_sym_addresses): Add addr_ust_loaded,
14331 addr_helper_thread_id, addr_cmd_buf.
14332 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14333 (in_process_agent_loaded_ust): New.
14334 (write_e_ust_not_loaded): New.
14335 (maybe_write_ipa_ust_not_loaded): New.
14336 (struct collect_static_trace_data_action): New.
14337 (enum tracepoint_type) <static_tracepoint>: New.
14338 (struct tracepoint) <handle>: Mention static tracepoints.
14339 (struct static_tracepoint_ctx): New.
14340 (CMD_BUF_SIZE): New.
14341 (add_tracepoint_action): Handle static tracepoint actions.
14342 (unprobe_marker_at): New.
14343 (clear_installed_tracepoints): Handle static tracepoints.
14344 (cmd_qtdp): Handle static tracepoints.
14345 (probe_marker_at): New.
14346 (cmd_qtstart): Handle static tracepoints.
14347 (response_tracepoint): Handle static tracepoints.
14348 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14349 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14350 (get_context_regcache): Handle static tracepoints.
14351 (do_action_at_tracepoint): Handle static tracepoint actions.
14352 (traceframe_find_block_type): Handle static trace data blocks.
14353 (traceframe_read_sdata): New.
14354 (download_tracepoints): Download static tracepoint actions.
14355 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14356 (GDB_PROBE_NAME): New.
14358 (GET_UST_SYM): New.
14361 (ust_marker_to_static_tracepoint): New.
14363 (collect_ust_data_at_tracepoint): New.
14364 (gdb_ust_probe): New.
14365 (UNIX_PATH_MAX, SOCK_DIR): New.
14366 (gdb_ust_connect_sync_socket): New.
14367 (resume_thread, stop_thread): New.
14368 (run_inferior_command): New.
14369 (init_named_socket): New.
14370 (gdb_ust_socket_init): New.
14371 (cstr_to_hexstr): New.
14373 (first_marker, next_marker): New.
14374 (response_ust_marker): New.
14375 (cmd_qtfstm, cmd_qtsstm): New.
14376 (unprobe_marker_at, probe_marker_at): New.
14377 (cmd_qtstmat, gdb_ust_thread): New.
14378 (gdb_ust_init): New.
14379 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14380 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14381 (ST_REGENTRY): New.
14382 (x86_64_st_collect_regmap): New.
14383 (X86_64_NUM_ST_COLLECT_GREGS): New.
14384 (AMD64_RIP_REGNUM): New.
14385 (supply_static_tracepoint_registers): New.
14386 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14387 (ST_REGENTRY): New.
14388 (i386_st_collect_regmap): New.
14389 (i386_NUM_ST_COLLECT_GREGS): New.
14390 (supply_static_tracepoint_registers): New.
14391 * server.c (handle_query): Handle qXfer:statictrace:read.
14392 <qSupported>: Report support for StaticTracepoints, and
14393 qXfer:statictrace:read features.
14394 * server.h (traceframe_read_sdata)
14395 (supply_static_tracepoint_registers): Declare.
14396 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14397 (unpack_varlen_hex): Include in IPA build.
14398 * Makefile.in (ustlibs, ustinc): New.
14399 (IPA_OBJS): Add remote-utils-ipa.o.
14400 ($(IPA_LIB)): Link -ldl and -lpthread.
14402 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14403 * config.in, configure: Regenerate.
14405 2010-06-20 Ian Lance Taylor <iant@google.com>
14406 Pedro Alves <pedro@codesourcery.com>
14408 * linux-x86-low.c (always_true): Delete.
14409 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14410 trying to fool the compiler with always_true.
14412 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14414 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14415 conditions in gdbserver.
14417 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14419 * spu-low.c (spu_read_memory): Wrap around local store limit.
14420 (spu_write_memory): Likewise.
14422 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14424 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14425 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14427 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14429 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14430 uses with LONGEST uses.
14432 2010-06-14 Stan Shebs <stan@codesourcery.com>
14433 Pedro Alves <pedro@codesourcery.com>
14437 * linux-x86-low.c: Include limits.h.
14439 (always_true): New.
14442 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14443 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14444 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14445 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14446 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14447 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14448 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14449 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14450 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14451 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14452 (amd64_emit_void_call_2): New.
14453 (amd64_emit_ops): New.
14454 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14455 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14456 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14457 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14458 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14459 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14460 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14461 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14462 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14463 (i386_emit_stack_adjust, i386_emit_int_call_1)
14464 (i386_emit_void_call_2): New.
14465 (i386_emit_ops): New.
14466 (x86_emit_ops): New.
14467 (the_low_target): Install x86_emit_ops.
14468 * server.h (struct emit_ops): New.
14469 (get_raw_reg_func_addr): Declare.
14470 (current_insn_ptr, emit_error): Declare.
14471 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14472 (set_trace_state_variable_value): New defines.
14473 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14474 addr_get_trace_state_variable_value and
14475 addr_set_trace_state_variable_value.
14476 (symbol_list): New fields for get_raw_reg,
14477 get_trace_state_variable_value and set_trace_state_variable_value.
14478 (condfn): New typedef.
14479 (struct tracepoint): New field `compiled_cond'.
14480 (do_action_at_tracepoint): Clear compiled_cond.
14481 (get_trace_state_variable_value, set_trace_state_variable_value):
14483 (condition_true_at_tracepoint): If there's a compiled condition,
14485 (current_insn_ptr, emit_error): New globals.
14486 (struct bytecode_address): New.
14487 (get_raw_reg_func_addr): New.
14488 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14489 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14490 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14491 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14492 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14493 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14494 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14495 (compile_tracepoint_condition, compile_bytecodes): New.
14496 * target.h (emit_ops): Forward declare.
14497 (struct target_ops): New field emit_ops.
14498 (target_emit_ops): New.
14499 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14500 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14501 * linux-low.c (linux_emit_ops): New.
14502 (linux_target_ops): Install it.
14503 * linux-low.h (struct linux_target_ops): New field emit_ops.
14505 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14507 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14508 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14510 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14511 Stan Shebs <stan@codesourcery.com>
14513 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14514 (all): Depend on $(extra_libraries).
14515 (install-only): Install the IPA.
14516 (IPA_OBJS, IPA_LIB): New.
14517 (clean): Remove the IPA lib.
14518 (IPAGENT_CFLAGS): New.
14519 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14520 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14521 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14522 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14523 * configure.ac: Check for atomic builtins support in the compiler.
14524 (IPA_DEPFILES, extra_libraries): Define.
14525 * configure.srv (ipa_obj): Add description.
14526 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14527 (i[34567]86-*-linux*): Set ipa_obj.
14528 (x86_64-*-linux*): Set ipa_obj.
14529 * linux-low.c (stabilizing_threads): New.
14530 (supports_fast_tracepoints): New.
14531 (linux_detach): Stabilize threads before detaching.
14532 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14533 the lwp is either not stabilizing, or is moving out of a jump pad.
14534 (linux_fast_tracepoint_collecting): New.
14535 (maybe_move_out_of_jump_pad): New.
14536 (enqueue_one_deferred_signal): New.
14537 (dequeue_one_deferred_signal): New.
14538 (linux_wait_for_event_1): If moving out of a jump pad, defer
14539 pending signals to later.
14540 (linux_stabilize_threads): New.
14541 (linux_wait_1): Check if threads need moving out of jump pads, and
14543 (stuck_in_jump_pad_callback): New.
14544 (move_out_of_jump_pad_callback): New.
14545 (lwp_running): New.
14546 (linux_resume_one_lwp): Handle moving out of jump pads.
14547 (linux_set_resume_request): Dequeue deferred signals.
14548 (need_step_over_p): Also step over fast tracepoint jumps.
14549 (start_step_over): Also uninsert fast tracepoint jumps.
14550 (finish_step_over): Also reinsert fast tracepoint jumps.
14551 (linux_install_fast_tracepoint_jump): New.
14552 (linux_target_ops): Install linux_stabilize_threads and
14553 linux_install_fast_tracepoint_jump_pad.
14554 * linux-low.h (linux_target_ops) <get_thread_area,
14555 install_fast_tracepoint_jump_pad>: New fields.
14556 (struct lwp_info) <collecting_fast_tracepoint,
14557 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14558 (linux_get_thread_area): Declare.
14559 * linux-x86-low.c (jump_insn): New.
14560 (x86_get_thread_area): New.
14561 (append_insns): New.
14562 (push_opcode): New.
14563 (amd64_install_fast_tracepoint_jump_pad): New.
14564 (i386_install_fast_tracepoint_jump_pad): New.
14565 (x86_install_fast_tracepoint_jump_pad): New.
14566 (the_low_target): Install x86_get_thread_area and
14567 x86_install_fast_tracepoint_jump_pad.
14568 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14569 (struct fast_tracepoint_jump): New.
14570 (fast_tracepoint_jump_insn): New.
14571 (fast_tracepoint_jump_shadow): New.
14572 (find_fast_tracepoint_jump_at): New.
14573 (fast_tracepoint_jump_here): New.
14574 (delete_fast_tracepoint_jump): New.
14575 (set_fast_tracepoint_jump): New.
14576 (uninsert_fast_tracepoint_jumps_at): New.
14577 (reinsert_fast_tracepoint_jumps_at): New.
14578 (set_breakpoint_at): Use write_inferior_memory.
14579 (uninsert_raw_breakpoint): Use write_inferior_memory.
14580 (check_mem_read): Mask out fast tracepoint jumps.
14581 (check_mem_write): Mask out fast tracepoint jumps.
14582 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14583 (set_fast_tracepoint_jump): Declare.
14584 (delete_fast_tracepoint_jump)
14585 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14586 (reinsert_fast_tracepoint_jumps_at): Declare.
14587 * regcache.c: Don't compile many functions when building the
14588 in-process agent library.
14589 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14590 the register buffer in the heap.
14591 (free_register_cache): If the register buffer isn't owned by the
14592 regcache, don't free it.
14593 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14594 pre-existing register caches.
14595 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14597 (convert_ascii_to_int): : Constify `from' parameter type.
14598 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14599 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14600 the needed buffer in-place.
14601 (relocate_instruction): New.
14602 * server.c (handle_query) <qSymbols>: If the target supports
14603 tracepoints, give it a chance of looking up symbols. Report
14604 support for fast tracepoints.
14605 (handle_status): Stabilize threads.
14606 (process_serial_event): Adjust.
14607 * server.h (struct fast_tracepoint_jump): Forward declare.
14608 (struct process_info) <fast_tracepoint_jumps>: New field.
14609 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14610 (decode_X_packet, decode_M_packet): Adjust.
14611 (relocate_instruction): Declare.
14612 (in_process_agent_loaded): Declare.
14613 (tracepoint_look_up_symbols): Declare.
14614 (struct fast_tpoint_collect_status): Declare.
14615 (fast_tracepoint_collecting): Declare.
14616 (force_unlock_trace_buffer): Declare.
14617 (handle_tracepoint_bkpts): Declare.
14618 (initialize_low_tracepoint)
14619 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14620 * target.h (struct target_ops) <stabilize_threads,
14621 install_fast_tracepoint_jump_pad>: New fields.
14622 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14623 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14624 [HAVE_STDINT_H]: Include stdint.h.
14625 (trace_debug_1): Rename to ...
14626 (trace_vdebug): ... this.
14627 (trace_debug): Rename to ...
14628 (trace_debug_1): ... this. Add `level' parameter.
14629 (trace_debug): New.
14630 (ATTR_USED, ATTR_NOINLINE): New.
14631 (IP_AGENT_EXPORT): New.
14632 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14633 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14634 (about_to_request_buffer_space, trace_buffer_is_full)
14635 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14636 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14637 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14638 (traceframe_write_count, traceframes_created)
14639 (trace_state_variables)
14640 New renaming defines.
14641 (struct ipa_sym_addresses): New.
14642 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14643 (symbol_list): New.
14644 (ipa_sym_addrs): New.
14645 (all_tracepoint_symbols_looked_up): New.
14646 (in_process_agent_loaded): New.
14647 (write_e_ipa_not_loaded): New.
14648 (maybe_write_ipa_not_loaded): New.
14649 (tracepoint_look_up_symbols): New.
14650 (debug_threads) [IN_PROCESS_AGENT]: New.
14651 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14652 (UNKNOWN_SIDE_EFFECTS): New.
14653 (stop_tracing): New.
14654 (flush_trace_buffer): New.
14655 (stop_tracing_bkpt): New.
14656 (flush_trace_buffer_bkpt): New.
14657 (read_inferior_integer): New.
14658 (read_inferior_uinteger): New.
14659 (read_inferior_data_pointer): New.
14660 (write_inferior_data_pointer): New.
14661 (write_inferior_integer): New.
14662 (write_inferior_uinteger): New.
14663 (struct collect_static_trace_data_action): Delete.
14664 (enum tracepoint_type): New.
14665 (struct tracepoint) <type>: New field `type'.
14666 <actions_str, step_actions, step_actions_str>: Only include in
14668 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14669 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14670 (tracepoints): Use IP_AGENT_EXPORT.
14671 (last_tracepoint): Don't include in the IPA.
14672 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14673 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14674 (alloced_trace_state_variables): New.
14675 (trace_state_variables): Use IP_AGENT_EXPORT.
14676 (traceframe_t): Delete unused variable.
14677 (circular_trace_buffer): Don't include in the IPA.
14678 (trace_buffer_start): Delete.
14679 (struct trace_buffer_control): New.
14680 (trace_buffer_free): Delete.
14681 (struct ipa_trace_buffer_control): New.
14682 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14683 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14685 (trace_buffer_ctrl): New.
14686 (TRACE_BUFFER_CTRL_CURR): New.
14687 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14688 Reimplement as macros.
14689 (trace_buffer_wrap): Delete.
14690 (traceframe_write_count, traceframe_read_count)
14691 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14692 (struct tracepoint_hit_ctx) <type>: New field.
14693 (struct fast_tracepoint_ctx): New.
14694 (memory_barrier): New.
14696 (record_tracepoint_error): Update atomically in the IPA.
14697 (clear_inferior_trace_buffer): New.
14698 (about_to_request_buffer_space): New.
14699 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14700 updating the same buffer.
14701 (add_tracepoint): Default the tracepoint's type to trap
14702 tracepoint, and orig_size to -1.
14703 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14704 internal variables.
14705 (create_trace_state_variable): New parameter `gdb'. Handle it.
14706 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14707 (cmd_qtdp): Handle fast tracepoints.
14708 (cmd_qtdv): Adjust.
14709 (max_jump_pad_size): New.
14710 (gdb_jump_pad_head): New.
14711 (get_jump_space_head): New.
14712 (claim_jump_space): New.
14713 (sort_tracepoints): New.
14714 (MAX_JUMP_SIZE): New.
14715 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14717 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14718 support. Upload fast traceframes, and delete internal IPA
14720 (stop_tracing_handler): New.
14721 (flush_trace_buffer_handler): New.
14722 (cmd_qtstop): Upload fast tracepoints.
14723 (response_tracepoint): Handle fast tracepoints.
14724 (tracepoint_finished_step): Upload fast traceframes. Set the
14725 tracepoint hit context's tracepoint type.
14726 (handle_tracepoint_bkpts): New.
14727 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14728 type. Add comment about fast tracepoints.
14729 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14730 non-existing action_str field.
14731 (get_context_regcache): Handle fast tracepoints.
14732 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14734 (fast_tracepoint_from_jump_pad_address): New.
14735 (fast_tracepoint_from_ipa_tpoint_address): New.
14736 (collecting_t): New.
14737 (force_unlock_trace_buffer): New.
14738 (fast_tracepoint_collecting): New.
14740 (gdb_collect): New.
14741 (write_inferior_data_ptr): New.
14742 (target_tp_heap): New.
14743 (target_malloc): New.
14744 (download_agent_expr): New.
14746 (download_tracepoints): New.
14747 (download_trace_state_variables): New.
14748 (upload_fast_traceframes): New.
14749 (IPA_FIRST_TRACEFRAME): New.
14750 (IPA_NEXT_TRACEFRAME_1): New.
14751 (IPA_NEXT_TRACEFRAME): New.
14752 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14753 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14754 (gdb_jump_pad_buffer_end): New.
14755 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14756 (initialize_tracepoint): Adjust.
14757 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14758 buffer. Initialize the low module.
14759 * utils.c (PREFIX, TOOLNAME): New.
14760 (malloc_failure): Use PREFIX.
14761 (error): In the IPA, an error causes an exit.
14762 (fatal, warning): Use PREFIX.
14763 (internal_error): Use TOOLNAME.
14764 (NUMCELLS): Increase to 10.
14765 * configure, config.in: Regenerate.
14767 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14769 * server.c (handle_query) <qSupported>: Do two passes over the
14770 qSupported string to avoid nesting strtok.
14772 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14774 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14776 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14777 -Wl,--dynamic-list.
14778 * configure: Regenerate.
14779 * proc-service.list: New.
14781 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14783 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14786 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14788 * gdbreplay.c (remote_open): Check error return from socket() call by
14789 its equality to -1 not by it being negative.
14790 * remote-utils.c (remote_open): Likewise.
14792 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14794 * config.h: Regenerate.
14796 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14798 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14799 doesn't provide PTRACE_GET_THREAD_AREA.
14801 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14803 * linux-m68k-low.c: Include <asm/ptrace.h>
14804 (ps_get_thread_area): Implement.
14806 2010-05-03 Doug Evans <dje@google.com>
14808 * event-loop.c (struct callback_event): New struct.
14809 (callback_list): New global.
14810 (append_callback_event, delete_callback_event): New functions.
14811 (process_callback): New function.
14812 (start_event_loop): Call it.
14813 * remote-utils.c (NOT_SCHEDULED): Define.
14814 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14815 moved out of readchar.
14816 (readchar): Rewrite. Call reschedule before returning.
14817 (reset_readchar): New function.
14818 (remote_close): Call it.
14819 (process_remaining, reschedule): New functions.
14820 * server.h (callback_handler_func): New typedef.
14821 (append_callback_event, delete_callback_event): Declare.
14823 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14825 * proc-service.c (ps_pglobal_lookup): Use
14826 thread_db_look_up_one_symbol.
14827 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14828 parameter. Use it instead of all_symbols_looked_up.
14829 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14831 (all_symbols_looked_up): Don't declare.
14832 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14833 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14835 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14836 Set all_symbols_looked_up here.
14837 (thread_db_look_up_one_symbol): New.
14838 (thread_db_get_tls_address): Adjust.
14839 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14840 thread_db object on the heap, and tentatively set it in the
14842 (thread_db_init): Don't set all_symbols_looked_up here.
14843 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14845 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14847 * linux-low.c (linux_kill, linux_detach): Adjust.
14848 (status_pending_p_callback): Remove redundant statement. Check
14849 for !TARGET_WAITIKIND_IGNORE, instead of
14850 TARGET_WAITKIND_STOPPED.
14851 (handle_tracepoints): Make sure LWP is locked. Adjust.
14852 (linux_wait_for_event_1): Adjust.
14853 (linux_cancel_breakpoints): New.
14854 (unsuspend_one_lwp): New.
14855 (unsuspend_all_lwps): New.
14856 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14857 (send_sigstop_callback): Change return type to int, add new
14858 `except' parameter and handle it.
14859 (suspend_and_send_sigstop_callback): New.
14860 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14861 pass them down. If SUSPEND, also increment the lwp's suspend
14863 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14864 (need_step_over_p): Don't consider suspended LWPs.
14865 (start_step_over): Adjust.
14866 (proceed_one_lwp): Change return type to int, add new `except'
14867 parameter and handle it.
14868 (unsuspend_and_proceed_one_lwp): New.
14869 (proceed_all_lwps): Use find_inferior instead of
14871 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14872 also decrement the suspend count of LWPs. Pass `except' down,
14873 instead of hacking its suspend count.
14874 (linux_pause_all): Add `freeze' parameter. Adjust.
14875 (linux_unpause_all): New.
14876 (linux_target_ops): Install linux_unpause_all.
14877 * server.c (handle_status): Adjust.
14878 * target.h (struct target_ops): New fields `unpause_all' and
14879 `cancel_breakpoints'. Add new parameter to `pause_all'.
14880 (pause_all): Add new `freeze' parameter.
14881 (unpause_all): New.
14882 (cancel_breakpoints): New.
14883 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14884 cancel breakpoints.
14885 (cmd_qtstart): Pause threads.
14886 (stop_tracing): Pause threads, and cancel breakpoints.
14887 * win32-low.c (win32_target_ops): Adjust.
14889 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14891 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14892 the inferior right away from here...
14893 (linux_wait_1): ... to here, and adjust to check the thread's
14894 last_resume_kind instead of the lwp's step or stop_expected flags.
14896 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14898 * README: Use consistent `GDB' and `GDBserver' spellings.
14900 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14902 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14903 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14904 (linux_detach_one_lwp): Assume the lwp is stopped.
14905 (any_thread_of): Delete.
14906 (linux_detach): Stop all lwps here. Don't blindly delete all
14908 (delete_lwp_callback): New.
14909 (linux_mourn): Delete all lwps of the process that is gone.
14910 (linux_wait_1): Don't delete the last lwp of the process here.
14911 * mem-break.h (mark_breakpoints_out): Declare.
14912 * mem-break.c (mark_breakpoints_out): New.
14913 (free_all_breakpoints): Use it.
14914 * server.c (handle_target_event): If the process is gone, mark
14916 * thread-db.c (struct thread_db) <create_bp>: New field.
14917 (thread_db_enable_reporting): Fix prototype. Store a thread event
14918 breakpoint reference in the thread_db struct.
14919 (thread_db_load_search): Clear the thread_db object.
14920 (try_thread_db_load_1): Ditto.
14921 (switch_to_process): New.
14922 (disable_thread_event_reporting): Use it.
14923 (remove_thread_event_breakpoints): New.
14924 (thread_db_detach, thread_db_mourn): Use it.
14926 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14928 * linux-low.c (linux_enable_event_reporting): New.
14929 (linux_wait_for_event_1, handle_extended_wait): Use it.
14931 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14933 * linux-low.c (linux_kill_one_lwp, linux_kill)
14934 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14935 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14936 SIGSTOP even if the LWP is stopped.
14937 (send_sigstop_callback): New.
14938 (stop_all_lwps): Use send_sigstop_callback instead.
14939 (linux_resume_one_thread): Adjust.
14940 (proceed_one_lwp): Still proceed an LWP that the client has
14941 requested to stop, if we haven't reported it as stopped yet. Make
14942 sure that LWPs the client want stopped, have a pending SIGSTOP.
14944 2010-04-26 Doug Evans <dje@google.com>
14946 * server.c (handle_general_set): Make static.
14948 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14949 Print received char after testing for error/eof instead of before.
14950 (input_interrupt): Tweak comment.
14952 2010-04-23 Doug Evans <dje@google.com>
14954 * server.c (start_inferior): Print inferior argv if --debug.
14956 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14958 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14959 * nto-x86-low.c: Include server.h
14961 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14963 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14964 be consistent with other sources of this directory.
14965 (init_registers_amd64): Correct name of source file of this function
14968 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14970 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14971 64-bit executables.
14973 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14975 * win32-i386-low.c: Add 64-bit support.
14976 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14977 (init_registers_amd64): Declare.
14978 (mappings): Add 64-bit version of array.
14979 (init_windows_x86): New function.
14980 (the_low_target): Change init_arch field to init_windows_x86.
14982 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14984 * win32-low.c: Adapt to support also 64-bit architecture.
14985 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14986 (get_image_name): Use SIZE_T type for local variable `done'.
14987 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14988 (toolhelp_get_dll_name): Idem.
14989 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14990 Use uintptr_t typecast to avoid warning.
14991 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14992 (handle_exception): Use phex_nz to avoid warning.
14993 (win32_wait): Remove unused local variable `process'.
14995 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14997 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15000 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15002 * configure.ac: Use `ws2_32' library for srv_mingw.
15003 * configure: Regenerate.
15004 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15005 * remote-utils.c: Likewise.
15007 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15009 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15010 if __x86_64__ is defined.
15012 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15014 * configure: Regenerate.
15016 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15018 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15019 * target.h (target_ops): New get_tib_address field.
15020 * win32-low.h (win32_thread_info): Add thread_local_base field.
15021 * win32-low.c (child_add_thread): Add tlb argument.
15022 Set thread_local_base field to TLB.
15023 (get_child_debug_event): Adapt to child_add_thread change.
15024 (win32_get_tib_address): New function.
15025 (win32_target_ops): Set get_tib_address field to
15026 win32_get_tib_address.
15027 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15029 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15031 * linux-low.c (linux_mourn): Also remove the process.
15032 * server.c (handle_target_event): Don't remove the process here.
15033 * nto-low.c (nto_mourn): New.
15034 (nto_target_ops): Install it.
15035 * spu-low.c (spu_mourn): New.
15036 (spu_target_ops): Install it.
15037 * win32-low.c (win32_mourn): New.
15038 (win32_target_ops): Install it.
15040 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15042 * server.h (buffer_xml_printf): Remove redundant `;'.
15044 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15046 * regcache.c (set_register_cache): Invalidate regcaches before
15047 changing the register cache layout.
15048 (regcache_invalidate_one): Allow a NULL regcache.
15049 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15050 regcaches before changing the register cache layout or the target
15053 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15055 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15056 variable warning on Linux/x86-64.
15058 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15060 GDBserver disconnected tracing support.
15062 * linux-low.c (linux_remove_process): Delete.
15063 (add_lwp): Don't set last_resume_kind here.
15064 (linux_kill): Use `mourn'.
15065 (linux_detach): Use `thread_db_detach', and `mourn'.
15066 (linux_mourn): New.
15067 (linux_attach_lwp_1): Adjust comment.
15068 (linux_attach): last_resume_kind moved the thread_info; adjust.
15069 (status_pending_p_callback): Adjust.
15070 (linux_wait_for_event_1): Adjust.
15071 (count_events_callback, select_singlestep_lwp_callback)
15072 (select_event_lwp_callback, cancel_breakpoints_callback)
15073 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15074 (proceed_one_lwp): Adjust.
15075 (linux_async): Add debug output.
15076 (linux_thread_stopped): New.
15077 (linux_pause_all): New.
15078 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15080 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15081 (thread_db_free): Delete declaration.
15082 (thread_db_detach, thread_db_mourn): Declare.
15083 * thread-db.c (thread_db_init): Use thread_db_mourn.
15084 (thread_db_free): Delete, split in two.
15085 (disable_thread_event_reporting): New.
15086 (thread_db_detach): New.
15087 (thread_db_mourn): New.
15089 * server.h (struct thread_info) <last_resume_kind>: New field.
15090 <attached>: Add comment.
15091 <gdb_detached>: New field.
15092 (handler_func): Change return type to int.
15093 (handle_serial_event, handle_target_event): Ditto.
15094 (gdb_connected): Declare.
15096 (disconnected_tracing): Declare.
15097 (stop_tracing): Declare.
15099 * server.c (handle_query) <qSupported>: Report support for
15100 disconnected tracing.
15101 (queue_stop_reply_callback): Account for running threads.
15102 (gdb_wants_thread_stopped): New.
15103 (gdb_wants_all_threads_stopped): New.
15104 (gdb_reattached_process): New.
15105 (handle_status): Clear the `gdb_detached' flag of all processes.
15106 In all-stop, stop all threads.
15107 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15108 (process_serial_event): If the remote connection breaks, or if an
15109 exit was forced with "monitor exit", force an event loop exit.
15110 Handle disconnected tracing on detach.
15111 (handle_serial_event): Adjust.
15112 (handle_target_event): If GDB isn't connected, forward events back
15113 to the inferior, unless the last process exited, in which case,
15114 exit gdbserver. Adjust interface.
15116 * remote-utils.c (remote_open): Don't block in accept. Instead
15117 register an event loop source on the listen socket file
15118 descriptor. Refactor bits into ...
15119 (listen_desc): ... this new global.
15120 (gdb_connected): ... this new function.
15121 (enable_async_notification): ... this new function.
15122 (handle_accept_event): ... this new function.
15123 (remote_close): Clear remote_desc.
15125 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15127 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15129 (mourn_inferior): Define.
15130 (target_process_qsupported): Avoid the dangling else problem.
15131 (thread_stopped): Define.
15132 (pause_all): Define.
15133 (target_waitstatus_to_string): Declare.
15134 * target.c (target_waitstatus_to_string): New.
15136 * tracepoint.c (tracing): Make extern.
15137 (disconnected_tracing): New.
15138 (stop_tracing): Make extern. Handle tracing stops due to GDB
15140 (cmd_qtdisconnected): New.
15141 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15142 (handle_tracepoint_general_set): Handle QTDisconnected.
15144 * event-loop.c (event_handler_func): Change return type to int.
15145 (process_event): Bail out if the event handler wants the event
15147 (handle_file_event): Ditto.
15148 (start_event_loop): Bail out if the event handler wants the event
15151 * nto-low.c (nto_target_ops): Adjust.
15152 * spu-low.c (spu_wait): Don't remove the process here.
15153 (spu_target_ops): Adjust.
15154 * win32-low.c (win32_wait): Don't remove the process here.
15155 (win32_target_ops): Adjust.
15157 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15159 * regcache.c (realloc_register_cache): Invalidate inferior's
15160 regcache before recreating it.
15162 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15164 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15166 2010-04-09 Stan Shebs <stan@codesourcery.com>
15167 Pedro Alves <pedro@codesourcery.com>
15169 * server.h (LONGEST): New.
15170 (struct thread_info) <while_stepping>: New field.
15171 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15173 (initialize_tracepoint, handle_tracepoint_general_set)
15174 (handle_tracepoint_query, tracepoint_finished_step)
15175 (tracepoint_was_hit, release_while_stepping_state_list):
15176 (current_traceframe): Declare.
15177 * server.c (handle_general_set): Handle tracepoint packets.
15178 (read_memory): New.
15179 (write_memory): New.
15180 (handle_search_memory_1): Use read_memory.
15181 (handle_query): Report support for conditional tracepoints, trace
15182 state variables, and tracepoint sources. Handle tracepoint
15184 (main): Initialize the tracepoints module.
15185 (process_serial_event): Handle traceframe reads/writes.
15187 * linux-low.c (handle_tracepoints): New.
15188 (linux_wait_1): Call it.
15189 (linux_resume_one_lwp): Handle while-stepping.
15190 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15191 (linux_target_ops): Install them.
15192 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15194 * linux-x86-low.c (x86_supports_tracepoints): New.
15195 (the_low_target). Install it.
15197 * mem-break.h (delete_breakpoint): Declare.
15198 * mem-break.c (delete_breakpoint): Make external.
15200 * target.h (struct target_ops): Add `supports_tracepoints',
15201 `read_pc', and `write_pc' fields.
15202 (target_supports_tracepoints): Define.
15203 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15206 * regcache.h (struct regcache) <registers_owned>: New field.
15207 (init_register_cache, regcache_cpy): Declare.
15208 (regcache_read_pc, regcache_write_pc): Declare.
15209 (register_cache_size): Declare.
15210 (supply_regblock): Declare.
15211 * regcache.c (init_register_cache): New.
15212 (new_register_cache): Use it.
15213 (regcache_cpy): New.
15214 (register_cache_size): New.
15215 (supply_regblock): New.
15216 (regcache_read_pc, regcache_write_pc): New.
15218 * tracepoint.c: New.
15220 * Makefile.in (OBS): Add tracepoint.o.
15221 (tracepoint.o): New rule.
15223 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15225 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15227 (i386-mmx.c): Likewise.
15228 (i386-mmx-linux.o): Likewise.
15229 (i386-mmx-linux.c): Likewise.
15231 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15232 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15233 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15234 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15236 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15237 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15238 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15240 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15242 * Makefile.in (clean): Updated.
15244 (i386-avx.c): Likewise.
15245 (i386-avx-linux.o): Likewise.
15246 (i386-avx-linux.c): Likewise.
15247 (amd64-avx.o): Likewise.
15248 (amd64-avx.c): Likewise.
15249 (amd64-avx-linux.o): Likewise.
15250 (amd64-avx-linux.c): Likewise.
15252 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15253 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15254 (srv_amd64_regobj): Add amd64-avx.o.
15255 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15256 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15257 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15258 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15259 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15260 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15261 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15263 * i387-fp.c: Include "i386-xstate.h".
15265 (i387_cache_to_xsave): Likewise.
15266 (i387_xsave_to_cache): Likewise.
15267 (x86_xcr0): Likewise.
15269 * i387-fp.h (i387_cache_to_xsave): Likewise.
15270 (i387_xsave_to_cache): Likewise.
15271 (x86_xcr0): Likewise.
15273 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15274 * linux-crisv32-low.c (target_regsets): Likewise.
15275 * linux-m68k-low.c (target_regsets): Likewise.
15276 * linux-mips-low.c (target_regsets): Likewise.
15277 * linux-ppc-low.c (target_regsets): Likewise.
15278 * linux-s390-low.c (target_regsets): Likewise.
15279 * linux-sh-low.c (target_regsets): Likewise.
15280 * linux-sparc-low.c (target_regsets): Likewise.
15281 * linux-xtensa-low.c (target_regsets): Likewise.
15283 * linux-low.c: Include <sys/uio.h>.
15284 (regsets_fetch_inferior_registers): Support nt_type.
15285 (regsets_store_inferior_registers): Likewise.
15286 (linux_process_qsupported): New.
15287 (linux_target_ops): Add linux_process_qsupported.
15289 * linux-low.h (regset_info): Add nt_type.
15290 (linux_target_ops): Add process_qsupported.
15292 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15294 (init_registers_i386_avx_linux): New.
15295 (init_registers_amd64_avx_linux): Likewise.
15296 (xmltarget_i386_linux_no_xml): Likewise.
15297 (xmltarget_amd64_linux_no_xml): Likewise.
15298 (PTRACE_GETREGSET): Likewise.
15299 (PTRACE_SETREGSET): Likewise.
15300 (x86_fill_xstateregset): Likewise.
15301 (x86_store_xstateregset): Likewise.
15302 (use_xml): Likewise.
15303 (x86_linux_update_xmltarget): Likewise.
15304 (x86_linux_process_qsupported): Likewise.
15305 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15306 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15307 init_registers_i386_linux here. Call
15308 x86_linux_update_xmltarget.
15309 (the_low_target): Add x86_linux_process_qsupported.
15311 * server.c (handle_query): Call target_process_qsupported.
15313 * target.h (target_ops): Add process_qsupported.
15314 (target_process_qsupported): New.
15316 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15318 * inferiors.c (add_thread): Set last_status kind to
15319 TARGET_WAITKIND_IGNORE.
15320 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15321 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15322 (linux_wait_1): Move `thread' local definition to block that uses
15323 it. Don't NULL initialize `event_child'.
15324 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15325 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15326 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15328 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15330 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15331 an extended waitstatus, or by a watchpoint.
15332 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15333 thread was stepping or has been stopped by a watchpoint.
15335 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15337 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15338 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15339 of another, then delete the previous, and validate all
15341 (validate_inserted_breakpoint): New.
15342 (delete_disabled_breakpoints): New.
15343 (validate_breakpoints): New.
15344 (check_mem_read): Validate breakpoints before trusting their
15345 shadow. Delete disabled breakpoints.
15346 (check_mem_write): Validate breakpoints before trusting they
15347 should be inserted. Delete disabled breakpoints.
15348 * mem-break.h (validate_breakpoints):
15349 * server.c (handle_query): Validate breakpoints when we see a
15352 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15354 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15355 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15356 if we could tell there's a GDB breakpoint at stop_pc.
15357 (need_step_over_p): Don't do a step over if we find a GDB
15358 breakpoint at the resume PC.
15360 * mem-break.c (struct raw_breakpoint): New.
15361 (enum bkpt_type): New type `gdb_breakpoint'.
15362 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15363 fields. New field `raw'.
15364 (find_raw_breakpoint_at): New.
15365 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15366 breakpoint instead.
15367 (set_breakpoint_at): Adjust.
15368 (delete_raw_breakpoint): New.
15369 (release_breakpoint): New.
15370 (delete_breakpoint): Rename to...
15371 (delete_breakpoint_1): ... this. Add proc parameter. Use
15372 release_breakpoint. Return ENOENT.
15373 (delete_breakpoint): Reimplement.
15374 (find_breakpoint_at): Delete.
15375 (find_gdb_breakpoint_at): New.
15376 (delete_breakpoint_at): Delete.
15377 (set_gdb_breakpoint_at): New.
15378 (delete_gdb_breakpoint_at): New.
15379 (gdb_breakpoint_here): New.
15380 (set_reinsert_breakpoint): Use release_breakpoint.
15381 (uninsert_breakpoint): Rename to ...
15382 (uninsert_raw_breakpoint): ... this.
15383 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15384 (reinsert_raw_breakpoint): Change parameter type to
15386 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15388 (check_breakpoints): Adjust. Use release_breakpoint.
15389 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15390 (breakpoint_inserted_here): Ditto.
15391 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15392 Don't trust the breakpoint's shadow if it is not inserted.
15393 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15394 (delete_all_breakpoints): Adjust.
15395 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15396 use delete_breakpoint_1.
15398 * mem-break.h (breakpoints_supported): Delete declaration.
15399 (set_gdb_breakpoint_at): Declare.
15400 (gdb_breakpoint_here): Declare.
15401 (delete_breakpoint_at): Delete.
15402 (delete_gdb_breakpoint_at): Declare.
15404 * server.h (struct raw_breakpoint): Forward declare.
15405 (struct process_info): New field `raw_breakpoints'.
15407 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15410 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15412 * linux-low.c (status_pending_p_callback): Fix comment.
15413 (linux_wait_for_event_1): Move most of the internal breakpoint
15414 handling from here...
15415 (linux_wait_1): ... to here.
15416 (count_events_callback): New.
15417 (select_singlestep_lwp_callback): New.
15418 (select_event_lwp_callback): New.
15419 (cancel_breakpoints_callback): New.
15420 (select_event_lwp): New.
15421 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15422 priority to all LWPs that have had events that should be reported
15423 to the client. Cancel breakpoints when about to reporting the
15424 event to the client, not while stopping lwps. No longer cancel
15425 finished single-steps here.
15426 (cancel_finished_single_step): Delete.
15427 (cancel_finished_single_steps): Delete.
15429 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15431 * mem-break.c (enum bkpt_type): New.
15432 (struct breakpoint): New field `type'.
15433 (set_breakpoint_at): Change return type to struct breakpoint
15434 pointer. Set type to `other_breakpoint' by default.
15435 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15436 in the breakpoint list.
15437 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15438 (reinsert_breakpoint): Rename to ...
15439 (reinsert_raw_breakpoint): ... this.
15440 (reinsert_breakpoints_at): Adjust.
15441 * mem-break.h (struct breakpoint): Declare.
15442 (set_breakpoint_at): Change return type to struct breakpoint
15445 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15447 * server.c (handle_query): Assign, not compare.
15449 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15451 Teach linux gdbserver to step-over-breakpoints.
15453 * linux-low.c (can_hardware_single_step): New.
15454 (supports_breakpoints): New.
15455 (handle_extended_wait): If stopping threads, read the stop pc of
15456 the new cloned LWP.
15458 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15459 low target doesn't support retrieving the PC.
15460 (add_lwp): Set last_resume_kind to resume_continue.
15461 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15462 (linux_attach): Don't clear stop_expected. Set the lwp's
15463 last_resume_kind to resume_stop.
15464 (linux_detach_one_lwp): Don't check for removed breakpoints.
15465 (check_removed_breakpoint): Delete.
15466 (status_pending_p): Rename to ...
15467 (status_pending_p_callback): ... this. Don't check for removed
15468 breakpoints. Don't consider threads that are stopped from GDB's
15470 (linux_wait_for_lwp): Always read the stop_pc here.
15471 (cancel_breakpoint): New.
15472 (step_over_bkpt): New global.
15473 (linux_wait_for_event_1): Implement stepping over breakpoints.
15474 (gdb_wants_lwp_stopped): New.
15475 (gdb_wants_all_stopped): New.
15476 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15477 single-step traps here. Store the thread's last reported target
15479 (send_sigstop): Don't clear stop_expected. Always set it,
15481 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15482 (cancel_finished_single_step): New.
15483 (cancel_finished_single_steps): New.
15484 (wait_for_sigstop): Don't cancel finished single-step traps here.
15485 (linux_resume_one_lwp): Don't check for removed breakpoints.
15486 Don't set `step' on non-hardware step archs.
15487 (linux_set_resume_request): Ignore resume_stop requests if already
15488 stopping or stopped. Set the lwp's last_resume_kind.
15489 (resume_status_pending_p): Don't check for removed breakpoints.
15490 (need_step_over_p): New.
15491 (start_step_over): New.
15492 (finish_step_over): New.
15493 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15494 requests. Clear the thread's last reported target waitstatus.
15495 Don't use the `suspended' flag. Don't consider pending breakpoints.
15496 (linux_resume): Start a step-over if necessary.
15497 (proceed_one_lwp): New.
15498 (proceed_all_lwps): New.
15499 (unstop_all_lwps): New.
15500 * linux-low.h (struct lwp_info): Rewrite comment for the
15501 `suspended' flag. Add the `stop_pc' field. Delete the
15502 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15503 Add `'last_resume_kind' and `need_step_over' fields.
15504 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15505 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15506 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15507 (set_raw_breakpoint_at): New.
15508 (set_breakpoint_at): Rewrite to use it.
15509 (reinsert_breakpoint_handler): Delete.
15510 (set_reinsert_breakpoint): New.
15511 (reinsert_breakpoint_by_bp): Delete.
15512 (delete_reinsert_breakpoints): New.
15513 (uninsert_breakpoint): Rewrite.
15514 (uninsert_breakpoints_at): New.
15515 (reinsert_breakpoint): Rewrite.
15516 (reinsert_breakpoints_at): New.
15517 (check_breakpoints): Rewrite.
15518 (breakpoint_here): New.
15519 (breakpoint_inserted_here): New.
15520 (check_mem_read): Adjust.
15521 * mem-break.h (breakpoints_supported, breakpoint_here)
15522 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15523 (reinsert_breakpoint_by_bp): Delete declaration.
15524 (delete_reinsert_breakpoints): Declare.
15525 (reinsert_breakpoint): Delete declaration.
15526 (reinsert_breakpoints_at): Declare.
15527 (uninsert_breakpoint): Delete declaration.
15528 (uninsert_breakpoints_at): Declare.
15529 (check_breakpoints): Adjust prototype.
15530 * server.h: Adjust include order.
15531 (struct thread_info): Declare here. Add a `last_status' field.
15533 2010-03-23 Michael Snyder <msnyder@vmware.com>
15535 * server.c (crc32): New function.
15536 (handle_query): Add handling for 'qCRC:' request.
15538 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15540 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15541 lwp had been stopped by a watchpoint.
15543 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15545 * server.h (internal_error): Declare.
15546 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15547 * utils.c (internal_error): New function.
15549 2010-03-15 Andreas Schwab <schwab@redhat.com>
15551 * configure.srv: Fix typo setting srv_regobj.
15553 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15555 * linux-low.c (fetch_register): Avoid passing a non string literal
15557 (usr_store_inferior_registers): Ditto.
15559 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15561 * linux-low.c (linux_write_memory): Bail out early if peeking
15564 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15566 * linux-low.h (struct lwp_info): New fields
15567 `stopped_by_watchpoint' and `stopped_data_address'.
15568 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15569 here, and cache them in the lwp object.
15570 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15572 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15574 (linux_stopped_by_watchpoint): Rewrite.
15575 (linux_stopped_data_address): Rewrite.
15577 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15579 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15580 switching the current inferior, not before.
15582 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15584 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15585 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15586 i386-linux.c and amd64-linux.c.
15587 (reg-i386.o): Removed.
15588 (reg-i386.c): Likewise.
15589 (reg-i386-linux.o): Likewise.
15590 (reg-i386-linux.c): Likewise.
15591 (reg-x86-64.o): Likewise.
15592 (reg-x86-64.c): Likewise.
15593 (reg-x86-64-linux.o): Likewise.
15594 (reg-x86-64-linux.c): Likewise.
15596 (i386.c): Likewise.
15597 (i386-linux.o): Likewise.
15598 (i386-linux.c): Likewise.
15599 (amd64.o): Likewise.
15600 (amd64.c): Likewise.
15601 (amd64-linux.o): Likewise.
15602 (amd64-linux.c): Likewise.
15604 * configure.srv (srv_i386_regobj): New.
15605 (srv_i386_linux_regobj): Likewise.
15606 (srv_amd64_regobj): Likewise.
15607 (srv_amd64_linux_regobj): Likewise.
15608 (srv_i386_32bit_xmlfiles): Likewise.
15609 (srv_i386_64bit_xmlfiles): Likewise.
15610 (srv_i386_xmlfiles): Likewise.
15611 (srv_amd64_xmlfiles): Likewise.
15612 (srv_i386_linux_xmlfiles): Likewise.
15613 (srv_amd64_linux_xmlfiles): Likewise.
15614 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15615 srv_xmlfiles to $srv_i386_xmlfiles.
15616 (i[34567]86-*-mingw32ce*): Likewise.
15617 (i[34567]86-*-mingw*): Likewise.
15618 (i[34567]86-*-nto*): Likewise.
15619 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15620 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15621 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15622 (x86_64-*-linux*): Likewise.
15624 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15625 (init_registers_amd64_linux): New.
15626 (x86_arch_setup): Replace init_registers_x86_64_linux with
15627 init_registers_amd64_linux.
15629 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15631 * configure.ac: Check for libdl. If it is not available link against
15632 static libthread_db.
15633 * configure: Regenerate.
15635 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15639 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15640 handing a read watchpoint.
15641 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15643 2010-02-12 Doug Evans <dje@google.com>
15645 * linux-low.c (linux_supports_tracefork_flag): Document.
15646 (linux_look_up_symbols): Add comment.
15648 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15650 * regcache.c (supply_register): Clear regcache if buf is NULL.
15652 2010-02-02 Nicolas Roche <roche@sourceware.org>
15653 Joel Brobecker <brobecker@adacore.com>
15655 * inferiors.c (find_inferior): Add function documentation.
15656 (unloaded_dll): Handle the case where the unloaded dll has not
15657 been previously registered in the dll list.
15659 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15661 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15662 (thumb2_breakpoint): New.
15663 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15665 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15667 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15668 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15671 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15673 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15675 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15677 * linux-s390-low.c (s390_collect_ptrace_register)
15678 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15680 2010-01-21 Doug Evans <dje@google.com>
15682 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15683 (PTRACE_ARG4_TYPE): New macro.
15684 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15685 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15686 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15687 (usr_store_inferior_registers): Ditto.
15688 (linux_read_memory, linux_write_memory): Ditto.
15689 (linux_test_for_tracefork): Ditto.
15691 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15692 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15694 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15696 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15699 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15701 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15702 prototype to take a regcache. Adjust.
15704 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15706 * regcache.h (struct thread_info): Forward declare.
15707 (struct regcache): New.
15708 (new_register_cache): Adjust prototype.
15709 (get_thread_regcache): Declare.
15710 (free_register_cache): Adjust prototype.
15711 (registers_to_string, registers_from_string): Ditto.
15712 (supply_register, supply_register_by_name, collect_register)
15713 (collect_register_as_string, collect_register_by_name): Ditto.
15714 * regcache.c (struct inferior_regcache_data): Delete.
15715 (get_regcache): Rename to ...
15716 (get_thread_regcache): ... this. Adjust. Switch inferior before
15717 fetching registers.
15718 (regcache_invalidate_one): Adjust.
15719 (regcache_invalidate): Fix prototype.
15720 (new_register_cache): Return the new register cache.
15721 (free_register_cache): Change prototype.
15722 (realloc_register_cache): Adjust.
15723 (registers_to_string): Change prototype to take a regcache. Adjust.
15724 (registers_from_string): Ditto.
15725 (register_data): Ditto.
15726 (supply_register): Ditto.
15727 (supply_register_by_name): Ditto.
15728 (collect_register): Ditto.
15729 (collect_register_as_string): Ditto.
15730 (collect_register_by_name): Ditto.
15731 * server.c (process_serial_event): Adjust.
15732 * linux-low.h (regset_fill_func, regset_store_func): Change
15734 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15736 * linux-low.c (get_stop_pc): Adjust.
15737 (check_removed_breakpoint): Adjust.
15738 (linux_wait_for_event): Adjust.
15739 (linux_resume_one_lwp): Adjust.
15740 (fetch_register): Add regcache parameter. Adjust.
15741 (usr_store_inferior_registers): Ditto.
15742 (regsets_fetch_inferior_registers): Ditto.
15743 (regsets_store_inferior_registers): Ditto.
15744 (linux_fetch_registers, linux_store_registers): Ditto.
15745 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15747 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15749 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15750 prototype to take a regcache.
15751 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15752 * remote-utils.c (convert_ascii_to_int, outreg)
15753 (prepare_resume_reply): Change prototype to take a regcache.
15755 * target.h (struct target_ops) <fetch_registers, store_registers>:
15756 Change prototype to take a regcache.
15757 (fetch_inferior_registers, store_inferior_registers): Change
15758 prototype to take a regcache. Adjust.
15759 * proc-service.c (ps_lgetregs): Adjust.
15760 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15761 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15762 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15763 take a regcache. Adjust.
15764 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15765 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15766 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15767 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15768 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15769 (cris_cannot_fetch_register):
15770 (cris_breakpoint_at): Change prototype to take a regcache.
15772 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15773 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15774 to take a regcache. Adjust.
15775 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15777 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15778 take a regcache. Adjust.
15779 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15780 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15781 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15782 * linux-mips-low.c (mips_get_pc):
15783 (mips_set_pc): Change prototype to take a regcache. Adjust.
15784 (mips_reinsert_addr): Adjust.
15785 (mips_collect_register): Change prototype to take a regcache.
15787 (mips_supply_register):
15788 (mips_collect_register_32bit, mips_supply_register_32bit)
15789 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15790 (mips_store_fpregset): Ditto.
15791 * linux-ppc-low.c (ppc_supply_ptrace_register)
15792 (ppc_supply_ptrace_register): Ditto.
15793 (parse_spufs_run): Adjust.
15794 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15795 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15796 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15797 take a regcache. Adjust.
15798 * linux-s390-low.c (s390_collect_ptrace_register)
15799 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15800 (s390_set_pc): Change prototype to take a regcache. Adjust.
15801 (s390_arch_setup): Adjust.
15802 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15803 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15804 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15805 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15806 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15808 (sparc_breakpoint_at): Adjust.
15809 * linux-xtensa-low.c (xtensa_fill_gregset):
15810 (xtensa_store_gregset):
15811 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15812 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15813 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15814 prototype to take a regcache. Adjust.
15815 * win32-arm-low.c (arm_fetch_inferior_register)
15816 (arm_store_inferior_register): Change prototype to take a
15818 * win32-i386-low.c (i386_fetch_inferior_register)
15819 (i386_store_inferior_register): Change prototype to take a
15821 * win32-low.c (child_fetch_inferior_registers)
15822 (child_store_inferior_registers): Change prototype to take a
15824 (win32_wait): Adjust.
15825 (win32_fetch_inferior_registers): Change prototype to take a
15827 (win32_store_inferior_registers): Adjust.
15828 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15829 store_inferior_register>: Change prototype to take a regcache.
15831 2010-01-20 Doug Evans <dje@google.com>
15833 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15835 (linux_wait_for_event1, linux_init_signals): Ditto.
15836 (W_STOPCODE): Provide definition if missing.
15838 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15840 * linux-low.c (linux_core_of_thread): New.
15841 (compare_ints, show_process, list_threads): New.
15842 (linux_qxfer_osdata): Report threads and cores.
15843 (linux_target_op): Register linux_core_of_thread.
15844 * remote-utils.c (prepare_resume_reply): Report the core.
15845 (buffer_xml_printf): Support %d specifier.
15846 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15848 (handle_query): Handle qXfer:threads. Announce availability
15850 * target.h (struct target_ops): New field core_of_thread.
15852 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15854 * Makefile.in (clean): Remove new generated files.
15855 (reg-s390.o, reg-s390.c): Remove rules.
15856 (reg-s390x.o, reg-s390x.c): Likewise.
15857 (s390-linux32.o, s390-linux32.c): Add rules.
15858 (s390-linux64.o, s390-linux64.c): Likewise.
15859 (s390x-linux64.o, s390x-linux64.c): Likewise.
15860 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15861 * linux-s390-low.c: Include <elf.h>.
15862 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15863 (init_registers_s390): Remove prototype.
15864 (init_registers_s390x): Likewise.
15865 (init_registers_s390_linux32): Add prototype.
15866 (init_registers_s390_linux64): Likewise.
15867 (init_registers_s390x_linux64): Likewise.
15868 (s390_num_regs_3264): New define.
15869 (s390_regmap_3264): New global variable.
15870 (s390_cannot_fetch_register): Remove obsolete check.
15871 (s390_cannot_store_register): Likewise.
15872 (s390_collect_ptrace_register): Handle upper/lower register halves.
15873 (s390_supply_ptrace_register): Likewise.
15874 (s390_fill_gregset): Update to register number changes.
15875 (s390_get_hwcap): New routine.
15876 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15877 Install appropriate regmap and register set.
15879 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15881 * server.c (gdbserver_version): Update copyright year to 2010.
15882 * gdbreplay.c (gdbreplay_version): Likewise.
15884 2009-12-28 Doug Evans <dje@google.com>
15886 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15887 elf/external.h. Include <elf.h> instead but only if necessary.
15889 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15891 * linux-low.c (linux_remove_process): Remove `detaching'
15892 parameter. Don't release/detach from thread_db here.
15893 (linux_kill): Release/detach from thread_db here, ...
15894 (linux_detach): ... and here, before actually detaching.
15895 (linux_wait_1): ... and here, when a process exits.
15896 * thread-db.c (any_thread_of): New.
15897 (thread_db_free): Switch the current inferior to a thread of the
15900 2009-12-21 Doug Evans <dje@google.com>
15902 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15904 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15905 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15906 warning ifndef __NR_tkill. Move setting of errno there too.
15907 Delete unnecessary resetting of errno after syscall.
15908 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15910 * configure.ac: Check for dladdr.
15911 * config.in: Regenerate.
15912 * configure: Regenerate.
15913 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15914 (try_thread_db_load): Update.
15916 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15918 2009-12-18 Doug Evans <dje@google.com>
15920 * event-loop.c: Include unistd.h if it exists.
15922 * linux-low.c (my_waitpid): Move definition away from being in
15923 between linux_tracefork_child/linux_test_for_tracefork.
15925 * gdb_proc_service.h (psaddr_t): Fix type.
15926 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15927 signature to match glibc.
15929 2009-12-16 Doug Evans <dje@google.com>
15931 * linux-low.c (linux_read_memory): Fix argument to read.
15933 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15935 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15936 events, don't leave current_inferior pointing at null.
15938 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15940 * win32-low.c (LOG): Delete.
15941 (OUTMSG): Output to stderr.
15942 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15943 on compile time LOG macro.
15944 (win32_wait): Fix debug output.
15946 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15948 * win32-low.c (win32_add_one_solib): If the dll name is
15949 "ntdll.dll", prepend the system directory to the dll path.
15951 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15953 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15955 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15956 Vladimir Prus <vladimir@codesourcery.com>
15958 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15959 * configure.ac: Check for __mcoldfire__ and set
15960 gdb_cv_m68k_is_coldfire.
15961 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15962 reg-cf.o and reg-m68k.o.
15963 * configure: Regenerated.
15965 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15967 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15968 Pass it to thread_db_free.
15969 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15970 proper `detaching' argument to linux_remove_process.
15971 * linux-low.h (thread_db_free): Add `detaching' parameter.
15972 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15974 (thread_db_free): Add `detaching' parameter. Only
15975 call td_ta_clear_event if detaching from process.
15977 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15979 * thread-db.c (thread_db_free): Fix typo.
15981 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15984 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15986 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15988 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15989 with an i686 compiler.
15990 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15992 * configure: Rebuilt.
15994 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15998 * server.c (handle_search_memory_1): Correct read_addr initialization
15999 in loop for searching subsequent chunks.
16001 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16003 * configure.ac: New --with-libthread-db option.
16004 * thread-db.c: Allow direct dependence on libthread_db.
16005 (thread_db_free): Adjust.
16006 * config.in: Regenerate.
16007 * configure: Likewise.
16009 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16012 * thread-db.c (attach_thread): New function.
16013 (maybe_attach_thread): Return success/failure.
16014 (find_new_threads_callback): Adjust.
16015 (thread_db_find_new_threads): Loop until no new threads.
16017 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16019 * proc-service.c (ps_lgetregs): Formatting.
16021 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16023 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16024 * configure.ac: Adjust.
16025 * linux-low.h (struct process_info_private): Move members to struct
16027 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16028 * linux-low.c (linux_remove_process): Adjust.
16029 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16030 * server.c (handle_query): Move code ...
16031 (handle_monitor_command): ... here. New function.
16032 * target.h (struct target_ops): New member.
16033 * thread-db.c (struct thread_db): New.
16034 (libthread_db_search_path): New variable.
16035 (thread_db_create_event, thread_db_enable_reporting)
16036 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16037 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16038 (try_thread_db_load_1, dladdr_to_soname): New functions.
16039 (try_thread_db_load, thread_db_load_search): New functions.
16040 (thread_db_init): Search for libthread_db.
16041 (thread_db_free): New function.
16042 (thread_db_handle_monitor_command): Likewise.
16043 * config.in: Regenerate.
16044 * configure: Regenerate.
16046 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16048 * spu-low.c (spu_kill): Wait for inferior to terminate.
16049 Call clear_inferiors.
16050 (spu_detach): Call clear_inferiors.
16052 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16054 * aclocal.m4: Regenerate.
16055 * config.in: Likewise.
16056 * configure: Likewise.
16058 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16060 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16061 (parse_spufs_run): New function.
16062 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16063 (ppc_breakpoint_at): Handle SPU breakpoints.
16065 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16067 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16068 (SPUFS_MAGIC): Define.
16069 (spu_enumerate_spu_ids): New function.
16070 (linux_qxfer_spu): New function.
16071 (linux_target_ops): Install linux_qxfer_spu.
16073 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16075 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16076 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16077 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16078 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16079 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16080 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16081 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16082 (init_registers_powerpc_cell32l): Add prototype.
16083 (init_registers_powerpc_cell64l): Likewise.
16084 (ppc_arch_setup): Detect Cell/B.E. architecture.
16086 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16088 * Makefile.in (datarootdir): New variable.
16090 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16092 * linux-low.c (linux_write_memory): Update debugging output.
16093 * Makefile.in (clean): Add new descriptions.
16094 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16095 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16096 * configure.srv: Add new files for arm*-*-linux*.
16097 * linux-arm-low.c: Add new declarations.
16098 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16099 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16100 (HWCAP_VFPv3D16): New.
16101 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16102 instead of __IWMMXT__.
16103 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16104 (arm_arch_setup): New.
16105 (target_regsets): Remove #ifdef. Add VFP regset.
16106 (the_low_target): Use arm_arch_setup.
16108 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16110 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16111 the main thread again.
16113 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16115 Adding Neutrino gdbserver.
16116 * configure: Regenerated.
16117 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16118 * configure.srv (i[34567]86-*-nto*): New target.
16119 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16120 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16121 (nto_comctrl) [__QNX__]: New function.
16122 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16124 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16126 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16129 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16130 Pedro Alves <pedro@codesourcery.com>
16132 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16133 don't support CONTEXT_EXTENDED_REGISTERS.
16134 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16135 (the_low_target): Install them.
16136 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16137 failing with ERROR_PIPE_NOT_CONNECTED.
16139 2009-06-30 Doug Evans <dje@google.com>
16140 Pierre Muller <muller@ics.u-strasbg.fr>
16142 Add h/w watchpoint support to x86-linux, win32-i386.
16143 * Makefile.in (SFILES): Add i386-low.c
16144 (i386_low_h): Define.
16145 (i386-low.o): Add dependencies.
16146 (linux-x86-low.o): Add i386-low.h dependency.
16147 (win32-i386-low.o): Ditto.
16148 * i386-low.c: New file.
16149 * i386-low.h: New file.
16150 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16151 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16152 * linux-low.c (linux_add_process): Initialize arch_private.
16153 (linux_remove_process): Free arch_private.
16154 (add_lwp): Initialize arch_private.
16155 (delete_lwp): Free arch_private.
16156 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16158 * linux-low.h (process_info_private): New member arch_private.
16159 (lwp_info): New member arch_private.
16160 (linux_target_ops): New members new_process, new_thread,
16162 (ptid_of): New macro.
16163 * linux-x86-low.c: Include stddef.h, i386-low.h.
16164 (arch_process_info): New struct.
16165 (arch_lwp_info): New struct.
16166 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16167 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16168 (i386_dr_low_get_status): New function.
16169 (x86_insert_point, x86_remove_point): New functions.
16170 (x86_stopped_by_watchpoint): New function.
16171 (x86_stopped_data_address): New function.
16172 (x86_linux_new_process, x86_linux_new_thread): New functions.
16173 (x86_linux_prepare_to_resume): New function.
16174 (the_low_target): Add entries for insert_point, remove_point,
16175 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16177 * server.c (debug_hw_points): New global.
16178 (monitor_show_help): Document set debug-hw-points.
16179 (handle_query): Process "set debug-hw-points".
16180 * server.h (debug_hw_points): Declare.
16181 (paddress): Declare.
16182 * utils.c (NUMCELLS, CELLSIZE): New macros.
16183 (get_sell, xsnprintf, paddress): New functions.
16184 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16185 remove_point, stopped_by_watchpoint, stopped_data_address.
16186 * win32-i386-low.c: Include i386-low.h.
16187 (debug_reg_state): Replaces dr.
16188 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16189 (i386_dr_low_get_status): New function.
16190 (i386_insert_point, i386_remove_point): New functions.
16191 (i386_stopped_by_watchpoint): New function.
16192 (i386_stopped_data_address): New function.
16193 (i386_initial_stuff): Update.
16194 (get_thread_context,set_thread_context,i386_thread_added): Update.
16195 (the_low_target): Add entries for insert_point,
16196 remove_point, stopped_by_watchpoint, stopped_data_address.
16197 * win32-low.c (win32_insert_watchpoint): New function.
16198 (win32_remove_watchpoint): New function.
16199 (win32_stopped_by_watchpoint): New function.
16200 (win32_stopped_data_address): New function.
16201 (win32_target_ops): Add entries for insert_watchpoint,
16202 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16203 * win32-low.h (win32_target_ops): New members insert_point,
16204 remove_point, stopped_by_watchpoint, stopped_data_address.
16206 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16208 * server.c (process_serial_event): Re-return unsupported, not
16209 error, if the type isn't recognized. Re-allow supporting only
16210 insert or remove packets. Also call require_running for
16211 breakpoints. Add missing break statement to default case. Tidy.
16212 * target.h (struct target_ops): Rename insert_watchpoint to
16213 insert_point, and remove_watchpoint to remove_point.
16215 * linux-low.h (struct linux_target_ops): Likewise.
16216 * linux-low.c (linux_insert_watchpoint): Rename to ...
16217 (linux_insert_point): ... this. Adjust.
16218 (linux_remove_watchpoint): Rename to ...
16219 (linux_remove_point): ... this. Adjust.
16220 (linux_target_ops): Adjust.
16221 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16222 (cris_insert_point): ... this.
16223 (cris_remove_watchpoint): Rename to ...
16224 (cris_remove_point): ... this.
16225 (the_low_target): Adjust.
16227 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16229 * server.c (handle_v_kill): Pass signal_pid to
16230 kill_inferior if multi_process is zero.
16232 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16234 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16235 * target.h (target_ops): Comment for *_watchpoint to make it clear
16236 the functions can get types '0' and '1'.
16238 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16240 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16241 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16242 * regcache.c (get_regcache): Likewise.
16243 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16244 * win32-low.c (child_fetch_inferior_registers): Remove check for
16247 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16248 Pedro Alves <pedro@codesourcery.com>
16250 * target.h (struct target_ops) <supports_multi_process>: New
16252 (target_supports_multi_process): New.
16253 * server.c (handle_query): Even if GDB reports support, only
16254 enable multi-process if the target also supports it. Report
16255 multi-process support only if the target backend supports it.
16256 * linux-low.c (linux_supports_multi_process): New function.
16257 (linux_target_ops): Install it as target_supports_multi_process
16260 2009-05-24 Doug Evans <dje@google.com>
16262 Global renaming of find_thread_pid to find_thread_ptid.
16263 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16264 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16265 All callers updated.
16267 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16268 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16271 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16272 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16273 (linux_resume_one_lwp): Ditto.
16275 2009-05-23 Doug Evans <dje@google.com>
16277 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16278 from struct inferior_list_entry * to struct lwp_info *.
16279 All callers updated.
16281 2009-05-13 Doug Evans <dje@google.com>
16283 * linux-x86-low.c: Don't include assert.h.
16284 (x86_siginfo_fixup): Use fatal, not assert.
16285 (x86_arch_setup): Fix comment.
16287 2009-05-12 Doug Evans <dje@google.com>
16289 Biarch support for i386/amd64 gdbserver.
16290 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16291 Add linux-x86-low.c.
16292 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16293 (linux-x86-low.o): Add.
16294 * linux-x86-64-low.c: Delete.
16295 * linux-i386-low.c: Delete.
16296 * linux-x86-low.c: New file.
16297 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16299 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16301 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16302 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16303 (linux_child_pid_to_exec_file): New function.
16304 (elf_64_header_p, elf_64_file_p): New functions.
16305 (siginfo_fixup): New function.
16306 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16307 give target a chance to convert layout.
16308 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16309 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16311 2009-05-07 Doug Evans <dje@google.com>
16313 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16314 (regsets_store_inferior_registers): Ditto.
16316 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16320 * linux-low.c (must_set_ptrace_flags): Delete.
16321 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16323 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16324 `lwp->must_set_ptrace_flags' instead.
16325 (linux_wait_for_event_1): Set ptrace options here.
16326 (linux_wait_1): ... not here.
16328 2009-04-30 Doug Evans <dje@google.com>
16330 * inferiors.c (started_inferior_callback): New function.
16331 (attached_inferior_callback): New function.
16332 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16333 * server.c (print_started_pid, print_attached_pid): New functions.
16334 (detach_or_kill_for_exit): New function.
16335 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16336 * server.h (have_started_inferiors_p): Declare.
16337 (have_attached_inferiors_p): Declare.
16339 * inferiors.c (remove_process): Fix memory leak, free process.
16340 * linux-low.c (linux_remove_process): New function.
16341 (linux_kill): Call it instead of remove_process.
16342 (linux_detach, linux_wait_1): Ditto.
16344 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16346 * configure.srv: Add x86 Windows CE target.
16348 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16350 * inferiors.c (get_thread_process): Make global.
16351 * server.h (get_thread_process): Add prototype.
16352 * thread-db.c (find_one_thread): Use get_thread_process
16353 instead of current_process.
16354 (thread_db_get_tls_address): Do not crash if called when
16355 thread layer is not yet initialized.
16357 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16359 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16360 * spu-low.c (current_tid): Rename to ...
16361 (current_ptid): ... this.
16362 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16363 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16364 ptid_get_lwp (current_ptid) instead of current_tid.
16365 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16366 instead of current_tid. Use find_process_pid to verify pid
16367 argument is valid. Pass proper argument to remove_process.
16368 (spu_thread_alive): Compare current_ptid instead of current_tid.
16369 (spu_resume): Likewise.
16371 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16373 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16376 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16378 Implement the multiprocess extensions, and add linux multiprocess
16381 * server.h (ULONGEST): Declare.
16382 (struct ptid, ptid_t): New.
16383 (minus_one_ptid, null_ptid): Declare.
16384 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16385 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16386 (struct inferior_list_entry): Change `id' type from unsigned from
16388 (struct sym_cache, struct breakpoint, struct
16389 process_info_private): Forward declare.
16390 (struct process_info): Declare.
16391 (current_process): Declare.
16392 (all_processes): Declare.
16393 (initialize_inferiors): Declare.
16394 (add_thread): Adjust to use ptid_t.
16395 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16396 (add_process, remove_process, find_thread_pid): Declare.
16397 (find_inferior_id): Adjust to use ptid_t.
16398 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16399 (multi_process): Declare.
16400 (push_event): Adjust to use ptid_t.
16401 (read_ptid, write_ptid): Declare.
16402 (prepare_resume_reply): Adjust to use ptid_t.
16403 (clear_symbol_cache): Declare.
16404 * inferiors.c (all_processes): New.
16405 (null_ptid, minus_one_ptid): New.
16406 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16407 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16408 (add_thread): Change unsigned long to ptid. Remove gdb_id
16410 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16411 (gdb_id_to_thread): Rename to ...
16412 (find_thread_pid): ... this. Change unsigned long to ptid.
16413 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16414 (loaded_dll, pull_pid_from_list): Adjust.
16415 (add_process, remove_process, find_process_pid)
16416 (get_thread_process, current_process, initialize_inferiors): New.
16417 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16418 (struct target_waitstatus) <related_pid>: Ditto.
16419 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16420 return type to int.
16421 (struct target_ops) <join>: Add `pid' argument.
16422 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16423 (struct target_ops) <wait>: Add `ptid' field. Change return type
16425 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16426 (mywait): Add `ptid' argument. Change return type to ptid_t.
16427 (target_pid_to_str): Declare.
16428 * target.c (set_desired_inferior): Adjust to use ptids.
16429 (mywait): Add new `ptid' argument. Adjust.
16430 (target_pid_to_str): New.
16431 * mem-break.h (free_all_breakpoints): Declare.
16432 * mem-break.c (breakpoints): Delelete.
16433 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16434 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16435 to use per-process breakpoint list.
16436 (free_all_breakpoints): New.
16437 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16438 (symbol_cache, all_symbols_looked_up): Delete.
16440 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16442 (prepare_resume_reply): Change ptid argument's type from unsigned
16443 long to ptid_t. Adjust. Implement W;process and X;process.
16444 (free_sym_cache, clear_symbol_cache): New.
16445 (look_up_one_symbol): Adjust to per-process symbol cache. *
16446 * server.c (cont_thread, general_thread, step_thread): Change type
16448 (attached): Delete.
16449 (multi_process): New.
16450 (last_ptid): Change type to ptid_t.
16451 (struct vstop_notif) <ptid>: Change type to ptid_t.
16452 (queue_stop_reply, push_event): Change `ptid' argument's type to
16454 (discard_queued_stop_replies): Add `pid' argument.
16455 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16456 changes. Don't reference the `attached' global.
16457 (attach_inferior): Adjust to mywait interface changes.
16458 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16459 features. Handle and report "multiprocess+". Handle
16461 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16463 (handle_v_kill): New.
16464 (handle_v_stopped): Adjust to use target_pid_to_str.
16465 (handle_v_requests): Allow multiple attaches and runs when
16466 multiprocess extensions are in effect. Handle "vKill".
16467 (myresume): Adjust to use ptids.
16468 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16469 (handle_status): Adjust to discard_queued_stop_replies interface
16471 (first_thread_of, kill_inferior_callback)
16472 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16473 (main): Call initialize_inferiors. Adjust to use ptids, killing
16474 and detaching from all inferiors. Handle multiprocess packet
16476 * linux-low.h: Include gdb_proc_service.h.
16477 (struct process_info_private): New.
16478 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16479 <lwpid_of>: Use ptid_get_lwp.
16480 (get_lwp_thread): Adjust.
16481 (struct lwp_info): Add `dead' member.
16482 (find_lwp_pid): Declare.
16483 * linux-low.c (thread_db_active): Delete.
16484 (new_inferior): Adjust comment.
16485 (inferior_pid): Delete.
16486 (linux_add_process): New.
16487 (handle_extended_wait): Adjust.
16488 (add_lwp): Change unsigned long to ptid.
16489 (linux_create_inferior): Add process to processes table. Adjust
16490 to use ptids. Don't set new_inferior here.
16491 (linux_attach_lwp): Rename to ...
16492 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16493 it. Adjust to use ptids.
16494 (linux_attach_lwp): New.
16495 (linux_attach): Add process to processes table. Don't set
16497 (struct counter): New.
16498 (second_thread_of_pid_p, last_thread_of_process_p): New.
16499 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16500 multiple processes.
16501 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16502 processes. Remove process from process table.
16503 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16504 to multiple processes.
16505 (any_thread_of): New.
16506 (linux_detach): Add `pid' argument, and handle it. Remove process
16507 from processes table.
16508 (linux_join): Add `pid' argument. Handle it.
16509 (linux_thread_alive): Change unsighed long argument to ptid_t.
16510 Consider dead lwps as not being alive.
16511 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16512 threads we're not interested in.
16513 (same_lwp, find_lwp_pid): New.
16514 (linux_wait_for_lwp): Change `pid' argument's type from int to
16516 (linux_wait_for_event): Rename to ...
16517 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16518 from int to ptid_t. Adjust.
16519 (linux_wait_for_event): New.
16520 (linux_wait_1): Add `ptid' argument. Change return type to
16521 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16522 that exit from the process table.
16523 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16525 (mark_lwp_dead): New.
16526 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16527 stopping all threads, mark its main lwp as dead.
16528 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16530 (fetch_register, usr_store_inferior_registers)
16531 (regsets_fetch_inferior_registers)
16532 (regsets_store_inferior_registers, linux_read_memory)
16533 (linux_write_memory): Inline `inferior_pid'.
16534 (linux_look_up_symbols): Adjust to use per-process
16535 `thread_db_active'.
16536 (linux_request_interrupt): Adjust to use ptids.
16537 (linux_read_auxv): Inline `inferior_pid'.
16538 (initialize_low): Don't reference thread_db_active.
16539 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16540 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16541 (ps_getpid): Return the pid of the current inferior.
16542 * thread-db.c (proc_handle, thread_agent): Delete.
16543 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16545 (find_one_thread): Change argument type to ptid_t. Adjust to
16547 (maybe_attach_thread): Adjust to per-process data and ptids.
16548 (thread_db_find_new_threads): Ditto.
16549 (thread_db_init): Ditto.
16550 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16551 processes table. Adjust to use ptids.
16552 (spu_kill, spu_detach): Adjust interface. Remove process from
16554 (spu_join, spu_thread_alive): Adjust interface.
16555 (spu_wait): Adjust interface. Remove process from processes
16556 table. Adjust to use ptids.
16557 * win32-low.c (current_inferior_tid): Delete.
16558 (current_inferior_ptid): New.
16559 (debug_event_ptid): New.
16560 (thread_rec): Take a ptid. Adjust.
16561 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16562 (child_delete_thread): Ditto.
16563 (do_initial_child_stuff): Add `attached' argument. Add process to
16565 (child_fetch_inferior_registers, child_store_inferior_registers):
16567 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16568 (win32_attach): Pass 1 to do_initial_child_stuff.
16569 (win32_kill): Adjust interface. Remove process from processes
16571 (win32_detach): Ditto.
16572 (win32_join): Adjust interface.
16573 (win32_thread_alive): Take a ptid.
16574 (win32_resume): Adjust to use ptids.
16575 (get_child_debug_event): Ditto.
16576 (win32_wait): Adjust interface. Remove exiting process from
16579 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16581 Non-stop mode support.
16583 * server.h (non_stop): Declare.
16584 (gdb_client_data, handler_func): Declare.
16585 (delete_file_handler, add_file_handler, start_event_loop):
16587 (handle_serial_event, handle_target_event, push_event)
16588 (putpkt_notif): Declare.
16589 * target.h (enum resume_kind): New.
16590 (struct thread_resume): Replace `step' field by `kind' field.
16591 (TARGET_WNOHANG): Define.
16592 (struct target_ops) <wait>: Add `options' argument.
16593 <supports_non_stop, async, start_non_stop>: New fields.
16594 (target_supports_non_stop, target_async): New.
16595 (start_non_stop): Declare.
16596 (mywait): Add `options' argument.
16597 * target.c (mywait): Add `options' argument. Print child exit
16598 notifications here.
16599 (start_non_stop): New.
16600 * server.c (non_stop, own_buf, mem_buf): New globals.
16601 (struct vstop_notif): New.
16602 (notif_queue): New global.
16603 (queue_stop_reply, push_event, discard_queued_stop_replies)
16604 (send_next_stop_reply): New.
16605 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16607 (attach_inferior): In non-stop mode, don't wait for the target
16609 (handle_general_set): Handle QNonStop.
16610 (handle_query): When handling qC, return the current general
16611 thread, instead of the first thread of the list.
16612 (handle_query): If the backend supports non-stop mode, include
16613 QNonStop+ in the qSupported query response.
16614 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16616 (handle_v_attach, handle_v_run): Handle non-stop mode.
16617 (handle_v_stopped): New.
16618 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16619 (myresume): Adjust to use resume_kind. Handle non-stop.
16620 (queue_stop_reply_callback): New.
16621 (handle_status): Handle non-stop mode.
16622 (main): Clear non_stop flag on reconnection. Use the event-loop.
16623 Refactor serial protocol handling from here ...
16624 (process_serial_event): ... to this new function. When GDB
16625 selects any thread, select one here. In non-stop mode, wait until
16626 GDB acks all pending events before exiting.
16627 (handle_serial_event, handle_target_event): New.
16628 * remote-utils.c (remote_open): Install remote_desc in the event
16630 (remote_close): Remove remote_desc from the event loop.
16631 (putpkt_binary): Rename to...
16632 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16633 (putpkt_binary): New as wrapper around putpkt_binary_1.
16634 (putpkt_notif): New.
16635 (prepare_resume_reply): In non-stop mode, don't change the
16637 * event-loop.c: New.
16638 * Makefile.in (OBJ): Add event-loop.o.
16639 (event-loop.o): New rule.
16641 * linux-low.h (pid_of): Moved here.
16643 (get_lwp_thread): Use lwpid_of.
16644 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16645 * linux-low.c (pid_of): Delete.
16646 (inferior_pid): Use lwpid_of.
16647 (linux_event_pipe): New.
16648 (target_is_async_p): New.
16650 (handle_extended_wait): Use lwpid_of.
16651 (add_lwp): Don't set lwpid field.
16652 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16653 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16654 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16655 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16656 first. Adjust to linux_wait_for_event interface changes. Use
16658 (linux_detach): Don't delete the main lwp here.
16659 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16660 (status_pending_p): Don't consider explicitly suspended lwps.
16661 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16662 pointer. Add OPTIONS argument. Change return type to int. Use
16663 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16664 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16665 pointer. Add status pointer argument. Return a pid instead of a
16666 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16667 changes. In non-stop mode, don't switch to a random thread.
16668 (linux_wait): Rename to...
16669 (linux_wait_1): ... this. Add target_options argument, and handle
16670 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16671 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16672 clean exit and signal exit code. Don't stop all threads in
16673 non-stop mode. In all-stop mode, only stop all threads when
16674 reporting a stop to GDB. Handle explicit thread stop requests.
16675 (async_file_flush, async_file_mark): New.
16677 (send_sigstop): Use lwpid_of.
16678 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16679 interface changes. In non-stop mode, don't switch to a random
16681 (linux_resume_one_lwp): Use lwpid_of.
16682 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16683 (linux_resume_one_thread): ... this. Handle resume_stop. In
16684 non-stop mode, don't look for pending flag in all threads.
16685 (resume_status_pending_p): Don't consider explicitly suspended
16687 (my_waitpid): Reimplement. Emulate __WALL.
16688 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16690 (sigchld_handler, linux_supports_non_stop, linux_async)
16691 (linux_start_non_stop): New.
16692 (linux_target_ops): Register linux_supports_non_stop, linux_async
16693 and linux_start_non_stop.
16694 (initialize_low): Install SIGCHLD handler.
16695 * thread-db.c (thread_db_create_event, find_one_thread)
16696 (thread_db_get_tls_address): Use lwpid_of.
16697 * win32-low.c (win32_detach): Adjust to use resume_kind.
16698 (win32_wait): Add `options' argument.
16699 * spu-low.c (spu_resume): Adjust to use resume_kind.
16700 (spu_wait): Add `options' argument.
16702 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16704 Decouple target code from remote protocol.
16706 * target.h (enum target_waitkind): New.
16707 (struct target_waitstatus): New.
16708 (struct target_ops) <wait>: Return an unsigned long. Take a
16709 target_waitstatus pointer instead of a char pointer.
16710 (mywait): Likewise.
16711 * target.c (mywait): Change prototype to return an unsigned long.
16712 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16713 * server.h (thread_from_wait, old_thread_from_wait): Delete
16715 (prepare_resume_reply): Change prototype to take a
16717 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16718 (last_status, last_ptid): New.
16719 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16720 pid instead of a signal.
16721 (attach_inferior): Remove "status" and "signal" parameters.
16723 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16725 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16726 (handle_v_requests, myresume): Remove "status" and "signal"
16727 parameters. Adjust.
16728 (handle_status): New.
16729 (main): Delete local `status'. Adjust.
16730 * remote-utils.c: Include target.h.
16731 (prepare_resume_reply): Change prototype to take a
16732 target_waitstatus. Adjust.
16734 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16736 * spu-low.c (spu_wait): Adjust.
16737 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16739 (win32_wait): Adjust.
16741 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16743 * target.h (struct thread_resume): Delete leave_stopped member.
16744 (struct target_ops): Add a `n' argument to the `resume' callback.
16745 * server.c (start_inferior): Adjust.
16746 (handle_v_cont, myresume): Adjust.
16747 * linux-low.c (check_removed_breakpoint): Adjust to resume
16748 interface change, and to removed leave_stopped field.
16749 (resume_ptr): Delete.
16750 (struct thread_resume_array): New.
16751 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16752 resume interface change.
16753 (linux_continue_one_thread, linux_queue_one_thread)
16754 (resume_status_pending_p): Check if the resume field is NULL
16755 instead of checking the leave_stopped member.
16756 (linux_resume): Adjust to the target resume interface change.
16757 * spu-low.c (spu_resume): Adjust to the target resume interface
16759 * win32-low.c (win32_detach, win32_resume): Ditto.
16761 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16763 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16765 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16767 (linux_continue_one_thread): Only preserve the stepping flag if
16768 there's a pending breakpoint.
16770 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16772 * server.c (main): After the inferior having exited, call
16773 remote_close before exiting gdbserver.
16775 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16777 Fix size of FPSCR in Power 7 processors.
16778 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16779 (PPC_FEATURE_HAS_DFP): New #define.
16780 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16783 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16785 * server.c (handle_query) Whitespace and formatting.
16787 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16789 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16790 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16791 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16792 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16793 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16794 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16795 Makefile.in, configure.ac: Fix whitespace throughout.
16796 * configure: Regenerate.
16798 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16800 * inferiors.c (find_inferior): Make it safe for the callback
16801 function to delete the currently iterated inferior.
16803 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16805 * Makefile.in (linuw_low_h): Move higher.
16806 (thread-db.o): Depend on $(linux_low_h).
16808 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16810 Rename "process" to "lwp" throughout.
16812 * linux-low.c (all_processes): Rename to...
16813 (all_lwps): ... this.
16814 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16815 (add_process): Rename to ...
16816 (add_lwp): ... this. Adjust.
16817 (linux_create_inferior): Adjust.
16818 (linux_attach_lwp): Adjust.
16819 (linux_attach): Adjust.
16820 (linux_kill_one_process): Rename to ...
16821 (linux_kill_one_lwp): ... this. Adjust.
16822 (linux_kill): Adjust.
16823 (linux_detach_one_process): Rename to ...
16824 (linux_detach_one_lwp): ... this. Adjust.
16825 (linux_detach): Adjust.
16826 (check_removed_breakpoint): Adjust.
16827 (status_pending_p): Adjust.
16828 (linux_wait_for_process): Rename to ...
16829 (linux_wait_for_lwp): ... this. Adjust.
16830 (linux_wait_for_event): Adjust.
16831 (send_sigstop): Adjust.
16832 (wait_for_sigstop): Adjust.
16833 (stop_all_processes): Rename to ...
16834 (stop_all_lwps): ... this.
16835 (linux_resume_one_process): Rename to ...
16836 (linux_resume_one_lwp): ... this. Adjust.
16837 (linux_set_resume_request, linux_continue_one_thread)
16838 (linux_queue_one_thread, resume_status_pending_p)
16839 (usr_store_inferior_registers, regsets_store_inferior_registers)
16840 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16842 * linux-low.h (get_process): Rename to ...
16843 (get_lwp): ... this. Adjust.
16844 (get_thread_process): Rename to ...
16845 (get_thread_lwp): ... this. Adjust.
16846 (get_process_thread): Rename to ...
16847 (get_lwp_thread): ... this. Adjust.
16848 (struct process_info): Rename to ...
16849 (struct lwp_info): ... this.
16850 (all_processes): Rename to ...
16851 (all_lwps): ... this.
16852 * proc-service.c (ps_lgetregs): Adjust.
16853 * thread-db.c (thread_db_create_event, find_one_thread)
16854 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16856 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16858 * server.c (handle_query): Handle "qAttached".
16860 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16862 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16863 GPLv3, update license URL.
16865 2009-03-01 Doug Evans <dje@google.com>
16867 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16868 (server_h): Add gdb_signals.h.
16869 (signals.o): Update.
16870 * server.h (target_signal_from_host,target_signal_to_host_p)
16871 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16873 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16875 * remote-utils.c (getpkt): Also generate remote-debug
16876 information if noack_mode is set.
16878 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16880 * server.c (handle_query): Report qXfer:siginfo:read and
16881 qXfer:siginfo:write as supported and handle them.
16882 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16883 * linux-low.c (linux_xfer_siginfo): New.
16884 (linux_target_ops): Set it.
16886 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16888 * server.c (gdbserver_usage): Mention --remote-debug.
16889 (main): Accept '--remote-debug' switch.
16891 2009-01-18 Doug Evans <dje@google.com>
16893 * regcache.c (new_register_cache): No need to check result of xcalloc.
16894 * server.c (handle_search_memory): Back out calls to xmalloc,
16895 result is checked and error is returned to user upon failure.
16896 (handle_query): Ditto. Add more checks for result of malloc.
16897 (handle_v_cont): Check result of malloc, report error back to
16899 (handle_v_run): Ditto. Call freeargv.
16900 * server.h (freeargv): Declare.
16901 * utils.c (freeargv): New fn.
16903 2009-01-15 Doug Evans <dje@google.com>
16905 * gdbreplay.c (perror_with_name): Make arg const char *.
16906 * server.h (target_signal_to_name): Make return type const char *.
16907 * thread-db.c (thread_db_err_str): Make return type const char *.
16908 * utils.c (perror_with_name): Make arg const char *.
16910 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16912 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16913 when handling a EXIT_PROCESS_DEBUG_EVENT.
16915 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16917 * gdbreplay.c (gdbreplay_version): Update copyright year.
16918 * server.c (gdbserver_version): Likewise.
16920 2009-01-05 Doug Evans <dje@google.com>
16922 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16923 (handle_extended_wait): Improve comment.
16925 2008-12-13 Doug Evans <dje@google.com>
16927 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16928 * server.h (ATTR_MALLOC): New macro.
16929 (xmalloc,xcalloc,xstrdup): Declare.
16930 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16931 * inferiors.c: Ditto.
16932 * linux-low.c: Ditto.
16933 * mem-break.c: Ditto.
16934 * regcache.c: Ditto.
16935 * remote-utils.c: Ditto.
16938 * win32-low.c: Ditto.
16940 2008-12-12 Doug Evans <dje@google.com>
16942 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16943 in debugging printf.
16945 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16947 2008-12-09 Doug Evans <dje@google.com>
16949 * linux-low.h (struct process_info): Delete member tid, unused.
16950 * thread-db.c (find_one_thread): Update.
16951 (maybe_attach_thread): Update.
16953 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16955 * target.h (struct target_ops): Add qxfer_osdata member.
16956 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16958 (linux_qxfer_osdata): New functions.
16959 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16961 * server.c (handle_query): Handle "qXfer:osdata:read:".
16962 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16963 (buffer_xml_printf): New functions.
16964 * server.h (struct buffer): New.
16965 (buffer_grow_str, buffer_grow_str0): New macros.
16966 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16967 (buffer_xml_printf): Declare.
16969 2008-11-24 Doug Evans <dje@google.com>
16971 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16973 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16975 * server.c (handle_v_run): Always use the supplied argument list.
16977 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16979 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16980 (xtensa_regmap_table): Add entry for scompare1.
16982 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16984 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16985 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16986 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16987 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16988 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16989 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16990 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16991 XML target descriptions.
16992 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16993 when inferior is running on an ISA 2.05 or later processor. Add
16994 special case to return offset for full 64-bit slot of FPSCR when
16997 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16999 * Makefile.in (SFILES, clean): Added sparc64 files.
17000 (reg-sparc64.o, reg-sparc64.c): New.
17001 * configure.srv (sparc*-*-linux*): New configuration.
17002 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17003 syscall arguments for SPARC.
17004 (regsets_store_inferior_registers): Likewise.
17005 * linux-sparc-low.c: New file.
17007 2008-10-21 Doug Evans <dje@google.com>
17009 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17010 (READLINE_DIR,READLINE_DEP): Delete.
17011 (INTERNAL_CFLAGS): Update.
17012 (LINTFLAGS): Update.
17014 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17016 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17017 whole argv from the last run, not just argv[0].
17019 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17021 * regcache.c (new_register_cache): Return NULL if the register
17022 cache size isn't known yet.
17023 (free_register_cache): Avoid dereferencing a NULL regcache.
17025 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17027 * configure.srv: Merge MIPS and MIPS64.
17029 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17031 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17033 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17035 * Makefile.in: Add required vsx dependencies.
17037 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17038 Declare init_registers_powerpc_vsx32l.
17039 Declare init_registers_powerpc_vsx64l.
17040 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17041 (ppc_arch_setup): Check for VSX in hwcap.
17042 (ppc_fill_vsxregset): New function.
17043 (ppc_store_vsxregset): New function.
17044 Add new VSX entry in regset_info target_regsets.
17046 * configure.srv: Add new VSX dependencies.
17048 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17050 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17051 (remote_open): Set or clear transport_is_reliable.
17052 (putpkt_binary): Don't expect acks in noack mode.
17053 (getpkt): Don't send ack/nac in noack mode.
17054 * server.c (handle_general_set): Handle QStartNoAckMode.
17055 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17057 (main): Reset noack_mode on every connection.
17058 * server.h (noack_mode): Declare.
17060 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17062 * Makefile.in (GDBREPLAY_OBS): New variable.
17063 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17065 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17066 Daniel Jacobowitz <dan@codesourcery.com>
17068 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17069 (usr_store_inferior_registers): Likewise.
17070 (regsets_store_inferior_registers): Likewise.
17072 2008-07-31 Rolf Jansen <rj@surtec.com>
17073 Pedro Alves <pedro@codesourcery.com>
17075 * configure.ac: Check for memmem declaration.
17076 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17077 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17078 (disable_packet_qfThreadInfo): Unconditionally compile.
17079 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17080 * configure, config.in: Regenerate.
17082 2008-07-28 Doug Kwan <dougkwan@google.com>
17084 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17085 (linux_write_memory): Remove declaration of errno.
17087 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17089 * linux-low.c (handle_extended_wait): Do not use "status"
17090 variable uninitialized.
17092 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17094 * server.c (handle_v_attach): Inhibit reporting dll changes.
17096 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17098 * remote-utils.c (prepare_resume_reply): If requested, don't
17099 output "thread:TID" in the T stop reply.
17101 * server.c (disable_packet_vCont, disable_packet_Tthread)
17102 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17103 (handle_query): If requested, disable support for qC, qfThreadInfo
17105 (handle_v_requests): If requested, disable support for vCont.
17106 (gdbserver_show_disableable): New.
17107 (main): Handle --disable-packet and --disable-packet=LIST.
17109 * server.h (disable_packet_vCont, disable_packet_Tthread)
17110 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17112 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17114 * server.c (gdbserver_usage): Mention --version.
17116 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17118 * Makefile.in (gdbreplay.o): New rule.
17120 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17122 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17123 message, not gdbserver.
17125 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17126 Nathan Sidwell <nathan@codesourcery.com>
17127 Joseph Myers <joseph@codesourcery.com>
17129 * acinclude.m4: Include ../../config/acx.m4.
17130 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17131 * configure, config.in: Regenerate.
17132 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17133 * server.c (gdbserver_version): Print PKGVERSION.
17134 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17135 (main): Adjust gdbserver_usage calls.
17136 * gdbreplay.c (version, host_name): Add declarations.
17137 (gdbreplay_version, gdbreplay_usage): New.
17138 (main): Accept --version and --help options.
17140 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17142 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17143 (arm_breakpoint_at): Handle Thumb.
17144 (the_low_target): Add comment.
17146 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17148 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17150 2008-05-09 Doug Evans <dje@google.com>
17152 * server.h (decode_search_memory_packet): Declare.
17153 * remote-utils.c (decode_search_memory_packet): New fn.
17154 * server.c (handle_search_memory_1): New fn.
17155 (handle_search_memory): New fn.
17156 (handle_query): Process qSearch:memory packets.
17158 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17160 * regcache.c (registers_length): Remove.
17161 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17162 full register packet.
17163 * regcache.h (registers_length): Remove prototype.
17164 * server.h (PBUFSIZ): Define to 16384.
17166 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17168 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17169 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17170 powerpc-64l.o, and powerpc-altivec64l.o.
17171 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17172 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17173 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17174 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17175 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17178 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17179 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17180 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17181 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17182 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17183 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17184 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17185 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17186 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17187 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17190 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17191 (init_registers_powerpc_32l): ... this new prototype.
17192 (init_registers_powerpc_32): Remove, replace by ...
17193 (init_registers_powerpc_altivec32l): ... this new prototype.
17194 (init_registers_powerpc_e500): Remove, replace by ...
17195 (init_registers_powerpc_e500l): ... this new prototype.
17196 (init_registers_ppc64): Remove, replace by ...
17197 (init_registers_powerpc_64l): ... this new prototype.
17198 (init_registers_powerpc_64): Remove, replace by ...
17199 (init_registers_powerpc_altivec64l): ... this new prototype.
17200 (ppc_num_regs): Set to 73.
17201 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17202 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17203 (ppc_cannot_store_register): Handle orig_r3 and trap.
17204 (ppc_arch_setup): Update init_registers_... calls.
17205 (ppc_fill_gregset): Handle orig_r3 and trap.
17207 * inferiors.c (clear_inferiors): Reset current_inferior.
17209 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17211 * acinclude.m4: Add override.m4.
17212 * configure: Regenerate.
17214 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17216 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17217 initial call to init_register_ppc64.
17219 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17221 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17222 single powerpc*-*-linux* case.
17223 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17225 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17227 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17228 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17230 * linux-ppc-low.c: Include <elf.h>.
17231 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17232 (ppc_hwcap): New global variable.
17233 (ppc_regmap): Remove __SPE__ #ifdef sections.
17234 (ppc_regmap_e500): New global variable.
17235 (ppc_cannot_store_register): Update __SPE__ special case.
17236 (ppc_get_hwcap): New function.
17237 (ppc_arch_setup): Use it to determine whether inferior supports
17238 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17239 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17240 Do not access registers if target does not support AltiVec.
17241 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17242 Do not access registers if target does not support SPE.
17243 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17245 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17247 * linux-low.c (disabled_regsets, num_regsets): New.
17248 (use_regsets_p): Delete.
17249 (linux_wait_for_process): Clear disabled_regsets.
17250 (regsets_fetch_inferior_registers): Check and set it.
17251 (regsets_store_inferior_registers): Likewise.
17252 (linux_fetch_registers, linux_store_registers): Do not use
17254 (initialize_low): Allocate disabled_regsets.
17256 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17258 * Makefile.in (LIBOBJS): New.
17259 (OBS): Use LIBOBJS.
17260 (memmem.o): New rule.
17261 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17262 * configure: Regenerated.
17264 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17266 * server.c (handle_query): Never return "unsupported" for
17267 qXfer:features:read queries.
17269 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17271 * server.c (get_features_xml): Fix inverted condition.
17272 (handle_query): Always support qXfer:feature:read.
17274 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17276 * server.c (wrapper_argv): New.
17277 (start_inferior): Handle wrapper_argv. If set, expect an extra
17279 (gdbserver_usage): Document --wrapper.
17280 (main): Parse --wrapper.
17282 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17284 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17285 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17286 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17287 (ppc_set_pc): Likewise.
17288 (ppc_arch_setup): New function.
17289 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17290 of collect_register.
17291 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17293 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17295 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17296 instead of linux-ppc64-low.o.
17297 * linux-ppc64-low.c: Remove file.
17298 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17299 (linux-ppc64-low.o): Remove rule.
17301 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17302 (init_registers_powerpc_64): Likewise.
17303 (ppc_regmap): Conditionally define depending on __powerpc64__.
17304 (ppc_cannot_store_register): Do not special-case "fpscr" when
17305 compiled on __powerpc64__.
17306 (ppc_collect_ptrace_register): New function.
17307 (ppc_supply_ptrace_register): New function.
17308 (ppc_breakpoint): Change type to "unsigned int".
17309 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17310 (the_low_target): Conditionally provide initializers for the
17311 arch_setup member depending on __powerpc64__. Install
17312 collect_ptrace_register and supply_ptrace_register members.
17314 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17316 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17317 * server.c (gdbserver_xmltarget): Define.
17318 (get_features_xml): Use it to replace "target.xml" and arch_string.
17320 * configure.srv: Remove srv_xmltarget. Add XML files that were
17321 mentioned there to srv_xmlfiles instead. Remove conditional tests
17322 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17323 srv_xmlfiles and srv_regobj to include all possible choices.
17324 * configure.ac (srv_xmltarget): Remove.
17325 (srv_xmlfiles): Do not add "target.xml".
17326 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17327 checks for supplementary target information.
17328 * configure: Regenerate.
17329 * Makefile.in (XML_TARGET): Remove.
17330 (target.xml): Remove rule.
17331 (clean): Do not clean up target.xml.
17332 (.PRECIOUS): Do not mention target.xml.
17334 * target.h (struct target_ops): Remove arch_string member.
17335 * linux-low.c (linux_arch_string): Remove.
17336 (linux_target_ops): Remove arch_string initializer.
17337 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17338 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17339 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17340 * spu-low.c (spu_arch_string): Remove.
17341 (spu_target_ops): Remove arch_string initializer.
17342 * win32-low.c (win32_arch_string): Remove.
17343 (win32_target_ops): Remove arch_string initializer.
17344 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17345 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17346 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17348 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17350 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17351 by collect_ptrace_register and supply_ptrace_register hooks.
17352 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17353 instead of checking for the_low_target.left_pad_xfer.
17354 (usr_store_inferior_registers): Use collect_ptrace_register callback
17355 instead of checking for the_low_target.left_pad_xfer.
17357 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17358 (s390_supply_ptrace_register): Likewise.
17359 (s390_fill_gregset): Call s390_collect_ptrace_register.
17360 (the_low_target): Update.
17362 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17363 (ppc_supply_ptrace_register): Likewise.
17364 (the_low_target): Update.
17366 * linux-i386-low.c (the_low_target): Update.
17367 * linux-x86-64-low.c (the_low_target): Update.
17369 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17371 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17372 reg-s390.o and reg-s390x.o.
17374 * linux-low.c (new_inferior): New global variable.
17375 (linux_create_inferior, linux_attach): Set it.
17376 (linux_wait_for_process): Call the_low_target.arch_setup after the
17377 target has stopped for the first time.
17378 (initialize_low): Do not call the_low_target.arch_setup.
17380 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17381 (s390_set_pc): Likewise.
17382 (s390_arch_setup): New function.
17383 (the_low_target): Use s390_arch_setup as arch_setup routine.
17385 * regcache.c (realloc_register_cache): New function.
17386 (set_register_cache): Call it for each existing regcache.
17388 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17390 * server.h (init_registers): Remove prototype.
17392 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17393 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17394 instead of init_registers ().
17395 * linux-arm-low.c (init_registers_arm): Add prototype.
17396 (init_registers_arm_with_iwmmxt): Likewise.
17397 (the_low_target): Add initializer for arch_setup field.
17398 * linux-cris-low.c (init_registers_cris): Add prototype.
17399 (the_low_target): Add initializer for arch_setup field.
17400 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17401 (the_low_target): Add initializer for arch_setup field.
17402 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17403 (the_low_target): Add initializer for arch_setup field.
17404 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17405 (the_low_target): Add initializer for arch_setup field.
17406 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17407 (the_low_target): Add initializer for arch_setup field.
17408 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17409 (the_low_target): Add initializer for arch_setup field.
17410 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17411 (init_registers_mips64_linux): Likewise.
17412 (the_low_target): Add initializer for arch_setup field.
17413 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17414 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17415 (the_low_target): Add initializer for arch_setup field.
17416 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17417 (init_registers_powerpc_64): Likewise.
17418 (the_low_target): Add initializer for arch_setup field.
17419 * linux-s390-low.c (init_registers_s390): Add prototype.
17420 (init_registers_s390x): Likewise.
17421 (the_low_target): Add initializer for arch_setup field.
17422 * linux-sh-low.c (init_registers_sh): Add prototype.
17423 (the_low_target): Add initializer for arch_setup field.
17424 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17425 (the_low_target): Add initializer for arch_setup field.
17426 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17427 (the_low_target): Add initializer for arch_setup field.
17429 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17430 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17431 instead of init_registers ().
17432 * win32-arm-low.c (init_registers_arm): Add prototype.
17433 (the_low_target): Add initializer for arch_setup field.
17434 * win32-i386-low.c (init_registers_i386): Add prototype.
17435 (the_low_target): Add initializer for arch_setup field.
17437 * spu-low.c (init_registers_spu): Add prototype.
17438 (initialize_low): Call initialie_registers_spu () instead of
17439 initialize_registers ().
17441 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17443 * server.c (handle_v_requests): When handling the vRun and vAttach
17444 packets, if already debugging a process, don't kill it. Return an
17447 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17449 * server.c (handle_query): Correct length check.
17451 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17453 * win32-low.c (do_initial_child_stuff): Add process handle
17454 parameter. Set current_process_handle and current_process_id from the
17455 parameters. Clear globals.
17456 (win32_create_inferior): Don't set current_process_handle and
17457 current_process_id here. Instead pass them on the call to
17458 do_initial_child_stuff.
17459 (win32_attach): Likewise.
17460 (win32_clear_inferiors): New.
17461 (win32_kill): Don't close the current process handle or the
17462 current thread handle here. Instead call win32_clear_inferiors.
17463 (win32_detach): Don't open a new handle to the process. Call
17464 win32_clear_inferiors.
17465 (win32_join): Don't rely on current_process_handle; open a new
17466 handle using the process id.
17467 (win32_wait): Call win32_clear_inferiors when the inferior process
17470 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17472 * server.c (monitor_show_help): Add "exit".
17474 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17476 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17477 (clean): Add reg-xtensa.c.
17478 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17479 * configure.srv (xtensa*-*-linux*) New target.
17480 * linux-xtensa-low.c: New.
17481 * xtensa-xtregs.c: New.
17483 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17485 * hostio.c: Don't include errno.h.
17486 (errno_to_fileio_errno): Move to hostio-errno.
17487 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17488 error number outputting to the target->hostio_last_error callback.
17489 (hostio_packet_error): Use FILEIO_EINVAL directly.
17490 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17491 calls to hostio_error.
17492 * hostio-errno.c: New.
17493 * server.h (hostio_last_error_from_errno): Declare.
17494 * target.h (target_ops): Add hostio_last_error member.
17495 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17496 as hostio_last_error handler.
17497 * spu-low.c (spu_target_ops): Likewise.
17498 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17499 (wince_hostio_last_error): New functions.
17500 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17501 as hostio_last_error handler.
17502 (win32_target_ops) [!_WIN32_WCE]: Register
17503 hostio_last_error_from_errno as hostio_last_error handler.
17504 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17505 (hostio-errno.o): New rule.
17506 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17507 * configure.srv (srv_hostio_err_objs): New variable. Default to
17509 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17510 * configure: Regenerate.
17512 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17514 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17515 (linux_kill, linux_detach): Clean up the process list.
17516 * remote-utils.c (remote_open): Improve port number parsing.
17517 (putpkt_binary, input_interrupt): Only send interrupts if the target
17519 * server.c (extended_protocol): Make static.
17520 (attached): Define earlier.
17521 (exit_requested, response_needed, program_argv): New variables.
17522 (target_running): New.
17523 (start_inferior): Clear attached here.
17524 (attach_inferior): Set attached here.
17525 (require_running): Define.
17526 (handle_query): Use require_running and target_running. Implement
17528 (handle_v_attach, handle_v_run): New.
17529 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17530 (gdbserver_usage): Update.
17531 (main): Redo argument parsing. Handle --debug and --multi. Handle
17532 --attach along with other options or after the port. Save
17533 program_argv. Support no initial program. Resynchronize
17534 communication with GDB after an error. Handle "monitor exit".
17535 Use require_running and target_running. Always allow the extended
17536 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17537 restart in extended mode.
17538 * README: Refer to the GDB manual. Update --attach usage.
17540 2007-12-20 Andreas Schwab <schwab@suse.de>
17542 * linux-low.c (STACK_SIZE): Define.
17543 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17544 (linux_test_for_tracefork): Likewise.
17546 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17548 * linux-low.c (linux_wait_for_event): Update messages. Do not
17549 reinsert auto-delete breakpoints.
17550 * mem-break.c (struct breakpoint): Change return type of handler to
17552 (set_breakpoint_at): Update handler type.
17553 (reinsert_breakpoint_handler): Return 1 instead of calling
17555 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17557 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17558 * mem-break.h (set_breakpoint_at): Update handler type.
17559 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17560 * win32-low.c (auto_delete_breakpoint): New.
17561 (get_child_debug_event): Use it.
17563 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17565 * configure.ac: Check for pread and pwrite.
17566 * hostio.c (handle_pread): Fall back to lseek and read.
17567 (handle_pwrite): Fall back to lseek and write.
17568 * config.in, configure: Regenerated.
17570 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17572 * server.c (myresume): Add own_buf argument.
17573 (main): Update calls.
17575 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17577 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17578 * remote-utils.c (remote_open): Do not call disable_async_io.
17579 (block_async_io): Delete.
17580 (unblock_async_io): Make static.
17581 (initialize_async_io): New.
17582 * server.c (handle_v_cont): Handle async I/O here.
17583 (myresume): Likewise. Move other common resume tasks here...
17584 (main): ... from here. Call initialize_async_io. Disable async
17585 I/O before the main loop.
17586 * server.h (initialize_async_io): Declare.
17587 (block_async_io, unblock_async_io): Delete prototypes.
17588 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17590 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17592 * remote-utils.c (readchar): Allow binary data in received messages.
17594 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17596 * win32-low.c (attaching): New global.
17597 (win32_create_inferior): Clear the `attaching' global.
17598 (win32_attach): Set the `attaching' global.
17599 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17600 attaching. Only set a breakpoint at the entry point if not
17603 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17605 * server.c (main): Don't report dll events on the initial
17606 connection on attaches.
17608 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17610 * server.c (main): Relax numerical bases supported for the pid of
17611 the --attach command line argument.
17613 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17615 * win32-low.c (win32_attach): Call OpenProcess before
17616 DebugActiveProcess, not after. Add last error output to error
17619 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17621 * win32-low.c (win32_get_thread_context)
17622 (win32_set_thread_context): New functions.
17623 (thread_rec): Use win32_get_thread_context.
17624 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17625 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17628 2007-12-03 Leo Zayas
17629 Pedro Alves <pedro_alves@portugalmail.pt>
17631 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17633 (child_add_thread): Minor cleanup.
17634 (child_continue): Resume artificially suspended threads before
17635 calling ContinueDebugEvent.
17636 (suspend_one_thread): New.
17637 (fake_breakpoint_event): New.
17638 (get_child_debug_event): Change return type to int. Check here if
17639 gdb sent an interrupt request. If a soft interrupt was requested,
17640 fake a breakpoint event. Return 0 if there is no event to handle,
17642 (win32_wait): Don't check here if gdb sent an interrupt request.
17643 Ensure there is a valid event to handle.
17644 (win32_request_interrupt): Add soft interruption method as last
17647 2007-12-03 Leo Zayas
17648 Pedro Alves <pedro_alves@portugalmail.pt>
17650 * win32-low.h (win32_thread_info): Add descriptions to the
17651 structure members. Replace `suspend_count' counter by a
17653 * win32-low.c (thread_rec): Update condition of when to get the
17654 context from the inferior. Rely on ContextFlags being set if it
17655 has already been retrieved. Only suspend the inferior thread if
17656 we haven't already. Warn if that fails.
17657 (continue_one_thread): s/suspend_count/suspended/. Only call
17658 ResumeThread once. Warn if that fails.
17660 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17662 * win32-low.c (win32_wait): Don't read from the inferior when it
17663 has already exited.
17665 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17667 * Makefile.in (win32_low_h): New variable.
17668 (win32-low.o): Add dependency on $(win32_low_h).
17669 (win32-arm-low.o, win32-i386-low.o): New rules.
17671 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17673 * hostio.c: Correct copyright year.
17675 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17677 * Makefile.in (OBS): Add hostio.o.
17678 (hostio.o): New rule.
17679 * server.h (handle_vFile): Declare.
17680 * hostio.c: New file.
17681 * server.c (handle_v_requests): Take packet_len and new_packet_len
17682 for binary packets. Call handle_vFile.
17683 (main): Update call to handle_v_requests.
17685 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17687 * linux-low.c: Include <sched.h>.
17689 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17691 * linux-low.c (linux_tracefork_grandchild): New.
17692 (linux_tracefork_child): Use clone.
17693 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17695 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17697 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17699 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17701 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17703 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17705 * inferiors.c (change_inferior_id): Delete.
17706 (add_pid_to_list, pull_pid_from_list): New.
17707 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17708 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17709 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17710 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17711 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17712 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17713 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17714 (using_threads): Always set to 1.
17715 (handle_extended_wait): New.
17716 (add_process): Do not set TID.
17717 (linux_create_inferior): Set must_set_ptrace_flags.
17718 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17719 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17720 (linux_thread_alive): Rename TID argument to LWPID.
17721 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17722 (linux_wait_for_event): Do not use TID or check using_threads. Update
17723 call to dead_thread_notify. Call handle_extended_wait.
17724 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17725 (send_sigstop): Delete sigstop_sent.
17726 (wait_for_sigstop): Avoid TID.
17727 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17728 (linux_test_for_tracefork): New.
17729 (linux_lookup_signals): Use thread_db_active and
17730 linux_supports_tracefork_flag.
17731 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17732 * linux-low.h (get_process_thread): Avoid TID.
17733 (struct process_ifo): Move thread_known and tid to the end. Remove
17735 (linux_attach_lwp, thread_db_init): Update prototypes.
17736 * server.h (change_inferior_id): Delete prototype.
17737 (add_pid_to_list, pull_pid_from_list): New prototypes.
17738 * thread-db.c (thread_db_use_events): New.
17739 (find_first_thread): Rename to...
17740 (find_one_thread): ...this. Update callers and messages. Do not
17741 call fatal. Check thread_db_use_events. Do not call
17742 change_inferior_id or new_thread_notify.
17743 (maybe_attach_thread): Update. Do not call new_thread_notify.
17744 (thread_db_init): Set thread_db_use_events. Check use_events.
17745 * utils.c (fatal, warning): Correct message prefix.
17747 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17749 * Makefile.in (clean): Remove new files.
17750 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17751 (powerpc-64.o, powerpc-64.c): New rules.
17752 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17753 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17755 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17757 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17758 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17759 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17760 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17761 (target_regsets): Add AltiVec and SPE register sets.
17762 * configure.ac: Check for AltiVec and SPE.
17763 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17764 (ppc_fill_vrregset, ppc_store_vrregset): New.
17765 (target_regsets): Add AltiVec register set.
17766 * configure: Regenerated.
17768 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17770 * linux-low.c (O_LARGEFILE): Define.
17771 (linux_read_memory): Use /proc/PID/mem.
17772 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17773 * configure, config.in: Regenerated.
17775 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17777 * linux-low.c (linux_wait_for_event): Do not pass signals while
17780 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17782 * win32-low.c (create_process): New.
17783 (win32_create_inferior): Use create_process instead of
17784 CreateProcess. If create_process failed retry appending an ".exe"
17785 suffix. Store the GetLastError result immediatelly after
17786 create_process calls and use it on the call to error.
17788 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17790 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17792 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17794 * configure.ac: Switch license to GPLv3.
17796 2007-08-01 Michael Snyder <msnyder@access-company.com>
17798 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17800 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17802 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17804 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17805 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17806 CloseToolhelp32Snapshot.
17807 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17808 CloseToolhelp32Snapshot.
17810 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17812 * server.c (main): Check for inferior exit before main loop.
17814 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17816 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17817 instead of on tmp_desc.
17819 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17820 Daniel Jacobowitz <dan@codesourcery.com>
17822 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17823 (add_thread): Minor cleanups.
17824 (clear_inferiors): Move lower in the file. Clear the DLL
17826 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17827 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17828 (xml_escape_text): New.
17829 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17831 (handle_v_cont): Report errors.
17832 (gdbserver_version): Update.
17833 (main): Correct size of own_buf. Do not report initial DLL events.
17834 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17835 (unloaded_dll, xml_escape_text): New.
17836 * win32-low.c (enum target_waitkind): Update comments.
17837 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17838 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17839 (win32_EnumProcessModules, win32_GetModuleInformation)
17840 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17841 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17842 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17843 (win32_Module32First, win32_Module32Next, load_toolhelp)
17844 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17845 (get_child_debug_event): Handle DLL events.
17846 (win32_wait): Likewise.
17848 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17850 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17851 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17853 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17855 * win32-low.c (handle_output_debug_string): Ignore event if not
17858 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17860 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17862 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17864 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17866 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17868 * inferiors.c (change_inferior_id): Add comment.
17869 * linux-low.c (check_removed_breakpoint): Add an early
17870 prototype. Improve debug output.
17871 (linux_attach): Doc update.
17872 (linux_detach_one_process, linux_detach): Clean up before releasing
17874 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17875 * linux-low.h (struct process_info): Doc improvement.
17876 * mem-break.c (delete_all_breakpoints): New.
17877 * mem-break.h (delete_all_breakpoints): New prototype.
17878 * thread-db.c (find_first_thread): New.
17879 (thread_db_create_event): Call it instead of
17880 thread_db_find_new_threads. Clean up unused variables.
17881 (maybe_attach_thread): Remove first thread handling.
17882 (thread_db_find_new_threads): Use find_first_thread.
17883 (thread_db_get_tls_address): Likewise.
17885 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17887 * thread-db.c (thread_db_find_new_threads): Add prototype.
17888 (thread_db_create_event): Check for the main thread before adding
17890 (maybe_attach_thread): Only enable event reporting if TID == 0.
17891 (thread_db_get_tls_address): Check for new threads.
17893 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17895 * linux-low.c (linux_create_inferior): Try execv before execvp.
17896 * spu-low.c (spu_create_inferior): Likewise.
17898 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17900 * linux-low.c (linux_create_inferior): Change execv to execvp.
17901 * spu-low.c (spu_create_inferior): Likewies.
17903 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17905 * Makefile.in (clean): Clean new files instead of deleted ones.
17906 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17907 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17909 * configure.srv: Specify XML files and new regformats for MIPS and
17911 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17912 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17913 an entry for the restart register.
17914 (mips_cannot_fetch_register, mips_cannot_store_register)
17915 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17916 register names to match the XML descriptions.
17917 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17918 restart register instead of $0.
17920 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17921 Markus Deuling <deuling@de.ibm.com>
17923 * remote-utils.c (decode_xfer_write): New function.
17924 * server.h (decode_xfer_write): Add prototype.
17925 * server.c (handle_query): Add PACKET_LEN argument. Support
17926 qXfer:spu:read and qXfer:spu:write packets.
17927 (main): Pass packet_len to handle_query.
17928 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17929 * target.h (target_ops): Add qxfer_spu.
17931 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17933 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17934 accessing non-seekable spufs files.
17936 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17938 * server.c (handle_query): Add reply for qC packet.
17940 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17941 Leo Zayas <lerele@champenstudios@com>
17943 * server.h (check_remote_input_interrupt_request): New function.
17944 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17945 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17946 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17947 (check_remote_input_interrupt_request): New function.
17948 * server.h (check_remote_input_interrupt_request): Declare.
17949 * win32-low.c (winapi_DebugBreakProcess,
17950 winapi_GenerateConsoleCtrlEvent): New typedefs.
17951 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17953 (win32_wait): Check for remote interrupt request
17954 with check_remote_input_interrupt_request.
17955 (win32_request_interrupt): New function.
17956 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17958 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17960 * win32-low.c (debug_registers_changed,
17961 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17962 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17963 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17964 (thread_rec): Get context using the low target.
17965 (child_add_thread): Call thread_added on the low target,
17966 which does the same thing.
17968 (do_initial_child_stuff): Remove debug registers references.
17969 Set context using the low target. Resume threads after
17970 setting the contexts.
17971 (child_continue): Remove dead variable. Remove debug
17972 registers references.
17973 (child_fetch_inferior_registers): Go through the low target.
17974 (do_child_store_inferior_registers): Remove.
17975 (child_store_inferior_registers): Go through the low target.
17976 (win32_resume): Remove debug registers references.
17977 Set context using the low target.
17978 (handle_exception): Change return type to void. Don't record
17979 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17980 first chance exception.
17981 (get_child_debug_event): Change return type to void. Remove
17982 goto loop. Always return after waiting for debug event.
17983 (win32_wait): Convert to switch statement. Handle spurious
17986 * win32-i386-low.c (debug_registers_changed,
17987 debug_registers_used): New.
17988 (initial_stuff): Rename to ...
17989 (i386_initial_stuff): ... this. Clear debug registers
17991 (store_debug_registers): Delete.
17992 (i386_get_thread_context): New.
17993 (load_debug_registers): Delete.
17994 (i386_set_thread_context): New.
17995 (i386_thread_added): New.
17996 (single_step): Rename to ...
17997 (i386_single_step): ... this.
17998 (do_fetch_inferior_registers): Rename to ...
17999 (i386_fetch_inferior_register): ... this.
18000 (i386_store_inferior_register): New.
18001 (the_low_target): Adapt to new interface.
18003 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18004 (arm_get_thread_context): New.
18005 (arm_set_thread_context): New.
18007 (do_fetch_inferior_registers): Rename to ...
18008 (arm_fetch_inferior_register): ... this.
18009 (arm_store_inferior_register): New.
18010 (arm_wince_breakpoint): Reimplement as unsigned long.
18011 (arm_wince_breakpoint_len): Define.
18012 (the_low_target): Adapt to new interface.
18014 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18015 load_debug_registers. Add get_thread_context, set_thread_context,
18016 thread_added and store_inferior_register. Rename
18017 fetch_inferior_registers to fetch_inferior_register.
18018 (regptr): Remove declaration.
18020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18022 * linux-low.c (linux_detach): Change return type to int. Return 0.
18023 * spu-low.c (spu_detach): Likewise.
18025 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18027 * target.h (target_ops): Change return type of detach to int.
18029 (join_inferior): New.
18030 * server.c (main): Don't skip detach support on mingw32.
18031 If the inferior doesn't support detaching return error.
18032 Call join_inferior instead of using waitpid.
18033 * linux-low.c (linux_join): New.
18034 (linux_target_op): Add linux_join.
18035 * spu-low.c (spu_join): New.
18036 (spu_target_ops): Add spu_join.
18037 * win32-low.c (win32_detach): Adapt to new interface.
18038 Reopen current_process_handle before detaching. Issue a child
18039 resume before detaching.
18041 (win32_target_op): Add win32_join.
18043 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18045 * win32-low.c (win32-attach): Fix return value.
18046 * target.h (target_ops): Describe ATTACH return values.
18048 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18050 * win32-low.c (GETPROCADDRESS): Define.
18051 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18052 (winapi_DebugSetProcessKillOnExit): Likewise.
18053 (win32_create_inferior): Force usage of ansi CreateProcessA.
18054 (win32_attach): Use GETPROCADDRESS.
18055 (win32_detach): Likewise.
18057 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18059 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18061 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18063 * win32-low.c: Commit leftover changes from 2007-03-29.
18065 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18067 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18068 fields short instead of int. Add explicit padding.
18069 (i387_cache_to_fsave): Remove unnecessary casts.
18070 (i387_fsave_to_cache): Doc fix.
18071 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18073 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18075 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18076 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18078 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18080 * configure.srv (arm*-*-mingw32ce*): Move near the other
18083 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18085 * configure.ac: Add errno checking.
18086 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18087 sys/file.h and malloc.h.
18088 (AC_CHECK_DECLS): Add perror.
18089 (srv_mingwce): Handle.
18090 * configure.srv (i[34567]86-*-cygwin*): Add
18091 win32-i386-low.o to srv_tgtobj.
18092 (i[34567]86-*-mingw*): Likewise.
18093 (arm*-*-mingw32ce*): Add case.
18094 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18095 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18096 [__MINGW32CE__] (strerror): New function.
18097 [__MINGW32CE__] (errno): Define to GetLastError.
18098 [__MINGW32CE__] (COUNTOF): New macro.
18099 (remote_open): Remove extra close call.
18100 * mem-break.c (delete_breakpoint_at): New function.
18101 * mem-break.h (delete_breakpoint_at): Declare.
18102 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18103 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18104 [USE_WIN32API] (read, write): Add char* casts.
18105 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18106 * server.h: Include wincecompat.h on Windows CE.
18107 [HAVE_ERRNO_H]: Check.
18108 (perror): Declare if not declared.
18109 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18110 (perror_with_name): Remove errno declaration.
18111 * wincecompat.h: New.
18112 * wincecompat.c: New.
18113 * win32-low.h: New.
18114 * win32-arm-low.c: New.
18115 * win32-i386-low.c: New.
18116 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18117 (OUTMSG2): Make it safe.
18119 (COUNTOF): New macro.
18120 (NUM_REGS): Get it from the low target.
18121 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18122 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18123 (thread_rec): Let low target handle debug registers.
18124 (child_add_thread): Likewise.
18125 (child_init_thread_list): Likewise.
18126 (continue_one_thread): Likewise.
18128 (do_child_fetch_inferior_registers): Move to ...
18129 * win32-i386-low.c: ... here, and rename to ...
18130 (do_fetch_inferior_registers): ... this.
18131 * win32-low.c (child_fetch_inferior_registers):
18132 Go through the low target.
18133 (do_child_store_inferior_registers): Use regptr.
18134 (strwinerror): New function.
18135 (win32_create_inferior): Handle Windows CE.
18136 Use strwinerror instead of strerror on Windows error
18137 codes. Add program to the error output.
18138 Don't close the main thread handle on Windows CE.
18139 (win32_attach): Use coredll.dll on Windows CE.
18140 (win32_kill): Close current process and current
18142 (win32_detach): Use coredll.dll on Windows CE.
18143 (win32_resume): Let low target handle debug registers, and
18145 (handle_exception): Add/Remove initial breakpoint. Avoid
18146 non-existant WSTOPSIG on Windows CE.
18147 (win32_read_inferior_memory): Cast to remove warning.
18148 (win32_arch_string): Go through the low target.
18149 (initialize_low): Call set_breakpoint_data with the low
18150 target's breakpoint.
18151 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18152 FOP_REGNUM, mappings): Move to ...
18153 * win32-i386-low.c: ... here.
18154 * win32-low.c (win32_thread_info): Move to ...
18155 * win32-low.h: ... here.
18156 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18157 win32-arm-low.c and wincecompat.c.
18158 (all:): Add $EXEEXT.
18159 (install-only:): Likewise.
18160 (gdbserver:): Likewise.
18161 (gdbreplay:): Likewise.
18162 * config.in: Regenerate.
18163 * configure: Regenerate.
18165 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18167 * win32-low.c: Rename typedef thread_info to
18168 win32_thread_info throughout.
18170 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18172 * win32-i386-low.c: Rename to ...
18173 * win32-low.c: ... this.
18174 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18175 * Makefile.in: Likewise.
18177 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18179 * remote-utils.c (monitor_output): Constify msg parameter.
18180 * server.h (monitor_output): Likewise.
18181 * win32-i386-low.c (handle_output_debug_string): New.
18182 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18183 handle_output_debug_string.
18184 (get_child_debug_event): Likewise.
18186 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18188 * server.c (main): Correct strtoul check.
18190 2007-03-27 Jon Ringle <jon@ringle.org>
18192 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18194 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18196 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18198 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18200 * terminal.h: Check HAVE_SGTTY_H.
18202 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18204 * remote-utils.c (remote_open): Print out the assigned port number.
18206 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18208 * remote-utils.c (monitor_output): New function.
18209 * server.c (debug_threads): Define here.
18210 (monitor_show_help): New function.
18211 (handle_query): Handle qRcmd.
18212 (main): Do not handle 'd' packet.
18213 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18214 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18217 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18219 * Makefile.in (EXEEXT): New.
18220 (clean): Use $(EXEEXT).
18222 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18224 * target.h (target_ops): Rename send_signal to request_interrupt,
18225 and remove enum target_signal parameter.
18226 * linux-low.c (linux_request_interrupt): Rename from
18227 linux_send_signal, and always send SIGINT.
18228 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18229 and always send SIGINT.
18230 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18232 (input_interrupt): Likewise.
18234 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18236 * server.c (get_features_xml): Check if target implemented
18238 * win32-i386-low.c (win32_arch_string): New.
18239 (win32_target_ops): Add win32_arch_string as arch_string member.
18241 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18243 * spu-low.c (spu_arch_string): New.
18244 (spu_target_ops): Add spu_arch_string.
18246 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18248 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18249 * configure.ac: Do not check for terminal.h.
18250 * configure, config.in: Regenerated.
18252 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18254 * Makefile.in (OBS): Add $(XML_BUILTIN).
18255 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18257 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18258 (arm-with-iwmmxt.c): New.
18259 * config.in, configure: Regenerate.
18260 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18261 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18262 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18263 (arm*-*-linux*): Add iWMMXt and regset support.
18264 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18265 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18266 (arm_store_wmmxregset, target_regsets): New.
18267 * server.c (get_features_xml): Take annex argument. Check builtin
18269 (handle_query): Handle multiple annexes.
18271 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18273 * remote-utils.c [USE_WIN32API] (read, write): Define.
18274 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18277 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18279 * linux-i386-low.c (the_low_target): Set arch_string.
18280 * linux-x86-64-low.c (the_low_target): Likewise.
18281 * linux-low.c (linux_arch_string): New.
18282 (linux_target_ops): Add it.
18283 * linux-low.h (struct linux_target_ops): Add arch_string.
18284 * server.c (write_qxfer_response): Use const void * for DATA.
18285 (get_features_xml): New.
18286 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18287 * target.h (struct target_ops): Add arch_string method.
18289 2007-01-03 Denis Pilat <denis.pilat@st.com>
18290 Daniel Jacobowitz <dan@codesourcery.com>
18292 * linux-low.c (linux_kill): Handle being called with no threads.
18293 * win32-i386-low.c (win32_kill): Likewise.
18294 (get_child_debug_event): Clear current_process_handle.
18296 2006-12-30 Denis PILAT <denis.pilat@st.com>
18297 Daniel Jacobowitz <dan@codesourcery.com>
18299 * remote-utils.c (remote_open): Check the type of specified
18300 serial port devices before opening them.
18301 * server.c (main): Kill the inferior if an error occurs during
18302 the first remote_open.
18304 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18306 * README: Update supported targets.
18308 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18310 * Makefile.in (clean): Remove reg-mips64.c.
18311 (reg-mips64.c, reg-mips64.o): New rules.
18312 * configure.srv: Handle mips64. Include regset support for mips.
18313 * linux-mips-low.c (union mips_register): New.
18314 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18315 (mips_breakpoint, mips_breakpoint_at): Use int.
18316 (mips_collect_register, mips_supply_register)
18317 (mips_collect_register_32bit, mips_supply_register_32bit)
18318 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18319 (mips_store_fpregset, target_regsets): New.
18320 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18322 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18324 * configure.srv: Add target "spu*-*-*".
18325 * Makefile.in (clean): Remove reg-spu.c.
18326 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18327 * spu-low.c: New file.
18329 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18331 * configure.ac: Correct td_thr_tls_get_addr test.
18332 * configure: Regenerated.
18334 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18336 * linux-low.c (linux_wait_for_event): Reformat. Use the
18337 pass_signals array.
18338 * remote-utils.c (decode_address_to_semicolon): New.
18339 * server.c (pass_signals, handle_general_set): New.
18340 (handle_query): Mention QPassSignals for qSupported.
18341 (main): Call handle_general_set.
18342 * server.h (pass_signals, decode_address_to_semicolon): New.
18344 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18346 * server.c (handle_query): Correct error handling for read_auxv.
18348 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18350 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18351 and srv_linux_thread_db to yes.
18352 * linux-s390-low.c (s390_fill_gregset): New function.
18353 (target_regsets): Define data structure.
18355 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18357 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18358 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18359 * config.in, configure: Regenerated.
18360 * inferiors.c (gdb_id_to_thread): New function.
18361 (gdb_id_to_thread_id): Use it.
18362 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18363 * linux-low.h (struct process_info): Add th member.
18364 (thread_db_get_tls_address): New prototype.
18365 * remote-utils.c (decode_address): Make non-static.
18366 * server.c (handle_query): Handle qGetTLSAddr.
18367 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18368 * target.h (struct target_ops): Add get_tls_address.
18369 * thread-db.c (maybe_attach_thread): Save the thread handle.
18370 (thread_db_get_tls_address): New.
18372 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18374 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18375 (linux_resume_one_process): Take a siginfo_t *. Update all
18376 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18377 (struct pending_signals): Add a siginfo_t.
18378 (linux_wait_for_process): Always set last_status.
18379 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18380 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18381 * linux-low.h (struct process_info): Add last_status.
18383 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18385 * remote-utils.c (try_rle): New function.
18386 (putpkt_binary): Use it.
18388 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18390 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18391 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18392 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18393 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18394 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18397 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18399 * server.c (terminal_fd): New variable.
18400 (old_foreground_pgrp): Likewise.
18401 (restore_old_foreground_pgrp): New function.
18402 (start_inferior): Record the terminal file descriptor in terminal_fd
18403 and its original foreground group in old_foreground_pgrp. Register
18404 restore_old_foreground_pgrp with atexit().
18406 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18408 * server.c (handle_query): Correct qPart to qXfer.
18410 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18412 * configure.ac: Check for more headers which are missing on
18413 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18414 * configure.srv: Add Cygwin and mingw32.
18415 * remote-utils.c: Don't include headers unconditionally which
18416 are missing on mingw32. Include <winsock.h> for mingw32.
18417 (remote_open): Adjust for mingw32 support. Flush
18418 standard error after writing to it.
18419 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18420 (unblock_async_io, enable_async_io, disable_async_io)
18421 (readchar, getpkt): Update for Winsock support.
18422 (prepare_resume_reply): Expect a protocol signal number.
18423 * server.c: Disable <sys/wait.h> on mingw32.
18424 (start_inferior): Adjust for mingw32 support. Flush
18425 standard error after writing to it.
18426 (attach_inferior): Likewise. Use protocol signal
18428 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18430 * win32-i386-low.c: New file.
18431 * Makefile.in (XM_CLIBS): Set.
18432 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18433 (win32-i386-low.o): New dependency rule.
18434 * linux-low.c (linux_wait): Use target signal numbers.
18435 * target.h (struct target_ops): Doc fix.
18436 * server.h (target_signal_to_name): New prototype.
18437 * gdbreplay.c: Don't include headers unconditionally which
18438 are missing on mingw32. Include <winsock.h> for mingw32.
18439 (remote_close, remote_open): Adjust for Winsock support.
18440 * configure, config.in: Regenerated.
18442 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18444 * server.c (decode_xfer_read, write_qxfer_response): New.
18445 (handle_query): Take a packet length argument. Handle
18446 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18447 the qSupported response.
18448 (main): Update call to handle_query.
18450 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18452 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18453 (putpkt_binary): Renamed from putpkt and adjusted for binary
18455 (putpkt): New wrapper for putpkt_binary.
18456 (readchar): Don't mask off the high bit.
18457 (decode_X_packet): New function.
18458 * server.c (main): Call putpkt_binary if a handler sets the packet
18459 length. Save the length of the incoming packet. Handle 'X'.
18460 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18462 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18464 * server.c (handle_query): Handle qSupported.
18466 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18468 * remote-utils.c (all_symbols_looked_up): New variable.
18469 (look_up_one_symbol): Check it.
18470 * server.h (look_up_one_symbol): New declaration.
18471 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18473 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18475 * Makefile.in (linux-arm-low.o): Update dependencies.
18476 * linux-arm-low.c: Include "gdb_proc_service.h".
18477 (PTRACE_GET_THREAD_AREA): Define.
18478 (ps_get_thread_area): New function.
18480 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18482 * configure.srv (m68k*-*-uclinux*): New target.
18483 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18484 (linux_resume_one_process): Remove extraneous cast.
18485 (linux_read_offsets): New.
18486 (linux_target_op): Add linux_read_offsets on mmuless systems.
18487 * server.c (handle_query): Add qOffsets logic.
18488 * target.h (struct target_ops): Add read_offsets.
18490 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18492 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18493 (PTRACE_GET_THREAD_AREA): Define.
18494 (ps_get_thread_area): New function.
18495 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18496 (linux-x86-64-low.o): Update.
18498 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18500 * configure.ac: Remove checks for prfpregset_t.
18501 * gdb_proc_service.h: New file.
18502 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18503 new "gdb_proc_service.h".
18504 * proc-service.c: Likewise.
18505 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18506 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18507 * Makefile.in (gdb_proc_service_h): Updated.
18508 * configure, config.in: Regenerated.
18510 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18512 * remote-utils.c (prepare_resume_reply): Move declaration
18513 of gdb_id_from_wait to the top of the block.
18515 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18517 * linux-low.c (regsets_store_inferior_registers): Read the regset
18518 from the target before filling it.
18520 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18522 * server.c (attach_inferior): Return SIGTRAP for a successful
18525 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18527 * Makefile.in (OBS): Add version.o.
18528 (STAGESTUFF): Delete.
18529 (version.o): Add dependencies.
18530 (version.c): Replace rule.
18531 (clean): Remove version.c.
18532 * server.c (gdbserver_version): New.
18533 (gdbserver_usage): Use printf.
18534 (main): Handle --version and --help.
18535 * server.h (version, host_name): Add declarations.
18537 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18549 * linux-x86-64-low.c:
18551 * linux-s390-low.c:
18552 * linux-ppc64-low.c:
18554 * linux-mips-low.c:
18555 * linux-m68k-low.c:
18556 * linux-m32r-low.c:
18559 * linux-ia64-low.c:
18560 * linux-i386-low.c:
18561 * linux-crisv32-low.c:
18573 * gdbserver.1: Add (C) after Copyright. Update the FSF
18576 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18578 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18579 (arm_breakpoint_at): Recognize both breakpoints.
18580 (the_low_target): Use the correct breakpoint instruction.
18582 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18584 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18585 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18586 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18587 (the_low_target): Update.
18589 2005-10-25 Andreas Schwab <schwab@suse.de>
18591 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18593 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18594 (ia64_num_regs): Reduce to 462.
18596 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18598 * acinclude.m4: Correct quoting.
18599 * aclocal.m4: Regenerated.
18601 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18602 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18603 (thread_db_init): Call thread_db_err_str.
18604 * configure.ac: Check for TD_VERSION.
18605 * config.in, configure: Regenerated.
18607 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18609 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18611 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18613 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18614 is not available. Define HAVE_PTRACE_GETREGS if it is.
18615 * config.in, configure: Regenerated.
18616 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18617 * linux-i386-low.c, linux-m68k-low.c: Update to use
18618 HAVE_PTRACE_GETREGS.
18619 * linux-low.c (regsets_fetch_inferior_registers)
18620 (regsets_store_inferior_registers): Only return 0 if we processed
18622 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18623 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18625 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18627 * inferiors.c (struct thread_info): Add gdb_id.
18628 (add_thread): Add gdb_id argument.
18629 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18630 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18631 calls to add_thread.
18632 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18633 * server.c (handle_query): Use thread_to_gdb_id.
18634 (handle_v_cont, main): Use gdb_id_to_thread_id.
18635 * server.h (add_thread): Update prototype.
18636 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18639 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18641 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18642 left-padded registers.
18643 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18644 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18646 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18648 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18649 * configure: Regenerate.
18650 * config.in: Regenerate.
18651 * server.h (NEED_DECLARATION_STRERROR):
18652 Replace with !HAVE_DECL_STRERROR.
18654 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18656 * linux-low.c (linux_wait, linux_send_signal): Don't test
18657 an unsigned long variable for > 0 if it could be MAX_ULONG.
18658 * server.c (myresume): Likewise.
18659 * target.c (set_desired_inferior): Likewise.
18661 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18663 * configure.ac: Simplify and improve check for socklen_t.
18664 * configure, config.in: Regenerate.
18666 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18668 * acconfig.h: Remove.
18669 * configure.ac: Add a test for socklen_t. Use three-argument
18670 AC_DEFINE throughout.
18671 * config.in: Regenerated using autoheader 2.59.
18672 * configure: Regenerated.
18674 * gdbreplay.c (socklen_t): Provide a default.
18675 (remote_open): Use socklen_t.
18676 * remote-utils.c (socklen_t): Provide a default.
18677 (remote_open): Use socklen_t.
18678 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18681 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18683 * linux-low.c (linux_read_memory, linux_write_memory)
18684 (linux_read_auxv): Likewise.
18685 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18686 (check_mem_write): Likewise.
18687 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18689 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18690 (registers_from_string, register_data): Likewise.
18691 * server.c (handle_query, main): Likewise.
18692 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18693 (decode_M_packet): Likewise.
18694 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18695 * target.h (struct target_ops): Update read_memory, write_memory,
18697 (read_inferior_memory, write_inferior_memory): Update.
18698 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18699 to unsigned char *.
18700 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18701 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18702 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18703 linux-s390-low.c, linux-sh-low.c: Update for changes in
18704 read_inferior_memory and the_low_target->breakpoint.
18706 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18708 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18709 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18710 * configure.srv: Add powerpc64-*-linux*.
18711 * linux-ppc64-low.c: New file.
18713 2005-05-23 Orjan Friberg <orjanf@axis.com>
18715 * linux-cris-low.c: New file with support for CRIS.
18716 * linux-crisv32-low.c: Ditto for CRISv32.
18717 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18718 (clean): Add reg-cris.c and reg-crisv32.c.
18719 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18720 reg-crisv32.o, and reg-crisv32.c to make rules.
18721 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18722 recognized targets.
18724 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18726 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18727 of sizeof (PTRACE_XFER_TYPE).
18728 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18730 2005-05-12 Orjan Friberg <orjanf@axis.com>
18732 * target.h (struct target_ops): Add insert_watchpoint,
18733 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18734 pointers for hardware watchpoint support.
18735 * linux-low.h (struct linux_target_ops): Ditto.
18736 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18737 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18738 to linux_target_ops.
18739 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18741 * server.c (main): Recognize 'Z' and 'z' packets.
18743 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18745 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18746 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18747 (the_low_target): Add new members.
18749 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18751 * proc-service.c (ps_lgetregs): Search all_processes instead of
18754 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18756 * server.c (start_inferior): Change return type to int.
18757 (attach_inferior): Change sigptr to int *.
18758 (handle_v_cont, handle_v_requests): Change signal to int *.
18759 (main): Change signal to int.
18761 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18763 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18764 * configure.srv: Add m32r*-*-linux*.
18765 * linux-m32r-low.c: New file.
18767 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18769 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18771 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18773 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18774 Take unsigned long arguments for PIDs.
18775 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18776 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18777 (wait_for_sigstop, linux_resume_one_process)
18778 (regsets_fetch_inferior_registers, linux_send_signal)
18779 (linux_read_auxv): Likewise. Update the types of variables holding
18780 PIDs. Update format string specifiers.
18781 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18782 * remote-utils.c (prepare_resume_reply): Likewise.
18783 * server.c (cont_thread, general_thread, step_thread)
18784 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18786 (handle_query): Update format specifiers.
18787 (handle_v_cont, main): Use strtoul for thread IDs.
18788 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18789 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18790 (general_thread, step_thread, thread_from_wait)
18791 (old_thread_from_wait): Update.
18792 * target.h (struct thread_resume): Use unsigned long for THREAD.
18793 (struct target_ops): Use unsigned long for arguments to attach and
18796 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18798 * acinclude.m4: Include bfd/bfd.m4 directly.
18799 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18800 <agriffis@toolchain.org>.
18801 * aclocal.m4, configure: Regenerated.
18803 2005-01-07 Andrew Cagney <cagney@gnu.org>
18805 * configure.ac: Rename configure.in, require autoconf 2.59.
18806 * configure: Re-generate.
18808 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18810 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18811 LIBS when finished.
18812 * aclocal.m4: Regenerated.
18813 * configure: Regenerated.
18815 2004-11-21 Andreas Schwab <schwab@suse.de>
18817 * linux-m68k-low.c (m68k_num_gregs): Define.
18818 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18819 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18820 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18821 (m68k_breakpoint_at): New. Add to the_low_target.
18823 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18824 srv_linux_thread_db to yes.
18826 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18828 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18829 (ARCH_SET_FS): Likewise.
18830 (ARCH_GET_FS): Likewise.
18831 (ARCH_GET_GS): Likewise.
18833 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18835 * linux-i386-low.c (ps_get_thread_area): New.
18836 * linux-x86-64-low.c (ps_get_thread_area): New.
18837 * linux-low.c: Include <sys/syscall.h>.
18838 (linux_kill_one_process): Don't kill the first thread here.
18839 (linux_kill): Kill the first thread here.
18840 (kill_lwp): New function.
18841 (send_sigstop, linux_send_signal): Use it.
18842 * proc-service.c: Clean up #ifdefs.
18843 (fpregset_info): Delete.
18844 (ps_lgetregs): Update and enable implementation.
18845 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18847 * remote-utils.c (struct sym_cache, symbol_cache): New.
18848 (input_interrupt): Print a clearer message.
18849 (async_io_enabled): New variable.
18850 (enable_async_io, disable_async_io): Use it. Update comments.
18851 (look_up_one_symbol): Use the symbol cache.
18852 * thread-db.c (thread_db_look_up_symbols): New function.
18853 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18855 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18857 * configure.in: Test for -rdynamic.
18858 * configure: Regenerated.
18859 * Makefile (INTERNAL_LDFLAGS): New.
18860 (gdbserver, gdbreplay): Use it.
18862 2004-09-02 Andrew Cagney <cagney@gnu.org>
18864 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18866 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18868 * linux-low.c (linux_wait): Clear all_processes list also.
18870 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18872 * linux-low.c: Include <errno.h>. Remove extern declaration of
18875 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18877 * gdbreplay.c, server.h, utils.c: Update copyright years.
18879 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18881 * server.c (main): Print child status or termination signal from
18882 variable 'signal', not 'sig'.
18884 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18886 * linux-low.c (linux_read_memory): Change return type to
18887 int. Check for and return error from ptrace().
18888 * target.c (read_inferior_memory): Change return type to int. Pass
18889 back return status from the_target->read_memory().
18890 * target.h (struct target_ops): Adapt *read_memory() prototype.
18892 (read_inferior_memory): Adapt prototype.
18893 * server.c (main): Return an error packet if
18894 read_inferior_memory() returns an error.
18896 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18898 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18899 Unify with other clean targets.
18901 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18903 * server.c (handle_v_cont): Call set_desired_inferior.
18905 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18907 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18909 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18911 * linux-low.c (linux_wait): Unblock async I/O.
18912 (linux_resume): Block and enable async I/O.
18913 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18914 * server.h (block_async_io, unblock_async_io): Add prototypes.
18916 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18918 * remote-utils.c (remote_open): Print a status notice after
18919 opening a TCP port.
18920 * server.c (attach_inferior): Print a status notice after
18923 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18925 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18927 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18929 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18931 * server.c, target.h: Update copyright years.
18933 2004-02-25 Roland McGrath <roland@redhat.com>
18935 * target.h (struct target_ops): New member `read_auxv'.
18936 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18937 * linux-low.c (linux_read_auxv): New function.
18938 (linux_target_ops): Initialize `read_auxv' member to that.
18940 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18942 Committed by Jim Blandy <jimb@redhat.com>.
18944 * linux-s390-low.c (s390_num_regs): Update.
18945 (s390_regmap): Remove control registers. Use __s390x__ predefine
18946 instead of GPR_SIZE to distiguish s390 and s390x targets.
18948 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18950 * linux-low.c: Update copyright year.
18951 (check_removed_breakpoint): Clear pending_is_breakpoint.
18952 (linux_set_resume_request, linux_queue_one_thread)
18953 (resume_status_pending_p): New functions.
18954 (linux_continue_one_thread): Use process->resume.
18955 (linux_resume): Only resume threads if there are no pending events.
18956 * linux-low.h (struct process_info): Add resume request
18959 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18961 * regcache.c (new_register_cache): Clear the allocated register
18962 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18964 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18966 * linux-low.c (linux_resume): Take a struct thread_resume *
18968 (linux_wait): Update call.
18969 (resume_ptr): New static variable.
18970 (linux_continue_one_thread): Renamed from
18971 linux_continue_one_process. Use resume_ptr.
18972 (linux_resume): Use linux_continue_one_thread.
18973 * server.c (handle_v_cont, handle_v_requests): New functions.
18974 (myresume): New function.
18975 (main): Handle 'v' case.
18976 * target.h (struct thread_resume): New type.
18977 (struct target_ops): Change argument of "resume" to struct
18979 (myresume): Delete macro.
18981 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18983 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18984 (uninstall): Support DESTDIR.
18986 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18988 * configure.srv: Add xscale*linux copy of arm*linux entry.
18990 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18992 * linux-arm-low.c (arm_reinsert_addr): New function.
18993 (the_low_target): Add arm_reinsert_addr.
18995 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18997 * mem-break.c: Remove whitespace at end of file.
18999 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19001 * configure.in: Check whether we need to prototype strerror.
19002 * server.h: Optionally prototype strerror.
19003 * gdbreplay.c (perror_with_name): Use strerror.
19004 * linux-low.c (linux_attach_lwp): Use strerror.
19005 * utils.c (perror_with_name): Use strerror.
19006 * config.in, configure: Regenerated.
19008 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19010 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19011 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19013 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19015 * Makefile.in (SFILES): Update.
19016 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19017 low-sun3.c: Remove files.
19019 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19021 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19022 (linux_detach_one_process, linux_detach): New functions.
19023 (linux_target_ops): Add linux_detach.
19024 * server.c (main): Handle 'D' packet.
19025 * target.h (struct target_ops): Add "detach" member.
19026 (detach_inferior): Define.
19028 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19030 From Kelley Cook <kelleycook@wideopenwest.com>:
19031 * configure.srv: Accept i[34567]86 variants.
19033 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19035 * linux-low.c (linux_wait_for_event): Correct comment typos.
19036 (linux_resume_one_process): Call check_removed_breakpoint.
19037 (linux_send_signal): New function.
19038 (linux_target_ops): Add linux_send_signal.
19039 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19041 * target.h (struct target_ops): Add send_signal.
19043 2003-05-29 Jim Blandy <jimb@redhat.com>
19045 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19046 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19047 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19048 away part of the register's value.
19050 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19052 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19053 (linux_wait_for_event, linux_init_signals): Likewise.
19055 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19057 * configure.in: Check for stdlib.h.
19058 * configure: Regenerated.
19059 * config.in: Regenerated.
19061 2003-01-04 Andreas Schwab <schwab@suse.de>
19063 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19065 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19067 * Makefile.in: Remove obsolete code.
19069 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19071 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19072 defined(PT_FPR0_HI).
19074 2002-11-17 Stuart Hughes <seh@zee2.com>
19076 * linux-arm-low.c (arm_num_regs): Increase.
19077 (arm_regmap): Include status register.
19079 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19081 * linux-low.c (register_addr): Remove incorrect -1 check.
19083 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19085 * linux-low.c (linux_create_inferior): Call setpgid. Return
19087 (unstopped_p, linux_signal_pid): Remove.
19088 (linux_target_ops): Remove linux_signal_pid.
19089 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19090 global instead of target method.
19091 * target.h (struct target_ops): Remove signal_pid. Update comment
19092 for create_inferior.
19093 * server.c (signal_pid): New variable.
19094 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19095 gdbserver. Set the child to be the foreground process group.
19096 (attach_inferior): Set signal_pid.
19098 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19100 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19102 2002-08-20 Jim Blandy <jimb@redhat.com>
19104 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19107 2002-08-01 Andrew Cagney <cagney@redhat.com>
19109 * Makefile.in: Make chill references obsolete.
19111 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19113 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19114 * configure: Regenerate.
19115 * config.in: Regenerate.
19117 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19119 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19120 (perror_with_name, remote_close, remote_open, expect, play): Static.
19122 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19124 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19125 byte offsets instead of an array of indexes.
19126 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19128 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19130 * regcache.c: Add comment.
19132 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19134 * thread-db.c: New file.
19135 * proc-service.c: New file.
19136 * acinclude.m4: New file.
19137 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19138 proc-service.o, and thread-db.o.
19139 (linux-low.o): Add USE_THREAD_DB.
19140 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19141 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19142 * aclocal.m4: Regenerated.
19143 * config.in: Regenerated.
19144 * configure: Regenerated.
19145 * configure.in: Check for proc_service.h, sys/procfs.h,
19146 thread_db.h, and linux/elf.h headrs.
19147 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19148 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19149 Check for -lthread_db and thread support.
19150 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19151 PowerPC, and SuperH.
19152 * i387-fp.c: Constify arguments.
19153 * i387-fp.h: Likewise.
19154 * inferiors.c: (struct thread_info): Renamed from
19155 `struct inferior_info'. Remove PID member. Use generic inferior
19156 list header. All uses updated.
19157 (inferiors, signal_pid): Removed.
19158 (all_threads): New variable.
19159 (get_thread): Define.
19160 (add_inferior_to_list): New function.
19161 (for_each_inferior): New function.
19162 (change_inferior_id): New function.
19163 (add_inferior): Removed.
19164 (remove_inferior): New function.
19165 (add_thread): New function.
19166 (free_one_thread): New function.
19167 (remove_thread): New function.
19168 (clear_inferiors): Use for_each_inferior and free_one_thread.
19169 (find_inferior): New function.
19170 (find_inferior_id): New function.
19171 (inferior_target_data): Update argument type.
19172 (set_inferior_target_data): Likewise.
19173 (inferior_regcache_data): Likewise.
19174 (set_inferior_regcache_data): Likewise.
19175 * linux-low.c (linux_bp_reinsert): Remove.
19176 (all_processes, stopping_threads, using_thrads)
19177 (struct pending_signals, debug_threads, pid_of): New.
19178 (inferior_pid): Replace with macro.
19179 (struct inferior_linux_data): Remove.
19180 (get_stop_pc, add_process): New functions.
19181 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19182 Use add_process and add_thread.
19183 (linux_attach_lwp): New function, based on old linux_attach. Use
19184 add_process and add_thread. Set stop_expected for new threads.
19185 (linux_attach): New function.
19186 (linux_kill_one_process): New function.
19187 (linux_kill): Kill all LWPs.
19188 (linux_thread_alive): Use find_inferior_id.
19189 (check_removed_breakpoints, status_pending_p): New functions.
19190 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19191 Update. Use WNOHANG. Wait for cloned processes also. Update process
19192 struct for the found process.
19193 (linux_wait_for_event): New function.
19194 (linux_wait): Use it. Support LWPs.
19195 (send_sigstop, wait_for_sigstop, stop_all_processes)
19196 (linux_resume_one_process, linux_continue_one_process): New functions.
19197 (linux_resume): Support LWPs.
19198 (REGISTER_RAW_SIZE): Remove.
19199 (fetch_register): Use register_size instead. Call supply_register.
19200 (usr_store_inferior_registers): Likewise. Call collect_register.
19201 Fix recursive case.
19202 (regsets_fetch_inferior_registers): Improve error message.
19203 (regsets_store_inferior_registers): Add debugging.
19204 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19205 (unstopped_p, linux_signal_pid): New functions.
19206 (linux_target_ops): Add linux_signal_pid.
19207 (linux_init_signals): New function.
19208 (initialize_low): Call it. Initialize using_threads.
19209 * regcache.c (inferior_regcache_data): Add valid
19211 (get_regcache): Fetch registers lazily. Add fetch argument
19212 and update all callers.
19213 (regcache_invalidate_one, regcache_invalidate): New
19215 (new_register_cache): Renamed from create_register_cache.
19216 Return the new regcache.
19217 (free_register_cache): Change argument to a void *.
19218 (registers_to_string, registers_from_string): Call get_regcache
19219 with fetch flag set.
19220 (register_data): Make static. Pass fetch flag to get_regcache.
19221 (supply_register): Call get_regcache with fetch flag clear.
19222 (collect_register): Call get_regcache with fetch flag set.
19223 (collect_register_as_string): New function.
19224 * regcache.h: Update.
19225 * remote-utils.c (putpkt): Flush after debug output and use
19227 Handle input interrupts while waiting for an ACK.
19228 (input_interrupt): Use signal_pid method.
19229 (getpkt): Flush after debug output and use stderr.
19230 (outreg): Use collect_register_as_string.
19231 (new_thread_notify, dead_thread_notify): New functions.
19232 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19233 and general_thread.
19234 (look_up_one_symbol): Flush after debug output.
19235 * server.c (step_thread, server_waiting): New variables.
19236 (start_inferior): Don't use signal_pid. Update call to mywait.
19237 (attach_inferior): Update call to mywait.
19238 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19239 (main): Don't fetch/store registers explicitly. Use
19240 set_desired_inferior. Support proposed ``Hs'' packet. Update
19242 * server.h: Update.
19243 (struct inferior_list, struct_inferior_list_entry): New.
19244 * target.c (set_desired_inferior): New.
19245 (write_inferior_memory): Constify.
19246 (mywait): New function.
19247 * target.h: Update.
19248 (struct target_ops): New signal_pid method.
19249 (mywait): Removed macro, added prototype.
19251 * linux-low.h (regset_func): Removed.
19252 (regset_fill_func, regset_store_func): New.
19253 (enum regset_type): New.
19254 (struct regset_info): Add type field. Use new operation types.
19255 (struct linux_target_ops): stop_pc renamed to get_pc.
19256 Add decr_pc_after_break and breakpoint_at.
19257 (get_process, get_thread_proess, get_process_thread)
19258 (strut process_info, all_processes, linux_attach_lwp)
19259 (thread_db_init): New.
19261 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19262 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19263 (the_low_target): Add new members.
19264 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19265 (i386_store_fpxregset): Constify.
19266 (target_regsets): Add new kind identifier.
19267 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19268 (i386_set_pc): Add debugging.
19269 (i386_breakpoint_at): New function.
19270 (the_low_target): Add new members.
19271 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19272 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19273 (mips_breakpoint_at): New.
19274 (the_low_target): Add new members.
19275 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19276 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19277 (the_low_target): Add new members.
19278 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19279 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19280 (the_low_target): Add new members.
19281 * linux-x86-64-low.c (target_regsets): Add new kind
19284 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19286 From Martin Pool <mbp@samba.org>:
19287 * server.c (gdbserver_usage): New function.
19290 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19292 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19293 stop_at -> stop_pc.
19295 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19297 * Makefile.in: Remove obsolete code.
19299 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19301 * linux-low.c (regsets_fetch_inferior_registers),
19302 (regsets_store_inferior_registers): Removed cast to int from
19304 * regcache.h: Added declaration of struct inferior_info.
19306 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19308 * inferiors.c (struct inferior_info): Add regcache_data.
19309 (add_inferior): Call create_register_cache.
19310 (clear_inferiors): Call free_register_cache.
19311 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19312 * regcache.c (struct inferior_regcache_data): New.
19313 (registers): Remove.
19314 (get_regcache): New function.
19315 (create_register_cache, free_register_cache): New functions.
19316 (set_register_cache): Don't initialize the register cache here.
19317 (registers_to_string, registers_from_string, register_data): Call
19319 * regcache.h: Add prototypes.
19320 * server.h: Likewise.
19322 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19324 * mem-break.c: New file.
19325 * mem-break.h: New file.
19326 * Makefile.in: Add mem-break.o rule; update server.h
19328 * inferiors.c (struct inferior_info): Add target_data
19330 (clear_inferiors): Free target_data member if set.
19331 (inferior_target_data, set_inferior_target_data): New functions.
19332 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19333 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19334 * linux-low.c (linux_bp_reinsert): New variable.
19335 (struct inferior_linux_data): New.
19336 (linux_create_inferior): Use set_inferior_target_data.
19337 (linux_attach): Likewise. Call add_inferior.
19338 (linux_wait_for_one_inferior): New function.
19339 (linux_wait): Call it.
19340 (linux_write_memory): Add const.
19341 (initialize_low): Call set_breakpoint_data.
19342 * linux-low.h (struct linux_target_ops): Add breakpoint
19344 * server.c (attach_inferior): Remove extra add_inferior
19346 * server.h: Include mem-break.h. Update inferior.c
19348 * target.c (read_inferior_memory)
19349 (write_inferior_memory): New functions.
19350 * target.h (read_inferior_memory)
19351 (write_inferior_memory): Change macros to prototypes.
19352 (struct target_ops): Update comments. Add const to write_memory
19355 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19357 * linux-low.c (usr_store_inferior_registers): Support
19358 registers which are allowed to fail to store.
19359 * linux-low.h (linux_target_ops): Likewise.
19360 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19361 (ppc_cannot_store_register): FPSCR may not be storable.
19363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19365 * server.h: Include <string.h> if HAVE_STRING_H.
19366 * ChangeLog: Correct paths in last ChangeLog entry.
19368 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19370 * linux-low.h: Remove obsolete prototypes.
19371 (struct linux_target_ops): New.
19372 (extern the_low_target): New.
19373 * linux-low.c (num_regs, regmap): Remove declarations.
19374 (register_addr): Use the_low_target explicitly.
19375 (fetch_register): Likewise.
19376 (usr_fetch_inferior_registers): Likewise.
19377 (usr_store_inferior_registers): Likewise.
19378 * linux-arm-low.c (num_regs): Remove.
19379 (arm_num_regs): Define.
19380 (arm_regmap): Renamed from regmap, made static.
19381 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19383 (arm_cannot_store_register): Renamed from cannot_store_register,
19385 (the_low_target): New.
19386 * linux-i386-low.c (num_regs): Remove.
19387 (i386_num_regs): Define.
19388 (i386_regmap): Renamed from regmap, made static.
19389 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19391 (i386_cannot_store_register): Renamed from cannot_store_register,
19393 (the_low_target): New.
19394 * linux-ia64-low.c (num_regs): Remove.
19395 (ia64_num_regs): Define.
19396 (ia64_regmap): Renamed from regmap, made static.
19397 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19399 (ia64_cannot_store_register): Renamed from cannot_store_register,
19401 (the_low_target): New.
19402 * linux-m68k-low.c (num_regs): Remove.
19403 (m68k_num_regs): Define.
19404 (m68k_regmap): Renamed from regmap, made static.
19405 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19407 (m68k_cannot_store_register): Renamed from cannot_store_register,
19409 (the_low_target): New.
19410 * linux-mips-low.c (num_regs): Remove.
19411 (mips_num_regs): Define.
19412 (mips_regmap): Renamed from regmap, made static.
19413 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19415 (mips_cannot_store_register): Renamed from cannot_store_register,
19417 (the_low_target): New.
19418 * linux-ppc-low.c (num_regs): Remove.
19419 (ppc_num_regs): Define.
19420 (ppc_regmap): Renamed from regmap, made static.
19421 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19423 (ppc_cannot_store_register): Renamed from cannot_store_register,
19425 (the_low_target): New.
19426 * linux-s390-low.c (num_regs): Remove.
19427 (s390_num_regs): Define.
19428 (s390_regmap): Renamed from regmap, made static.
19429 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19431 (s390_cannot_store_register): Renamed from cannot_store_register,
19433 (the_low_target): New.
19434 * linux-sh-low.c (num_regs): Remove.
19435 (sh_num_regs): Define.
19436 (sh_regmap): Renamed from regmap, made static.
19437 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19439 (sh_cannot_store_register): Renamed from cannot_store_register,
19441 (the_low_target): New.
19442 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19443 (the_low_target): New.
19445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19447 * Makefile.in: Add stamp-h target.
19448 * configure.in: Create stamp-h.
19449 * configure: Regenerated.
19451 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19453 * inferiors.c: New file.
19454 * target.c: New file.
19455 * target.h: New file.
19456 * Makefile.in: Add target.o and inferiors.o. Update
19458 * linux-low.c (inferior_pid): New static variable,
19459 moved from server.c.
19460 (linux_create_inferior): Renamed from create_inferior.
19461 Call add_inferior. Return 0 on success instead of a PID.
19462 (linux_attach): Renamed from myattach.
19463 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19464 (linux_thread_alive): Renamed from mythread_alive.
19465 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19467 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19468 (regsets_store_inferior_registers): Correct error message.
19469 Add missing ``return 0''.
19470 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19471 (linux_store_registers): Renamed from store_inferior_registers.
19472 (linux_read_memory): Renamed from read_inferior_memory.
19473 (linux_write_memory): Renamed from write_inferior_memory.
19474 (linux_target_ops): New structure.
19475 (initialize_low): Call set_target_ops ().
19476 * remote-utils.c (unhexify): New function.
19477 (hexify): New function.
19478 (input_interrupt): Send signals to ``signal_pid''.
19479 * server.c (inferior_pid): Remove.
19480 (start_inferior): Update create_inferior call.
19481 (attach_inferior): Call add_inferior.
19482 (handle_query): New function.
19483 (main): Call handle_query for `q' packets.
19484 * server.h: Include "target.h". Remove obsolete prototypes.
19485 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19487 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19489 * Makefile.in: Add WARN_CFLAGS. Update configury
19491 * configure.in: Check for <string.h>
19492 * configure: Regenerate.
19493 * config.in: Regenerate.
19494 * gdbreplay.c: Include needed system headers.
19495 (remote_open): Remove strchr prototype.
19496 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19497 * regcache.c (supply_register): Change buf argument to const void *.
19498 (supply_register_by_name): Likewise.
19499 (collect_register): Change buf argument to void *.
19500 (collect_register_by_name): Likewise.
19501 * regcache.h: Add missing prototypes.
19502 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19503 * server.c (handle_query): New function.
19504 (attached): New static variable, moved out of main.
19505 (main): Quiet longjmp clobber warnings.
19506 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19507 * utils.c (error): Remove NORETURN.