1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's breakpoint_kind_from_pc,
4 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
5 ops into methods of process_target.
7 * target.h (struct process_stratum_target): Remove the target op.
8 (class process_target): Add the target op.
9 (target_breakpoint_kind_from_pc): Update the macro.
10 (target_breakpoint_kind_from_current_state): Update the macro.
11 (default_breakpoint_kind_from_pc): Remove declaration.
12 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
13 (process_target::breakpoint_kind_from_pc): ... this.
14 (process_target::breakpoint_kind_from_current_state): Define.
16 Update the derived classes and callers below.
18 * mem-break.cc (bp_size): Update.
20 * linux-low.cc (linux_target_ops): Update.
21 (linux_wait_1): Update.
22 (linux_breakpoint_kind_from_pc): Turn into ...
23 (linux_process_target::breakpoint_kind_from_pc): ... this.
24 (linux_sw_breakpoint_from_kind): Turn into ...
25 (linux_process_target::sw_breakpoint_from_kind): ... this.
26 (linux_breakpoint_kind_from_current_state): Turn into ...
27 (linux_process_target::breakpoint_kind_from_current_state): ... this.
28 * linux-low.h (class linux_process_target): Update.
29 * lynx-low.cc (lynx_target_ops): Update.
30 (lynx_process_target::sw_breakpoint_from_kind): Define.
31 * lynx-low.h (class lynx_process_target): Update.
32 * nto-low.cc (nto_target_ops): Update.
33 (nto_sw_breakpoint_from_kind): Turn into ...
34 (nto_process_target::sw_breakpoint_from_kind): ... this.
35 * nto-low.h (class nto_process_target): Update.
36 * win32-low.cc (win32_target_ops): Update.
37 (win32_sw_breakpoint_from_kind): Turn into ...
38 (win32_process_target::sw_breakpoint_from_kind): ... this.
39 * win32-low.h (class win32_process_target): Update.
41 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
43 Turn process_stratum_target's multifs_open, multifs_readlink,
44 multifs_unlink ops into methods of process_target.
46 * target.h (struct process_stratum_target): Remove the target ops.
47 (class process_target): Add the target ops. Also add
49 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
51 (process_target::supports_multifs): Define.
52 (process_target::multifs_open): Define.
53 (process_target::multifs_readlink): Define.
54 (process_target::multifs_unlink): Define.
56 Update the derived classes and callers below.
58 * hostio.cc (handle_setfs): Update.
59 (handle_open): Update.
60 (handle_unlink): Update.
61 (handle_readlink): Update.
62 * linux-low.cc (linux_target_ops): Update.
63 (linux_process_target::supports_multifs): Define.
64 (linux_process_target::multifs_open): Define.
65 (linux_process_target::multifs_readlink): Define.
66 (linux_process_target::multifs_unlink): Define.
67 * linux-low.h (class linux_process_target): Update.
68 * lynx-low.cc (lynx_target_ops): Update.
69 * nto-low.cc (nto_target_ops): Update.
70 * win32-low.cc (win32_target_ops): Update.
72 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
74 Turn process_stratum_target's pid_to_exec_file op into a method
77 * target.h (struct process_stratum_target): Remove the target op.
78 (class process_target): Add the target op. Also add
79 'supports_pid_to_exec_file'.
80 * target.cc (process_target::pid_to_exec_file): Define.
81 (process_target::supports_pid_to_exec_file): Define.
83 Update the derived classes and callers below.
85 * server.cc (handle_qxfer_exec_file): Update.
86 (handle_query): Update.
87 * linux-low.cc (linux_target_ops): Update.
88 (linux_process_target::supports_pid_to_exec_file): Define.
89 (linux_process_target::pid_to_exec_file): Define.
90 * linux-low.h (class linux_process_target): Update.
91 * lynx-low.cc (lynx_target_ops): Update.
92 * nto-low.cc (nto_target_ops): Update.
93 * win32-low.cc (win32_target_ops): Update.
95 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
97 Turn process_stratum_target's supports_range_stepping op into a
98 method of process_target.
100 * target.h (struct process_stratum_target): Remove the target op.
101 (class process_target): Add the target op.
102 (target_supports_range_stepping): Update the macro.
103 * target.cc (process_target::supports_range_stepping): Define.
105 Update the derived classes and callers below.
107 * linux-low.cc (linux_target_ops): Update.
108 (linux_supports_range_stepping): Turn into ...
109 (linux_process_target::supports_range_stepping): ... this.
110 * linux-low.h (class linux_process_target): Update.
111 * lynx-low.cc (lynx_target_ops): Update.
112 * nto-low.cc (nto_target_ops): Update.
113 * win32-low.cc (win32_target_ops): Update.
115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
117 Turn process_stratum_target's btrace-related ops (enable_btrace,
118 disable_btrace, read_btrace, read_btrace_conf) into methods of
121 * target.h (struct process_stratum_target): Remove the target ops.
122 (class process_target): Add the target ops.
123 (target_enable_btrace): Update.
124 (target_disable_btrace): Update.
125 (target_read_btrace): Update.
126 (target_read_btrace_conf): Update.
127 * target.cc (process_target::enable_btrace): Define.
128 (process_target::disable_btrace): Define.
129 (process_target::read_btrace): Define.
130 (process_target::read_btrace_conf): Define.
132 Update the derived classes and callers below.
134 * linux-low.cc (linux_target_ops): Update.
135 (linux_process_target:enable_btrace): Define as a wrapper around
137 (linux_low_disable_btrace): Turn into ...
138 (linux_process_target::disable_btrace): ... this.
139 (linux_low_read_btrace): Turn into ...
140 (linux_process_target::read_btrace): ... this.
141 (linux_low_btrace_conf): Turn into ...
142 (linux_process_target::read_btrace_conf): ... this.
143 * linux-low.h (class linux_process_target): Update.
144 * lynx-low.cc (lynx_target_ops): Update.
145 * nto-low.cc (nto_target_ops): Update.
146 * win32-low.cc (win32_target_ops): Update.
148 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
150 Turn process_stratum_target's supports_agent op into a method of
153 * target.h (struct process_stratum_target): Remove the target op.
154 (class process_target): Add the target op.
155 (target_supports_agent): Update the macro.
156 * target.cc (process_target::supports_agent): Define.
158 Update the derived classes and callers below.
160 * linux-low.cc (linux_target_ops): Update.
161 (linux_supports_agent): Turn into ...
162 (linux_process_target::supports_agent): ... this.
163 * linux-low.h (class linux_process_target): Update.
164 * lynx-low.cc (lynx_target_ops): Update.
165 * nto-low.cc (nto_target_ops): Update.
166 * win32-low.cc (win32_target_ops): Update.
168 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
170 Turn process_stratum_target's qxfer_libraries_svr4 op into a
171 method of process_target.
173 * target.h (struct process_stratum_target): Remove the target op.
174 (class process_target): Add the target op. Also add
175 'supports_qxfer_libraries_svr4'.
176 * target.cc (process_target::qxfer_libraries_svr4): Define.
177 (process_target::supports_qxfer_libraries_svr4): Define.
179 Update the derived classes and callers below.
181 * server.cc (handle_qxfer_libraries_svr4): Update.
182 (handle_query): Update.
183 * linux-low.cc (linux_target_ops): Update.
184 (linux_process_target::supports_qxfer_libraries_svr4): Define.
185 (linux_qxfer_libraries_svr4): Turn into ...
186 (linux_process_target::qxfer_libraries_svr4): ... this.
187 * linux-low.h (class linux_process_target): Update.
188 * lynx-low.cc (lynx_target_ops): Update.
189 * nto-low.cc (nto_target_ops): Update.
190 * win32-low.cc (win32_target_ops): Update.
192 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
194 Turn process_stratum_target's supports_disable_randomization op
195 into a method of process_target.
197 * target.h (struct process_stratum_target): Remove the target op.
198 (class process_target): Add the target op.
199 (target_supports_disable_randomization): Update the macro.
200 * target.cc (process_target::supports_disable_randomization): Define.
202 Update the derived classes and callers below.
204 * linux-low.cc (linux_target_ops): Update.
205 (linux_supports_disable_randomization): Turn into ...
206 (linux_process_target::supports_disable_randomization): ... this.
207 * linux-low.h (class linux_process_target): Update.
208 * lynx-low.cc (lynx_target_ops): Update.
209 * nto-low.cc (nto_target_ops): Update.
210 * win32-low.cc (win32_target_ops): Update.
212 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
214 Turn process_stratum_target's emit_ops op into a method of
217 * target.h (struct process_stratum_target): Remove the target op.
218 (class process_target): Add the target op.
219 (target_emit_ops): Update the macro.
220 * target.cc (process_target::emit_ops): Define.
222 Update the derived classes and callers below.
224 * linux-low.cc (linux_target_ops): Update.
225 (linux_emit_ops): Turn into ...
226 (linux_process_target::emit_ops): ... this.
227 * linux-low.h (class linux_process_target): Update.
228 * lynx-low.cc (lynx_target_ops): Update.
229 * nto-low.cc (nto_target_ops): Update.
230 * win32-low.cc (win32_target_ops): Update.
232 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
234 Turn process_stratum_target's install_fast_tracepoint_jump_pad
235 and get_min_fast_tracepoint_insn_len ops into methods of
238 * target.h (struct process_stratum_target): Remove the target ops.
239 (class process_target): Add the target ops. Also add
240 'supports_fast_tracepoints'.
241 (target_supports_fast_tracepoints): Update the macro.
242 (target_get_min_fast_tracepoint_insn_len): Update the macro.
243 (install_fast_tracepoint_jump_pad): Update and rename the macro
245 (target_install_fast_tracepoint_jump_pad): ... this.
246 * target.cc (process_target::supports_fast_tracepoints): Define.
247 (process_target::install_fast_tracepoint_jump_pad): Define.
248 (process_target::get_min_fast_tracepoint_insn_len): Define.
250 Update the derived classes and callers below.
252 * tracepoint.cc (install_fast_tracepoint): Update.
253 * linux-low.cc (linux_target_ops): Update.
254 (linux_process_target::supports_fast_tracepoints): Define.
255 (linux_install_fast_tracepoint_jump_pad): Turn into ...
256 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
257 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
258 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
259 * linux-low.h (class linux_process_target): Update.
260 * lynx-low.cc (lynx_target_ops): Update.
261 * nto-low.cc (nto_target_ops): Update.
262 * win32-low.cc (win32_target_ops): Update.
264 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
266 Turn process_stratum_target's stabilize_threads op into a
267 method of process_target.
269 * target.h (struct process_stratum_target): Remove the target op.
270 (class process_target): Add the target op.
271 (target_stabilize_threads): Update the macro.
272 * target.cc (process_target::stabilize_threads): Define.
274 Update the derived classes and callers below.
276 * server.cc (handle_status): Update.
277 * tracepoint.cc (cmd_qtdp): Update.
278 (cmd_qtstart): Update.
279 * linux-low.cc (linux_target_ops): Update.
280 (linux_stabilize_threads): Turn into ...
281 (linux_process_target::stabilize_threads): ... this.
282 (linux_wait_1): Update.
283 * linux-low.h (class linux_process_target): Update.
284 * lynx-low.cc (lynx_target_ops): Update.
285 * nto-low.cc (nto_target_ops): Update.
286 * win32-low.cc (win32_target_ops): Update.
288 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
290 Turn process_stratum_target's pause_all and unpause_all ops
291 into methods of process_target.
293 * target.h (struct process_stratum_target): Remove the target ops.
294 (class process_target): Add the target ops.
295 (pause_all): Update the macro and rename to...
296 (target_pause_all): ... this.
297 (unpause_all): Update the macro and rename to...
298 (target_unpause_all): ... this.
299 * target.cc (process_target::pause_all): Define.
300 (process_target::unpause_all): Define.
302 Update the derived classes and callers below.
304 * server.cc (handle_status): Update.
305 * tracepoint.cc (clear_installed_tracepoints): Update.
307 (cmd_qtstart): Update.
308 (stop_tracing): Update.
309 (cmd_qtstatus): Update.
310 (upload_fast_traceframes): Update.
311 (run_inferior_command): Update.
312 * linux-low.cc (linux_target_ops): Update.
313 (linux_pause_all): Turn into ...
314 (linux_process_target::pause_all): ... this.
315 (linux_unpause_all): Turn into ...
316 (linux_process_target::unpause_all): ... this.
317 (linux_process_target::prepare_to_access_memory): Update.
318 (linux_process_target::done_accessing_memory): Update.
319 * linux-low.h (class linux_process_target): Update.
320 * lynx-low.cc (lynx_target_ops): Update.
321 * nto-low.cc (nto_target_ops): Update.
322 * win32-low.cc (win32_target_ops): Update.
324 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
326 Turn process_stratum_target's get_tib_address op into a method of
329 * target.h (struct process_stratum_target): Remove the target op.
330 (class process_target): Add the target op. Also add
331 'supports_get_tib_address'.
332 * target.cc (process_target::get_tib_address): Define.
333 (process_target::supports_get_tib_address): Define.
335 Update the derived classes and callers below.
337 * server.cc (handle_query): Update.
338 * linux-low.cc (win32_target_ops): Update.
339 * lynx-low.cc (lynx_target_ops): Update.
340 * nto-low.cc (nto_target_ops): Update.
341 * win32-low.cc (win32_target_ops): Update.
342 (win32_process_target::supports_get_tib_address): Define.
343 (win32_get_tib_address): Turn into ...
344 (win32_process_target::get_tib_address): ... this.
345 * win32-low.h (class win32_process_target): Update.
347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
349 Turn process_stratum_target's thread_stopped op into a method of
352 * target.h (struct process_stratum_target): Remove the target op.
353 (class process_target): Add the target op. Also add
354 'supports_thread_stopped'.
355 (target_thread_stopped): Update the macro.
356 * target.cc (process_target::thread_stopped): Define.
357 (process_target::supports_thread_stopped): Define.
358 (prepare_to_access_memory): Update.
360 Update the derived classes and callers below.
362 * server.cc (queue_stop_reply_callback): Update.
363 * linux-low.cc (linux_target_ops): Update.
364 (linux_process_target::supports_thread_stopped): Define.
365 (linux_thread_stopped): Turn into ...
366 (linux_process_target::thread_stopped): ... this.
367 * linux-low.h (class linux_process_target): Update.
368 * lynx-low.cc (lynx_target_ops): Update.
369 * nto-low.cc (nto_target_ops): Update.
370 * win32-low.cc (win32_target_ops): Update.
372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
374 Turn process_stratum_target's read_pc and write_pc ops into
375 methods of process_target.
377 * target.h (struct process_stratum_target): Remove the target ops.
378 (class process_target): Add the target ops.
379 * target.cc (process_target::read_pc): Define.
380 (process_target::write_pc): Define.
382 Update the derived classes and callers below.
384 * regcache.cc (regcache_read_pc): Update.
385 (regcache_write_pc): Update.
386 * linux-low.cc (linux_target_ops): Update.
387 (linux_read_pc): Turn into ...
388 (linux_process_target::read_pc): ... this.
389 (linux_write_pc): Turn into ...
390 (linux_process_target::write_pc): ... this.
391 * linux-low.h (class linux_process_target): Update.
392 * lynx-low.cc (lynx_target_ops): Update.
393 * nto-low.cc (nto_target_ops): Update.
394 * win32-low.cc (win32_target_ops): Update.
396 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
398 Turn process_stratum_target's supports_tracepoints op into a
399 method of process_target.
401 * target.h (struct process_stratum_target): Remove the target op.
402 (class process_target): Add the target op.
403 (target_supports_tracepoints): Update the macro.
404 * target.cc (process_target::supports_tracepoints): Define.
406 Update the derived classes and callers below.
408 * linux-low.cc (linux_target_ops): Update.
409 (linux_supports_tracepoints): Turn into ...
410 (linux_process_target::supports_tracepoints): ... this.
411 * linux-low.h (class linux_process_target): Update.
412 * lynx-low.cc (lynx_target_ops): Update.
413 * nto-low.cc (nto_target_ops): Update.
414 * win32-low.cc (win32_target_ops): Update.
416 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
418 Turn process_stratum_target's process_qsupported op into a method
421 * target.h (struct process_stratum_target): Remove the target op.
422 (class process_target): Add the target op.
423 (target_process_qsupported): Update the macro.
424 * target.cc (process_target::process_qsupported): Define.
426 Update the derived classes and callers below.
428 * linux-low.cc (linux_target_ops): Update.
429 (linux_process_qsupported): Turn into ...
430 (linux_process_target::process_qsupported): ... this.
431 * linux-low.h (class linux_process_target): Update.
432 * lynx-low.cc (lynx_target_ops): Update.
433 * nto-low.cc (nto_target_ops): Update.
434 * win32-low.cc (win32_target_ops): Update.
436 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
438 Turn process_stratum_target's read_loadmap op into a method of
441 * target.h (struct process_stratum_target): Remove the target op.
442 (class process_target): Add the target op. Also add
443 'supports_read_loadmap'.
444 * target.cc (process_target::read_loadmap): Define.
445 (process_target::supports_read_loadmap): Define.
447 Update the derived classes and callers below.
449 * server.cc (handle_qxfer_fdpic): Update.
450 (handle_query): Update.
451 * linux-low.cc (linux_target_ops): Update.
452 (linux_process_target::supports_read_loadmap): Define.
453 (linux_read_loadmap): Turn into ...
454 (linux_process_target::read_loadmap): ... this.
455 * linux-low.h (class linux_process_target): Update.
456 * lynx-low.cc (lynx_target_ops): Update.
457 * nto-low.cc (nto_target_ops): Update.
458 * win32-low.cc (win32_target_ops): Update.
460 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
462 Turn process_stratum_target's core_of_thread op into a method of
465 * target.h (struct process_stratum_target): Remove the target op.
466 (class process_target): Add the target op.
467 (target_core_of_thread): Update the macro.
468 * target.cc (process_target::core_of_thread): Define.
470 Update the derived classes and callers below.
472 * linux-low.cc (linux_target_ops): Update.
473 (linux_process_target::core_of_thread): Define.
474 * linux-low.h (class linux_process_target): Update.
475 * lynx-low.cc (lynx_target_ops): Update.
476 * nto-low.cc (nto_target_ops): Update.
477 * win32-low.cc (win32_target_ops): Update.
479 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
481 Turn process_stratum_target's handle_monitor_command op into a
482 method of process_target.
484 * target.h (struct process_stratum_target): Remove the target op.
485 (class process_target): Add the target op.
486 (target_handle_monitor_command): Update the macro.
487 * target.cc (process_target::handle_monitor_command): Define.
489 Update the derived classes and callers below.
491 * server.cc (handle_query): Update.
492 * linux-low.cc (linux_target_ops): Update.
493 (linux_process_target::handle_monitor_command): Define.
494 * linux-low.h (class linux_process_target): Update.
495 * lynx-low.cc (lynx_target_ops): Update.
496 * nto-low.cc (nto_target_ops): Update.
497 * win32-low.cc (win32_target_ops): Update.
499 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
501 Turn process_stratum_target's handle_new_gdb_connection op into a
502 method of process_target.
504 * target.h (struct process_stratum_target): Remove the target op.
505 (class process_target): Add the target op.
506 (target_handle_new_gdb_connection): Update the macro.
507 * target.cc (process_target::handle_new_gdb_connection): Define.
509 Update the derived classes and callers below.
511 * linux-low.cc (linux_target_ops): Update.
512 (linux_handle_new_gdb_connection): Turn into ...
513 (linux_process_target::handle_new_gdb_connection): ... this.
514 * linux-low.h (class linux_process_target): Update.
515 * lynx-low.cc (lynx_target_ops): Update.
516 * nto-low.cc (nto_target_ops): Update.
517 * win32-low.cc (win32_target_ops): Update.
519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
521 Turn process_stratum_target's supports_fork_events,
522 supports_vfork_events, and supports_exec_events ops into methods
525 * target.h (struct process_stratum_target): Remove the target ops.
526 (class process_target): Add the target ops.
527 (target_supports_fork_events): Update the macro.
528 (target_supports_vfork_events): Update the macro.
529 (target_supports_exec_events): Update the macro.
530 * target.cc (process_target::supports_fork_events): Define.
531 (process_target::supports_vfork_events): Define.
532 (process_target::supports_exec_events): Define.
534 Update the derived classes and callers below.
536 * linux-low.cc (linux_target_ops): Update.
537 (linux_supports_fork_events): Turn into ...
538 (linux_process_target::supports_fork_events): ... this.
539 (linux_supports_vfork_events): Turn into ...
540 (linux_process_target::supports_vfork_events): ... this.
541 (linux_supports_exec_events): Turn into ...
542 (linux_process_target::supports_exec_events): ... this.
543 * linux-low.h (class linux_process_target): Update.
544 * lynx-low.cc (lynx_target_ops): Update.
545 * nto-low.cc (nto_target_ops): Update.
546 * win32-low.cc (win32_target_ops): Update.
548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
550 Turn process_stratum_target's supports_multi_process op into a
551 method of process_target.
553 * target.h (struct process_stratum_target): Remove the target op.
554 (class process_target): Add the target op.
555 * target.cc (process_target::supports_multi_process): Define.
556 (target_supports_multi_process): Update.
558 Update the derived classes and callers below.
560 * linux-low.cc (linux_target_ops): Update.
561 (linux_supports_multi_process): Turn into ...
562 (linux_process_target::supports_multi_process): ... this.
563 * linux-low.h (class linux_process_target): Update.
564 * lynx-low.cc (lynx_target_ops): Update.
565 * nto-low.cc (nto_target_ops): Update.
566 * win32-low.cc (win32_target_ops): Update.
568 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
570 Turn process_stratum_target's supports_non_stop, async, and
571 start_non_stop ops into methods of process_target.
573 * target.h (struct process_stratum_target): Remove the target ops.
574 (class process_target): Add the target ops.
575 (target_supports_non_stop): Update the macro.
576 (target_async): Update the macro.
577 (start_non_stop): Remove declaration.
578 * target.cc (process_target::supports_non_stop): Define.
579 (process_target::async): Define.
580 (process_target::start_non_stop): Define.
581 (start_non_stop): Remove.
583 Update the derived classes and callers below.
585 * server.cc (handle_qxfer_siginfo): Update.
586 (handle_query): Update.
587 * linux-low.cc (linux_target_ops): Update.
588 (linux_supports_non_stop): Turn into ...
589 (linux_process_target::supports_non_stop): ... this.
590 (linux_async): Turn into ...
591 (linux_process_target::async): ... this.
592 (linux_start_non_stop): Turn into ...
593 (linux_process_target::start_non_stop): ... this.
594 * linux-low.h (class linux_process_target): Update.
595 * lynx-low.cc (lynx_target_ops): Update.
596 * nto-low.cc (nto_target_ops): Update.
597 (nto_supports_non_stop): Remove; rely on the default behavior
599 * win32-low.cc (win32_target_ops): Update.
601 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
603 Turn process_stratum_target's qxfer_siginfo op into a method of
606 * target.h (struct process_stratum_target): Remove the target op.
607 (class process_target): Add the target op. Also add
608 'supports_qxfer_siginfo'.
609 * target.cc (process_target::qxfer_siginfo): Define.
610 (process_target::supports_qxfer_siginfo): Define.
612 Update the derived classes and callers below.
614 * server.cc (handle_qxfer_siginfo): Update.
615 (handle_query): Update.
616 * linux-low.cc (linux_target_ops): Update.
617 (linux_process_target::supports_qxfer_siginfo): Define.
618 (linux_xfer_siginfo): Turn into ...
619 (linux_process_target::qxfer_siginfo): ... this.
620 * linux-low.h (class linux_process_target): Update.
621 * lynx-low.cc (lynx_target_ops): Update.
622 * nto-low.cc (nto_target_ops): Update.
623 * win32-low.cc (win32_target_ops): Update.
625 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
627 Turn process_stratum_target's qxfer_osdata op into a method of
630 * target.h (struct process_stratum_target): Remove the target op.
631 (class process_target): Add the target op. Also add
632 'supports_qxfer_osdata'.
633 * target.cc (process_target::qxfer_osdata): Define.
634 (process_target::supports_qxfer_osdata): Define.
636 Update the derived classes and callers below.
638 * server.cc (handle_qxfer_osdata): Update.
639 (handle_query): Update.
640 * linux-low.cc (linux_target_ops): Update.
641 (linux_process_target::supports_qxfer_osdata): Define.
642 (linux_qxfer_osdata): Turn into ...
643 (linux_process_target::qxfer_osdata): ... this.
644 * linux-low.h (class linux_process_target): Update.
645 * lynx-low.cc (lynx_target_ops): Update.
646 * nto-low.cc (nto_target_ops): Update.
647 * win32-low.cc (win32_target_ops): Update.
649 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
651 Turn process_stratum_target's hostio_last_error op into a
652 method of process_target.
654 * target.h (struct process_stratum_target): Remove the target op.
655 (class process_target): Add the target op.
656 * target.cc: Add "hostio.h" to includes.
657 (process_target::hostio_last_error): Define.
659 Update the derived classes and callers below.
661 * hostio.cc (hostio_error): Update.
662 * linux-low.cc: Remove "hostio.h" from includes.
663 (linux_target_ops): Update.
664 * lynx-low.cc (lynx_target_ops): Update.
665 * nto-low.cc (nto_target_ops): Update.
666 * win32-low.h (class win32_process_target): Update.
667 * win32-low.cc (win32_target_ops): Update.
668 (wince_hostio_last_error): Turn into ...
669 (win32_process_target::hostio_last_error): ... this.
671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
673 Turn process_stratum_target's get_tls_address op into a method of
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op. Also add
678 'supports_get_tls_address'.
679 * target.cc (process_target::get_tls_address): Define.
680 (process_target::supports_get_tls_address): Define.
682 Update the derived classes and callers below.
684 * server.cc (handle_query): Update.
685 * linux-low.cc (linux_target_ops): Update.
686 (linux_process_target::supports_get_tls_address): Define.
687 (linux_process_target::get_tls_address): Define.
688 * linux-low.h (class linux_process_target): Update.
689 * lynx-low.cc (lynx_target_ops): Update.
690 * nto-low.cc (nto_target_ops): Update.
691 * win32-low.cc (win32_target_ops): Update.
693 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
695 Turn process_stratum_target's read_offsets op into a method of
698 * target.h (struct process_stratum_target): Remove the target op.
699 (class process_target): Add the target op. Also add
700 'supports_read_offsets'.
701 * target.cc (process_target::read_offsets): Define.
702 (process_target::supports_read_offsets): Define.
704 Update the derived classes and callers below.
706 * server.cc (handle_query): Update.
707 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
708 (linux_target_ops): Update.
709 (linux_process_target::supports_read_offsets): Define.
710 (linux_read_offsets): Turn into ...
711 (linux_process_target::read_offsets): ... this.
712 * linux-low.h (class linux_process_target): Update.
713 * lynx-low.cc (lynx_target_ops): Update.
714 * nto-low.cc (nto_target_ops): Update.
715 * win32-low.cc (win32_target_ops): Update.
717 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
719 Turn process_stratum_target's stopped_by_watchpoint and
720 stopped_data_address ops into methods of process_target.
722 * target.h (struct process_stratum_target): Remove the target ops.
723 (class process_target): Add the target ops.
724 * target.cc (process_target::stopped_by_watchpoint): Define.
725 (process_target::stopped_data_address): Define.
727 Update the derived classes and callers below.
729 * remote-utils.cc (prepare_resume_reply): Update.
730 * linux-low.cc (linux_target_ops): Update.
731 (linux_stopped_by_watchpoint): Turn into ...
732 (linux_process_target::stopped_by_watchpoint): ... this.
733 (linux_stopped_data_address): Turn into ...
734 (linux_process_target::stopped_data_address): ... this.
735 * linux-low.h (class linux_process_target): Update.
736 * lynx-low.cc (lynx_target_ops): Update.
737 * nto-low.cc (nto_target_ops): Update.
738 (nto_stopped_by_watchpoint): Turn into ...
739 (nto_process_target::stopped_by_watchpoint): ... this.
740 (nto_stopped_data_address): Turn into ...
741 (nto_process_target::stopped_data_address): ... this.
742 * nto-low.h (class nto_process_target): Update.
743 * win32-low.cc (win32_target_ops): Update.
744 (win32_stopped_by_watchpoint): Turn into ...
745 (win32_process_target::stopped_by_watchpoint): ... this.
746 (win32_stopped_data_address): Turn into ...
747 (win32_process_target::stopped_data_address): ... this.
748 * win32-low.h (class win32_process_target): Update.
750 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
752 Turn process_stratum_target's supports_hardware_single_step op into
753 a method of process_target.
755 * target.h (struct process_stratum_target): Remove the target op.
756 (class process_target): Add the target op.
757 (target_supports_hardware_single_step): Update the macro.
758 (target_can_do_hardware_single_step): Remove declaration.
759 * target.cc (process_target::supports_hardware_single_step): Define.
760 (target_can_do_hardware_single_step): Remove.
762 Update the derived classes and callers below.
764 * linux-low.h (class linux_process_target): Update.
765 * linux-low.cc (linux_target_ops): Update.
766 (linux_supports_hardware_single_step): Turn into ...
767 (linux_process_target::supports_hardware_single_step): ... this.
768 * lynx-low.h (class lynx_process_target): Update.
769 * lynx-low.cc (lynx_target_ops): Update.
770 (lynx_process_target::supports_hardware_single_step): Define.
771 * nto-low.h (class nto_process_target): Update.
772 * nto-low.cc (nto_target_ops): Update.
773 (nto_process_target::supports_hardware_single_step): Define.
774 * win32-low.h (class win32_process_target): Update.
775 * win32-low.cc (win32_target_ops): Update.
776 (win32_process_target::supports_hardware_single_step): Define.
778 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
780 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
781 ops into methods of process_target.
783 * target.h (struct process_stratum_target): Remove the target ops.
784 (class process_target): Add the target ops.
785 (target_stopped_by_hw_breakpoint): Update the macro.
786 (target_supports_stopped_by_hw_breakpoint): Update the macro.
787 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
788 (process_target::supports_stopped_by_hw_breakpoint): Define.
790 Update the derived classes and callers below.
792 * linux-low.cc (linux_target_ops): Update.
793 (linux_stopped_by_hw_breakpoint): Turn into ...
794 (linux_process_target::stopped_by_hw_breakpoint): ... this.
795 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
796 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
797 * linux-low.h (class linux_process_target): Update.
798 * lynx-low.cc (lynx_target_ops): Update.
799 * nto-low.cc (nto_target_ops): Update.
800 * win32-low.cc (win32_target_ops): Update.
802 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
804 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
805 ops into methods of process_target.
807 * target.h (struct process_stratum_target): Remove the target ops.
808 (class process_target): Add the target ops.
809 (target_stopped_by_sw_breakpoint): Update the macro.
810 (target_supports_stopped_by_sw_breakpoint): Update the macro.
811 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
812 (process_target::supports_stopped_by_sw_breakpoint): Define.
814 Update the derived classes and callers below.
816 * linux-low.cc (linux_target_ops): Update.
817 (linux_stopped_by_sw_breakpoint): Turn into ...
818 (linux_process_target::stopped_by_sw_breakpoint): ... this.
819 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
820 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
821 * linux-low.h (class linux_process_target): Update.
822 * lynx-low.cc (lynx_target_ops): Update.
823 * nto-low.cc (nto_target_ops): Update.
824 * win32-low.cc (win32_target_ops): Update.
826 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
828 Turn process_stratum_target's insert_point and remove_point ops
829 into methods of process_target.
831 * target.h (struct process_stratum_target): Remove the target ops.
832 (class process_target): Add the target ops.
833 * target.cc (process_target::insert_point): Define.
834 (process_target::remove_point): Define.
836 Update the derived classes and callers below.
838 * mem-break.cc (set_raw_breakpoint_at): Update.
839 (delete_raw_breakpoint): Update.
840 (uninsert_raw_breakpoint): Update.
841 (reinsert_raw_breakpoint): Update.
842 * linux-low.cc (linux_target_ops): Update.
843 (linux_insert_point): Turn into ...
844 (linux_process_target::insert_point): ... this.
845 (linux_remove_point): Turn into ...
846 (linux_process_target::remove_point): ... this.
847 * linux-low.h (class linux_process_target): Update.
848 * lynx-low.cc (lynx_target_ops): Update.
849 * nto-low.cc (nto_target_ops): Update.
850 (nto_insert_point): Turn into ...
851 (nto_process_target::insert_point): ... this.
852 (nto_remove_point): Turn into ...
853 (nto_process_target::remove_point): ... this.
854 * nto-low.h (class nto_process_target): Update.
855 * win32-low.cc (win32_target_ops): Update.
856 (win32_insert_point): Turn into ...
857 (win32_process_target::insert_point): ... this.
858 (win32_remove_point): Turn into ...
859 (win32_process_target::remove_point): ... this.
860 * win32-low.h (class win32_process_target): Update.
862 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
864 Turn process_stratum_target's supports_z_point_type op into a
865 method of process_target.
867 * target.h (struct process_stratum_target): Remove the target op.
868 (class process_target): Add the target op.
869 * target.cc (process_target::supports_z_point_type): Define.
871 Update the derived classes and callers below.
873 * mem-break.cc (z_type_supported): Update.
874 * linux-low.cc (linux_target_ops): Update.
875 (linux_supports_z_point_type): Turn into ...
876 (linux_process_target::supports_z_point_type): ... this.
877 * linux-low.h (class linux_process_target): Update.
878 * lynx-low.cc (lynx_target_ops): Update.
879 * nto-low.cc (nto_target_ops): Update.
880 (nto_supports_z_point_type): Turn into ...
881 (nto_process_target::supports_z_point_type): ... this.
882 * nto-low.h (class nto_process_target): Update.
883 * win32-low.cc (win32_target_ops): Update.
884 (win32_supports_z_point_type): Turn into ...
885 (win32_process_target::supports_z_point_type): ... this.
886 * win32-low.h (class win32_process_target): Update.
888 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
890 Turn process_stratum_target's read_auxv op into a method of
893 * target.h (class process_stratum_target): Remove the target op.
894 (struct process_target): Add the target op. Also add
895 'supports_read_auxv'.
896 * target.cc (process_target::read_auxv): Define.
897 (process_target::supports_read_auxv): Define.
899 Update the derived classes and callers below.
901 * server.cc (handle_qxfer_auxv): Update.
902 (handle_query): Update.
903 * linux-low.cc (linux_target_ops): Update.
904 (linux_process_target::supports_read_auxv): Define.
905 (linux_read_auxv): Turn into ...
906 (linux_process_target::read_auxv): ... this.
907 * linux-low.h (class linux_process_target): Update.
908 * lynx-low.cc (lynx_target_ops): Update.
909 * nto-low.cc (nto_target_ops): Update.
910 (nto_process_target::supports_read_auxv): Define.
911 (nto_read_auxv): Turn into ...
912 (nto_process_target::read_auxv): ... this.
913 * nto-low.h (class nto_process_target): Update.
914 * win32-low.cc (win32_target_ops): Update.
916 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
918 Turn process_stratum_target's request_interrupt op into a method of
921 * target.h (struct process_stratum_target): Remove the target op.
922 (class process_target): Add the target op.
924 Update the derived classes and callers below.
926 * remote-utils.cc (putpkt_binary_1): Update.
927 (input_interrupt): Update.
929 * server.cc (handle_v_requests): Update.
930 * linux-low.cc (linux_target_ops): Update.
931 (linux_request_interrupt): Turn into ...
932 (linux_process_target::request_interrupt): ... this.
933 * linux-low.h (class linux_process_target): Update.
934 * lynx-low.cc (lynx_target_ops): Update.
935 (lynx_request_interrupt): Turn into ...
936 (lynx_process_target::request_interrupt): ... this.
937 * lynx-low.h (class lynx_process_target): Update.
938 * nto-low.cc (nto_target_ops): Update.
939 (nto_request_interrupt): Turn into ...
940 (nto_process_target::request_interrupt): ... this.
941 * nto-low.h (class nto_process_target): Update.
942 * win32-low.cc (win32_target_ops): Update.
943 (win32_request_interrupt): Turn into ...
944 (win32_process_target::request_interrupt): ... this.
945 * win32-low.h (class win32_process_target): Update.
947 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
949 Turn process_stratum_target's look_up_symbols op into a method of
952 * target.h (struct process_stratum_target): Remove the target op.
953 (class process_target): Add the target op.
954 * target.cc (process_target::look_up_symbols): Define.
956 Update the derived classes and callers below.
958 * server.cc (handle_query): Update.
959 * linux-low.cc (linux_target_ops): Update.
960 (linux_look_up_symbols): Turn into ...
961 (linux_process_target::look_up_symbols): ... this.
962 * linux-low.h (class linux_process_target): Update.
963 * lynx-low.cc (lynx_target_ops): Update.
964 * nto-low.cc (nto_target_ops): Update.
965 * win32-low.cc (win32_target_ops): Update.
967 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
969 Turn process_stratum_target's read_memory and write_memory
970 ops into methods of process_target.
972 * target.h (struct process_stratum_target): Remove the target ops.
973 (class process_target): Add the target ops.
975 Update the derived classes and callers below.
977 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
978 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
979 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
980 (arm_get_syscall_trapinfo): Update.
981 * linux-cris-low.cc (cris_breakpoint_at): Update.
982 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
983 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
984 * linux-mips-low.cc (mips_breakpoint_at): Update.
985 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
986 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
987 * linux-sh-low.cc (sh_breakpoint_at): Update.
988 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
989 (sparc_store_gregset_from_stack): Update.
990 (sparc_breakpoint_at): Update.
991 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
992 * linux-tile-low.cc (tile_breakpoint_at): Update.
993 * linux-x86-low.cc (x86_breakpoint_at): Update.
994 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
995 * mem-brea.cc (insert_memory_breakpoint): Update.
996 (validate_inserted_breakpoint): Update.
997 * target.cc (read_inferior_memory): Update.
998 (target_write_memory): Update.
999 * linux-low.cc (linux_target_ops): Update.
1000 (linux_read_memory): Make a wrapper around the read_memory target
1002 (linux_process_target::read_memory): Rename from linux_read_memory.
1003 (linux_write_memory): Turn into ...
1004 (linux_process_target::write_memory): ... this.
1005 * linux-low.h (class linux_process_target): Update.
1006 * lynx-low.cc (lynx_target_ops): Update.
1007 (lynx_read_memory): Turn into ...
1008 (lynx_process_target::read_memory): ... this.
1009 (lynx_write_memory): Turn into ...
1010 (lynx_process_target::write_memory): ... this.
1011 * lynx-low.h (class lynx_process_target): Update.
1012 * nto-low.cc (nto_target_ops): Update.
1013 (nto_read_memory): Turn into ...
1014 (nto_process_target::read_memory): ... this.
1015 (nto_write_memory): Turn into ...
1016 (nto_process_target::write_memory): ... this.
1017 * nto-low.h (class nto_process_target): Update.
1018 * win32-low.cc (win32_target_ops): Update.
1019 (win32_read_inferior_memory): Turn into ...
1020 (win32_process_target::read_memory): ... this.
1021 (win32_write_inferior_memory): Turn into ...
1022 (win32_process_target::write_memory): ... this.
1023 * win32-low.h (class win32_process_target): Update.
1025 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1027 Turn process_stratum_target's prepare_to_access_memory and
1028 done_accessing_memory ops into methods of process_target.
1030 * target.h (struct process_stratum_target): Remove the target ops.
1031 (class process_target): Add the target ops.
1032 * target.cc (process_target::prepare_to_access_memory): Define.
1033 (process_target::done_accessing_memory): Define.
1034 (prepare_to_access_memory): Update.
1035 (done_accessing_memory): Update.
1037 Update the derived classes and callers below.
1039 * linux-low.cc (linux_target_ops): Update.
1040 (linux_prepare_to_access_memory): Turn into ...
1041 (linux_process_target::prepare_to_access_memory): ... this.
1042 (linux_done_accessing_memory): Turn into ...
1043 (linux_process_target::done_accessing_memory): ... this.
1044 * linux-low.h (class linux_process_target): Update.
1045 * lynx-low.cc (lynx_target_ops): Update.
1046 * nto-low.cc (nto_target_ops): Update.
1047 * win32-low.cc (win32_target_ops): Update.
1049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1051 Turn process_stratum_target's fetch_registers and store_registers
1052 ops into methods of process_target.
1054 * target.h (struct process_stratum_target): Remove the target ops.
1055 (class process_target): Add the target ops.
1056 (fetch_inferior_registers): Update the macro.
1057 (store_inferior_registers): Update the macro.
1059 Update the derived classes and callers below.
1061 * linux-low.cc (linux_target_ops): Update.
1062 (linux_fetch_registers): Turn into ...
1063 (linux_process_target::fetch_registers): ... this.
1064 (linux_store_registers): Turn into ...
1065 (linux_process_target::store_registers): ... this.
1066 * linux-low.h (class linux_process_target): Update.
1067 * lynx-low.cc (lynx_target_ops): Update.
1068 (lynx_fetch_registers): Turn into ...
1069 (lynx_process_target::fetch_registers): ... this.
1070 (lynx_store_registers): Turn into ...
1071 (lynx_process_target::store_registers): ... this.
1072 * lynx-low.h (class lynx_process_target): Update.
1073 * nto-low.cc (nto_target_ops): Update.
1074 (nto_fetch_registers): Turn into ...
1075 (nto_process_target::fetch_registers): ... this.
1076 (nto_store_registers): Turn into ...
1077 (nto_process_target::store_registers): ... this.
1078 * nto-low.h (class nto_process_target): Update.
1079 * win32-low.cc (win32_target_ops): Update.
1080 (win32_fetch_inferior_registers): Turn into ...
1081 (win32_process_target::fetch_registers): ... this.
1082 (win32_store_inferior_registers): Turn into ...
1083 (win32_process_target::store_registers): ... this.
1084 * win32-low.h (class win32_process_target): Update.
1086 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1088 Turn process_stratum_target's wait op into a method of
1091 * target.h (struct process_stratum_target): Remove the target op.
1092 (class process_target): Add the target op.
1094 Update the derived classes and callers below.
1096 * target.cc (target_wait): Update.
1097 * linux-low.cc (linux_target_ops): Update.
1098 (linux_wait): Turn into ...
1099 (linux_process_target::wait): ... this.
1100 * linux-low.h (class linux_process_target): Update.
1101 * lynx-low.cc (lynx_target_ops): Update.
1102 (lynx_wait): Turn into ...
1103 (lynx_process_target::wait): ... this.
1104 * lynx-low.h (class lynx_process_target): Update.
1105 * nto-low.cc (nto_target_ops): Update.
1106 (nto_wait): Turn into ...
1107 (nto_process_target::wait): ... this.
1108 * nto-low.h (class nto_process_target): Update.
1109 * win32-low.cc (win32_target_ops): Update.
1110 (win32_wait): Turn into ...
1111 (win32_process_target::wait): ... this.
1112 (do_initial_child_stuff): Update.
1113 * win32-low.h (class win32_process_target): Update.
1115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1117 Turn process_stratum_target's resume op into a method of
1120 * target.h (struct process_stratum_target): Remove the target op.
1121 (class process_target): Add the target op.
1123 Update the derived classes and callers below.
1125 * server.cc (resume): Update.
1126 * target.cc (target_stop_and_wait): Update.
1127 (target_continue_no_signal): Update.
1128 (target_continue): Update.
1129 * linux-low.cc (linux_target_ops): Update.
1130 (linux_resume): Turn into ...
1131 (linux_process_target::resume): ... this.
1132 * linux-low.h (class linux_process_target): Update.
1133 * lynx-low.cc (lynx_target_ops): Update.
1134 (lynx_resume): Turn into ...
1135 (lynx_process_target::resume): ... this.
1136 * lynx-low.h (class lynx_process_target): Update.
1137 * nto-low.cc (nto_target_ops): Update.
1138 (nto_resume): Turn into ...
1139 (nto_process_target::resume): ... this.
1140 * nto-low.h (class nto_process_target): Update.
1141 * win32-low.cc (win32_target_ops): Update.
1142 (win32_resume): Turn into ...
1143 (win32_process_target::resume): ... this.
1144 (win32_process_target::detach): Update.
1145 (do_initial_child_stuff): Update.
1146 * win32-low.h (class win32_process_target): Update.
1148 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1150 Turn process_stratum_target's thread_alive op into a method of
1153 * target.h (struct process_stratum_target): Remove the target op.
1154 (class process_target): Add the target op.
1155 (mythread_alive): Update the macro.
1157 Update the derived classes and callers below.
1159 * linux-low.cc (linux_target_ops): Update.
1160 (linux_thread_alive): Turn into ...
1161 (linux_process_target::thread_alive): ... this.
1162 (wait_for_sigstop): Update.
1163 * linux-low.h (class linux_process_target): Update.
1164 * lynx-low.cc (lynx_target_ops): Update.
1165 (lynx_thread_alive): Turn into ...
1166 (lynx_process_target::thread_alive): ... this.
1167 * lynx-low.h (class lynx_process_target): Update.
1168 * nto-low.cc (nto_target_ops): Update.
1169 (nto_thread_alive): Turn into ...
1170 (nto_process_target::thread_alive): ... this.
1171 * nto-low.h (class nto_process_target): Update.
1172 * win32-low.cc (win32_target_ops): Update.
1173 (win32_thread_alive): Turn into ...
1174 (win32_process_target::thread_alive): ... this.
1175 * win32-low.h (class win32_process_target): Update.
1177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1179 Turn process_stratum_target's join op into a method of
1182 * target.h (struct process_stratum_target): Remove the target op.
1183 (class process_target): Add the target op.
1184 (join_inferior): Update the macro.
1186 Update the derived classes and callers below.
1188 * linux-low.cc (linux_target_ops): Update.
1189 (linux_join): Turn into ...
1190 (linux_process_target::join): ... this.
1191 * linux-low.h (class linux_process_target): Update.
1192 * lynx-low.cc (lynx_target_ops): Update.
1193 (lynx_join): Turn into ...
1194 (lynx_process_target::join): ... this.
1195 * lynx-low.h (class lynx_process_target): Update.
1196 * nto-low.cc (nto_target_ops): Update.
1197 (nto_process_target::join): Define.
1198 * nto-low.h (class nto_process_target): Update.
1199 * win32-low.cc (win32_target_ops): Update.
1200 (win32_join): Turn into ...
1201 (win32_process_target::join): ... this.
1202 * win32-low.h (class win32_process_target): Update.
1204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1206 Turn process_stratum_target's mourn op into a method of
1209 * target.h (struct process_stratum_target): Remove the target op.
1210 (class process_target): Add the target op.
1212 Update the derived classes and callers below.
1214 * target.cc (target_mourn_inferior): Update.
1215 * linux-low.cc (linux_target_ops): Update.
1216 (linux_mourn): Turn into ...
1217 (linux_process_target::mourn): ... this.
1218 (handle_extended_wait): Update.
1219 (linux_process_target::kill): Update.
1220 (linux_process_target::detach): Update.
1221 * linux-low.h (class linux_process_target): Update.
1222 * lynx-low.cc (lynx_target_ops): Update.
1223 (lynx_mourn): Turn into ...
1224 (lynx_process_target::mourn): ... this.
1225 * lynx-low.h (class lynx_process_target): Update.
1226 * nto-low.cc (nto_target_ops): Update.
1227 (nto_mourn): Turn into ...
1228 (nto_process_target::mourn): ... this.
1229 * nto-low.h (class nto_process_target): Update.
1230 * win32-low.cc (win32_target_ops): Update.
1231 (win32_mourn): Turn into ...
1232 (win32_process_target::mourn): ... this.
1233 * win32-low.h (class win32_process_target): Update.
1235 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1237 Turn process_stratum_target's detach op into a method of
1240 * target.h (struct process_stratum_target): Remove the target op.
1241 (class process_target): Add the target op.
1242 (detach_inferior): Update the macro.
1244 Update the derived classes and callers below.
1246 * linux-low.cc (linux_target_ops): Update.
1247 (linux_detach): Turn into ...
1248 (linux_process_target::detach): ... this.
1249 * linux-low.h (class linux_process_target): Update.
1250 * lynx-low.cc (lynx_target_ops): Update.
1251 (lynx_detach): Turn into ...
1252 (lynx_process_target::detach): ... this.
1253 * lynx-low.h (class lynx_process_target): Update.
1254 * nto-low.cc (nto_target_ops): Update.
1255 (nto_detach): Turn into ...
1256 (nto_process_target::detach): ... this.
1257 * nto-low.h (class nto_process_target): Update.
1258 * win32-low.cc (win32_target_ops): Update.
1259 (win32_detach): Turn into ...
1260 (win32_process_target::detach): ... this.
1261 * win32-low.h (class win32_process_target): Update.
1263 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1265 Turn process_stratum_target's kill op into a method of
1268 * target.h (struct process_stratum_target): Remove the target op.
1269 (class process_target): Add the target op.
1271 Update the derived classes and callers below.
1273 * target.cc (kill_inferior): Update.
1274 * linux-low.cc (linux_target_ops): Update.
1275 (linux_kill): Turn into ...
1276 (linux_process_target::kill): ... this.
1277 * linux-low.h (class linux_process_target): Update.
1278 * lynx-low.cc (lynx_target_ops): Update.
1279 (lynx_kill): Turn into ...
1280 (lynx_process_target::kill): ... this.
1281 * lynx-low.h (class lynx_process_target): Update.
1282 * nto-low.cc (nto_target_ops): Update.
1283 (nto_kill): Turn into ...
1284 (nto_process_target::kill): ... this.
1285 * nto-low.h (class nto_process_target): Update.
1286 * win32-low.cc (win32_target_ops): Update.
1287 (win32_kill): Turn into ...
1288 (win32_process_target::kill): ... this.
1289 * win32-low.h (class win32_process_target): Update.
1291 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1293 Turn process_stratum_target's attach op into a method of
1296 * target.h (struct process_stratum_target): Remove the target op.
1297 (class process_target): Add the target op.
1298 (myattach): Update the macro.
1300 Update the derived classes and callers below.
1302 * linux-low.cc (linux_target_ops): Update.
1303 (linux_attach): Turn into ...
1304 (linux_process_target::attach): ... this.
1305 * linux-low.h (class linux_process_target): Update.
1306 * lynx-low.cc (lynx_target_ops): Update.
1307 (lynx_attach): Turn into ...
1308 (lynx_process_target::attach): ... this.
1309 * lynx-low.h (class lynx_process_target): Update.
1310 * nto-low.cc (nto_target_ops): Update.
1311 (nto_attach): Turn into ...
1312 (nto_process_target::attach): ... this.
1313 * nto-low.h (class nto_process_target): Update.
1314 * win32-low.cc (win32_target_ops): Update.
1315 (win32_attach): Turn into ...
1316 (win32_process_target::attach): ... this.
1317 * win32-low.h (class win32_process_target): Update.
1319 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1321 Turn process_stratum_target's post_create_inferior op into a method
1324 * target.h (struct process_stratum_target): Remove the target op.
1325 (class process_target): Add the target op.
1326 (target_post_create_inferior): Update the macro.
1327 * target.cc (process_target::post_create_inferior): Define.
1329 Update the derived classes and callers below.
1331 * linux-low.cc (linux_target_ops): Update.
1332 (linux_post_create_inferior): Turn into ...
1333 (linux_process_target::post_create_inferior): ... this.
1334 * linux-low.h (class linux_process_target): Update.
1335 * lynx-low.cc (lynx_target_ops): Update.
1336 * nto-low.cc (nto_target_ops): Update.
1337 * win32-low.cc (win32_target_ops): Update.
1339 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1341 Turn process_stratum_target's create_inferior op into a method of
1344 * target.h (struct process_stratum_target): Remove the target op.
1345 (class process_target): Add the target op.
1346 (create_inferior): Rename the macro to ...
1347 (target_create_inferior): ... this.
1349 Update the derived classes and callers below.
1351 * server.cc (handle_v_run): Update.
1352 (captured_main): Update.
1353 (process_serial_event): Update.
1354 * linux-low.cc (linux_target_ops): Update.
1355 (linux_create_inferior): Turn into ...
1356 (linux_process_target::create_inferior): ... this.
1357 * linux-low.h (class linux_process_target): Update.
1358 * lynx-low.cc (lynx_target_ops): Update.
1359 (lynx_create_inferior): Turn into ...
1360 (lynx_process_target::create_inferior): ... this.
1361 * lynx-low.h (class lynx_process_target): Update.
1362 * nto-low.cc (nto_target_ops): Update.
1363 (nto_create_inferior): Turn into ...
1364 (nto_process_target::create_inferior): ... this.
1365 * nto-low.h (class nto_process_target): Update.
1366 * win32-low.cc (win32_target_ops): Update.
1367 (win32_create_inferior): Turn into ...
1368 (win32_process_target::create_inferior): ... this.
1369 * win32-low.h (class win32_process_target): Update.
1371 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1373 * target.h (class process_target): New class definition.
1374 (struct process_stratum_target) <pt>: New field with type
1376 * linux-low.h (class linux_process_target): Define as a derived
1377 class of 'process_target'.
1378 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1380 * lynx-low.h (class lynx_process_target): Define as a derived
1381 class of 'process_target'.
1382 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1384 * nto-low.h (class nto_process_target): Define as a derived
1385 class of 'process_target'.
1386 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1388 * win32-low.h (class win32_process_target): Define as a derived
1389 class of 'process_target'.
1390 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1393 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1395 * configure: Regenerate.
1397 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1398 Andrew Burgess <andrew.burgess@embecosm.com>
1400 * linux-riscv-low.cc: New file.
1401 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1402 and nat/riscv-linux-tdesc.c.
1403 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1404 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1407 2020-02-14 Tom Tromey <tom@tromey.com>
1409 * acinclude.m4: Don't include acx_configure_dir.m4.
1410 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1411 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1412 (all, install-only, uninstall, clean-info, clean)
1413 (maintainer-clean): Don't recurse.
1414 (subdir_do, all-lib): Remove.
1415 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1417 (generated_files): Update.
1418 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1419 * configure: Rebuild.
1420 * configure.ac: Don't configure gnulib or libiberty.
1423 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1425 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1426 preparing the command line for CreateProcess.
1427 (win32_create_inferior): Reflect the program name in debugging
1428 output that shows the process and its command line.
1430 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1432 * Makefile.in: Rename source files from .c to .cc.
1433 * %.c: Rename to %.cc.
1434 * configure.ac: Rename server.c to server.cc.
1435 * configure: Re-generate.
1437 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1439 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1441 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1443 * win32-low.c (win32_create_inferior): Set signal_pid.
1445 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1446 Pedro Alves <palves@redhat.com>
1448 Skip building gdbserver in a cross-configuration.
1449 * configure.srv: Set $gdbserver_host depending on whether $target
1450 is $host. Use $gdbserver_host instead of $host.
1452 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1454 * configure: Re-generate.
1456 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1458 * configure: Re-generate.
1460 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1462 * acinclude.m4: Update warning.m4 path.
1464 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1466 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1467 (handle_exception): Set siginfo_er.
1468 (win32_xfer_siginfo): New function.
1470 2020-02-07 Tom Tromey <tom@tromey.com>
1471 Pedro Alves <palves@redhat.com>
1473 * README: Update build documentation.
1474 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1476 * configure.ac: Update paths.
1477 * configure: Rebuild.
1478 * acinclude.m4: Update paths.
1479 * Makefile.in: Update include paths.
1480 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1481 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1482 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1483 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1484 (%-generated.c): Update paths.
1485 * Move entire directory from ../gdb/gdbserver.
1487 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1489 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1491 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1493 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1494 assignment instead of srv_linux_obj.
1496 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1498 * server.c (handle_qxfer_libraries): Write segment-address with
1501 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1503 * Makefile.in (install-strip): New target.
1504 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1505 * aclocal.m4: Regenerate.
1506 * configure: Regenerate.
1507 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1509 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1511 * Makefile.in (SFILES): Adjust paths to point to real files.
1512 (OBS): Move waitstatus.o to target/waitstatus.o.
1513 (TAGS): Transform paths appropriately.
1515 (nat/%.o): ... this pattern rule.
1517 (target/%.o): ... this pattern rule.
1518 * configure.srv: Adjust paths throughout to include nat/ prefix
1519 with the revant files.
1520 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1521 * configure: Regenerate.
1523 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1525 * Makefile.in (TAGS): Remove config files from the recipe.
1527 2020-01-14 Tom Tromey <tom@tromey.com>
1529 * configure: Rebuild.
1530 * configure.ac: Remove any checks that were added to common.m4.
1531 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1534 2020-01-14 Tom Tromey <tom@tromey.com>
1536 * server.h: Include config.h.
1537 * gdbreplay.c: Include config.h.
1538 * configure: Rebuild.
1539 * configure.ac: Don't source common.host.
1540 * acinclude.m4: Update path.
1541 * Makefile.in (INCSUPPORT): New variable.
1542 (INCLUDE_CFLAGS): Add INCSUPPORT.
1543 (SFILES): Update paths.
1544 (version-generated.c): Update path to create-version.sh.
1545 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1547 2020-01-14 Tom Tromey <tom@tromey.com>
1549 * configure.ac (LIBS): Use WIN32APILIBS.
1550 (USE_WIN32API): Don't define.
1551 * configure: Rebuild.
1553 2020-01-14 Tom Tromey <tom@tromey.com>
1555 * configure: Rebuild.
1557 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1559 * Makefile.in (%-generated.c): Remove rule for files from
1562 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1564 * configure: Re-generate.
1566 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1568 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1570 * tracepoint.c (stop_tracing, flush_trace_buffer,
1571 about_to_request_buffer_space, get_trace_state_variable_value,
1572 set_trace_state_variable_value, gdb_collect): Add declaration.
1574 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1576 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1577 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1578 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1579 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1580 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1583 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1585 * inferiors.c: Include gdbsupport/common-inferior.h.
1587 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1589 * hostio-errno.c: Include hostio.h.
1591 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1593 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1596 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1598 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1599 * linux-arm-tdesc.h: Include arch/arm.h.
1601 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1603 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1605 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1607 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1608 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1610 2020-01-10 Pedro Alves <palves@redhat.com>
1612 * fork-child.c (post_fork_inferior): Pass target down to
1614 * inferiors.c (switch_to_thread): Add process_stratum_target
1616 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1617 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1618 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1619 * remote-utils.c (prepare_resume_reply): Pass the target to
1621 * target.c (the_target): Now a process_stratum_target.
1622 (done_accessing_memory): Pass the target to switch_to_thread.
1623 (set_target_ops): Ajust to use process_stratum_target.
1624 * target.h (struct target_ops): Rename to ...
1625 (struct process_stratum_target): ... this.
1626 (the_target, set_target_ops): Adjust.
1627 (prepare_to_access_memory): Adjust comment.
1628 * win32-low.c (child_xfer_memory): Adjust to use
1629 process_stratum_target.
1630 (win32_target_ops): Now a process_stratum_target.
1632 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1633 Pedro Alves <palves@redhat.com>
1635 * win32-low.c (get_child_debug_event): Extract the fatal exception
1636 from the exit status and convert to the equivalent Posix signal
1638 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1639 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1641 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1643 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1645 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1647 * server.c (gdbserver_version): Change copyright year to 2020.
1648 * gdbreplay.c (gdbreplay_version): Likewise.
1650 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1652 * configure: Regenerate.
1653 * configure.ac: Quote variable arguments of test.
1655 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1657 * Makefile.in: Fix build with GNU Make 3.81
1659 2019-12-16 Tom Tromey <tromey@adacore.com>
1661 * server.c (get_exec_file): Constify result.
1663 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1665 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1666 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1667 * config.in: Regenerate.
1668 * configure: Regenerate.
1669 * configure.ac: Don't check for strerror.
1670 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1671 Call safe_strerror instead of strerror.
1672 * server.h (strerror): Remove this now-unnecessary declaration.
1673 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1675 (gdb_agent_helper_thread): Likewise.
1676 * utils.c (perror_with_name): Likewise.
1678 2019-11-26 Tom Tromey <tom@tromey.com>
1680 * configure, config.in: Rebuild.
1682 2019-11-26 Tom Tromey <tom@tromey.com>
1684 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1685 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1687 * configure, config.in: Rebuild.
1689 2019-11-26 Tom Tromey <tom@tromey.com>
1691 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1692 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1693 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1694 * acinclude.m4: Include ax_pthread.m4.
1695 * config.in, configure: Rebuild.
1697 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1699 * debug.c (debug_set_output): Call safe_strerror instead of
1701 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1702 (linux_kill_one_lwp): Likewise.
1703 (linux_detach_one_lwp): Likewise.
1704 (linux_wait_for_event_filtered): Likewise.
1705 (store_register): Likewise.
1706 * lynx-low.c (lynx_attach): Likewise.
1707 * mem-break.c (insert_memory_breakpoint): Likewise.
1708 (remove_memory_breakpoint): Likewise.
1709 (delete_fast_tracepoint_jump): Likewise.
1710 (set_fast_tracepoint_jump): Likewise.
1711 (uninsert_fast_tracepoint_jumps_at): Likewise.
1712 (reinsert_fast_tracepoint_jumps_at): Likewise.
1713 * nto-low.c (nto_xfer_memory): Likewise.
1714 (nto_resume): Likewise.
1716 2019-11-20 Luis Machado <luis.machado@linaro.org>
1718 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1719 instead of register count.
1720 * tdesc.c (tdesc_contains_feature): New function.
1721 * tdesc.h (tdesc_contains_feature): New prototype.
1723 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1725 * Makefile.in: Add safe-strerror.c.
1726 * configure: Regenerate.
1727 * configure.ac: Don't source common.host.
1729 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1731 * config.in: Regenerate.
1732 * configure: Regenerate.
1734 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1736 * ax.c (ax_printf): Handle size_t_arg.
1738 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1740 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1741 * mi/mi-main.c (output_cores): Likewise.
1742 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1743 (linux_xfer_osdata_modules): Likewise.
1744 * remote.c (register_remote_support_xml): Likewise.
1745 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1746 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1748 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1750 * configure: Regenerate.
1751 * configure.ac: Remove check for strerror_r.
1753 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1755 * config.in: Regenerate.
1756 * configure: Regenerate.
1757 * configure.ac: Also check for strerror_r.
1759 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1761 * ax.h (debug_agent): Remove duplicate declaration.
1763 2019-10-26 Tom de Vries <tdevries@suse.de>
1765 * linux-aarch64-low.c: Fix typos in comments.
1766 * linux-arm-low.c: Same.
1767 * linux-low.c: Same.
1768 * linux-ppc-low.c: Same.
1769 * proc-service.c: Same.
1772 * tracepoint.c: Same.
1773 * win32-low.c: Same.
1775 2019-10-25 Tom Tromey <tromey@adacore.com>
1777 * utils.c (xstrdup): Remove.
1779 2019-10-23 Tom Tromey <tom@tromey.com>
1781 * configure, config.in: Rebuild.
1783 2019-10-23 Tom Tromey <tom@tromey.com>
1785 * configure: Rebuild.
1786 * acinclude.m4: Use m4_include, not sinclude.
1788 2019-10-17 Tom Tromey <tromey@adacore.com>
1790 * configure: Rebuild.
1791 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1792 in AC_CONFIG_FILES invocation.
1793 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1796 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1798 * server.c: Include xml-builtin.h.
1799 (get_xml_features): Don't declare xml_builtins here.
1801 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1803 * Makefile.in: Remove references to vec-ipa.o.
1805 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1807 * Makefile.in: Remove references to vec.c.
1809 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1811 * server.c (server_waiting): Change to bool.
1812 (extended_protocol): Likewise.
1813 (response_needed): Likewise.
1814 (exit_requested): Likewise.
1815 (run_once): Likewise.
1816 (report_no_resumed): Likewise.
1817 (non_stop): Likewise.
1818 (disable_packet_vCont): Likewise.
1819 (disable_packet_Tthread): Likewise.
1820 (disable_packet_qC): Likewise.
1821 (disable_packet_qfThreadInfo): Likewise.
1822 (handle_general_set): Update.
1823 (handle_detach): Update.
1824 (handle_monitor_command): Update.
1825 (handle_query): Update.
1826 (captured_main): Update.
1827 (process_serial_event): Update.
1828 * server.h (server_waiting): Change to bool.
1829 (disable_packet_vCont): Likewise.
1830 (disable_packet_Tthread): Likewise.
1831 (disable_packet_qC): Likewise.
1832 (disable_packet_qfThreadInfo): Likewise.
1833 (run_once): Likewise.
1834 (non_stop): Likewise.
1835 * target.c (target_stop_and_wait): Update.
1837 2019-10-02 Tom Tromey <tromey@adacore.com>
1839 * Makefile.in (SFILES): Add common-inferior.c.
1840 (OBS): Add common-inferior.o.
1841 * server.c (startup_with_shell): Don't define.
1843 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1845 * linux-low.c (linux_low_read_btrace): Update for change to
1848 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1850 * debug.c (debug_threads): Remove comment in favor of the header.
1851 * debug.h (using_threads): Add declaration.
1852 (debug_threads): Add comment.
1853 * linux-aarch64-low.c: Include debug.h and remove declaration of
1855 * nto-low.c: Likewise.
1856 * remote-utils.c: Likewise.
1857 * thread-db.c: Likewise.
1859 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1861 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1862 and powerpc-cell64l-ipa.o.
1863 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1864 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1865 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1868 * spu-low.c: Remove file.
1870 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1871 (parse_spufs_run): Remove.
1872 (ppc_get_pc): Remove Cell/B.E. support.
1873 (ppc_set_pc): Likewise.
1874 (ppc_breakpoint_at): Likewise.
1875 (ppc_arch_setup): Likewise.
1876 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1877 tdesc_powerpc_cell32l.
1878 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1879 or init_registers_powerpc_cell32l.
1880 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1881 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1882 or init_registers_powerpc_cell32l.
1883 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1884 (init_registers_powerpc_cell32l): Remove prototype.
1885 (init_registers_powerpc_cell64l): Likewise.
1887 * target.h (struct target_ops): Remove qxfer_spu member.
1888 * server.c (handle_qxfer_spu): Remove.
1889 (qxfer_packets): Remove entry for "spu".
1890 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1891 * linux-low.c (SPUFS_MAGIC): Remove.
1892 (spu_enumerate_spu_ids): Remove.
1893 (linux_qxfer_spu): Remove.
1894 (linux_target_ops): Remove qxfer_spu member.
1895 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1896 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1897 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1899 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1901 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1902 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1903 * config.in: Regenerate.
1904 * configure: Regenerate.
1906 2019-08-15 Tom Tromey <tromey@adacore.com>
1908 * target.c (target_write_memory): Use gdb::byte_vector.
1910 2019-08-15 Tom Tromey <tromey@adacore.com>
1912 * tracepoint.c (write_inferior_data_pointer)
1913 (write_inferior_integer, write_inferior_int8)
1914 (write_inferior_uinteger, m_tracepoint_action_download)
1915 (r_tracepoint_action_download, x_tracepoint_action_download)
1916 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1917 (download_agent_expr, download_tracepoint_1)
1918 (download_trace_state_variables, upload_fast_traceframes): Update.
1919 * server.c (gdb_write_memory): Update.
1920 * remote-utils.c (relocate_instruction): Update.
1921 * proc-service.c (ps_pdwrite): Update.
1922 * mem-break.c (remove_memory_breakpoint)
1923 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1924 (uninsert_fast_tracepoint_jumps_at)
1925 (reinsert_fast_tracepoint_jumps_at): Update.
1926 * linux-x86-low.c (append_insns)
1927 (i386_install_fast_tracepoint_jump_pad)
1928 (amd64_write_goto_address, i386_write_goto_address): Update.
1929 * linux-s390-low.c (append_insns, s390_write_goto_address):
1931 * linux-ppc-low.c (ppc_relocate_instruction)
1932 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1933 (ppc_write_goto_address): Update.
1934 * linux-aarch64-low.c (append_insns): Update.
1935 * target.h (struct target_ops): Update.
1936 (write_inferior_memory): Don't declare.
1937 * target.c (target_write_memory): Rename from
1938 write_inferior_memory. Remove old target_write_memory.
1940 2019-08-15 Tom Tromey <tromey@adacore.com>
1942 * target.c (write_inferior_memory): Use std::vector.
1944 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1947 * configure.ac: Drop enable-libmcheck support.
1948 * configure, config.in: Rebuild.
1949 * acinclude.m4: Don't include it.
1951 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1953 * configure.srv: Remove Arm xml files.
1955 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1957 * configure.srv: Add new files. Remove xml generated files.
1958 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1960 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1961 * linux-aarch32-tdesc.c: New file.
1962 * linux-aarch32-tdesc.h: New file.
1963 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1964 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1965 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1966 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1967 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1968 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1969 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1970 (arm_read_description): Call arm_linux_read_description.
1971 (initialize_low_arch): Don't init registers.
1972 * linux-arm-tdesc.c: New file.
1973 * linux-arm-tdesc.h: New file.
1975 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1977 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1978 Move counter inside for.
1979 (arm_read_description): Check ptrace earlier.
1980 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1982 2019-07-09 Tom Tromey <tom@tromey.com>
1984 * configure: Rebuild.
1985 * configure.ac: Change common to gdbsupport.
1986 * acinclude.m4: Change common to gdbsupport.
1987 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1988 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1989 common to gdbsupport.
1990 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1991 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1992 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1993 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1994 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1995 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1996 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1997 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1998 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1999 common to gdbsupport.
2001 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2003 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2005 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2007 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2009 * configure.srv: Remove legacy xml.
2010 * linux-aarch64-low.c (initialize_low_arch): Remove
2011 initialize_low_tdesc call.
2012 * linux-aarch64-tdesc-selftest.c: Remove file.
2013 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2014 * linux-x86-low.c (initialize_low_arch): Remove
2015 initialize_low_tdesc call.
2016 * linux-x86-tdesc-selftest.c: Remove file.
2017 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2019 2019-06-20 Tom de Vries <tdevries@suse.de>
2021 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2022 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2024 2019-06-19 Tom de Vries <tdevries@suse.de>
2026 * debug.h (debug_write): Change return type to ssize_t.
2027 * debug.c (debug_write): Same.
2029 2019-06-14 Tom Tromey <tom@tromey.com>
2031 * configure.ac: Use new path to gnulib.
2032 * configure: Rebuild.
2033 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2036 2019-06-11 Tom Tromey <tom@tromey.com>
2038 * Makefile.in (SFILES): Add alloc.c.
2040 (IPA_OBJS): Add alloc-ipa.o.
2041 (alloc-ipa.o): New target.
2042 (%.o: ../%.c): New pattern rule.
2044 2019-06-10 Tom Tromey <tromey@adacore.com>
2046 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2047 end warning with a newline.
2048 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2050 * thread-db.c (attach_thread): Don't end warning with a newline.
2051 (thread_db_notice_clone): Likewise.
2052 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2054 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2055 end warning with a newline.
2057 2019-06-04 Pedro Alves <palves@redhat.com>
2059 * server.c (captured_main): Use make_unique_xstrdup.
2061 2019-06-02 Tom Tromey <tom@tromey.com>
2063 * gdbreplay.c (fromhex): Remove.
2064 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2066 2019-05-29 Tom Tromey <tromey@adacore.com>
2068 * configure: Rebuild.
2070 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2072 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2073 sign extension code on 32-bit builds.
2075 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2078 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2080 2019-04-19 Tom Tromey <tom@tromey.com>
2082 * server.c (struct vstop_notif): Derive from notif_event.
2084 (queue_stop_reply): Update.
2085 (remove_all_on_match_ptid): Change type. Rewrite.
2086 (discard_queued_stop_replies): Rewrite.
2087 (in_queued_stop_replies_ptid): Change type.
2088 (in_queued_stop_replies): Rewrite.
2089 (notif_stop): Update.
2090 (queue_stop_reply_callback): Update.
2091 (captured_main): Don't call initialize_notif.
2092 (push_stop_notification): Update.
2093 * notif.c (notif_write_event, handle_notif_ack)
2094 (notif_event_enque, notif_push): Update.
2095 (notif_event_xfree, initialize_notif): Remove.
2096 * notif.h (struct notif_event): Include <list>, not
2098 (struct notif_server) <queue>: Now a std::list.
2099 (notif_event_p): Remove typedef.
2100 (initialize_notif): Don't declare.
2101 (struct notif_event): Add virtual destructor.
2103 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2105 * ax.c (ax_vdebug): Call debug_printf.
2106 * debug.c (debug_write): New function.
2107 * debug.h (debug_write): New declaration.
2108 * linux-low.c (sigchld_handler): Call debug_write.
2110 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2112 * debug.c (debug_set_output): New function.
2113 (debug_vprintf): Send output to debug_file.
2114 (debug_flush): Likewise.
2115 * debug.h (debug_set_output): New declaration.
2116 * server.c (handle_monitor_command): Add debug-file option.
2117 (captured_main): Likewise.
2119 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2121 * debug.c (remote_debug): Add definition.
2122 * debug.h (remote_debug): Add declaration.
2123 * hostio.c (remote_debug): Remove declaration.
2124 * remote-utils.c (struct ui_file): Likewise.
2125 (remote_debug): Likewise.
2126 * remote-utils.h (remote_debug): Likewise,
2127 * server.c (remote_debug): Remove definition.
2129 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2131 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2132 when using a 64-bit gdbserver.
2134 2019-04-09 Tom Tromey <tromey@adacore.com>
2136 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2138 2019-04-08 Tom Tromey <tom@tromey.com>
2140 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2142 (linux_resume_one_lwp): Likewise.
2144 2019-04-08 Tom Tromey <tom@tromey.com>
2146 * gdbreplay.c: Update.
2147 * linux-low.c: Update.
2150 2019-04-08 Tom Tromey <tom@tromey.com>
2152 * server.c: Use C++ exception handling.
2153 * linux-low.c: Use C++ exception handling.
2154 * gdbreplay.c: Use C++ exception handling.
2156 2019-04-08 Tom Tromey <tom@tromey.com>
2158 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2159 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2160 (captured_main, main): Update.
2161 * gdbreplay.c (main): Update.
2163 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2165 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2166 value in argument pointer, return 1 if the entry is found and 0
2167 otherwise. Move comment.
2168 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2169 * linux-low.h (linux_get_auxv): Declare.
2170 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2172 2019-04-05 Tom Tromey <tromey@adacore.com>
2174 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2177 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2179 * linux-low.c (AT_HWCAP2): Add define if not already included.
2181 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2183 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2184 (aarch64_arch_setup): Call linux_get_hwcap.
2185 * linux-arm-low.c (arm_get_hwcap): Remove function.
2186 (arm_read_description): Call linux_get_hwcap.
2187 * linux-low.c (linux_get_auxv): New function.
2188 (linux_get_hwcap): Likewise.
2189 (linux_get_hwcap2): Likewise.
2190 * linux-low.h (linux_get_hwcap): New declaration.
2191 (linux_get_hwcap2): Likewise.
2192 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2193 (ppc_arch_setup): Call linux_get_hwcap.
2194 * linux-s390-low.c (s390_get_hwcap): Remove function.
2195 (s390_arch_setup): Call linux_get_hwcap.
2197 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2198 Jiong Wang <jiong.wang@arm.com>
2200 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2201 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2203 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2205 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2206 Jiong Wang <jiong.wang@arm.com>
2208 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2209 (aarch64_get_hwcap): New function.
2210 (aarch64_arch_setup): Read APIA hwcap.
2212 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2213 Jiong Wang <jiong.wang@arm.com>
2215 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2216 (initialize_low_tracepoint): Likewise.
2217 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2218 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2219 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2220 (aarch64_linux_read_description): Likewise.
2221 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2223 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2225 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2226 i386_create_target_description for 'segments' parameter.
2227 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2228 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2229 * win32-i386-low.c (i386_arch_setup): Likewise.
2231 2019-03-12 Tom Tromey <tromey@adacore.com>
2233 * linux-low.c (iterate_over_lwps): Update.
2235 2019-03-06 Tom Tromey <tom@tromey.com>
2237 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2238 (captured_main): Use SCOPE_EXIT.
2240 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2242 * configure.srv: Use '$enable_unittest' instead of '$development'
2243 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2246 2019-02-27 Tom Tromey <tromey@adacore.com>
2248 * gdbreplay.c (logchar): Handle \r\n.
2250 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2252 * linux-low.c (linux_attach): Add process before lwp.
2253 * server.c (attach_inferior): Check if already attached.
2255 2019-02-07 Tom Tromey <tom@tromey.com>
2257 * x86-tdesc.h: Rename include guard.
2258 * x86-low.h: Add include guard.
2259 * wincecompat.h: Rename include guard.
2260 * win32-low.h: Add include guard.
2261 * utils.h: Rename include guard.
2262 * tracepoint.h: Rename include guard.
2263 * tdesc.h: Rename include guard.
2264 * target.h: Rename include guard.
2265 * server.h: Rename include guard.
2266 * remote-utils.h: Rename include guard.
2267 * regcache.h: Rename include guard.
2268 * nto-low.h: Rename include guard.
2269 * notif.h: Add include guard.
2270 * mem-break.h: Rename include guard.
2271 * lynx-low.h: Add include guard.
2272 * linux-x86-tdesc.h: Add include guard.
2273 * linux-s390-tdesc.h: Add include guard.
2274 * linux-ppc-tdesc-init.h: Add include guard.
2275 * linux-low.h: Add include guard.
2276 * linux-aarch64-tdesc.h: Add include guard.
2277 * linux-aarch32-low.h: Add include guard.
2278 * inferiors.h: Rename include guard.
2279 * i387-fp.h: Rename include guard.
2280 * hostio.h: Rename include guard.
2281 * gdbthread.h: Rename include guard.
2282 * gdb_proc_service.h: Rename include guard.
2283 * event-loop.h: Rename include guard.
2284 * dll.h: Rename include guard.
2285 * debug.h: Rename include guard.
2286 * ax.h: Rename include guard.
2288 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2291 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2292 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2294 2019-01-25 Tom Tromey <tom@tromey.com>
2296 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2298 2019-01-25 Tom Tromey <tom@tromey.com>
2300 * win32-low.c: Fix common/ includes.
2301 * win32-i386-low.c: Fix common/ includes.
2302 * tracepoint.c: Fix common/ includes.
2303 * thread-db.c: Fix common/ includes.
2304 * target.h: Fix common/ includes.
2305 * symbol.c: Fix common/ includes.
2306 * spu-low.c: Fix common/ includes.
2307 * server.h: Fix common/ includes.
2308 * server.c: Fix common/ includes.
2309 * remote-utils.c: Fix common/ includes.
2310 * regcache.h: Fix common/ includes.
2311 * regcache.c: Fix common/ includes.
2312 * nto-x86-low.c: Fix common/ includes.
2313 * notif.h: Fix common/ includes.
2314 * mem-break.h: Fix common/ includes.
2315 * lynx-low.c: Fix common/ includes.
2316 * lynx-i386-low.c: Fix common/ includes.
2317 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2318 * linux-x86-low.c: Fix common/ includes.
2319 * linux-low.c: Fix common/ includes.
2320 * inferiors.h: Fix common/ includes.
2321 * i387-fp.c: Fix common/ includes.
2322 * hostio.c: Fix common/ includes.
2323 * hostio-errno.c: Fix common/ includes.
2324 * gdbthread.h: Fix common/ includes.
2325 * gdbreplay.c: Fix common/ includes.
2326 * fork-child.c: Fix common/ includes.
2327 * event-loop.c: Fix common/ includes.
2329 (enum gdb_agent_op): Fix common/ includes.
2331 2019-01-21 Tom Tromey <tom@tromey.com>
2333 * tracepoint.c: Fix includes.
2334 * remote-utils.c: Fix includes.
2335 * linux-x86-low.c: Fix includes.
2337 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2339 * gdbreplay.c (gdbreplay_version): Update copyright year in
2341 * server.c (gdbserver_version): Likewise.
2343 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2345 * linux-low.c (add_lwp): Switch ordering.
2347 2018-11-29 Tom Tromey <tom@tromey.com>
2349 * win32-low.c (win32_join): Take pid, not process.
2350 * target.h (struct target_ops) <join>: Change argument type.
2351 (join_inferior): Change argument name.
2352 * spu-low.c (spu_join): Take pid, not process.
2353 * server.c (handle_detach): Preserve pid before destroying
2355 * lynx-low.c (lynx_join): Take pid, not process.
2356 * linux-low.c (linux_join): Take pid, not process.
2358 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2360 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2361 (aarch64_cannot_fetch_register): Likewise.
2362 (struct linux_target_ops): Update references.
2364 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2366 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2368 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2370 * configure.srv (ipa_ppc_linux_regobj): Add
2371 powerpc-isa207-htm-vsx32l-ipa.o and
2372 powerpc-isa207-htm-vsx64l-ipa.o.
2373 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2374 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2375 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2376 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2377 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2378 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2379 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2380 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2381 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2382 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2383 (init_registers_powerpc_isa207_htm_vsx32l)
2384 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2385 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2386 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2387 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2388 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2389 (ppc_store_tm_ctarregset): New functions.
2390 (ppc_regsets): Add entries for HTM regsets.
2391 (ppc_arch_setup): Set htm in features struct when needed. Set
2392 sizes for the HTM regsets.
2393 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2394 (initialize_low_arch): Call
2395 init_registers_powerpc_isa207_htm_vsx32l and
2396 init_registers_powerpc_isa207_htm_vsx64l.
2397 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2398 PPC_TDESC_ISA207_HTM_VSX.
2399 (initialize_low_tracepoint): Call
2400 init_registers_powerpc_isa207_htm_vsx32l and
2401 init_registers_powerpc_isa207_htm_vsx64l.
2403 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2405 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2406 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2407 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2408 (ppc_store_pmuregset): New functions.
2409 (ppc_regsets): Add entries for ebb and pmu regsets.
2410 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2411 pmu regsets are available. Set sizes for these regsets.
2413 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2415 * configure.srv (ipa_ppc_linux_regobj): Add
2416 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2417 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2418 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2419 rs6000/powerpc-isa207-vsx32l.xml, and
2420 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2421 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2422 <PPC_TDESC_ISA207_VSX>: New enum value.
2423 (init_registers_powerpc_isa207_vsx32l): Declare.
2424 (init_registers_powerpc_isa207_vsx64l): Declare.
2425 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2426 (ppc_store_tarregset): New function.
2427 (ppc_regsets): Add entry for the TAR regset.
2428 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2429 size for the TAR regsets.
2430 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2431 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2432 and init_registers_powerpc_isa207_vsx64l.
2433 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2434 (initialize_low_tracepoint): Call
2435 init_registers_powerpc_isa207_vsx32l and
2436 init_registers_powerpc_isa207_vsx64l.
2438 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2439 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2441 * configure.srv (ipa_ppc_linux_regobj): Add
2442 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2443 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2444 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2445 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2446 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2447 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2448 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2449 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2450 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2451 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2452 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2453 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2454 (ppc_hwcap): Add comment.
2455 (ppc_hwcap2): New global.
2456 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2457 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2458 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2459 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2460 when needed. Set sizes for the the DSCR and PPR regsets.
2461 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2462 (initialize_low_arch): Call
2463 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2464 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2465 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2466 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2467 (initialize_low_tracepoint): Call
2468 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2469 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2471 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2473 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2475 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2476 Simon Marchi <simark@simark.ca>
2478 * acinclude.m4: Include "../selftest.m4".
2479 * configure: Regenerate.
2480 * configure.ac: Use "GDB_AC_SELFTEST".
2481 * configure.srv: Use "$enable_unittests" instead of
2482 "$development" when checking whether unit tests have been
2484 * server.c (captured_main): Update message informing that
2485 selftests have been disabled.
2487 2018-10-04 Tom Tromey <tom@tromey.com>
2489 * configure: Rebuild.
2491 2018-10-04 Tom Tromey <tom@tromey.com>
2493 * server.c (handle_status): Rename inner "thread".
2494 (process_serial_event): Declare "res" in 'm' case.
2495 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2496 (iterate_over_lwps): Rename inner "thread".
2497 (linux_qxfer_libraries_svr4): Rename inner "len".
2498 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2500 2018-10-01 Gary Benson <gbenson@redhat.com>
2502 * gdb_proc_service.h: Moved common code to
2503 common/gdb_proc_service.h.
2505 2018-10-01 Gary Benson <gbenson@redhat.com>
2507 * gdb_proc_service.h: Synchronize comments and whitespace with
2508 GDB's version of this file.
2510 2018-09-25 Tom Tromey <tom@tromey.com>
2512 * configure: Rebuild.
2513 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2515 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2517 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2518 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2519 ($(IPA_LIB)): Sort IPA_OBJS.
2521 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2523 * Makefile.in: Remove references to $(ADD_DEPS).
2525 2018-09-16 Tom Tromey <tom@tromey.com>
2527 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2529 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2532 2018-09-05 Tom Tromey <tom@tromey.com>
2534 * configure: Rebuild.
2536 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2539 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2541 2018-08-27 Tom Tromey <tom@tromey.com>
2544 * configure: Rebuild.
2546 2018-08-27 Tom Tromey <tom@tromey.com>
2548 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2549 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2550 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2551 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2552 (s390x_emit_stack_adjust): Add casts to unsigned char.
2554 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2558 * server.h (struct client_state) <disable_randomization>:
2561 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2563 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2565 (mips_supply_ptrace_register): Likewise.
2567 2018-07-22 Tom Tromey <tom@tromey.com>
2569 * configure: Rebuild.
2571 2018-07-22 Tom Tromey <tom@tromey.com>
2573 * win32-low.c (win32_create_inferior): Remove unused variables.
2574 * gdbreplay.c (remote_open): Remove unused variable.
2575 * remote-utils.c (remote_prepare): Remove unused variable.
2576 * x86-tdesc.h (X86_TDESC_H): Define.
2577 (amd64_expedite_regs): Define conditionally.
2578 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2579 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2580 * remote-utils.c (readchar): Remove unused variable.
2582 2018-07-13 Pedro Alves <palves@redhat.com>
2584 * linux-low.c (linux_kill): Change parameter to process_info
2585 pointer instead of pid. Adjust.
2586 * lynx-low.c (lynx_kill): Likewise.
2587 * nto-low.c (nto_kill): Likewise.
2588 * spu-low.c (spu_kill): Likewise.
2589 * win32-low.c (win32_kill): Likewise.
2590 * server.c (handle_v_kill, kill_inferior_callback)
2591 (detach_or_kill_for_exit): Adjust.
2592 * target.c (kill_inferior): Change parameter to process_info
2593 pointer instead of pid. Adjust.
2594 * target.h (struct target_ops) <kill>: Change parameter to
2595 process_info pointer instead of pid. Adjust all implementations
2597 (kill_inferior): Likewise.
2599 2018-07-13 Pedro Alves <palves@redhat.com>
2601 * linux-low.c (linux_detach, linux_join): Change parameter to
2602 process_info pointer instead of pid. Adjust.
2603 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2604 * nto-low.c (nto_detach): Likewise.
2605 * spu-low.c (spu_detach, spu_join): Likewise.
2606 * win32-low.c (win32_detach, win32_join): Likewise.
2607 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2608 * target.h (struct target_ops) <detach, join>: Change parameter to
2609 process_info pointer instead of pid. Adjust all implementations
2611 (detach_inferior, join_inferior): Rename 'pid' parameter to
2614 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2615 Jan Kratochvil <jan.kratochvil@redhat.com>
2616 Paul Fertser <fercerpav@gmail.com>
2617 Tsutomu Seki <sekiriki@gmail.com>
2619 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2620 (OBS): Add 'common/netstuff.o'.
2621 (GDBREPLAY_OBS): Likewise.
2622 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2623 (remote_open): Implement support for IPv6
2625 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2627 (handle_accept_event): Accept connections from IPv6 sources.
2628 (remote_prepare): Handle IPv6-style hostnames; implement
2629 support for IPv6 connections.
2630 (remote_open): Implement support for printing connections from
2633 2018-07-11 Pedro Alves <palves@redhat.com>
2636 * mem-break.c (any_persistent_commands): Add process_info
2637 parameter and use it instead of relying on the current process.
2638 Change return type to bool.
2639 * mem-break.h (any_persistent_commands): Add process_info
2640 parameter and change return type to bool.
2641 * server.c (handle_detach): Remove require_running_or_return call.
2642 Look up the process_info for the process we're about to detach.
2643 If not found, return back error to GDB. Adjust
2644 any_persistent_commands call to pass down a process pointer.
2646 2018-07-11 Pedro Alves <palves@redhat.com>
2648 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2649 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2650 instead of collect_register_by_name.
2651 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2652 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2654 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2655 Pedro Alves <palves@redhat.com>
2657 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2659 2018-07-03 Tom Tromey <tom@tromey.com>
2661 * linux-low.c: Update.
2662 * lynx-low.c: Update.
2663 * mem-break.c: Update.
2664 * nto-low.c: Update.
2665 * remote-utils.c: Update.
2667 * spu-low.c: Update.
2669 * win32-low.c: Update.
2671 2018-07-03 Tom Tromey <tom@tromey.com>
2675 2018-07-03 Tom Tromey <tom@tromey.com>
2677 * linux-low.c: Update.
2679 2018-07-03 Tom Tromey <tom@tromey.com>
2683 2018-07-03 Tom Tromey <tom@tromey.com>
2685 * linux-low.c: Update.
2686 * linux-mips-low.c: Update.
2687 * lynx-low.c: Update.
2688 * nto-low.c: Update.
2689 * remote-utils.c: Update.
2691 * spu-low.c: Update.
2693 * thread-db.c: Update.
2695 2018-07-03 Tom Tromey <tom@tromey.com>
2697 * linux-low.c: Update.
2698 * linux-mips-low.c: Update.
2699 * lynx-low.c: Update.
2700 * mem-break.c: Update.
2701 * nto-low.c: Update.
2702 * remote-utils.c: Update.
2704 * spu-low.c: Update.
2706 * tracepoint.c: Update.
2708 2018-07-03 Tom Tromey <tom@tromey.com>
2710 * linux-low.c: Update.
2711 * linux-ppc-low.c: Update.
2712 * linux-x86-low.c: Update.
2713 * proc-service.c: Update.
2715 * spu-low.c: Update.
2716 * thread-db.c: Update.
2717 * win32-low.c: Update.
2719 2018-07-03 Tom Tromey <tom@tromey.com>
2721 * linux-low.c: Update.
2722 * lynx-low.c: Update.
2723 * nto-low.c: Update.
2724 * remote-utils.c: Update.
2725 * spu-low.c: Update.
2726 * thread-db.c: Update.
2727 * win32-low.c: Update.
2729 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2731 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2732 parameter in call to 'amd64_create_target_description'.
2734 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2736 * x86-tdesc.h: Remove executable permission flag.
2738 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2740 * configure.ac: Remove AC_PREREQ, add missing quoting.
2741 * configure: Re-generate.
2742 * config.in: Re-generate.
2743 * aclocal.m4: Re-generate.
2745 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2747 * tracepoint.h (current_traceframe): Remove declaration.
2749 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2751 * linux-aarch64-low.c (is_sve_tdesc): New function.
2752 (aarch64_sve_regs_copy_to_regcache): Likewise.
2753 (aarch64_sve_regs_copy_from_regcache): Likewise.
2754 (aarch64_regs_info): Add SVE checks.
2755 (initialize_low_arch): Initialize SVE.
2757 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2759 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2761 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2763 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2764 (initialize_low_tracepoint): Likewise
2765 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2766 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2768 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2770 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2772 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2774 * server.h (PBUFSIZ): Increase size
2776 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2778 * regcache.c (regcache::raw_compare): New function.
2779 * regcache.h (regcache::raw_compare): New declaration.
2781 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2783 * regcache.c (new_register_cache): Use new.
2784 (free_register_cache): Use delete.
2785 (register_data): Use const.
2786 (supply_register): Move body inside regcache.
2787 (regcache::raw_supply): New override function.
2788 (collect_register): Move body inside regcache.
2789 (regcache::raw_collect): New override function.
2790 (regcache::get_register_status): New override function.
2791 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2793 2018-06-09 Tom Tromey <tom@tromey.com>
2795 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2797 (event_queue): Use std::queue.
2798 (gdb_event_xfree): Remove.
2799 (initialize_event_loop, process_event, wait_for_event): Update.
2801 2018-06-08 Stan Cox <scox@redhat.com>
2803 * win32-low.c (win32_create_inferior): last_ptid and last_status
2804 moved to client_state.
2806 2018-06-08 Pedro Alves <palves@redhat.com>
2808 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2809 common/common-exceptions.o, common/common-utils.o,
2810 common/errors.o, common/print-utils.o and utils.o.
2811 * gdbreplay.c: Include "common-defs.h" instead of the two
2812 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2813 string.h or alloca.h.
2814 (perror_with_name): Delete.
2815 (remote_open): Use xstrdup instead of strdup.
2816 (main): Rename to ...
2817 (captured_main): ... this.
2820 2018-06-08 Tom Tromey <tom@tromey.com>
2822 * linux-low.c (linux_low_read_btrace): Update.
2824 2018-06-04 Stan Cox <scox@redhat.com>
2826 * server.h (struct client_state): New.
2827 * server.c (cont_thread, general_thread, multi_process)
2828 (report_fork_events, report_vfork_events, report_exec_events)
2829 (report_thread_events, swbreak_feature, hwbreak_feature)
2830 (vCont_supported, disable_randomization, pass_signals)
2831 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2832 Moved to client_state.
2833 * remote-utils.c (remote_debug, noack_mode)
2834 (transport_is_reliable): Moved to client_state.
2835 * tracepoint.c (current_traceframe): Moved to client_state.
2838 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2839 linux-low.c, remote-utils.h, target.c: Use client_state.
2841 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2843 * configure.srv: Add new c/h file.
2845 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2847 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2850 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2852 * gdb.arch/mips-fpregset-core.exp: New test.
2853 * gdb.arch/mips-fpregset-core.c: New test source.
2855 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2858 * hostio.c (require_int): Do not report overflow for integers
2859 between 0xfffffff and 0x7fffffff.
2861 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2863 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2864 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2865 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2867 (the_low_target): Wire them.
2869 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2871 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2872 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2873 mode. Call collect_register_by_name with vscr using
2874 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2875 (ppc_store_vrregset): Add and set vscr_offset variable as in
2876 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2879 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2881 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2882 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2883 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2885 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2887 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2888 (ppc_store_vsxregset): Likewise.
2889 (ppc_fill_vrregset): Likewise.
2890 (ppc_store_vrregset): Likewise.
2891 (ppc_fill_evrregset): Likewise.
2892 (ppc_store_evrregset): Likewise.
2893 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2894 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2897 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2899 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2900 wordsize of the inferior. Call ppc_linux_target_wordsize.
2902 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2904 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2905 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2906 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2907 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2908 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2909 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2910 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2911 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2912 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2913 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2914 (tdesc_powerpc_e500l): Remove.
2915 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2916 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2917 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2918 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2920 (ppc_arch_setup): Remove target description matching code. Fill a
2921 ppc_linux_features struct and call ppc_linux_match_description
2924 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2926 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2927 width of the requested register exceeds the width of the
2929 (mips_cannot_store_register): Likewise.
2931 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2933 * linux-mips-low.c (mips_fetch_register): New function. Update
2935 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2936 (the_low_target): Wire `mips_fetch_register'.
2938 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2940 * lynx-i386-low.c (LYNXOS_178): New macro.
2941 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2942 the layout on LynxOS-178.
2943 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2944 handle floating point registers that are not supported by
2947 2018-05-10 Tom Tromey <tom@tromey.com>
2949 * configure: Rebuild.
2951 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2954 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2955 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2956 Use it to set the expedite_regs field in the given tdesc.
2957 * x86-tdesc.h: New file.
2958 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2959 Adjust following the addition of the new expedite_regs parameter
2960 to init_target_desc.
2961 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2962 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2963 (i386_linux_read_description, amd64_linux_read_description):
2964 Adjust following the addition of the new expedite_regs parameter
2965 to init_target_desc.
2966 * lynx-i386-low.c: #include "x86-tdesc.h".
2967 (lynx_i386_arch_setup): Adjust following the addition of the new
2968 expedite_regs parameter to init_target_desc.
2969 * nto-x86-low.c: #include "x86-tdesc.h".
2970 (nto_x86_arch_setup): Adjust following the addition of the new
2971 expedite_regs parameter to init_target_desc.
2972 * win32-i386-low.c: #include "x86-tdesc.h".
2973 (i386_arch_setup): Adjust following the addition of the new
2974 expedite_regs parameter to init_target_desc.
2976 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2979 * win32-low.c (win32_create_inferior): Add call to my_wait
2980 setting last_status global.
2982 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2985 * win32-low.c (create_process): Only call gdb_tilde_expand if
2986 inferior_cwd is not NULL.
2988 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2990 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2991 registers to the cache if their values have changed.
2992 (i387_xsave_to_cache): Provide default values for x87 control
2993 registers when these features are available, but disabled.
2994 * regcache.c (supply_register_by_name_zeroed): New function.
2995 * regcache.h (supply_register_by_name_zeroed): Declare new
2998 2018-05-07 Tom Tromey <tom@tromey.com>
3000 * configure: Rebuild.
3002 2018-05-04 Tom Tromey <tom@tromey.com>
3004 * configure: Rebuild.
3006 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3007 Pedro Alves <palves@redhat.com>
3009 * linux-aarch64-low.c (aarch64_stopped_data_address):
3012 2018-04-27 Tom Tromey <tom@tromey.com>
3014 * configure: Rebuild.
3016 2018-04-23 Tom Tromey <tom@tromey.com>
3018 * configure: Rebuild.
3020 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3022 * Makefile.in (depcomp): Add "..".
3023 (all_deps_files): New and use it.
3025 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3027 * configure.srv (aarch64*-*-linux*): Don't include xml.
3028 (i[34567]86-*-cygwin*): Likewise.
3029 (i[34567]86-*-linux*): Likewise.
3030 (i[34567]86-*-lynxos*): Likewise.
3031 (i[34567]86-*-mingw32ce*): Likewise.
3032 (i[34567]86-*-mingw*): Likewise.
3033 (i[34567]86-*-nto*): Likewise.
3034 (tic6x-*-uclinux): Likewise.
3035 (x86_64-*-linux*): Likewise.
3036 (x86_64-*-mingw*): Likewise.
3037 (x86_64-*-cygwin*): Likewise.
3039 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3041 * tdesc.c: Remove xml parameter.
3043 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3045 * server.c (get_features_xml): Remove cast.
3046 * tdesc.c (void target_desc::accept): Fill in function.
3047 (tdesc_get_features_xml): Remove old xml creation.
3048 (print_xml_feature::visit_pre): Add xml vistor.
3049 * tdesc.h (struct target_desc): Make xmltarget mutable.
3050 (tdesc_get_features_xml): Remove declaration.
3052 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3054 * tdesc.c (tdesc_architecture_name): Add new function.
3055 (tdesc_osabi_name): Likewise.
3056 (tdesc_get_features_xml): Use new functions.
3058 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3060 * tdesc.c (tdesc_create_flags): Remove.
3061 (tdesc_add_flag): Likewise.
3062 (tdesc_named_type): Likewise.
3063 (tdesc_create_union): Likewise.
3064 (tdesc_create_struct): Likewise.
3065 (tdesc_create_vector): Likewise.
3066 (tdesc_add_bitfield): Likewise.
3067 (tdesc_add_field): Likewise.
3068 (tdesc_set_struct_size): Likewise.
3070 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3072 * tdesc.c (~target_desc): Remove implictly deleted items.
3073 (init_target_desc): Iterate all features.
3074 (tdesc_get_features_xml): Use vector.
3075 (tdesc_create_feature): Create feature.
3076 * tdesc.h (tdesc_feature) Remove
3077 (target_desc): Add features.
3079 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3081 * Makefile.in: Add common/tdesc.c
3082 * tdesc.c (init_target_desc): init all reg_defs from register
3084 (tdesc_create_reg): Create tdesc_reg.
3085 * tdesc.h (tdesc_feature): Add register vector.
3087 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3089 * tdesc.h (struct target_desc) <features>: Change type to
3090 std::vector<std::string>.
3091 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3093 (tdesc_get_features_xml): Likewise.
3094 (tdesc_create_feature): Likewise.
3096 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3098 * regcache.c (find_register_by_number): Return a ref.
3099 (find_regno): Use references.
3100 (register_size): Likewise.
3101 (register_data): Likewise.
3102 * tdesc.c (target_desc::~target_desc): Remove free calls.
3103 (target_desc::operator==): Use std::vector compare.
3104 (init_target_desc): Use reference.
3105 (tdesc_create_reg): Use reg constructors.
3106 * tdesc.h (struct target_desc): Replace pointer with object.
3108 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3110 * regcache.c (find_register_by_number): Make static.
3111 (find_regno): Use find_register_by_number
3112 * regcache.h (struct reg): Remove declaration.
3114 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3116 * tdesc.c (target_desc::~target_desc): Move to here.
3117 (target_desc::operator==): Likewise.
3118 * tdesc.h (target_desc::~target_desc): Move from here.
3119 (target_desc::operator==): Likewise.
3121 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3123 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3125 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3127 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3129 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3130 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3131 and init_registers_s390_gs_linux64.
3133 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3135 * linux-s390-low.c (s390_fill_gs): Remove function.
3136 (s390_fill_gsbc): Remove function.
3137 (s390_regsets): Set fill functions for the guarded storage regsets
3140 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3142 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3143 the word size. Add comment.
3144 (s390_get_wordsize): New function.
3145 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3146 pswm with it. Instead, use s390_get_wordsize to determine the
3147 word size first and derive the correct tdesc from that directly.
3149 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3151 * Makefile.in: Include silent-rules.mk.
3152 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3153 (COMPILE): Add ECHO_CXX.
3154 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3155 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3156 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3157 (version-generated.c): Add ECHO_GEN.
3158 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3159 (IPAGENT_COMPILE): Add ECHO_CXX.
3160 (%-generated.c): Add ECHO_REGDAT.
3162 2018-03-14 Tom Tromey <tom@tromey.com>
3165 * ax.c (ax_printf): Special case for NULL.
3167 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3169 * linux-low.c (linux_qxfer_libraries_svr4): Use
3170 xml_escape_text_append.
3172 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3174 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3176 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3178 * server.c (handle_general_set): Remove unnecessary xstrdup.
3180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3182 * server.c (parse_debug_format_options): Adjust to
3183 delim_string_to_char_ptr_vec changes.
3184 * thread-db.c (thread_db_load_search): Adjust to
3185 dirnames_to_char_ptr_vec changes.
3187 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3189 * target.h (target_enable_btrace, target_disable_btrace)
3190 (target_read_btrace, target_read_btrace_conf): Turn macro into
3191 inline function. Throw error if target method is not defined.
3192 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3193 check for btrace target method. Be prepared to handle exceptions
3194 from btrace target methods.
3196 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3198 * server.c (captured_main): Change order of error message printed
3199 when the current working directory cannot be found.
3201 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3203 * server.c: Include "filenames.h" and "pathstuff.h".
3204 (program_name): Delete variable.
3205 (program_path): New anonymous class.
3206 (get_exec_wrapper): Use "program_path" instead of
3208 (handle_v_run): Likewise.
3209 (captured_main): Likewise.
3210 (process_serial_event): Likewise.
3212 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3214 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3215 (OBJS): Add "pathstuff.o".
3216 * server.c (current_directory): New global variable.
3217 (captured_main): Initialize "current_directory".
3219 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3221 * tdesc.c: Use common/tdesc.h.
3222 * tdesc.h: Likewise.
3224 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3225 Simon Marchi <simon.marchi@ericsson.com>
3227 * Makefile.in: Switch order of make rules.
3229 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3231 * Makefile.in: Add common directory in build.
3232 * configure.ac: Add common reference.
3233 * configure: Regenerate.
3235 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3237 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3238 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3239 * spu-low.c (spu_target_ops): Likewise.
3240 * win32-low.c (win32_target_ops): Likewise.
3241 * server.c (supported_btrace_packets): Report packets unconditionally.
3242 * target.h (target_ops) <supports_btrace>: Remove.
3243 (target_supports_btrace): Remove.
3245 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3247 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3248 (handle_btrace_disable): Change return type to void. Use exceptions
3250 (handle_btrace_general_set): Catch exception and copy message to
3253 2018-02-08 Tom Tromey <tom@tromey.com>
3255 * linux-low.c (install_software_single_step_breakpoints): Use
3256 make_scoped_restore.
3257 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3258 (do_restore_current_thread_cleanup): Remove.
3259 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3262 2018-02-08 Tom Tromey <tom@tromey.com>
3264 * mem-break.c (set_raw_breakpoint_at): Use
3265 gdb::unique_xmalloc_ptr.
3267 2018-01-30 Pedro Alves <palves@redhat.com>
3270 * target.c (target_terminal::terminal_state): Rename to ...
3271 (target_terminal::m_terminal_state): ... this.
3273 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3275 * linux-low.c (handle_extended_wait): Surround call to
3276 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3278 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3280 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3281 linux_ptrace_attach_fail_reason_string now returning an
3283 (linux_attach): Likewise.
3284 * thread-db.c (attach_thread): Likewise.
3286 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3289 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3290 checking for fs_base/gs_base fields in struct user_regs_struct.
3291 * configure: Regenerate.
3293 2018-01-16 Yao Qi <yao.qi@linaro.org>
3296 * linux-low.c (fetch_register): Call supply_register instead of
3299 2018-01-08 Yao Qi <yao.qi@linaro.org>
3300 Simon Marchi <simon.marchi@ericsson.com>
3302 * Makefile.in (OBS): Remove selftest.o.
3303 * configure.ac: Set srv_selftest_objs if $development is true.
3304 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3305 * configure: Re-generated.
3306 * server.c (captured_main): Wrap variable selftest_filter with
3309 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3311 * server.c (parse_debug_format_options): Return std::string.
3312 (handle_monitor_command, captured_main): Adjust.
3314 2018-01-05 Pedro Alves <palves@redhat.com>
3317 * server.c (captured_main): Pass quiet=false to
3318 save_original_signals_state.
3320 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3322 * gdbreplay.c (gdbreplay_version): Update copyright year in
3324 * server.c (gdbserver_version): Likewise.
3326 2017-12-08 Tom Tromey <tom@tromey.com>
3328 * ax.c (ax_printf): Update.
3330 2017-12-07 Yao Qi <yao.qi@linaro.org>
3332 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3333 aarch64_linux_read_description.
3334 * linux-amd64-ipa.c (idx2mask): New array.
3335 (get_ipa_tdesc): Move idx2mask out.
3336 (initialize_low_tracepoint): Initialize target descriptions.
3337 * linux-i386-ipa.c (idx2mask): New array.
3338 (get_ipa_tdesc): Move idx2mask out.
3339 (initialize_low_tracepoint): Initialize target descriptions.
3341 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3343 * tdesc.c (struct tdesc_type): Change return type.
3344 (tdesc_add_flag): Change parameter type.
3345 (tdesc_add_bitfield): Likewise.
3346 (tdesc_add_field): Likewise.
3347 (tdesc_set_struct_size): Likewise.
3349 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3351 * regcache.c (registers_to_string): Remove unused variable.
3353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3355 * inferiors.c (for_each_inferior_with_data): Remove.
3356 * inferiors.h (for_each_inferior_with_data): Remove.
3357 * server.c (handle_qxfer_threads_worker): Change parameter type.
3358 (handle_qxfer_threads_proper): Use for_each_thread.
3360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3362 * inferiors.c (for_each_inferior): Remove.
3363 (clear_inferiors): Use for_each_thread.
3364 * inferiors.h (for_each_inferior): Remove.
3365 * linux-low.c (linux_wait_for_event_filtered): Use
3367 (linux_stabilize_threads): Likewise.
3368 * regcache.c (regcache_release): Likewise.
3369 * server.c (gdb_wants_all_threads_stopped): Likewise.
3370 (clear_pending_status_callback): Remove.
3371 (handle_status): Use for_each_thread.
3372 (captured_main): Likewise.
3373 * win32-low.c (child_init_thread_list): Likewise.
3374 (win32_clear_inferiors): Likewise.
3375 (fake_breakpoint_event): Likewise.
3377 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3379 * inferiors.h (find_inferior): Remove.
3380 * inferiors.c (find_inferior): Remove.
3382 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3384 * linux-low.c (resume_status_pending_p): Update comment.
3385 (need_step_over_p): Update comment.
3387 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3389 * linux-low.c (proceed_one_lwp): Return void, change parameter
3391 (unsuspend_and_proceed_one_lwp): Likewise.
3392 (proceed_all_lwps): Use for_each_thread.
3393 (unstop_all_lwps): Likewise.
3395 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3397 * linux-low.c (linux_resume_one_thread): Return void, take
3399 (linux_resume): Use for_each_thread.
3401 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3403 * linux-low.c (send_sigstop_callback): Return void, change
3404 parameter type. Rename to...
3405 (send_sigstop): ... this.
3406 (suspend_and_send_sigstop_callback): Return void, change parameter
3408 (suspend_and_send_sigstop): ... this.
3409 (stop_all_lwps): Use for_each_thread.
3411 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3413 * linux-low.c (lwp_running): Return bool, remove unused
3415 (linux_stabilize_threads): Use find_thread.
3417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3419 * linux-low.c (select_singlestep_lwp_callback): Remove.
3420 (count_events_callback): Remove.
3421 (select_event_lwp_callback): Remove.
3422 (select_event_lwp): Use find_thread/for_each_thread.
3424 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3426 * linux-low.c (not_stopped_callback): Return bool, take filter
3428 (linux_wait_for_event_filtered): Use find_thread.
3429 (linux_wait_1): Likewise.
3431 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3433 * linux-low.c (same_lwp): Remove.
3434 (find_lwp_pid): Use find_thread.
3436 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3438 * linux-low.c (delete_lwp_callback): Remove.
3439 (linux_mourn): Use for_each_thread.
3441 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3443 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3444 args parameter, don't check for pid.
3445 (linux_detach): Use for_each_thread.
3447 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3449 * linux-low.c (struct counter): Remove.
3450 (second_thread_of_pid_p): Remove.
3451 (last_thread_of_process_p): Use find_thread.
3453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3455 * inferiors.c (find_inferior_in_random): Remove.
3456 * inferiors.h (find_inferior_in_random): Remove.
3457 * linux-low.c (status_pending_p_callback): Return bool, accept
3458 parameter ptid directly.
3459 (linux_wait_for_event_filtered): Use find_thread_in_random.
3460 (linux_wait_1): Likewise.
3462 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3464 * inferiors.c (find_inferior_id): Remove.
3465 (find_thread_ptid): Move implemention from find_inferior_id to
3467 * inferiors.h (find_inferior_id): Remove.
3468 * server.c (handle_status): Use find_thread_ptid.
3469 (process_serial_event): Likewise.
3470 * thread-db.c (find_one_thread): Likewise.
3471 (thread_db_thread_handle): Likewise.
3472 * win32-low.c (thread_rec): Likewise.
3473 (child_delete_thread): Likewise.
3474 (win32_thread_alive): Likewise.
3475 (get_child_debug_event): Likewise.
3477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3479 * linux-mips-low.c (update_watch_registers_callback): Return
3480 void, remove pid_p parameter, don't check for pid.
3481 (mips_insert_point, mips_remove_point): Use for_each_thread.
3483 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3485 * lynx.low (lynx_delete_thread_callback): Remove.
3486 (lynx_mourn): Use for_each_thread.
3488 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3490 * regcache.c (regcache_invalidate_one): Remove.
3491 (regcache_invalidate_pid): use for_each_thread.
3493 2017-11-26 Tom Tromey <tom@tromey.com>
3495 * linux-low.c (linux_create_inferior): Update.
3497 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3499 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3501 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3503 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3504 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3505 * linux-aarch64-tdesc-selftest.c: New file.
3506 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3508 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3510 * configure.srv: Add new file.
3511 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3512 * linux-aarch64-tdesc-selftest.c: New file.
3513 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3515 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3517 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3518 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3519 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3521 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3523 * configure.srv: Add new files.
3524 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3525 aarch64_linux_read_description.
3526 * linux-aarch64-low.c (aarch64_linux_read_description):
3527 Merge with aarch64_arch_setup.
3528 (aarch64_arch_setup): Call aarch64_linux_read_description.
3529 * linux-aarch64-tdesc.c: New file.
3530 * linux-aarch64-tdesc.h: New file.
3532 2017-11-24 Yao Qi <yao.qi@linaro.org>
3534 * configure.srv: Set $srv_regobj for tic6x-linux.
3535 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3536 (tic6x_read_description): Move some code to tic6x_arch_setup.
3537 (tic6x_tdesc_test): New function.
3538 (initialize_low_arch): Call selftests::register_test.
3540 2017-11-22 Yao Qi <yao.qi@linaro.org>
3542 * remote-utils.c (prepare_resume_reply): Use memcpy.
3544 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3546 * linux-low.c (kill_one_lwp_callback): Return void, take
3547 argument directly, don't filter on pid.
3548 (linux_kill): Use for_each_thread.
3550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3552 * linux-low.c (need_step_over_p): Return bool, remove dummy
3554 (linux_resume, proceed_all_lwps): Use find_thread.
3556 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3558 * linux-low.c (resume_status_pending_p): Return bool, remove
3560 (linux_resume): Use find_thread.
3562 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3564 * linux-low.c (struct thread_resume_array): Remove.
3565 (linux_set_resume_request): Return void, take arguments
3567 (linux_resume): Use for_each_thread.
3569 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3571 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3572 return bool, remove data argument.
3573 (linux_stabilize_threads): Use find_thread.
3575 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3577 * linux-low.c (unsuspend_one_lwp): Remove.
3578 (unsuspend_all_lwps): Use for_each_thread, inline code from
3581 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3583 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3584 * linux-low.c (struct iterate_over_lwps_args): Remove.
3585 (iterate_over_lwps_filter): Remove.
3586 (iterate_over_lwps): Use find_thread.
3588 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3590 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3591 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3592 code from reset_lwp_ptrace_options_callback.
3594 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3596 * linux-arm-low.c (struct update_registers_data): Remove.
3597 (update_registers_callback): Return void, take arguments
3598 directly, don't check thread's pid.
3599 (arm_insert_point, arm_remove_point): Use for_each_thread.
3601 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3603 * win32-low.c (continue_one_thread): Return void, take argument
3605 (child_continue): Use for_each_thread.
3607 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3609 * win32-i386-low.c (update_debug_registers_callback): Rename
3611 (update_debug_registers): ... this, return void, remove pid_p arg.
3612 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3614 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3616 * inferiors.h (struct process_info): Add constructor, initialize
3618 <syscalls_to_catch>: Change type to std::vector<int>.
3619 * inferiors.c (add_process): Allocate process_info with new.
3620 (remove_process): Free process_info with delete.
3621 * linux-low.c (handle_extended_wait): Adjust.
3622 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3623 * server.c (handle_general_set): Adjust.
3625 2017-11-16 Pedro Alves <palves@redhat.com>
3627 * remote-utils.c (remote_close): Block SIGIO signals instead of
3628 uninstalling the SIGIO handler.
3630 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3632 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3634 2017-11-16 Yao Qi <yao.qi@linaro.org>
3636 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3637 (tic6x_store_gregset): Likewise.
3638 (tic6x_usrregs_info): Move it up.
3640 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3642 * Makefile.in: Update arch rules.
3643 * configure.srv: Explicitly mark arch/ files.
3645 2017-11-13 Andreas Schwab <schwab@suse.de>
3647 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3651 2017-11-06 Pedro Alves <palves@redhat.com>
3653 * config.in, configure: Regenerate.
3655 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3657 * target.c (struct thread_search): Remove.
3658 (thread_search_callback): Remove.
3659 (prepare_to_access_memory): Use for_each_thread instead of
3660 find_inferior. Inline code from thread_search_callback.
3662 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3664 * server.c (struct visit_actioned_threads_data): Remove.
3665 (visit_actioned_threads): Change prototype to take arguments
3667 (resume): Use find_thread instead of find_inferior.
3669 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3671 * server.c (queue_stop_reply_callback): Change prototype, return
3673 (find_status_pending_thread_callback): Remove.
3674 (handle_status): Replace find_inferior with find_thread and
3677 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3679 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3681 (aarch64_store_gregset): Likewise.
3682 (aarch64_fill_fpregset): Likewise.
3683 (aarch64_store_fpregset): Likewise.
3685 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3687 * gdbthread.h (find_thread, for_each_thread): New functions.
3688 * inferiors.c (thread_of_pid): Remove.
3689 (find_any_thread_of_pid): Use find_thread.
3690 * linux-low.c (num_lwps): Use for_each_thread.
3692 2017-10-17 Yao Qi <yao.qi@linaro.org>
3694 * Makefile.in: Remove one rule.
3695 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3697 2017-10-17 Yao Qi <yao.qi@linaro.org>
3699 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3700 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3702 2017-10-17 Yao Qi <yao.qi@linaro.org>
3704 * configure.srv: Rename arm.o with arch/arm.o.
3706 2017-10-17 Yao Qi <yao.qi@linaro.org>
3708 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3709 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3710 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3711 (arch-i386.o, arch-amd64.o): Remove rules.
3712 (arch/%.o): New rule.
3713 Update POSTCOMPILE and COMPILE.pre.
3714 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3715 * configure: Re-generated.
3716 * configure.srv: Replace arch-i386.o with arch/i386.o.
3717 Replace arch-amd64.o with arch/amd64.o.
3719 2017-10-16 Yao Qi <yao.qi@linaro.org>
3721 * configure: Regenerated.
3723 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3725 * inferiors.h: (struct inferior_list): Remove.
3726 (struct inferior_list_entry); Remove.
3727 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3728 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3729 get_first_inferior): Remove.
3730 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3731 find_inferior_id, find_inferior_in_random): Change signature.
3732 * inferiors.c (all_threads): Change type to
3733 std::list<thread_info *>.
3734 (get_thread): Remove macro.
3735 (find_inferior, find_inferior_id): Change signature, implement
3737 (find_inferior_in_random): Change signature, implement using
3738 find_thread_in_random.
3739 (for_each_inferior, for_each_inferior_with_data): Change
3740 signature, implement using for_each_thread.
3741 (add_inferior_to_list, remove_inferior): Remove.
3742 (add_thread, get_first_thread, thread_of_pid,
3743 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3744 (get_first_inferior, one_inferior_p, clear_inferior_list):
3746 (clear_inferiors, get_thread_process): Update.
3747 * gdbthread.h: Include <list>.
3748 (struct thread_info) <entry>: Remove field.
3750 (all_threads): Change type to std::list<thread_info *>.
3751 (get_first_inferior): Add doc.
3752 (find_thread, for_each_thread, find_thread_in_random): New
3754 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3755 * linux-arm-low.c (update_registers_callback): Update.
3756 * linux-low.c (second_thread_of_pid_p): Update.
3757 (kill_one_lwp_callback, linux_detach_lwp_callback,
3758 delete_lwp_callback, status_pending_p_callback, same_lwp,
3759 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3760 iterate_over_lwps, not_stopped_callback,
3761 resume_stopped_resumed_lwps, count_events_callback,
3762 select_singlestep_lwp_callback, select_event_lwp_callback,
3763 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3764 suspend_and_send_sigstop_callback, wait_for_sigstop,
3765 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3766 lwp_running, linux_set_resume_request, resume_status_pending_p,
3767 need_step_over_p, start_step_over, linux_resume_one_thread,
3768 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3769 reset_lwp_ptrace_options_callback): Update.
3770 * linux-mips-low.c (update_watch_registers_callback): Update.
3771 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3773 (free_register_cache_thread_one): Remove.
3774 (regcache_release): Update.
3775 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3776 handle_qxfer_threads_worker): Update.
3777 (handle_query): Update, use list iterator.
3778 (visit_actioned_threads, handle_pending_status,
3779 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3780 clear_pending_status_callback, set_pending_status_callback,
3781 find_status_pending_thread_callback, handle_status,
3782 process_serial_event): Update.
3783 * target.c (thread_search_callback): Update.
3784 * thread-db.c (thread_db_get_tls_address): Update.
3785 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3787 * win32-i386-low.c (update_debug_registers_callback): Update.
3788 * win32-low.c (delete_thread_info, child_delete_thread,
3789 continue_one_thread, suspend_one_thread,
3790 get_child_debug_event): Adjust.
3792 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3794 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3795 * inferiors.h: Include <list>.
3796 (struct process_info) <entry>: Remove field.
3798 (pid_of): Change macro to function.
3799 (ptid_of, lwpid_of): Remove macro.
3800 (all_processes): Change type to std::list<process_info *>.
3801 (ALL_PROCESSES): Remove macro.
3802 (for_each_process, find_process): New function.
3803 * inferiors.c (all_processes): Change type to
3804 std::list<process_info *>.
3805 (find_thread_process): Adjust.
3806 (add_process): Likewise.
3807 (remove_process): Likewise.
3808 (find_process_pid): Likewise.
3809 (get_first_process): Likewise.
3810 (started_inferior_callback): Remove.
3811 (have_started_inferiors_p): Adjust.
3812 (attached_inferior_callback): Remove.
3813 (have_attached_inferiors_p): Adjust.
3814 * linux-low.c (check_zombie_leaders): Likewise.
3815 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3816 (x86_linux_update_xmltarget): Adjust.
3817 * server.c (handle_query): Likewise.
3818 (gdb_reattached_process): Remove.
3819 (handle_status): Adjust.
3820 (kill_inferior_callback): Likewise.
3821 (detach_or_kill_inferior): Remove.
3822 (print_started_pid): Likewise.
3823 (print_attached_pid): Likewise.
3824 (detach_or_kill_for_exit): Update.
3825 (process_serial_event): Likewise.
3826 * linux-arm-low.c (arm_new_fork): Likewise.
3828 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3830 * dll.h: Include <list>.
3831 (struct dll_info): Add constructor.
3832 <entry>: Remove field.
3833 (all_dlls): Change type to std::list<dll_info>.
3834 * dll.c: Include <algorithm>.
3835 (get_dll): Remove macro.
3836 (all_dlls): Change type to std::list<dll_info *>.
3837 (free_one_dll): Remove.
3838 (match_dll): Likewise.
3839 (loaded_dll): Adjust.
3840 (unloaded_dll): Adjust to all_dlls type change, use
3841 std::find_if. Inline code from match_dll.
3842 (clear_dlls): Adjust to all_dlls type change.
3843 * server.c (emit_dll_description): Remove.
3844 (handle_qxfer_libraries): Adjust to all_dlls type change,
3845 integrate emit_dll_description's functionality.
3847 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3849 * linux-low.h (struct linux_target_ops) <delete_process>: New
3851 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3852 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3853 (struct linux_target_ops): Add delete_process callback.
3854 * linux-arm-low.c (arm_delete_process): New.
3855 (struct linux_target_ops): Add delete_process callback.
3856 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3857 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3858 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3859 * linux-mips-low.c (mips_linux_delete_process): New.
3860 (struct linux_target_ops): Add delete_process callback.
3861 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3862 * linux-s390-low.c (struct linux_target_ops): Likewise.
3863 * linux-sh-low.c (struct linux_target_ops): Likewise.
3864 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3865 * linux-tile-low.c (struct linux_target_ops): Likewise.
3866 * linux-x86-low.c (x86_linux_delete_process): New.
3867 (struct linux_target_ops): Add delete_process callback.
3868 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3870 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3872 * linux-aarch64-low.c (the_low_target): Add thread delete
3874 * linux-arm-low.c (arm_delete_thread): New function.
3875 (the_low_target): Add thread delete callback.
3876 * linux-bfin-low.c (the_low_target): Likewise.
3877 * linux-crisv32-low.c (the_low_target): Likewise.
3878 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3880 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3882 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3883 * linux-mips-low.c (mips_linux_delete_thread): New function.
3884 (the_low_target): Add thread delete callback.
3885 * linux-ppc-low.c (the_low_target): Likewise.
3886 * linux-s390-low.c (the_low_target): Likewise.
3887 * linux-sh-low.c (the_low_target): Likewise.
3888 * linux-tic6x-low.c (the_low_target): Likewise.
3889 * linux-tile-low.c (the_low_target): Likewise.
3890 * linux-x86-low.c (the_low_target): Likewise.
3891 * linux-xtensa-low.c (the_low_target): Likewise.
3893 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3895 * win32-low.c: Include "common-inferior.h".
3897 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3899 * inferiors.c (set_inferior_cwd): New function.
3900 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3901 (handle_query): Inform that QSetWorkingDir is supported.
3902 * win32-low.c (create_process): Pass the inferior's cwd to
3905 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3907 * inferiors.c (current_inferior_cwd): New global variable.
3908 (get_inferior_cwd): New function.
3909 * inferiors.h (struct process_info) <cwd>: New field.
3911 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3913 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3914 (OBS): Add gdb_tilde_expand.o.
3916 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3918 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3919 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3921 2017-09-29 Pedro Alves <palves@redhat.com>
3923 * ax.c (gdb_parse_agent_expr): Constify.
3924 * ax.h (gdb_parse_agent_expr): Constify.
3925 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3927 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3928 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3929 * remote-utils.h (read_ptid): Constify.
3930 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3931 (process_point_options, process_serial_event): Constify.
3932 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3933 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3934 (cmd_qtbuffer): Constify.
3936 2017-09-29 Pedro Alves <palves@redhat.com>
3938 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3941 2017-09-29 Pedro Alves <palves@redhat.com>
3943 * linux-low.c (handle_extended_wait): Pass parent thread instead
3944 of process to thread_db_notice_clone.
3945 * linux-low.h (thread_db_notice_clone): Replace parent process
3946 parameter with parent thread parameter.
3947 * thread-db.c (find_one_thread): Add comment.
3948 (thread_db_notice_clone): Replace parent process parameter with
3949 parent thread parameter. Temporarily switch to the parent thread.
3951 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3953 * gdbthread.h: Include "common-gdbthread.h".
3954 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3955 "if" when validating the ptid.
3956 * remote-utils.c: Include "gdbthread.h".
3957 (prepare_resume_reply): Use "switch_to_thread".
3958 * target.c (done_accessing_memory): Likewise.
3960 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3962 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3963 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3964 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3965 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3966 s390x-gs-linux64-ipa.o to ipa_obj.
3967 * linux-s390-low.c (HWCAP_S390_GS): New define.
3968 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3970 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3971 (s390_arch_setup): Check for guarded-storage support and choose
3973 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3974 init_registers_s390x_gs_linux64.
3975 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3977 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3978 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3980 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3982 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3984 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3986 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3987 (thread_db_thread_handle): Declare.
3988 * linux-low.c (linux_target_ops): Initialize thread_handle.
3989 * server.c (handle_qxfer_threads_worker): Add support for
3991 * target.h (struct target_ops): Add new function pointer,
3993 (target_thread_handle): Define.
3994 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3996 (thread_db_thread_handle): New function.
3998 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4000 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4001 * linux-low.h (thread_db_notice_clone): Declare.
4002 * thread-db.c (thread_db_notice_clone): New function.
4004 2017-09-21 Pedro Alves <palves@redhat.com>
4006 * server.c (gdb_read_memory, handle_status, process_serial_event)
4007 (handle_serial_event, handle_target_event): Adjust to
4008 set_desired_thread prototype change.
4009 * target.c (set_desired_thread): Remove 'use_general' parameter
4011 * target.h (set_desired_thread): Remove 'use_general' parameter.
4013 2017-09-20 Tom Tromey <tom@tromey.com>
4015 * target.c (target_terminal::terminal_state): Define.
4016 (target_terminal::init): Rename from target_terminal_init.
4017 (target_terminal::inferior): Rename from
4018 target_terminal_inferior.
4019 (target_terminal::ours): Rename from target_terminal_ours.
4020 (target_terminal::ours_for_output, target_terminal::info): New.
4022 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4024 * server.c (accumulate_file_name_length): Remove.
4025 (emit_dll_description): Adjust to std::string change.
4026 (handle_qxfer_libraries): Use std::string to hold document.
4028 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4030 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4031 return type of xml_escape_text.
4032 * server.c (emit_dll_description): Likewise.
4034 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4036 * server.c (captured_main): Accept argument for --selftest.
4037 Update run_tests call.
4038 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4039 when registering selftests.
4041 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4043 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4044 instead of "VEC" for "target_desc.reg_defs".
4045 (regcache_cpy): Likewise.
4046 (registers_to_string): Likewise.
4047 (registers_from_string): Likewise.
4048 (find_regno): Likewise.
4049 (supply_regblock): Likewise.
4050 (regcache_raw_read_unsigned): Likewise.
4051 * tdesc.c (init_target_desc): Likewise.
4052 (tdesc_create_reg): Likewise.
4053 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4054 (struct target_desc) <reg_defs>: Convert to "std::vector".
4055 (target_desc): Do not initialize "reg_defs".
4056 (~target_desc): Update code to use "std::vector" instead of "VEC"
4057 for "target_desc.reg_defs".
4058 (operator==): Likewise.
4060 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4062 * inferiors.h (thread_to_gdb_id): Remove.
4063 * inferiors.c (thread_to_gdb_id): Remove.
4064 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4065 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4066 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4068 * nto-low.c (nto_fetch_registers, nto_store_registers,
4069 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4071 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4073 * inferiors.h (gdb_id_to_thread_id): Remove.
4074 * inferiors.c (gdb_id_to_thread_id): Remove.
4075 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4076 removal. Move pid declaration closer to where it's used.
4078 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4080 * server.c (handle_detach): New function.
4081 (process_serial_event): Move code out, call handle_detach.
4083 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4085 * server.c (require_running): Rename to ...
4086 (require_running_or_return): ... this ...
4087 (require_running_or_break): ... and this.
4088 (handle_query, process_serial_event): Adjust.
4090 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4092 * linux-low.c (linux_set_resume_request): Remove unused
4095 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4097 * server.c (first_thread_of): Remove.
4098 (process_serial_event): Replace usage of first_thread_of with
4099 find_any_thread_of_pid.
4100 * tracepoint.c (same_process_p): Remove.
4101 (gdb_agent_about_to_close): Replace usage of same_process_p with
4102 find_any_thread_of_pid.
4103 * linux-x86-low.c (same_process_callback): Remove.
4104 (x86_arch_setup_process_callback): Replace usage of
4105 same_process_callback with find_any_thread_of_pid.
4106 * thread-db.c (any_thread_of): Remove.
4107 (switch_to_process): Replace usage of any_thread_of with
4108 find_any_thread_of_pid.
4109 * inferiors.c (thread_pid_matches_callback): Remove.
4110 (find_thread_process): Adjust to use find_any_thread_of_pid.
4112 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4114 * regcache.c (get_thread_regcache): Guard calls to "memset"
4117 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4119 * linux-low.c (handle_extended_wait): Use
4120 "allocate_target_description" instead of "XNEW".
4121 * linux-x86-low.c (initialize_low_arch): Likewise.
4123 2017-09-05 Yao Qi <yao.qi@linaro.org>
4125 * configure.srv (srv_i386_regobj): Remove.
4126 (srv_amd64_regobj): Remove.
4127 (srv_regobj): Set it to "" for x86 non-linux targets.
4128 * linux-x86-tdesc.c (i386_linux_read_description):
4129 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4130 (init_registers_i386): Remove the declaration.
4131 (tdesc_i386): Remove the declaration.
4132 (lynx_i386_arch_setup): Call i386_create_target_description.
4133 * nto-x86-low.c: Likewise.
4134 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4135 [!__x86_64__]: include arch/i386.h.
4136 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4138 2017-09-05 Yao Qi <yao.qi@linaro.org>
4140 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4141 i386/amd64-XXX-linux from it.
4143 2017-09-05 Yao Qi <yao.qi@linaro.org>
4145 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4147 (ipa_amd64_linux_regobj): Remove.
4148 (ipa_x32_linux_regobj): Remove.
4150 2017-09-05 Yao Qi <yao.qi@linaro.org>
4152 * Makefile.in (arch-amd64.o): New rule.
4153 * configure.srv: Append arch-amd64.o.
4154 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4155 (get_ipa_tdesc): Call amd64_linux_read_description.
4156 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4157 and init_registers_amd64_XXX.
4158 * linux-x86-low.c (x86_linux_read_description): Call
4159 amd64_linux_read_description.
4160 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4161 (initialize_low_arch): Don't call init_registers_x32_XXX and
4162 init_registers_amd64_XXX.
4163 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4164 and tdesc_amd64_XXX.
4165 [__x86_64__] (amd64_tdesc_test): New function.
4166 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4167 and init_registers_amd64_XXX.
4168 * linux-x86-tdesc.c: Include arch/amd64.h.
4169 (xcr0_to_tdesc_idx): New function.
4170 (i386_linux_read_description): New function.
4171 (amd64_get_ipa_tdesc_idx): New function.
4172 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4173 (amd64_get_ipa_tdesc): Declare.
4175 2017-09-05 Yao Qi <yao.qi@linaro.org>
4177 * configure.srv (srv_i386_linux_xmlfiles): Remove
4178 i386/i386-XXX-linux.xml from it.
4180 2017-09-05 Yao Qi <yao.qi@linaro.org>
4182 * configure.srv: Set srv_i386_linux_regobj empty if $development
4184 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4185 initialize_low_tdesc.
4186 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4187 with #if initialize_low_tdesc.
4188 * linux-x86-tdesc-selftest.c: New file.
4189 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4191 2017-09-05 Yao Qi <yao.qi@linaro.org>
4193 * Makefile.in (arch-i386.o): New rule.
4194 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4195 (x86_64-*-linux*): Likewise.
4196 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4197 include arch/i386.h.
4198 (i386_linux_read_description): Remove code and call
4199 i386_create_target_description.
4200 * tdesc.c (allocate_target_description): New function.
4201 * tdesc.h (set_tdesc_architecture): Remove declaration.
4202 (set_tdesc_osabi): Likewise.
4204 2017-09-05 Yao Qi <yao.qi@linaro.org>
4206 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4207 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4208 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4210 * server.c (get_features_xml): Call tdesc_get_features_xml.
4211 * tdesc.c (set_tdesc_architecture): New function.
4212 (set_tdesc_osabi): New function.
4213 (tdesc_get_features_xml): New function.
4214 (tdesc_create_feature): Add an argument.
4215 * tdesc.h (struct target_desc) <features>: New field.
4216 <arch, osabi>: New field.
4217 (~target_desc): xfree features, arch, and osabi.
4218 (target_desc::oerator==): Don't compare .xmltarget.
4219 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4220 (set_tdesc_osabi): Likewise.
4221 (tdesc_get_features_xml): Likewise.
4223 2017-09-05 Yao Qi <yao.qi@linaro.org>
4225 * linux-x86-tdesc.c: Include selftest.h.
4226 (i386_tdesc_test): New function.
4227 (initialize_low_tdesc): Call selftests::register_test.
4228 * tdesc.h: Include regdef.h.
4229 (target_desc): Override operator == and !=.
4231 2017-09-05 Yao Qi <yao.qi@linaro.org>
4233 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4234 (ipa_obj): Likewise.
4235 * linux-i386-ipa.c: Include common/x86-xstate.h
4236 (get_ipa_tdesc): Call i386_linux_read_description.
4237 (initialize_low_tracepoint): Don't call init_registers_XXX
4238 functions, call initialize_low_tdesc instead.
4239 * linux-x86-low.c (x86_linux_read_description): Call
4240 i386_linux_read_description.
4241 (initialize_low_arch): Don't call init_registers_i386_XXX
4242 functions, call initialize_low_tdesc.
4243 * linux-x86-tdesc.c: New file.
4244 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4245 (i386_get_ipa_tdesc_idx): Declare.
4246 (i386_get_ipa_tdesc): Declare.
4247 (initialize_low_tdesc): Declare.
4249 2017-09-05 Yao Qi <yao.qi@linaro.org>
4251 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4254 2017-09-05 Yao Qi <yao.qi@linaro.org>
4256 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4257 * regcache.c (get_thread_regcache): Use VEC_length.
4258 (init_register_cache): Likewise.
4259 (regcache_cpy): Likewise.
4260 (registers_to_string): Iterate reg_defs via VEC_iterate.
4261 (find_regno): Likewise.
4262 (find_register_by_number): Use VEC_index.
4263 (register_size): Call find_register_by_number.
4264 (register_data): Call find_register_by_number.
4265 (supply_regblock): Use VEC_length.
4266 (regcache_raw_read_unsigned): Likewise.
4267 * tdesc.c (init_target_desc): Iterate reg_defs via
4269 (default_description): Update initializer.
4270 (copy_target_description): Don't update field num_registers.
4271 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4272 <num_registers>: Remove.
4274 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4276 * Makefile.in (.SECONDARY): Define target.
4278 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4280 * linux-low.c (linux_wait_1): Adjust.
4281 * server.c (queue_stop_reply_callback): Adjust.
4283 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4285 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4286 QEnvironmentUnset and QEnvironmentReset packets.
4287 (handle_query): Inform remote that QEnvironmentHexEncoded,
4288 QEnvironmentUnset and QEnvironmentReset are supported.
4290 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4292 * inferiors.h (inferior_target_data): Rename to ...
4293 (thread_target_data): ... this.
4294 (inferior_regcache_data): Rename to ...
4295 (thread_regcache_data): ... this.
4296 (set_inferior_regcache_data): Rename to ...
4297 (set_thread_regcache_data): ... this.
4298 * inferiors.c (inferior_target_data): Rename to ...
4299 (thread_target_data): ... this.
4300 (inferior_regcache_data): Rename to ...
4301 (thread_regcache_data): ... this.
4302 (set_inferior_regcache_data): Rename to ...
4303 (set_thread_regcache_data): ... this.
4304 (free_one_thread): Update.
4305 * linux-low.h (get_thread_lwp): Update.
4306 * regcache.c (get_thread_regcache): Update.
4307 (regcache_invalidate_thread): Update.
4308 (free_register_cache_thread): Update.
4309 * win32-i386-low.c (update_debug_registers_callback): Update.
4310 (win32_get_current_dr): Update.
4311 * win32-low.c (thread_rec): Update.
4312 (delete_thread_info): Update.
4313 (continue_one_thread): Update.
4314 (suspend_one_thread): Update.
4316 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4318 * inferiors.c (set_inferior_target_data): Remove.
4319 * inferiors.h (set_inferior_target_data): Remove.
4321 2017-08-18 Yao Qi <yao.qi@linaro.org>
4323 * Makefile.in (OBS): Add selftest.o.
4324 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4325 * configure, config.in: Re-generated.
4326 * server.c: Include common/sefltest.h.
4327 (captured_main): Handle option --selftest.
4329 2017-08-09 Yao Qi <yao.qi@linaro.org>
4331 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4332 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4333 i386-avx-mpx.o and i386-mmx.o.
4334 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4335 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4336 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4337 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4338 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4339 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4340 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4341 i386/amd64-avx-mpx.xml.
4343 2017-08-09 Yao Qi <yao.qi@linaro.org>
4345 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4346 and x32-avx-avx512.o.
4347 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4348 i386/x32-avx-avx512.xml.
4350 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4352 * tracepoint.h (enum class fast_tpoint_collect_result): New
4354 (fast_tracepoint_collecting): Change return type to
4355 fast_tpoint_collect_result.
4356 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4357 * linux-low.h: Include tracepoint.h.
4358 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4359 fast_tpoint_collect_result.
4360 * linux-low.c (handle_tracepoints): Adjust.
4361 (linux_fast_tracepoint_collecting): Change return type to
4362 fast_tpoint_collect_result.
4363 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4364 linux_wait_1, stuck_in_jump_pad_callback,
4365 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4366 proceed_one_lwp): Adjust to type change.
4368 2017-07-10 Yao Qi <yao.qi@linaro.org>
4370 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4372 2017-06-29 Yao Qi <yao.qi@linaro.org>
4374 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4376 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4378 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4380 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4382 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4384 * linux-low.c (linux_create_inferior): Adjust code to access the
4385 environment information via 'gdb_environ' class.
4386 * lynx-low.c (lynx_create_inferior): Likewise.
4387 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4388 (get_environ): Return a pointer to 'our_environ'.
4389 (captured_main): Initialize 'our_environ'.
4390 * server.h (get_environ): Adjust prototype.
4391 * spu-low.c (spu_create_inferior): Adjust code to access the
4392 environment information via 'gdb_environ' class.
4394 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4396 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4397 usage of "register" keyword.
4399 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4401 * configure: Re-generate.
4403 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4405 * configure: Re-generate.
4407 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4409 * Makefile.in (COMPILE.pre): Add "-x c++".
4411 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4413 * fork-child.c: Conditionally include <signal.h>.
4415 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4417 * server.c (handle_general_set): Handle new packet
4418 "QStartupWithShell".
4419 (handle_query): Add "QStartupWithShell" to the list of supported
4421 (gdbserver_usage): Add help text explaining the
4422 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4424 (captured_main): Recognize and act upon the presence of the new
4427 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4428 Pedro Alves <palves@redhat.com>
4430 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4431 * configure: Regenerate.
4432 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4434 (i[34567]86-*-lynxos*): Likewise.
4435 (spu*-*-*): Likewise.
4436 * fork-child.c: New file.
4437 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4439 (linux_ptrace_fun): New function.
4440 (linux_create_inferior): Adjust function prototype to reflect
4441 change on "target.h". Adjust function code to use
4443 (linux_request_interrupt): Delete "signal_pid".
4444 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4445 (lynx_ptrace_fun): New function.
4446 (lynx_create_inferior): Adjust function prototype to reflect
4447 change on "target.h". Adjust function code to use
4449 * nto-low.c (nto_create_inferior): Adjust function prototype and
4450 code to reflect change on "target.h". Update comments.
4451 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4452 "common-terminal.h" and "environ.h".
4453 (terminal_fd): Moved to fork-child.c.
4454 (old_foreground_pgrp): Likewise.
4455 (restore_old_foreground_pgrp): Likewise.
4456 (last_status): Make it global.
4457 (last_ptid): Likewise.
4458 (our_environ): New variable.
4459 (startup_with_shell): Likewise.
4460 (program_name): Likewise.
4461 (program_argv): Rename to...
4462 (program_args): ...this.
4463 (wrapper_argv): New variable.
4464 (start_inferior): Delete function.
4465 (get_exec_wrapper): New function.
4466 (get_exec_file): Likewise.
4467 (get_environ): Likewise.
4468 (prefork_hook): Likewise.
4469 (post_fork_inferior): Likewise.
4470 (postfork_hook): Likewise.
4471 (postfork_child_hook): Likewise.
4472 (handle_v_run): Update code to deal with arguments coming from the
4473 remote host. Update calls from "start_inferior" to
4475 (captured_main): Likewise. Initialize environment variable. Call
4477 * server.h (post_fork_inferior): New prototype.
4478 (get_environ): Likewise.
4479 (last_status): Declare.
4480 (last_ptid): Likewise.
4481 (signal_pid): Likewise.
4482 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4483 (spu_ptrace_fun): New function.
4484 (spu_create_inferior): Adjust function prototype to reflect change
4485 on "target.h". Adjust function code to use "fork_inferior".
4486 * target.c (target_terminal_init): New function.
4487 (target_terminal_inferior): Likewise.
4488 (target_terminal_ours): Likewise.
4489 * target.h: Include <vector>.
4490 (struct target_ops) <create_inferior>: Update prototype.
4491 (create_inferior): Update macro.
4492 * utils.c (gdb_flush_out_err): New function.
4493 * win32-low.c (win32_create_inferior): Adjust function prototype
4494 and code to reflect change on "target.h".
4496 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4498 * inferiors.c (switch_to_thread): New function.
4500 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4502 * Makefile.in (SFILE): Add "common/job-control.c".
4503 (OBS): Add "job-control.o".
4505 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4507 * Makefile: Remove "@host_makefile_frag@".
4509 2017-05-05 Pedro Alves <palves@redhat.com>
4511 * configure: Regenerate.
4513 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4515 * configure: Regenerate.
4517 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4519 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4520 software_single_step change of return type to
4521 std::vector<CORE_ADDR>.
4522 * linux-low.c (install_software_single_step_breakpoints):
4524 * linux-low.h (install_software_single_step_breakpoints):
4527 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4529 * remote-utils.c: Include "gdb_termios.h" instead of
4531 * terminal.h: Delete file.
4533 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4535 * server.c: Include <vector>.
4536 <program_argv, wrapper_argv>: Convert to std::vector.
4537 (start_inferior): Rewrite function to use C++.
4538 (handle_v_run): Likewise. Update code that calculates the argv
4539 based on the vRun packet; use C++.
4540 (captured_main): Likewise.
4542 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4544 * server.c (handle_v_cont): Initialize thread_resume::thread
4547 2017-04-05 Pedro Alves <palves@redhat.com>
4549 * configure: Regenerate.
4551 2017-04-05 Pedro Alves <palves@redhat.com>
4553 * gdbreplay.c (sync_error): Constify.
4554 * linux-x86-low.c (push_opcode): Constify.
4556 2017-04-05 Pedro Alves <palves@redhat.com>
4558 * win32-low.c (get_child_debug_event)
4559 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4560 Report TARGET_WAITKIND_SPURIOUS instead.
4562 2017-04-05 Pedro Alves <palves@redhat.com>
4564 * remote-utils.c (remote_prepare, remote_open): Constify.
4565 * remote-utils.h (remote_prepare, remote_open): Constify.
4566 * server.c (captured_main): Constify 'port' handling.
4568 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4570 * Makefile.in (clean): Clear .deps.
4572 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4574 * .gitignore: Remove generated files, replace with wildcard.
4575 * (clean): Replace removal of generated files with wildcard.
4576 (version.c): Replace with...
4577 (version-generated.c): ...this.
4578 (xml-builtin.c): Replace with...
4579 (xml-builtin-generated.c): ...this.
4580 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4581 (%.c: *regformats*): Replace with...
4582 (%-generated.c: *regformats*): ...this.
4584 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4586 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4587 (xtensa_fill_gregset): Call collect_register_by_name for
4589 (xtensa_store_gregset): Call supply_register_by_name for
4592 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4594 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4595 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4596 (xtensa_store_gregset): Call supply_register for all registers in
4597 a0_regnum..a0_regnum + C0_NREGS range.
4599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4601 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4602 (ax-ipa.o: ax.c): Remove.
4603 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4604 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4605 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4606 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4607 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4609 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4611 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4612 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4613 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4614 (errors-ipa.o: ../common/errors.c): Remove.
4615 (format-ipa.o: ../common/format.c): Remove.
4616 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4620 * Makefile.in (%-ipa.o: %.c): New rule.
4621 (tracepoint-ipa.o: tracepoint.c): Remove.
4622 (utils-ipa.o: utils.c): Remove.
4623 (remote-utils-ipa.o: remote-utils.c): Remove.
4624 (regcache-ipa.o: regcache.c): Remove.
4625 (i386-linux-ipa.o: i386-linux.c): Remove.
4626 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4627 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4628 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4629 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4630 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4631 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4632 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4633 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4634 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4635 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4636 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4637 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4638 (aarch64-ipa.o: aarch64.c): Remove.
4639 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4640 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4641 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4642 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4643 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4644 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4645 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4646 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4647 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4648 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4649 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4650 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4651 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4652 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4653 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4654 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4655 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4656 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4657 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4658 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4659 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4660 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4661 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4662 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4663 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4664 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4665 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4666 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4667 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4668 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4669 (tdesc-ipa.o: tdesc.c): Remove.
4670 (x32-linux-ipa.o: x32-linux.c): Remove.
4671 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4672 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4674 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4676 * Makefile.in (%.o: ../arch/%.c): New rule.
4677 (arm.o: ../arch/arm.c): Remove.
4678 (arm-linux.o: ../arch/arm-linux.c): Remove.
4679 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4680 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4682 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4684 * Makefile.in (%.o: ../nat/%.c): New rule.
4685 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4686 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4687 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4688 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4689 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4690 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4691 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4692 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4693 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4694 (linux-personality.o: ../nat/linux-personality.c): Remove.
4695 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4696 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4697 (x86-linux.o: ../nat/x86-linux.c): Remove.
4698 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4699 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4701 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4703 * Makefile.in (%.o: ../common/%.c): New rule.
4704 (signals.o: ../common/signals.c): Remove.
4705 (print-utils.o: ../common/print-utils.c): Remove.
4706 (rsp-low.o: ../common/rsp-low.c): Remove.
4707 (common-utils.o: ../common/common-utils.c): Remove.
4708 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4709 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4710 (vec.o: ../common/vec.c): Remove.
4711 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4712 (xml-utils.o: ../common/xml-utils.c): Remove.
4713 (ptid.o: ../common/ptid.c): Remove.
4714 (buffer.o: ../common/buffer.c): Remove.
4715 (format.o: ../common/format.c): Remove.
4716 (filestuff.o: ../common/filestuff.c): Remove.
4717 (agent.o: ../common/agent.c): Remove.
4718 (errors.o: ../common/errors.c): Remove.
4719 (environ.o: ../common/environ.c): Remove.
4720 (common-debug.o: ../common/common-debug.c): Remove.
4721 (cleanups.o: ../common/cleanups.c): Remove.
4722 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4723 (fileio.o: ../common/fileio.c): Remove.
4724 (common-regcache.o: ../common/common-regcache.c): Remove.
4725 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4726 (new-op.o: ../common/new-op.c): Remove.
4727 (btrace-common.o: ../common/btrace-common.c): Remove.
4729 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4731 * Makefile.in (%.o: ../target/%.c): New rule.
4732 (waitstatus.o: ../target/waitstatus.c): Remove.
4734 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4737 (%.c: ../regformats/%.dat,
4738 (%.c: ../regformats/arm/%.dat,
4739 (%.c: ../regformats/i386/%.dat,
4740 (%.c: ../regformats/rs6000/%.dat): New rules.
4741 (aarch64.c): Remove.
4742 (reg-arm.c): Remove.
4743 (arm-with-iwmmxt.c): Remove.
4744 (arm-with-vfpv2.c): Remove.
4745 (arm-with-vfpv3.c): Remove.
4746 (arm-with-neon.c): Remove.
4747 (reg-bfin.c): Remove.
4748 (reg-cris.c): Remove.
4749 (reg-crisv32.c): Remove.
4751 (i386-linux.c): Remove.
4752 (i386-avx.c): Remove.
4753 (i386-avx-linux.c): Remove.
4754 (i386-avx-avx512.c): Remove.
4755 (i386-avx-avx512-linux.c): Remove.
4756 (i386-mpx.c): Remove.
4757 (i386-mpx-linux.c): Remove.
4758 (i386-avx-mpx-avx512-pku.c): Remove.
4759 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4760 (i386-avx-mpx.c): Remove.
4761 (i386-avx-mpx-linux.c): Remove.
4762 (i386-mmx.c): Remove.
4763 (i386-mmx-linux.c): Remove.
4764 (reg-ia64.c): Remove.
4765 (reg-m32r.c): Remove.
4766 (reg-m68k.c): Remove.
4768 (mips-linux.c): Remove.
4769 (mips-dsp-linux.c): Remove.
4770 (mips64-linux.c): Remove.
4771 (mips64-dsp-linux.c): Remove.
4772 (nios2-linux.c): Remove.
4773 (powerpc-32.c): Remove.
4774 (powerpc-32l.c): Remove.
4775 (powerpc-altivec32l.c): Remove.
4776 (powerpc-cell32l.c): Remove.
4777 (powerpc-vsx32l.c): Remove.
4778 (powerpc-isa205-32l.c): Remove.
4779 (powerpc-isa205-altivec32l.c): Remove.
4780 (powerpc-isa205-vsx32l.c): Remove.
4781 (powerpc-e500l.c): Remove.
4782 (powerpc-64l.c): Remove.
4783 (powerpc-altivec64l.c): Remove.
4784 (powerpc-cell64l.c): Remove.
4785 (powerpc-vsx64l.c): Remove.
4786 (powerpc-isa205-64l.c): Remove.
4787 (powerpc-isa205-altivec64l.c): Remove.
4788 (powerpc-isa205-vsx64l.c): Remove.
4789 (s390-linux32.c): Remove.
4790 (s390-linux32v1.c): Remove.
4791 (s390-linux32v2.c): Remove.
4792 (s390-linux64.c): Remove.
4793 (s390-linux64v1.c): Remove.
4794 (s390-linux64v2.c): Remove.
4795 (s390-te-linux64.c): Remove.
4796 (s390-vx-linux64.c): Remove.
4797 (s390-tevx-linux64.c): Remove.
4798 (s390x-linux64.c): Remove.
4799 (s390x-linux64v1.c): Remove.
4800 (s390x-linux64v2.c): Remove.
4801 (s390x-te-linux64.c): Remove.
4802 (s390x-vx-linux64.c): Remove.
4803 (s390x-tevx-linux64.c): Remove.
4804 (tic6x-c64xp-linux.c): Remove.
4805 (tic6x-c64x-linux.c): Remove.
4806 (tic6x-c62x-linux.c): Remove.
4808 (reg-sparc64.c): Remove.
4809 (reg-spu.c): Remove.
4811 (amd64-linux.c): Remove.
4812 (amd64-avx.c): Remove.
4813 (amd64-avx-linux.c): Remove.
4814 (amd64-avx-avx512.c): Remove.
4815 (amd64-avx-avx512-linux.c): Remove.
4816 (amd64-mpx.c): Remove.
4817 (amd64-mpx-linux.c): Remove.
4818 (amd64-avx-mpx-avx512-pku.c): Remove.
4819 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4820 (amd64-avx-mpx.c): Remove.
4821 (amd64-avx-mpx-linux.c): Remove.
4823 (x32-linux.c): Remove.
4824 (x32-avx.c): Remove.
4825 (x32-avx-linux.c): Remove.
4826 (x32-avx-avx512.c): Remove.
4827 (x32-avx-avx512-linux.c): Remove.
4828 (reg-xtensa.c): Remove.
4829 (reg-tilegx.c): Remove.
4830 (reg-tilegx32.c): Remove.
4832 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4834 * Makefile.in (SFILES): Add "common/environ.c".
4835 (OBJS): Add "common/environ.h".
4837 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4839 * configure.ac: Check if the fs_base and gs_base members of
4840 `struct user_regs_struct' exist.
4841 * config.in: Regenerated.
4842 * configure: Likewise.
4844 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4846 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4848 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4849 (get_next_pcs_syscall_next_pc): Likewise.
4851 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4853 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4854 * nto-x86-low.c: Likewise.
4856 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4858 * Makefile.in: Include disable-implicit-rules.mk.
4860 2016-11-23 Pedro Alves <palves@redhat.com>
4862 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4863 (debug_vprintf): Use std::chrono::steady_clock instead of
4864 gettimeofday. Use '.' instead of ':'.
4865 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4866 (get_timestamp): Use std::chrono::steady_clock instead of
4869 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4871 * Makefile.in: Fix whitespace formatting.
4873 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4875 * Makefile.in (SFILES, OBS): Flatten list and order
4878 2016-11-23 Pedro Alves <palves@redhat.com>
4880 * event-loop.c (handle_file_event): Use warning.
4881 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4882 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4885 2016-11-23 Pedro Alves <palves@redhat.com>
4887 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4889 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4890 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4891 debug_printf and debug_flush for debug output.
4892 * server.c (handle_general_set): Likewise.
4893 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4896 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4898 * Makefile.in (.c.o): Replace rule with ...
4899 (%.o: %.c): ... this one.
4901 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4903 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4904 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4906 * configure.ac: Remove checks for the make program.
4907 * configure: Re-generate.
4909 2016-10-28 Pedro Alves <palves@redhat.com>
4911 * Makefile.in (CXX_DIALECT): Get from configure.
4912 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4913 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4914 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4915 * config.in: Regenerate.
4916 * configure: Regenerate.
4918 2016-10-27 Yao Qi <yao.qi@linaro.org>
4920 * linux-low.c (linux_supports_range_stepping): Return true if
4921 can_software_single_step return true.
4923 2016-10-27 Yao Qi <yao.qi@linaro.org>
4925 * inferiors.c (find_inferior_in_random): New function.
4926 * inferiors.h (find_inferior_in_random): Declare.
4927 * linux-low.c (linux_wait_for_event_filtered): Call
4928 find_inferior_in_random instead of find_inferior.
4930 2016-10-27 Yao Qi <yao.qi@linaro.org>
4932 * linux-low.c (linux_wait_1): If single-step breakpoints are
4933 inserted, remove them.
4935 2016-10-26 Pedro Alves <palves@redhat.com>
4937 * linux-low.c (handle_extended_wait): Link parent/child fork
4939 (linux_wait_1): Unlink them.
4940 (linux_set_resume_request): Ignore resume requests for
4941 already-resumed and unhandled fork child threads.
4942 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4943 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4945 (handle_v_requests) <vCont>: Don't call require_running.
4946 * server.h (in_queued_stop_replies): New declaration.
4948 2016-10-24 Yao Qi <yao.qi@linaro.org>
4951 * linux-aarch64-low.c (append_insns): Cast the return value to
4954 2016-10-10 Yao Qi <yao.qi@linaro.org>
4956 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4958 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4960 * target.c (target_supports_multi_process): New function, moved
4962 * target.h (target_supports_multi_process): ... here. Remove
4965 2016-10-05 Tom Tromey <tom@tromey.com>
4968 * tracepoint.c (handle_tracepoint_bkpts): Check
4969 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4971 2016-10-05 Yao Qi <yao.qi@linaro.org>
4973 * configure.srv: Update the path of arm-*.xml files.
4975 2016-10-05 Terry Guo <terry.guo@arm.com>
4976 Yao Qi <yao.qi@linaro.org>
4978 * Makefile.in: Adjust the path of rules.
4979 * configure.srv: Update the path of xml files.
4980 * regformats/arm-with-iwmmxt.dat: Regenerated.
4981 * regformats/arm-with-neon.dat: Likewise.
4982 * regformats/arm-with-vfpv2.dat: Likewise.
4983 * regformats/arm-with-vfpv3.dat Likewise.
4985 2016-09-30 Yao Qi <yao.qi@linaro.org>
4988 * target.c (target_stop_and_wait): Don't call
4989 target_continue_no_signal, use resume_stop instead.
4991 2016-09-26 Yao Qi <yao.qi@linaro.org>
4993 * linux-low.c (linux_wait_1): Call debug_exit.
4995 2016-09-23 Pedro Alves <palves@redhat.com>
4997 * Makefile.in (SFILES): Add common/new-op.c.
4998 (OBS): Add common/new-op.o.
4999 (new-op.o): New rule.
5001 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5003 * .gitinore: Ignore more files.
5005 2016-09-21 Yao Qi <yao.qi@linaro.org>
5007 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5010 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5012 * server.c (start_inferior): Call target_mourn_inferior instead of
5013 mourn_inferior; pass ptid_t argument to it.
5015 (handle_target_event): Likewise.
5016 * target.c (target_mourn_inferior): New function.
5017 * target.h (mourn_inferior): Delete macro.
5019 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5021 * linux-low.c (lwp_is_stepping): New function.
5023 2016-09-06 Carl Love <cel@us.ibm.com>
5025 * server.c (start_inferior): Fixed comment, requested comment change
5026 didn't get updated correctly. Removed reference to ptrace () call as
5027 it is only true on Linux systems.
5029 2016-09-06 Carl Love <cel@us.ibm.com>
5031 * server.c (start_inferior): Do not call
5032 function target_post_create_inferior () if the
5033 inferior process has already exited.
5035 2016-09-05 Pedro Alves <palves@redhat.com>
5037 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5038 (COMPILE.pre, CC_LD): Use CXX directly.
5039 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5040 * acinclude.m4: Don't include build-with-cxx.m4.
5041 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5042 * configure: Regenerate.
5044 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5047 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5048 call writing data to own_buf.
5050 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5052 * target.c (mywait): Call target_wait instead of
5054 (target_wait): New function.
5056 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5058 * server.c (start_inferior): New variable 'ptid'. Replace calls
5059 to the_target->resume by target_continue{,_no_signal}, depending
5061 * target.c (target_stop_and_wait): Call target_continue_no_signal
5062 instead of the_target->resume.
5063 (target_continue): New function.
5065 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5067 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5069 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5072 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5074 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5075 * linux-arm-low.c (ps_get_thread_area): Likewise.
5076 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5077 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5078 * linux-mips-low.c (ps_get_thread_area): Likewise.
5079 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5080 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5081 * linux-x86-low.c (ps_get_thread_area): Likewise.
5082 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5084 2016-08-19 Pedro Alves <palves@redhat.com>
5086 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5088 2016-08-19 Pedro Alves <palves@redhat.com>
5090 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5091 comment. Use memcpy instead of casting through unsigned long.
5093 2016-08-19 Pedro Alves <palves@redhat.com>
5095 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5096 allocating around 0x80000000.
5098 2016-08-19 Pedro Alves <palves@redhat.com>
5101 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5102 (x32-avx512-linux-ipa.o): New rules.
5103 * configure.ac (x86_64-*-linux*): New x32 check.
5104 * configure.srv (ipa_x32_linux_regobj): New.
5105 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5106 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5108 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5110 * configure: Regenerate.
5112 2016-08-09 Pedro Alves <palves@redhat.com>
5115 * Makefile.in (OBS): Add signals-state-save-restore.o.
5116 (signals-state-save-restore.o): New rule.
5117 * config.in: Regenerate.
5118 * configure: Regenerate.
5119 * linux-low.c: Include "signals-state-save-restore.h".
5120 (linux_create_inferior): Call
5121 restore_original_signals_state.
5122 * server.c: Include "dispositions-save-restore.h".
5123 (captured_main): Call save_original_signals_state.
5125 2016-08-05 Pedro Alves <palves@redhat.com>
5127 * configure: Regenerate.
5129 2016-08-04 Yao Qi <yao.qi@linaro.org>
5131 * linux-low.c (regsets_fetch_inferior_registers): Check
5132 errno is ESRCH or not.
5134 2016-08-02 Yao Qi <yao.qi@linaro.org>
5136 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5137 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5138 (thread_db_load_search): Update.
5139 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5140 td_ta_set_event and td_ta_event_getmsg.
5142 2016-07-26 Pedro Alves <palves@redhat.com>
5145 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5146 of unsigned long for 64-bit registers and use uint32_t instead of
5147 unsigned int for 32-bit registers.
5149 2016-07-26 Pedro Alves <palves@redhat.com>
5151 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5154 2016-07-21 Tom Tromey <tom@tromey.com>
5156 * configure: Rebuild.
5158 2016-07-21 Yao Qi <yao.qi@linaro.org>
5160 * mem-break.c (find_gdb_breakpoint): Cast bp to
5161 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5163 2016-07-21 Yao Qi <yao.qi@linaro.org>
5165 * server.c (handle_v_requests): Support s and S actions
5166 if target_supports_software_single_step return true.
5168 2016-07-21 Yao Qi <yao.qi@linaro.org>
5170 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5171 is resume_step, call maybe_hw_step.
5172 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5174 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5176 (proceed_one_lwp): If resume request is resume_step, install
5177 reinsert breakpoints and call maybe_hw_step.
5179 2016-07-21 Yao Qi <yao.qi@linaro.org>
5181 * linux-low.c (proceed_one_lwp): Declare.
5182 (linux_resume_one_thread): Remove local variable 'step'.
5183 Lift code enqueue signal. Call proceed_one_lwp instead of
5184 linux_resume_one_lwp.
5186 2016-07-21 Yao Qi <yao.qi@linaro.org>
5188 * linux-low.c (linux_resume_one_thread): Call
5189 enqueue_pending_signal.
5191 2016-07-21 Yao Qi <yao.qi@linaro.org>
5193 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5194 * inferiors.c (do_restore_current_thread_cleanup): New function.
5195 (make_cleanup_restore_current_thread): Likewise.
5196 * linux-low.c (install_software_single_step_breakpoints): Call
5197 make_cleanup_restore_current_thread. Switch current_thread to
5200 2016-07-21 Yao Qi <yao.qi@linaro.org>
5202 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5203 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5204 (clone_one_breakpoint): Likewise.
5205 (delete_reinsert_breakpoints): Change parameter to thread.
5207 (has_reinsert_breakpoints): Likewise.
5208 (uninsert_reinsert_breakpoints): Likewise.
5209 (reinsert_reinsert_breakpoints): Likewise.
5210 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5211 (delete_reinsert_breakpoints): Likewise.
5212 (reinsert_reinsert_breakpoints): Likewise.
5213 (uninsert_reinsert_breakpoints): Likewise.
5214 (has_reinsert_breakpoints): Likewise.
5216 2016-07-21 Yao Qi <yao.qi@linaro.org>
5218 * inferiors.c (get_thread_process): Make parameter const.
5219 * inferiors.h (get_thread_process): Update declaration.
5220 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5221 Add new parameters child_thread and parent_thread. Callers
5223 * mem-break.h (clone_all_breakpoints): Update declaration.
5225 2016-07-21 Yao Qi <yao.qi@linaro.org>
5227 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5228 <command_list, handler>: Remove.
5229 (struct gdb_breakpoint): New.
5230 (struct other_breakpoint): New.
5231 (struct reinsert_breakpoint): New.
5232 (is_gdb_breakpoint): New function.
5233 (any_persistent_commands): Update command_list if
5234 is_gdb_breakpoint returns true.
5235 (set_breakpoint): Create breakpoints according to their types.
5236 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5237 (set_gdb_breakpoint_1): Likewise.
5238 (set_gdb_breakpoint): Likewise.
5239 (clear_breakpoint_conditions): Change parameter type to
5240 'struct gdb_breakpoint *'.
5241 (clear_breakpoint_commands): Likewise.
5242 (clear_breakpoint_conditions_and_commands): Likewise.
5243 (add_condition_to_breakpoint): Likewise.
5244 (add_breakpoint_condition): Likewise.
5245 (add_commands_to_breakpoint): Likewise.
5246 (check_breakpoints): Check other_breakpoint.
5247 (clone_one_breakpoint): Clone breakpopint according to its type.
5248 * mem-break.h (struct gdb_breakpoint): Declare.
5249 (set_gdb_breakpoint): Update declaration.
5250 (clear_breakpoint_conditions_and_commands): Likewise.
5251 (add_breakpoint_condition): Likewise.
5252 (add_breakpoint_commands): Likewise.
5253 * server.c (process_point_options): Change parameter type to
5254 'struct gdb_breakpoint *'.
5256 2016-07-21 Yao Qi <yao.qi@linaro.org>
5258 * mem-break.c (set_breakpoint_at): Rename it to ...
5259 (set_breakpoint_type_at): ... it.
5260 (set_breakpoint_at): Call set_breakpoint_type_at.
5261 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5262 * mem-break.h (set_breakpoint_at): Update comments.
5264 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5266 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5268 (nios2_store_gregset): Likewise.
5270 2016-07-01 Pedro Alves <palves@redhat.com>
5271 Antoine Tremblay <antoine.tremblay@ericsson.com>
5273 * linux-low.c: Change interface to take the target lwp_info
5274 pointer directly and return void. Handle detaching from a zombie
5276 (linux_detach_lwp_callback): New function.
5277 (linux_detach): Detach from the leader thread after detaching from
5280 2016-06-28 Yao Qi <yao.qi@linaro.org>
5282 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5283 for variable new_offset.
5284 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5285 (aarch64_ftrace_insn_reloc_cb): Likewise.
5286 (aarch64_ftrace_insn_reloc_tb): Likewise.
5287 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5288 PRIx64 instead of PRIx32.
5290 2016-06-28 Yao Qi <yao.qi@linaro.org>
5292 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5293 (the_low_target): Install arm_get_syscall_trapinfo.
5295 2016-06-28 Yao Qi <yao.qi@linaro.org>
5297 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5299 (the_low_target): Install aarch64_get_syscall_trapinfo.
5301 2016-06-28 Yao Qi <yao.qi@linaro.org>
5303 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5305 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5306 Remove parameter sysno.
5307 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5310 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5312 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5313 (s390_emit_ne_goto): Likewise.
5314 (s390_emit_lt_goto): Likewise.
5315 (s390_emit_le_goto): Likewise.
5316 (s390_emit_gt_goto): Likewise.
5317 (s390_emit_ge_goto): Likewise.
5318 (s390x_emit_eq_goto): Likewise.
5319 (s390x_emit_ne_goto): Likewise.
5320 (s390x_emit_lt_goto): Likewise.
5321 (s390x_emit_le_goto): Likewise.
5322 (s390x_emit_gt_goto): Likewise.
5323 (s390x_emit_ge_goto): Likewise.
5324 (s390_emit_ops_impl): Mark variable static.
5325 (s390x_emit_ops): Likewise.
5327 2016-06-17 Yao Qi <yao.qi@linaro.org>
5329 * linux-low.c (handle_extended_wait): Call
5330 uninsert_reinsert_breakpoints for the parent process. Remove
5331 reinsert breakpoints from the child process. Reinsert them to
5332 the parent process when vfork is done.
5333 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5334 (reinsert_reinsert_breakpoints): New function.
5335 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5336 (reinsert_reinsert_breakpoints): Declare.
5338 2016-06-17 Yao Qi <yao.qi@linaro.org>
5340 * linux-low.c (handle_extended_wait): If the parent is doing
5341 step-over, remove the reinsert breakpoints from the forked child.
5343 2016-06-17 Yao Qi <yao.qi@linaro.org>
5345 * linux-low.c (unsuspend_all_lwps): Declare.
5346 (linux_low_filter_event): If thread exited, call finish_step_over.
5347 If step-over is finished, unsuspend other threads.
5349 2016-06-17 Yao Qi <yao.qi@linaro.org>
5351 * linux-low.c (linux_resume_one_lwp_throw): Assert
5352 has_reinsert_breakpoints returns false.
5353 * mem-break.c (delete_disabled_breakpoints): Assert
5354 bp type isn't reinsert_breakpoint.
5356 2016-06-17 Yao Qi <yao.qi@linaro.org>
5358 * linux-low.c (maybe_hw_step): New function.
5359 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5360 (finish_step_over): Switch current_thread to lwp temporarily,
5361 and assert has_reinsert_breakpoints returns true.
5362 (proceed_one_lwp): Call maybe_hw_step.
5363 * mem-break.c (has_reinsert_breakpoints): New function.
5364 * mem-break.h (has_reinsert_breakpoints): Declare.
5366 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5368 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5370 2016-05-17 Yao Qi <yao.qi@linaro.org>
5372 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5373 instead of find_inferior.
5375 2016-05-05 Yao Qi <yao.qi@linaro.org>
5377 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5378 Initialize res to zero.
5380 2016-05-05 Yao Qi <yao.qi@linaro.org>
5382 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5385 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5387 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5388 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5389 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5391 2016-04-28 Par Olsson <par.olsson@windriver.com>
5392 Simon Marchi <simon.marchi@ericsson.com>
5394 * tracepoint.c (write_inferior_int8): New function.
5395 (cmd_qtenable_disable): Write enable flag using
5396 write_inferior_int8.
5398 2016-04-25 Yao Qi <yao.qi@linaro.org>
5400 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5401 (need_step_over_p): Return zero if the LWP has pending signals
5402 can be delivered on software single step target.
5404 2016-04-25 Yao Qi <yao.qi@linaro.org>
5406 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5407 return instead of error.
5409 2016-04-22 Yao Qi <yao.qi@linaro.org>
5411 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5414 2016-04-22 Yao Qi <yao.qi@linaro.org>
5416 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5417 signal when stepping over breakpoint with software single
5420 2016-04-21 Pedro Alves <palves@redhat.com>
5422 * linux-s390-low.c (s390_collect_ptrace_register)
5423 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5425 (s390_check_regset): Use void * instead of gdb_byte *.
5427 2016-04-20 Pedro Alves <palves@redhat.com>
5429 * configure: Renegerate.
5431 2016-04-20 Yao Qi <yao.qi@linaro.org>
5433 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5434 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5436 (arm_store_gregset): Likewise.
5438 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5440 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5441 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5442 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5443 (amd64-avx-mpx-linux.c): New rules.
5444 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5445 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5446 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5447 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5448 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5449 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5450 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5451 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5452 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5453 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5454 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5455 * linux-x86-low.c (x86_linux_read_description): Add case for
5456 X86_XSTATE_AVX_MPX_MASK.
5457 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5458 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5459 init_registers_i386_avx_mpx_linux.
5460 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5461 (initialize_low_tracepoint): Call
5462 init_registers_i386_avx_mpx_linux.
5463 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5464 (initialize_low_tracepoint): Call
5465 init_registers_amd64_avx_mpx_linux.
5466 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5467 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5468 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5471 2016-04-18 Pedro Alves <palves@redhat.com>
5473 * configure: Regenerate.
5475 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5477 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5478 (aarch64_emit_sub): Likewise.
5480 2016-04-12 Pedro Alves <palves@redhat.com>
5482 * utils.c (prepare_to_throw_exception): Delete.
5484 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5486 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5488 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5490 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5492 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5494 * linux-aarch64-ipa.c: Add <elf.h> include.
5495 * linux-ppc-ipa.c: Add <elf.h> include.
5496 * linux-s390-ipa.c: Add <elf.h> include.
5498 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5500 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5501 (get_raw_reg_ptr): Likewise.
5502 (get_trace_state_variable_value_ptr): Likewise.
5503 (set_trace_state_variable_value_ptr): Likewise.
5504 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5507 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5508 Marcin Kościelnicki <koriakin@0x04.net>
5511 * linux-ppc-low.c (emit_insns): New function.
5512 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5513 (ppc_emit_prologue): New function.
5514 (ppc_emit_epilogue): New function.
5515 (ppc_emit_add): New function.
5516 (ppc_emit_sub): New function.
5517 (ppc_emit_mul): New function.
5518 (ppc_emit_lsh): New function.
5519 (ppc_emit_rsh_signed): New function.
5520 (ppc_emit_rsh_unsigned): New function.
5521 (ppc_emit_ext): New function.
5522 (ppc_emit_zero_ext): New function.
5523 (ppc_emit_log_not): New function.
5524 (ppc_emit_bit_and): New function.
5525 (ppc_emit_bit_or): New function.
5526 (ppc_emit_bit_xor): New function.
5527 (ppc_emit_bit_not): New function.
5528 (ppc_emit_equal): New function.
5529 (ppc_emit_less_signed): New function.
5530 (ppc_emit_less_unsigned): New function.
5531 (ppc_emit_ref): New function.
5532 (ppc_emit_const): New function.
5533 (ppc_emit_reg): New function.
5534 (ppc_emit_pop): New function.
5535 (ppc_emit_stack_flush): New function.
5536 (ppc_emit_swap): New function.
5537 (ppc_emit_stack_adjust): New function.
5538 (ppc_emit_call): New function.
5539 (ppc_emit_int_call_1): New function.
5540 (ppc_emit_void_call_2): New function.
5541 (ppc_emit_if_goto): New function.
5542 (ppc_emit_goto): New function.
5543 (ppc_emit_eq_goto): New function.
5544 (ppc_emit_ne_goto): New function.
5545 (ppc_emit_lt_goto): New function.
5546 (ppc_emit_le_goto): New function.
5547 (ppc_emit_gt_goto): New function.
5548 (ppc_emit_ge_goto): New function.
5549 (ppc_write_goto_address): New function.
5550 (ppc_emit_ops_impl): New static variable.
5551 (ppc64v1_emit_prologue): New function.
5552 (ppc64v2_emit_prologue): New function.
5553 (ppc64_emit_epilogue): New function.
5554 (ppc64_emit_add): New function.
5555 (ppc64_emit_sub): New function.
5556 (ppc64_emit_mul): New function.
5557 (ppc64_emit_lsh): New function.
5558 (ppc64_emit_rsh_signed): New function.
5559 (ppc64_emit_rsh_unsigned): New function.
5560 (ppc64_emit_ext): New function.
5561 (ppc64_emit_zero_ext): New function.
5562 (ppc64_emit_log_not): New function.
5563 (ppc64_emit_bit_and): New function.
5564 (ppc64_emit_bit_or): New function.
5565 (ppc64_emit_bit_xor): New function.
5566 (ppc64_emit_bit_not): New function.
5567 (ppc64_emit_equal): New function.
5568 (ppc64_emit_less_signed): New function.
5569 (ppc64_emit_less_unsigned): New function.
5570 (ppc64_emit_ref): New function.
5571 (ppc64_emit_const): New function.
5572 (ppc64v1_emit_reg): New function.
5573 (ppc64v2_emit_reg): New function.
5574 (ppc64_emit_pop): New function.
5575 (ppc64_emit_stack_flush): New function.
5576 (ppc64_emit_swap): New function.
5577 (ppc64v1_emit_call): New function.
5578 (ppc64v2_emit_call): New function.
5579 (ppc64v1_emit_int_call_1): New function.
5580 (ppc64v2_emit_int_call_1): New function.
5581 (ppc64v1_emit_void_call_2): New function.
5582 (ppc64v2_emit_void_call_2): New function.
5583 (ppc64_emit_if_goto): New function.
5584 (ppc64_emit_eq_goto): New function.
5585 (ppc64_emit_ne_goto): New function.
5586 (ppc64_emit_lt_goto): New function.
5587 (ppc64_emit_le_goto): New function.
5588 (ppc64_emit_gt_goto): New function.
5589 (ppc64_emit_ge_goto): New function.
5590 (ppc64v1_emit_ops_impl): New static variable.
5591 (ppc64v2_emit_ops_impl): New static variable.
5592 (ppc_emit_ops): New function.
5593 (linux_low_target): Wire in ppc_emit_ops.
5595 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5596 Marcin Kościelnicki <koriakin@0x04.net>
5599 * Makefile.in: Add powerpc-*-ipa.o
5600 * configure.srv: Add ipa_obj for powerpc*-linux.
5601 * linux-ppc-ipa.c: New file.
5602 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5604 (PPC_FIELD): New macro.
5605 (PPC_SEXT): New macro.
5606 (PPC_OP6): New macro.
5607 (PPC_BO): New macro.
5608 (PPC_LI): New macro.
5609 (PPC_BD): New macro.
5610 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5611 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5612 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5613 (ppc_get_thread_area): New function.
5614 (is_elfv2_inferior): New function.
5615 (gen_ds_form): New function.
5616 (GEN_STD): New macro.
5617 (GEN_STDU): New macro.
5618 (GEN_LD): New macro.
5619 (GEN_LDU): New macro.
5620 (gen_d_form): New function.
5621 (GEN_ADDI): New macro.
5622 (GEN_ADDIS): New macro.
5623 (GEN_LI): New macro.
5624 (GEN_LIS): New macro.
5625 (GEN_ORI): New macro.
5626 (GEN_ORIS): New macro.
5627 (GEN_LWZ): New macro.
5628 (GEN_STW): New macro.
5629 (GEN_STWU): New macro.
5630 (gen_xfx_form): New function.
5631 (GEN_MFSPR): New macro.
5632 (GEN_MTSPR): New macro.
5633 (GEN_MFCR): New macro.
5634 (GEN_MTCR): New macro.
5635 (GEN_SYNC): New macro.
5636 (GEN_LWSYNC): New macro.
5637 (gen_x_form): New function.
5638 (GEN_OR): New macro.
5639 (GEN_MR): New macro.
5640 (GEN_LWARX): New macro.
5641 (GEN_STWCX): New macro.
5642 (GEN_CMPW): New macro.
5643 (gen_md_form): New function.
5644 (GEN_RLDICL): New macro.
5645 (GEN_RLDICR): New macro.
5646 (gen_i_form): New function.
5648 (GEN_BL): New macro.
5649 (gen_b_form): New function.
5650 (GEN_BNE): New macro.
5651 (GEN_LOAD): New macro.
5652 (GEN_STORE): New macro.
5653 (gen_limm): New function.
5654 (gen_atomic_xchg): New function.
5655 (gen_call): New function.
5656 (ppc_relocate_instruction): New function.
5657 (ppc_install_fast_tracepoint_jump_pad): New function.
5658 (ppc_get_min_fast_tracepoint_insn_len): New function.
5659 (ppc_get_ipa_tdesc_idx): New function.
5660 (the_low_target): Wire in the new functions.
5661 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5663 * linux-ppc-tdesc.h: New file.
5665 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5667 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5668 (alloc_jump_pad_buffer): New function.
5669 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5670 (alloc_jump_pad_buffer): New function.
5671 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5672 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5673 (alloc_jump_pad_buffer): New function.
5674 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5675 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5676 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5677 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5679 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5681 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5682 * linux-amd64-ipa.c: Likewise.
5683 * linux-i386-ipa.c: Likewise.
5684 * linux-s390-ipa.c: Likewise.
5685 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5686 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5687 set_trace_state_variable_value_ptr.
5688 (struct ipa_sym_addresses): Likewise.
5689 (symbol_list): Likewise.
5690 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5691 accessing gdb_collect directly.
5692 (gdb_collect_ptr_type): New typedef.
5693 (get_raw_reg_ptr_type): New typedef.
5694 (get_trace_state_variable_value_ptr_type): New typedef.
5695 (set_trace_state_variable_value_ptr_type): New typedef.
5696 (gdb_collect_ptr): New global.
5697 (get_raw_reg_ptr): New global.
5698 (get_trace_state_variable_value_ptr): New global.
5699 (set_trace_state_variable_value_ptr): New global.
5700 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5701 accessing get_raw_reg directly.
5702 (get_get_tsv_func_addr): Likewise for
5703 get_trace_state_variable_value_ptr.
5704 (get_set_tsv_func_addr): Likewise for
5705 set_trace_state_variable_value_ptr.
5706 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5708 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5710 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5712 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5714 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5716 (relocate_instruction): Remove own_buf.
5717 * server.c (own_buf): Make global.
5718 (handle_v_requests): Make global.
5719 * server.h (own_buf): New declaration.
5720 (handle_v_requests): New prototype.
5722 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5725 * linux-s390-low.c (add_insns): New function.
5726 (s390_emit_prologue): New function.
5727 (s390_emit_epilogue): New function.
5728 (s390_emit_add): New function.
5729 (s390_emit_sub): New function.
5730 (s390_emit_mul): New function.
5731 (s390_emit_lsh): New function.
5732 (s390_emit_rsh_signed): New function.
5733 (s390_emit_rsh_unsigned): New function.
5734 (s390_emit_ext): New function.
5735 (s390_emit_log_not): New function.
5736 (s390_emit_bit_and): New function.
5737 (s390_emit_bit_or): New function.
5738 (s390_emit_bit_xor): New function.
5739 (s390_emit_bit_not): New function.
5740 (s390_emit_equal): New function.
5741 (s390_emit_less_signed): New function.
5742 (s390_emit_less_unsigned): New function.
5743 (s390_emit_ref): New function.
5744 (s390_emit_if_goto): New function.
5745 (s390_emit_goto): New function.
5746 (s390_write_goto_address): New function.
5747 (s390_emit_litpool): New function.
5748 (s390_emit_const): New function.
5749 (s390_emit_call): New function.
5750 (s390_emit_reg): New function.
5751 (s390_emit_pop): New function.
5752 (s390_emit_stack_flush): New function.
5753 (s390_emit_zero_ext): New function.
5754 (s390_emit_swap): New function.
5755 (s390_emit_stack_adjust): New function.
5756 (s390_emit_set_r2): New function.
5757 (s390_emit_int_call_1): New function.
5758 (s390_emit_void_call_2): New function.
5759 (s390_emit_eq_goto): New function.
5760 (s390_emit_ne_goto): New function.
5761 (s390_emit_lt_goto): New function.
5762 (s390_emit_le_goto): New function.
5763 (s390_emit_gt_goto): New function.
5764 (s390_emit_ge_goto): New function.
5765 (s390x_emit_prologue): New function.
5766 (s390x_emit_epilogue): New function.
5767 (s390x_emit_add): New function.
5768 (s390x_emit_sub): New function.
5769 (s390x_emit_mul): New function.
5770 (s390x_emit_lsh): New function.
5771 (s390x_emit_rsh_signed): New function.
5772 (s390x_emit_rsh_unsigned): New function.
5773 (s390x_emit_ext): New function.
5774 (s390x_emit_log_not): New function.
5775 (s390x_emit_bit_and): New function.
5776 (s390x_emit_bit_or): New function.
5777 (s390x_emit_bit_xor): New function.
5778 (s390x_emit_bit_not): New function.
5779 (s390x_emit_equal): New function.
5780 (s390x_emit_less_signed): New function.
5781 (s390x_emit_less_unsigned): New function.
5782 (s390x_emit_ref): New function.
5783 (s390x_emit_if_goto): New function.
5784 (s390x_emit_const): New function.
5785 (s390x_emit_call): New function.
5786 (s390x_emit_reg): New function.
5787 (s390x_emit_pop): New function.
5788 (s390x_emit_stack_flush): New function.
5789 (s390x_emit_zero_ext): New function.
5790 (s390x_emit_swap): New function.
5791 (s390x_emit_stack_adjust): New function.
5792 (s390x_emit_int_call_1): New function.
5793 (s390x_emit_void_call_2): New function.
5794 (s390x_emit_eq_goto): New function.
5795 (s390x_emit_ne_goto): New function.
5796 (s390x_emit_lt_goto): New function.
5797 (s390x_emit_le_goto): New function.
5798 (s390x_emit_gt_goto): New function.
5799 (s390x_emit_ge_goto): New function.
5800 (s390_emit_ops): New function.
5801 (struct linux_target_ops): Fill in emit_ops hook.
5803 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5806 * Makefile.in: Add s390 IPA files.
5807 * configure.srv: Build IPA for s390.
5808 * linux-s390-ipa.c: New file.
5809 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5810 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5811 (tdesc_s390_linux32): Likewise.
5812 (init_registers_s390_linux32v1): Likewise.
5813 (tdesc_s390_linux32v1): Likewise.
5814 (init_registers_s390_linux32v2): Likewise.
5815 (tdesc_s390_linux32v2): Likewise.
5816 (init_registers_s390_linux64): Likewise.
5817 (tdesc_s390_linux64): Likewise.
5818 (init_registers_s390_linux64v1): Likewise.
5819 (tdesc_s390_linux64v1): Likewise.
5820 (init_registers_s390_linux64v2): Likewise.
5821 (tdesc_s390_linux64v2): Likewise.
5822 (init_registers_s390_te_linux64): Likewise.
5823 (tdesc_s390_te_linux64): Likewise.
5824 (init_registers_s390_vx_linux64): Likewise.
5825 (tdesc_s390_vx_linux64): Likewise.
5826 (init_registers_s390_tevx_linux64): Likewise.
5827 (tdesc_s390_tevx_linux64): Likewise.
5828 (init_registers_s390x_linux64): Likewise.
5829 (tdesc_s390x_linux64): Likewise.
5830 (init_registers_s390x_linux64v1): Likewise.
5831 (tdesc_s390x_linux64v1): Likewise.
5832 (init_registers_s390x_linux64v2): Likewise.
5833 (tdesc_s390x_linux64v2): Likewise.
5834 (init_registers_s390x_te_linux64): Likewise.
5835 (tdesc_s390x_te_linux64): Likewise.
5836 (init_registers_s390x_vx_linux64): Likewise.
5837 (tdesc_s390x_vx_linux64): Likewise.
5838 (init_registers_s390x_tevx_linux64): Likewise.
5839 (tdesc_s390x_tevx_linux64): Likewise.
5840 (have_hwcap_s390_vx): New static variable.
5841 (s390_arch_setup): Fill have_hwcap_s390_vx.
5842 (s390_get_thread_area): New function.
5843 (s390_ft_entry_gpr_esa): New const.
5844 (s390_ft_entry_gpr_zarch): New const.
5845 (s390_ft_entry_misc): New const.
5846 (s390_ft_entry_fr): New const.
5847 (s390_ft_entry_vr): New const.
5848 (s390_ft_main_31): New const.
5849 (s390_ft_main_64): New const.
5850 (s390_ft_exit_fr): New const.
5851 (s390_ft_exit_vr): New const.
5852 (s390_ft_exit_misc): New const.
5853 (s390_ft_exit_gpr_esa): New const.
5854 (s390_ft_exit_gpr_zarch): New const.
5855 (append_insns): New function.
5856 (s390_relocate_instruction): New function.
5857 (s390_install_fast_tracepoint_jump_pad): New function.
5858 (s390_get_min_fast_tracepoint_insn_len): New function.
5859 (s390_get_ipa_tdesc_idx): New function.
5860 (struct linux_target_ops): Wire in the above functions.
5861 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5862 * linux-s390-tdesc.h: New file.
5864 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5866 * linux-s390-low.c (s390_supports_tracepoints): New function.
5867 (struct linux_target_ops): Fill supports_tracepoints hook.
5869 2016-03-18 Yao Qi <yao.qi@linaro.org>
5871 * linux-low.c (lwp_signal_can_be_delivered): New function.
5872 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5874 2016-03-18 Yao Qi <yao.qi@linaro.org>
5876 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5877 0 if signal is enqueued. Remove 'signal' from one debugging
5878 message. Move one debugging message to some lines below.
5879 Remove code setting 'signal' to 0.
5881 2016-03-18 Yao Qi <yao.qi@linaro.org>
5883 * linux-low.c (linux_low_filter_event): Remove redundant
5884 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5886 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5888 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5889 (struct linux_target_ops): Wire in the above.
5891 2016-03-03 Yao Qi <yao.qi@linaro.org>
5893 * linux-low.c: Update comments to start_step_over.
5895 2016-03-03 Yao Qi <yao.qi@linaro.org>
5898 * linux-low.c (handle_extended_wait): Set child suspended
5899 if event_lwp->bp_reinsert isn't zero.
5901 2016-03-02 Yao Qi <yao.qi@linaro.org>
5903 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5904 enqueue_pending_signal.
5906 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5908 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5911 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5913 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5914 (s390_regmap_3264) [!__s390x__]: New global.
5915 (s390_collect_ptrace_register): Skip map entries containing -1.
5916 (s390_supply_ptrace_register): Ditto.
5917 (s390_fill_gprs_high): New function.
5918 (s390_store_gprs_high): New function.
5919 (s390_regsets): Add NT_S390_HIGH_GPRS.
5920 (s390_get_hwcap): Enable on 31-bit.
5921 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5922 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5923 Detect NT_S390_HIGH_GPRS.
5924 (s390_usrregs_info_3264): Enable on 31-bit.
5925 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5926 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5928 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5931 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5932 * configure.srv: Ditto.
5933 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5934 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5935 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5936 (init_registers_amd64_linux): Remove prototype.
5937 (tdesc_amd64_linux): Remove declaration.
5938 (get_ipa_tdesc): New function.
5939 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5940 initialize remaining tdescs.
5941 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5942 (init_registers_i386_linux): Remove prototype.
5943 (tdesc_i386_linux): Remove declaration.
5944 (get_ipa_tdesc): New function.
5945 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5946 initialize remaining tdescs.
5947 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5948 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5949 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5950 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5951 (x86_get_ipa_tdesc_idx): New function.
5952 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5953 * linux-x86-tdesc.h: New file.
5954 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5955 (target_get_ipa_tdesc_idx): New macro.
5956 * tracepoint.c (ipa_tdesc_idx): New macro.
5957 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5958 (symbol_list): Add ipa_tdesc_idx.
5959 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5960 (ipa_tdesc): Remove.
5961 (ipa_tdesc_idx): New variable.
5962 (get_context_regcache): Use get_ipa_tdesc.
5963 (gdb_collect): Ditto.
5965 * tracepoint.h (get_ipa_tdesc): New prototype.
5966 (ipa_tdesc): Remove.
5968 2016-02-24 Pedro Alves <palves@redhat.com>
5970 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5971 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5972 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5973 Factor out common code between the USE_SIGTRAP_SIGINFO and
5974 !USE_SIGTRAP_SIGINFO blocks.
5975 (linux_low_filter_event): Call save_stop_reason instead of
5976 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5978 (linux_wait_1): Update comments.
5980 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5982 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5983 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5984 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5985 ppc_insert_point, ppc_remove_point.
5987 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5989 * linux-s390-low.c (s390_supports_z_point_type): New function.
5990 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5992 2016-02-16 Yao Qi <yao.qi@linaro.org>
5994 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5995 PC. Get pc from regcache_read_pc.
5997 2016-02-12 Yao Qi <yao.qi@linaro.org>
5999 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6000 or linux_get_pc_32bit.
6001 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6003 2016-02-12 Yao Qi <yao.qi@linaro.org>
6005 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6006 arm_linux_get_next_pcs_fixup.
6008 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6010 * tracepoint.c (x_tracepoint_action_download): Change
6011 write_inferior_data_ptr to write_inferior_data_pointer.
6012 (cmd_qtstart): Likewise.
6013 (write_inferior_data_ptr): Remove.
6014 (download_agent_expr): Change write_inferior_data_ptr to
6015 write_inferior_data_pointer.
6016 (download_tracepoint_1): Likewise.
6017 (download_tracepoint): Likewise.
6018 (download_trace_state_variables): Likewise.
6020 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6021 Marcin Kościelnicki <koriakin@0x04.net>
6023 * tracepoint.c (struct tracepoint_action_ops): Remove.
6024 (struct tracepoint_action): Remove ops.
6025 (m_tracepoint_action_download, r_tracepoint_action_download)
6026 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6027 size and offset accordingly.
6028 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6029 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6030 (tracepoint_action_send, tracepoint_action_download): New functions.
6031 Helpers for trace action handlers.
6032 (add_tracepoint_action): Remove setup actions ops.
6033 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6035 2016-02-10 Yao Qi <yao.qi@linaro.org>
6037 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6039 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6041 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6043 * configure: Regenerate.
6045 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6047 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6048 void * to gdb_byte *.
6049 * linux-low.c (siginfo_fixup): Likewise.
6050 (linux_xfer_siginfo): Likewise.
6051 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6055 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6057 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6059 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6061 * linux-x86-low.c [__x86_64__]: Include
6062 "nat/amd64-linux-siginfo.h".
6063 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6064 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6065 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6066 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6067 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6068 (cpt_si_fd, si_timerid, si_overrun): Move from
6069 nat/amd64-linux-siginfo.c.
6070 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6072 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6074 * server.c (skip_to_semicolon): Remove.
6075 (process_point_options): Use strchrnul instead of
6078 2016-01-26 Yao Qi <yao.qi@linaro.org>
6080 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6081 * linux-low.c (install_software_single_step_breakpoints): Don't
6082 call regcache_read_pc.
6083 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6086 2016-01-26 Yao Qi <yao.qi@linaro.org>
6088 * linux-low.c (install_software_single_step_breakpoints): Call
6089 regcache_read_pc instead of get_pc.
6091 2016-01-26 Yao Qi <yao.qi@linaro.org>
6093 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6094 (unblock_async_io): Rename to ...
6095 (block_unblock_async_io): ... it. New function.
6096 (enable_async_io): Don't install SIGIO handler. Unblock it
6098 (disable_async_io): Don't ignore SIGIO. Block it instead.
6099 (initialize_async_io): Install SIGIO handler. Don't call
6102 2016-01-26 Yao Qi <yao.qi@linaro.org>
6104 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6105 first character is '\003', call *the_target->request_interrupt.
6107 2016-01-25 Yao Qi <yao.qi@linaro.org>
6109 * remote-utils.c (new_thread_notify): Remove.
6110 (dead_thread_notify): Likewise.
6111 * remote-utils.h (new_thread_notify): Remove declaration.
6112 (dead_thread_notify): Likewise.
6114 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6116 * gdb.trace/pending.exp: Fix expected message on continue.
6118 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6120 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6121 it works properly on big-endian machines where sizeof (CORE_ADDR)
6124 2016-01-21 Pedro Alves <palves@redhat.com>
6126 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6127 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6128 * configure: Regenerate.
6130 2016-01-21 Yao Qi <yao.qi@linaro.org>
6132 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6133 is_thumb and set it according to CPSR saved on the stack.
6134 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6135 arm_sigreturn_next_pc.
6137 2016-01-18 Yao Qi <yao.qi@linaro.org>
6139 * linux-low.c (linux_set_pc_64bit): New function.
6140 (linux_get_pc_64bit): New function.
6141 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6143 * linux-sparc-low.c (debug_threads): Remove declaration.
6144 (sparc_get_pc): Remove.
6145 (the_low_target): Use linux_get_pc_64bit instead of
6147 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6148 (the_low_target): Use linux_get_pc_64bit and
6151 2016-01-18 Yao Qi <yao.qi@linaro.org>
6153 * linux-arm-low.c (debug_threads): Remove declaration.
6154 (arm_get_pc, arm_set_pc): Remove.
6155 (the_low_target): Use linux_get_pc_32bit and
6157 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6158 (the_low_target): Use linux_get_pc_32bit and
6160 * linux-cris-low.c (debug_threads): Remove declaration.
6161 (cris_get_pc, cris_set_pc,): Remove.
6162 (the_low_target): Use linux_get_pc_32bit and
6164 * linux-crisv32-low.c (debug_threads): Remove declaration.
6165 (cris_get_pc, cris_set_pc): Remove.
6166 (the_low_target): Use linux_get_pc_32bit and
6168 * linux-low.c: Include inttypes.h.
6169 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6170 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6171 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6172 (the_low_target): Use linux_get_pc_32bit and
6174 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6175 (the_low_target): Use linux_get_pc_32bit and
6177 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6178 (the_low_target): Use linux_get_pc_32bit and
6180 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6181 (the_low_target): Use linux_get_pc_32bit and
6183 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6184 (the_low_target): Use linux_get_pc_32bit and
6187 2016-01-18 Gary Benson <gbenson@redhat.com>
6189 * configure.ac (AC_FUNC_FORK): New check.
6190 * config.in: Regenerate.
6191 * configure: Likewise.
6193 2016-01-14 Yao Qi <yao.qi@linaro.org>
6195 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6196 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6197 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6198 arm_get_next_pcs_ctor.
6200 2016-01-12 Josh Stone <jistone@redhat.com>
6201 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6203 * inferiors.h: Include "gdb_vecs.h".
6204 (struct process_info): Add syscalls_to_catch.
6205 * inferiors.c (remove_process): Free syscalls_to_catch.
6206 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6207 syscall_return stops.
6208 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6209 * server.c (handle_general_set): Handle QCatchSyscalls.
6210 (handle_query): Report support for QCatchSyscalls.
6211 * target.h (struct target_ops): Add supports_catch_syscall.
6212 (target_supports_catch_syscall): New macro.
6213 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6214 (struct lwp_info): Add syscall_state.
6215 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6216 Maintain syscall_state and syscalls_to_catch across exec.
6217 (get_syscall_trapinfo): New function, proxy to the_low_target.
6218 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6219 (linux_low_filter_event): Toggle syscall_state entry/return for
6220 syscall traps, and set it ignored for all others.
6221 (gdb_catching_syscalls_p): New function.
6222 (gdb_catch_this_syscall_p): New function.
6223 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6224 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6225 (linux_supports_catch_syscall): New function.
6226 (linux_target_ops): Install it.
6227 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6228 (the_low_target): Install it.
6230 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6232 * acinclude.m4: Include new ../warning.m4 file.
6233 * configure: Regenerated.
6234 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6236 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6238 * ax.c (is_goto_target): Mark static.
6239 * linux-low.c (register_addr): Likewise.
6240 (linux_fetch_registers, linux_store_registers): Likewise.
6241 * mem-break.c (any_persistent_commands): Fix old prototype.
6242 (add_commands_to_breakpoint): Mark static.
6243 * regcache.c (find_register_by_name): Delete unused func.
6244 * remote-utils.c (hex_or_minus_one): Mark static.
6245 * server.c (monitor_show_help): Mark static.
6246 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6247 handle_v_requests): Likewise.
6249 2016-01-12 Pedro Alves <palves@redhat.com>
6251 Remove use of the registered trademark symbol throughout.
6253 2016-01-08 Yao Qi <yao.qi@linaro.org>
6255 * remote-utils.c (getpkt): If c is '\003', call target hook
6258 2016-01-06 Yao Qi <yao.qi@linaro.org>
6260 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6261 linux-aarch32-low.c.
6262 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6263 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6264 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6265 (thumb2_breakpoint): Declare.
6266 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6267 linux-aarch32-low.h.
6268 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6269 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6270 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6272 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6274 * gdbreplay.c (gdbreplay_version): Change copyright year in
6276 * server.c (gdbserver_version): Likewise.
6278 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6280 * server.c (crc32_table): Delete.
6281 (crc32): Use libiberty's xcrc32 function.
6283 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6285 * lynx-low.c (lynx_delete_thread_callback): New function.
6286 (lynx_mourn): Properly delete our process and all of its
6287 threads. Remove call to clear_inferiors.
6289 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6291 * target.c (thread_search_callback): Add check that
6292 the thread_stopped target callback is not NULL before
6295 2015-12-21 Yao Qi <yao.qi@linaro.org>
6297 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6300 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6302 * server.c (handle_query): Call target_supports_software_single_step.
6304 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6306 * linux-low.c (single_step): New function.
6307 (linux_resume_one_lwp_throw): Call single_step.
6308 (start_step_over): Likewise.
6310 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6312 * Makefile.in (SFILES): Append arch/arm-linux.c,
6313 arch/arm-get-next-pcs.c.
6314 (arm-linux.o): New rule.
6315 (arm-get-next-pcs.o): New rule.
6316 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6318 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6319 to linux-aarch32-low.c.
6320 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6321 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6322 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6323 (thumb2_breakpoint_len): Likewise.
6324 (arm_is_thumb_mode): Make non-static.
6325 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6326 from linux-aarch32-low.c.
6327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6330 (thumb2_breakpoint_len): Likewise.
6331 (arm_is_thumb_mode): New declaration.
6332 * linux-arm-low.c: Include arch/arm-linux.h
6333 aarch/arm-get-next-pcs.h, sys/syscall.h.
6334 (get_next_pcs_ops): New struct.
6335 (get_next_pcs_addr_bits_remove): New function.
6336 (get_next_pcs_is_thumb): New function.
6337 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6338 (arm_sigreturn_next_pc): Likewise.
6339 (get_next_pcs_syscall_next_pc): Likewise.
6340 (arm_gdbserver_get_next_pcs): Likewise.
6341 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6343 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6344 * server.h: Include gdb_vecs.h.
6346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6348 * Makefile.in (SFILES): Append common/common-regcache.c.
6349 (OBS): Append common-regcache.o.
6350 (common-regcache.o): New rule.
6351 * regcache.c (init_register_cache): Initialize cache to
6353 (regcache_raw_read_unsigned): New function.
6354 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6355 register_status enum.
6357 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6359 * linux-aarch64-low.c (the_low_targets): Rename
6360 breakpoint_reinsert_addr to get_next_pcs.
6361 * linux-arm-low.c (the_low_targets): Likewise.
6362 * linux-bfin-low.c (the_low_targets): Likewise.
6363 * linux-cris-low.c (the_low_targets): Likewise.
6364 * linux-crisv32-low.c (the_low_targets): Likewise.
6365 * linux-low.c (can_software_single_step): Likewise.
6366 (install_software_single_step_breakpoints): New function.
6367 (start_step_over): Use install_software_single_step_breakpoints.
6368 * linux-low.h: New CORE_ADDR vector.
6369 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6371 * linux-mips-low.c (the_low_targets): Likewise.
6372 * linux-nios2-low.c (the_low_targets): Likewise.
6373 * linux-sparc-low.c (the_low_targets): Likewise.
6375 2015-12-17 Pedro Alves <palves@redhat.com>
6377 * linux-low.c (linux_kill_one_lwp): Remove references to
6379 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6381 (linux_init_signals): Delete.
6382 (initialize_low): Adjust.
6383 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6385 2015-12-16 Pedro Alves <palves@redhat.com>
6387 * configure.ac (compiler warning flags): When testing a
6388 -Wno-foo option, check whether -Wfoo works instead.
6389 * configure: Regenerate.
6391 2015-12-11 Don Breazeal <donb@codesourcery.com>
6393 * server.c (process_serial_event): Don't exit from gdbserver
6394 in remote mode if there are still active inferiors.
6396 2015-12-11 Yao Qi <yao.qi@linaro.org>
6398 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6399 arm_breakpoint_at if the process is 32-bit.
6401 2015-12-11 Yao Qi <yao.qi@linaro.org>
6403 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6406 2015-12-07 Yao Qi <yao.qi@linaro.org>
6408 * configure.srv: Append arm.o to srv_tgtobj for
6409 aarch64*-*-linux* target.
6410 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6411 from linux-arm-low.c.
6412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6415 (thumb2_breakpoint_len): Likewise.
6416 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6417 (arm_breakpoint_kinds): Likewise.
6418 (arm_breakpoint_kind_from_pc): Likewise.
6419 (arm_sw_breakpoint_from_kind): Likewise.
6420 (arm_breakpoint_kind_from_current_state): Likewise.
6421 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6422 (arm_sw_breakpoint_from_kind): Declare.
6423 (arm_breakpoint_kind_from_current_state): Declare.
6424 (arm_breakpoint_at): Declare.
6425 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6426 arm_sw_breakpoint_from_kind if process is 32-bit.
6427 (aarch64_breakpoint_kind_from_pc): New function.
6428 (aarch64_breakpoint_kind_from_current_state): New function.
6429 (the_low_target): Initialize fields breakpoint_kind_from_pc
6430 and breakpoint_kind_from_current_state.
6431 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6432 linux-aarch32-low.c.
6433 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6434 (arm_breakpoint, arm_breakpoint_len): Likewise.
6435 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6436 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6437 (arm_is_thumb_mode): Likewise.
6438 (arm_breakpoint_at): Likewise.
6439 (arm_breakpoint_kind_from_pc): Likewise.
6440 (arm_sw_breakpoint_from_kind): Likewise.
6441 (arm_breakpoint_kind_from_current_state): Likewise.
6444 2015-08-04 Yao Qi <yao.qi@linaro.org>
6446 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6447 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6448 * server.c (extended_protocol): Remove "static".
6449 * server.h (extended_protocol): Declare it.
6451 2015-12-04 Josh Stone <jistone@redhat.com>
6453 * target.h (struct target_ops) <arch_setup>: Rename to ...
6454 (struct target_ops) <post_create_inferior>: ... this.
6455 (target_arch_setup): Rename to ...
6456 (target_post_create_inferior): ... this, calling post_create_inferior.
6457 * server.c (start_inferior): Update target_arch_setup calls to
6458 target_post_create_inferior.
6459 * linux-low.c (linux_low_ptrace_options): Forward declare.
6460 (linux_arch_setup): Update its comment for general use.
6461 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6462 (struct linux_target_ops): Use linux_post_create_inferior.
6463 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6464 to post_create_inferior.
6465 * nto-low.c (struct nto_target_ops): Likewise.
6466 * spu-low.c (struct spu_target_ops): Likewise.
6467 * win32-low.c (struct win32_target_ops): Likewise.
6469 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6471 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6473 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6475 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6476 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6477 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6478 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6479 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6480 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6481 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6482 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6483 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6484 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6485 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6486 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6488 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6490 * linux-low.c (linux_look_up_symbols): Don't call
6491 linux_supports_traceclone.
6492 * linux-low.h (thread_db_init): Remove use_events argument.
6493 * thread-db.c (thread_db_use_event): Remove global variable.
6494 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6495 (struct thread_db) <td_create_bp>: Remove field.
6496 (thread_db_create_event): Remove function.
6497 (thread_db_enable_reporting): Likewise.
6498 (find_one_thread): Don't check for thread_db_use_events.
6499 (attach_thread): Likewise.
6500 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6501 (try_thread_db_load_1): Don't check for thread_db_use_events.
6502 (thread_db_init): Remove use_events argument and thread events
6504 (remove_thread_event_breakpoints): Remove function.
6505 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6507 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6509 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6512 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6513 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6514 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6515 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6517 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6520 * linux-low.c (can_hardware_single_step): Use
6521 supports_hardware_single_step.
6522 (can_software_single_step): New function.
6523 (start_step_over): Call can_software_single_step.
6524 (linux_supports_hardware_single_step): New function.
6525 (struct target_ops) <supports_software_single_step>: Initialize.
6526 * linux-low.h (struct linux_target_ops)
6527 <supports_hardware_single_step>: Initialize.
6528 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6530 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6531 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6532 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6534 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6536 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6537 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6539 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6540 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6542 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6544 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6547 * target.h (struct target_ops): <supports_software_single_step>:
6549 (target_supports_software_single_step): New macro.
6551 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6553 * linux-low.c (linux_wait_1): Fix pc advance condition.
6554 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6555 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6557 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6559 * linux-arm-low.c (arm_is_thumb_mode): New function.
6560 (arm_breakpoint_at): Use arm_is_thumb_mode.
6561 (arm_breakpoint_kind_from_current_state): New function.
6562 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6564 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6565 (linux_breakpoint_kind_from_current_state): New function.
6566 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6567 * linux-low.h (struct linux_target_ops)
6568 <breakpoint_kind_from_current_state>: New field.
6569 * target.h (struct target_ops): Likewise.
6570 (target_breakpoint_kind_from_current_state): New macro.
6572 2015-11-30 Pedro Alves <palves@redhat.com>
6574 * linux-low.c (linux_resume): Wake up the event loop before
6577 2015-11-30 Pedro Alves <palves@redhat.com>
6579 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6581 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6583 * target.c (struct thread_search): New structure.
6584 (thread_search_callback): New function.
6585 (prev_general_thread): New global.
6586 (prepare_to_access_memory, done_accessing_memory): New functions.
6587 * target.h (prepare_to_access_memory, done_accessing_memory):
6588 Replace macros with function declarations.
6590 2015-11-30 Pedro Alves <palves@redhat.com>
6593 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6594 report TARGET_WAITKIND_NO_RESUMED.
6595 * remote-utils.c (prepare_resume_reply): Handle
6596 TARGET_WAITKIND_NO_RESUMED.
6597 * server.c (report_no_resumed): New global.
6598 (handle_query) <qSupported>: Handle "no-resumed+". Report
6599 "no-resumed+" support.
6600 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6601 return error if the client doesn't support no-resumed events.
6602 (push_stop_notification): New function.
6603 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6604 events if the client supports them.
6606 2015-11-30 Pedro Alves <palves@redhat.com>
6608 * linux-low.c (thread_still_has_status_pending_p): Don't check
6610 (lwp_resumed): New function.
6611 (status_pending_p_callback): Return early if the LWP is not
6612 supposed to be resumed.
6614 2015-11-30 Pedro Alves <palves@redhat.com>
6616 * linux-low.c (handle_extended_wait): Assert that the LWP's
6617 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6618 thread create events, leave the new child's status pending.
6619 (linux_low_filter_event): If GDB wants to hear about thread exit
6620 events, leave the LWP marked dead and don't delete it.
6621 (linux_wait_for_event_filtered): Don't check for thread exit.
6622 (filter_exit_event): New function.
6623 (linux_wait_1): Use it, when returning an exit event.
6624 (linux_resume_one_lwp_throw): Assert that the LWP's
6625 waitstatus is TARGET_WAITKIND_IGNORE.
6626 * remote-utils.c (prepare_resume_reply): Handle
6627 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6628 * server.c (report_thread_events): New global.
6629 (handle_general_set): Handle QThreadEvents.
6630 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6631 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6632 TARGET_WAITKIND_THREAD_EXITED.
6633 * server.h (report_thread_events): Declare.
6635 2015-11-30 Pedro Alves <palves@redhat.com>
6637 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6638 the thread's last_resume_kind was resume_stop.
6640 2015-11-30 Pedro Alves <palves@redhat.com>
6642 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6645 2015-11-30 Pedro Alves <palves@redhat.com>
6647 * server.c (handle_v_requests): Handle vCtrlC.
6649 2015-11-30 Pedro Alves <palves@redhat.com>
6651 * gdbthread.h (find_any_thread_of_pid): Declare.
6652 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6654 * server.c (handle_query): If current_thread is NULL, look for
6655 another thread of the selected process.
6657 2015-11-26 Daniel Colascione <dancol@dancol.org>
6658 Simon Marchi <simon.marchi@ericsson.com>
6660 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6661 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6663 * target.h (struct target_ops) <thread_name>: New field.
6664 (target_thread_name): New macro.
6666 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6668 * regcache.h (regcache_invalidate_pid): Add declaration.
6669 * regcache.c (regcache_invalidate_pid): New function, extracted
6670 from regcache_invalidate.
6671 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6672 Add trivial documentation comment.
6673 * lynx-low.c: Use regcache_invalidate_pid instead of
6674 regcache_invalidate.
6676 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6678 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6679 and Elf64_auxv_t if the target is Android.
6681 2015-11-22 Doug Evans <xdje42@gmail.com>
6683 * target.h: #include <sys/types.h>.
6685 2015-11-19 Pedro Alves <palves@redhat.com>
6687 * linux-low.c (linux_process_qsupported): Change prototype.
6689 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6691 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6692 and adjust to loop over all features.
6693 * server.c (handle_query) <qSupported>: Adjust to call
6694 target_process_qsupported once, passing it a vector of unprocessed
6696 * target.h (struct target_ops) <process_qsupported>: Change
6698 (target_process_qsupported): Adjust.
6700 2015-11-19 Pedro Alves <palves@redhat.com>
6702 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6704 * configure: Regenerate.
6706 2015-11-19 Pedro Alves <palves@redhat.com>
6708 * configure: Regenerate.
6710 2015-11-19 Yao Qi <yao.qi@linaro.org>
6712 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6715 2015-11-19 Yao Qi <yao.qi@linaro.org>
6717 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6718 (struct aarch64_operand): Move enum out.
6720 2015-11-19 Yao Qi <yao.qi@linaro.org>
6722 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6723 struct user_fpsimd_state *.
6724 (aarch64_store_fpregset): Likewise.
6726 2015-11-19 Yao Qi <yao.qi@linaro.org>
6728 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6729 struct user_pt_regs *.
6730 (aarch64_store_gregset): Likewise.
6732 2015-11-18 Pedro Alves <palves@redhat.com>
6734 * Makefile.in (all_object_files): Add $IPA_OBJS.
6736 2015-11-17 Pedro Alves <palves@redhat.com>
6738 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6739 GDB_SIGNAL_0 and gdb_signal_to_string.
6741 2015-11-17 Pedro Alves <palves@redhat.com>
6743 * win32-low.c (handle_output_debug_string): Remove parameter.
6744 (win32_kill): Remove our_status local and adjust call to
6745 handle_output_debug_string.
6746 (get_child_debug_event): Adjust call to
6747 handle_output_debug_string.
6749 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6751 * linux-mips-low.c (mips_fill_gregset): Add cast.
6752 (mips_store_gregset): Likewise.
6753 (mips_fill_fpregset): Likewise.
6754 (mips_store_fpregset): Likewise.
6756 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6758 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6761 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6763 * linux-mips-low.c (mips_linux_new_thread): Change type of
6764 watch_type to enum target_hw_bp_type.
6766 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6768 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6769 Change return type to arm_hwbp_type.
6771 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6773 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6774 (arm_store_gregset): Likewise.
6775 * linux-arm-low.c (arm_get_hwcap): Likewise.
6776 (arm_read_description): Likewise.
6778 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6780 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6782 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6784 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6785 (ppc_fill_vsxregset): Likewise.
6786 (ppc_store_vsxregset): Likewise.
6787 (ppc_fill_vrregset): Likewise.
6788 (ppc_store_vrregset): Likewise.
6789 (ppc_fill_evrregset): Likewise.
6790 (ppc_store_evrregset): Likewise.
6792 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6794 * linux-ppc-low.c (ppc_usrregs_info): Remove
6795 forward-declaration.
6796 (ppc_arch_setup): Move lower in file.
6798 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6800 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6801 (ps_pdwrite): Likewise.
6803 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6805 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6806 to after assert checks.
6808 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6810 * proc-service.c (ps_pdread): Add/adjust casts.
6811 (ps_pdwrite): Add/adjust casts.
6813 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6815 * server.c (handle_search_memory_1): Cast return value of
6818 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6820 * server.c (write_qxfer_response): Change type of data to
6823 2015-10-29 Pedro Alves <palves@redhat.com>
6825 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6827 2015-10-29 Pedro Alves <palves@redhat.com>
6829 * tracepoint.c (clear_installed_tracepoints): Add casts.
6831 2015-10-29 Pedro Alves <palves@redhat.com>
6833 * server.c (handle_v_cont, process_serial_event): Add enum
6834 gdb_signal casts to signal parsing code.
6836 2015-10-29 Pedro Alves <palves@redhat.com>
6838 * linux-low.h (NULL_REGSET): Define.
6839 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6840 * linux-arm-low.c (arm_regsets): Likewise.
6841 * linux-crisv32-low.c (cris_regsets): Likewise.
6842 * linux-m68k-low.c (m68k_regsets): Likewise.
6843 * linux-mips-low.c (mips_regsets): Likewise.
6844 * linux-nios2-low.c (nios2_regsets): Likewise.
6845 * linux-ppc-low.c (ppc_regsets): Likewise.
6846 * linux-s390-low.c (s390_regsets): Likewise.
6847 * linux-sh-low.c (sh_regsets): Likewise.
6848 * linux-sparc-low.c (sparc_regsets): Likewise.
6849 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6850 * linux-tile-low.c (tile_regsets): Likewise.
6851 * linux-x86-low.c (x86_regsets): Likewise.
6852 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6854 2015-10-29 Pedro Alves <palves@redhat.com>
6856 * linux-low.h (NULL_REGSET): Define.
6857 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6858 * linux-arm-low.c (arm_regsets): Likewise.
6859 * linux-crisv32-low.c (cris_regsets): Likewise.
6860 * linux-m68k-low.c (m68k_regsets): Likewise.
6861 * linux-mips-low.c (mips_regsets): Likewise.
6862 * linux-nios2-low.c (nios2_regsets): Likewise.
6863 * linux-ppc-low.c (ppc_regsets): Likewise.
6864 * linux-s390-low.c (s390_regsets): Likewise.
6865 * linux-sh-low.c (sh_regsets): Likewise.
6866 * linux-sparc-low.c (sparc_regsets): Likewise.
6867 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6868 * linux-tile-low.c (tile_regsets): Likewise.
6869 * linux-x86-low.c (x86_regsets): Likewise.
6870 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6872 2015-10-26 Doug Evans <dje@google.com>
6874 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6876 2015-10-26 Doug Evans <dje@google.com>
6878 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6880 2015-10-26 Doug Evans <dje@google.com>
6882 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6884 (attach_thread, find_new_threads_callback): Ditto.
6886 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6888 * mem-break.h (set_breakpoint_data): Remove.
6890 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6892 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6893 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6894 (initialize_low): Remove set_breakpoint_data call.
6895 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6896 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6897 (initialize_low): Remove set_breakpoint_data call.
6898 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6899 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6900 (initialize_low): Remove set_breakpoint_data call.
6902 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6904 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6905 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6906 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6907 * target.h (target_breakpoint_kind_from_pc): New macro.
6909 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6911 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6912 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6913 the default breakpoint kind.
6915 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6917 * linux-arm-low.c (arm_supports_z_point_type): Add software
6920 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6922 * linux-arm-low.c: Refactor breakpoint definitions.
6923 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6924 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6926 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6928 * Makefile.in: Add arm.c/o.
6929 * configure.srv: Likewise.
6930 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6931 (arm_breakpoint_kind_from_pc): New function.
6932 (arm_sw_breakpoint_from_kind): Return proper kind.
6933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6935 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6937 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6939 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6940 (struct raw_breakpoint) <size>: Remove.
6941 (struct raw_breakpoint) <kind>: Add.
6942 (bp_size): New function.
6943 (bp_opcode): Likewise.
6944 (find_raw_breakpoint_at): Adjust for kind.
6945 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6946 (remove_memory_breakpoint): Adjust for kind call bp_size.
6947 (set_raw_breakpoint_at): Adjust for kind.
6948 (set_breakpoint): Likewise.
6949 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6950 (delete_raw_breakpoint): Adjust for kind.
6951 (delete_breakpoint): Likewise.
6952 (find_gdb_breakpoint): Likewise.
6953 (set_gdb_breakpoint_1): Likewise.
6954 (set_gdb_breakpoint): Likewise.
6955 (delete_gdb_breakpoint_1): Likewise.
6956 (delete_gdb_breakpoint): Likewise.
6957 (uninsert_raw_breakpoint): Likewise.
6958 (reinsert_raw_breakpoint): Likewise.
6959 (set_breakpoint_data): Remove.
6960 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6961 (check_mem_read): Adjust for kind call bp_size.
6962 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6963 (clone_one_breakpoint): Adjust for kind.
6964 * mem-break.h (set_gdb_breakpoint): Likewise.
6965 (delete_gdb_breakpoint): Likewise.
6966 * server.c (process_serial_event): Likewise.
6968 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6970 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6971 (struct linux_target_ops) <breakpoint>: Remove.
6972 (struct linux_target_ops) <breakpoint_len>: Remove.
6973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6975 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6976 (arm_sw_breakpoint_from_kind): New function.
6977 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6978 (struct linux_target_ops) <breakpoint>: Remove.
6979 (struct linux_target_ops) <breakpoint_len>: Remove.
6980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6982 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6983 (struct linux_target_ops) <breakpoint>: Remove.
6984 (struct linux_target_ops) <breakpoint_len>: Remove.
6985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6987 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6988 (struct linux_target_ops) <breakpoint>: Remove.
6989 (struct linux_target_ops) <breakpoint_len>: Remove.
6990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6992 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6993 and sw_breakpoint_from_kind to increment the pc.
6994 (linux_breakpoint_kind_from_pc): New function.
6995 (linux_sw_breakpoint_from_kind): New function.
6996 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6997 (initialize_low): Call breakpoint_kind_from_pc and
6998 sw_breakpoint_from_kind to replace breakpoint_data/len.
6999 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7002 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7003 (struct linux_target_ops) <breakpoint>: Remove.
7004 (struct linux_target_ops) <breakpoint_len>: Remove.
7005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7007 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7008 (struct linux_target_ops) <breakpoint>: Remove.
7009 (struct linux_target_ops) <breakpoint_len>: Remove.
7010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7011 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7012 * linux-mips-low.c (mips_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-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7018 (struct linux_target_ops) <breakpoint>: Remove.
7019 (struct linux_target_ops) <breakpoint_len>: Remove.
7020 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7021 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7022 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7023 (struct linux_target_ops) <breakpoint>: Remove.
7024 (struct linux_target_ops) <breakpoint_len>: Remove.
7025 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7026 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7027 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7028 (struct linux_target_ops) <breakpoint>: Remove.
7029 (struct linux_target_ops) <breakpoint_len>: Remove.
7030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7032 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7033 (struct linux_target_ops) <breakpoint>: Remove.
7034 (struct linux_target_ops) <breakpoint_len>: Remove.
7035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7037 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7038 (struct linux_target_ops) <breakpoint>: Remove.
7039 (struct linux_target_ops) <breakpoint_len>: Remove.
7040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7042 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7043 (struct linux_target_ops) <breakpoint>: Remove.
7044 (struct linux_target_ops) <breakpoint_len>: Remove.
7045 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7046 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7047 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7048 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7049 (struct linux_target_ops) <breakpoint>: Remove.
7050 (struct linux_target_ops) <breakpoint_len>: Remove.
7051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7053 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7054 (struct linux_target_ops) <breakpoint>: Remove.
7055 (struct linux_target_ops) <breakpoint_len>: Remove.
7056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7059 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7061 * linux-cris-low.c (cris_get_pc): Remove void arg.
7063 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7065 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7068 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7070 * inferiors.c (thread_pid_matches_callback): New function.
7071 (find_thread_process): New function.
7072 (remove_thread): Reset current_thread.
7073 (remove_process): Assert threads have been removed first.
7075 2015-10-15 Yao Qi <yao.qi@linaro.org>
7077 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7079 (aarch64_remove_point): Likewise.
7080 * regcache.c (regcache_register_size): New function.
7082 2015-10-12 Yao Qi <yao.qi@linaro.org>
7084 * linux-aarch64-low.c: Update all callers as emit_load_store
7085 is renamed to aarch64_emit_load_store.
7087 2015-10-12 Yao Qi <yao.qi@linaro.org>
7089 * linux-aarch64-low.c: Update all callers of function renaming
7090 from emit_insn to aarch64_emit_insn.
7092 2015-10-12 Yao Qi <yao.qi@linaro.org>
7094 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7095 arch/aarch64-insn.h.
7096 (struct aarch64_memory_operand): Likewise.
7098 (emit_insn): Move to arch/aarch64-insn.c.
7099 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7100 (emit_load_store): Move to arch/aarch64-insn.c.
7101 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7102 (can_encode_int32): Remove.
7104 2015-10-12 Yao Qi <yao.qi@linaro.org>
7106 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7107 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7108 (aarch64_relocate_instruction): Likewise.
7109 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7110 (struct aarch64_insn_visitor): Likewise.
7112 2015-10-12 Yao Qi <yao.qi@linaro.org>
7114 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7115 (struct aarch64_insn_visitor): New.
7116 (struct aarch64_insn_relocation_data): New.
7117 (aarch64_ftrace_insn_reloc_b): New function.
7118 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7119 (aarch64_ftrace_insn_reloc_cb): Likewise.
7120 (aarch64_ftrace_insn_reloc_tb): Likewise.
7121 (aarch64_ftrace_insn_reloc_adr): Likewise.
7122 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7123 (aarch64_ftrace_insn_reloc_others): Likewise.
7125 (aarch64_relocate_instruction): Use visitor.
7127 2015-10-12 Yao Qi <yao.qi@linaro.org>
7129 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7130 int. Add argument buf.
7131 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7132 aarch64_relocate_instruction.
7134 2015-10-12 Yao Qi <yao.qi@linaro.org>
7136 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7137 argument insn. Remove local variable insn. Don't call
7139 (aarch64_install_fast_tracepoint_jump_pad): Call
7142 2015-09-30 Yao Qi <yao.qi@linaro.org>
7144 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7145 (emit_load_store_pair): Likewise.
7147 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7149 * dll.c (match_dll): Add cast(s).
7150 (unloaded_dll): Likewise.
7151 * linux-low.c (second_thread_of_pid_p): Likewise.
7152 (delete_lwp_callback): Likewise.
7153 (count_events_callback): Likewise.
7154 (select_event_lwp_callback): Likewise.
7155 (linux_set_resume_request): Likewise.
7156 * server.c (accumulate_file_name_length): Likewise.
7157 (emit_dll_description): Likewise.
7158 (handle_qxfer_threads_worker): Likewise.
7159 (visit_actioned_threads): Likewise.
7160 * thread-db.c (any_thread_of): Likewise.
7161 * tracepoint.c (same_process_p): Likewise.
7162 (match_blocktype): Likewise.
7163 (build_traceframe_info_xml): Likewise.
7165 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7167 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7169 (gdb_unparse_agent_expr): Likewise.
7170 * hostio.c (require_data): Likewise.
7171 (handle_pread): Likewise.
7172 * linux-low.c (disable_regset): Likewise.
7173 (fetch_register): Likewise.
7174 (store_register): Likewise.
7175 (get_dynamic): Likewise.
7176 (linux_qxfer_libraries_svr4): Likewise.
7177 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7178 (set_fast_tracepoint_jump): Likewise.
7179 (uninsert_fast_tracepoint_jumps_at): Likewise.
7180 (reinsert_fast_tracepoint_jumps_at): Likewise.
7181 (validate_inserted_breakpoint): Likewise.
7182 (clone_agent_expr): Likewise.
7183 * regcache.c (init_register_cache): Likewise.
7184 * remote-utils.c (putpkt_binary_1): Likewise.
7185 (decode_M_packet): Likewise.
7186 (decode_X_packet): Likewise.
7187 (look_up_one_symbol): Likewise.
7188 (relocate_instruction): Likewise.
7189 (monitor_output): Likewise.
7190 * server.c (handle_search_memory): Likewise.
7191 (handle_qxfer_exec_file): Likewise.
7192 (handle_qxfer_libraries): Likewise.
7193 (handle_qxfer): Likewise.
7194 (handle_query): Likewise.
7195 (handle_v_cont): Likewise.
7196 (handle_v_run): Likewise.
7197 (captured_main): Likewise.
7198 * target.c (write_inferior_memory): Likewise.
7199 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7200 * tracepoint.c (init_trace_buffer): Likewise.
7201 (add_tracepoint_action): Likewise.
7202 (add_traceframe): Likewise.
7203 (add_traceframe_block): Likewise.
7204 (cmd_qtdpsrc): Likewise.
7205 (cmd_qtdv): Likewise.
7206 (cmd_qtstatus): Likewise.
7207 (response_source): Likewise.
7208 (response_tsv): Likewise.
7209 (cmd_qtnotes): Likewise.
7210 (gdb_collect): Likewise.
7211 (initialize_tracepoint): Likewise.
7213 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7215 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7216 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7217 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7219 (enum aarch64_condition_codes): New enum.
7220 (w0): New static global.
7223 (struct aarch64_memory_operand) <type>: New
7224 MEMORY_OPERAND_POSTINDEX type.
7225 (postindex_memory_operand): New helper function.
7226 (emit_ret): New function.
7227 (emit_load_store_pair): New function, factored out of emit_stp
7228 with support for MEMORY_OPERAND_POSTINDEX.
7229 (emit_stp): Rewrite using emit_load_store_pair.
7230 (emit_ldp): New function.
7231 (emit_load_store): Likewise.
7232 (emit_ldr): Mention post-index instruction in comment.
7233 (emit_ldrh): New function.
7234 (emit_ldrb): New function.
7235 (emit_ldrsw): Mention post-index instruction in comment.
7236 (emit_str): Likewise.
7237 (emit_subs): New function.
7238 (emit_cmp): Likewise.
7239 (emit_and): Likewise.
7240 (emit_orr): Likewise.
7241 (emit_orn): Likewise.
7242 (emit_eor): Likewise.
7243 (emit_mvn): Likewise.
7244 (emit_lslv): Likewise.
7245 (emit_lsrv): Likewise.
7246 (emit_asrv): Likewise.
7247 (emit_mul): Likewise.
7248 (emit_sbfm): Likewise.
7249 (emit_sbfx): Likewise.
7250 (emit_ubfm): Likewise.
7251 (emit_ubfx): Likewise.
7252 (emit_csinc): Likewise.
7253 (emit_cset): Likewise.
7254 (emit_nop): Likewise.
7255 (emit_ops_insns): New helper function.
7256 (emit_pop): Likewise.
7257 (emit_push): Likewise.
7258 (aarch64_emit_prologue): New function.
7259 (aarch64_emit_epilogue): Likewise.
7260 (aarch64_emit_add): Likewise.
7261 (aarch64_emit_sub): Likewise.
7262 (aarch64_emit_mul): Likewise.
7263 (aarch64_emit_lsh): Likewise.
7264 (aarch64_emit_rsh_signed): Likewise.
7265 (aarch64_emit_rsh_unsigned): Likewise.
7266 (aarch64_emit_ext): Likewise.
7267 (aarch64_emit_log_not): Likewise.
7268 (aarch64_emit_bit_and): Likewise.
7269 (aarch64_emit_bit_or): Likewise.
7270 (aarch64_emit_bit_xor): Likewise.
7271 (aarch64_emit_bit_not): Likewise.
7272 (aarch64_emit_equal): Likewise.
7273 (aarch64_emit_less_signed): Likewise.
7274 (aarch64_emit_less_unsigned): Likewise.
7275 (aarch64_emit_ref): Likewise.
7276 (aarch64_emit_if_goto): Likewise.
7277 (aarch64_emit_goto): Likewise.
7278 (aarch64_write_goto_address): Likewise.
7279 (aarch64_emit_const): Likewise.
7280 (aarch64_emit_call): Likewise.
7281 (aarch64_emit_reg): Likewise.
7282 (aarch64_emit_pop): Likewise.
7283 (aarch64_emit_stack_flush): Likewise.
7284 (aarch64_emit_zero_ext): Likewise.
7285 (aarch64_emit_swap): Likewise.
7286 (aarch64_emit_stack_adjust): Likewise.
7287 (aarch64_emit_int_call_1): Likewise.
7288 (aarch64_emit_void_call_2): Likewise.
7289 (aarch64_emit_eq_goto): Likewise.
7290 (aarch64_emit_ne_goto): Likewise.
7291 (aarch64_emit_lt_goto): Likewise.
7292 (aarch64_emit_le_goto): Likewise.
7293 (aarch64_emit_gt_goto): Likewise.
7294 (aarch64_emit_ge_got): Likewise.
7295 (aarch64_emit_ops_impl): New static global variable.
7296 (aarch64_emit_ops): New target function, return
7297 &aarch64_emit_ops_impl.
7298 (struct linux_target_ops): Install it.
7300 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7302 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7303 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7305 * linux-aarch64-ipa.c: New file.
7306 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7308 (aarch64_get_thread_area): New target method.
7309 (extract_signed_bitfield): New helper function.
7310 (aarch64_decode_ldr_literal): New function.
7311 (enum aarch64_opcodes): New enum.
7312 (struct aarch64_register): New struct.
7313 (struct aarch64_operand): New struct.
7314 (x0): New static global.
7323 (aarch64_register): New helper function.
7324 (register_operand): Likewise.
7325 (immediate_operand): Likewise.
7326 (struct aarch64_memory_operand): New struct.
7327 (offset_memory_operand): New helper function.
7328 (preindex_memory_operand): Likewise.
7329 (enum aarch64_system_control_registers): New enum.
7330 (ENCODE): New macro.
7331 (emit_insn): New helper function.
7332 (emit_b): New function.
7333 (emit_bcond): Likewise.
7334 (emit_cb): Likewise.
7335 (emit_tb): Likewise.
7336 (emit_blr): Likewise.
7337 (emit_stp): Likewise.
7338 (emit_ldp_q_offset): Likewise.
7339 (emit_stp_q_offset): Likewise.
7340 (emit_load_store): Likewise.
7341 (emit_ldr): Likewise.
7342 (emit_ldrsw): Likewise.
7343 (emit_str): Likewise.
7344 (emit_ldaxr): Likewise.
7345 (emit_stxr): Likewise.
7346 (emit_stlr): Likewise.
7347 (emit_data_processing_reg): Likewise.
7348 (emit_data_processing): Likewise.
7349 (emit_add): Likewise.
7350 (emit_sub): Likewise.
7351 (emit_mov): Likewise.
7352 (emit_movk): Likewise.
7353 (emit_mov_addr): Likewise.
7354 (emit_mrs): Likewise.
7355 (emit_msr): Likewise.
7356 (emit_sevl): Likewise.
7357 (emit_wfe): Likewise.
7358 (append_insns): Likewise.
7359 (can_encode_int32_in): New helper function.
7360 (aarch64_relocate_instruction): New function.
7361 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7362 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7363 (struct linux_target_ops): Install aarch64_get_thread_area,
7364 aarch64_install_fast_tracepoint_jump_pad and
7365 aarch64_get_min_fast_tracepoint_insn_len.
7367 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7369 * Makefile.in (aarch64-insn.o): New rule.
7370 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7372 2015-09-21 Yao Qi <yao.qi@linaro.org>
7374 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7376 2015-09-21 Yao Qi <yao.qi@linaro.org>
7378 * tracepoint.c (max_jump_pad_size): Remove.
7380 2015-09-18 Yao Qi <yao.qi@linaro.org>
7382 * linux-aarch64-low.c: Don't include sys/uio.h.
7383 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7385 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7387 * tracepoint.c (eval_result_type): Change prototype.
7388 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7390 2015-09-15 Pedro Alves <palves@redhat.com>
7392 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7393 Check whether to report exec events instead of checking whether
7394 multiprocess is enabled.
7396 2015-09-15 Pedro Alves <palves@redhat.com>
7399 * remote-utils.c (prepare_resume_reply): Merge
7400 TARGET_WAITKIND_VFORK_DONE switch case with the
7401 TARGET_WAITKIND_FORKED case.
7403 2015-09-15 Yao Qi <yao.qi@linaro.org>
7405 * server.c (handle_query): Check string comparison using
7406 "else if" instead of "if".
7408 2015-09-15 Yao Qi <yao.qi@linaro.org>
7410 * server.c (vCont_supported): New global variable.
7411 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7412 matches. Append ";vContSupported+" to own_buf.
7413 (handle_v_requests): Append ";s;S" to own_buf if target supports
7414 hardware single step or vCont_supported is false.
7415 (capture_main): Set vCont_supported to zero.
7417 2015-09-15 Yao Qi <yao.qi@linaro.org>
7419 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7421 (linux_supports_hardware_single_step): ... New function.
7422 (linux_target_ops): Update.
7423 * lynx-low.c (lynx_target_ops): Set field
7424 supports_hardware_single_step to target_can_do_hardware_single_step.
7425 * nto-low.c (nto_target_ops): Likewise.
7426 * spu-low.c (spu_target_ops): Likewise.
7427 * win32-low.c (win32_target_ops): Likewise.
7428 * target.c (target_can_do_hardware_single_step): New function.
7429 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7430 Remove. <supports_hardware_single_step>: New field.
7431 (target_supports_conditional_breakpoints): Remove.
7432 (target_supports_hardware_single_step): New macro.
7433 (target_can_do_hardware_single_step): Declare.
7434 * server.c (handle_query): Use target_supports_hardware_single_step
7435 instead of target_supports_conditional_breakpoints.
7437 2015-09-15 Yao Qi <yao.qi@linaro.org>
7439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7441 (struct linux_target_ops the_low_target): Install
7442 aarch64_linux_siginfo_fixup.
7444 2015-09-11 Don Breazeal <donb@codesourcery.com>
7445 Luis Machado <lgustavo@codesourcery.com>
7447 * linux-low.c (linux_mourn): Static declaration.
7448 (linux_arch_setup): Move in front of
7449 handle_extended_wait.
7450 (linux_arch_setup_thread): New function.
7451 (handle_extended_wait): Handle exec events. Call
7452 linux_arch_setup_thread. Make event_lwp argument a
7453 pointer-to-a-pointer.
7454 (check_zombie_leaders): Do not check stopped threads.
7455 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7456 (linux_low_filter_event): Add lwp and thread for exec'ing
7457 non-leader thread if leader thread has been deleted.
7458 Refactor code into linux_arch_setup_thread and call it.
7459 Pass child lwp pointer by reference to handle_extended_wait.
7460 (linux_wait_for_event_filtered): Update comment.
7461 (linux_wait_1): Prevent clobbering exec event status.
7462 (linux_supports_exec_events): New function.
7463 (linux_target_ops) <supports_exec_events>: Initialize new member.
7464 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7466 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7467 * server.c (report_exec_events): New global variable.
7468 (handle_query): Handle qSupported query for exec-events feature.
7469 (captured_main): Initialize report_exec_events.
7470 * server.h (report_exec_events): Declare new global variable.
7471 * target.h (struct target_ops) <supports_exec_events>: New
7473 (target_supports_exec_events): New macro.
7474 * win32-low.c (win32_target_ops) <supports_exec_events>:
7475 Initialize new member.
7477 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7479 * linux-low.c (linux_low_enable_btrace): Remove.
7480 (linux_target_ops): Replace linux_low_enable_btrace with
7481 linux_enable_btrace.
7483 2015-09-03 Yao Qi <yao.qi@linaro.org>
7485 * linux-aarch64-low.c (aarch64_insert_point): Call
7486 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7489 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7491 * linux-low.c (check_stopped_by_breakpoint): Use
7492 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7494 2015-08-27 Pedro Alves <palves@redhat.com>
7496 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7498 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7500 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7501 the XNEW-family equivalent.
7502 (compile_bytecodes): Likewise.
7503 * dll.c (loaded_dll): Likewise.
7504 * event-loop.c (append_callback_event): Likewise.
7505 (create_file_handler): Likewise.
7506 (create_file_event): Likewise.
7507 * hostio.c (handle_open): Likewise.
7508 * inferiors.c (add_thread): Likewise.
7509 (add_process): Likewise.
7510 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7511 * linux-arm-low.c (arm_new_process): Likewise.
7512 (arm_new_thread): Likewise.
7513 * linux-low.c (add_to_pid_list): Likewise.
7514 (linux_add_process): Likewise.
7515 (handle_extended_wait): Likewise.
7516 (add_lwp): Likewise.
7517 (enqueue_one_deferred_signal): Likewise.
7518 (enqueue_pending_signal): Likewise.
7519 (linux_resume_one_lwp_throw): Likewise.
7520 (linux_resume_one_thread): Likewise.
7521 (linux_read_memory): Likewise.
7522 (linux_write_memory): Likewise.
7523 * linux-mips-low.c (mips_linux_new_process): Likewise.
7524 (mips_linux_new_thread): Likewise.
7525 (mips_add_watchpoint): Likewise.
7526 * linux-x86-low.c (initialize_low_arch): Likewise.
7527 * lynx-low.c (lynx_add_process): Likewise.
7528 * mem-break.c (set_raw_breakpoint_at): Likewise.
7529 (set_breakpoint): Likewise.
7530 (add_condition_to_breakpoint): Likewise.
7531 (add_commands_to_breakpoint): Likewise.
7532 (clone_agent_expr): Likewise.
7533 (clone_one_breakpoint): Likewise.
7534 * regcache.c (new_register_cache): Likewise.
7535 * remote-utils.c (look_up_one_symbol): Likewise.
7536 * server.c (queue_stop_reply): Likewise.
7537 (start_inferior): Likewise.
7538 (queue_stop_reply_callback): Likewise.
7539 (handle_target_event): Likewise.
7540 * spu-low.c (fetch_ppc_memory): Likewise.
7541 (store_ppc_memory): Likewise.
7542 * target.c (set_target_ops): Likewise.
7543 * thread-db.c (thread_db_load_search): Likewise.
7544 (try_thread_db_load_1): Likewise.
7545 * tracepoint.c (add_tracepoint): Likewise.
7546 (add_tracepoint_action): Likewise.
7547 (create_trace_state_variable): Likewise.
7548 (cmd_qtdpsrc): Likewise.
7549 (cmd_qtro): Likewise.
7550 (add_while_stepping_state): Likewise.
7551 * win32-low.c (child_add_thread): Likewise.
7552 (get_image_name): Likewise.
7554 2015-08-25 Yao Qi <yao.qi@linaro.org>
7556 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7558 2015-08-25 Yao Qi <yao.qi@linaro.org>
7560 * Makefile.in (aarch64-linux.o): New rule.
7561 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7563 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7564 (aarch64_init_debug_reg_state): Make it extern.
7565 (aarch64_linux_prepare_to_resume): Remove.
7567 2015-08-25 Yao Qi <yao.qi@linaro.org>
7569 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7570 lwp_arch_private_info and ptid_of_lwp.
7572 2015-08-25 Yao Qi <yao.qi@linaro.org>
7574 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7575 Find proc_info by find_process_pid. All callers updated.
7577 2015-08-25 Yao Qi <yao.qi@linaro.org>
7579 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7581 (debug_reg_change_callback): Remove.
7582 (aarch64_notify_debug_reg_change): Remove.
7584 2015-08-25 Yao Qi <yao.qi@linaro.org>
7586 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7587 Call current_lwp_ptid.
7589 2015-08-25 Yao Qi <yao.qi@linaro.org>
7591 * linux-aarch64-low.c (debug_reg_change_callback): Use
7594 2015-08-25 Yao Qi <yao.qi@linaro.org>
7596 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7598 2015-08-25 Yao Qi <yao.qi@linaro.org>
7600 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7602 2015-08-25 Yao Qi <yao.qi@linaro.org>
7604 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7607 2015-08-25 Yao Qi <yao.qi@linaro.org>
7609 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7611 (debug_reg_change_callback): Remove argument entry and add argument
7612 lwp. Remove local variable thread. Don't print thread id in the
7613 debugging output. Don't check whether pid of thread equals to pid.
7614 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7615 iterate_over_lwps instead find_inferior.
7617 2015-08-24 Pedro Alves <palves@redhat.com>
7619 * inferiors.c (get_first_process): New function.
7620 * inferiors.h (get_first_process): New declaration.
7621 * remote-utils.c (read_ptid): Default to the first process in the
7622 list, instead of to the current thread's process.
7624 2015-08-24 Pedro Alves <palves@redhat.com>
7626 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7627 * event-loop.c: Likewise.
7628 * remote-utils.c: Likewise.
7629 * tracepoint.c: Likewise.
7631 2015-08-24 Pedro Alves <palves@redhat.com>
7633 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7636 2015-08-21 Pedro Alves <palves@redhat.com>
7638 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7639 instead of literal 1.
7641 2015-08-21 Pedro Alves <palves@redhat.com>
7643 * tdesc.c (default_description): Explicitly zero-initialize.
7645 2015-08-21 Pedro Alves <palves@redhat.com>
7648 * inferiors.c (remove_thread): Discard any pending stop reply for
7650 * server.c (remove_all_on_match_pid): Rename to ...
7651 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7653 (discard_queued_stop_replies): Change parameter to a ptid. Now
7655 (handle_v_kill, kill_inferior_callback, captured_main)
7656 (process_serial_event): Adjust.
7657 * server.h (discard_queued_stop_replies): Declare.
7659 2015-08-21 Pedro Alves <palves@redhat.com>
7661 * linux-low.c (wait_for_sigstop): Always switch to no thread
7662 selected if the previously current thread dies.
7663 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7664 process instead of the current thread's.
7665 * remote-utils.c (input_interrupt): Don't check if there's no
7667 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7668 current thread to the general thread fails, error out.
7669 (handle_qxfer_auxv, handle_qxfer_libraries)
7670 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7671 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7672 (handle_query): Check if there's a thread selected instead of
7673 checking whether there's any thread in the thread list.
7674 (handle_qxfer_threads, handle_qxfer_btrace)
7675 (handle_qxfer_btrace_conf): Don't error out early if there's no
7676 thread in the thread list.
7677 (handle_v_cont, myresume): Don't set the current thread to the
7679 (process_serial_event) <Hg handling>: Also set thread_id if the
7680 previous general thread is still alive.
7681 (process_serial_event) <g/G handling>: If setting the current
7682 thread to the general thread fails, error out.
7683 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7684 thread's lwp instead of the current thread's.
7685 * target.c (set_desired_thread): If the desired thread was not
7686 found, leave the current thread pointing to NULL. Return an int
7687 (boolean) indicating success.
7688 * target.h (set_desired_thread): Change return type to int.
7690 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7692 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7693 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7695 (ps_get_thread_area): New function.
7697 2015-08-19 Gary Benson <gbenson@redhat.com>
7699 * hostio.c (handle_pread): Do not attempt to read more data
7700 than hostio_reply_with_data can fit in a packet.
7702 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7704 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7706 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7708 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7710 2015-08-06 Pedro Alves <palves@redhat.com>
7712 * tracepoint.c (expr_eval_result): Now an int.
7714 2015-08-06 Pedro Alves <palves@redhat.com>
7716 * gdbthread.h (struct regcache): Forward declare.
7717 (struct thread_info) <regcache_data>: Now a struct regcache
7719 * inferiors.c (inferior_regcache_data)
7720 (set_inferior_regcache_data): Now work with struct regcache
7722 * inferiors.h (struct regcache): Forward declare.
7723 (inferior_regcache_data, set_inferior_regcache_data): Now work
7724 with struct regcache pointers.
7725 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7726 (free_register_cache_thread): Remove struct regcache pointer
7729 2015-08-06 Pedro Alves <palves@redhat.com>
7731 * server.c (captured_main): On error, print the exception message
7732 to stderr, and if run_once is set, throw a quit.
7734 2015-08-06 Pedro Alves <palves@redhat.com>
7736 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7739 2015-08-06 Pedro Alves <palves@redhat.com>
7741 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7742 reading beyond the passed in buffer length.
7744 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7746 * tracepoint.c (symbol_list) <required>: Remove.
7748 2015-08-06 Pedro Alves <palves@redhat.com>
7750 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7751 count if stopping and suspending threads.
7752 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7753 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7754 (linux_detach): Complete an ongoing step-over.
7755 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7757 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7758 (linux_wait_1): If passing a signal to the inferior after
7759 finishing a step-over, unsuspend and re-resume all lwps. If we
7760 see a single-step event but the thread should be continuing, don't
7761 pass the trap to gdb.
7762 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7763 internal_error instead of gdb_assert.
7764 (enqueue_pending_signal): New function.
7765 (check_ptrace_stopped_lwp_gone): Add debug output.
7766 (start_step_over): Use internal_error instead of gdb_assert.
7767 (complete_ongoing_step_over): New function.
7768 (linux_resume_one_thread): Don't resume a suspended thread.
7769 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7772 2015-08-06 Pedro Alves <palves@redhat.com>
7774 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7775 (linux_thread_alive): Use lwp_is_marked_dead.
7776 (extended_event_reported): Delete.
7777 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7778 instead of extended_event_reported.
7779 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7781 (lwp_is_marked_dead): New function.
7782 (lwp_running): Use lwp_is_marked_dead.
7783 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7786 2015-08-06 Pedro Alves <palves@redhat.com>
7788 * linux-low.c (linux_wait_1): Move fork event output out of the
7789 !report_to_gdb check. Pass event_child->waitstatus to
7790 target_waitstatus_to_string instead of ourstatus.
7792 2015-08-04 Yao Qi <yao.qi@linaro.org>
7794 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7795 if current_thread is 32 bit.
7797 2015-08-04 Yao Qi <yao.qi@linaro.org>
7799 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7800 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7801 * server.c (extended_protocol): Remove "static".
7802 * server.h (extended_protocol): Declare it.
7804 2015-08-04 Yao Qi <yao.qi@linaro.org>
7806 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7807 both aarch64 and aarch32.
7808 (aarch64_set_pc): Likewise.
7810 2015-08-04 Yao Qi <yao.qi@linaro.org>
7812 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7813 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7814 arm-with-neon.xml to srv_xmlfiles.
7815 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7816 (is_64bit_tdesc): New function.
7817 (aarch64_linux_read_description): New function.
7818 (aarch64_arch_setup): Call aarch64_linux_read_description.
7819 (regs_info): Rename to regs_info_aarch64.
7820 (aarch64_regs_info): Return right regs_info.
7821 (initialize_low_arch): Call initialize_low_arch_aarch32.
7823 2015-08-04 Yao Qi <yao.qi@linaro.org>
7825 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7826 * linux-aarch32-low.c: New file.
7827 * linux-aarch32-low.h: New file.
7828 * linux-arm-low.c (arm_fill_gregset): Move it to
7829 linux-aarch32-low.c.
7830 (arm_store_gregset): Likewise.
7831 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7832 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7833 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7834 (regs_info): Rename to regs_info_arm.
7835 (arm_regs_info): Return regs_info_aarch32 if
7836 have_ptrace_getregset is 1 and target description is
7837 arm_with_neon or arm_with_vfpv3.
7838 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7839 Call initialize_low_arch_aarch32 instead.
7841 2015-08-04 Yao Qi <yao.qi@linaro.org>
7843 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7844 * linux-low.c: ... here.
7845 * linux-low.h (have_ptrace_getregset): Declare it.
7847 2015-08-04 Pedro Alves <palves@redhat.com>
7849 * thread-db.c (struct thread_db): Use new typedefs.
7850 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7852 (disable_thread_event_reporting): Cast result of dlsym to
7853 destination function pointer type.
7854 (thread_db_mourn): Use td_ta_delete_ftype.
7856 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7858 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7860 (CDX_BREAKPOINT): Define for R2.
7861 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7862 (the_low_target): Add comments.
7864 2015-07-30 Yao Qi <yao.qi@linaro.org>
7866 * linux-arm-low.c (arm_hwcap): Remove it.
7867 (arm_read_description): New local variable arm_hwcap. Don't
7868 set arm_hwcap to zero.
7870 2015-07-30 Yao Qi <yao.qi@linaro.org>
7872 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7873 Use regcache->tdesc instead.
7874 (arm_store_wmmxregset): Likewise.
7875 (arm_fill_vfpregset): Likewise.
7876 (arm_store_vfpregset): Likewise.
7878 2015-07-30 Yao Qi <yao.qi@linaro.org>
7880 * linux-arm-low.c: Include arch/arm.h.
7881 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7882 (arm_store_gregset): Likewise.
7884 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7886 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7887 ptrace's 4th parameter.
7889 2015-07-27 Yao Qi <yao.qi@linaro.org>
7891 * configure.srv (case aarch64*-*-linux*): Don't set
7894 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7896 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7898 * linux-arm-low.c: Likewise.
7899 * linux-cris-low.c: Likewise.
7900 * linux-crisv32-low.c: Likewise.
7901 * linux-low.c: Likewise.
7902 * linux-m68k-low.c: Likewise.
7903 * linux-mips-low.c: Likewise.
7904 * linux-nios2-low.c: Likewise.
7905 * linux-s390-low.c: Likewise.
7906 * linux-sparc-low.c: Likewise.
7907 * linux-tic6x-low.c: Likewise.
7908 * linux-tile-low.c: Likewise.
7909 * linux-x86-low.c: Likewise.
7911 2015-07-24 Pedro Alves <palves@redhat.com>
7913 * config.in: Regenerate.
7914 * configure: Regenerate.
7916 2015-07-24 Pedro Alves <palves@redhat.com>
7918 * acinclude.m4: Include ../ptrace.m4.
7919 * configure.ac: Call GDB_AC_PTRACE.
7920 * config.in, configure: Regenerate.
7922 2015-07-24 Yao Qi <yao.qi@linaro.org>
7924 * linux-low.c (linux_create_inferior): Remove setting to
7925 proc->priv->new_inferior.
7926 (linux_attach): Likewise.
7927 (linux_low_filter_event): Likewise.
7928 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7930 2015-07-24 Yao Qi <yao.qi@linaro.org>
7932 * linux-low.c (linux_arch_setup): New function.
7933 (linux_low_filter_event): If proc->tdesc is NULL and
7934 proc->attached is true, call the_low_target.arch_setup.
7935 Otherwise, keep status pending, and return.
7936 (linux_resume_one_lwp_throw): Don't call get_pc if
7937 thread->while_stepping isn't NULL. Don't call
7938 get_thread_regcache if proc->tdesc is NULL.
7939 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7940 (linux_target_ops): Install arch_setup.
7941 * server.c (start_inferior): Call the_target->arch_setup.
7942 * target.h (struct target_ops) <arch_setup>: New field.
7943 (target_arch_setup): New marco.
7944 * lynx-low.c (lynx_target_ops): Update.
7945 * nto-low.c (nto_target_ops): Update.
7946 * spu-low.c (spu_target_ops): Update.
7947 * win32-low.c (win32_target_ops): Update.
7949 2015-07-24 Yao Qi <yao.qi@linaro.org>
7951 * linux-low.c (linux_add_process): Don't set
7952 proc->priv->new_inferior.
7953 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7954 (linux_attach): Likewise.
7956 2015-07-24 Yao Qi <yao.qi@linaro.org>
7958 * server.c (start_inferior): Code refactor.
7960 2015-07-24 Yao Qi <yao.qi@linaro.org>
7962 * server.c (process_serial_event): Set general_thread.
7964 2015-07-21 Yao Qi <yao.qi@linaro.org>
7966 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7967 aarch64_linux_get_debug_reg_capacity.
7969 2015-07-17 Yao Qi <yao.qi@linaro.org>
7971 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7972 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7973 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7974 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7975 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7976 (AARCH64_HWP_ALIGNMENT): Likewise.
7977 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7978 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7979 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7980 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7981 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7982 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7983 (struct aarch64_debug_reg_state): Likewise.
7984 (struct arch_lwp_info): Likewise.
7985 (aarch64_align_watchpoint): Likewise.
7986 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7987 (aarch64_watchpoint_length): Likewise.
7988 (aarch64_point_encode_ctrl_reg): Likewise
7989 (aarch64_point_is_aligned): Likewise.
7990 (aarch64_align_watchpoint): Likewise.
7991 (aarch64_linux_set_debug_regs):
7992 (aarch64_dr_state_insert_one_point): Likewise.
7993 (aarch64_dr_state_remove_one_point): Likewise.
7994 (aarch64_handle_breakpoint): Likewise.
7995 (aarch64_handle_aligned_watchpoint): Likewise.
7996 (aarch64_handle_unaligned_watchpoint): Likewise.
7997 (aarch64_handle_watchpoint): Likewise.
7999 2015-07-17 Yao Qi <yao.qi@linaro.org>
8001 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8002 and don't aarch64_get_debug_reg_state. All callers update.
8003 (aarch64_handle_aligned_watchpoint): Likewise.
8004 (aarch64_handle_unaligned_watchpoint): Likewise.
8005 (aarch64_handle_watchpoint): Likewise.
8006 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8007 (aarch64_remove_point): Likewise.
8009 2015-07-17 Yao Qi <yao.qi@linaro.org>
8011 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8013 (aarch64_handle_unaligned_watchpoint): Likewise.
8015 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8017 Revert the previous 3 commits:
8018 Move gdb_regex* to common/
8019 Move linux_find_memory_regions_full & co.
8020 gdbserver build-id attribute generator
8022 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8023 Jan Kratochvil <jan.kratochvil@redhat.com>
8025 gdbserver build-id attribute generator.
8026 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8027 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8028 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8030 (get_dynamic): Use find_pdhr to traverse program headers.
8031 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8032 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8033 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8034 (get_hex_build_id): New.
8035 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8036 to reply XML document.
8038 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8039 Jan Kratochvil <jan.kratochvil@redhat.com>
8041 * target.c: Include target/target-utils.h and fcntl.h.
8042 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8043 (target_fileio_read_stralloc): New functions.
8045 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8047 * Makefile.in (OBS): Add gdb_regex.o.
8049 * config.in: Rebuilt.
8050 * configure: Rebuilt.
8052 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8053 Jan Kratochvil <jan.kratochvil@redhat.com>
8055 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8056 * Makefile.in (OBS): Add target-utils.o.
8057 (linux-maps.o, target-utils.o): New.
8058 * configure.srv (srv_linux_obj): Add linux-maps.o.
8060 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8062 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8064 (the_low_target): Install it.
8066 2015-07-14 Pedro Alves <palves@redhat.com>
8068 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8069 Instead, ignore ECHILD, and throw an error for other errnos.
8071 2015-07-10 Pedro Alves <palves@redhat.com>
8073 * event-loop.c (struct callback_event) <data>: Change type to
8074 gdb_client_data instance instead of gdb_client_data pointer.
8075 (append_callback_event): Adjust.
8077 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8079 * linux-aarch64-low.c: Add comments for each linux_target_ops
8080 method. Remove comments already covered in target_ops and
8081 linux_target_ops definitions.
8082 (the_low_target): Add comments for each unimplemented method.
8084 2015-07-09 Yao Qi <yao.qi@linaro.org>
8086 * linux-aarch64-low.c (aarch64_regmap): Remove.
8087 (aarch64_usrregs_info): Remove.
8088 (regs_info): Set field usrregs to NULL.
8090 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8092 * linux-low.c: Include "rsp-low.h"
8093 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8094 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8095 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8096 (handle_btrace_enable_pt): New.
8097 (handle_btrace_general_set): Support "pt".
8098 (handle_btrace_conf_general_set): Support "pt:size".
8100 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8102 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8105 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8107 * linux-aarch64-low.c: Remove comment about endianness.
8108 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8109 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8112 2015-06-24 Gary Benson <gbenson@redhat.com>
8114 * linux-i386-ipa.c (stdint.h): Do not include.
8115 * lynx-i386-low.c (stdint.h): Likewise.
8116 * lynx-ppc-low.c (stdint.h): Likewise.
8117 * mem-break.c (stdint.h): Likewise.
8118 * thread-db.c (stdint.h): Likewise.
8119 * tracepoint.c (stdint.h): Likewise.
8120 * win32-low.c (stdint.h): Likewise.
8122 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8124 * server.c (write_qxfer_response): Update call to
8125 remote_escape_output.
8127 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8128 Jan Kratochvil <jan.kratochvil@redhat.com>
8130 Merge multiple hex conversions.
8131 * gdbreplay.c (tohex): Rename to 'fromhex'.
8132 (logchar): Use fromhex.
8134 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8136 * server.c (handle_qxfer_libraries): Set `version' attribute for
8139 2015-06-10 Gary Benson <gbenson@redhat.com>
8141 * target.h (struct target_ops) <multifs_open>: New field.
8142 <multifs_unlink>: Likewise.
8143 <multifs_readlink>: Likewise.
8144 * linux-low.c (nat/linux-namespaces.h): New include.
8145 (linux_target_ops): Initialize the_target->multifs_open,
8146 the_target->multifs_unlink and the_target->multifs_readlink.
8147 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8148 * hostio.c (hostio_fs_pid): New static variable.
8149 (hostio_handle_new_gdb_connection): New function.
8150 (handle_setfs): Likewise.
8151 (handle_open): Use the_target->multifs_open as appropriate.
8152 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8153 (handle_readlink): Use the_target->multifs_readlink as
8155 (handle_vFile): Handle vFile:setfs packets.
8156 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8157 after target_handle_new_gdb_connection.
8159 2015-06-10 Gary Benson <gbenson@redhat.com>
8161 * configure.ac (AC_CHECK_FUNCS): Add setns.
8162 * config.in: Regenerate.
8163 * configure: Likewise.
8164 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8165 (linux-namespaces.o): New rule.
8166 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8168 2015-06-09 Gary Benson <gbenson@redhat.com>
8170 * hostio.c (handle_open): Process mode argument with
8171 fileio_to_host_mode.
8173 2015-06-01 Yao Qi <yao.qi@linaro.org>
8175 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8176 * linux-x86-low.c: Likewise.
8178 2015-05-28 Don Breazeal <donb@codesourcery.com>
8180 * linux-low.c (handle_extended_wait): Initialize
8181 thread_info.last_resume_kind for new fork children.
8183 2015-05-15 Pedro Alves <palves@redhat.com>
8185 * target.h (target_handle_new_gdb_connection): Rewrite using if
8186 wrapped in do/while.
8188 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8190 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8191 * configure, config.in: Regenerate.
8192 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8195 2015-05-12 Don Breazeal <donb@codesourcery.com>
8197 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8198 PTRACE_EVENT_VFORK_DONE.
8199 (linux_low_ptrace_options, extended_event_reported): Add vfork
8201 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8202 and "vforkdone" for RSP 'T' Stop Reply Packet.
8203 * server.h (report_vfork_events): Declare
8206 2015-05-12 Don Breazeal <donb@codesourcery.com>
8208 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8209 (the_low_target) <new_fork>: Initialize new member.
8210 * linux-arm-low.c (arm_new_fork): New function.
8211 (the_low_target) <new_fork>: Initialize new member.
8212 * linux-low.c (handle_extended_wait): Call new target function
8214 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8215 * linux-mips-low.c (mips_add_watchpoint): New function
8216 extracted from mips_insert_point.
8217 (the_low_target) <new_fork>: Initialize new member.
8218 (mips_linux_new_fork): New function.
8219 (mips_insert_point): Call mips_add_watchpoint.
8220 * linux-x86-low.c (x86_linux_new_fork): New function.
8221 (the_low_target) <new_fork>: Initialize new member.
8223 2015-05-12 Don Breazeal <donb@codesourcery.com>
8225 * linux-low.c (handle_extended_wait): Implement return value,
8226 rename argument 'event_child' to 'event_lwp', handle
8227 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8228 (linux_low_ptrace_options): New function.
8229 (linux_low_filter_event): Call linux_low_ptrace_options,
8230 use different argument fo linux_enable_event_reporting,
8231 use return value from handle_extended_wait.
8232 (extended_event_reported): New function.
8233 (linux_wait_1): Call extended_event_reported and set
8234 status to report fork events.
8235 (linux_write_memory): Add pid to debug message.
8236 (reset_lwp_ptrace_options_callback): New function.
8237 (linux_handle_new_gdb_connection): New function.
8238 (linux_target_ops): Initialize new structure member.
8239 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8240 * lynx-low.c: Initialize new structure member.
8241 * remote-utils.c (prepare_resume_reply): Implement stop reason
8242 "fork" for "T" stop message.
8243 * server.c (handle_query): Call handle_new_gdb_connection.
8244 * server.h (report_fork_events): Declare global flag.
8245 * target.h (struct target_ops) <handle_new_gdb_connection>:
8247 (target_handle_new_gdb_connection): New macro.
8248 * win32-low.c: Initialize new structure member.
8250 2015-05-12 Don Breazeal <donb@codesourcery.com>
8252 * mem-break.c (APPEND_TO_LIST): Define macro.
8253 (clone_agent_expr): New function.
8254 (clone_one_breakpoint): New function.
8255 (clone_all_breakpoints): New function.
8256 * mem-break.h: Declare new functions.
8258 2015-05-12 Don Breazeal <donb@codesourcery.com>
8260 * linux-low.c (linux_supports_fork_events): New function.
8261 (linux_supports_vfork_events): New function.
8262 (linux_target_ops): Initialize new structure members.
8263 (initialize_low): Call linux_check_ptrace_features.
8264 * lynx-low.c (lynx_target_ops): Initialize new structure
8266 * server.c (report_fork_events, report_vfork_events):
8268 (handle_query): Add new features to qSupported packet and
8270 (captured_main): Initialize new global variables.
8271 * target.h (struct target_ops) <supports_fork_events>:
8273 <supports_vfork_events>: New member.
8274 (target_supports_fork_events): New macro.
8275 (target_supports_vfork_events): New macro.
8276 * win32-low.c (win32_target_ops): Initialize new structure
8279 2015-05-12 Gary Benson <gbenson@redhat.com>
8281 * server.c (handle_qxfer_exec_file): Use current process
8284 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8286 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8287 Remove HAVE_PTRACE_GETREGS conditionals.
8288 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8289 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8291 2015-05-08 Yao Qi <yao.qi@linaro.org>
8293 * linux-low.c (linux_supports_conditional_breakpoints): New
8295 (linux_target_ops): Install new target method.
8296 * lynx-low.c (lynx_target_ops): Install NULL hook for
8297 supports_conditional_breakpoints.
8298 * nto-low.c (nto_target_ops): Likewise.
8299 * spu-low.c (spu_target_ops): Likewise.
8300 * win32-low.c (win32_target_ops): Likewise.
8301 * server.c (handle_query): Check
8302 target_supports_conditional_breakpoints.
8303 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8305 (target_supports_conditional_breakpoints): New macro.
8307 2015-05-06 Pedro Alves <palves@redhat.com>
8310 * server.c (start_inferior): If the process exits, mourn it.
8312 2015-04-21 Gary Benson <gbenson@redhat.com>
8314 * hostio.c (fileio_open_flags_to_host): Factored out to
8315 fileio_to_host_openflags in common/fileio.c. Single use
8318 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8320 * linux-xtensa-low.c (xtensa_fill_gregset)
8321 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8324 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8326 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8327 (regs_info): Replace usrregs pointer with NULL.
8329 2015-04-17 Gary Benson <gbenson@redhat.com>
8331 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8332 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8333 * server.c (handle_qxfer_exec_file): New function.
8334 (qxfer_packets): Add exec-file entry.
8335 (handle_query): Report qXfer:exec-file:read as supported packet.
8337 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8339 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8341 2015-04-09 Gary Benson <gbenson@redhat.com>
8343 * hostio-errno.c (errno_to_fileio_error): Remove function.
8344 Update caller to use remote_fileio_to_fio_error.
8346 2015-04-09 Yao Qi <yao.qi@linaro.org>
8348 * linux-low.c (linux_insert_point): Call
8349 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8350 (linux_remove_point): Call remove_memory_breakpoint if type is
8352 * linux-x86-low.c (x86_insert_point): Don't call
8353 insert_memory_breakpoint.
8354 (x86_remove_point): Don't call remove_memory_breakpoint.
8356 2015-04-01 Pedro Alves <palves@redhat.com>
8357 Cleber Rosa <crosa@redhat.com>
8359 * server.c (gdbserver_usage): Reorganize and extend the usage
8362 2015-03-24 Pedro Alves <palves@redhat.com>
8364 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8365 output. Also dump TRAP_TRACE.
8366 (linux_low_filter_event): In debug output, distinguish a
8367 resume_stop SIGSTOP from a delayed SIGSTOP.
8369 2015-03-24 Gary Benson <gbenson@redhat.com>
8371 * linux-x86-low.c (x86_linux_new_thread): Moved to
8373 (x86_linux_prepare_to_resume): Likewise.
8375 2015-03-24 Gary Benson <gbenson@redhat.com>
8377 * Makefile.in (x86-linux-dregs.o): New rule.
8378 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8379 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8380 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8381 (x86_linux_dr_get): Likewise.
8382 (x86_linux_dr_set): Likewise.
8383 (update_debug_registers_callback): Likewise.
8384 (x86_linux_dr_set_addr): Likewise.
8385 (x86_linux_dr_get_addr): Likewise.
8386 (x86_linux_dr_set_control): Likewise.
8387 (x86_linux_dr_get_control): Likewise.
8388 (x86_linux_dr_get_status): Likewise.
8389 (x86_linux_update_debug_registers): Likewise.
8391 2015-03-24 Gary Benson <gbenson@redhat.com>
8393 * linux-x86-low.c (x86_linux_update_debug_registers):
8394 New function, factored out from...
8395 (x86_linux_prepare_to_resume): ...this.
8397 2015-03-24 Gary Benson <gbenson@redhat.com>
8399 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8400 (x86_linux_dr_set): Likewise.
8401 (update_debug_registers_callback): Likewise.
8402 (x86_linux_dr_set_addr): Likewise.
8403 (x86_linux_dr_get_addr): Likewise.
8404 (x86_linux_dr_set_control): Likewise.
8405 (x86_linux_dr_get_control): Likewise.
8406 (x86_linux_dr_get_status): Likewise.
8407 (x86_linux_prepare_to_resume): Likewise.
8409 2015-03-24 Gary Benson <gbenson@redhat.com>
8411 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8412 Use perror_with_name. Pass string through gettext.
8413 (x86_linux_dr_set): Likewise.
8415 2015-03-24 Gary Benson <gbenson@redhat.com>
8417 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8418 (x86_linux_dr_set_addr): ...this.
8419 (x86_dr_low_get_addr): Rename to...
8420 (x86_linux_dr_get_addr): ...this.
8421 (x86_dr_low_set_control): Rename to...
8422 (x86_linux_dr_set_control): ...this.
8423 (x86_dr_low_get_control): Rename to...
8424 (x86_linux_dr_get_control): ...this.
8425 (x86_dr_low_get_status): Rename to...
8426 (x86_linux_dr_get_status): ...this.
8427 (x86_dr_low): Update with new function names.
8429 2015-03-24 Gary Benson <gbenson@redhat.com>
8431 * Makefile.in (x86-linux.o): New rule.
8432 * configure.srv: Add x86-linux.o to relevant targets.
8433 * linux-low.c (lwp_set_arch_private_info): New function.
8434 (lwp_arch_private_info): Likewise.
8435 * linux-x86-low.c: Include nat/x86-linux.h.
8436 (arch_lwp_info): Removed structure.
8437 (update_debug_registers_callback):
8438 Use lwp_set_debug_registers_changed.
8439 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8440 and lwp_set_debug_registers_changed.
8441 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8443 2015-03-24 Gary Benson <gbenson@redhat.com>
8445 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8446 * linux-arm-low.c (arm_new_thread): Likewise.
8447 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8448 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8449 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8450 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8452 2015-03-24 Gary Benson <gbenson@redhat.com>
8454 * linux-low.c (ptid_of_lwp): New function.
8455 (lwp_is_stopped): Likewise.
8456 (lwp_stop_reason): Likewise.
8457 * linux-x86-low.c (update_debug_registers_callback):
8459 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8462 2015-03-24 Gary Benson <gbenson@redhat.com>
8464 * linux-low.h (linux_stop_lwp): Remove declaration.
8466 2015-03-24 Gary Benson <gbenson@redhat.com>
8468 * linux-low.h: Include nat/linux-nat.h.
8469 * linux-low.c (iterate_over_lwps_args): New structure.
8470 (iterate_over_lwps_filter): New function.
8471 (iterate_over_lwps): Likewise.
8472 * linux-x86-low.c (update_debug_registers_callback):
8473 Update signature to what iterate_over_lwps expects.
8474 Remove PID check that iterate_over_lwps now performs.
8475 (x86_dr_low_set_addr): Use iterate_over_lwps.
8476 (x86_dr_low_set_control): Likewise.
8478 2015-03-24 Gary Benson <gbenson@redhat.com>
8480 * linux-x86-low.c (x86_debug_reg_state): New function.
8481 (x86_linux_prepare_to_resume): Use the above.
8483 2015-03-24 Gary Benson <gbenson@redhat.com>
8485 * linux-low.c (current_lwp_ptid): New function.
8486 * linux-x86-low.c: Include nat/linux-nat.h.
8487 (x86_dr_low_get_addr): Use current_lwp_ptid.
8488 (x86_dr_low_get_control): Likewise.
8489 (x86_dr_low_get_status): Likewise.
8491 2015-03-20 Pedro Alves <palves@redhat.com>
8493 * tracepoint.c (cmd_qtstatus): Make "str" const.
8495 2015-03-20 Pedro Alves <palves@redhat.com>
8497 * server.c (handle_general_set): Make "req_str" const.
8499 2015-03-19 Pedro Alves <palves@redhat.com>
8501 * linux-low.c (linux_resume_one_lwp): Rename to ...
8502 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8503 instead call perror_with_name.
8504 (check_ptrace_stopped_lwp_gone): New function.
8505 (linux_resume_one_lwp): Reimplement as wrapper around
8506 linux_resume_one_lwp_throw that swallows errors if the LWP is
8509 2015-03-19 Pedro Alves <palves@redhat.com>
8511 * linux-low.c (count_events_callback, select_event_lwp_callback):
8512 No longer check whether the thread has resume_stop as last resume
8515 2015-03-19 Pedro Alves <palves@redhat.com>
8517 * linux-low.c (count_events_callback, select_event_lwp_callback):
8518 Use the lwp's status_pending_p field, not the thread's.
8520 2015-03-19 Pedro Alves <palves@redhat.com>
8522 * linux-low.c (select_event_lwp_callback): Update comments to
8523 no longer mention SIGTRAP.
8525 2015-03-18 Gary Benson <gbenson@redhat.com>
8527 * server.c (handle_query): Do not report vFile:fstat as supported.
8529 2015-03-11 Gary Benson <gbenson@redhat.com>
8531 * hostio.c (sys/types.h): New include.
8532 (sys/stat.h): Likewise.
8533 (common-remote-fileio.h): Likewise.
8534 (handle_fstat): New function.
8535 (handle_vFile): Handle vFile:fstat packets.
8537 2015-03-11 Gary Benson <gbenson@redhat.com>
8539 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8540 struct stat.st_blocks and struct stat.st_blksize.
8541 * configure: Regenerate.
8542 * config.in: Likewise.
8543 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8544 (OBS): Add common-remote-fileio.o.
8545 (common-remote-fileio.o): New rule.
8547 2015-03-09 Pedro Alves <palves@redhat.com>
8549 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8550 'struct sockaddr' pointer in 'accept' call.
8552 2015-03-09 Pedro Alves <palves@redhat.com>
8555 2015-03-07 Pedro Alves <palves@redhat.com>
8556 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8557 or <winsock2.h> here. Instead include "gdb_socket.h".
8558 (remote_open): Use union gdb_sockaddr_u.
8559 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8560 or <winsock2.h> here. Instead include "gdb_socket.h".
8561 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8562 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8564 (init_named_socket, gdb_agent_helper_thread): Use union
8567 2015-03-07 Pedro Alves <palves@redhat.com>
8569 * configure.ac (build_warnings): Move
8570 -Wdeclaration-after-statement to the C-specific set.
8571 * configure: Regenerate.
8573 2015-03-07 Pedro Alves <palves@redhat.com>
8575 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8576 or <winsock2.h> here. Instead include "gdb_socket.h".
8577 (remote_open): Use union gdb_sockaddr_u.
8578 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8579 or <winsock2.h> here. Instead include "gdb_socket.h".
8580 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8581 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8583 (init_named_socket, gdb_agent_helper_thread): Use union
8586 2015-03-07 Pedro Alves <palves@redhat.com>
8588 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8591 2015-03-06 Yao Qi <yao.qi@linaro.org>
8593 * linux-aarch64-low.c (aarch64_insert_point): Use
8594 show_debug_regs as a boolean.
8595 (aarch64_remove_point): Likewise.
8597 2015-03-05 Pedro Alves <palves@redhat.com>
8599 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8600 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8601 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8602 * nto-low.c (nto_target_ops): Likewise.
8603 * spu-low.c (spu_target_ops): Likewise.
8604 * win32-low.c (win32_target_ops): Likewise.
8606 2015-03-04 Pedro Alves <palves@redhat.com>
8608 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8609 Decide whether a breakpoint triggered based on the SIGTRAP's
8611 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8612 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8613 (linux_low_filter_event): Check for breakpoints before checking
8615 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8617 (linux_stopped_by_sw_breakpoint)
8618 (linux_supports_stopped_by_sw_breakpoint)
8619 (linux_stopped_by_hw_breakpoint)
8620 (linux_supports_stopped_by_hw_breakpoint): New functions.
8621 (linux_target_ops): Install new target methods.
8623 2015-03-04 Pedro Alves <palves@redhat.com>
8625 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8626 * server.c (swbreak_feature, hwbreak_feature): New globals.
8627 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8628 (captured_main): Clear swbreak_feature and hwbreak_feature.
8629 * server.h (swbreak_feature, hwbreak_feature): Declare.
8630 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8631 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8632 supports_stopped_by_hw_breakpoint>: New fields.
8633 (target_supports_stopped_by_sw_breakpoint)
8634 (target_stopped_by_sw_breakpoint)
8635 (target_supports_stopped_by_hw_breakpoint)
8636 (target_stopped_by_hw_breakpoint): Declare.
8638 2015-03-04 Pedro Alves <palves@redhat.com>
8640 enum lwp_stop_reason -> enum target_stop_reason
8641 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8642 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8643 (linux_wait_1, stuck_in_jump_pad_callback)
8644 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8645 (linux_stopped_by_watchpoint):
8646 * linux-low.h (enum lwp_stop_reason): Delete.
8647 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8648 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8650 2015-03-04 Yao Qi <yao.qi@linaro.org>
8652 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8654 2015-03-03 Gary Benson <gbenson@redhat.com>
8656 * hostio.c (handle_vFile): Fix prefix lengths.
8658 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8660 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8663 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8665 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8666 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8667 (clean): Add "rm -f" for above C files.
8668 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8669 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8670 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8671 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8672 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8673 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8674 (init_registers_s390x_vx_linux64)
8675 (init_registers_s390x_tevx_linux64)
8676 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8677 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8679 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8680 (s390_store_vxrs_high): New functions.
8681 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8683 (s390_arch_setup): Add logic for selecting one of the new target
8684 descriptions. Activate the new vector regsets if applicable.
8685 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8686 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8687 and init_registers_s390x_tevx_linux64.
8689 2015-03-01 Pedro Alves <palves@redhat.com>
8691 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8694 2015-02-27 Pedro Alves <palves@redhat.com>
8696 * linux-x86-low.c (u_debugreg_offset): New function.
8697 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8699 2015-02-27 Pedro Alves <palves@redhat.com>
8701 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8702 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8703 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8704 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8705 (ps_lsetfpregs, ps_getpid)
8706 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8707 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8708 (ps_lsetxregs, ps_plog): Declare.
8710 2015-02-27 Pedro Alves <palves@redhat.com>
8712 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8713 IP_AGENT_EXPORT_FUNC.
8714 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8715 IP_AGENT_EXPORT_FUNC.
8716 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8717 (IP_AGENT_EXPORT): Delete.
8718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8719 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8720 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8721 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8722 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8723 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8724 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8725 (traceframe_read_count, traceframe_write_count)
8726 (traceframes_created, trace_state_variables, get_raw_reg)
8727 (get_trace_state_variable_value, set_trace_state_variable_value)
8728 (ust_loaded, helper_thread_id, cmd_buf): Use
8729 IPA_SYM_EXPORTED_NAME.
8730 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8731 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8732 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8733 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8734 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8735 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8736 EXTERN_C_PUSH/EXTERN_C_POP.
8737 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8738 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8739 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8740 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8741 (traceframe_write_count, traceframe_read_count)
8742 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8743 (about_to_request_buffer_space, get_trace_state_variable_value)
8744 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8745 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8746 EXTERN_C_PUSH/EXTERN_C_POP.
8747 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8748 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8749 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8750 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8753 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8754 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8756 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8757 (IP_AGENT_EXPORT_VAR_DECL): Define.
8759 (gdb_agent_get_raw_reg): Declare.
8761 2015-02-27 Tom Tromey <tromey@redhat.com>
8762 Pedro Alves <palves@redhat.com>
8764 Rename symbols whose names are reserved C++ keywords throughout.
8766 2015-02-27 Pedro Alves <palves@redhat.com>
8768 * Makefile.in (COMPILER): New, get it from autoconf.
8769 (CXX): Get from autoconf instead.
8770 (COMPILE.pre): Use COMPILER.
8771 (CC-LD): Rename to ...
8772 (CC_LD): ... this. Use COMPILER.
8773 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8774 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8775 * acinclude.m4: Include build-with-cxx.m4.
8776 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8777 Disable -Werror by default if building in C++ mode.
8778 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8779 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8780 the C++ compiler. Save/restore CXXFLAGS too.
8781 * configure: Regenerate.
8783 2015-02-27 Pedro Alves <palves@redhat.com>
8785 * acinclude.m4: Include libiberty.m4.
8786 * configure.ac: Call libiberty_INIT.
8787 * config.in, configure: Regenerate.
8789 2015-02-26 Pedro Alves <palves@redhat.com>
8791 * linux-low.c (linux_wait_1): When incrementing the PC past a
8792 program breakpoint always use the_low_target.breakpoint_len as
8793 increment, rather than the maximum between that and
8794 the_low_target.decr_pc_after_break.
8796 2015-02-23 Pedro Alves <palves@redhat.com>
8798 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8799 thread was doing a step-over; always adjust the PC if
8800 we stepped over a permanent breakpoint.
8801 (linux_wait_1): If we stepped over breakpoint that was on top of a
8802 permanent breakpoint, manually advance the PC past it.
8804 2015-02-23 Pedro Alves <palves@redhat.com>
8806 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8808 (x86_fill_gregset, x86_store_gregset): Use it when handling
8811 2015-02-20 Pedro Alves <palves@redhat.com>
8813 * thread-db.c: Include "nat/linux-procfs.h".
8814 (thread_db_init): Skip listing new threads if the kernel supports
8815 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8817 2015-02-20 Pedro Alves <palves@redhat.com>
8819 * linux-low.c (status_pending_p_callback): Use ptid_match.
8821 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8823 PR breakpoints/16812
8824 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8825 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8826 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8828 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8830 PR breakpoints/15956
8831 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8833 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8835 * linux-low.c (linux_low_btrace_conf): Print size.
8836 * server.c (handle_btrace_conf_general_set): New.
8837 (hanle_general_set): Call handle_btrace_conf_general_set.
8838 (handle_query): Report Qbtrace-conf:bts:size as supported.
8840 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8842 * linux-low.c (linux_low_enable_btrace): Update parameters.
8843 (linux_low_btrace_conf): New.
8844 (linux_target_ops)<to_btrace_conf>: Initialize.
8845 * server.c (current_btrace_conf): New.
8846 (handle_btrace_enable): Rename to ...
8847 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8848 to target_enable_btrace. Update comment. Update users.
8849 (handle_qxfer_btrace_conf): New.
8850 (qxfer_packets): Add btrace-conf entry.
8851 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8852 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8853 (target_ops)<read_btrace_conf>: New.
8854 (target_enable_btrace): Update parameters.
8855 (target_read_btrace_conf): New.
8857 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8859 * server.c (handle_btrace_general_set): Remove call to
8860 target_supports_btrace.
8861 (supported_btrace_packets): New.
8862 (handle_query): Call supported_btrace_packets.
8863 * target.h: include btrace-common.h.
8864 (btrace_target_info): Removed.
8865 (supports_btrace, target_supports_btrace): Update parameters.
8867 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8869 * Makefile.in (SFILES): Add common/btrace-common.c.
8870 (OBS): Add common/btrace-common.o.
8871 (btrace-common.o): Add build rules.
8872 * linux-low: Include btrace-common.h.
8873 (linux_low_read_btrace): Use struct btrace_data. Call
8874 btrace_data_init and btrace_data_fini.
8876 2015-02-06 Pedro Alves <palves@redhat.com>
8878 * thread-db.c (find_new_threads_callback): Add debug output.
8880 2015-02-04 Pedro Alves <palves@redhat.com>
8882 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8883 (resume_stopped_resumed_lwps): New function.
8884 (linux_wait_for_event_filtered): Use it.
8886 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8888 * Makefile.in (SFILES): Add linux-personality.c.
8889 (linux-personality.o): New rule.
8890 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8891 list of objects to be built.
8892 * linux-low.c: Include nat/linux-personality.h.
8893 (linux_create_inferior): Remove code to disable address space
8894 randomization (moved to ../nat/linux-personality.c). Create
8895 cleanup to disable address space randomization.
8897 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8899 * Makefile.in (posix-strerror.o): New rule.
8900 (mingw-strerror.o): Likewise.
8901 * configure: Regenerated.
8902 * configure.ac: Source file ../common/common.host. Initialize new
8903 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8905 2015-01-14 Yao Qi <yao@codesourcery.com>
8907 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8908 (ppc-linux.o): New rule.
8909 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8910 * configure.ac: AC_CHECK_FUNCS(getauxval).
8911 * config.in: Re-generated.
8912 * configure: Re-generated.
8913 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8914 ppc64_64bit_inferior_p
8916 2015-01-14 Yao Qi <yao@codesourcery.com>
8918 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8919 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8920 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8921 (PT_ORIG_R3, PT_TRAP): Likewise.
8922 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8923 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8924 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8926 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8928 * i387-fp.c (i387_cache_to_xsave): In look over
8929 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8930 zmmh_low_space field by use of zmmh_high_space.
8932 2015-01-09 Pedro Alves <palves@redhat.com>
8934 * linux-low.c (step_over_bkpt): Move higher up in the file.
8935 (handle_extended_wait): Don't store the stop_pc here.
8936 (get_stop_pc): Adjust comments and rename to ...
8937 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8938 stopped for a software breakpoint or hardware breakpoint.
8939 (thread_still_has_status_pending_p): New function.
8940 (status_pending_p_callback): Use
8941 thread_still_has_status_pending_p. If the event is no longer
8942 interesting, resume the LWP.
8943 (handle_tracepoints): Add assert.
8944 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8945 (wstatus_maybe_breakpoint): New function.
8946 (cancel_breakpoint): Delete function.
8947 (check_stopped_by_watchpoint): New function, factored out from
8948 linux_low_filter_event.
8949 (lp_status_maybe_breakpoint): Delete function.
8950 (linux_low_filter_event): Remove filter_ptid argument.
8951 Leave thread group exits pending here. Store the LWP's stop PC.
8952 Always leave events pending.
8953 (linux_wait_for_event_filtered): Pull all events out of the
8954 kernel, and leave them all pending.
8955 (count_events_callback, select_event_lwp_callback): Consider all
8957 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8958 (select_event_lwp): Only give preference to the stepping LWP in
8959 all-stop mode. Adjust comments.
8960 (ignore_event): New function.
8961 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8962 references to cancel_breakpoints. Adjust to renames. Also give
8963 equal priority to all LWPs that have had events in non-stop mode.
8964 If reporting a software breakpoint event, unadjust the LWP's PC.
8965 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8966 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8968 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8969 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8970 (linux_stopped_by_watchpoint): Adjust.
8971 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8972 * linux-low.h (enum lwp_stop_reason): New.
8973 (struct lwp_info) <stop_pc>: Adjust comment.
8974 <stopped_by_watchpoint>: Delete field.
8975 <stop_reason>: New field.
8976 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8977 * mem-break.c (software_breakpoint_inserted_here)
8978 (hardware_breakpoint_inserted_here): New function.
8979 * mem-break.h (software_breakpoint_inserted_here)
8980 (hardware_breakpoint_inserted_here): Declare.
8981 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8982 (cancel_breakpoints): Delete.
8983 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8984 (upload_fast_traceframes): Remove references to
8987 2015-01-09 Pedro Alves <palves@redhat.com>
8989 * thread-db.c (find_new_threads_callback): Ignore thread if the
8990 kernel thread ID is -1.
8992 2015-01-09 Pedro Alves <palves@redhat.com>
8994 * linux-low.c (linux_attach_fail_reason_string): Move to
8995 nat/linux-ptrace.c, and rename.
8996 (linux_attach_lwp): Update comment.
8997 (attach_proc_task_lwp_callback): New function.
8998 (linux_attach): Adjust to rename and use
8999 linux_proc_attach_tgid_threads.
9000 (linux_attach_fail_reason_string): Delete declaration.
9002 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9004 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9005 * server.c (gdbserver_version): Likewise.
9007 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9009 * remote-utils.c: Include ctype.h.
9010 (input_interrupt): Explicitly handle the case when the char
9011 received is the NUL byte. Improve the printing of non-ASCII
9014 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9016 * linux-low.c (linux_low_filter_event): Update call to
9017 linux_enable_event_reporting following the addition of
9018 a new parameter to that function.
9020 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9023 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9024 (AARCH64_FPCR_REGNO): Likewise.
9025 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9026 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9027 (aarch64_store_fpregset): Likewise.
9029 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9031 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9032 Remove FIXME comment about assumption about N.
9034 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9036 * configure.ac: If large-file support is disabled in GDBserver,
9037 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9038 * configure: Regenerate.
9040 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9042 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9043 warning upon ENODATA from ptrace.
9044 * linux-s390-low.c (s390_store_tdb): New.
9045 (s390_regsets): Add regset for NT_S390_TDB.
9047 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9049 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9050 without a fill_function.
9051 * linux-s390-low.c (s390_fill_last_break): Remove.
9052 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9053 (s390_arch_setup): Use regset's size instead of fill_function for
9056 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9058 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9059 the regset's store function when ptrace returned an error.
9060 * regcache.c (get_thread_regcache): Invalidate register cache
9061 before fetching inferior's registers.
9063 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9065 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9066 while-loop as for-loop.
9067 (regsets_store_inferior_registers): Likewise.
9069 2014-11-28 Yao Qi <yao@codesourcery.com>
9071 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9072 * config.in, configure: Re-generate.
9073 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9076 2014-11-21 Yao Qi <yao@codesourcery.com>
9078 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9079 (AC_CHECK_HEADERS): Remove malloc.h.
9080 * configure: Re-generated.
9081 * config.in: Re-generated.
9082 * server.h: Don't include alloca.h and malloc.h.
9083 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9084 Don't include malloc.h.
9086 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9088 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9089 corresponding ERRNO check in same block.
9091 2014-11-12 Pedro Alves <palves@redhat.com>
9093 * server.c (cont_thread): Update comment.
9094 (start_inferior, attach_inferior): No longer clear cont_thread.
9095 (handle_v_cont): No longer set cont_thread.
9096 (captured_main): Clear cont_thread each time a GDB connects.
9098 2014-11-12 Pedro Alves <palves@redhat.com>
9100 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9101 thread, and don't resume all threads if the Hc thread has exited.
9103 2014-11-12 Pedro Alves <palves@redhat.com>
9105 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9106 the process group instead of to a specific LWP.
9108 2014-10-15 Pedro Alves <palves@redhat.com>
9111 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9113 (arm_set_thread_context): Delete.
9114 (the_low_target): Adjust.
9115 * win32-i386-low.c (debug_registers_changed)
9116 (debug_registers_used): Delete.
9117 (update_debug_registers_callback): New function.
9118 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9119 needing to update their debug registers.
9120 (win32_get_current_dr): New function.
9121 (x86_dr_low_get_addr, x86_dr_low_get_control)
9122 (x86_dr_low_get_status): Fetch the debug register from the thread
9124 (i386_initial_stuff): Adjust.
9125 (i386_get_thread_context): Remove current_event parameter. Don't
9126 clear debug_registers_changed nor copy DR values to
9128 (i386_set_thread_context): Delete.
9129 (i386_prepare_to_resume): New function.
9130 (i386_thread_added): Mark the thread as needing to update irs
9132 (the_low_target): Remove i386_set_thread_context and install
9133 i386_prepare_to_resume.
9134 * win32-low.c (win32_get_thread_context): Adjust.
9135 (win32_set_thread_context): Use SetThreadContext
9137 (win32_prepare_to_resume): New function.
9138 (win32_require_context): New function, factored out from ...
9139 (thread_rec): ... this.
9140 (continue_one_thread): Call win32_prepare_to_resume on each thread
9141 we're about to continue.
9142 (win32_resume): Call win32_prepare_to_resume on the event thread.
9143 * win32-low.h (struct win32_thread_info)
9144 <debug_registers_changed>: New field.
9145 (struct win32_target_ops): Change prototype of set_thread_context,
9146 delete set_thread_context and add prepare_to_resume.
9147 (win32_require_context): New declaration.
9149 2014-10-08 Gary Benson <gbenson@redhat.com>
9151 * server.h: Do not include common-exceptions.h.
9153 2014-10-08 Gary Benson <gbenson@redhat.com>
9155 * server.h: Do not include cleanups.h.
9157 2014-09-30 James Hogan <james.hogan@imgtec.com>
9159 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9162 2014-09-23 Yao Qi <yao@codesourcery.com>
9164 * linux-low.c (lp_status_maybe_breakpoint): New function.
9165 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9166 (count_events_callback): Likewise.
9167 (select_event_lwp_callback): Likewise.
9168 (cancel_breakpoints_callback): Likewise.
9170 2014-09-19 Don Breazeal <donb@codesourcery.com>
9172 * linux-low.c (handle_extended_wait): Call
9173 linux_ptrace_get_extended_event.
9174 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9175 linux_is_extended_waitstatus.
9177 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9179 * Makefile.in (CPPFLAGS): Define.
9180 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9181 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9183 2014-09-16 Gary Benson <gbenson@redhat.com>
9185 * inferiors.h (current_inferior): Renamed as...
9186 (current_thread): New variable. All uses updated.
9187 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9188 (maybe_move_out_of_jump_pad): Likewise.
9189 (cancel_breakpoint): Likewise.
9190 (linux_low_filter_event): Likewise.
9191 (wait_for_sigstop): Likewise.
9192 (linux_resume_one_lwp): Likewise.
9193 (need_step_over_p): Likewise.
9194 (start_step_over): Likewise.
9195 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9196 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9197 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9198 and save_inferior as saved_thread.
9199 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9201 (regcache_invalidate_thread): Likewise.
9202 * remote-utils.c (prepare_resume_reply): Likewise.
9203 * thread-db.c (thread_db_get_tls_address): Likewise.
9204 (disable_thread_event_reporting): Likewise.
9205 (remove_thread_event_breakpoints): Likewise.
9206 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9208 * target.h (set_desired_inferior): Renamed as...
9209 (set_desired_thread): New declaration. All uses updated.
9210 * server.c (myresume): Updated comment to reference thread instead
9212 (handle_serial_event): Likewise.
9213 (handle_target_event): Likewise.
9215 2014-09-12 Tom Tromey <tromey@redhat.com>
9216 Gary Benson <gbenson@redhat.com>
9218 * regcache.h: Include common-regcache.h.
9219 (regcache_read_pc): Don't declare.
9220 * regcache.c (get_thread_regcache_for_ptid): New function.
9222 2014-09-11 Tom Tromey <tromey@redhat.com>
9223 Gary Benson <gbenson@redhat.com>
9225 * symbol.c: New file.
9226 * Makefile.in (SFILES): Add symbol.c.
9227 (OBS): Add symbol.o.
9229 2014-09-11 Gary Benson <gbenson@redhat.com>
9231 * target.c (target_stop_ptid, target_continue_ptid): New
9234 2014-09-11 Tom Tromey <tromey@redhat.com>
9235 Gary Benson <gbenson@redhat.com>
9237 * target.h: Include target/target.h.
9238 * target.c (target_read_memory, target_read_uint32)
9239 (target_write_memory): New functions.
9241 2014-09-11 Gary Benson <gbenson@redhat.com>
9243 * server.h (debug_hw_points): Don't declare.
9244 * server.c (debug_hw_points): Don't define. Replace all uses
9245 with show_debug_regs.
9246 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9247 all uses with show_debug_regs.
9249 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9251 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9252 endianness into account.
9253 (ppc_supply_ptrace_register): Likewise.
9255 2014-09-03 James Hogan <james.hogan@imgtec.com>
9257 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9258 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9260 2014-09-03 Gary Benson <gbenson@redhat.com>
9262 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9263 ALL_DEBUG_ADDRESS_REGISTERS.
9265 2014-09-02 Gary Benson <gbenson@redhat.com>
9267 * i386-low.h: Renamed as...
9268 * x86-low.h: New file. All type, function and variable name
9269 prefixes changed from "i386_" to "x86_". All references updated.
9270 * i386-low.c: Renamed as...
9271 * x86-low.c: New file. All type, function and variable name
9272 prefixes changed from "i386_" to "x86_". All references updated.
9274 2014-09-02 Gary Benson <gbenson@redhat.com>
9276 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9277 (x86_linux_new_thread): Likewise.
9279 2014-08-29 Gary Benson <gbenson@redhat.com>
9281 * server.h (setjmp.h): Do not include.
9282 (toplevel): Do not declare.
9283 (common-exceptions.h): Include.
9284 (cleanups.h): Likewise.
9285 * server.c (toplevel): Do not define.
9286 (exit_code): New static global.
9287 (detach_or_kill_for_exit_cleanup): New function.
9288 (main): New function. Original main renamed to...
9289 (captured_main): New function.
9290 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9292 2014-08-29 Gary Benson <gbenson@redhat.com>
9294 * Makefile.in (SFILES): Add common/common-exceptions.c.
9295 (OBS): Add common-exceptions.o.
9296 (common-exceptions.o): New rule.
9297 * utils.c (prepare_to_throw_exception): New function.
9299 2014-08-29 Gary Benson <gbenson@redhat.com>
9301 * config.in: Regenerate.
9302 * configure: Likewise.
9304 2014-08-29 Gary Benson <gbenson@redhat.com>
9306 * Makefile.in (SFILES): Add common/cleanups.c.
9308 (cleanups.o): New rule.
9310 2014-08-29 Gary Benson <gbenson@redhat.com>
9312 * utils.c (internal_vwarning): New function.
9314 2014-08-28 Gary Benson <gbenson@redhat.com>
9316 * utils.h (fatal): Remove declaration.
9317 * utils.c (fatal): Remove function.
9319 2014-08-28 Gary Benson <gbenson@redhat.com>
9321 * tracepoint.c (gdb_agent_init): Replace fatal with
9323 (initialize_tracepoint): Likewise.
9325 2014-08-28 Gary Benson <gbenson@redhat.com>
9327 * remote-utils.c (remote_prepare): Replace fatal with error.
9329 2014-08-28 Gary Benson <gbenson@redhat.com>
9331 * linux-low.c (linux_async): Replace fatal with warning.
9333 (linux_start_non_stop): Return -1 if linux_async failed.
9335 2014-08-28 Gary Benson <gbenson@redhat.com>
9337 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9339 (i386_dr_low_get_addr): Remove vague comment.
9340 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9343 2014-08-28 Gary Benson <gbenson@redhat.com>
9345 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9346 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9348 (linux_resume_one_lwp): Likewise.
9349 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9351 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9352 with internal_error.
9353 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9354 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9355 (find_register_by_name): Replace fatal with internal_error.
9356 (find_regno): Likewise.
9357 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9358 * thread-db.c (thread_db_create_event): Likewise.
9359 (thread_db_load_search): Likewise.
9360 (try_thread_db_load_1): Likewise.
9361 * tracepoint.c (get_jump_space_head): Replace fatal with
9363 (claim_trampoline_space): Likewise.
9364 (have_fast_tracepoint_trampoline_buffer): Likewise.
9365 (cmd_qtstart): Likewise.
9366 (stop_tracing): Likewise.
9367 (fast_tracepoint_collecting): Likewise.
9368 (target_malloc): Likewise.
9369 (download_tracepoint): Likewise.
9370 (download_trace_state_variables): Replace check with gdb_assert.
9371 (upload_fast_traceframes): Replace fatal with internal_error.
9373 2014-08-19 Tom Tromey <tromey@redhat.com>
9374 Gary Benson <gbenson@redhat.com>
9376 * Makefile.in (SFILES): Add common/common-debug.c.
9377 (OBS): Add common-debug.o.
9378 (common-debug.o): New rule.
9379 * debug.h (debug_printf): Don't declare.
9380 * debug.c (debug_printf): Renamed and rewritten as...
9381 (debug_vprintf): New function.
9383 2014-08-19 Gary Benson <gbenson@redhat.com>
9385 * utils.h: Do not include print-utils.h.
9387 2014-08-19 Tom Tromey <tromey@redhat.com>
9388 Gary Benson <gbenson@redhat.com>
9390 * server.h: Add static assertion.
9391 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9393 2014-08-19 Tom Tromey <tromey@redhat.com>
9394 Gary Benson <gbenson@redhat.com>
9396 * Makefile.in (SFILES): Add common/errors.c.
9397 (OBS): Add errors.o.
9398 (IPA_OBS): Add errors-ipa.o.
9399 (errors.o): New rule.
9400 (errors-ipa.o): Likewise.
9401 * utils.h (perror_with_name, error, warning): Don't declare.
9402 * utils.c (warning): Renamed and rewritten as...
9403 (vwarning): New function.
9404 (error): Renamed and rewritten as...
9405 (verror): New function.
9406 (internal_error): Renamed and rewritten as...
9407 (internal_verror): New function.
9409 2014-08-07 Gary Benson <gbenson@redhat.com>
9411 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9412 * configure: Regenerate.
9413 * config.in: Likewise.
9414 * server.h: Do not include errno.h.
9415 * event-loop.c: Likewise.
9416 * hostio-errno.c: Likewise.
9417 * linux-low.c: Likewise.
9418 * remote-utils.c: Likewise.
9419 * spu-low.c: Likewise.
9420 * utils.c: Likewise.
9421 * gdbreplay.c: Unconditionally include errno.h.
9423 2014-08-07 Gary Benson <gbenson@redhat.com>
9425 * server.h: Do not include string.h.
9426 * event-loop.c: Likewise.
9427 * linux-low.c: Likewise.
9428 * regcache.c: Likewise.
9429 * remote-utils.c: Likewise.
9430 * spu-low.c: Likewise.
9431 * utils.c: Likewise.
9433 2014-08-07 Gary Benson <gbenson@redhat.com>
9435 * server.h: Do not include gdb_assert.h.
9437 2014-08-07 Gary Benson <gbenson@redhat.com>
9439 * server.h: Do not include common-utils.h.
9441 2014-08-07 Gary Benson <gbenson@redhat.com>
9443 * server.h: Do not include ptid.h.
9444 * notif.h: Likewise.
9446 2014-08-07 Gary Benson <gbenson@redhat.com>
9448 * server.h: Do not include gdb_locale.h.
9450 2014-08-07 Gary Benson <gbenson@redhat.com>
9452 * server.h: Do not include gdb/signals.h.
9453 * win32-low.c: Likewise.
9455 2014-08-07 Gary Benson <gbenson@redhat.com>
9457 * server.h: Do not include pathmax.h.
9459 2014-08-07 Gary Benson <gbenson@redhat.com>
9461 * server.h: Do not include libiberty.h.
9462 * linux-bfin-low.c: Likewise.
9464 2014-08-07 Gary Benson <gbenson@redhat.com>
9466 * server.h: Do not include ansidecl.h.
9468 2014-08-07 Gary Benson <gbenson@redhat.com>
9470 * linux-x86-low.c: Do not include stddef.h.
9471 * lynx-ppc-low.c: Likewise.
9472 * tracepoint.c: Likewise.
9474 2014-08-07 Gary Benson <gbenson@redhat.com>
9476 * server.h: Do not include stdarg.h.
9477 * nto-low.c: Likewise.
9479 2014-08-07 Gary Benson <gbenson@redhat.com>
9481 * server.h: Do not include stdlib.h.
9482 * inferiors.c: Likewise.
9483 * linux-low.c: Likewise.
9484 * regcache.c: Likewise.
9485 * spu-low.c: Likewise.
9486 * tracepoint.c: Likewise.
9487 * utils.c: Likewise.
9489 2014-08-07 Gary Benson <gbenson@redhat.com>
9491 * server.h: Do not include stdio.h.
9492 * linux-low.c: Likewise.
9493 * remote-utils.c: Likewise.
9494 * spu-low.c: Likewise.
9495 * utils.c: Likewise.
9496 * wincecompat.c: Likewise.
9498 2014-08-06 Gary Benson <gbenson@redhat.com>
9500 * regcache.c (init_register_cache): Move conditionals inside if.
9502 2014-08-06 Gary Benson <gbenson@redhat.com>
9504 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9506 2014-07-31 Gary Benson <gbenson@redhat.com>
9508 * ax.h: Do not include server.h.
9509 * gdbthread.h: Likewise.
9510 * lynx-low.h: Likewise.
9511 * notif.h: Likewise.
9513 2014-07-30 Gary Benson <gbenson@redhat.com>
9515 * server.h: Include common-defs.h.
9516 Do not include config.h or build-gnulib-gdbserver/config.h.
9518 2014-07-30 Gary Benson <gbenson@redhat.com>
9520 * hostio-errno.c: Move server.h to top of includes list.
9521 * inferiors.c: Likewise.
9522 * linux-x86-low.c: Likewise.
9523 * notif.c: Include server.h.
9525 2014-07-24 Tom Tromey <tromey@redhat.com>
9526 Gary Benson <gbenson@redhat.com>
9528 * server.h (CORE_ADDR): Now unsigned.
9530 2014-07-16 Pedro Alves <palves@redhat.com>
9532 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9534 2014-07-15 Pedro Alves <palves@redhat.com>
9536 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9539 2014-07-11 Pedro Alves <palves@redhat.com>
9541 * linux-low.c (kill_wait_lwp): New function, based on
9542 kill_one_lwp_callback, but use my_waitpid directly.
9543 (kill_one_lwp_callback, linux_kill): Use it.
9545 2014-06-23 Pedro Alves <palves@redhat.com>
9547 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9548 before setting DR0..DR3.
9550 2014-06-20 Gary Benson <gbenson@redhat.com>
9552 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9553 * configure: Regenerated.
9554 * config.in: Likewise.
9556 2014-06-20 Gary Benson <gbenson@redhat.com>
9558 * Makefile.in (SFILES): Update locations for files moved
9560 (object file files): Reordered.
9562 2014-06-20 Gary Benson <gbenson@redhat.com>
9564 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9565 (i386_dr_low_set_addr): Likewise.
9566 (i386_dr_low_get_addr): Likewise.
9567 (i386_dr_low_can_set_control): Likewise.
9568 (i386_dr_low_set_control): Likewise.
9569 (i386_dr_low_get_control): Likewise.
9570 (i386_dr_low_get_status): Likewise.
9571 (i386_get_debug_register_length): Likewise.
9572 * linux-x86-low.c (i386_dr_low_set_addr):
9573 Changed signature. Made static.
9574 (i386_dr_low_get_addr): Likewise.
9575 (i386_dr_low_set_control): Likewise.
9576 (i386_dr_low_get_control): Likewise.
9577 (i386_dr_low_get_status): Likewise.
9578 (i386_dr_low): New global variable.
9579 * win32-i386-low.c (i386_dr_low_set_addr):
9580 Changed signature. Made static.
9581 (i386_dr_low_get_addr): Likewise.
9582 (i386_dr_low_set_control): Likewise.
9583 (i386_dr_low_get_control): Likewise.
9584 (i386_dr_low_get_status): Likewise.
9585 (i386_dr_low): New global variable.
9587 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9589 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9590 * Makefile.in (AR, AR_FLAGS): Define.
9591 * configure: Regenerate.
9593 2014-06-19 Gary Benson <gbenson@redhat.com>
9595 * Makefile.in (i386-dregs.o): New rule.
9596 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9597 * i386-low.c (target.h): Remove include.
9598 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9599 (DR_CONTROL_SHIFT): Likewise.
9600 (DR_CONTROL_SIZE): Likewise.
9601 (DR_RW_EXECUTE): Likewise.
9602 (DR_RW_WRITE): Likewise.
9603 (DR_RW_READ): Likewise.
9604 (DR_RW_IORW): Likewise.
9605 (DR_LEN_1): Likewise.
9606 (DR_LEN_2): Likewise.
9607 (DR_LEN_4): Likewise.
9608 (DR_LEN_8): Likewise.
9609 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9610 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9611 (DR_ENABLE_SIZE): Likewise.
9612 (DR_LOCAL_SLOWDOWN): Likewise.
9613 (DR_GLOBAL_SLOWDOWN): Likewise.
9614 (DR_CONTROL_RESERVED): Likewise.
9615 (I386_DR_CONTROL_MASK): Likewise.
9616 (I386_DR_VACANT): Likewise.
9617 (I386_DR_LOCAL_ENABLE): Likewise.
9618 (I386_DR_GLOBAL_ENABLE): Likewise.
9619 (I386_DR_DISABLE): Likewise.
9620 (I386_DR_SET_RW_LEN): Likewise.
9621 (I386_DR_GET_RW_LEN): Likewise.
9622 (I386_DR_WATCH_HIT): Likewise.
9623 (i386_wp_op_t): Likewise.
9624 (i386_show_dr): Likewise.
9625 (i386_length_and_rw_bits): Likewise.
9626 (i386_insert_aligned_watchpoint): Likewise.
9627 (i386_remove_aligned_watchpoint): Likewise.
9628 (i386_handle_nonaligned_watchpoint): Likewise.
9629 i386_update_inferior_debug_regs(): Likewise.
9630 (i386_dr_insert_watchpoint): Likewise.
9631 (i386_dr_remove_watchpoint): Likewise.
9632 (i386_dr_region_ok_for_watchpoint): Likewise.
9633 (i386_dr_stopped_data_address): Likewise.
9634 (i386_dr_stopped_by_watchpoint): Likewise.
9636 2014-06-19 Gary Benson <gbenson@redhat.com>
9638 * i386-low.c (i386_dr_show): Renamed to
9639 i386_show_dr and made static. All uses updated.
9640 (i386_dr_length_and_rw_bits): Renamed to
9641 i386_length_and_rw_bits and made static.
9643 (i386_dr_insert_aligned_watchpoint): Renamed to
9644 i386_insert_aligned_watchpoint and made static.
9646 (i386_dr_remove_aligned_watchpoint): Renamed to
9647 i386_remove_aligned_watchpoint and made static.
9649 (i386_dr_update_inferior_debug_regs): Renamed to
9650 i386_update_inferior_debug_regs and made static.
9653 2014-06-18 Gary Benson <gbenson@redhat.com>
9655 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9656 (i386_dr_low_can_set_control): Likewise.
9657 (i386_get_debug_register_length): Likewise.
9658 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9659 (i386_dr_low_can_set_control): Likewise.
9660 (i386_get_debug_register_length): Likewise.
9662 2014-06-17 Gary Benson <gbenson@redhat.com>
9664 * i386-low.h (i386-dregs.h): New include.
9665 (DR_FIRSTADDR): Now in i386-dregs.h.
9666 (DR_LASTADDR): Likewise.
9667 (DR_NADDR): Likewise.
9668 (DR_STATUS): Likewise.
9669 (DR_CONTROL): Likewise.
9670 (i386_debug_reg_state): Likewise.
9671 (i386_dr_insert_watchpoint): Likewise.
9672 (i386_dr_remove_watchpoint): Likewise.
9673 (i386_dr_region_ok_for_watchpoint): Likewise.
9674 (i386_dr_stopped_data_address): Likewise.
9675 (i386_dr_stopped_by_watchpoint): Likewise.
9676 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9678 2014-06-18 Gary Benson <gbenson@redhat.com>
9680 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9681 i386_dr_insert_watchpoint.
9682 (i386_low_remove_watchpoint): Renamed to
9683 i386_dr_remove_watchpoint.
9684 (i386_low_region_ok_for_watchpoint): Renamed to
9685 i386_dr_region_ok_for_watchpoint.
9686 (i386_low_stopped_data_address): Renamed to
9687 i386_dr_stopped_data_address.
9688 (i386_low_stopped_by_watchpoint): Renamed to
9689 i386_dr_stopped_by_watchpoint.
9690 * i386-low.c (i386_show_dr): Renamed to
9691 i386_dr_show and made nonstatic. All uses updated.
9692 (i386_length_and_rw_bits): Renamed to
9693 i386_dr_length_and_rw_bits and made nonstatic.
9695 (i386_insert_aligned_watchpoint): Renamed to
9696 i386_dr_insert_aligned_watchpoint and made nonstatic.
9698 (i386_remove_aligned_watchpoint): Renamed to
9699 i386_dr_remove_aligned_watchpoint and made nonstatic.
9701 (i386_update_inferior_debug_regs): Renamed to
9702 i386_dr_update_inferior_debug_regs and made nonstatic.
9704 (i386_low_insert_watchpoint): Renamed to
9705 i386_dr_insert_watchpoint. All uses updated.
9706 (i386_low_remove_watchpoint): Renamed to
9707 i386_dr_remove_watchpoint. All uses updated.
9708 (i386_low_region_ok_for_watchpoint): Renamed to
9709 i386_dr_region_ok_for_watchpoint. All uses updated.
9710 (i386_low_stopped_data_address): Renamed to
9711 i386_dr_stopped_data_address. All uses updated.
9712 (i386_low_stopped_by_watchpoint): Renamed to
9713 i386_dr_stopped_by_watchpoint. All uses updated.
9715 2014-06-18 Gary Benson <gbenson@redhat.com>
9717 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9718 (i386_dr_low_can_set_control): Likewise.
9719 (i386_insert_aligned_watchpoint): New check.
9721 2014-06-18 Gary Benson <gbenson@redhat.com>
9723 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9726 2014-06-18 Gary Benson <gbenson@redhat.com>
9728 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9729 instead of fatal and error.
9730 (i386_handle_nonaligned_watchpoint): Likewise.
9732 2014-06-18 Gary Benson <gbenson@redhat.com>
9734 * i386-low.c (i386_get_debug_register_length): New macro.
9735 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9736 (i386_show_dr): Use debug_printf instead of fprintf. Use
9737 phex to format values.
9739 2014-06-18 Gary Benson <gbenson@redhat.com>
9741 * i386-low.h: Comment changes.
9742 * i386-low.c: Likewise.
9744 2014-06-18 Gary Benson <gbenson@redhat.com>
9746 * i386-low.c: Whitespace changes.
9748 2014-06-12 Tom Tromey <tromey@redhat.com>
9750 * utils.c (freeargv): Remove.
9752 2014-06-12 Tom Tromey <tromey@redhat.com>
9754 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9755 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9756 (parse_debug_format_options): Likewise.
9757 (gdbserver_usage): Likewise.
9758 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9759 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9760 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9762 ($(LIBGNU)): Depend on libiberty.
9763 (all-lib): Recurse into all subdirs.
9764 (install-only): Invoke "install" target in subdirs.
9765 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9767 * configure: Rebuild.
9768 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9769 for vasprintf, vsnprintf, or gettimeofday.
9770 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9773 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9775 * development.sh: Delete.
9776 * Makefile.in (config.status): Adjust dependency on development.sh.
9777 * configure.ac: Adjust development.sh source call.
9778 * configure: Regenerate.
9780 2014-06-02 Pedro Alves <palves@redhat.com>
9782 * ax.c (gdb_free_agent_expr): New function.
9783 * ax.h (gdb_free_agent_expr): New declaration.
9784 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9786 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9788 (clear_breakpoint_conditions_and_commands): New function.
9789 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9790 (clear_breakpoint_conditions_and_commands): New declaration.
9792 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9794 * linux-aarch64-low.c (asm/ptrace.h): Include.
9796 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9798 Fix TLS access for -static -pthread.
9799 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9800 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9801 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9803 2014-05-20 Pedro Alves <palves@redhat.com>
9805 * linux-aarch64-low.c (aarch64_insert_point)
9806 (aarch64_remove_point): No longer check whether the type is
9807 supported here. Adjust to new interface.
9808 (the_low_target): Install aarch64_supports_z_point_type as
9809 supports_z_point_type method.
9810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9811 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9812 instead of a Z packet char. Adjust.
9813 (arm_supports_z_point_type): New function.
9814 (arm_insert_point, arm_remove_point): Adjust to new interface.
9815 (the_low_target): Install arm_supports_z_point_type.
9816 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9817 (cris_insert_point, cris_remove_point): Adjust to new interface.
9818 Don't check whether the type is supported here.
9819 (the_low_target): Install cris_supports_z_point_type.
9820 * linux-low.c (linux_supports_z_point_type): New function.
9821 (linux_insert_point, linux_remove_point): Adjust to new interface.
9822 * linux-low.h (struct linux_target_ops) <insert_point,
9823 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9824 raw_breakpoint pointer parameter.
9825 <supports_z_point_type>: New method.
9826 * linux-mips-low.c (mips_supports_z_point_type): New function.
9827 (mips_insert_point, mips_remove_point): Adjust to new interface.
9828 Use mips_supports_z_point_type.
9829 (the_low_target): Install mips_supports_z_point_type.
9830 * linux-ppc-low.c (the_low_target): Install NULL as
9831 supports_z_point_type method.
9832 * linux-s390-low.c (the_low_target): Install NULL as
9833 supports_z_point_type method.
9834 * linux-sparc-low.c (the_low_target): Install NULL as
9835 supports_z_point_type method.
9836 * linux-x86-low.c (x86_supports_z_point_type): New function.
9837 (x86_insert_point): Adjust to new insert_point interface. Use
9838 insert_memory_breakpoint. Adjust to new
9839 i386_low_insert_watchpoint interface.
9840 (x86_remove_point): Adjust to remove_point interface. Use
9841 remove_memory_breakpoint. Adjust to new
9842 i386_low_remove_watchpoint interface.
9843 (the_low_target): Install x86_supports_z_point_type.
9844 * lynx-low.c (lynx_target_ops): Install NULL as
9845 supports_z_point_type callback.
9846 * nto-low.c (nto_supports_z_point_type): New.
9847 (nto_insert_point, nto_remove_point): Adjust to new interface.
9848 (nto_target_ops): Install nto_supports_z_point_type.
9849 * mem-break.c: Adjust intro comment.
9850 (struct raw_breakpoint) <raw_type, size>: New fields.
9851 <inserted>: Update comment.
9852 <shlib_disabled>: Delete field.
9853 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9854 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9855 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9856 (raw_bkpt_type_to_target_hw_bp_type): New function.
9857 (find_enabled_raw_code_breakpoint_at): New function.
9858 (find_raw_breakpoint_at): New type and size parameters. Use them.
9859 (insert_memory_breakpoint): New function, based off
9860 set_raw_breakpoint_at.
9861 (remove_memory_breakpoint): New function.
9862 (set_raw_breakpoint_at): Reimplement.
9863 (set_breakpoint): New, based on set_breakpoint_at.
9864 (set_breakpoint_at): Reimplement.
9865 (delete_raw_breakpoint): Go through the_target->remove_point
9866 instead of assuming memory breakpoints.
9867 (find_gdb_breakpoint_at): Delete.
9868 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9869 (find_gdb_breakpoint): New function.
9870 (set_gdb_breakpoint_at): Delete.
9871 (z_type_supported): New function.
9872 (set_gdb_breakpoint_1): New function, loosely based off
9873 set_gdb_breakpoint_at.
9874 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9875 (delete_gdb_breakpoint_at): Delete.
9876 (delete_gdb_breakpoint_1): New function, loosely based off
9877 delete_gdb_breakpoint_at.
9878 (delete_gdb_breakpoint): New function.
9879 (clear_gdb_breakpoint_conditions): Rename to ...
9880 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9882 (add_condition_to_breakpoint): Make static.
9883 (add_breakpoint_condition): Take a struct breakpoint pointer
9884 instead of an address. Adjust.
9885 (gdb_condition_true_at_breakpoint): Rename to ...
9886 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9888 (gdb_condition_true_at_breakpoint): Reimplement.
9889 (add_breakpoint_commands): Take a struct breakpoint pointer
9890 instead of an address. Adjust.
9891 (gdb_no_commands_at_breakpoint): Rename to ...
9892 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9893 parameter. Return true if no breakpoint was found. Change debug
9895 (gdb_no_commands_at_breakpoint): Reimplement.
9896 (run_breakpoint_commands): Rename to ...
9897 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9898 and change return type to boolean.
9899 (run_breakpoint_commands): New function.
9900 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9901 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9902 breakpoint. Go through the_target->remove_point instead of
9903 assuming memory breakpoint.
9904 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9905 software and hardware breakpoints.
9906 (reinsert_raw_breakpoint): Go through the_target->insert_point
9907 instead of assuming memory breakpoint.
9908 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9909 software and hardware breakpoints.
9910 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9911 Check both software and hardware breakpoints.
9912 (validate_inserted_breakpoint): Assert the breakpoint is a
9913 software breakpoint. Set the inserted flag to -1 instead of
9914 setting shlib_disabled.
9915 (delete_disabled_breakpoints): Adjust.
9916 (validate_breakpoints): Only validate software breakpoints.
9917 Adjust to inserted flag change.
9918 (check_mem_read, check_mem_write): Skip breakpoint types other
9919 than software breakpoints. Adjust to inserted flag change.
9920 * mem-break.h (enum raw_bkpt_type): New enum.
9921 (raw_breakpoint, struct process_info): Forward declare.
9922 (Z_packet_to_target_hw_bp_type): Delete declaration.
9923 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9924 (set_gdb_breakpoint, delete_gdb_breakpoint)
9925 (clear_breakpoint_conditions): New declarations.
9926 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9927 (breakpoint_inserted_here): Update comment.
9928 (add_breakpoint_condition, add_breakpoint_commands): Replace
9929 address parameter with a breakpoint pointer parameter.
9930 (gdb_breakpoint_here): Update comment.
9931 (delete_gdb_breakpoint_at): Delete.
9932 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9933 * server.c (process_point_options): Take a struct breakpoint
9934 pointer instead of an address. Adjust.
9935 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9936 delete_gdb_breakpoint.
9937 * spu-low.c (spu_target_ops): Install NULL as
9938 supports_z_point_type method.
9939 * target.h: Include mem-break.h.
9940 (struct target_ops) <prepare_to_access_memory>: Update comment.
9941 <supports_z_point_type>: New field.
9942 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9943 instead of a char. Also take a raw breakpoint pointer.
9944 * win32-arm-low.c (the_low_target): Install NULL as
9945 supports_z_point_type.
9946 * win32-i386-low.c (i386_supports_z_point_type): New function.
9947 (i386_insert_point, i386_remove_point): Adjust to new interface.
9948 (the_low_target): Install i386_supports_z_point_type.
9949 * win32-low.c (win32_supports_z_point_type): New function.
9950 (win32_insert_point, win32_remove_point): Adjust to new interface.
9951 (win32_target_ops): Install win32_supports_z_point_type.
9952 * win32-low.h (struct win32_target_ops):
9953 <supports_z_point_type>: New method.
9954 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9955 instead of a char. Also take a raw breakpoint pointer.
9957 2014-05-20 Pedro Alves <palves@redhat.com>
9959 * mem-break.h: Include break-common.h.
9960 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9961 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9962 (Z_packet_to_target_hw_bp_type): New declaration.
9963 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9964 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9965 (Z_PACKET_ACCESS_WP): Delete macros.
9966 (Z_packet_to_hw_type): Delete function.
9967 * i386-low.h: Don't include break-common.h here.
9968 (Z_packet_to_hw_type): Delete declaration.
9969 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9970 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9971 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9972 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9973 * linux-aarch64-low.c: Don't include break-common.h here.
9974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9976 (Z_packet_to_target_hw_bp_type): Delete function.
9977 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9979 (mips_insert_point, mips_remove_point): Use
9980 Z_packet_to_target_hw_bp_type.
9982 2014-05-20 Pedro Alves <palves@redhat.com>
9984 * linux-aarch64-low.c: Include break-common.h.
9985 (enum target_point_type): Delete.
9986 (Z_packet_to_point_type): Rename to ...
9987 (Z_packet_to_target_hw_bp_type): ... this, and return a
9988 target_hw_bp_type instead.
9989 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9990 instead of an enum target_point_type.
9991 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9993 (aarch64_dr_state_insert_one_point)
9994 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9995 (aarch64_handle_aligned_watchpoint)
9996 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9997 Take an enum target_hw_bp_type instead of an enum
9999 (aarch64_supports_z_point_type): New function.
10000 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10001 use Z_packet_to_target_hw_bp_type.
10003 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10005 * configure.ac: Only use -Werror by default when DEVELOPMENT
10007 * configure: Regenerate.
10009 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10011 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10012 * linux-x86-low.c (X86_64_USER_REGS): New.
10013 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10015 2014-04-28 Yao Qi <yao@codesourcery.com>
10017 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10020 2014-04-25 Pedro Alves <palves@redhat.com>
10023 * linux-low.c (linux_attach_fail_reason_string): New function.
10024 (linux_attach_lwp): Delete.
10025 (linux_attach_lwp_1): Rename to ...
10026 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10027 argument. Remove "initial" parameter. Return int instead of
10028 void. Don't error or warn here.
10029 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10030 failure to attach to the tgid. Call warning when failing to
10032 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10033 argument. Remove "initial" parameter. Return int instead of
10034 void. Don't error or warn here.
10035 (linux_attach_fail_reason_string): New declaration.
10036 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10037 interface change. Use linux_attach_fail_reason_string.
10039 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10040 Walfred Tedeschi <walfred.tedeschi@intel.com>
10042 * Makefile.in: Added rules to handle new files
10043 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10044 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10045 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10046 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10047 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10048 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10049 x32-avx512-linux.o.
10050 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10051 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10052 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10053 i386/x32-avx512.xml.
10054 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10055 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10056 i386/x32-avx512-linux.xml.
10057 * i387-fp.c (num_avx512_k_registers): New constant for number
10059 (num_avx512_zmmh_low_registers): New constant for number of
10060 lower ZMM registers (0-15).
10061 (num_avx512_zmmh_high_registers): New constant for number of
10062 higher ZMM registers (16-31).
10063 (num_avx512_ymmh_registers): New contant for number of higher
10064 YMM registers (ymm16-31 added by avx521 on x86_64).
10065 (num_avx512_xmm_registers): New constant for number of higher
10066 XMM registers (xmm16-31 added by AVX512 on x86_64).
10067 (struct i387_xsave): Add space for AVX512 registers.
10068 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10069 Add code to handle AVX512 registers.
10070 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10071 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10072 prototypei from generated file.
10073 (tdesc_amd64_avx512_linux): Likewise.
10074 (init_registers_x32_avx512_linux): Likewise.
10075 (tdesc_x32_avx512_linux): Likewise.
10076 (init_registers_i386_avx512_linux): Likewise.
10077 (tdesc_i386_avx512_linux): Likewise.
10078 (x86_64_regmap): Add AVX512 registers.
10079 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10081 (initialize_low_arch): Add code to initialize AVX512 registers.
10083 2014-04-23 Pedro Alves <palves@redhat.com>
10085 * mem-break.c (find_gdb_breakpoint_at): Make static.
10086 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10088 2014-04-23 Pedro Alves <palves@redhat.com>
10090 * i386-low.c: Don't include break-common.h here.
10091 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10092 prototype to take target_hw_bp_type as argument instead of a Z
10094 * i386-low.h: Include break-common.h here.
10095 (Z_packet_to_hw_type): Declare.
10096 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10098 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10099 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10100 (x86_remove_point): Convert the packet number to a
10101 target_hw_bp_type before calling i386_low_remove_watchpoint.
10102 * win32-i386-low.c (i386_insert_point): Convert the packet number
10103 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10104 (i386_remove_point): Convert the packet number to a
10105 target_hw_bp_type before calling i386_low_remove_watchpoint.
10107 2014-04-23 Pedro Alves <palves@redhat.com>
10109 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10111 2014-04-10 Pedro Alves <palves@redhat.com>
10113 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10114 Check if the condition or command is NULL before checking if the
10115 breakpoint is known. On success, return true.
10116 * mem-break.h (add_breakpoint_condition): Document return.
10117 (add_breakpoint_commands): Add describing comment.
10118 * server.c (skip_to_semicolon): New function.
10119 (process_point_options): Use it.
10121 2014-04-09 Pedro Alves <palves@redhat.com>
10123 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10126 2014-02-27 Pedro Alves <palves@redhat.com>
10129 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10131 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10133 (last_thread_of_process_p): Take a PID argument instead of a
10135 (linux_wait_for_lwp): Delete.
10136 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10138 (linux_low_filter_event): New function, party factored out from
10139 linux_wait_for_event.
10140 (linux_wait_for_event): Rename to ...
10141 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10142 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10143 sigsuspend. Check for zombie leaders.
10144 (linux_wait_for_event): Reimplement as wrapper around
10145 linux_wait_for_event_filtered.
10146 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10147 a normal or signal exit is seen, it's the whole process exiting.
10148 (wait_for_sigstop): No longer a for_each_inferior callback.
10149 Rewrite on top of linux_wait_for_event_filtered.
10150 (stop_all_lwps): Call wait_for_sigstop directly.
10151 * server.c (resume, handle_target_event): Handle
10152 TARGET_WAITKIND_NO_RESUMED.
10154 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10156 * win32-low.c (psapi_get_dll_name,
10157 * win32_CreateToolhelp32Snapshot): Delete.
10158 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10159 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10161 (handle_load_dll): Add function description.
10162 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10164 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10166 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10168 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10169 base address when calling win32_add_one_solib.
10170 (handle_load_dll): Delete local variable load_addr.
10171 Remove 0x1000 offset applied to DLL base address when calling
10172 win32_add_one_solib.
10173 (handle_unload_dll): Add comment.
10175 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10177 * win32-low.c (win32_add_all_dlls): Renames
10178 win32_ensure_ntdll_loaded. Rewrite function documentation.
10179 Adjust implementation to always load all DLLs.
10180 Add 0x1000 offset to DLL base address when calling
10181 win32_add_one_solib.
10182 (child_initialization_done): New static global.
10183 (do_initial_child_stuff): Set child_initialization_done to
10184 zero during child initialization, and 1 after. Replace call
10185 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10187 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10188 (handle_unload_dll): Add function documentation.
10189 (get_child_debug_event): Ignore load and unload DLL events
10190 during child initialization.
10192 2014-02-20 Doug Evans <dje@google.com>
10194 Remove global all_lwps.
10195 * inferiors.h (ptid_of): Move here from linux-low.h.
10196 (pid_of, lwpid_of): Ditto.
10197 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10198 parameter is a struct thread_info * now.
10199 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10200 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10201 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10203 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10204 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10205 * linux-arm-low.c (update_registers_callback): Update, "entry"
10206 parameter is a struct thread_info * now.
10207 Fetch lwpid from current_inferior directly.
10208 (arm_insert_point): Pass &all_threads to find_inferior instead of
10210 (arm_remove_point): Ditto.
10211 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10212 (arm_prepare_to_resume): Fetch pid from thread.
10213 (arm_read_description): Fetch lwpid from current_inferior directly.
10214 * linux-low.c (all_lwps): Delete.
10215 (delete_lwp): Delete call to remove_inferior.
10216 (handle_extended_wait): Fetch lwpid from thread.
10217 (add_lwp): Don't set lwp->entry.id. Remove call to
10218 add_inferior_to_list.
10219 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10220 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10221 (kill_one_lwp_callback): Ditto.
10222 (linux_kill): Don't dereference NULL pointer.
10223 Fetch ptid,lwpid from thread.
10224 (get_detach_signal): Fetch ptid from thread.
10225 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10226 Simplify call to regcache_invalidate_thread.
10227 (delete_lwp_callback): Update, "entry" parameter is a
10228 struct thread_info * now. Fetch pid from thread.
10229 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10230 (status_pending_p_callback): Update, "entry" parameter is a
10231 struct thread_info * now. Fetch ptid from thread.
10232 (find_lwp_pid): Update, "entry" parameter is a
10233 struct thread_info * now.
10234 (linux_wait_for_lwp): Fetch pid from thread.
10235 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10236 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10237 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10238 (dequeue_one_deferred_signal): Ditto.
10239 (cancel_breakpoint): Fetch ptid from current_inferior.
10240 (linux_wait_for_event): Pass &all_threads to find_inferior,
10241 not &all_lwps. Fetch ptid, lwpid from thread.
10242 (count_events_callback): Update, "entry" parameter is a
10243 struct thread_info * now.
10244 (select_singlestep_lwp_callback): Ditto.
10245 (select_event_lwp_callback): Ditto.
10246 (cancel_breakpoints_callback): Ditto.
10247 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10249 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10250 (unsuspend_one_lwp): Update, "entry" parameter is a
10251 struct thread_info * now.
10252 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10254 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10255 Fetch lwpid from thread, not lwp.
10256 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10257 Pass &all_threads to find_inferior, not &all_lwps.
10258 (send_sigstop): Fetch lwpid from thread, not lwp.
10259 (send_sigstop_callback): Update, "entry" parameter is a
10260 struct thread_info * now.
10261 (suspend_and_send_sigstop_callback): Ditto.
10262 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10263 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10264 struct thread_info * now.
10265 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10267 (lwp_running): Update, "entry" parameter is a
10268 struct thread_info * now.
10269 (stop_all_lwps): Fetch ptid from thread.
10270 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10271 (linux_resume_one_lwp): Fetch lwpid from thread.
10272 (linux_set_resume_request): Update, "entry" parameter is a
10273 struct thread_info * now. Fetch pid, lwpid from thread.
10274 (resume_status_pending_p): Update, "entry" parameter is a
10275 struct thread_info * now.
10276 (need_step_over_p): Ditto. Fetch lwpid from thread.
10277 (start_step_over): Fetch lwpid from thread.
10278 (linux_resume_one_thread): Update, "entry" parameter is a
10279 struct thread_info * now. Fetch lwpid from thread.
10280 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10281 (proceed_one_lwp): Update, "entry" parameter is a
10282 struct thread_info * now. Fetch lwpid from thread.
10283 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10284 struct thread_info * now.
10285 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10286 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10287 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10289 (regsets_store_inferior_registers): Ditto.
10290 (fetch_register, store_register): Ditto.
10291 (linux_read_memory, linux_write_memory): Ditto.
10292 (linux_request_interrupt): Ditto.
10293 (linux_read_auxv): Ditto.
10294 (linux_xfer_siginfo): Ditto.
10295 (linux_qxfer_spu): Ditto.
10296 (linux_qxfer_libraries_svr4): Ditto.
10297 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10298 moved to inferiors.h.
10300 (get_thread_lwp): Update.
10301 (struct lwp_info): Delete member "entry". Simplify comment for
10303 (all_lwps): Delete.
10304 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10305 current_inferior directly.
10306 (update_watch_registers_callback): Update, "entry" parameter is a
10307 struct thread_info * now. Fetch pid from thread.
10308 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10309 (mips_insert_point): Fetch lwpid from current_inferior.
10310 Pass &all_threads to find_inferior, not &all_lwps.
10311 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10312 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10314 (mips_stopped_data_address): Ditto.
10315 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10317 * linux-tile-low.c (tile_arch_setup): Ditto.
10318 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10319 (update_debug_registers_callback): Update, "entry" parameter is a
10320 struct thread_info * now. Fetch pid from thread.
10321 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10322 Pass &all_threads to find_inferior, not &all_lwps.
10323 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10324 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10325 Pass &all_threads to find_inferior, not &all_lwps.
10326 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10327 (i386_dr_low_get_status): Ditto.
10328 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10329 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10330 (x86_linux_read_description): Ditto.
10331 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10333 2014-02-20 Doug Evans <dje@google.com>
10335 * inferiors.c (get_first_inferior): Fix buglet.
10337 2014-02-19 Doug Evans <dje@google.com>
10339 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10340 * inferiors.c (add_thread): Change result type to struct thread_info *.
10341 All callers updated.
10342 (add_lwp): Call add_thread here instead of in callers.
10343 All callers updated.
10344 * linux-low.h (get_lwp_thread): Rewrite.
10345 (struct lwp_info): New member "thread".
10347 2014-02-19 Doug Evans <dje@google.com>
10349 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10350 All callers updated.
10352 2014-02-19 Doug Evans <dje@google.com>
10354 * inferiors.c (add_thread): Fix whitespace.
10356 2014-02-19 Doug Evans <dje@google.com>
10358 * dll.c (clear_dlls): Replace accessing list implemention details
10360 * gdbthread.h (get_first_thread): Declare.
10361 * inferiors.c (for_each_inferior_with_data): New function.
10362 (get_first_thread): New function.
10363 (find_thread_ptid): Simplify.
10364 (get_first_inferior): New function.
10365 (clear_list): Delete.
10366 (one_inferior_p): New function.
10367 (clear_inferior_list): New function.
10368 (clear_inferiors): Update.
10369 * inferiors.h (for_each_inferior_with_data): Declare.
10370 (clear_inferior_list): Declare.
10371 (one_inferior_p): Declare.
10372 (get_first_inferior): Declare.
10373 * linux-low.c (linux_wait_for_event): Replace accessing list
10374 implemention details with API function.
10375 * server.c (target_running): Ditto.
10376 (accumulate_file_name_length): New function.
10377 (emit_dll_description): New function.
10378 (handle_qxfer_libraries): Replace accessing list implemention
10379 details with API function.
10380 (handle_qxfer_threads_worker): New function.
10381 (handle_qxfer_threads_proper): Replace accessing list implemention
10382 details with API function.
10383 (handle_query): Ditto.
10384 (visit_actioned_threads_callback_ftype): New typedef.
10385 (visit_actioned_threads_data): New struct.
10386 (visit_actioned_threads): Rewrite to be find_inferior callback.
10387 (resume): Call find_inferior.
10388 (handle_status): Replace accessing list implemention
10389 details with API function.
10390 (process_serial_event): Replace accessing list implemention details
10392 * target.c (set_desired_inferior): Replace accessing list implemention
10393 details with API function.
10394 * tracepoint.c (same_process_p): New function.
10395 (gdb_agent_about_to_close): Replace accessing list implemention
10396 details with API function.
10397 * win32-low.c (child_delete_thread): Replace accessing list
10398 implemention details with API function.
10399 (match_dll_by_basename): New function.
10400 (dll_is_loaded_by_basename): New function.
10401 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10402 details call to dll_is_loaded_by_basename.
10404 2014-02-19 Doug Evans <dje@google.com>
10406 * dll.h (struct dll_info): Add comment.
10407 * gdbthread.h (struct thread_info): Add comment.
10408 (current_ptid): Simplify.
10409 * inferiors.c (add_process): Update.
10410 (remove_process): Update.
10411 * inferiors.h (struct process_info): Rename member "head" to "entry".
10412 * linux-low.c (delete_lwp): Update.
10414 (last_thread_of_process_p): Update.
10415 (kill_one_lwp_callback, linux_kill): Update.
10416 (status_pending_p_callback): Update.
10417 (wait_for_sigstop): Update. Simplify read of ptid.
10418 (start_step_over): Update.
10419 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10420 (get_lwp_thread): Update.
10421 (struct lwp_info): Rename member "head" to "entry".
10422 * regcache.h (inferior_list_entry): Delete.
10423 * server.c (kill_inferior_callback): Update.
10424 (detach_or_kill_inferior_callback): Update.
10425 (print_started_pid): Update.
10426 (print_attached_pid): Update.
10427 (process_serial_event): Simplify read of ptid.
10428 * thread-db.c (thread_db_create_event): Update.
10429 (thread_db_get_tls_address): Update.
10430 * win32-low.c (current_inferior_ptid): Simplify.
10432 2014-02-19 Tom Tromey <tromey@redhat.com>
10434 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10436 (target_supports_btrace): Update.
10438 2014-02-14 Yao Qi <yao@codesourcery.com>
10440 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10441 (rsp-low-ipa.o): New target.
10443 2014-02-12 Tom Tromey <tromey@redhat.com>
10445 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10446 convert_ascii_to_int.
10447 * regcache.c (registers_to_string): Likewise.
10448 * remote-utils.c (decode_M_packet): Likewise.
10449 * server.c (process_serial_event): Likewise.
10451 2014-02-12 Tom Tromey <tromey@redhat.com>
10453 * server.c (handle_query, handle_v_run): Use hex2bin, not
10455 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10457 2014-02-12 Tom Tromey <tromey@redhat.com>
10459 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10460 convert_int_to_ascii.
10461 * regcache.c (registers_to_string, collect_register_as_string):
10463 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10465 * server.c (process_serial_event): Likewise.
10466 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10467 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10469 2014-02-12 Tom Tromey <tromey@redhat.com>
10471 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10472 bin2hex, not hexify.
10473 * tracepoint.c (cmd_qtstatus): Likewise.
10475 2014-02-12 Tom Tromey <tromey@redhat.com>
10477 * remote-utils.c (monitor_output): Pass explicit length to
10480 2014-02-12 Tom Tromey <tromey@redhat.com>
10482 * tracepoint.c: Include rsp-low.h.
10483 * server.c: Include rsp-low.h.
10484 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10485 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10487 * remote-utils.c: Include rsp-low.h.
10488 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10489 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10490 (convert_int_to_ascii, convert_ascii_to_int): Move to
10492 * regcache.c: Include rsp-low.h.
10493 * ax.c: Include rsp-low.h.
10494 * Makefile.in (SFILES): Add common/rsp-low.c.
10495 (OBS): Add rsp-low.o.
10496 (rsp-low.o): New target.
10498 2014-02-12 Tom Tromey <tromey@redhat.com>
10500 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10501 Include print-utils.h.
10502 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10503 (plongest, thirty_two, phex_nz): Remove.
10504 * Makefile.in (SFILES): Add common/print-utils.c.
10505 (OBS): Add print-utils.o.
10506 (print-utils-ipa.o): New target.
10507 (print-utils.o): New target.
10508 (IPA_OBJS): Add print-utils-ipa.o.
10510 2014-02-06 Tom Tromey <tromey@redhat.com>
10512 * Makefile.in (SFILES): Fix indentation.
10514 2014-02-05 Doug Evans <dje@google.com>
10516 * linux-low.c (linux_wait_for_event): Improve comment.
10517 (linux_wait_1): Keep current_inferior in sync with event_child.
10519 2014-01-22 Doug Evans <dje@google.com>
10521 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10523 2014-01-22 Doug Evans <dje@google.com>
10525 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10526 * configure: Regenerate.
10527 * config.in: Regenerate.
10528 * Makefile.in (SFILES): Add debug.c.
10529 (OBS): Add debug.o.
10530 * debug.c: New file.
10531 * debug.h: New file.
10532 * linux-aarch64-low.c (*): Update all debugging printfs to use
10533 debug_printf instead of fprintf.
10534 * linux-arm-low.c (*): Ditto.
10535 * linux-cris-low.c (*): Ditto.
10536 * linux-crisv32-low.c (*): Ditto.
10537 * linux-m32r-low.c (*): Ditto.
10538 * linux-sparc-low.c (*): Ditto.
10539 * linux-x86.c (*): Ditto.
10540 * linux-low.c (*): Ditto.
10541 (linux_wait_1): Add calls to debug_enter, debug_exit.
10542 (linux_wait): Remove redundant debugging printf.
10543 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10544 (linux_resume, unstop_all_lwps): Ditto.
10545 * mem-break.c (*): Update all debugging printfs to use
10546 debug_printf instead of fprintf.
10547 * remote-utils.c (*): Ditto.
10548 * thread-db.c (*): Ditto.
10549 * server.c #include <ctype.h>, "gdb_vecs.h".
10550 (debug_threads): Moved to debug.c.
10551 (*): Update all debugging printfs to use debug_printf instead of
10553 (start_inferior): Replace call to fflush with call to debug_flush.
10554 (monitor_show_help): Mention set debug-format.
10555 (parse_debug_format_options): New function.
10556 (handle_monitor_command): Handle "monitor set debug-format".
10557 (gdbserver_usage): Mention --debug-format.
10558 (main): Parse --debug-format.
10559 * server.h (debug_threads): Declaration moved to debug.h.
10560 #include "debug.h".
10561 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10562 trace_debug_1 that uses debug_printf.
10563 (tracepoint_look_up_symbols): Update all debugging printfs to use
10564 debug_printf instead of fprintf.
10566 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10568 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10571 2014-01-17 Pedro Alves <palves@redhat.com>
10574 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10575 defined after including gdb_proc_service.h.
10577 2014-01-16 Doug Evans <dje@google.com>
10579 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10580 (match_dll): Use it.
10582 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10584 * target.h (target_ops) <read_btrace>: Change parameters and
10585 return type to allow error reporting.
10586 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10587 trace reading errors on.
10588 * linux-low.c (linux_low_read_btrace): Pass trace reading
10590 (linux_low_disable_btrace): New.
10592 2014-01-15 Doug Evans <dje@google.com>
10594 * inferiors.c (thread_id_to_gdb_id): Delete.
10595 * inferiors.h (thread_id_to_gdb_id): Delete.
10597 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10599 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10600 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10603 2014-01-08 Pedro Alves <palves@redhat.com>
10605 * server.c (handle_status): Don't discard previous queued stop
10606 replies or thread's pending status here.
10607 (main) <disconnection>: Do it here instead.
10609 2014-01-08 Pedro Alves <palves@redhat.com>
10611 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10612 * server.c (visit_actioned_threads, handle_pending_status): New
10614 (handle_v_cont): Factor out parts to ...
10615 (resume): ... this new function. If in all-stop, and a thread
10616 being resumed has a pending status, report it without actually
10618 (myresume): Adjust to use the new 'resume' function.
10619 (clear_pending_status_callback, set_pending_status_callback)
10620 (find_status_pending_thread_callback): New functions.
10621 (handle_status): Handle the case of multiple threads having
10622 interesting statuses to report. Report threads' real last signal
10623 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10624 with an interesting thread to report the status for, instead of
10625 always reporting the status of the first thread.
10627 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10629 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10630 * gdbreplay.c (gdbreplay_version): Likewise.
10632 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10634 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10635 iov.iov_len with the real length in use.
10637 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10639 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10640 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10641 for all targets that use win32-low.c.
10642 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10643 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10645 2013-12-13 Pedro Alves <palves@redhat.com>
10647 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10648 if equal to TARGET_WAITKIND_LOADED.
10649 * win32-low.c (cached_status): New static global.
10650 (win32_wait): Add declaration.
10651 (do_initial_child_stuff): Flush all initial pending debug events
10652 up to the initial breakpoint.
10653 (win32_wait): If CACHED_STATUS was set, return that instead
10654 of doing a real wait. Remove the code resuming the execution
10655 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10656 during the initial phase. Also remove the code changing
10657 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10658 TARGET_WAITKIND_STOPPED.
10660 2013-12-11 Yao Qi <yao@codesourcery.com>
10662 * notif.c (handle_notif_ack): Return 0 if no notification
10665 2013-11-20 Doug Evans <dje@google.com>
10667 * linux-low.c (linux_set_resume_request): Fix comment.
10669 2013-11-20 Doug Evans <dje@google.com>
10671 * linux-low.c (resume_status_pending_p): Tweak comment.
10673 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10675 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10676 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10677 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10678 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10679 (srv_amd64_regobj): Add amd64-mpx.o.
10680 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10681 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10682 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10683 * i387-fp.c (num_pl_bnd_register) Added constant.
10684 (num_pl_bnd_cfg_registers) Added constant.
10685 (struct i387_xsave) Added reserved area and MPX fields.
10686 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10687 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10689 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10690 (init_registers_amd64_mpx_linux): Declare new function.
10691 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10692 (x86_64_regmap): Add MPX registers.
10693 (x86_linux_read_description): Add MPX case.
10694 (initialize_low_arch): Initialize MPX targets.
10696 2013-11-18 Tom Tromey <tromey@redhat.com>
10698 * configure: Rebuild.
10699 * configure.ac: Don't check for stdlib.h.
10700 * gdbreplay.c: Unconditionally include stdlib.h.
10702 2013-11-18 Tom Tromey <tromey@redhat.com>
10704 * config.in: Rebuild.
10705 * configure: Rebuild.
10706 * configure.ac: Don't use AC_HEADER_DIRENT.
10708 2013-11-18 Tom Tromey <tromey@redhat.com>
10710 * server.h: Don't check HAVE_STRING_H.
10711 * gdbreplay.c: Don't check HAVE_STRING_H.
10712 * configure: Rebuild.
10714 2013-11-18 Tom Tromey <tromey@redhat.com>
10716 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10719 2013-11-08 Tom Tromey <tromey@redhat.com>
10721 * configure, config.in: Rebuild.
10722 * configure.ac: Remove unused configury.
10724 2013-11-08 Tom Tromey <tromey@redhat.com>
10726 * acinclude.m4: Include common.m4, codeset.m4.
10727 * configure, config.in: Rebuild.
10728 * configure.ac: Use GDB_AC_COMMON.
10730 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10732 * linux-s390-low.c (HWCAP_S390_TE): New define.
10733 (s390_arch_setup): Consider the TE field in the HWCAP for
10734 determining 'have_regset_tdb'.
10736 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10739 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10742 2013-10-02 Pedro Alves <palves@redhat.com>
10744 * server.c (process_serial_event): Don't output "GDBserver
10745 exiting" if GDB is connected through stdio.
10746 * target.c (mywait): Likewise, be silent if GDB is connected
10749 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10751 * lynx-low.c (lynx_add_threads_after_attach): New function.
10752 (lynx_attach): Remove call to add_thread. Add call to
10753 lynx_add_threads_after_attach instead.
10755 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10757 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10758 * config.in, configure: Regenerated.
10760 2013-09-18 Yao Qi <yao@codesourcery.com>
10763 * server.c (start_inferior): Clear 'resume_info'.
10765 2013-09-16 Jiong Wang <jiwang@tilera.com>
10767 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10770 2013-09-16 Jiong Wang <jiwang@tilera.com>
10772 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10773 linux-tile-low.o to srv_tgtobj.
10775 2013-09-16 Will Newton <will.newton@linaro.org>
10777 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10780 2013-09-06 Pedro Alves <palves@redhat.com>
10782 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10783 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10784 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10785 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10786 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10787 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10789 2013-09-06 Pedro Alves <palves@redhat.com>
10791 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10792 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10794 2013-09-06 Pedro Alves <palves@redhat.com>
10796 * linux-amd64-ipa.c: Include tracepoint.h.
10797 * linux-i386-ipa.c: Include tracepoint.h.
10799 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10801 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10802 (ps_get_thread_area): New function.
10804 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10806 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10807 (initialize_low_arch): Call init_registers_crisv32 rather than
10808 init_register_crisv32.
10810 2013-09-05 Pedro Alves <palves@redhat.com>
10812 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10814 * hostio.h: ... this new file.
10815 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10816 win32-low.c: Include hostio.h.
10818 2013-09-05 Pedro Alves <palves@redhat.com>
10820 * server.h (gdb_client_data, handler_func, callback_handler_func)
10821 (delete_file_handler, add_file_handler, append_callback_event)
10822 (delete_callback_event, start_event_loop, initialize_event_loop):
10823 Move to event-loop.h and include it.
10824 * event-loop.h: New file.
10826 2013-09-05 Pedro Alves <palves@redhat.com>
10828 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10829 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10830 (loaded_dll, unloaded_dll): Move to ...
10831 * dll.h: ... this new file.
10832 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10834 2013-09-05 Pedro Alves <palves@redhat.com>
10836 * server.h (current_process, get_thread_process, all_processes)
10837 (add_inferior_to_list, for_each_inferior, current_inferior)
10838 (remove_inferior, add_process, remove_process, find_process_pid)
10839 (have_started_inferiors_p, have_attached_inferiors_p)
10840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10841 (clear_inferiors, find_inferior, find_inferior_id)
10842 (inferior_target_data, set_inferior_target_data)
10843 (inferior_regcache_data, set_inferior_regcache_data): Move to
10844 inferiors.h, and include it.
10845 * inferiors.h: New file.
10847 2013-09-05 Pedro Alves <palves@redhat.com>
10849 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10853 2013-09-05 Pedro Alves <palves@redhat.com>
10855 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10857 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10858 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10859 (handle_tracepoint_general_set, handle_tracepoint_query)
10860 (tracepoint_finished_step, tracepoint_was_hit)
10861 (release_while_stepping_state_list, current_traceframe)
10862 (in_readonly_region, traceframe_read_mem)
10863 (fetch_traceframe_registers, traceframe_read_sdata)
10864 (traceframe_read_info, struct fast_tpoint_collect_status)
10865 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10866 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10867 (supply_fast_tracepoint_registers)
10868 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10869 (ipa_tdesc, claim_trampoline_space)
10870 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10871 (agent_mem_read, agent_get_trace_state_variable_value)
10872 (agent_set_trace_state_variable_value, agent_tsv_read)
10873 (agent_mem_read_string, get_raw_reg_func_addr)
10874 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10875 * tracepoint.h: ... this new file.
10877 2013-09-05 Pedro Alves <palves@redhat.com>
10879 * server.h (perror_with_name, error, fatal, warning, paddress)
10880 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10882 * utils.h: New file.
10884 2013-09-05 Pedro Alves <palves@redhat.com>
10886 * server.h (remote_debug, noack_mode, transport_is_reliable)
10887 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10888 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10889 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10890 (write_enn, initialize_async_io, enable_async_io)
10891 (disable_async_io, check_remote_input_interrupt_request)
10892 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10893 (dead_thread_notify, prepare_resume_reply)
10894 (decode_address_to_semicolon, decode_address, decode_m_packet)
10895 (decode_M_packet, decode_X_packet, decode_xfer_write)
10896 (decode_search_memory_packet, unhexify, hexify)
10897 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10898 (look_up_one_symbol, relocate_instruction)
10899 (monitor_output): Move to remote-utils.h, and include it.
10900 * remote-utils.h: New file.
10902 2013-09-05 Pedro Alves <palves@redhat.com>
10904 * server.h (_): Delete.
10906 2013-09-02 Pedro Alves <palves@redhat.com>
10908 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10909 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10911 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10913 2013-09-02 Pierre Muller <muller@sourceware.org>
10915 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10916 or WriteProcessMemory complete successfully and handle
10917 ERROR_PARTIAL_COPY error.
10919 2013-09-02 Pedro Alves <palves@redhat.com>
10921 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10922 error instead of EIO.
10924 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10927 * linux-low.c: Include filestuff.h.
10928 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10929 * lynx-low.c: Include filestuff.h.
10930 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10931 * server.c: Include filestuff.h.
10932 (main): Call notice_open_fds.
10933 * spu-low.c: Include filestuff.h.
10934 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10936 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10938 * Makefile.in: Explain why ../target and ../nat are not
10939 listed as include file search paths.
10940 (linux-waitpid.o): New object file rule.
10941 * configure.srv (srv_native_linux_obj): New variable.
10942 Replace all occurrences of linux native object files with
10943 $srv_native_linux_obj.
10944 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10945 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10946 (linux_enable_event_reporting): Remove declaration.
10947 (my_waitpid): Moved to common/linux-waitpid.c.
10948 (linux_wait_for_event): Pass ptid when calling
10949 linux_enable_event_reporting.
10950 (linux_supports_tracefork_flag): Remove.
10951 (linux_enable_event_reporting): Likewise.
10952 (linux_tracefork_grandchild): Remove.
10953 (STACK_SIZE): Moved to common/linux-ptrace.c.
10954 (linux_tracefork_child): Remove.
10955 (linux_test_for_tracefork): Remove.
10956 (linux_look_up_symbols): Call linux_supports_traceclone.
10957 (initialize_low): Remove call to linux_test_for_tracefork.
10958 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10959 common/linux-ptrace.h.
10960 (PTRACE_TYPE_ARG4): Likewise.
10961 Include linux-ptrace.h.
10963 2013-08-21 Pedro Alves <palves@redhat.com>
10965 * config.in: Renegerate.
10967 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10969 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10970 (SFILES): Remove $(srcdir)/common/target-common.c and
10971 add $(srcdir)/target/waitstatus.c.
10972 (OBS): Remove target-common.o and add waitstatus.o.
10973 (server_h): Remove $(srcdir)/../common/target-common.h and
10974 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10975 and $(srcdir)/../target/waitstatus.h.
10976 (target-common.o): Remove.
10977 (waitstatus.o): New target object file.
10978 * target.h: Do not include target-common.h and
10979 include target/resume.h, target/wait.h and
10980 target/waitstatus.h.
10982 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10984 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10985 to PTRACE_TYPE_ARG3.
10986 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10987 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10989 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10990 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10992 2013-07-27 Jie Zhang <jie@codesourcery.com>
10993 Daniel Jacobowitz <dan@codesourcery.com>
10994 Yao Qi <yao@codesourcery.com>
10996 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10997 (mips-linux-watch.o): New rule.
10998 (mips_linux_watch_h): New variable.
10999 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11001 * linux-mips-low.c: Include mips-linux-watch.h.
11002 (struct arch_process_info, struct arch_lwp_info): New.
11003 (update_watch_registers_callback): New function.
11004 (mips_linux_new_process, mips_linux_new_thread) New functions.
11005 (mips_linux_prepare_to_resume, mips_insert_point): New
11007 (mips_remove_point, mips_stopped_by_watchpoint): New
11009 (rsp_bp_type_to_target_hw_bp_type): New function.
11010 (mips_stopped_data_address): New function.
11011 (the_low_target): Add watchpoint support functions.
11013 2013-07-27 Yao Qi <yao@codesourcery.com>
11015 * i386-low.c: Include break-common.h.
11016 (enum target_hw_bp_type): Remove.
11018 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11020 * Makefile.in (SFILES): /common/target-common.c.
11021 (OBS): Add target-common.o.
11022 (server_h): Add $(srcdir)/../common/target-common.h.
11023 (target-common.o): New target.
11024 * server.c (queue_stop_reply_callback): Free
11025 status string after use.
11026 * target.c (target_waitstatus_to_string): Remove.
11027 * target.h: Include target-common.h.
11028 (resume_kind): Likewise.
11029 (target_waitkind): Likewise.
11030 (target_waitstatus): Likewise.
11031 (TARGET_WNOHANG): Likewise.
11033 2013-07-04 Yao Qi <yao@codesourcery.com>
11035 * Makefile.in (host_alias): Use @host_noncanonical@.
11036 (target_alias): Use @target_noncanonical@.
11037 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11038 ACX_NONCANONICAL_HOST.
11039 * configure: Regenerated.
11042 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11044 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11045 * configure: Rebuild.
11046 * Makefile.in (version_host, version_target): Get from configure.
11047 (version.c): Use $(version_host) and $(version_target).
11049 2013-07-03 Pedro Alves <palves@redhat.com>
11051 * Makefile.in (config.status): Depend on development.sh.
11052 * acinclude.m4: Include libmcheck.m4.
11053 * configure: Regenerate.
11055 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11057 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11058 attribute inside the parentheses.
11059 (winapi_DebugSetProcessKillOnExit): Ditto.
11060 (winapi_DebugBreakProcess): Ditto.
11061 (winapi_GenerateConsoleCtrlEvent): Ditto.
11063 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11065 * notif.h (notif_event): Add a dummy member to avoid compiler
11068 2013-07-01 Pedro Alves <palves@redhat.com>
11070 * hostio.c (HOSTIO_PATH_MAX): Define.
11071 (require_filename, handle_open, handle_unlink, handle_readlink):
11074 2013-07-01 Pedro Alves <palves@redhat.com>
11076 * server.h: Include "pathmax.h".
11077 * linux-low.c: Don't include sys/param.h.
11078 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11080 * win32-low.c: Don't include sys/param.h.
11081 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11083 2013-07-01 Pedro Alves <palves@redhat.com>
11085 * event-loop.c: Don't check HAVE_UNISTD_H before including
11087 * gdbreplay.c: Likewise.
11088 * remote-utils.c: Likewise.
11089 * server.c: Likewise.
11090 * configure.ac: Don't check for unistd.h.
11091 * configure: Regenerate.
11093 2013-06-28 Tom Tromey <tromey@redhat.com>
11095 * Makefile.in (version.c): Use version.in, not
11098 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11100 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11101 * configure: Rebuild.
11102 * Makefile.in (version_host, version_target): Get from configure.
11103 (version.c): Use $(version_host) and $(version_target).
11105 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11107 Fix trace-status to output user name without trailing colon.
11108 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11110 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11112 Fix trace-status to output proper start-time and stop-time.
11113 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11114 output start time and stop time in hex as gdb expects.
11116 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11118 * tracepoint.c (build_traceframe_info_xml): Output trace state
11119 variables present in the trace buffer.
11121 2013-06-24 Tom Tromey <tromey@redhat.com>
11123 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11125 (version.o): Remove.
11126 * gdbreplay.c: Include version.h.
11127 (version, host_name): Don't declare.
11128 * server.h: Include version.h.
11129 (version, host_name): Don't declare.
11131 2013-06-12 Pedro Alves <palves@redhat.com>
11133 * linux-x86-low.c (linux_is_elf64): Delete global.
11134 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11135 with local linux_pid_exe_is_elf_64_file use.
11137 2013-06-11 Pedro Alves <palves@redhat.com>
11139 * linux-low.c (regset_disabled, disable_regset): New functions.
11140 (regsets_fetch_inferior_registers)
11141 (regsets_store_inferior_registers): Use them.
11142 (initialize_regsets_info); Don't allocate the disabled_regsets
11144 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11147 2013-06-11 Pedro Alves <palves@redhat.com>
11149 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11152 2013-06-11 Pedro Alves <palves@redhat.com>
11154 * linux-x86-low.c (initialize_low_arch): Call
11155 init_registers_x32_avx_linux.
11157 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11159 Fix compatibility with Android Bionic.
11160 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11163 2013-06-07 Pedro Alves <palves@redhat.com>
11166 * Makefile.in (OBS): Add tdesc.o.
11167 (IPA_OBJS): Add tdesc-ipa.o.
11168 (tdesc-ipa.o): New rule.
11169 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11171 * linux-low.c (new_inferior): Delete.
11172 (disabled_regsets, num_regsets): Delete.
11173 (linux_add_process): Adjust to set the new per-process
11175 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11176 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11177 was a stop. When calling arch_setup, switch the current inferior
11178 to the thread that got an event.
11179 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11180 (regsets_fetch_inferior_registers)
11181 (regsets_store_inferior_registers): New regsets_info parameter.
11183 (linux_register_in_regsets): New regs_info parameter. Adjust to
11185 (register_addr, fetch_register, store_register): New usrregs_info
11186 parameter. Adjust to use it.
11187 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11188 parameter regs_info. Adjust to use it.
11189 (linux_fetch_registers): Get the current inferior's regs_info, and
11191 (linux_store_registers): Ditto.
11192 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11193 (initialize_low): Don't initialize the target_regsets here. Call
11194 initialize_low_arch.
11195 * linux-low.h (target_regsets): Delete declaration.
11196 (struct regsets_info): New.
11197 (struct usrregs_info): New.
11198 (struct regs_info): New.
11199 (struct process_info_private) <new_inferior>: New field.
11200 (struct linux_target_ops): Delete the num_regs, regmap, and
11201 regset_bitmap fields. New field regs_info.
11202 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11203 * i387-fp.c (num_xmm_registers): Delete.
11204 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11205 calls to new interface.
11206 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11207 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11208 Infer the number of xmm registers from the regcache's target
11210 * i387-fp.h (num_xmm_registers): Delete.
11211 * inferiors.c (add_thread): Don't install the thread's regcache
11213 * proc-service.c (gregset_info): Fetch the current inferior's
11214 regs_info. Adjust to use it.
11215 * regcache.c: Include tdesc.h.
11216 (register_bytes, reg_defs, num_registers)
11217 (gdbserver_expedite_regs): Delete.
11218 (get_thread_regcache): If the thread doesn't have a regcache yet,
11219 create one, instead of aborting gdbserver.
11220 (regcache_invalidate_one): Rename to ...
11221 (regcache_invalidate_thread): ... this.
11222 (regcache_invalidate_one): New.
11223 (regcache_invalidate): Only invalidate registers of the current
11225 (init_register_cache): Add target_desc parameter, and use it.
11226 (new_register_cache): Ditto. Assert the target description has a
11227 non zero registers_size.
11228 (regcache_cpy): Add assertions. Adjust.
11229 (realloc_register_cache, set_register_cache): Delete.
11230 (registers_to_string, registers_from_string): Adjust.
11231 (find_register_by_name, find_regno, find_register_by_number)
11232 (register_cache_size): Add target_desc parameter, and use it.
11233 (free_register_cache_thread, free_register_cache_thread_one)
11234 (regcache_release, register_cache_size): New.
11235 (register_size): Add target_desc parameter, and use it.
11236 (register_data, supply_register, supply_register_zeroed)
11237 (supply_regblock, supply_register_by_name, collect_register)
11238 (collect_register_as_string, collect_register_by_name): Adjust.
11239 * regcache.h (struct target_desc): Forward declare.
11240 (struct regcache) <tdesc>: New field.
11241 (init_register_cache, new_register_cache): Add target_desc
11243 (regcache_invalidate_thread): Declare.
11244 (regcache_invalidate_one): Delete declaration.
11245 (regcache_release): Declare.
11246 (find_register_by_number, register_cache_size, register_size)
11247 (find_regno): Add target_desc parameter.
11248 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11250 * remote-utils.c: Include tdesc.h.
11251 (outreg, prepare_resume_reply): Adjust.
11252 * server.c: Include tdesc.h.
11253 (gdbserver_xmltarget): Delete declaration.
11254 (get_features_xml, process_serial_event): Adjust.
11255 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11257 (struct process_info) <tdesc>: New field.
11258 (ipa_tdesc): Declare.
11259 * tdesc.c: New file.
11260 * tdesc.h: New file.
11261 * tracepoint.c: Include tdesc.h.
11262 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11263 (get_context_regcache): Adjust to pass ipa_tdesc down.
11264 (do_action_at_tracepoint): Adjust to get the register cache size
11265 from the context regcache's description.
11266 (traceframe_walk_blocks): Adjust to get the register cache size
11267 from the current trace frame's description.
11268 (traceframe_get_pc): Adjust to get current trace frame's
11269 description and pass it down.
11270 (gdb_collect): Adjust to get the register cache size from the
11272 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11273 (gdbserver_xmltarget): Delete.
11274 (initialize_low_tracepoint): Set the ipa's target description.
11275 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11276 (initialize_low_tracepoint): Set the ipa's target description.
11277 * linux-x86-low.c: Include tdesc.h.
11278 [__x86_64__] (is_64bit_tdesc): New.
11279 (ps_get_thread_area, x86_get_thread_area): Use it.
11280 (i386_cannot_store_register): Rename to ...
11281 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11282 (i386_cannot_fetch_register): Rename to ...
11283 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11284 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11286 (target_regsets): Rename to ...
11287 (x86_regsets): ... this.
11288 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11290 (x86_siginfo_fixup): Use is_64bit_tdesc.
11291 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11292 (tdesc_x32_avx_linux, tdesc_x32_linux)
11293 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11295 (x86_linux_update_xmltarget): Delete.
11296 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11297 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11298 (AMD64_LINUX_USER64_CS): New.
11299 (x86_linux_read_description): New, based on
11300 x86_linux_update_xmltarget.
11301 (same_process_callback): New.
11302 (x86_arch_setup_process_callback): New.
11303 (x86_linux_update_xmltarget): New.
11304 (x86_regsets_info): New.
11305 (amd64_linux_regs_info): New.
11306 (i386_linux_usrregs_info): New.
11307 (i386_linux_regs_info): New.
11308 (x86_linux_regs_info): New.
11309 (x86_arch_setup): Reimplement.
11310 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11311 (x86_emit_ops): Ditto.
11312 (the_low_target): Adjust. Install x86_linux_regs_info,
11313 x86_cannot_fetch_register, and x86_cannot_store_register.
11314 (initialize_low_arch): New.
11315 * linux-ia64-low.c (tdesc_ia64): Declare.
11316 (ia64_fetch_register): Adjust.
11317 (ia64_usrregs_info, regs_info): New globals.
11318 (ia64_regs_info): New function.
11319 (the_low_target): Adjust.
11320 (initialize_low_arch): New function.
11321 * linux-sparc-low.c (tdesc_sparc64): Declare.
11322 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11324 (sparc_arch_setup): New function.
11325 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11326 (the_low_target): Adjust.
11327 (initialize_low_arch): New function.
11328 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11329 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11331 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11332 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11333 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11334 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11335 (tdesc_powerpc_isa205_vsx64l): Declare.
11336 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11337 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11338 (ppc_set_pc, ppc_get_hwcap): Adjust.
11339 (ppc_usrregs_info): Forward declare.
11340 (!__powerpc64__) ppc_regmap_adjusted: New global.
11341 (ppc_arch_setup): Adjust to the current process'es target
11343 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11344 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11345 (ppc_store_evrregset): Adjust.
11346 (target_regsets): Rename to ...
11347 (ppc_regsets): ... this, and make static.
11348 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11349 (ppc_regs_info): New function.
11350 (the_low_target): Adjust.
11351 (initialize_low_arch): New function.
11352 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11353 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11354 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11355 (tdesc_s390x_linux64v2): Declare.
11356 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11357 (s390_fill_gregset, s390_store_last_break): Adjust.
11358 (target_regsets): Rename to ...
11359 (s390_regsets): ... this, and make static.
11360 (s390_get_pc, s390_set_pc): Adjust.
11361 (s390_get_hwcap): New target_desc parameter, and use it.
11362 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11363 (s390_arch_setup): Adjust to set the current process'es target
11364 description. Don't adjust the regmap.
11365 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11366 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11367 (regs_info_3264): New globals.
11368 (s390_regs_info): New function.
11369 (the_low_target): Adjust.
11370 (initialize_low_arch): New function.
11371 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11372 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11373 [__mips64] (init_registers_mips_linux)
11374 (init_registers_mips_dsp_linux): Delete defines.
11375 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11376 (have_dsp): New global.
11377 (mips_read_description): New, based on mips_arch_setup.
11378 (mips_arch_setup): Reimplement.
11379 (get_usrregs_info): New function.
11380 (mips_cannot_fetch_register, mips_cannot_store_register)
11381 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11382 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11383 (target_regsets): Rename to ...
11384 (mips_regsets): ... this, and make static.
11385 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11386 (dsp_regs_info, regs_info): New globals.
11387 (mips_regs_info): New function.
11388 (the_low_target): Adjust.
11389 (initialize_low_arch): New function.
11390 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11391 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11393 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11394 (arm_read_description): New, with bits factored from
11396 (arm_arch_setup): Reimplement.
11397 (target_regsets): Rename to ...
11398 (arm_regsets): ... this, and make static.
11399 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11400 (arm_regs_info): New function.
11401 (the_low_target): Adjust.
11402 (initialize_low_arch): New function.
11403 * linux-m68k-low.c (tdesc_m68k): Declare.
11404 (target_regsets): Rename to ...
11405 (m68k_regsets): ... this, and make static.
11406 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11407 (m68k_regs_info): New function.
11408 (m68k_arch_setup): New function.
11409 (the_low_target): Adjust.
11410 (initialize_low_arch): New function.
11411 * linux-sh-low.c (tdesc_sharch): Declare.
11412 (target_regsets): Rename to ...
11413 (sh_regsets): ... this, and make static.
11414 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11415 (sh_regs_info, sh_arch_setup): New functions.
11416 (the_low_target): Adjust.
11417 (initialize_low_arch): New function.
11418 * linux-bfin-low.c (tdesc_bfin): Declare.
11419 (bfin_arch_setup): New function.
11420 (bfin_usrregs_info, regs_info): New globals.
11421 (bfin_regs_info): New function.
11422 (the_low_target): Adjust.
11423 (initialize_low_arch): New function.
11424 * linux-cris-low.c (tdesc_cris): Declare.
11425 (cris_arch_setup): New function.
11426 (cris_usrregs_info, regs_info): New globals.
11427 (cris_regs_info): New function.
11428 (the_low_target): Adjust.
11429 (initialize_low_arch): New function.
11430 * linux-cris-low.c (tdesc_crisv32): Declare.
11431 (cris_arch_setup): New function.
11432 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11433 (cris_regs_info): New function.
11434 (the_low_target): Adjust.
11435 (initialize_low_arch): New function.
11436 * linux-m32r-low.c (tdesc_m32r): Declare.
11437 (m32r_arch_setup): New function.
11438 (m32r_usrregs_info, regs_info): New globals.
11439 (m32r_regs_info): Adjust.
11440 (initialize_low_arch): New function.
11441 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11442 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11443 (tic6x_usrregs_info): Forward declare.
11444 (tic6x_read_description): New function, based on ...
11445 (tic6x_arch_setup): ... this. Reimplement.
11446 (target_regsets): Rename to ...
11447 (tic6x_regsets): ... this, and make static.
11448 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11449 (tic6x_regs_info): New function.
11450 (the_low_target): Adjust.
11451 (initialize_low_arch): New function.
11452 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11453 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11454 (target_regsets): Rename to ...
11455 (xtensa_regsets): ... this, and make static.
11456 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11458 (xtensa_arch_setup, xtensa_regs_info): New functions.
11459 (the_low_target): Adjust.
11460 (initialize_low_arch): New function.
11461 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11462 (nios2_arch_setup): Set the current process'es tdesc.
11463 (target_regsets): Rename to ...
11464 (nios2_regsets): ... this.
11465 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11466 (nios2_regs_info): New function.
11467 (the_low_target): Adjust.
11468 (initialize_low_arch): New function.
11469 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11470 (aarch64_arch_setup): Set the current process'es tdesc.
11471 (target_regsets): Rename to ...
11472 (aarch64_regsets): ... this.
11473 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11474 (aarch64_regs_info): New function.
11475 (the_low_target): Adjust.
11476 (initialize_low_arch): New function.
11477 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11479 (target_regsets): Rename to ...
11480 (tile_regsets): ... this.
11481 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11482 (tile_regs_info): New function.
11483 (tile_arch_setup): Set the current process'es tdesc.
11484 (the_low_target): Adjust.
11485 (initialize_low_arch): New function.
11486 * spu-low.c (tdesc_spu): Declare.
11487 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11488 * win32-arm-low.c (tdesc_arm): Declare.
11489 (arm_arch_setup): New function.
11490 (the_low_target): Install arm_arch_setup instead of
11491 init_registers_arm.
11492 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11493 (init_windows_x86): Rename to ...
11494 (i386_arch_setup): ... this. Set `win32_tdesc'.
11495 (the_low_target): Adjust.
11496 * win32-low.c (win32_tdesc): New global.
11497 (child_add_thread): Don't create the thread cache here.
11498 (do_initial_child_stuff): Set the new process'es tdesc.
11499 * win32-low.h (struct target_desc): Forward declare.
11500 (win32_tdesc): Declare.
11501 * lynx-i386-low.c (tdesc_i386): Declare global.
11502 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11503 * lynx-low.c (lynx_tdesc): New global.
11504 (lynx_add_process): Set the new process'es tdesc.
11505 * lynx-low.h (struct target_desc): Forward declare.
11506 (lynx_tdesc): Declare global.
11507 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11508 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11509 * nto-low.c (nto_tdesc): New global.
11510 (do_attach): Set the new process'es tdesc.
11511 * nto-low.h (struct target_desc): Forward declare.
11512 (nto_tdesc): Declare.
11513 * nto-x86-low.c (tdesc_i386): Declare.
11514 (nto_x86_arch_setup): Set `nto_tdesc'.
11516 2013-06-04 Gary Benson <gbenson@redhat.com>
11518 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11519 to qSupported response when appropriate.
11520 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11521 with nonzero-length annex.
11522 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11523 arguments supplied in annex.
11525 2013-05-31 Doug Evans <dje@google.com>
11528 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11529 64 bits in 64-cross-32 environment.
11531 2013-05-28 Pedro Alves <palves@redhat.com>
11533 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11534 (aarch64-without-fpu.c): Delete rule.
11535 * configure.srv (aarch64*-*-linux*): Remove references to
11536 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11537 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11540 2013-05-24 Pedro Alves <palves@redhat.com>
11542 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11543 instead of strchr/decode_address. Error if the range isn't split
11544 with a ','. Don't assume there's be a ':' in the action.
11546 2013-05-23 Yao Qi <yao@codesourcery.com>
11547 Pedro Alves <palves@redhat.com>
11549 * linux-low.c (lwp_in_step_range): New function.
11550 (linux_wait_1): If the thread was range stepping and stopped
11551 outside the stepping range, report the stop to GDB. Otherwise,
11552 continue stepping. Add range stepping debug output.
11553 (linux_set_resume_request): Copy the step range from the resume
11554 request to the lwp.
11555 (linux_supports_range_stepping): New.
11556 (linux_target_ops) <supports_range_stepping>: Set to
11557 linux_supports_range_stepping.
11558 * linux-low.h (struct linux_target_ops)
11559 <supports_range_stepping>: New field.
11560 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11561 * linux-x86-low.c (x86_supports_range_stepping): New.
11562 (the_low_target) <supports_range_stepping>: Set to
11563 x86_supports_range_stepping.
11564 * server.c (handle_v_cont): Handle 'r' action.
11565 (handle_v_requests): Append ";r" if the target supports range
11567 * target.h (struct thread_resume) <step_range_start,
11568 step_range_end>: New fields.
11569 (struct target_ops) <supports_range_stepping>:
11571 (target_supports_range_stepping): New macro.
11573 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11575 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11576 confusion in comment.
11578 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11580 * lynx-low.c (struct process_info_private): New type.
11581 (lynx_add_process): New function.
11582 (lynx_create_inferior, lynx_attach): Replace calls to
11583 add_process by calls to lynx_add_process.
11584 (lynx_resume): If PTID is null, then try using
11585 current_process()->private->last_wait_event_ptid.
11587 (lynx_clear_inferiors): Delete. The contents of that function
11588 has been inlined in lynx_mourn;
11589 (lynx_wait_1): Save the ptid in the process's private data.
11590 (lynx_mourn): Free the process' private data. Replace call
11591 to lynx_clear_inferiors by call to clear_inferiors.
11593 2013-05-17 Yao Qi <yao@codesourcery.com>
11595 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11598 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11600 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11601 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11602 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11603 PT_TEXT_END_ADDR guards. Update comments.
11604 (linux_target_op) <read_offsets>: Conditionally define to
11605 linux_read_offsets if the target is UCLIBC and if it defines
11606 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11608 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11609 Andrew Jenner <andrew@codesourcery.com>
11611 * Makefile.in (SFILES): Add linux-nios2-low.c.
11612 (clean): Add action to delete nios2-linux.c.
11613 (nios2-linux.c): New rule.
11614 * configure.srv: Add nios2*-*-linux*.
11615 * linux-nios2-low.c: New.
11617 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11619 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11621 2013-04-25 Hui Zhu <hui@codesourcery.com>
11624 * ax.c (ax_printf): Add fflush.
11626 2013-04-22 Tom Tromey <tromey@redhat.com>
11628 * Makefile.in (SFILES): Add filestuff.c.
11629 (OBS): Add filestuff.o.
11630 (filestuff.o): New target.
11631 * config.in, configure: Rebuild.
11632 * configure.ac: Check for fdwalk, pipe2.
11634 2013-04-17 Pedro Alves <palves@redhat.com>
11636 * configure.ac (USE_THREAD_DB): Delete variable.
11637 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11638 Don't AC_SUBST USE_THREAD_DB.
11639 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11640 * config.in, configure: Regenerate.
11642 2013-04-16 Pedro Alves <palves@redhat.com>
11644 * linux-low.h (struct lwp_info) <thread_known>: Move under
11645 the USE_THREAD_DB #ifdef.
11647 2013-04-16 Pedro Alves <palves@redhat.com>
11649 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11650 (linux-low.o): Delete rule.
11651 * linux-low.h: Always include "gdb_thread_db.h" instead of
11652 conditionally including thread_db.h.
11653 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11656 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11658 * Makefile.in (install-only): Fix make install regression.
11660 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11662 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11663 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11665 * gdbserver.1: Remove.
11667 2013-03-22 Pedro Alves <palves@redhat.com>
11669 * linux-low.c (handle_extended_wait): Don't call
11670 linux_enable_event_reporting.
11672 2013-03-15 Tony Theodore <tonyt@logyst.com>
11675 * Makefile.in (SHELL): Use @SHELL@.
11677 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11679 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11682 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11684 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11685 Remove extraneous NULL element.
11687 2013-03-13 Yao Qi <yao@codesourcery.com>
11689 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11690 'V' block in trace frame.
11692 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11694 * target.h (struct target_ops): Add btrace ops.
11695 (target_supports_btrace): New macro.
11696 (target_enable_btrace): New macro.
11697 (target_disable_btrace): New macro.
11698 (target_read_btrace): New macro.
11699 * gdbthread.h (struct thread_info): Add btrace field.
11700 * server.c: Include btrace-common.h.
11701 (handle_btrace_general_set): New function.
11702 (handle_btrace_enable): New function.
11703 (handle_btrace_disable): New function.
11704 (handle_general_set): Call handle_btrace_general_set.
11705 (handle_qxfer_btrace): New function.
11706 (struct qxfer qxfer_packets[]): Add btrace entry.
11707 * inferiors.c (remove_thread): Disable btrace.
11708 * linux-low: Include linux-btrace.h.
11709 (linux_low_enable_btrace): New function.
11710 (linux_low_read_btrace): New function.
11711 (linux_target_ops): Add btrace ops.
11712 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11713 Add srv_linux_btrace=yes.
11714 (x86_64-*-linux*): Add linux-btrace.o.
11715 Add srv_linux_btrace=yes.
11716 * configure.ac: Define HAVE_LINUX_BTRACE.
11717 * config.in: Regenerated.
11718 * configure: Regenerated.
11720 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11722 * server.c (handle_qxfer): Preserve error message if -3 is
11724 (qxfer): Document the -3 return value.
11726 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11728 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11729 (linux_btrace_h): New variable.
11730 (linux-btrace.o): New rule.
11732 2013-03-08 Stan Shebs <stan@codesourcery.com>
11733 Hafiz Abid Qadeer <abidh@codesourcery.com>
11735 * tracepoint.c (trace_buffer_size): New global.
11736 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11737 (init_trace_buffer): Change to one-argument function. Allocate
11738 trace buffer memory.
11739 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11740 handle QTBuffer:size packet.
11741 (cmd_bigqtbuffer_size): New function.
11742 (initialize_tracepoint): Call init_trace_buffer with
11743 DEFAULT_TRACE_BUFFER_SIZE.
11744 * server.c (handle_query): Add QTBuffer:size in the
11747 2013-03-07 Yao Qi <yao@codesourcery.com>
11749 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11750 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11752 (cmd_qtsp): Adjust condition. Do post increment.
11753 Set cur_action and cur_step_action back to 0.
11755 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11758 * linux-low.c (linux_write_memory): Return early success if LEN is
11761 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11763 * configure.srv: Add x86_64-*-cygwin* as target.
11765 2013-02-28 Tom Tromey <tromey@redhat.com>
11767 * configure.ac: Invoke AC_SYS_LARGEFILE.
11768 * configure, config.in: Rebuild.
11770 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11772 * win32-low.c: Throughout, fix format strings and casts of
11773 printf-like functions to avoid type related warnings on all
11775 (get_child_debug_event): Print dwDebugEventCode as hex since
11776 that's how it's usually documented.
11778 2013-02-28 Yao Qi <yao@codesourcery.com>
11780 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11783 2013-02-27 Jiong Wang <jiwang@tilera.com>
11785 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11786 (reg-tilegx32.c): New rule.
11787 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11788 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11789 different register info initializer according to elf class.
11790 (init_registers_tilgx32): New function. The tilegx32 register info
11792 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11793 (tile_store_gregset): Likewise.
11795 2013-02-27 Yao Qi <yao@codesourcery.com>
11797 * server.c (process_point_options): Print debug message when
11798 debug_threads is true.
11800 2013-02-26 Yao Qi <yao@codesourcery.com>
11802 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11804 2013-02-19 Pedro Alves <palves@redhat.com>
11805 Kai Tietz <ktietz@redhat.com>
11809 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11810 instead of strtoul to extract address from packet.
11811 (process_serial_event) <'z'>: Likewise.
11813 2013-02-18 Yao Qi <yao@codesourcery.com>
11815 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11817 2013-02-14 Pedro Alves <palves@redhat.com>
11821 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11822 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11824 2013-02-14 Pedro Alves <palves@redhat.com>
11826 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11828 2013-02-14 Pedro Alves <palves@redhat.com>
11830 * tracepoint.c (save_string): Delete.
11831 (add_tracepoint_action): Use savestring instead of save_string.
11833 2013-02-12 Pedro Alves <palves@redhat.com>
11835 * linux-xtensa-low.c: Ditto.
11836 * xtensa-xtregs.c: Ditto.
11838 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11840 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11843 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11845 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11846 aarch64_num_wp_regs and aarch64_num_bp_regs to
11847 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11849 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11851 * linux-aarch64-low.c (ps_get_thread_area): Replace
11852 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11854 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11855 Marcus Shawcroft <marcus.shawcroft@arm.com>
11856 Nigel Stephens <nigel.stephens@arm.com>
11857 Yufeng Zhang <yufeng.zhang@arm.com>
11859 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11860 (aarch64.c, aarch64-without-fpu.c): New targets.
11861 * configure.srv (aarch64*-*-linux*): New.
11862 * linux-aarch64-low.c: New file.
11864 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11866 * linux-low.c (handle_extended_wait, linux_create_inferior)
11867 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11868 (dequeue_one_deferred_signal, linux_resume_one_thread)
11869 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11870 (linux_tracefork_grandchild, linux_test_for_tracefork)
11871 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11872 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11873 where the argument is 0.
11875 2013-01-25 Yao Qi <yao@codesourcery.com>
11877 * event-loop.c: Include "queue.h".
11878 (gdb_event_p): New typedef.
11879 (struct gdb_event) <next_event>: Remove.
11880 (event_queue): Change to QUEUE(gdb_event_p).
11881 (async_queue_event): Remove.
11882 (gdb_event_xfree): New.
11883 (initialize_event_loop): New.
11884 (process_event): Use API from QUEUE.
11885 (wait_for_event): Likewise.
11886 * server.c (main): Call initialize_event_loop.
11887 * server.h (initialize_event_loop): Declare.
11889 2013-01-18 Yao Qi <yao@codesourcery.com>
11891 * ax.h (struct eval_agent_expr_context): New.
11892 (gdb_eval_agent_expr): Update declaration.
11893 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11894 TFRAME. Add new argument CTX.
11895 * server.h (struct eval_agent_expr_context): Declare.
11896 (agent_mem_read, agent_tsv_read): Update declaration.
11897 (agent_mem_read_string): Likewise.
11898 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11899 (add_traceframe_block): Add new argument TPOINT.
11900 Increase TPOINT->traceframe_usage.
11901 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11902 eval_tracepoint_agent_expr.
11903 (condition_true_at_tracepoint): Likewise.
11904 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11905 (agent_mem_read_string, agent_tsv_read): Likewise.
11907 2013-01-16 Yao Qi <yao@codesourcery.com>
11909 * linux-low.c (linux_resume_one_lwp): Don't check
11910 'lwp->bp_reinsert != 0'.
11912 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11913 Pedro Alves <palves@redhat.com>
11915 * lynx-low.c (ptrace_request_to_str): Define a temporary
11916 macro and use it to simplify this function's implementation.
11918 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11920 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11923 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11925 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11927 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11929 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11931 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11933 * lynx-low.c (lynx_resume): Use the resume_info parameter
11934 to determine the ptid for the lynx_ptrace call, unless
11935 it is equal to minus_one_ptid, in which case we use the
11936 ptid of the current_inferior.
11937 (lynx_wait_1): After having received a thread create/exit
11938 event, resume the inferior's execution using the signaling
11939 thread's ptid, rather than the old ptid.
11941 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11943 * lynx-low.c (lynx_resume): Delete variable ret.
11945 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11947 * gdbreplay.c (gdbreplay_version): Update copyright year.
11948 * server.c (gdbserver_version): Likewise.
11950 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11952 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11955 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11957 * lynx-low.c (ptrace_request_to_str): Add handling for
11958 PTRACE_GETTRACESIG.
11960 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11962 * lynx-low.c (lynx_attach): Delete variable new_process.
11964 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11966 * lynx-low.c (lynx_create_inferior): Delete variable
11969 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11971 * lynx-low.c (ptrace_request_to_str): Do not handle
11972 PTRACE_GETTHREADLIST if this macro does not exist.
11974 2012-12-15 Yao Qi <yao@codesourcery.com>
11976 * Makefile.in (OBS): Add notif.o.
11977 * notif.c, notif.h: New.
11978 * server.c: Include "notif.h".
11979 (struct vstop_notif) <next>: Remove.
11981 (queue_stop_reply): Update.
11982 (push_event, send_next_stop_reply): Remove.
11983 (discard_queued_stop_replies): Update.
11984 (notif_stop): New variable.
11985 (handle_v_stopped): Remove.
11986 (handle_v_requests): Don't call handle_v_stopped. Call
11987 handle_ack_notif instead.
11988 (queue_stop_reply_callback): Call notif_event_enque instead
11989 of queue_stop_reply.
11990 (handle_status): Don't call send_next_stop_reply, call
11991 notif_write_event instead.
11992 (kill_inferior_callback): Likewise.
11993 (detach_or_kill_inferior_callback): Likewise.
11994 (main): Call initialize_notif.
11995 (process_serial_event): Call QUEUE_is_empty.
11996 (handle_target_event): Call notif_push instead of push event.
11997 * server.h (push_event): Remove declaration.
11999 2012-12-10 Tom Tromey <tromey@redhat.com>
12001 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12002 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12005 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12006 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12007 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12008 (amd64-linux-ipa.o, ax.o): Rewrite.
12009 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12010 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12011 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12012 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12013 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12014 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12015 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12016 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12017 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12018 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12019 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12020 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12021 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12022 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12023 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12024 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12025 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12026 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12027 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12028 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12029 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12030 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12031 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12032 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12033 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12034 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12035 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12036 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12037 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12038 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12039 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12040 (reg-tilegx.o): Remove.
12041 (all_object_files): New macro.
12042 Include .deps files.
12043 * aclocal.m4, configure: Rebuild.
12044 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12045 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12046 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12048 2012-12-05 Tom Tromey <tromey@redhat.com>
12051 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12053 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12055 * configure.ac: Check for linux/perf_event.h.
12056 * config.in: Regenerated.
12057 * configure: Regenerated.
12059 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12061 * hostio.c (handle_readlink): Decrease buffer size
12062 parameter passed to readlink by one byte.
12064 2012-11-26 Yao Qi <yao@codesourcery.com>
12066 * configure.ac (build_warnings): Append '-Wempty-body'.
12067 * configure: Regenerated.
12068 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12071 2012-11-15 Pierre Muller <muller@sourceware.org>
12073 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12074 * config.in: Regenerate.
12075 * configure: Regenerate.
12076 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12077 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12078 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12079 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12081 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12082 instead of <sys/wait.h> header.
12083 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12085 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12087 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12088 (various make rules): Remove -DGDBSERVER
12090 2012-11-09 Yao Qi <yao@codesourcery.com>
12092 * spu-low.c (current_ptid): Move it to ..
12093 * gdbthread.h: ... here. New.
12094 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12095 * server.c (myresume, process_serial_event): Likewise.
12096 * thread-db.c (thread_db_find_new_threads): Likewise.
12097 * tracepoint.c (run_inferior_command): Likewise.
12099 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12101 * server.c (handle_search_memory_1): Include access length in
12104 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12106 * linux-crisv32-low.c: Fix compile errors.
12108 2012-09-04 Yao Qi <yao@codesourcery.com>
12110 * tracepoint.c (cmd_qtsv): Adjust debug message.
12111 Don't check CUR_TPOINT.
12113 2012-08-28 Yao Qi <yao@codesourcery.com>
12115 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12116 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12117 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12118 Remove declarations of xmalloc, xreallloc, xstrdup and
12120 * Makefile.in (libiberty_h): New.
12121 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12122 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12124 2012-08-23 Yao Qi <yao@codesourcery.com>
12126 * server.h: Remove declaration of 'xsnprintf'.
12128 2012-08-22 Keith Seitz <keiths@redhat.com>
12130 * server.h: Include build-gnulib-gbserver/config.h.
12131 * gdbreplay.c: Likewise.
12133 2012-08-08 Doug Evans <dje@google.com>
12135 * Makefile.in (SFILES): Add gdb_vecs.c.
12136 (OBS): Add gdb_vecs.o.
12137 (gdb_vecs_h, host_defs_h): New variables.
12138 (thread-db.o): Add $(gdb_vecs_h) dependency.
12139 (gdb_vecs.o): New rule.
12140 * thread-db.c: #include "gdb_vecs.h".
12141 (thread_db_load_search): Use a vector to iterate over path elements.
12142 Handle text appearing after "$pdir".
12144 * configure.ac: Add check for strstr.
12145 * config.in: Regenerate.
12146 * configure: Regenerate.
12148 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12150 * hostio.c (handle_pread): If pread fails, fall back to attempting
12152 (handle_pwrite): Likewise for pwrite.
12154 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12156 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12157 between unsupported TYPE and unimplementable ADDR/LEN combination.
12158 (arm_insert_point): Act on new return value.
12160 2012-07-31 Pedro Alves <palves@redhat.com>
12162 * server.c (process_point_options): Only skip tokens if we find
12163 one that is unrecognized. Don't treat 'X' specially while
12164 skipping unrecognized tokens.
12166 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12168 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12169 to 4-byte-align HW breakpoint addresses for Thumb.
12171 2012-07-27 Yao Qi <yao@codesourcery.com>
12175 * server.h: Declare gdb_agent_about_to_close.
12176 * target.c (kill_inferior): Include "agent.h".
12177 New. Send command 'kill'.
12178 * target.h (kill_inferior): Removed macro.
12179 * tracepoint.c (gdb_agent_about_to_close): New.
12180 (gdb_agent_helper_thread): Handle command 'close'.
12181 Wait endlessly until the inferior stops.
12182 Install gdb_agent_remove_socket to atexit hook.
12183 (agent_socket_name): New static variable.
12184 (gdb_agent_socket_init): Replace local variable 'name' with
12185 'agent_socket_name'.
12186 (gdb_agent_remove_socket): New.
12188 2012-07-27 Yao Qi <yao@codesourcery.com>
12190 * server.c (process_point_options): Stop at 'X' when parsing.
12192 2012-07-19 Michael Eager <eager@eagercon.com>
12194 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12196 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12197 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12198 hardware breakpoint.
12200 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12202 * gdbserver/linux-low.c (initialize_low): Call
12203 linux_ptrace_init_warnings.
12205 2012-07-02 Doug Evans <dje@google.com>
12207 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12210 2012-07-02 Stan Shebs <stan@codesourcery.com>
12212 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12213 (ax.o): Add it to build rule.
12215 (OBS): Add format.o.
12216 (IPA_OBS): Add format.o.
12217 * server.c (handle_query): Claim support for breakpoint commands.
12218 (process_point_options): Add command case.
12219 (process_serial_event): Leave running if there are printfs in
12221 * mem-break.h (any_persistent_commands): Declare.
12222 (add_breakpoint_commands): Declare.
12223 (gdb_no_commands_at_breakpoint): Declare.
12224 (run_breakpoint_commands): Declare.
12225 * mem-break.c (struct point_command_list): New struct.
12226 (struct breakpoint): New field command_list.
12227 (any_persistent_commands): New function.
12228 (add_commands_to_breakpoint): New function.
12229 (add_breakpoint_commands): New function.
12230 (gdb_no_commands_at_breakpoint): New function.
12231 (run_breakpoint_commands): New function.
12232 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12234 * ax.c: Include format.h.
12235 (ax_printf): New function.
12236 (gdb_eval_agent_expr): Add printf opcode.
12238 2012-06-13 Yao Qi <yao@codesourcery.com>
12240 * server.c (start_inferior): Remove duplicated writes to fields
12241 'last_resume_kind' and 'last_status' of 'current_inferior'.
12243 2012-06-12 Yao Qi <yao@codesourcery.com>
12244 Pedro Alves <palves@redhat.com>
12246 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12248 * server.c (handle_v_cont): Extend comment.
12250 2012-06-11 Yao Qi <yao@codesourcery.com>
12252 * linux-low.c (linux_attach): Add 'static'.
12254 2012-06-06 Yao Qi <yao@codesourcery.com>
12256 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12258 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12260 Fix gcc -flto compilation warning.
12261 * server.c (main): Make variable multi_mode and attach volatile.
12263 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12265 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12266 if the platform doesn't know about it.
12268 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12270 * Makefile.in (SFILES): Add linux-tile-low.c.
12271 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12272 * configure.srv: Handle tilegx-*-linux*.
12273 * linux-tile-low.c: New file.
12275 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12277 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12279 2012-05-24 Pedro Alves <palves@redhat.com>
12283 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12285 2012-05-24 Pedro Alves <palves@redhat.com>
12289 Replace target_signal with gdb_signal throughout.
12291 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12293 * linux-low.c (linux_store_registers): Avoid the copying sequence
12294 when no data has been retrieved by ptrace.
12296 2012-05-22 Will Deacon <will.deacon@arm.com>
12298 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12299 Include asm/ptrace.h.
12300 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12303 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12305 * linux-low.c (linux_store_registers): Don't re-retrieve data
12306 with ptrace that has already been obtained from /proc. Always
12307 copy any data retrieved with ptrace to the buffer supplied.
12309 2012-05-11 Yao Qi <yao@codesourcery.com>
12310 Pedro Alves <palves@redhat.com>
12312 * linux-low.c (enum stopping_threads_kind): New.
12313 (stopping_threads): Change type to `enum stopping_threads_kind'.
12314 (handle_extended_wait): If stopping and suspending threads, leave
12315 the new_lwp suspended too.
12316 (linux_wait_for_event): Adjust.
12317 (stop_all_lwps): Set `stopping_threads' to
12318 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12319 whether we're suspending threads or just stopping them. Assert no
12322 2012-04-29 Yao Qi <yao@codesourcery.com>
12324 * server.h: Move some code to ...
12325 * gdbthread.h: ... here. New.
12326 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12327 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12328 (nto-low.o, win32-low.o): Likewise.
12329 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12330 * regcache.c, remote-utils.c, server.c: Likewise.
12331 * target.c, tracepoint.c, win32-low.c: Likewise.
12333 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12335 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12336 (PTRACE_ARG4_TYPE): Likewise.
12337 (PTRACE_XFER_TYPE): Likewise.
12338 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12339 ptrace to PTRACE_ARG3_TYPE.
12340 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12341 (PTRACE_ARG4_TYPE): Likewise.
12342 (PTRACE_XFER_TYPE): Likewise.
12343 (linux_detach_one_lwp): Cast fourth argument of
12344 ptrace to long then PTRACE_ARG4_TYPE.
12345 (regsets_fetch_inferior_registers): Cast third argument of
12346 ptrace to long then PTRACE_ARG3_TYPE.
12347 (regsets_store_inferior_registers): Likewise.
12349 2012-04-20 Pedro Alves <palves@redhat.com>
12351 * configure: Regenerate.
12353 2012-04-19 Pedro Alves <palves@redhat.com>
12355 * Makefile.in (GNULIB_BUILDDIR): New.
12356 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12357 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12358 (all, install-only, uninstall, clean-info, all-lib, clean): No
12359 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12360 (maintainer-clean realclean distclean): Use subdir_do.
12362 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12363 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12364 * acinclude.m4: Include acx_configure_dir.m4.
12365 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12366 calls. Call AC_PROG_RANLIB. Configure gnulib using
12369 (GNULIB_STDINT_H): Adjust.
12370 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12371 * gdbreplay.c: Include build-gnulib/config.h.
12372 * server.h: Likewise.
12373 * aclocal.m4: Regenerate.
12374 * config.in: Regenerate.
12375 * configure: Regenerate.
12377 2012-04-19 Pedro Alves <palves@redhat.com>
12379 * Makefile.in (LIBGNU, INCGNU): Adjust.
12380 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12381 (all, install-only, uninstall, clean-info, all-lib, clean)
12382 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12383 * configure.ac: Adjust AC_OUTPUT output.
12384 * aclocal.m4: Regenerate.
12385 * configure: Regenerate.
12387 2012-04-19 Pedro Alves <palves@redhat.com>
12389 * Makefile.in (generated_files): New.
12390 (server_h): Remove the explicit dependency on config.h, and depend
12391 on $generated_files.
12393 2012-04-19 Pedro Alves <palves@redhat.com>
12395 * Makefile.in (INCGNU): Add -Ignulib.
12397 2012-04-19 Pedro Alves <palves@redhat.com>
12399 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12400 (INCGNU): ... this, and spell out -I here.
12401 (GNULIB_LIB): Rename to ...
12402 (LIBGNU): ... this.
12403 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12405 2012-04-19 Pedro Alves <palves@redhat.com>
12407 * config.in: Regenerate.
12409 2012-04-19 Pedro Alves <palves@redhat.com>
12411 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12412 * server.h (memmem): Remove declaration.
12413 * config.in: Regenerate.
12414 * configure: Regenerate.
12416 2012-04-19 Yao Qi <yao@codesourcery.com>
12418 * Makefile.in (SFILES): Add common/vec.c.
12422 2012-04-19 Yao Qi <yao@codesourcery.com>
12424 * remote-utils.c (prepare_resume_reply): Replace with macro
12425 target_core_of_thread.
12426 * server.c (handle_qxfer_threads_proper): Likewise.
12427 * target.h (traget_core_of_thread): New macro.
12429 2012-04-18 Pedro Alves <palves@redhat.com>
12431 * aclocal.m4: Regenerate.
12432 * configure: Regenerate.
12434 2012-04-16 Yao Qi <yao@codesourcery.com>
12436 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12437 duplicated on address.
12439 2012-04-16 Yao Qi <yao@codesourcery.com>
12441 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12442 (struct tracepoint_action_ops) <send>: New field.
12443 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12444 (agent_expr_send, x_tracepoint_action_send): New.
12445 (l_tracepoint_action_send): New.
12446 (cmd_qtdp): Download and install tracepoint
12447 according to `use_agent'.
12448 (run_inferior_command): Add one more parameter `len'.
12450 (tracepoint_send_agent): New.
12451 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12453 2012-04-16 Yao Qi <yao@codesourcery.com>
12455 * tracepoint.c (download_tracepoints): Moved to ...
12456 (cmd_qtstart): ... here.
12458 2012-04-14 Yao Qi <yao@codesourcery.com>
12460 * tracepoint.c: Include inttypes.h.
12461 (struct collect_memory_action): Use sized types.
12462 (struct tracepoint): Likewise.
12463 (cmd_qtdp, stop_tracing): Update print specifiers.
12464 (cmd_qtp, response_tracepoint): Likewise.
12465 (collect_data_at_tracepoint): Likewise.
12466 (collect_data_at_step): Likewise.
12468 2012-04-14 Yao Qi <yao@codesourcery.com>
12470 Import gnulib module inttypes.
12471 * aclocal.m4, config.in, configure: Regenerated.
12473 2012-04-14 Yao Qi <yao@codesourcery.com>
12475 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12476 Makefile and config.status at last.
12478 2012-04-13 Yao Qi <yao@codesourcery.com>
12480 * tracepoint.c: Include stdint.h unconditionally.
12482 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12484 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12485 on BFD_HAVE_SYS_PROCFS_TYPE.
12486 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12487 * configure: Regenerate.
12488 * config.in: Likewise.
12490 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12492 * Makefile.in (clean): Also remove x32.c x32-linux.c
12493 x32-avx.c x32-avx-linux.c.
12494 (x32.o): New target.
12496 (x32-linux.o): Likewise.
12497 (x32-linux.c): Likewise.
12498 (x32-avx.o): Likewise.
12499 (x32-avx.c): Likewise.
12500 (x32-avx-linux.o): Likewise.
12501 (x32-avx-linux.c): Likewise.
12503 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12504 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12505 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12506 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12507 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12508 i386/x32-avx-linux.xml.
12510 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12511 (init_registers_x32_avx_linux): Likwise.
12512 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12513 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12515 2012-04-13 Pedro Alves <palves@redhat.com>
12517 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12518 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12519 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12520 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12523 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12525 * linux-x86-low.c (compat_x32_clock_t): New.
12526 (compat_x32_siginfo_t): Likewise.
12527 (compat_x32_siginfo_from_siginfo): Likewise.
12528 (siginfo_from_compat_x32_siginfo): Likewise.
12529 (linux_is_elf64): Likewise.
12530 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12531 and siginfo_from_compat_x32_siginfo for x32.
12532 (x86_arch_setup): Set linux_is_elf64.
12534 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12537 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12539 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12540 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12541 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12542 compatible with process.
12544 2012-04-12 Yao Qi <yao@codesourcery.com>
12546 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12547 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12548 (install-only, install-info, clean): Handle sub dir gnulib.
12549 (all-lib, am--refresh): New targets.
12550 (memmem.o): Remove target.
12551 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12552 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12553 (AC_REPLACE_FUNCS): Remove memmem.
12554 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12555 (AC_OUTPUT): Generate Makefile in gnulib/.
12556 * aclocal.m4, config.in, configure: Regenerated.
12558 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12560 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12562 2012-04-05 Pedro Alves <palves@redhat.com>
12564 -Werror=strict-aliasing
12566 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12569 2012-04-04 Pedro Alves <palves@redhat.com>
12571 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12572 (sparc_store_gregset_from_stack, sparc_store_gregset)
12573 (sparc_breakpoint_at): Fix formatting.
12575 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12577 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12579 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12580 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12581 * config.in: Regenerate.
12582 * configure: Likewise.
12584 2012-03-29 Pedro Alves <palves@redhat.com>
12586 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12587 Correct ptrace arguments.
12589 2012-03-28 Pedro Alves <palves@redhat.com>
12591 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12592 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12593 (IA64_FR1_REGNUM): New defines.
12594 (ia64_fetch_register): New.
12595 (the_low_target): Install it.
12596 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12598 * linux-low.c (linux_fetch_registers): Try the
12599 the_low_target.fetch_register hook first.
12601 * linux-arm-low.c (the_low_target): Adjust.
12602 * linux-bfin-low.c (the_low_target): Adjust.
12603 * linux-cris-low.c (the_low_target): Adjust.
12604 * linux-crisv32-low.c (the_low_target): Adjust.
12605 * linux-m32r-low.c (the_low_target): Adjust.
12606 * linux-m68k-low.c (the_low_target): Adjust.
12607 * linux-mips-low.c (the_low_target): Adjust.
12608 * linux-ppc-low.c (the_low_target): Adjust.
12609 * linux-s390-low.c (the_low_target): Adjust.
12610 * linux-sh-low.c (the_low_target): Adjust.
12611 * linux-sparc-low.c (the_low_target): Adjust.
12612 * linux-tic6x-low.c (the_low_target): Adjust.
12613 * linux-x86-low.c (the_low_target): Adjust.
12614 * linux-xtensa-low.c (the_low_target): Adjust.
12616 2012-03-26 Pedro Alves <palves@redhat.com>
12618 * server.c (handle_qxfer_libraries): Don't bail early if
12619 the_target->qxfer_libraries_svr4 is not NULL.
12621 2012-03-26 Pedro Alves <palves@redhat.com>
12623 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12625 2012-03-23 Pedro Alves <palves@redhat.com>
12627 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12628 "library-list-svr4" element's start tag when the the DSO list is
12631 2012-03-23 Pedro Alves <palves@redhat.com>
12633 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12634 a variable whose type size is the same as the inferior's pointer
12637 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12639 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12641 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12642 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12643 * linux-low.h: Include <signal.h>.
12644 (struct siginfo): Remove forward declaration.
12645 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12648 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12650 * .gitignore: Ignore more files.
12652 2012-03-19 Pedro Alves <palves@redhat.com>
12653 Jan Kratochvil <jan.kratochvil@redhat.com>
12655 * server.c (cont_thread, general_thread): Add describing comments.
12656 (start_inferior): Clear `cont_thread'.
12657 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12660 2012-03-15 Yao Qi <yao@codesourcery.com>
12662 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12664 (cmd_qtdp): ... here.
12666 2012-03-15 Yao Qi <yao@codesourcery.com>
12668 * tracepoint.c (struct tracepoint_action_ops): New.
12669 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12670 (m_tracepoint_action_download): New.
12671 (r_tracepoint_action_download): New.
12672 (x_tracepoint_action_download): New.
12673 (l_tracepoint_action_download): New.
12674 (add_tracepoint_action): Install `action->ops' according type.
12675 (download_tracepoint_1): Move code `download' function pointer
12676 of various tracepoint_action_ops.
12678 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12680 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12681 linux_ptrace_attach_warnings.
12683 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12685 * Makefile.in (linux-ptrace.o): New.
12686 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12687 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12688 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12689 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12690 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12692 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12694 2012-03-08 Yao Qi <yao@codesourcery.com>
12695 Pedro Alves <palves@redhat.com>
12697 Fix PR server/13392.
12698 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12699 offset of JMP insn.
12700 * tracepoint.c (remove_tracepoint): New.
12701 (cmd_qtdp): Call remove_tracepoint when failed to install.
12703 2012-03-07 Pedro Alves <palves@redhat.com>
12705 * linux-low.c (get_detach_signal): New.
12706 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12707 Pass on pending signals to PTRACE_DETACH. Check the result of the
12709 * server.c (program_signals, program_signals_p): New.
12710 (handle_general_set): Handle QProgramSignals.
12711 * server.h (program_signals, program_signals_p): Declare.
12713 2012-03-05 Pedro Alves <palves@redhat.com>
12714 Jan Kratochvil <jan.kratochvil@redhat.com>
12716 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12719 2012-03-03 Yao Qi <yao@codesourcery.com>
12721 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12722 agent_look_up_symbols.
12724 2012-03-03 Yao Qi <yao@codesourcery.com>
12726 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12727 (linux-x86-low.o): Likewise.
12728 * server.h: Remove in_process_agent_loaded.
12729 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12733 2012-03-03 Yao Qi <yao@codesourcery.com>
12735 * tracepoint.c (gdb_agent_capability): New global.
12736 (in_process_agent_loaded_ust): Renamed to
12737 `in_process_agent_supports_ust'.
12739 (in_process_agent_supports_ust): Call agent_capability_check.
12740 (clear_installed_tracepoints): Assert that agent supports
12743 2012-03-03 Yao Qi <yao@codesourcery.com>
12745 * linux-low.c (linux_supports_agent): New.
12746 (linux_target_ops): Initialize field `supports_agent' with
12747 linux_supports_agent.
12748 * target.h (struct target_ops) <supports_agent>: New.
12749 (target_supports_agent): New macro.
12750 * server.c (handle_general_set): Handle packet 'QAgent'.
12751 (handle_query): Send `QAgent+'.
12752 * Makefile.in (server.o): Depends on agent.h.
12754 2012-03-03 Yao Qi <yao@codesourcery.com>
12756 * Makefile.in (OBS): Add agent.o.
12757 Add new rule for agent.o.
12758 Track dependence of tracepoint.c on agent.h.
12759 * tracepoint.c (run_inferior_command_1):
12760 (run_inferior_command): Call agent_run_command.
12761 (gdb_ust_connect_sync_socket): Deleted. Move it to
12763 (resume_thread, stop_thread): Likewise.
12764 (gdb_ust_socket_init): Renamed to ...
12765 (gdb_agent_socket_init): ... New.
12766 (gdb_ust_thread): Renamed to ...
12767 (gdb_agent_helper_thread): ... New.
12768 (gdb_ust_init): Move some code to ...
12769 (gdb_agent_init): ... here. New.
12770 [HAVE_UST]: Call gdb_ust_init.
12771 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12772 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12773 * config.in, configure: Regenerated.
12775 2012-03-02 Pedro Alves <palves@redhat.com>
12777 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12778 * linux-low.c (struct simple_pid_list): New.
12779 (stopped_pids): New a struct simple_pid_list pointer.
12780 (add_to_pid_list, pull_pid_from_list): New.
12781 (handle_extended_wait): Don't assume the first signal new children
12782 report is SIGSTOP. Adjust call to pull_pid_from_list.
12783 (linux_wait_for_lwp): Adjust.
12785 2012-03-02 Yao Qi <yao@codesourcery.com>
12787 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12790 2012-03-02 Yao Qi <yao@codesourcery.com>
12792 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12793 `stop_pc' and `tpoint'. Update caller.
12795 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12797 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12798 * linux-low.c (use_linux_regsets): New macro.
12799 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12800 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12801 (linux_register_in_regsets): New function.
12802 (usr_fetch_inferior_registers): Skip registers covered by
12804 (usr_store_inferior_registers): Likewise.
12805 (usr_fetch_inferior_registers): New macro.
12806 (usr_store_inferior_registers): Likewise.
12807 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12808 (linux_store_registers): Likewise.
12809 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12811 (init_registers_mips64_dsp_linux): Likewise.
12812 (init_registers_mips_linux): New macro.
12813 (init_registers_mips_dsp_linux): Likewise.
12814 (mips_dsp_num_regs): Likewise.
12815 (DSP_BASE, DSP_CONTROL): New fallback macros.
12816 (mips_base_regs): New macro.
12817 (mips_regmap): Use it. Fix the size.
12818 (mips_dsp_regmap): New variable.
12819 (mips_dsp_regset_bitmap): Likewise.
12820 (mips_arch_setup): New function.
12821 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12823 (mips_cannot_store_register): Likewise.
12824 (the_low_target): Update .arch_setup, .num_regs and .regmap
12825 initializers. Add .regset_bitmap initializer.
12826 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12828 * linux-bfin-low.c (the_low_target): Likewise.
12829 * linux-cris-low.c (the_low_target): Likewise.
12830 * linux-crisv32-low.c (the_low_target): Likewise.
12831 * linux-ia64-low.c (the_low_target): Likewise.
12832 * linux-m32r-low.c (the_low_target): Likewise.
12833 * linux-m68k-low.c (the_low_target): Likewise.
12834 * linux-ppc-low.c (the_low_target): Likewise.
12835 * linux-s390-low.c (the_low_target): Likewise.
12836 * linux-sh-low.c (the_low_target): Likewise.
12837 * linux-sparc-low.c (the_low_target): Likewise.
12838 * linux-tic6x-low.c (the_low_target): Likewise.
12839 * linux-x86-low.c (the_low_target): Likewise.
12840 * linux-xtensa-low.c (the_low_target): Likewise.
12841 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12842 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12843 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12845 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12846 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12848 2012-02-29 Yao Qi <yao@codesourcery.com>
12849 Pedro Alves <palves@redhat.com>
12851 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12852 `step_over_finished' is true.
12854 2012-02-27 Pedro Alves <palves@redhat.com>
12856 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12857 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12859 2012-02-27 Pedro Alves <palves@redhat.com>
12862 * linux-low.c (pid_is_stopped): New.
12863 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12865 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12867 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12870 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12872 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12874 2012-02-24 Luis Machado <lgustavo@codesourcery>
12876 * server.c (handle_query): Advertise support for target-side
12877 breakpoint condition evaluation.
12878 (process_point_options): New function.
12879 (process_serial_event): When inserting a breakpoint, check for
12880 a target-side condition that should be evaluated.
12882 * mem-break.c: Include regcache.h and ax.h.
12883 (point_cond_list_t): New data structure.
12884 (breakpoint) <cond_list>: New field.
12885 (find_gdb_breakpoint_at): Make non-static.
12886 (delete_gdb_breakpoint_at): Clear any target-side
12888 (clear_gdb_breakpoint_conditions): New function.
12889 (add_condition_to_breakpoint): Likewise.
12890 (add_breakpoint_condition): Likewise.
12891 (gdb_condition_true_at_breakpoint): Likewise.
12892 (gdb_breakpoint_here): Return result directly instead
12893 of going through a local variable.
12895 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12896 (clear_gdb_breakpoint_conditions): Likewise.
12897 (add_breakpoint_condition): Likewise.
12898 (gdb_condition_true_at_breakpoint): Likewise.
12900 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12901 (need_step_over_p): Take target-side breakpoint condition into
12904 2012-02-24 Luis Machado <lgustavo@codesourcery>
12906 * server.h: Include tracepoint.h.
12907 (agent_mem_read, agent_get_trace_state_variable_value,
12908 agent_set_trace_state_variable_value,
12909 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12910 get_set_tsv_func_addr): New prototypes.
12912 * ax.h: New include file.
12913 * ax.c: New source file.
12915 * tracepoint.c: Include ax.h.
12916 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12917 agent_expr, eval_result_type): Move to ax.h.
12918 (parse_agent_expr): Rename to ...
12919 (gdb_parse_agent_expr): ... this, make it non-static and move
12921 (unparse_agent_expr) Rename to ...
12922 (gdb_unparse_agent_expr): ... this, make it non-static and move
12924 (eval_agent_expr): Rename to ...
12925 (eval_tracepoint_agent_expr): ... this.
12926 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12927 forward declarations.
12928 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12929 (agent_get_trace_state_variable_value): New function.
12930 (agent_set_trace_state_variable_value): New function.
12931 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12932 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12933 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12934 (condition_true_at_tracepoint): Likewise.
12935 (parse_agent_expr): Rename to ...
12936 (gdb_parse_agent_expr): ... this and move to ax.c.
12937 (unparse_agent_expr): Rename to ...
12938 (gdb_unparse_agent_expr): ... this and move to ax.c.
12939 (gdb_agent_op_name): Move to ax.c.
12940 (eval_agent_expr): Rename to ...
12941 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12943 (eval_tracepoint_agent_expr): New function.
12944 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12946 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12948 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12949 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12950 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12951 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12952 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12953 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12954 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12955 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12956 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12957 (compile_bytecodes): Remove forward declaration.
12958 (is_goto_target): Move to ax.c.
12959 (compile_bytecodes): Move to ax.c and call
12960 agent_get_trace_state_variable_value (...) and
12961 agent_set_trace_state_variable_value (...).
12963 * Makefile.in: Update ax.c and IPA dependencies.
12965 2012-02-24 Pedro Alves <palves@redhat.com>
12967 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12968 (cmd_bigqtbuffer_circular): ... this. Only handle
12969 'QTBuffer:circular:'.
12970 (handle_tracepoint_general_set): Adjust.
12972 2012-02-16 Yao Qi <yao@codesourcery.com>
12974 * inferiors.c: Move code to ...
12975 * dll.c: .... here. New.
12976 * server.h: Declare clear_dlls.
12977 * Makefile.in (SFILES): Add dll.c.
12981 2012-02-11 Yao Qi <yao@codesourcery.com>
12983 * server.c: (handle_monitor_command): Add a new parameter
12985 (handle_query): Update caller.
12987 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12989 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12990 * configure, config.in: Regenerate.
12991 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12994 2012-02-02 Pedro Alves <palves@redhat.com>
12996 Try SIGKILL first, then PTRACE_KILL.
12997 * linux-low.c (linux_kill_one_lwp): New.
12998 (linux_kill_one_lwp): Rename to ...
12999 (kill_one_lwp_callback): ... this. Use the new
13000 linux_kill_one_lwp.
13002 2012-02-02 Pedro Alves <palves@redhat.com>
13004 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13007 2012-01-27 Pedro Alves <palves@redhat.com>
13009 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13010 (elf_64_file_p): Make static.
13011 (linux_pid_exe_is_elf_64_file): New.
13012 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13013 Delete declarations.
13014 (linux_pid_exe_is_elf_64_file): Declare.
13015 * linux-x86-low.c (x86_arch_setup): Use
13016 linux_pid_exe_is_elf_64_file.
13018 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13020 * linux-low.c (linux_wait_for_event_1): Rename to ...
13021 (linux_wait_for_event): ... here and merge it with former
13022 linux_wait_for_event - new variable wait_ptid, use it.
13023 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13025 2012-01-23 Pedro Alves <palves@redhat.com>
13027 * server.c (main): Avoid yet another case of infinite loop while
13028 detaching/killing after a longjmp.
13030 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13033 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13035 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13037 * hostio.c (handle_readlink): New function.
13038 (handle_vFile): Call it to handle "vFile:readlink" packets.
13040 2012-01-20 Pedro Alves <palves@redhat.com>
13041 Ulrich Weigand <ulrich.weigand@linaro.org>
13043 * server.c (handle_v_requests): Only support vAttach and vRun to
13044 start multiple processes when in extended protocol mode.
13046 2012-01-17 Pedro Alves <palves@redhat.com>
13048 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13049 memalign plus mprotect to allocate the scratch buffer.
13051 2012-01-13 Pedro Alves <palves@redhat.com>
13053 * server.c (attach_inferior): Clear `cont_thread'.
13055 2012-01-13 Pedro Alves <palves@redhat.com>
13057 * server.c (main): Avoid infinite loop while detaching/killing
13060 2012-01-09 Doug Evans <dje@google.com>
13062 * server.c (start_inferior): Set last_ptid in --wrapper case.
13064 2012-01-06 Yao Qi <yao@codesourcery.com>
13066 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13068 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13070 2012-01-04 Yao Qi <yao@codesourcery.com>
13072 * tracepoint.c (cmd_qtdp): Print debug message
13073 for static tracepoint.
13075 2012-01-04 Yao Qi <yao@codesourcery.com>
13077 * tracepoint.c (trace_vdebug): Differentiate debug message
13078 between gdbserver and IPA.
13080 2012-01-03 Yao Qi <yao@codesourcery.com>
13082 * tracepoint.c (tracepoint_was_hit): Don't collect for
13085 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13087 * terminal.h: Reformat copyright header.
13089 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13091 * server.c (gdbserver_version): Update copyright year.
13092 * gdbreplay.c (gdbreplay_version): Likewise.
13094 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13096 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13099 2011-12-18 Hui Zhu <teawater@gmail.com>
13100 * linux-low.c (linux_create_inferior): Save return value to ret.
13102 2011-12-18 Hui Zhu <teawater@gmail.com>
13104 * linux-low.c (linux_create_inferior): Save return value to ret.
13106 2011-12-16 Doug Evans <dje@google.com>
13108 * linux-low.c (linux_create_inferior): If stdio connection,
13109 redirect stdin from /dev/null, stdout to stderr.
13110 * remote-utils.c (remote_is_stdio): New static global.
13111 (remote_connection_is_stdio): New function.
13112 (remote_prepare): Handle stdio connection.
13113 (remote_open): Ditto.
13114 (remote_close): Don't close stdin for stdio connections.
13115 (read_prim,write_prim): New functions. Replace all calls to
13116 read/write to these.
13117 * server.c (main): Watch for "-" argument. Move call to
13118 remote_prepare before start_inferior.
13119 * server.h (STDIO_CONNECTION_NAME): New macro.
13120 (remote_connection_is_stdio): Declare.
13122 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13123 in debugging output.
13125 2011-12-15 Yao Qi <yao@codesourcery.com>
13127 * tracepoint.c: Include sys/syscall.h.
13128 (gdb_ust_thread): Remove preprocessor conditional.
13130 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13132 * linux-low.c (linux_detach_one_lwp): Call
13133 the_low_target.prepare_to_resume before detaching.
13135 2011-12-14 Yao Qi <yao@codesourcery.com>
13137 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13140 2011-12-14 Yao Qi <yao@codesourcery.com>
13142 * i386-low.c (i386_low_stopped_data_address): Initialize local
13143 variable `control'.
13145 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13149 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13150 DR_CONTROL unless necessary. Extend comments.
13151 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13152 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13154 2011-12-13 Yao Qi <yao@codesourcery.com>
13156 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13158 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13160 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13162 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13163 Print new debug message for such case.
13165 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13167 Fix overlapping memcpy.
13168 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13169 the read_inferior_memory transfer.
13170 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13171 write_inferior_memory transfer.
13172 (set_fast_tracepoint_jump): New variable buf. Use it for the
13173 read_inferior_memory and write_inferior_memory transfers.
13174 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13175 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13176 Use it for the write_inferior_memory transfer.
13177 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13180 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13182 * linux-low.c (fetch_register, store_register): Make code
13183 consistent, fix formatting.
13185 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13187 * linux-low.c (usr_store_inferior_registers): Factor out code
13188 to handle individual registers into...
13189 (store_register): ... this new function.
13191 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13193 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13194 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13195 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13196 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13197 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13198 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13199 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13200 (srv_xmlfiles): Add new XML files.
13202 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13204 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13205 (init_registers_s390_linux32v1): Add prototype.
13206 (init_registers_s390_linux32v2): Likewise.
13207 (init_registers_s390_linux64v1): Likewise.
13208 (init_registers_s390_linux64v2): Likewise.
13209 (init_registers_s390x_linux64v1): Likewise.
13210 (init_registers_s390x_linux64v2): Likewise.
13211 (s390_num_regs): Increment to 52.
13212 (s390_regmap): Add orig_r2 register.
13213 (s390_num_regs_3264): Increment to 68.
13214 (s390_regmap_3264): Add orig_r2 register.
13215 (s390_collect_ptrace_register): Handle orig_r2 register.
13216 (s390_supply_ptrace_register): Likewise.
13217 (s390_fill_last_break): New function.
13218 (s390_store_last_break): Likewise.
13219 (s390_fill_system_call): New function.
13220 (s390_store_system_call): Likewise.
13221 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13223 (s390_check_regset): New function.
13224 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13225 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13226 Update target_regsets for available register sets.
13228 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13229 Jan Kratochvil <jan.kratochvil@redhat.com>
13231 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13232 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13234 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13235 * linux-low.h (struct process_info_private): New member r_debug.
13236 * server.c (handle_qxfer_libraries): Call
13237 the_target->qxfer_libraries_svr4.
13238 (handle_qxfer_libraries_svr4): New function.
13239 (qxfer_packets): New entry "libraries-svr4".
13240 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13241 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13242 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13243 PACKET_qXfer_libraries_svr4.
13245 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13247 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13248 PSW address/mask between 8-byte and 16-byte formats.
13249 (s390_supply_ptrace_register): Likewise.
13250 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13251 basic addressing mode bit.
13253 2011-11-24 Stan Shebs <stan@codesourcery.com>
13255 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13257 2011-11-17 Stan Shebs <stan@codesourcery.com>
13259 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13260 (tracing_start_time): New global.
13261 (tracing_stop_time): New global.
13262 (tracing_user_name): New global.
13263 (tracing_notes): New global.
13264 (tracing_stop_note): New global.
13265 (cmd_qtstart): Set traceframe_usage, start_time.
13266 (stop_tracing): Set stop_time.
13267 (cmd_qtstatus): Report additional status.
13268 (cmd_qtp): New function.
13269 (handle_tracepoint_query): Call it.
13270 (cmd_qtnotes): New function.
13271 (handle_tracepoint_general_set): Call it.
13272 (get_timestamp): Rename from tsv_get_timestamp.
13274 2011-11-14 Stan Shebs <stan@codesourcery.com>
13275 Kwok Cheung Yeung <kcy@codesourcery.com>
13277 * linux-x86-low.c (small_jump_insn): New.
13278 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13279 trampoline and error message, build a trampoline and issue a small
13280 jump instruction to it.
13281 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13282 trampoline and error message.
13283 (x86_get_min_fast_tracepoint_insn_len): New.
13284 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13285 * linux-low.h (struct linux_target_ops): Add arguments to
13286 install_fast_tracepoint_jump_pad operation, add new operation.
13287 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13289 (linux_get_min_fast_tracepoint_insn_len): New function.
13290 (linux_target_op): Add new operation.
13291 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13292 (gdb_trampoline_buffer_end): Ditto.
13293 (gdb_trampoline_buffer_error): Ditto.
13294 (struct ipa_sym_addresses): Add fields for new IPA variables.
13295 (symbol_list): Add entries for new IPA variables.
13296 (struct tracepoint): Add fields to hold the address range of the
13297 trampoline used by the tracepoint.
13298 (trampoline_buffer_head): New static variable.
13299 (trampoline_buffer_tail): Ditto.
13300 (claim_trampoline_space): New function.
13301 (have_fast_tracepoint_trampoline_buffer): New function.
13302 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13304 (install_fast_tracepoint): Ditto, also add error buffer argument.
13305 (cmd_qtminftpilen): New function.
13306 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13307 (fast_tracepoint_from_trampoline_address): New function.
13308 (fast_tracepoint_collecting): Handle trampoline as part of jump
13310 (set_trampoline_buffer_space): New function.
13311 (initialize_tracepoint): Initialize new IPA variables.
13312 * target.h (struct target_ops): Add arguments to
13313 install_fast_tracepoint_jump_pad operation, add new
13314 get_min_fast_tracepoint_insn_len operation.
13315 (target_get_min_fast_tracepoint_insn_len): New.
13316 (install_fast_tracepoint_jump_pad): Add arguments.
13317 * server.h (IPA_BUFSIZ): Define.
13318 * linux-i386-ipa.c: Include extra header files.
13319 (initialize_fast_tracepoint_trampoline_buffer): New function.
13320 (initialize_low_tracepoint): Call it.
13321 * server.h (set_trampoline_buffer_space): Declare.
13322 (claim_trampoline_space): Ditto.
13323 (have_fast_tracepoint_trampoline_buffer): Ditto.
13325 2011-11-14 Yao Qi <yao@codesourcery.com>
13327 * server.c (handle_query): Handle InstallInTrace for qSupported.
13328 * tracepoint.c (add_tracepoint): Sort list.
13329 (install_tracepoint, download_tracepoint): New.
13330 (cmd_qtdp): Call them to install and download tracepoints.
13331 (sort_tracepoints): Removed.
13332 (cmd_qtstart): Update.
13334 2011-11-14 Yao Qi <yao@codesourcery.com>
13336 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13337 * mem-break.h: Declare.
13338 * tracepoint.c (cmd_qtstart): Move some code to ...
13339 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13341 (download_tracepoints): Move some code to ...
13342 (download_tracepoint_1): ... here. New.
13344 2011-11-08 Yao Qi <yao@codesourcery.com>
13346 * remote-utils.c (relocate_instruction): A comment fix.
13348 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13350 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13351 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13352 dr_status_mirror and dr_control_mirror from debug_reg_state.
13353 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13354 (i386_initial_stuff): Remove use of deleted globals.
13355 (i386_get_thread_context, i386_set_thread_context,
13356 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13357 from debug_reg_state.
13359 2011-11-05 Yao Qi <yao@codesourcery.com>
13361 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13362 address as TPOINT's.
13364 2011-11-02 Stan Shebs <stan@codesourcery.com>
13366 * tracepoint.c (agent_mem_read_string): New function.
13367 (eval_agent_expr): Call it for tracenz.
13368 * server.c (handle_query): Report support for tracenz.
13370 2011-11-02 Yao Qi <yao@codesourcery.com>
13372 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13374 2011-11-02 Yao Qi <yao@codesourcery.com>
13376 * target.h: Fix a typo in comment.
13378 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13380 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13381 clobber the breakpoints' shadows with fast tracepoint jumps.
13382 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13383 * target.c (write_inferior_memory): Also pass MYADDR down to
13386 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13388 * configure.ac: Check support for personality routine.
13389 * configure: Regenerate.
13390 * config.in: Likewise.
13391 * linux-low.c: Include <sys/personality.h>.
13392 Define ADDR_NO_RANDOMIZE if necessary.
13393 (linux_create_inferior): Disable address space randomization when
13394 forking inferior, if requested.
13395 (linux_supports_disable_randomization): New function.
13396 (linux_target_ops): Install it.
13397 * server.h (disable_randomization): Declare.
13398 * server.c (disable_randomization): New global variable.
13399 (handle_general_set): Handle QDisableRandomization.
13400 (handle_query): Likewise for qSupported.
13401 (main): Support --disable-randomization and --no-disable-randomization
13402 command line arguments.
13403 * target.h (struct target_ops): Add supports_disable_randomization.
13404 (target_supports_disable_randomization): New macro.
13406 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13408 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13410 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13411 [!PT_GETDSBT] (target_loadmap): New definition.
13412 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13413 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13414 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13415 and PT_GETDSBT to LINUX_LOADMAP.
13416 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13417 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13419 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13421 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13422 (arm_linux_hwbp_cap): New static variable.
13423 (arm_linux_get_hwbp_cap): Replace by ...
13424 (arm_linux_init_hwbp_cap): ... this new function.
13425 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13426 (arm_linux_get_hw_watchpoint_count): Likewise.
13427 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13428 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13429 (arm_prepare_to_resume): Use perror_with_name instead of error.
13431 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13433 * linux-arm-low.c: Include <signal.h>.
13434 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13435 (struct arm_linux_hwbp_cap): New data type.
13436 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13437 (struct arm_linux_hw_breakpoint): New data type.
13438 (MAX_BPTS, MAX_WPTS): Define.
13439 (struct arch_process_info, struct arch_lwp_info): New data types.
13440 (arm_linux_get_hwbp_cap): New function.
13441 (arm_linux_get_hw_breakpoint_count): Likewise.
13442 (arm_linux_get_hw_watchpoint_count): Likewise.
13443 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13444 (arm_hwbp_control_initialize): Likewise.
13445 (arm_hwbp_control_is_enabled): Likewise.
13446 (arm_hwbp_control_is_initialized): Likewise.
13447 (arm_hwbp_control_disable): Likewise.
13448 (arm_linux_hw_breakpoint_equal): Likewise.
13449 (arm_linux_hw_point_initialize): Likewise.
13450 (struct update_registers_data): New data structure.
13451 (update_registers_callback: New function.
13452 (arm_insert_point): Likewise.
13453 (arm_remove_point): Likewise.
13454 (arm_stopped_by_watchpoint): Likewise.
13455 (arm_stopped_data_address): Likewise.
13456 (arm_new_process): Likewise.
13457 (arm_new_thread): Likewise.
13458 (arm_prepare_to_resume): Likewise.
13459 (the_low_target): Register arm_insert_point, arm_remove_point,
13460 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13461 arm_new_thread, and arm_prepare_to_resume.
13463 2011-09-15 Stan Shebs <stan@codesourcery.com>
13465 * server.h (struct emit_ops): Add compare-goto fields.
13466 * tracepoint.c (gdb_agent_op_sizes): New table.
13467 (emit_eq_goto): New function.
13468 (emit_ne_goto): New function.
13469 (emit_lt_goto): New function.
13470 (emit_le_goto): New function.
13471 (emit_gt_goto): New function.
13472 (emit_ge_goto): New function.
13473 (is_goto_target): New function.
13474 (compile_bytecodes): Recognize special cases of compare-goto
13475 combinations and call specialized emitters for them.
13476 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13477 (amd64_emit_ne_goto): New function.
13478 (amd64_emit_lt_goto): New function.
13479 (amd64_emit_le_goto): New function.
13480 (amd64_emit_gt_goto): New function.
13481 (amd64_emit_ge_goto): New function.
13482 (amd64_emit_ops): Add the new functions.
13483 (i386_emit_eq_goto): New function.
13484 (i386_emit_ne_goto): New function.
13485 (i386_emit_lt_goto): New function.
13486 (i386_emit_le_goto): New function.
13487 (i386_emit_gt_goto): New function.
13488 (i386_emit_ge_goto): New function.
13489 (i386_emit_ops): Add the new functions.
13491 2011-09-08 Stan Shebs <stan@codesourcery.com>
13493 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13494 (i386_emit_epilogue): Restore %ebx.
13496 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13498 * server.c (step_thread): Remove definition.
13499 (process_serial_event): Don't handle Hs.
13500 * server.h (step_thread): Remove declaration.
13501 * target.c (set_desired_inferior): Remove use of step_thread.
13503 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13505 * linux-low.c: Include linux-procfs.h.
13506 (linux_attach_lwp_1): Update comments.
13507 (linux_attach): Scan for existing threads when attaching to a
13508 process that is the tgid.
13509 * Makefile.in: Update dependencies.
13511 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13513 * configure.srv: Add linux-procfs.o dependencies.
13515 2011-08-14 Yao Qi <yao@codesourcery.com>
13517 * target.h (struct target_ops): Fix indent.
13518 * win32-low.c (win32_target_ops): Fix comment.
13520 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13521 Yao Qi <yao@codesourcery.com>
13523 * Makefile.in (clean): Remove tic6x-*.c files.
13524 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13525 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13526 (tic6x-c64xp-linux.c): Likewise.
13527 * configure.srv: Add support for tic6x-*-uclinux.
13528 * linux-tic6x-low.c: New.
13529 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13531 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13532 Yao Qi <yao@codesourcery.com>
13534 * target.h (struct target_ops): Add read_loadmap.
13535 * linux-low.c (struct target_loadseg): New type.
13536 (struct target_loadmap): New type.
13537 (linux_read_loadmap): New function.
13538 (linux_target_ops): Add linux_read_loadmap.
13539 * server.c (handle_query): Support qXfer:fdpic:read packet.
13540 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13543 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13545 * win32-low.c: Include <stdint.h>.
13547 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13549 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13550 to the inferior here.
13551 (i386_remove_aligned_watchpoint): Ditto.
13552 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13553 fit part of the watchpoint in the debug registers.
13554 (i386_update_inferior_debug_regs): New.
13555 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13556 registers, and only update the inferior on success.
13557 (i386_low_remove_watchpoint): Ditto.
13559 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13561 * linux-low.c (compare_ints, unique, list_threads, show_process,
13562 linux_core_of_thread): Delete.
13563 (linux_target_ops): Change linux_core_of_thread to
13564 linux_common_core_of_thread.
13565 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13566 * utils.c (malloc_failure): Change type of argument.
13567 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13568 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13569 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13570 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13571 (IPA_OBJS): Add common-utils-ipa.o.
13572 (ptid_h, linux_osdata_h): New macros.
13573 (server_h): Add common/common-utils.h, common/xml-utils.h,
13574 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13576 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13577 ptid.o, buffer.o): New rules.
13578 (linux-low.o): Add common/linux-osdata.h as a dependency.
13579 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13580 * configure.ac: Add AC_HEADER_DIRENT check.
13581 * config.in: Regenerate.
13582 * configure: Regenerate.
13583 * remote-utils.c (xml_escape_text): Delete.
13584 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13585 buffer_xml_printf): Move to common/buffer.c.
13586 * server.c (main): Remove call to initialize_inferiors.
13587 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13588 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13589 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13590 internal_error, gdb_assert, gdb_assert_fail): Delete.
13591 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13592 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13594 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13595 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13596 initialize_inferiors): Delete.
13598 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13600 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13603 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13605 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13607 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13609 2011-05-26 Yao Qi <yao@codesourcery.com>
13611 * Makefile.in (thread-db.o): Track dependence to
13612 common/gdb_thread_db.h.
13613 * thread-db.c: include gdb_thread_db.h from right place.
13615 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13617 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13618 __FILE__ and __LINE__ to internal_error.
13620 2011-05-13 Doug Evans <dje@google.com>
13622 * thread-db.c (try_thread_db_load_from_sdir): New function.
13623 (try_thread_db_load_from_dir): New function.
13624 (thread_db_load_search): Handle $sdir, ignore $pdir.
13625 Remove trying of system directories if search of
13626 libthread-db-search-path fails, that is now done via $sdir.
13628 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13630 * server.c (handle_query): Add EnableDisableTracepoints to the list
13631 of supported features.
13632 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13634 (cmd_qtenable_disable): New.
13635 (cmd_qtstart): Install tracepoints even if disabled.
13636 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13637 receiving a QTEnable or QTDisable packet.
13638 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13639 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13641 (gdb_probe): Skip data collection if static tracepoint is disabled.
13643 2011-05-10 Doug Evans <dje@google.com>
13645 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13647 2011-05-04 Doug Evans <dje@google.com>
13649 * linux-low.c (linux_join): Skip process lookup.
13650 * spu-low.c (spu_join): Ditto.
13651 * server.c (join_inferiors_callback): Delete.
13652 (process_serial_event): For 'D' packet (detach) call join_inferior
13655 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13657 * README: Don't mention xscale*-*-linux*.
13658 * configure.srv (xscale*-*-linux*): Don't handle target.
13660 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13662 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13664 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13665 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13666 (i386_emit_void_call_2): Likewise.
13668 2011-04-26 Yao Qi <yao@codesourcery.com>
13670 * linux-low.c: Move common macros to linux-ptrace.h.
13671 Include linux-ptrace.h.
13672 * Makefile.in (linux_ptrace_h): New.
13673 (linux-low.o): Depends on linux-ptrace.h.
13675 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13677 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13678 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13679 (remote_prepare): New function with most of the TCP code from ...
13680 (remote_open): ... here. Detect PORT here unconditionally. Move also
13681 setting transport_is_reliable.
13682 * server.c (run_once): New variable.
13683 (gdbserver_usage): Document it.
13684 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13685 the first run if RUN_ONCE.
13686 * server.h (run_once, remote_prepare): New declarations.
13688 2011-04-19 Tom Tromey <tromey@redhat.com>
13690 * win32-low.c (handle_load_dll): Remove duplicate "the".
13692 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13694 Remove support for old Cygwin 1.5 versions.
13695 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13696 function to avoid warning.
13697 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13700 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13702 * gdbserver/server.h (Macro _): Define it if not available.
13704 2011-03-14 Michael Snyder <msnyder@vmware.com>
13706 * hostio.c (handle_close): Remove unnecessary null test.
13708 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13710 * Makefile.in (maintainer-clean realclean distclean): Remove
13711 "make ... subdir_do" command.
13713 2011-03-10 Michael Snyder <msnyder@vmware.com>
13715 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13717 * server.c (handle_v_run): Free alloced buffer on early return.
13719 2011-03-09 Yao Qi <yao@codesourcery.com>
13722 2011-03-04 Yao Qi <yao@codesourcery.com>
13724 * Makefile.in: Remove GNU make feature --directory.
13726 2011-03-05 Yao Qi <yao@codesourcery.com>
13728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13729 (subdir_do): New make target. Copied from gdb/Makefile.
13730 (maintainer-clean, realclean, distclean, clean): Call corresponding
13731 make targets in common/Makefile.
13733 2011-02-11 Yao Qi <yao@codesourcery.com>
13735 * configure.ac: Call AC_PROG_RANLIB.
13736 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13737 * configure: Regenerate.
13739 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13741 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13743 2011-03-06 Yao Qi <yao@codesourcery.com>
13745 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13747 2011-03-05 Yao Qi <yao@codesourcery.com>
13749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13750 (subdir_do): New make target. Copied from gdb/Makefile.
13751 (maintainer-clean, realclean, distclean, clean): Call corresponding
13752 make targets in common/Makefile.
13754 2011-03-04 Yao Qi <yao@codesourcery.com>
13756 * Makefile.in: Remove GNU make feature --directory.
13758 2011-03-04 Michael Snyder <msnyder@vmware.com>
13760 * server.c (queue_stop_reply): Call xmalloc not malloc.
13762 2011-03-02 Michael Snyder <msnyder@vmware.com>
13764 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13766 2011-02-28 Michael Snyder <msnyder@vmware.com>
13768 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13769 (cmd_qtframe): Ditto.
13770 (cmd_qtbuffer): Ditto.
13771 (cmd_bigqtbuffer): Ditto.
13773 * utils.c (decimal2str): Initialize 'width' to nine, then
13774 don't mess with it.
13776 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13778 * hostio.c (require_data): Free *data, not data.
13780 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13782 * hostio.c (require_data): Use free, not xfree.
13784 2011-02-27 Michael Snyder <msnyder@vmware.com>
13786 * server.c (handle_query): Discard unused value.
13788 * hostio.c (require_data): Free malloc memory before returning
13791 2011-02-26 Michael Snyder <msnyder@vmware.com>
13793 * linux-low.c (list_threads): Call closedir for dirent.
13795 2011-02-27 Michael Snyder <msnyder@vmware.com>
13797 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13798 a case statement falls through.
13800 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13805 2011-02-26 Michael Snyder <msnyder@vmware.com>
13807 * utils.c (decimal2str): Eliminate dead code and dead param.
13808 (pulongest): Drop dead param from call to decimal2str.
13811 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13813 Revert the following patch (not approved yet):
13814 2011-02-21 Hui Zhu <teawater@gmail.com>
13815 * tracepoint.c (tp_printf): New function.
13816 (eval_agent_expr): Handle gdb_agent_op_printf.
13818 2011-02-21 Hui Zhu <teawater@gmail.com>
13820 * tracepoint.c (tp_printf): New function.
13821 (eval_agent_expr): Handle gdb_agent_op_printf.
13823 2011-02-18 Tom Tromey <tromey@redhat.com>
13825 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13826 (tracepoint.o): Likewise.
13827 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13828 (gdb_agent_op_names): Likewise.
13830 2011-02-18 Tom Tromey <tromey@redhat.com>
13832 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13833 gdb_agent_op_rot>: New constants.
13834 (gdb_agent_op_names): Add pick and roll.
13835 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13838 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13840 * aclocal.m4: Regenerated with aclocal-1.11.1.
13842 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13844 * server.c (handle_qxfer_traceframe_info): New.
13845 (qxfer_packets): Register "traceframe-info".
13846 (handle_query): Report support for qXfer:traceframe-info:read+.
13847 * tracepoint.c (match_blocktype): New.
13848 (traceframe_find_block_type): Rename to ...
13849 (traceframe_walk_blocks): ... this. Add callback filter argument,
13851 (traceframe_find_block_type): New, reimplemented on top of
13852 traceframe_walk_blocks.
13853 (build_traceframe_info_xml): New.
13854 (traceframe_read_info): New.
13855 * server.h (traceframe_read_info): Declare.
13857 2011-02-11 Yao Qi <yao@codesourcery.com>
13859 * configure.ac: Call AC_PROG_RANLIB.
13860 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13861 * configure: Regenerate.
13863 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13865 * server.c (gdb_read_memory): Change return semantics to allow
13867 (handle_search_memory_1): Adjust.
13868 (process_serial_event) <'m' packet>: Handle partial transfers.
13869 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13871 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13873 * regcache.c (init_register_cache): Initialize
13874 regcache->register_status.
13875 (free_register_cache): Release regcache->register_status.
13876 (regcache_cpy): Copy register_status.
13877 (registers_to_string): Print 'x's for unavailable registers.
13878 (supply_register): Mark the register's status valid or
13879 unavailable, depending on whether a buffer was passed in or not.
13880 (supply_register_zeroed): New.
13881 (supply_regblock): Mark the registers' status valid or
13882 unavailable, depending on whether a buffer was passed in or not.
13883 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13884 (struct regcache): New `register_status' field.
13885 (supply_register_zeroed): Declare.
13886 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13887 supply_register_zeroed, rather than passing a NULL buffer to
13889 * tracepoint.c (fetch_traceframe_registers): Update comment.
13891 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13893 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13896 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13898 * server.h (decode_xfer_write): Change prototype.
13899 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13900 and don't extract the annex here.
13901 * server.c (decode_xfer_read): Remove `annex' parameter,
13902 and don't extract the annex here.
13903 (decode_xfer): New.
13904 (struct qxfer): New.
13905 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13906 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13907 (handle_qxfer_statictrace): New functions, abstracted out from
13908 handle_query, and made to use the struct qxfer interface.
13909 (handle_threads_qxfer_proper): Rename to ...
13910 (handle_qxfer_threads_proper): ... this.
13911 (handle_threads_qxfer): Rename to ...
13912 (handle_qxfer_threads): ... this. Adjust.
13913 (qxfer_packets): New array.
13914 (handle_qxfer): New function.
13915 (handle_query): Use handle_qxfer.
13917 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13919 * gdbreplay.c: Shorten lines of >= 80 columns.
13920 * linux-low.c: Ditto.
13921 * linux-ppc-low.c: Ditto.
13922 * linux-s390-low.c: Ditto.
13923 * linux-sparc-low.c: Ditto.
13924 * linux-x86-low.c: Ditto.
13925 * linux-xtensa-low.c: Ditto.
13926 * mem-break.c: Ditto.
13927 * nto-low.c: Ditto.
13928 * regcache.h: Ditto.
13929 * remote-utils.c: Ditto.
13932 * thread-db.c: Ditto.
13933 * tracepoint.c: Ditto.
13935 * win32-low.h: Ditto.
13937 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13939 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13942 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13944 * server.c (gdbserver_version): Update copyright year in version
13946 * gdbreplay.c (gdbreplay_version): Ditto.
13948 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13950 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13951 * linux-bfin-low.c: New file.
13952 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13953 PT_DATA_ADDR for BFIN targets.
13954 * Makefile.in (SFILES): Add linux-bfin-low.c.
13955 (clean): Remove reg-bfin.c.
13956 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13957 * README: Mention supported Blackfin targets.
13959 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13961 * .gitignore: New file.
13963 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13965 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13967 2010-10-22 Jie Zhang <jie@codesourcery.com>
13969 * Makefile.in: Add FLAGS_TO_PASS variable.
13970 (install): Remove dependency of install-only and recursively
13971 invoke make for install-only.
13973 2010-10-04 Doug Evans <dje@google.com>
13975 * Makefile.in (uninstall): Use $(DESTDIR).
13977 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13981 * linux-x86-low.c (compat_siginfo_from_siginfo)
13982 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13983 si_code is < 0. Check for si_code == SI_TIMER before checking for
13986 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13988 * lynx-i386-low.c: New file.
13989 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13991 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13993 * lynx-low.c (ptrace_request_to_str): Remove handling for
13994 request values that have been removed in LynxOS 5.x.
13996 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13998 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14001 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14003 * configure.ac: Add --enable-inprocess-agent option.
14004 * configure: Rebuilt.
14006 2010-09-06 Yao Qi <yao@codesourcery.com>
14008 * linux-low.c (linux_kill): Remove unused variable.
14009 (linux_stabilize_threads): Likewise.
14010 * server.c (start_inferior): Likewise.
14011 (queue_stop_reply_callback): Likewise.
14012 * tracepoint.c (do_action_at_tracepoint): Likewise.
14014 2010-09-06 Yao Qi <yao@codesourcery.com>
14016 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14019 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14021 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14023 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14025 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14028 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14030 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14031 gdbserver/lynx-ppc-low.c: New files.
14032 * Makefile.in (lynx_low_h): New variable.
14033 (lynx-low.o, lynx-ppc-low.o): New rules.
14034 * configure.ac: On LynxOS, link with -lnetinet.
14035 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14036 * configure: regenerate.
14038 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14040 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14041 * configure.ac: Add check for vasprintf and vsnprintf.
14042 * configure, config.in: Regenerate.
14043 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14045 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14047 * gdbreplay.c: Move include of alloca.h up, next to include of
14049 * server.h: Add include of malloc.h.
14050 * mem-break.c: Remove include of malloc.h.
14051 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14053 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14055 * Makefile.in (memmem.o): Build with -Wno-error.
14057 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14059 * utils.c (xsnprintf): Make non-static.
14060 * server.h: Add xsnprintf declaration.
14061 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14062 replace calls to snprintf by calls to xsnprintf throughout.
14064 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14066 * configure.ac: Add configure check for alloca.
14067 * configure, config.in: Regenerate.
14068 * server.h: Include alloca.h if it exists.
14069 * gdbreplay.c: Include alloca.h if it exists.
14071 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14073 * linux-low.c (__SIGRTMIN): Define if not already defined.
14074 (linux_create_inferior): Check for __ANDROID__ rather than
14076 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14077 are already deferred.
14078 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14079 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14080 stopped and already has a pending signal to report.
14081 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14082 a pending signal to report or is moving out of a jump pad.
14083 (linux_init_signals): Check for __ANDROID__ rather than
14086 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14088 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14089 debug_threads check. Avoid a linear search when not doing debug
14092 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14094 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14095 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14096 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14097 (process_event): Change local fd's type to gdb_fildes_t.
14098 (create_file_handler): Adjust prototype.
14099 (delete_file_handler): Adjust prototype.
14100 (handle_file_event): Adjust prototype. Use pfildes.
14101 (create_file_event): Adjsut prototype.
14102 * remote-utils.c (remote_desc, listen_desc): Change type to
14104 * server.h: New gdb_fildes_t typedef.
14105 [USE_WIN32API]: Include winsock2.h.
14106 (delete_file_handler, add_file_handler): Adjust prototypes.
14107 (pfildes): Declare.
14108 * utils.c (pfildes): New.
14110 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14112 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14113 * configure: Regenerate.
14115 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14117 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14118 (linux_done_accessing_memory): ... this.
14119 (linux_target_ops): Adjust.
14120 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14121 * nto-low.c (nto_target_ops): Adjust comment.
14122 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14123 * spu-low.c (spu_target_ops): Adjust comment.
14124 * target.h (target_ops): Rename unprepare_to_access_memory field
14125 to done_accessing_memory.
14126 (unprepare_to_access_memory): Rename to ...
14127 (done_accessing_memory): ... this.
14129 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14131 * linux-low.c (linux_prepare_to_access_memory): New.
14132 (linux_unprepare_to_access_memory): New.
14133 (linux_target_ops): Install them.
14134 * server.c (read_memory): Rename to ...
14135 (gdb_read_memory): ... this. Use
14136 prepare_to_access_memory/prepare_to_access_memory.
14137 (write_memory): Rename to ...
14138 (gdb_write_memory): ... this. Use
14139 prepare_to_access_memory/prepare_to_access_memory.
14140 (handle_search_memory_1): Adjust.
14141 (process_serial_event): Adjust.
14142 * target.h (struct target_ops): New fields
14143 prepare_to_access_memory and unprepare_to_access_memory.
14144 (prepare_to_access_memory, unprepare_to_access_memory): New.
14145 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14146 prepare_to_access_memory/prepare_to_access_memory.
14147 * nto-low.c (nto_target_ops): Adjust.
14148 * spu-low.c (spu_target_ops): Adjust.
14149 * win32-low.c (win32_target_ops): Adjust.
14151 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14153 * Makefile.in (WARN_CFLAGS): Get it from configure.
14154 (WERROR_CFLAGS): New.
14155 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14156 * configure.ac: Introduce --enable-werror, which adds -Werror to
14157 the compiler command line. Enabled by default. Disable with
14158 --disable-werror. Add -Wdeclaration-after-statement
14159 Wpointer-arith and -Wformat-nonliteral to warning flags.
14160 * configure: Regenerate.
14162 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14164 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14166 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14168 * gdbreplay.c (remote_error): New.
14170 (expect): Use gdbchar. Check for error reading from GDB.
14171 Clarify sync error output.
14172 (play): Check for errors writing to GDB.
14173 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14174 * remote-utils.c (getpkt): Check for errors writing to the remote
14177 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14179 * linux-low.c (linux_wait_1): Move non-debugging code out of
14180 `debug_threads' control.
14182 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14184 * linux-low.c (linux_wait_1): Don't set last_status here.
14185 * server.c (push_event, queue_stop_reply_callback): Assert we're
14186 not pushing a TARGET_WAITKIND_IGNORE event.
14187 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14188 (myresume, handle_target_event): Set the thread's last_resume_kind
14189 and last_status from the target returned status.
14191 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14195 * linux-x86-low.c (update_debug_registers_callback): New.
14196 (i386_dr_low_set_addr): Use it.
14197 (i386_dr_low_get_addr): New.
14198 (i386_dr_low_set_control): Use update_debug_registers_callback.
14199 (i386_dr_low_get_control): New.
14200 (i386_dr_low_get_status): Adjust.
14201 * linux-low.c (linux_stop_lwp): New.
14202 * linux-low.h (linux_stop_lwp): Declare.
14204 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14205 argument instead of a i386_debug_reg_state.
14206 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14207 a i386_debug_reg_state.
14208 (i386_insert_aligned_watchpoint): Adjust.
14209 (i386_remove_aligned_watchpoint): Adjust.
14210 (i386_low_stopped_data_address): Read the debug registers from the
14211 inferior instead of from the mirrors.
14212 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14213 (i386_dr_low_get_addr): Declare.
14214 (i386_dr_low_get_control): Declare.
14215 (i386_dr_low_get_status): Change prototype.
14217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14218 (i386_dr_low_get_addr): New.
14219 (i386_dr_low_get_control): New.
14220 (i386_dr_low_get_status): Adjust prototype. Return
14222 (i386_initial_stuff): Clear dr_status_mirror and
14224 (i386_get_thread_context): Adjust.
14225 (i386_set_thread_context): Adjust.
14226 (i386_thread_added): Adjust.
14228 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14230 * linux-low.h (linux_thread_area): Delete declaration.
14232 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14234 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14235 after its termination.
14237 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14239 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14240 (gdb_wants_all_stopped): Delete.
14241 (linux_wait_1): Don't call them.
14242 * server.c (handle_v_cont): Tag all threads as want-stopped.
14243 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14244 stopped as "client-wants-stopped".
14246 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14248 * Makefile.in (signals_h): New.
14249 (server_h): Depend on it.
14250 (server.o): Don't depend on $(signals_def).
14251 (signals.o): Depend on $(signals_def).
14253 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14255 * Makefile.in (signals_def): New.
14256 (server_h): Append include/gdb/signals.h and signals_def.
14257 (server.o): Append signals_def.
14259 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14261 * server.c (handle_target_event): Use target_signal_to_host for
14262 resume_info.sig initialization.
14263 * target.h (struct thread_resume) <sig>: New comment.
14265 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14267 * server.c (handle_query): strcpy() the returned string from paddress()
14268 instead of sprintf().
14269 * utils.c (paddress): Return phex_nz().
14271 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14273 * server.c (handle_v_cont): Call mourn_inferior if process
14275 (myresume): Likewise.
14277 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14279 Static tracepoints, and integration with UST.
14281 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14282 * mem-break.c (uninsert_all_breakpoints)
14283 (reinsert_all_breakpoints): New.
14284 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14285 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14286 (gdb_agent_ust_loaded, helper_thread_id)
14287 (gdb_agent_helper_thread_id): New macros.
14288 (struct ipa_sym_addresses): Add addr_ust_loaded,
14289 addr_helper_thread_id, addr_cmd_buf.
14290 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14291 (in_process_agent_loaded_ust): New.
14292 (write_e_ust_not_loaded): New.
14293 (maybe_write_ipa_ust_not_loaded): New.
14294 (struct collect_static_trace_data_action): New.
14295 (enum tracepoint_type) <static_tracepoint>: New.
14296 (struct tracepoint) <handle>: Mention static tracepoints.
14297 (struct static_tracepoint_ctx): New.
14298 (CMD_BUF_SIZE): New.
14299 (add_tracepoint_action): Handle static tracepoint actions.
14300 (unprobe_marker_at): New.
14301 (clear_installed_tracepoints): Handle static tracepoints.
14302 (cmd_qtdp): Handle static tracepoints.
14303 (probe_marker_at): New.
14304 (cmd_qtstart): Handle static tracepoints.
14305 (response_tracepoint): Handle static tracepoints.
14306 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14307 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14308 (get_context_regcache): Handle static tracepoints.
14309 (do_action_at_tracepoint): Handle static tracepoint actions.
14310 (traceframe_find_block_type): Handle static trace data blocks.
14311 (traceframe_read_sdata): New.
14312 (download_tracepoints): Download static tracepoint actions.
14313 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14314 (GDB_PROBE_NAME): New.
14316 (GET_UST_SYM): New.
14319 (ust_marker_to_static_tracepoint): New.
14321 (collect_ust_data_at_tracepoint): New.
14322 (gdb_ust_probe): New.
14323 (UNIX_PATH_MAX, SOCK_DIR): New.
14324 (gdb_ust_connect_sync_socket): New.
14325 (resume_thread, stop_thread): New.
14326 (run_inferior_command): New.
14327 (init_named_socket): New.
14328 (gdb_ust_socket_init): New.
14329 (cstr_to_hexstr): New.
14331 (first_marker, next_marker): New.
14332 (response_ust_marker): New.
14333 (cmd_qtfstm, cmd_qtsstm): New.
14334 (unprobe_marker_at, probe_marker_at): New.
14335 (cmd_qtstmat, gdb_ust_thread): New.
14336 (gdb_ust_init): New.
14337 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14338 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14339 (ST_REGENTRY): New.
14340 (x86_64_st_collect_regmap): New.
14341 (X86_64_NUM_ST_COLLECT_GREGS): New.
14342 (AMD64_RIP_REGNUM): New.
14343 (supply_static_tracepoint_registers): New.
14344 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14345 (ST_REGENTRY): New.
14346 (i386_st_collect_regmap): New.
14347 (i386_NUM_ST_COLLECT_GREGS): New.
14348 (supply_static_tracepoint_registers): New.
14349 * server.c (handle_query): Handle qXfer:statictrace:read.
14350 <qSupported>: Report support for StaticTracepoints, and
14351 qXfer:statictrace:read features.
14352 * server.h (traceframe_read_sdata)
14353 (supply_static_tracepoint_registers): Declare.
14354 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14355 (unpack_varlen_hex): Include in IPA build.
14356 * Makefile.in (ustlibs, ustinc): New.
14357 (IPA_OBJS): Add remote-utils-ipa.o.
14358 ($(IPA_LIB)): Link -ldl and -lpthread.
14360 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14361 * config.in, configure: Regenerate.
14363 2010-06-20 Ian Lance Taylor <iant@google.com>
14364 Pedro Alves <pedro@codesourcery.com>
14366 * linux-x86-low.c (always_true): Delete.
14367 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14368 trying to fool the compiler with always_true.
14370 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14372 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14373 conditions in gdbserver.
14375 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14377 * spu-low.c (spu_read_memory): Wrap around local store limit.
14378 (spu_write_memory): Likewise.
14380 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14382 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14383 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14385 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14387 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14388 uses with LONGEST uses.
14390 2010-06-14 Stan Shebs <stan@codesourcery.com>
14391 Pedro Alves <pedro@codesourcery.com>
14395 * linux-x86-low.c: Include limits.h.
14397 (always_true): New.
14400 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14401 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14402 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14403 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14404 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14405 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14406 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14407 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14408 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14409 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14410 (amd64_emit_void_call_2): New.
14411 (amd64_emit_ops): New.
14412 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14413 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14414 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14415 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14416 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14417 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14418 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14419 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14420 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14421 (i386_emit_stack_adjust, i386_emit_int_call_1)
14422 (i386_emit_void_call_2): New.
14423 (i386_emit_ops): New.
14424 (x86_emit_ops): New.
14425 (the_low_target): Install x86_emit_ops.
14426 * server.h (struct emit_ops): New.
14427 (get_raw_reg_func_addr): Declare.
14428 (current_insn_ptr, emit_error): Declare.
14429 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14430 (set_trace_state_variable_value): New defines.
14431 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14432 addr_get_trace_state_variable_value and
14433 addr_set_trace_state_variable_value.
14434 (symbol_list): New fields for get_raw_reg,
14435 get_trace_state_variable_value and set_trace_state_variable_value.
14436 (condfn): New typedef.
14437 (struct tracepoint): New field `compiled_cond'.
14438 (do_action_at_tracepoint): Clear compiled_cond.
14439 (get_trace_state_variable_value, set_trace_state_variable_value):
14441 (condition_true_at_tracepoint): If there's a compiled condition,
14443 (current_insn_ptr, emit_error): New globals.
14444 (struct bytecode_address): New.
14445 (get_raw_reg_func_addr): New.
14446 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14447 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14448 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14449 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14450 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14451 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14452 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14453 (compile_tracepoint_condition, compile_bytecodes): New.
14454 * target.h (emit_ops): Forward declare.
14455 (struct target_ops): New field emit_ops.
14456 (target_emit_ops): New.
14457 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14458 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14459 * linux-low.c (linux_emit_ops): New.
14460 (linux_target_ops): Install it.
14461 * linux-low.h (struct linux_target_ops): New field emit_ops.
14463 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14465 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14466 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14468 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14469 Stan Shebs <stan@codesourcery.com>
14471 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14472 (all): Depend on $(extra_libraries).
14473 (install-only): Install the IPA.
14474 (IPA_OBJS, IPA_LIB): New.
14475 (clean): Remove the IPA lib.
14476 (IPAGENT_CFLAGS): New.
14477 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14478 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14479 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14480 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14481 * configure.ac: Check for atomic builtins support in the compiler.
14482 (IPA_DEPFILES, extra_libraries): Define.
14483 * configure.srv (ipa_obj): Add description.
14484 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14485 (i[34567]86-*-linux*): Set ipa_obj.
14486 (x86_64-*-linux*): Set ipa_obj.
14487 * linux-low.c (stabilizing_threads): New.
14488 (supports_fast_tracepoints): New.
14489 (linux_detach): Stabilize threads before detaching.
14490 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14491 the lwp is either not stabilizing, or is moving out of a jump pad.
14492 (linux_fast_tracepoint_collecting): New.
14493 (maybe_move_out_of_jump_pad): New.
14494 (enqueue_one_deferred_signal): New.
14495 (dequeue_one_deferred_signal): New.
14496 (linux_wait_for_event_1): If moving out of a jump pad, defer
14497 pending signals to later.
14498 (linux_stabilize_threads): New.
14499 (linux_wait_1): Check if threads need moving out of jump pads, and
14501 (stuck_in_jump_pad_callback): New.
14502 (move_out_of_jump_pad_callback): New.
14503 (lwp_running): New.
14504 (linux_resume_one_lwp): Handle moving out of jump pads.
14505 (linux_set_resume_request): Dequeue deferred signals.
14506 (need_step_over_p): Also step over fast tracepoint jumps.
14507 (start_step_over): Also uninsert fast tracepoint jumps.
14508 (finish_step_over): Also reinsert fast tracepoint jumps.
14509 (linux_install_fast_tracepoint_jump): New.
14510 (linux_target_ops): Install linux_stabilize_threads and
14511 linux_install_fast_tracepoint_jump_pad.
14512 * linux-low.h (linux_target_ops) <get_thread_area,
14513 install_fast_tracepoint_jump_pad>: New fields.
14514 (struct lwp_info) <collecting_fast_tracepoint,
14515 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14516 (linux_get_thread_area): Declare.
14517 * linux-x86-low.c (jump_insn): New.
14518 (x86_get_thread_area): New.
14519 (append_insns): New.
14520 (push_opcode): New.
14521 (amd64_install_fast_tracepoint_jump_pad): New.
14522 (i386_install_fast_tracepoint_jump_pad): New.
14523 (x86_install_fast_tracepoint_jump_pad): New.
14524 (the_low_target): Install x86_get_thread_area and
14525 x86_install_fast_tracepoint_jump_pad.
14526 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14527 (struct fast_tracepoint_jump): New.
14528 (fast_tracepoint_jump_insn): New.
14529 (fast_tracepoint_jump_shadow): New.
14530 (find_fast_tracepoint_jump_at): New.
14531 (fast_tracepoint_jump_here): New.
14532 (delete_fast_tracepoint_jump): New.
14533 (set_fast_tracepoint_jump): New.
14534 (uninsert_fast_tracepoint_jumps_at): New.
14535 (reinsert_fast_tracepoint_jumps_at): New.
14536 (set_breakpoint_at): Use write_inferior_memory.
14537 (uninsert_raw_breakpoint): Use write_inferior_memory.
14538 (check_mem_read): Mask out fast tracepoint jumps.
14539 (check_mem_write): Mask out fast tracepoint jumps.
14540 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14541 (set_fast_tracepoint_jump): Declare.
14542 (delete_fast_tracepoint_jump)
14543 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14544 (reinsert_fast_tracepoint_jumps_at): Declare.
14545 * regcache.c: Don't compile many functions when building the
14546 in-process agent library.
14547 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14548 the register buffer in the heap.
14549 (free_register_cache): If the register buffer isn't owned by the
14550 regcache, don't free it.
14551 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14552 pre-existing register caches.
14553 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14555 (convert_ascii_to_int): : Constify `from' parameter type.
14556 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14557 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14558 the needed buffer in-place.
14559 (relocate_instruction): New.
14560 * server.c (handle_query) <qSymbols>: If the target supports
14561 tracepoints, give it a chance of looking up symbols. Report
14562 support for fast tracepoints.
14563 (handle_status): Stabilize threads.
14564 (process_serial_event): Adjust.
14565 * server.h (struct fast_tracepoint_jump): Forward declare.
14566 (struct process_info) <fast_tracepoint_jumps>: New field.
14567 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14568 (decode_X_packet, decode_M_packet): Adjust.
14569 (relocate_instruction): Declare.
14570 (in_process_agent_loaded): Declare.
14571 (tracepoint_look_up_symbols): Declare.
14572 (struct fast_tpoint_collect_status): Declare.
14573 (fast_tracepoint_collecting): Declare.
14574 (force_unlock_trace_buffer): Declare.
14575 (handle_tracepoint_bkpts): Declare.
14576 (initialize_low_tracepoint)
14577 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14578 * target.h (struct target_ops) <stabilize_threads,
14579 install_fast_tracepoint_jump_pad>: New fields.
14580 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14581 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14582 [HAVE_STDINT_H]: Include stdint.h.
14583 (trace_debug_1): Rename to ...
14584 (trace_vdebug): ... this.
14585 (trace_debug): Rename to ...
14586 (trace_debug_1): ... this. Add `level' parameter.
14587 (trace_debug): New.
14588 (ATTR_USED, ATTR_NOINLINE): New.
14589 (IP_AGENT_EXPORT): New.
14590 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14591 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14592 (about_to_request_buffer_space, trace_buffer_is_full)
14593 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14594 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14595 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14596 (traceframe_write_count, traceframes_created)
14597 (trace_state_variables)
14598 New renaming defines.
14599 (struct ipa_sym_addresses): New.
14600 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14601 (symbol_list): New.
14602 (ipa_sym_addrs): New.
14603 (all_tracepoint_symbols_looked_up): New.
14604 (in_process_agent_loaded): New.
14605 (write_e_ipa_not_loaded): New.
14606 (maybe_write_ipa_not_loaded): New.
14607 (tracepoint_look_up_symbols): New.
14608 (debug_threads) [IN_PROCESS_AGENT]: New.
14609 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14610 (UNKNOWN_SIDE_EFFECTS): New.
14611 (stop_tracing): New.
14612 (flush_trace_buffer): New.
14613 (stop_tracing_bkpt): New.
14614 (flush_trace_buffer_bkpt): New.
14615 (read_inferior_integer): New.
14616 (read_inferior_uinteger): New.
14617 (read_inferior_data_pointer): New.
14618 (write_inferior_data_pointer): New.
14619 (write_inferior_integer): New.
14620 (write_inferior_uinteger): New.
14621 (struct collect_static_trace_data_action): Delete.
14622 (enum tracepoint_type): New.
14623 (struct tracepoint) <type>: New field `type'.
14624 <actions_str, step_actions, step_actions_str>: Only include in
14626 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14627 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14628 (tracepoints): Use IP_AGENT_EXPORT.
14629 (last_tracepoint): Don't include in the IPA.
14630 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14631 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14632 (alloced_trace_state_variables): New.
14633 (trace_state_variables): Use IP_AGENT_EXPORT.
14634 (traceframe_t): Delete unused variable.
14635 (circular_trace_buffer): Don't include in the IPA.
14636 (trace_buffer_start): Delete.
14637 (struct trace_buffer_control): New.
14638 (trace_buffer_free): Delete.
14639 (struct ipa_trace_buffer_control): New.
14640 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14641 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14643 (trace_buffer_ctrl): New.
14644 (TRACE_BUFFER_CTRL_CURR): New.
14645 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14646 Reimplement as macros.
14647 (trace_buffer_wrap): Delete.
14648 (traceframe_write_count, traceframe_read_count)
14649 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14650 (struct tracepoint_hit_ctx) <type>: New field.
14651 (struct fast_tracepoint_ctx): New.
14652 (memory_barrier): New.
14654 (record_tracepoint_error): Update atomically in the IPA.
14655 (clear_inferior_trace_buffer): New.
14656 (about_to_request_buffer_space): New.
14657 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14658 updating the same buffer.
14659 (add_tracepoint): Default the tracepoint's type to trap
14660 tracepoint, and orig_size to -1.
14661 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14662 internal variables.
14663 (create_trace_state_variable): New parameter `gdb'. Handle it.
14664 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14665 (cmd_qtdp): Handle fast tracepoints.
14666 (cmd_qtdv): Adjust.
14667 (max_jump_pad_size): New.
14668 (gdb_jump_pad_head): New.
14669 (get_jump_space_head): New.
14670 (claim_jump_space): New.
14671 (sort_tracepoints): New.
14672 (MAX_JUMP_SIZE): New.
14673 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14675 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14676 support. Upload fast traceframes, and delete internal IPA
14678 (stop_tracing_handler): New.
14679 (flush_trace_buffer_handler): New.
14680 (cmd_qtstop): Upload fast tracepoints.
14681 (response_tracepoint): Handle fast tracepoints.
14682 (tracepoint_finished_step): Upload fast traceframes. Set the
14683 tracepoint hit context's tracepoint type.
14684 (handle_tracepoint_bkpts): New.
14685 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14686 type. Add comment about fast tracepoints.
14687 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14688 non-existing action_str field.
14689 (get_context_regcache): Handle fast tracepoints.
14690 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14692 (fast_tracepoint_from_jump_pad_address): New.
14693 (fast_tracepoint_from_ipa_tpoint_address): New.
14694 (collecting_t): New.
14695 (force_unlock_trace_buffer): New.
14696 (fast_tracepoint_collecting): New.
14698 (gdb_collect): New.
14699 (write_inferior_data_ptr): New.
14700 (target_tp_heap): New.
14701 (target_malloc): New.
14702 (download_agent_expr): New.
14704 (download_tracepoints): New.
14705 (download_trace_state_variables): New.
14706 (upload_fast_traceframes): New.
14707 (IPA_FIRST_TRACEFRAME): New.
14708 (IPA_NEXT_TRACEFRAME_1): New.
14709 (IPA_NEXT_TRACEFRAME): New.
14710 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14711 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14712 (gdb_jump_pad_buffer_end): New.
14713 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14714 (initialize_tracepoint): Adjust.
14715 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14716 buffer. Initialize the low module.
14717 * utils.c (PREFIX, TOOLNAME): New.
14718 (malloc_failure): Use PREFIX.
14719 (error): In the IPA, an error causes an exit.
14720 (fatal, warning): Use PREFIX.
14721 (internal_error): Use TOOLNAME.
14722 (NUMCELLS): Increase to 10.
14723 * configure, config.in: Regenerate.
14725 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14727 * server.c (handle_query) <qSupported>: Do two passes over the
14728 qSupported string to avoid nesting strtok.
14730 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14732 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14734 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14735 -Wl,--dynamic-list.
14736 * configure: Regenerate.
14737 * proc-service.list: New.
14739 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14741 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14744 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14746 * gdbreplay.c (remote_open): Check error return from socket() call by
14747 its equality to -1 not by it being negative.
14748 * remote-utils.c (remote_open): Likewise.
14750 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14752 * config.h: Regenerate.
14754 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14756 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14757 doesn't provide PTRACE_GET_THREAD_AREA.
14759 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14761 * linux-m68k-low.c: Include <asm/ptrace.h>
14762 (ps_get_thread_area): Implement.
14764 2010-05-03 Doug Evans <dje@google.com>
14766 * event-loop.c (struct callback_event): New struct.
14767 (callback_list): New global.
14768 (append_callback_event, delete_callback_event): New functions.
14769 (process_callback): New function.
14770 (start_event_loop): Call it.
14771 * remote-utils.c (NOT_SCHEDULED): Define.
14772 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14773 moved out of readchar.
14774 (readchar): Rewrite. Call reschedule before returning.
14775 (reset_readchar): New function.
14776 (remote_close): Call it.
14777 (process_remaining, reschedule): New functions.
14778 * server.h (callback_handler_func): New typedef.
14779 (append_callback_event, delete_callback_event): Declare.
14781 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14783 * proc-service.c (ps_pglobal_lookup): Use
14784 thread_db_look_up_one_symbol.
14785 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14786 parameter. Use it instead of all_symbols_looked_up.
14787 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14789 (all_symbols_looked_up): Don't declare.
14790 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14791 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14793 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14794 Set all_symbols_looked_up here.
14795 (thread_db_look_up_one_symbol): New.
14796 (thread_db_get_tls_address): Adjust.
14797 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14798 thread_db object on the heap, and tentatively set it in the
14800 (thread_db_init): Don't set all_symbols_looked_up here.
14801 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14803 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14805 * linux-low.c (linux_kill, linux_detach): Adjust.
14806 (status_pending_p_callback): Remove redundant statement. Check
14807 for !TARGET_WAITIKIND_IGNORE, instead of
14808 TARGET_WAITKIND_STOPPED.
14809 (handle_tracepoints): Make sure LWP is locked. Adjust.
14810 (linux_wait_for_event_1): Adjust.
14811 (linux_cancel_breakpoints): New.
14812 (unsuspend_one_lwp): New.
14813 (unsuspend_all_lwps): New.
14814 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14815 (send_sigstop_callback): Change return type to int, add new
14816 `except' parameter and handle it.
14817 (suspend_and_send_sigstop_callback): New.
14818 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14819 pass them down. If SUSPEND, also increment the lwp's suspend
14821 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14822 (need_step_over_p): Don't consider suspended LWPs.
14823 (start_step_over): Adjust.
14824 (proceed_one_lwp): Change return type to int, add new `except'
14825 parameter and handle it.
14826 (unsuspend_and_proceed_one_lwp): New.
14827 (proceed_all_lwps): Use find_inferior instead of
14829 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14830 also decrement the suspend count of LWPs. Pass `except' down,
14831 instead of hacking its suspend count.
14832 (linux_pause_all): Add `freeze' parameter. Adjust.
14833 (linux_unpause_all): New.
14834 (linux_target_ops): Install linux_unpause_all.
14835 * server.c (handle_status): Adjust.
14836 * target.h (struct target_ops): New fields `unpause_all' and
14837 `cancel_breakpoints'. Add new parameter to `pause_all'.
14838 (pause_all): Add new `freeze' parameter.
14839 (unpause_all): New.
14840 (cancel_breakpoints): New.
14841 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14842 cancel breakpoints.
14843 (cmd_qtstart): Pause threads.
14844 (stop_tracing): Pause threads, and cancel breakpoints.
14845 * win32-low.c (win32_target_ops): Adjust.
14847 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14849 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14850 the inferior right away from here...
14851 (linux_wait_1): ... to here, and adjust to check the thread's
14852 last_resume_kind instead of the lwp's step or stop_expected flags.
14854 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14856 * README: Use consistent `GDB' and `GDBserver' spellings.
14858 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14860 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14861 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14862 (linux_detach_one_lwp): Assume the lwp is stopped.
14863 (any_thread_of): Delete.
14864 (linux_detach): Stop all lwps here. Don't blindly delete all
14866 (delete_lwp_callback): New.
14867 (linux_mourn): Delete all lwps of the process that is gone.
14868 (linux_wait_1): Don't delete the last lwp of the process here.
14869 * mem-break.h (mark_breakpoints_out): Declare.
14870 * mem-break.c (mark_breakpoints_out): New.
14871 (free_all_breakpoints): Use it.
14872 * server.c (handle_target_event): If the process is gone, mark
14874 * thread-db.c (struct thread_db) <create_bp>: New field.
14875 (thread_db_enable_reporting): Fix prototype. Store a thread event
14876 breakpoint reference in the thread_db struct.
14877 (thread_db_load_search): Clear the thread_db object.
14878 (try_thread_db_load_1): Ditto.
14879 (switch_to_process): New.
14880 (disable_thread_event_reporting): Use it.
14881 (remove_thread_event_breakpoints): New.
14882 (thread_db_detach, thread_db_mourn): Use it.
14884 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14886 * linux-low.c (linux_enable_event_reporting): New.
14887 (linux_wait_for_event_1, handle_extended_wait): Use it.
14889 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14891 * linux-low.c (linux_kill_one_lwp, linux_kill)
14892 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14893 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14894 SIGSTOP even if the LWP is stopped.
14895 (send_sigstop_callback): New.
14896 (stop_all_lwps): Use send_sigstop_callback instead.
14897 (linux_resume_one_thread): Adjust.
14898 (proceed_one_lwp): Still proceed an LWP that the client has
14899 requested to stop, if we haven't reported it as stopped yet. Make
14900 sure that LWPs the client want stopped, have a pending SIGSTOP.
14902 2010-04-26 Doug Evans <dje@google.com>
14904 * server.c (handle_general_set): Make static.
14906 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14907 Print received char after testing for error/eof instead of before.
14908 (input_interrupt): Tweak comment.
14910 2010-04-23 Doug Evans <dje@google.com>
14912 * server.c (start_inferior): Print inferior argv if --debug.
14914 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14916 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14917 * nto-x86-low.c: Include server.h
14919 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14921 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14922 be consistent with other sources of this directory.
14923 (init_registers_amd64): Correct name of source file of this function
14926 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14928 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14929 64-bit executables.
14931 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14933 * win32-i386-low.c: Add 64-bit support.
14934 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14935 (init_registers_amd64): Declare.
14936 (mappings): Add 64-bit version of array.
14937 (init_windows_x86): New function.
14938 (the_low_target): Change init_arch field to init_windows_x86.
14940 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14942 * win32-low.c: Adapt to support also 64-bit architecture.
14943 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14944 (get_image_name): Use SIZE_T type for local variable `done'.
14945 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14946 (toolhelp_get_dll_name): Idem.
14947 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14948 Use uintptr_t typecast to avoid warning.
14949 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14950 (handle_exception): Use phex_nz to avoid warning.
14951 (win32_wait): Remove unused local variable `process'.
14953 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14955 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14958 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14960 * configure.ac: Use `ws2_32' library for srv_mingw.
14961 * configure: Regenerate.
14962 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14963 * remote-utils.c: Likewise.
14965 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14967 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14968 if __x86_64__ is defined.
14970 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14972 * configure: Regenerate.
14974 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14976 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14977 * target.h (target_ops): New get_tib_address field.
14978 * win32-low.h (win32_thread_info): Add thread_local_base field.
14979 * win32-low.c (child_add_thread): Add tlb argument.
14980 Set thread_local_base field to TLB.
14981 (get_child_debug_event): Adapt to child_add_thread change.
14982 (win32_get_tib_address): New function.
14983 (win32_target_ops): Set get_tib_address field to
14984 win32_get_tib_address.
14985 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14987 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14989 * linux-low.c (linux_mourn): Also remove the process.
14990 * server.c (handle_target_event): Don't remove the process here.
14991 * nto-low.c (nto_mourn): New.
14992 (nto_target_ops): Install it.
14993 * spu-low.c (spu_mourn): New.
14994 (spu_target_ops): Install it.
14995 * win32-low.c (win32_mourn): New.
14996 (win32_target_ops): Install it.
14998 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15000 * server.h (buffer_xml_printf): Remove redundant `;'.
15002 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15004 * regcache.c (set_register_cache): Invalidate regcaches before
15005 changing the register cache layout.
15006 (regcache_invalidate_one): Allow a NULL regcache.
15007 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15008 regcaches before changing the register cache layout or the target
15011 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15013 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15014 variable warning on Linux/x86-64.
15016 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15018 GDBserver disconnected tracing support.
15020 * linux-low.c (linux_remove_process): Delete.
15021 (add_lwp): Don't set last_resume_kind here.
15022 (linux_kill): Use `mourn'.
15023 (linux_detach): Use `thread_db_detach', and `mourn'.
15024 (linux_mourn): New.
15025 (linux_attach_lwp_1): Adjust comment.
15026 (linux_attach): last_resume_kind moved the thread_info; adjust.
15027 (status_pending_p_callback): Adjust.
15028 (linux_wait_for_event_1): Adjust.
15029 (count_events_callback, select_singlestep_lwp_callback)
15030 (select_event_lwp_callback, cancel_breakpoints_callback)
15031 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15032 (proceed_one_lwp): Adjust.
15033 (linux_async): Add debug output.
15034 (linux_thread_stopped): New.
15035 (linux_pause_all): New.
15036 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15038 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15039 (thread_db_free): Delete declaration.
15040 (thread_db_detach, thread_db_mourn): Declare.
15041 * thread-db.c (thread_db_init): Use thread_db_mourn.
15042 (thread_db_free): Delete, split in two.
15043 (disable_thread_event_reporting): New.
15044 (thread_db_detach): New.
15045 (thread_db_mourn): New.
15047 * server.h (struct thread_info) <last_resume_kind>: New field.
15048 <attached>: Add comment.
15049 <gdb_detached>: New field.
15050 (handler_func): Change return type to int.
15051 (handle_serial_event, handle_target_event): Ditto.
15052 (gdb_connected): Declare.
15054 (disconnected_tracing): Declare.
15055 (stop_tracing): Declare.
15057 * server.c (handle_query) <qSupported>: Report support for
15058 disconnected tracing.
15059 (queue_stop_reply_callback): Account for running threads.
15060 (gdb_wants_thread_stopped): New.
15061 (gdb_wants_all_threads_stopped): New.
15062 (gdb_reattached_process): New.
15063 (handle_status): Clear the `gdb_detached' flag of all processes.
15064 In all-stop, stop all threads.
15065 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15066 (process_serial_event): If the remote connection breaks, or if an
15067 exit was forced with "monitor exit", force an event loop exit.
15068 Handle disconnected tracing on detach.
15069 (handle_serial_event): Adjust.
15070 (handle_target_event): If GDB isn't connected, forward events back
15071 to the inferior, unless the last process exited, in which case,
15072 exit gdbserver. Adjust interface.
15074 * remote-utils.c (remote_open): Don't block in accept. Instead
15075 register an event loop source on the listen socket file
15076 descriptor. Refactor bits into ...
15077 (listen_desc): ... this new global.
15078 (gdb_connected): ... this new function.
15079 (enable_async_notification): ... this new function.
15080 (handle_accept_event): ... this new function.
15081 (remote_close): Clear remote_desc.
15083 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15085 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15087 (mourn_inferior): Define.
15088 (target_process_qsupported): Avoid the dangling else problem.
15089 (thread_stopped): Define.
15090 (pause_all): Define.
15091 (target_waitstatus_to_string): Declare.
15092 * target.c (target_waitstatus_to_string): New.
15094 * tracepoint.c (tracing): Make extern.
15095 (disconnected_tracing): New.
15096 (stop_tracing): Make extern. Handle tracing stops due to GDB
15098 (cmd_qtdisconnected): New.
15099 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15100 (handle_tracepoint_general_set): Handle QTDisconnected.
15102 * event-loop.c (event_handler_func): Change return type to int.
15103 (process_event): Bail out if the event handler wants the event
15105 (handle_file_event): Ditto.
15106 (start_event_loop): Bail out if the event handler wants the event
15109 * nto-low.c (nto_target_ops): Adjust.
15110 * spu-low.c (spu_wait): Don't remove the process here.
15111 (spu_target_ops): Adjust.
15112 * win32-low.c (win32_wait): Don't remove the process here.
15113 (win32_target_ops): Adjust.
15115 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15117 * regcache.c (realloc_register_cache): Invalidate inferior's
15118 regcache before recreating it.
15120 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15122 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15124 2010-04-09 Stan Shebs <stan@codesourcery.com>
15125 Pedro Alves <pedro@codesourcery.com>
15127 * server.h (LONGEST): New.
15128 (struct thread_info) <while_stepping>: New field.
15129 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15131 (initialize_tracepoint, handle_tracepoint_general_set)
15132 (handle_tracepoint_query, tracepoint_finished_step)
15133 (tracepoint_was_hit, release_while_stepping_state_list):
15134 (current_traceframe): Declare.
15135 * server.c (handle_general_set): Handle tracepoint packets.
15136 (read_memory): New.
15137 (write_memory): New.
15138 (handle_search_memory_1): Use read_memory.
15139 (handle_query): Report support for conditional tracepoints, trace
15140 state variables, and tracepoint sources. Handle tracepoint
15142 (main): Initialize the tracepoints module.
15143 (process_serial_event): Handle traceframe reads/writes.
15145 * linux-low.c (handle_tracepoints): New.
15146 (linux_wait_1): Call it.
15147 (linux_resume_one_lwp): Handle while-stepping.
15148 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15149 (linux_target_ops): Install them.
15150 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15152 * linux-x86-low.c (x86_supports_tracepoints): New.
15153 (the_low_target). Install it.
15155 * mem-break.h (delete_breakpoint): Declare.
15156 * mem-break.c (delete_breakpoint): Make external.
15158 * target.h (struct target_ops): Add `supports_tracepoints',
15159 `read_pc', and `write_pc' fields.
15160 (target_supports_tracepoints): Define.
15161 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15164 * regcache.h (struct regcache) <registers_owned>: New field.
15165 (init_register_cache, regcache_cpy): Declare.
15166 (regcache_read_pc, regcache_write_pc): Declare.
15167 (register_cache_size): Declare.
15168 (supply_regblock): Declare.
15169 * regcache.c (init_register_cache): New.
15170 (new_register_cache): Use it.
15171 (regcache_cpy): New.
15172 (register_cache_size): New.
15173 (supply_regblock): New.
15174 (regcache_read_pc, regcache_write_pc): New.
15176 * tracepoint.c: New.
15178 * Makefile.in (OBS): Add tracepoint.o.
15179 (tracepoint.o): New rule.
15181 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15183 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15185 (i386-mmx.c): Likewise.
15186 (i386-mmx-linux.o): Likewise.
15187 (i386-mmx-linux.c): Likewise.
15189 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15190 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15191 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15192 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15194 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15195 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15196 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15198 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15200 * Makefile.in (clean): Updated.
15202 (i386-avx.c): Likewise.
15203 (i386-avx-linux.o): Likewise.
15204 (i386-avx-linux.c): Likewise.
15205 (amd64-avx.o): Likewise.
15206 (amd64-avx.c): Likewise.
15207 (amd64-avx-linux.o): Likewise.
15208 (amd64-avx-linux.c): Likewise.
15210 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15211 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15212 (srv_amd64_regobj): Add amd64-avx.o.
15213 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15214 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15215 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15216 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15217 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15218 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15219 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15221 * i387-fp.c: Include "i386-xstate.h".
15223 (i387_cache_to_xsave): Likewise.
15224 (i387_xsave_to_cache): Likewise.
15225 (x86_xcr0): Likewise.
15227 * i387-fp.h (i387_cache_to_xsave): Likewise.
15228 (i387_xsave_to_cache): Likewise.
15229 (x86_xcr0): Likewise.
15231 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15232 * linux-crisv32-low.c (target_regsets): Likewise.
15233 * linux-m68k-low.c (target_regsets): Likewise.
15234 * linux-mips-low.c (target_regsets): Likewise.
15235 * linux-ppc-low.c (target_regsets): Likewise.
15236 * linux-s390-low.c (target_regsets): Likewise.
15237 * linux-sh-low.c (target_regsets): Likewise.
15238 * linux-sparc-low.c (target_regsets): Likewise.
15239 * linux-xtensa-low.c (target_regsets): Likewise.
15241 * linux-low.c: Include <sys/uio.h>.
15242 (regsets_fetch_inferior_registers): Support nt_type.
15243 (regsets_store_inferior_registers): Likewise.
15244 (linux_process_qsupported): New.
15245 (linux_target_ops): Add linux_process_qsupported.
15247 * linux-low.h (regset_info): Add nt_type.
15248 (linux_target_ops): Add process_qsupported.
15250 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15252 (init_registers_i386_avx_linux): New.
15253 (init_registers_amd64_avx_linux): Likewise.
15254 (xmltarget_i386_linux_no_xml): Likewise.
15255 (xmltarget_amd64_linux_no_xml): Likewise.
15256 (PTRACE_GETREGSET): Likewise.
15257 (PTRACE_SETREGSET): Likewise.
15258 (x86_fill_xstateregset): Likewise.
15259 (x86_store_xstateregset): Likewise.
15260 (use_xml): Likewise.
15261 (x86_linux_update_xmltarget): Likewise.
15262 (x86_linux_process_qsupported): Likewise.
15263 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15264 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15265 init_registers_i386_linux here. Call
15266 x86_linux_update_xmltarget.
15267 (the_low_target): Add x86_linux_process_qsupported.
15269 * server.c (handle_query): Call target_process_qsupported.
15271 * target.h (target_ops): Add process_qsupported.
15272 (target_process_qsupported): New.
15274 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15276 * inferiors.c (add_thread): Set last_status kind to
15277 TARGET_WAITKIND_IGNORE.
15278 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15279 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15280 (linux_wait_1): Move `thread' local definition to block that uses
15281 it. Don't NULL initialize `event_child'.
15282 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15283 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15284 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15286 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15288 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15289 an extended waitstatus, or by a watchpoint.
15290 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15291 thread was stepping or has been stopped by a watchpoint.
15293 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15295 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15296 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15297 of another, then delete the previous, and validate all
15299 (validate_inserted_breakpoint): New.
15300 (delete_disabled_breakpoints): New.
15301 (validate_breakpoints): New.
15302 (check_mem_read): Validate breakpoints before trusting their
15303 shadow. Delete disabled breakpoints.
15304 (check_mem_write): Validate breakpoints before trusting they
15305 should be inserted. Delete disabled breakpoints.
15306 * mem-break.h (validate_breakpoints):
15307 * server.c (handle_query): Validate breakpoints when we see a
15310 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15312 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15313 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15314 if we could tell there's a GDB breakpoint at stop_pc.
15315 (need_step_over_p): Don't do a step over if we find a GDB
15316 breakpoint at the resume PC.
15318 * mem-break.c (struct raw_breakpoint): New.
15319 (enum bkpt_type): New type `gdb_breakpoint'.
15320 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15321 fields. New field `raw'.
15322 (find_raw_breakpoint_at): New.
15323 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15324 breakpoint instead.
15325 (set_breakpoint_at): Adjust.
15326 (delete_raw_breakpoint): New.
15327 (release_breakpoint): New.
15328 (delete_breakpoint): Rename to...
15329 (delete_breakpoint_1): ... this. Add proc parameter. Use
15330 release_breakpoint. Return ENOENT.
15331 (delete_breakpoint): Reimplement.
15332 (find_breakpoint_at): Delete.
15333 (find_gdb_breakpoint_at): New.
15334 (delete_breakpoint_at): Delete.
15335 (set_gdb_breakpoint_at): New.
15336 (delete_gdb_breakpoint_at): New.
15337 (gdb_breakpoint_here): New.
15338 (set_reinsert_breakpoint): Use release_breakpoint.
15339 (uninsert_breakpoint): Rename to ...
15340 (uninsert_raw_breakpoint): ... this.
15341 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15342 (reinsert_raw_breakpoint): Change parameter type to
15344 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15346 (check_breakpoints): Adjust. Use release_breakpoint.
15347 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15348 (breakpoint_inserted_here): Ditto.
15349 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15350 Don't trust the breakpoint's shadow if it is not inserted.
15351 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15352 (delete_all_breakpoints): Adjust.
15353 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15354 use delete_breakpoint_1.
15356 * mem-break.h (breakpoints_supported): Delete declaration.
15357 (set_gdb_breakpoint_at): Declare.
15358 (gdb_breakpoint_here): Declare.
15359 (delete_breakpoint_at): Delete.
15360 (delete_gdb_breakpoint_at): Declare.
15362 * server.h (struct raw_breakpoint): Forward declare.
15363 (struct process_info): New field `raw_breakpoints'.
15365 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15368 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15370 * linux-low.c (status_pending_p_callback): Fix comment.
15371 (linux_wait_for_event_1): Move most of the internal breakpoint
15372 handling from here...
15373 (linux_wait_1): ... to here.
15374 (count_events_callback): New.
15375 (select_singlestep_lwp_callback): New.
15376 (select_event_lwp_callback): New.
15377 (cancel_breakpoints_callback): New.
15378 (select_event_lwp): New.
15379 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15380 priority to all LWPs that have had events that should be reported
15381 to the client. Cancel breakpoints when about to reporting the
15382 event to the client, not while stopping lwps. No longer cancel
15383 finished single-steps here.
15384 (cancel_finished_single_step): Delete.
15385 (cancel_finished_single_steps): Delete.
15387 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15389 * mem-break.c (enum bkpt_type): New.
15390 (struct breakpoint): New field `type'.
15391 (set_breakpoint_at): Change return type to struct breakpoint
15392 pointer. Set type to `other_breakpoint' by default.
15393 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15394 in the breakpoint list.
15395 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15396 (reinsert_breakpoint): Rename to ...
15397 (reinsert_raw_breakpoint): ... this.
15398 (reinsert_breakpoints_at): Adjust.
15399 * mem-break.h (struct breakpoint): Declare.
15400 (set_breakpoint_at): Change return type to struct breakpoint
15403 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15405 * server.c (handle_query): Assign, not compare.
15407 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15409 Teach linux gdbserver to step-over-breakpoints.
15411 * linux-low.c (can_hardware_single_step): New.
15412 (supports_breakpoints): New.
15413 (handle_extended_wait): If stopping threads, read the stop pc of
15414 the new cloned LWP.
15416 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15417 low target doesn't support retrieving the PC.
15418 (add_lwp): Set last_resume_kind to resume_continue.
15419 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15420 (linux_attach): Don't clear stop_expected. Set the lwp's
15421 last_resume_kind to resume_stop.
15422 (linux_detach_one_lwp): Don't check for removed breakpoints.
15423 (check_removed_breakpoint): Delete.
15424 (status_pending_p): Rename to ...
15425 (status_pending_p_callback): ... this. Don't check for removed
15426 breakpoints. Don't consider threads that are stopped from GDB's
15428 (linux_wait_for_lwp): Always read the stop_pc here.
15429 (cancel_breakpoint): New.
15430 (step_over_bkpt): New global.
15431 (linux_wait_for_event_1): Implement stepping over breakpoints.
15432 (gdb_wants_lwp_stopped): New.
15433 (gdb_wants_all_stopped): New.
15434 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15435 single-step traps here. Store the thread's last reported target
15437 (send_sigstop): Don't clear stop_expected. Always set it,
15439 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15440 (cancel_finished_single_step): New.
15441 (cancel_finished_single_steps): New.
15442 (wait_for_sigstop): Don't cancel finished single-step traps here.
15443 (linux_resume_one_lwp): Don't check for removed breakpoints.
15444 Don't set `step' on non-hardware step archs.
15445 (linux_set_resume_request): Ignore resume_stop requests if already
15446 stopping or stopped. Set the lwp's last_resume_kind.
15447 (resume_status_pending_p): Don't check for removed breakpoints.
15448 (need_step_over_p): New.
15449 (start_step_over): New.
15450 (finish_step_over): New.
15451 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15452 requests. Clear the thread's last reported target waitstatus.
15453 Don't use the `suspended' flag. Don't consider pending breakpoints.
15454 (linux_resume): Start a step-over if necessary.
15455 (proceed_one_lwp): New.
15456 (proceed_all_lwps): New.
15457 (unstop_all_lwps): New.
15458 * linux-low.h (struct lwp_info): Rewrite comment for the
15459 `suspended' flag. Add the `stop_pc' field. Delete the
15460 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15461 Add `'last_resume_kind' and `need_step_over' fields.
15462 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15463 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15464 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15465 (set_raw_breakpoint_at): New.
15466 (set_breakpoint_at): Rewrite to use it.
15467 (reinsert_breakpoint_handler): Delete.
15468 (set_reinsert_breakpoint): New.
15469 (reinsert_breakpoint_by_bp): Delete.
15470 (delete_reinsert_breakpoints): New.
15471 (uninsert_breakpoint): Rewrite.
15472 (uninsert_breakpoints_at): New.
15473 (reinsert_breakpoint): Rewrite.
15474 (reinsert_breakpoints_at): New.
15475 (check_breakpoints): Rewrite.
15476 (breakpoint_here): New.
15477 (breakpoint_inserted_here): New.
15478 (check_mem_read): Adjust.
15479 * mem-break.h (breakpoints_supported, breakpoint_here)
15480 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15481 (reinsert_breakpoint_by_bp): Delete declaration.
15482 (delete_reinsert_breakpoints): Declare.
15483 (reinsert_breakpoint): Delete declaration.
15484 (reinsert_breakpoints_at): Declare.
15485 (uninsert_breakpoint): Delete declaration.
15486 (uninsert_breakpoints_at): Declare.
15487 (check_breakpoints): Adjust prototype.
15488 * server.h: Adjust include order.
15489 (struct thread_info): Declare here. Add a `last_status' field.
15491 2010-03-23 Michael Snyder <msnyder@vmware.com>
15493 * server.c (crc32): New function.
15494 (handle_query): Add handling for 'qCRC:' request.
15496 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15498 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15499 lwp had been stopped by a watchpoint.
15501 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15503 * server.h (internal_error): Declare.
15504 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15505 * utils.c (internal_error): New function.
15507 2010-03-15 Andreas Schwab <schwab@redhat.com>
15509 * configure.srv: Fix typo setting srv_regobj.
15511 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15513 * linux-low.c (fetch_register): Avoid passing a non string literal
15515 (usr_store_inferior_registers): Ditto.
15517 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15519 * linux-low.c (linux_write_memory): Bail out early if peeking
15522 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15524 * linux-low.h (struct lwp_info): New fields
15525 `stopped_by_watchpoint' and `stopped_data_address'.
15526 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15527 here, and cache them in the lwp object.
15528 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15530 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15532 (linux_stopped_by_watchpoint): Rewrite.
15533 (linux_stopped_data_address): Rewrite.
15535 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15537 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15538 switching the current inferior, not before.
15540 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15542 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15543 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15544 i386-linux.c and amd64-linux.c.
15545 (reg-i386.o): Removed.
15546 (reg-i386.c): Likewise.
15547 (reg-i386-linux.o): Likewise.
15548 (reg-i386-linux.c): Likewise.
15549 (reg-x86-64.o): Likewise.
15550 (reg-x86-64.c): Likewise.
15551 (reg-x86-64-linux.o): Likewise.
15552 (reg-x86-64-linux.c): Likewise.
15554 (i386.c): Likewise.
15555 (i386-linux.o): Likewise.
15556 (i386-linux.c): Likewise.
15557 (amd64.o): Likewise.
15558 (amd64.c): Likewise.
15559 (amd64-linux.o): Likewise.
15560 (amd64-linux.c): Likewise.
15562 * configure.srv (srv_i386_regobj): New.
15563 (srv_i386_linux_regobj): Likewise.
15564 (srv_amd64_regobj): Likewise.
15565 (srv_amd64_linux_regobj): Likewise.
15566 (srv_i386_32bit_xmlfiles): Likewise.
15567 (srv_i386_64bit_xmlfiles): Likewise.
15568 (srv_i386_xmlfiles): Likewise.
15569 (srv_amd64_xmlfiles): Likewise.
15570 (srv_i386_linux_xmlfiles): Likewise.
15571 (srv_amd64_linux_xmlfiles): Likewise.
15572 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15573 srv_xmlfiles to $srv_i386_xmlfiles.
15574 (i[34567]86-*-mingw32ce*): Likewise.
15575 (i[34567]86-*-mingw*): Likewise.
15576 (i[34567]86-*-nto*): Likewise.
15577 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15578 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15579 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15580 (x86_64-*-linux*): Likewise.
15582 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15583 (init_registers_amd64_linux): New.
15584 (x86_arch_setup): Replace init_registers_x86_64_linux with
15585 init_registers_amd64_linux.
15587 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15589 * configure.ac: Check for libdl. If it is not available link against
15590 static libthread_db.
15591 * configure: Regenerate.
15593 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15597 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15598 handing a read watchpoint.
15599 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15601 2010-02-12 Doug Evans <dje@google.com>
15603 * linux-low.c (linux_supports_tracefork_flag): Document.
15604 (linux_look_up_symbols): Add comment.
15606 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15608 * regcache.c (supply_register): Clear regcache if buf is NULL.
15610 2010-02-02 Nicolas Roche <roche@sourceware.org>
15611 Joel Brobecker <brobecker@adacore.com>
15613 * inferiors.c (find_inferior): Add function documentation.
15614 (unloaded_dll): Handle the case where the unloaded dll has not
15615 been previously registered in the dll list.
15617 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15619 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15620 (thumb2_breakpoint): New.
15621 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15623 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15625 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15626 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15629 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15631 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15633 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15635 * linux-s390-low.c (s390_collect_ptrace_register)
15636 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15638 2010-01-21 Doug Evans <dje@google.com>
15640 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15641 (PTRACE_ARG4_TYPE): New macro.
15642 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15643 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15644 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15645 (usr_store_inferior_registers): Ditto.
15646 (linux_read_memory, linux_write_memory): Ditto.
15647 (linux_test_for_tracefork): Ditto.
15649 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15650 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15652 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15654 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15657 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15659 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15660 prototype to take a regcache. Adjust.
15662 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15664 * regcache.h (struct thread_info): Forward declare.
15665 (struct regcache): New.
15666 (new_register_cache): Adjust prototype.
15667 (get_thread_regcache): Declare.
15668 (free_register_cache): Adjust prototype.
15669 (registers_to_string, registers_from_string): Ditto.
15670 (supply_register, supply_register_by_name, collect_register)
15671 (collect_register_as_string, collect_register_by_name): Ditto.
15672 * regcache.c (struct inferior_regcache_data): Delete.
15673 (get_regcache): Rename to ...
15674 (get_thread_regcache): ... this. Adjust. Switch inferior before
15675 fetching registers.
15676 (regcache_invalidate_one): Adjust.
15677 (regcache_invalidate): Fix prototype.
15678 (new_register_cache): Return the new register cache.
15679 (free_register_cache): Change prototype.
15680 (realloc_register_cache): Adjust.
15681 (registers_to_string): Change prototype to take a regcache. Adjust.
15682 (registers_from_string): Ditto.
15683 (register_data): Ditto.
15684 (supply_register): Ditto.
15685 (supply_register_by_name): Ditto.
15686 (collect_register): Ditto.
15687 (collect_register_as_string): Ditto.
15688 (collect_register_by_name): Ditto.
15689 * server.c (process_serial_event): Adjust.
15690 * linux-low.h (regset_fill_func, regset_store_func): Change
15692 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15694 * linux-low.c (get_stop_pc): Adjust.
15695 (check_removed_breakpoint): Adjust.
15696 (linux_wait_for_event): Adjust.
15697 (linux_resume_one_lwp): Adjust.
15698 (fetch_register): Add regcache parameter. Adjust.
15699 (usr_store_inferior_registers): Ditto.
15700 (regsets_fetch_inferior_registers): Ditto.
15701 (regsets_store_inferior_registers): Ditto.
15702 (linux_fetch_registers, linux_store_registers): Ditto.
15703 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15705 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15707 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15708 prototype to take a regcache.
15709 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15710 * remote-utils.c (convert_ascii_to_int, outreg)
15711 (prepare_resume_reply): Change prototype to take a regcache.
15713 * target.h (struct target_ops) <fetch_registers, store_registers>:
15714 Change prototype to take a regcache.
15715 (fetch_inferior_registers, store_inferior_registers): Change
15716 prototype to take a regcache. Adjust.
15717 * proc-service.c (ps_lgetregs): Adjust.
15718 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15719 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15720 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15721 take a regcache. Adjust.
15722 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15723 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15724 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15725 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15726 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15727 (cris_cannot_fetch_register):
15728 (cris_breakpoint_at): Change prototype to take a regcache.
15730 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15731 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15732 to take a regcache. Adjust.
15733 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15735 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15736 take a regcache. Adjust.
15737 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15738 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15739 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15740 * linux-mips-low.c (mips_get_pc):
15741 (mips_set_pc): Change prototype to take a regcache. Adjust.
15742 (mips_reinsert_addr): Adjust.
15743 (mips_collect_register): Change prototype to take a regcache.
15745 (mips_supply_register):
15746 (mips_collect_register_32bit, mips_supply_register_32bit)
15747 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15748 (mips_store_fpregset): Ditto.
15749 * linux-ppc-low.c (ppc_supply_ptrace_register)
15750 (ppc_supply_ptrace_register): Ditto.
15751 (parse_spufs_run): Adjust.
15752 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15753 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15754 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15755 take a regcache. Adjust.
15756 * linux-s390-low.c (s390_collect_ptrace_register)
15757 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15758 (s390_set_pc): Change prototype to take a regcache. Adjust.
15759 (s390_arch_setup): Adjust.
15760 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15761 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15762 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15763 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15764 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15766 (sparc_breakpoint_at): Adjust.
15767 * linux-xtensa-low.c (xtensa_fill_gregset):
15768 (xtensa_store_gregset):
15769 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15770 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15771 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15772 prototype to take a regcache. Adjust.
15773 * win32-arm-low.c (arm_fetch_inferior_register)
15774 (arm_store_inferior_register): Change prototype to take a
15776 * win32-i386-low.c (i386_fetch_inferior_register)
15777 (i386_store_inferior_register): Change prototype to take a
15779 * win32-low.c (child_fetch_inferior_registers)
15780 (child_store_inferior_registers): Change prototype to take a
15782 (win32_wait): Adjust.
15783 (win32_fetch_inferior_registers): Change prototype to take a
15785 (win32_store_inferior_registers): Adjust.
15786 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15787 store_inferior_register>: Change prototype to take a regcache.
15789 2010-01-20 Doug Evans <dje@google.com>
15791 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15793 (linux_wait_for_event1, linux_init_signals): Ditto.
15794 (W_STOPCODE): Provide definition if missing.
15796 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15798 * linux-low.c (linux_core_of_thread): New.
15799 (compare_ints, show_process, list_threads): New.
15800 (linux_qxfer_osdata): Report threads and cores.
15801 (linux_target_op): Register linux_core_of_thread.
15802 * remote-utils.c (prepare_resume_reply): Report the core.
15803 (buffer_xml_printf): Support %d specifier.
15804 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15806 (handle_query): Handle qXfer:threads. Announce availability
15808 * target.h (struct target_ops): New field core_of_thread.
15810 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15812 * Makefile.in (clean): Remove new generated files.
15813 (reg-s390.o, reg-s390.c): Remove rules.
15814 (reg-s390x.o, reg-s390x.c): Likewise.
15815 (s390-linux32.o, s390-linux32.c): Add rules.
15816 (s390-linux64.o, s390-linux64.c): Likewise.
15817 (s390x-linux64.o, s390x-linux64.c): Likewise.
15818 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15819 * linux-s390-low.c: Include <elf.h>.
15820 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15821 (init_registers_s390): Remove prototype.
15822 (init_registers_s390x): Likewise.
15823 (init_registers_s390_linux32): Add prototype.
15824 (init_registers_s390_linux64): Likewise.
15825 (init_registers_s390x_linux64): Likewise.
15826 (s390_num_regs_3264): New define.
15827 (s390_regmap_3264): New global variable.
15828 (s390_cannot_fetch_register): Remove obsolete check.
15829 (s390_cannot_store_register): Likewise.
15830 (s390_collect_ptrace_register): Handle upper/lower register halves.
15831 (s390_supply_ptrace_register): Likewise.
15832 (s390_fill_gregset): Update to register number changes.
15833 (s390_get_hwcap): New routine.
15834 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15835 Install appropriate regmap and register set.
15837 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15839 * server.c (gdbserver_version): Update copyright year to 2010.
15840 * gdbreplay.c (gdbreplay_version): Likewise.
15842 2009-12-28 Doug Evans <dje@google.com>
15844 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15845 elf/external.h. Include <elf.h> instead but only if necessary.
15847 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15849 * linux-low.c (linux_remove_process): Remove `detaching'
15850 parameter. Don't release/detach from thread_db here.
15851 (linux_kill): Release/detach from thread_db here, ...
15852 (linux_detach): ... and here, before actually detaching.
15853 (linux_wait_1): ... and here, when a process exits.
15854 * thread-db.c (any_thread_of): New.
15855 (thread_db_free): Switch the current inferior to a thread of the
15858 2009-12-21 Doug Evans <dje@google.com>
15860 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15862 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15863 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15864 warning ifndef __NR_tkill. Move setting of errno there too.
15865 Delete unnecessary resetting of errno after syscall.
15866 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15868 * configure.ac: Check for dladdr.
15869 * config.in: Regenerate.
15870 * configure: Regenerate.
15871 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15872 (try_thread_db_load): Update.
15874 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15876 2009-12-18 Doug Evans <dje@google.com>
15878 * event-loop.c: Include unistd.h if it exists.
15880 * linux-low.c (my_waitpid): Move definition away from being in
15881 between linux_tracefork_child/linux_test_for_tracefork.
15883 * gdb_proc_service.h (psaddr_t): Fix type.
15884 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15885 signature to match glibc.
15887 2009-12-16 Doug Evans <dje@google.com>
15889 * linux-low.c (linux_read_memory): Fix argument to read.
15891 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15893 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15894 events, don't leave current_inferior pointing at null.
15896 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15898 * win32-low.c (LOG): Delete.
15899 (OUTMSG): Output to stderr.
15900 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15901 on compile time LOG macro.
15902 (win32_wait): Fix debug output.
15904 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15906 * win32-low.c (win32_add_one_solib): If the dll name is
15907 "ntdll.dll", prepend the system directory to the dll path.
15909 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15911 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15913 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15914 Vladimir Prus <vladimir@codesourcery.com>
15916 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15917 * configure.ac: Check for __mcoldfire__ and set
15918 gdb_cv_m68k_is_coldfire.
15919 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15920 reg-cf.o and reg-m68k.o.
15921 * configure: Regenerated.
15923 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15925 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15926 Pass it to thread_db_free.
15927 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15928 proper `detaching' argument to linux_remove_process.
15929 * linux-low.h (thread_db_free): Add `detaching' parameter.
15930 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15932 (thread_db_free): Add `detaching' parameter. Only
15933 call td_ta_clear_event if detaching from process.
15935 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15937 * thread-db.c (thread_db_free): Fix typo.
15939 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15942 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15944 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15946 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15947 with an i686 compiler.
15948 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15950 * configure: Rebuilt.
15952 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15956 * server.c (handle_search_memory_1): Correct read_addr initialization
15957 in loop for searching subsequent chunks.
15959 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15961 * configure.ac: New --with-libthread-db option.
15962 * thread-db.c: Allow direct dependence on libthread_db.
15963 (thread_db_free): Adjust.
15964 * config.in: Regenerate.
15965 * configure: Likewise.
15967 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15970 * thread-db.c (attach_thread): New function.
15971 (maybe_attach_thread): Return success/failure.
15972 (find_new_threads_callback): Adjust.
15973 (thread_db_find_new_threads): Loop until no new threads.
15975 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15977 * proc-service.c (ps_lgetregs): Formatting.
15979 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15981 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15982 * configure.ac: Adjust.
15983 * linux-low.h (struct process_info_private): Move members to struct
15985 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15986 * linux-low.c (linux_remove_process): Adjust.
15987 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15988 * server.c (handle_query): Move code ...
15989 (handle_monitor_command): ... here. New function.
15990 * target.h (struct target_ops): New member.
15991 * thread-db.c (struct thread_db): New.
15992 (libthread_db_search_path): New variable.
15993 (thread_db_create_event, thread_db_enable_reporting)
15994 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15995 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15996 (try_thread_db_load_1, dladdr_to_soname): New functions.
15997 (try_thread_db_load, thread_db_load_search): New functions.
15998 (thread_db_init): Search for libthread_db.
15999 (thread_db_free): New function.
16000 (thread_db_handle_monitor_command): Likewise.
16001 * config.in: Regenerate.
16002 * configure: Regenerate.
16004 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16006 * spu-low.c (spu_kill): Wait for inferior to terminate.
16007 Call clear_inferiors.
16008 (spu_detach): Call clear_inferiors.
16010 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16012 * aclocal.m4: Regenerate.
16013 * config.in: Likewise.
16014 * configure: Likewise.
16016 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16018 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16019 (parse_spufs_run): New function.
16020 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16021 (ppc_breakpoint_at): Handle SPU breakpoints.
16023 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16025 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16026 (SPUFS_MAGIC): Define.
16027 (spu_enumerate_spu_ids): New function.
16028 (linux_qxfer_spu): New function.
16029 (linux_target_ops): Install linux_qxfer_spu.
16031 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16033 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16034 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16035 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16036 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16037 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16038 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16039 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16040 (init_registers_powerpc_cell32l): Add prototype.
16041 (init_registers_powerpc_cell64l): Likewise.
16042 (ppc_arch_setup): Detect Cell/B.E. architecture.
16044 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16046 * Makefile.in (datarootdir): New variable.
16048 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16050 * linux-low.c (linux_write_memory): Update debugging output.
16051 * Makefile.in (clean): Add new descriptions.
16052 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16053 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16054 * configure.srv: Add new files for arm*-*-linux*.
16055 * linux-arm-low.c: Add new declarations.
16056 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16057 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16058 (HWCAP_VFPv3D16): New.
16059 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16060 instead of __IWMMXT__.
16061 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16062 (arm_arch_setup): New.
16063 (target_regsets): Remove #ifdef. Add VFP regset.
16064 (the_low_target): Use arm_arch_setup.
16066 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16068 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16069 the main thread again.
16071 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16073 Adding Neutrino gdbserver.
16074 * configure: Regenerated.
16075 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16076 * configure.srv (i[34567]86-*-nto*): New target.
16077 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16078 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16079 (nto_comctrl) [__QNX__]: New function.
16080 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16082 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16084 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16087 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16088 Pedro Alves <pedro@codesourcery.com>
16090 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16091 don't support CONTEXT_EXTENDED_REGISTERS.
16092 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16093 (the_low_target): Install them.
16094 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16095 failing with ERROR_PIPE_NOT_CONNECTED.
16097 2009-06-30 Doug Evans <dje@google.com>
16098 Pierre Muller <muller@ics.u-strasbg.fr>
16100 Add h/w watchpoint support to x86-linux, win32-i386.
16101 * Makefile.in (SFILES): Add i386-low.c
16102 (i386_low_h): Define.
16103 (i386-low.o): Add dependencies.
16104 (linux-x86-low.o): Add i386-low.h dependency.
16105 (win32-i386-low.o): Ditto.
16106 * i386-low.c: New file.
16107 * i386-low.h: New file.
16108 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16109 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16110 * linux-low.c (linux_add_process): Initialize arch_private.
16111 (linux_remove_process): Free arch_private.
16112 (add_lwp): Initialize arch_private.
16113 (delete_lwp): Free arch_private.
16114 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16116 * linux-low.h (process_info_private): New member arch_private.
16117 (lwp_info): New member arch_private.
16118 (linux_target_ops): New members new_process, new_thread,
16120 (ptid_of): New macro.
16121 * linux-x86-low.c: Include stddef.h, i386-low.h.
16122 (arch_process_info): New struct.
16123 (arch_lwp_info): New struct.
16124 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16126 (i386_dr_low_get_status): New function.
16127 (x86_insert_point, x86_remove_point): New functions.
16128 (x86_stopped_by_watchpoint): New function.
16129 (x86_stopped_data_address): New function.
16130 (x86_linux_new_process, x86_linux_new_thread): New functions.
16131 (x86_linux_prepare_to_resume): New function.
16132 (the_low_target): Add entries for insert_point, remove_point,
16133 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16135 * server.c (debug_hw_points): New global.
16136 (monitor_show_help): Document set debug-hw-points.
16137 (handle_query): Process "set debug-hw-points".
16138 * server.h (debug_hw_points): Declare.
16139 (paddress): Declare.
16140 * utils.c (NUMCELLS, CELLSIZE): New macros.
16141 (get_sell, xsnprintf, paddress): New functions.
16142 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16143 remove_point, stopped_by_watchpoint, stopped_data_address.
16144 * win32-i386-low.c: Include i386-low.h.
16145 (debug_reg_state): Replaces dr.
16146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16147 (i386_dr_low_get_status): New function.
16148 (i386_insert_point, i386_remove_point): New functions.
16149 (i386_stopped_by_watchpoint): New function.
16150 (i386_stopped_data_address): New function.
16151 (i386_initial_stuff): Update.
16152 (get_thread_context,set_thread_context,i386_thread_added): Update.
16153 (the_low_target): Add entries for insert_point,
16154 remove_point, stopped_by_watchpoint, stopped_data_address.
16155 * win32-low.c (win32_insert_watchpoint): New function.
16156 (win32_remove_watchpoint): New function.
16157 (win32_stopped_by_watchpoint): New function.
16158 (win32_stopped_data_address): New function.
16159 (win32_target_ops): Add entries for insert_watchpoint,
16160 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16161 * win32-low.h (win32_target_ops): New members insert_point,
16162 remove_point, stopped_by_watchpoint, stopped_data_address.
16164 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16166 * server.c (process_serial_event): Re-return unsupported, not
16167 error, if the type isn't recognized. Re-allow supporting only
16168 insert or remove packets. Also call require_running for
16169 breakpoints. Add missing break statement to default case. Tidy.
16170 * target.h (struct target_ops): Rename insert_watchpoint to
16171 insert_point, and remove_watchpoint to remove_point.
16173 * linux-low.h (struct linux_target_ops): Likewise.
16174 * linux-low.c (linux_insert_watchpoint): Rename to ...
16175 (linux_insert_point): ... this. Adjust.
16176 (linux_remove_watchpoint): Rename to ...
16177 (linux_remove_point): ... this. Adjust.
16178 (linux_target_ops): Adjust.
16179 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16180 (cris_insert_point): ... this.
16181 (cris_remove_watchpoint): Rename to ...
16182 (cris_remove_point): ... this.
16183 (the_low_target): Adjust.
16185 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16187 * server.c (handle_v_kill): Pass signal_pid to
16188 kill_inferior if multi_process is zero.
16190 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16192 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16193 * target.h (target_ops): Comment for *_watchpoint to make it clear
16194 the functions can get types '0' and '1'.
16196 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16198 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16199 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16200 * regcache.c (get_regcache): Likewise.
16201 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16202 * win32-low.c (child_fetch_inferior_registers): Remove check for
16205 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16206 Pedro Alves <pedro@codesourcery.com>
16208 * target.h (struct target_ops) <supports_multi_process>: New
16210 (target_supports_multi_process): New.
16211 * server.c (handle_query): Even if GDB reports support, only
16212 enable multi-process if the target also supports it. Report
16213 multi-process support only if the target backend supports it.
16214 * linux-low.c (linux_supports_multi_process): New function.
16215 (linux_target_ops): Install it as target_supports_multi_process
16218 2009-05-24 Doug Evans <dje@google.com>
16220 Global renaming of find_thread_pid to find_thread_ptid.
16221 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16222 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16223 All callers updated.
16225 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16226 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16229 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16230 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16231 (linux_resume_one_lwp): Ditto.
16233 2009-05-23 Doug Evans <dje@google.com>
16235 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16236 from struct inferior_list_entry * to struct lwp_info *.
16237 All callers updated.
16239 2009-05-13 Doug Evans <dje@google.com>
16241 * linux-x86-low.c: Don't include assert.h.
16242 (x86_siginfo_fixup): Use fatal, not assert.
16243 (x86_arch_setup): Fix comment.
16245 2009-05-12 Doug Evans <dje@google.com>
16247 Biarch support for i386/amd64 gdbserver.
16248 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16249 Add linux-x86-low.c.
16250 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16251 (linux-x86-low.o): Add.
16252 * linux-x86-64-low.c: Delete.
16253 * linux-i386-low.c: Delete.
16254 * linux-x86-low.c: New file.
16255 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16257 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16259 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16260 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16261 (linux_child_pid_to_exec_file): New function.
16262 (elf_64_header_p, elf_64_file_p): New functions.
16263 (siginfo_fixup): New function.
16264 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16265 give target a chance to convert layout.
16266 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16267 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16269 2009-05-07 Doug Evans <dje@google.com>
16271 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16272 (regsets_store_inferior_registers): Ditto.
16274 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16278 * linux-low.c (must_set_ptrace_flags): Delete.
16279 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16281 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16282 `lwp->must_set_ptrace_flags' instead.
16283 (linux_wait_for_event_1): Set ptrace options here.
16284 (linux_wait_1): ... not here.
16286 2009-04-30 Doug Evans <dje@google.com>
16288 * inferiors.c (started_inferior_callback): New function.
16289 (attached_inferior_callback): New function.
16290 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16291 * server.c (print_started_pid, print_attached_pid): New functions.
16292 (detach_or_kill_for_exit): New function.
16293 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16294 * server.h (have_started_inferiors_p): Declare.
16295 (have_attached_inferiors_p): Declare.
16297 * inferiors.c (remove_process): Fix memory leak, free process.
16298 * linux-low.c (linux_remove_process): New function.
16299 (linux_kill): Call it instead of remove_process.
16300 (linux_detach, linux_wait_1): Ditto.
16302 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16304 * configure.srv: Add x86 Windows CE target.
16306 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16308 * inferiors.c (get_thread_process): Make global.
16309 * server.h (get_thread_process): Add prototype.
16310 * thread-db.c (find_one_thread): Use get_thread_process
16311 instead of current_process.
16312 (thread_db_get_tls_address): Do not crash if called when
16313 thread layer is not yet initialized.
16315 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16317 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16318 * spu-low.c (current_tid): Rename to ...
16319 (current_ptid): ... this.
16320 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16321 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16322 ptid_get_lwp (current_ptid) instead of current_tid.
16323 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16324 instead of current_tid. Use find_process_pid to verify pid
16325 argument is valid. Pass proper argument to remove_process.
16326 (spu_thread_alive): Compare current_ptid instead of current_tid.
16327 (spu_resume): Likewise.
16329 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16331 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16334 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16336 Implement the multiprocess extensions, and add linux multiprocess
16339 * server.h (ULONGEST): Declare.
16340 (struct ptid, ptid_t): New.
16341 (minus_one_ptid, null_ptid): Declare.
16342 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16343 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16344 (struct inferior_list_entry): Change `id' type from unsigned from
16346 (struct sym_cache, struct breakpoint, struct
16347 process_info_private): Forward declare.
16348 (struct process_info): Declare.
16349 (current_process): Declare.
16350 (all_processes): Declare.
16351 (initialize_inferiors): Declare.
16352 (add_thread): Adjust to use ptid_t.
16353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16354 (add_process, remove_process, find_thread_pid): Declare.
16355 (find_inferior_id): Adjust to use ptid_t.
16356 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16357 (multi_process): Declare.
16358 (push_event): Adjust to use ptid_t.
16359 (read_ptid, write_ptid): Declare.
16360 (prepare_resume_reply): Adjust to use ptid_t.
16361 (clear_symbol_cache): Declare.
16362 * inferiors.c (all_processes): New.
16363 (null_ptid, minus_one_ptid): New.
16364 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16365 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16366 (add_thread): Change unsigned long to ptid. Remove gdb_id
16368 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16369 (gdb_id_to_thread): Rename to ...
16370 (find_thread_pid): ... this. Change unsigned long to ptid.
16371 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16372 (loaded_dll, pull_pid_from_list): Adjust.
16373 (add_process, remove_process, find_process_pid)
16374 (get_thread_process, current_process, initialize_inferiors): New.
16375 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16376 (struct target_waitstatus) <related_pid>: Ditto.
16377 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16378 return type to int.
16379 (struct target_ops) <join>: Add `pid' argument.
16380 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16381 (struct target_ops) <wait>: Add `ptid' field. Change return type
16383 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16384 (mywait): Add `ptid' argument. Change return type to ptid_t.
16385 (target_pid_to_str): Declare.
16386 * target.c (set_desired_inferior): Adjust to use ptids.
16387 (mywait): Add new `ptid' argument. Adjust.
16388 (target_pid_to_str): New.
16389 * mem-break.h (free_all_breakpoints): Declare.
16390 * mem-break.c (breakpoints): Delelete.
16391 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16392 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16393 to use per-process breakpoint list.
16394 (free_all_breakpoints): New.
16395 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16396 (symbol_cache, all_symbols_looked_up): Delete.
16398 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16400 (prepare_resume_reply): Change ptid argument's type from unsigned
16401 long to ptid_t. Adjust. Implement W;process and X;process.
16402 (free_sym_cache, clear_symbol_cache): New.
16403 (look_up_one_symbol): Adjust to per-process symbol cache. *
16404 * server.c (cont_thread, general_thread, step_thread): Change type
16406 (attached): Delete.
16407 (multi_process): New.
16408 (last_ptid): Change type to ptid_t.
16409 (struct vstop_notif) <ptid>: Change type to ptid_t.
16410 (queue_stop_reply, push_event): Change `ptid' argument's type to
16412 (discard_queued_stop_replies): Add `pid' argument.
16413 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16414 changes. Don't reference the `attached' global.
16415 (attach_inferior): Adjust to mywait interface changes.
16416 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16417 features. Handle and report "multiprocess+". Handle
16419 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16421 (handle_v_kill): New.
16422 (handle_v_stopped): Adjust to use target_pid_to_str.
16423 (handle_v_requests): Allow multiple attaches and runs when
16424 multiprocess extensions are in effect. Handle "vKill".
16425 (myresume): Adjust to use ptids.
16426 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16427 (handle_status): Adjust to discard_queued_stop_replies interface
16429 (first_thread_of, kill_inferior_callback)
16430 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16431 (main): Call initialize_inferiors. Adjust to use ptids, killing
16432 and detaching from all inferiors. Handle multiprocess packet
16434 * linux-low.h: Include gdb_proc_service.h.
16435 (struct process_info_private): New.
16436 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16437 <lwpid_of>: Use ptid_get_lwp.
16438 (get_lwp_thread): Adjust.
16439 (struct lwp_info): Add `dead' member.
16440 (find_lwp_pid): Declare.
16441 * linux-low.c (thread_db_active): Delete.
16442 (new_inferior): Adjust comment.
16443 (inferior_pid): Delete.
16444 (linux_add_process): New.
16445 (handle_extended_wait): Adjust.
16446 (add_lwp): Change unsigned long to ptid.
16447 (linux_create_inferior): Add process to processes table. Adjust
16448 to use ptids. Don't set new_inferior here.
16449 (linux_attach_lwp): Rename to ...
16450 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16451 it. Adjust to use ptids.
16452 (linux_attach_lwp): New.
16453 (linux_attach): Add process to processes table. Don't set
16455 (struct counter): New.
16456 (second_thread_of_pid_p, last_thread_of_process_p): New.
16457 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16458 multiple processes.
16459 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16460 processes. Remove process from process table.
16461 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16462 to multiple processes.
16463 (any_thread_of): New.
16464 (linux_detach): Add `pid' argument, and handle it. Remove process
16465 from processes table.
16466 (linux_join): Add `pid' argument. Handle it.
16467 (linux_thread_alive): Change unsighed long argument to ptid_t.
16468 Consider dead lwps as not being alive.
16469 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16470 threads we're not interested in.
16471 (same_lwp, find_lwp_pid): New.
16472 (linux_wait_for_lwp): Change `pid' argument's type from int to
16474 (linux_wait_for_event): Rename to ...
16475 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16476 from int to ptid_t. Adjust.
16477 (linux_wait_for_event): New.
16478 (linux_wait_1): Add `ptid' argument. Change return type to
16479 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16480 that exit from the process table.
16481 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16483 (mark_lwp_dead): New.
16484 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16485 stopping all threads, mark its main lwp as dead.
16486 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16488 (fetch_register, usr_store_inferior_registers)
16489 (regsets_fetch_inferior_registers)
16490 (regsets_store_inferior_registers, linux_read_memory)
16491 (linux_write_memory): Inline `inferior_pid'.
16492 (linux_look_up_symbols): Adjust to use per-process
16493 `thread_db_active'.
16494 (linux_request_interrupt): Adjust to use ptids.
16495 (linux_read_auxv): Inline `inferior_pid'.
16496 (initialize_low): Don't reference thread_db_active.
16497 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16498 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16499 (ps_getpid): Return the pid of the current inferior.
16500 * thread-db.c (proc_handle, thread_agent): Delete.
16501 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16503 (find_one_thread): Change argument type to ptid_t. Adjust to
16505 (maybe_attach_thread): Adjust to per-process data and ptids.
16506 (thread_db_find_new_threads): Ditto.
16507 (thread_db_init): Ditto.
16508 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16509 processes table. Adjust to use ptids.
16510 (spu_kill, spu_detach): Adjust interface. Remove process from
16512 (spu_join, spu_thread_alive): Adjust interface.
16513 (spu_wait): Adjust interface. Remove process from processes
16514 table. Adjust to use ptids.
16515 * win32-low.c (current_inferior_tid): Delete.
16516 (current_inferior_ptid): New.
16517 (debug_event_ptid): New.
16518 (thread_rec): Take a ptid. Adjust.
16519 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16520 (child_delete_thread): Ditto.
16521 (do_initial_child_stuff): Add `attached' argument. Add process to
16523 (child_fetch_inferior_registers, child_store_inferior_registers):
16525 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16526 (win32_attach): Pass 1 to do_initial_child_stuff.
16527 (win32_kill): Adjust interface. Remove process from processes
16529 (win32_detach): Ditto.
16530 (win32_join): Adjust interface.
16531 (win32_thread_alive): Take a ptid.
16532 (win32_resume): Adjust to use ptids.
16533 (get_child_debug_event): Ditto.
16534 (win32_wait): Adjust interface. Remove exiting process from
16537 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16539 Non-stop mode support.
16541 * server.h (non_stop): Declare.
16542 (gdb_client_data, handler_func): Declare.
16543 (delete_file_handler, add_file_handler, start_event_loop):
16545 (handle_serial_event, handle_target_event, push_event)
16546 (putpkt_notif): Declare.
16547 * target.h (enum resume_kind): New.
16548 (struct thread_resume): Replace `step' field by `kind' field.
16549 (TARGET_WNOHANG): Define.
16550 (struct target_ops) <wait>: Add `options' argument.
16551 <supports_non_stop, async, start_non_stop>: New fields.
16552 (target_supports_non_stop, target_async): New.
16553 (start_non_stop): Declare.
16554 (mywait): Add `options' argument.
16555 * target.c (mywait): Add `options' argument. Print child exit
16556 notifications here.
16557 (start_non_stop): New.
16558 * server.c (non_stop, own_buf, mem_buf): New globals.
16559 (struct vstop_notif): New.
16560 (notif_queue): New global.
16561 (queue_stop_reply, push_event, discard_queued_stop_replies)
16562 (send_next_stop_reply): New.
16563 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16565 (attach_inferior): In non-stop mode, don't wait for the target
16567 (handle_general_set): Handle QNonStop.
16568 (handle_query): When handling qC, return the current general
16569 thread, instead of the first thread of the list.
16570 (handle_query): If the backend supports non-stop mode, include
16571 QNonStop+ in the qSupported query response.
16572 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16574 (handle_v_attach, handle_v_run): Handle non-stop mode.
16575 (handle_v_stopped): New.
16576 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16577 (myresume): Adjust to use resume_kind. Handle non-stop.
16578 (queue_stop_reply_callback): New.
16579 (handle_status): Handle non-stop mode.
16580 (main): Clear non_stop flag on reconnection. Use the event-loop.
16581 Refactor serial protocol handling from here ...
16582 (process_serial_event): ... to this new function. When GDB
16583 selects any thread, select one here. In non-stop mode, wait until
16584 GDB acks all pending events before exiting.
16585 (handle_serial_event, handle_target_event): New.
16586 * remote-utils.c (remote_open): Install remote_desc in the event
16588 (remote_close): Remove remote_desc from the event loop.
16589 (putpkt_binary): Rename to...
16590 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16591 (putpkt_binary): New as wrapper around putpkt_binary_1.
16592 (putpkt_notif): New.
16593 (prepare_resume_reply): In non-stop mode, don't change the
16595 * event-loop.c: New.
16596 * Makefile.in (OBJ): Add event-loop.o.
16597 (event-loop.o): New rule.
16599 * linux-low.h (pid_of): Moved here.
16601 (get_lwp_thread): Use lwpid_of.
16602 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16603 * linux-low.c (pid_of): Delete.
16604 (inferior_pid): Use lwpid_of.
16605 (linux_event_pipe): New.
16606 (target_is_async_p): New.
16608 (handle_extended_wait): Use lwpid_of.
16609 (add_lwp): Don't set lwpid field.
16610 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16611 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16612 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16613 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16614 first. Adjust to linux_wait_for_event interface changes. Use
16616 (linux_detach): Don't delete the main lwp here.
16617 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16618 (status_pending_p): Don't consider explicitly suspended lwps.
16619 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16620 pointer. Add OPTIONS argument. Change return type to int. Use
16621 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16622 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16623 pointer. Add status pointer argument. Return a pid instead of a
16624 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16625 changes. In non-stop mode, don't switch to a random thread.
16626 (linux_wait): Rename to...
16627 (linux_wait_1): ... this. Add target_options argument, and handle
16628 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16629 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16630 clean exit and signal exit code. Don't stop all threads in
16631 non-stop mode. In all-stop mode, only stop all threads when
16632 reporting a stop to GDB. Handle explicit thread stop requests.
16633 (async_file_flush, async_file_mark): New.
16635 (send_sigstop): Use lwpid_of.
16636 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16637 interface changes. In non-stop mode, don't switch to a random
16639 (linux_resume_one_lwp): Use lwpid_of.
16640 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16641 (linux_resume_one_thread): ... this. Handle resume_stop. In
16642 non-stop mode, don't look for pending flag in all threads.
16643 (resume_status_pending_p): Don't consider explicitly suspended
16645 (my_waitpid): Reimplement. Emulate __WALL.
16646 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16648 (sigchld_handler, linux_supports_non_stop, linux_async)
16649 (linux_start_non_stop): New.
16650 (linux_target_ops): Register linux_supports_non_stop, linux_async
16651 and linux_start_non_stop.
16652 (initialize_low): Install SIGCHLD handler.
16653 * thread-db.c (thread_db_create_event, find_one_thread)
16654 (thread_db_get_tls_address): Use lwpid_of.
16655 * win32-low.c (win32_detach): Adjust to use resume_kind.
16656 (win32_wait): Add `options' argument.
16657 * spu-low.c (spu_resume): Adjust to use resume_kind.
16658 (spu_wait): Add `options' argument.
16660 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16662 Decouple target code from remote protocol.
16664 * target.h (enum target_waitkind): New.
16665 (struct target_waitstatus): New.
16666 (struct target_ops) <wait>: Return an unsigned long. Take a
16667 target_waitstatus pointer instead of a char pointer.
16668 (mywait): Likewise.
16669 * target.c (mywait): Change prototype to return an unsigned long.
16670 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16671 * server.h (thread_from_wait, old_thread_from_wait): Delete
16673 (prepare_resume_reply): Change prototype to take a
16675 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16676 (last_status, last_ptid): New.
16677 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16678 pid instead of a signal.
16679 (attach_inferior): Remove "status" and "signal" parameters.
16681 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16683 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16684 (handle_v_requests, myresume): Remove "status" and "signal"
16685 parameters. Adjust.
16686 (handle_status): New.
16687 (main): Delete local `status'. Adjust.
16688 * remote-utils.c: Include target.h.
16689 (prepare_resume_reply): Change prototype to take a
16690 target_waitstatus. Adjust.
16692 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16694 * spu-low.c (spu_wait): Adjust.
16695 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16697 (win32_wait): Adjust.
16699 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16701 * target.h (struct thread_resume): Delete leave_stopped member.
16702 (struct target_ops): Add a `n' argument to the `resume' callback.
16703 * server.c (start_inferior): Adjust.
16704 (handle_v_cont, myresume): Adjust.
16705 * linux-low.c (check_removed_breakpoint): Adjust to resume
16706 interface change, and to removed leave_stopped field.
16707 (resume_ptr): Delete.
16708 (struct thread_resume_array): New.
16709 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16710 resume interface change.
16711 (linux_continue_one_thread, linux_queue_one_thread)
16712 (resume_status_pending_p): Check if the resume field is NULL
16713 instead of checking the leave_stopped member.
16714 (linux_resume): Adjust to the target resume interface change.
16715 * spu-low.c (spu_resume): Adjust to the target resume interface
16717 * win32-low.c (win32_detach, win32_resume): Ditto.
16719 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16721 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16723 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16725 (linux_continue_one_thread): Only preserve the stepping flag if
16726 there's a pending breakpoint.
16728 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16730 * server.c (main): After the inferior having exited, call
16731 remote_close before exiting gdbserver.
16733 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16735 Fix size of FPSCR in Power 7 processors.
16736 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16737 (PPC_FEATURE_HAS_DFP): New #define.
16738 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16741 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16743 * server.c (handle_query) Whitespace and formatting.
16745 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16747 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16748 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16749 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16750 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16751 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16752 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16753 Makefile.in, configure.ac: Fix whitespace throughout.
16754 * configure: Regenerate.
16756 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16758 * inferiors.c (find_inferior): Make it safe for the callback
16759 function to delete the currently iterated inferior.
16761 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16763 * Makefile.in (linuw_low_h): Move higher.
16764 (thread-db.o): Depend on $(linux_low_h).
16766 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16768 Rename "process" to "lwp" throughout.
16770 * linux-low.c (all_processes): Rename to...
16771 (all_lwps): ... this.
16772 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16773 (add_process): Rename to ...
16774 (add_lwp): ... this. Adjust.
16775 (linux_create_inferior): Adjust.
16776 (linux_attach_lwp): Adjust.
16777 (linux_attach): Adjust.
16778 (linux_kill_one_process): Rename to ...
16779 (linux_kill_one_lwp): ... this. Adjust.
16780 (linux_kill): Adjust.
16781 (linux_detach_one_process): Rename to ...
16782 (linux_detach_one_lwp): ... this. Adjust.
16783 (linux_detach): Adjust.
16784 (check_removed_breakpoint): Adjust.
16785 (status_pending_p): Adjust.
16786 (linux_wait_for_process): Rename to ...
16787 (linux_wait_for_lwp): ... this. Adjust.
16788 (linux_wait_for_event): Adjust.
16789 (send_sigstop): Adjust.
16790 (wait_for_sigstop): Adjust.
16791 (stop_all_processes): Rename to ...
16792 (stop_all_lwps): ... this.
16793 (linux_resume_one_process): Rename to ...
16794 (linux_resume_one_lwp): ... this. Adjust.
16795 (linux_set_resume_request, linux_continue_one_thread)
16796 (linux_queue_one_thread, resume_status_pending_p)
16797 (usr_store_inferior_registers, regsets_store_inferior_registers)
16798 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16800 * linux-low.h (get_process): Rename to ...
16801 (get_lwp): ... this. Adjust.
16802 (get_thread_process): Rename to ...
16803 (get_thread_lwp): ... this. Adjust.
16804 (get_process_thread): Rename to ...
16805 (get_lwp_thread): ... this. Adjust.
16806 (struct process_info): Rename to ...
16807 (struct lwp_info): ... this.
16808 (all_processes): Rename to ...
16809 (all_lwps): ... this.
16810 * proc-service.c (ps_lgetregs): Adjust.
16811 * thread-db.c (thread_db_create_event, find_one_thread)
16812 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16814 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16816 * server.c (handle_query): Handle "qAttached".
16818 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16820 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16821 GPLv3, update license URL.
16823 2009-03-01 Doug Evans <dje@google.com>
16825 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16826 (server_h): Add gdb_signals.h.
16827 (signals.o): Update.
16828 * server.h (target_signal_from_host,target_signal_to_host_p)
16829 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16831 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16833 * remote-utils.c (getpkt): Also generate remote-debug
16834 information if noack_mode is set.
16836 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16838 * server.c (handle_query): Report qXfer:siginfo:read and
16839 qXfer:siginfo:write as supported and handle them.
16840 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16841 * linux-low.c (linux_xfer_siginfo): New.
16842 (linux_target_ops): Set it.
16844 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16846 * server.c (gdbserver_usage): Mention --remote-debug.
16847 (main): Accept '--remote-debug' switch.
16849 2009-01-18 Doug Evans <dje@google.com>
16851 * regcache.c (new_register_cache): No need to check result of xcalloc.
16852 * server.c (handle_search_memory): Back out calls to xmalloc,
16853 result is checked and error is returned to user upon failure.
16854 (handle_query): Ditto. Add more checks for result of malloc.
16855 (handle_v_cont): Check result of malloc, report error back to
16857 (handle_v_run): Ditto. Call freeargv.
16858 * server.h (freeargv): Declare.
16859 * utils.c (freeargv): New fn.
16861 2009-01-15 Doug Evans <dje@google.com>
16863 * gdbreplay.c (perror_with_name): Make arg const char *.
16864 * server.h (target_signal_to_name): Make return type const char *.
16865 * thread-db.c (thread_db_err_str): Make return type const char *.
16866 * utils.c (perror_with_name): Make arg const char *.
16868 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16870 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16871 when handling a EXIT_PROCESS_DEBUG_EVENT.
16873 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16875 * gdbreplay.c (gdbreplay_version): Update copyright year.
16876 * server.c (gdbserver_version): Likewise.
16878 2009-01-05 Doug Evans <dje@google.com>
16880 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16881 (handle_extended_wait): Improve comment.
16883 2008-12-13 Doug Evans <dje@google.com>
16885 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16886 * server.h (ATTR_MALLOC): New macro.
16887 (xmalloc,xcalloc,xstrdup): Declare.
16888 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16889 * inferiors.c: Ditto.
16890 * linux-low.c: Ditto.
16891 * mem-break.c: Ditto.
16892 * regcache.c: Ditto.
16893 * remote-utils.c: Ditto.
16896 * win32-low.c: Ditto.
16898 2008-12-12 Doug Evans <dje@google.com>
16900 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16901 in debugging printf.
16903 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16905 2008-12-09 Doug Evans <dje@google.com>
16907 * linux-low.h (struct process_info): Delete member tid, unused.
16908 * thread-db.c (find_one_thread): Update.
16909 (maybe_attach_thread): Update.
16911 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16913 * target.h (struct target_ops): Add qxfer_osdata member.
16914 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16916 (linux_qxfer_osdata): New functions.
16917 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16919 * server.c (handle_query): Handle "qXfer:osdata:read:".
16920 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16921 (buffer_xml_printf): New functions.
16922 * server.h (struct buffer): New.
16923 (buffer_grow_str, buffer_grow_str0): New macros.
16924 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16925 (buffer_xml_printf): Declare.
16927 2008-11-24 Doug Evans <dje@google.com>
16929 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16931 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16933 * server.c (handle_v_run): Always use the supplied argument list.
16935 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16937 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16938 (xtensa_regmap_table): Add entry for scompare1.
16940 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16942 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16943 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16944 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16945 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16946 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16947 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16948 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16949 XML target descriptions.
16950 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16951 when inferior is running on an ISA 2.05 or later processor. Add
16952 special case to return offset for full 64-bit slot of FPSCR when
16955 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16957 * Makefile.in (SFILES, clean): Added sparc64 files.
16958 (reg-sparc64.o, reg-sparc64.c): New.
16959 * configure.srv (sparc*-*-linux*): New configuration.
16960 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16961 syscall arguments for SPARC.
16962 (regsets_store_inferior_registers): Likewise.
16963 * linux-sparc-low.c: New file.
16965 2008-10-21 Doug Evans <dje@google.com>
16967 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16968 (READLINE_DIR,READLINE_DEP): Delete.
16969 (INTERNAL_CFLAGS): Update.
16970 (LINTFLAGS): Update.
16972 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16974 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16975 whole argv from the last run, not just argv[0].
16977 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16979 * regcache.c (new_register_cache): Return NULL if the register
16980 cache size isn't known yet.
16981 (free_register_cache): Avoid dereferencing a NULL regcache.
16983 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16985 * configure.srv: Merge MIPS and MIPS64.
16987 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16989 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16991 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16993 * Makefile.in: Add required vsx dependencies.
16995 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16996 Declare init_registers_powerpc_vsx32l.
16997 Declare init_registers_powerpc_vsx64l.
16998 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16999 (ppc_arch_setup): Check for VSX in hwcap.
17000 (ppc_fill_vsxregset): New function.
17001 (ppc_store_vsxregset): New function.
17002 Add new VSX entry in regset_info target_regsets.
17004 * configure.srv: Add new VSX dependencies.
17006 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17008 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17009 (remote_open): Set or clear transport_is_reliable.
17010 (putpkt_binary): Don't expect acks in noack mode.
17011 (getpkt): Don't send ack/nac in noack mode.
17012 * server.c (handle_general_set): Handle QStartNoAckMode.
17013 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17015 (main): Reset noack_mode on every connection.
17016 * server.h (noack_mode): Declare.
17018 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17020 * Makefile.in (GDBREPLAY_OBS): New variable.
17021 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17023 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17024 Daniel Jacobowitz <dan@codesourcery.com>
17026 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17027 (usr_store_inferior_registers): Likewise.
17028 (regsets_store_inferior_registers): Likewise.
17030 2008-07-31 Rolf Jansen <rj@surtec.com>
17031 Pedro Alves <pedro@codesourcery.com>
17033 * configure.ac: Check for memmem declaration.
17034 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17035 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17036 (disable_packet_qfThreadInfo): Unconditionally compile.
17037 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17038 * configure, config.in: Regenerate.
17040 2008-07-28 Doug Kwan <dougkwan@google.com>
17042 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17043 (linux_write_memory): Remove declaration of errno.
17045 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17047 * linux-low.c (handle_extended_wait): Do not use "status"
17048 variable uninitialized.
17050 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17052 * server.c (handle_v_attach): Inhibit reporting dll changes.
17054 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17056 * remote-utils.c (prepare_resume_reply): If requested, don't
17057 output "thread:TID" in the T stop reply.
17059 * server.c (disable_packet_vCont, disable_packet_Tthread)
17060 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17061 (handle_query): If requested, disable support for qC, qfThreadInfo
17063 (handle_v_requests): If requested, disable support for vCont.
17064 (gdbserver_show_disableable): New.
17065 (main): Handle --disable-packet and --disable-packet=LIST.
17067 * server.h (disable_packet_vCont, disable_packet_Tthread)
17068 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17070 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17072 * server.c (gdbserver_usage): Mention --version.
17074 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17076 * Makefile.in (gdbreplay.o): New rule.
17078 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17080 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17081 message, not gdbserver.
17083 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17084 Nathan Sidwell <nathan@codesourcery.com>
17085 Joseph Myers <joseph@codesourcery.com>
17087 * acinclude.m4: Include ../../config/acx.m4.
17088 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17089 * configure, config.in: Regenerate.
17090 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17091 * server.c (gdbserver_version): Print PKGVERSION.
17092 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17093 (main): Adjust gdbserver_usage calls.
17094 * gdbreplay.c (version, host_name): Add declarations.
17095 (gdbreplay_version, gdbreplay_usage): New.
17096 (main): Accept --version and --help options.
17098 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17100 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17101 (arm_breakpoint_at): Handle Thumb.
17102 (the_low_target): Add comment.
17104 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17106 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17108 2008-05-09 Doug Evans <dje@google.com>
17110 * server.h (decode_search_memory_packet): Declare.
17111 * remote-utils.c (decode_search_memory_packet): New fn.
17112 * server.c (handle_search_memory_1): New fn.
17113 (handle_search_memory): New fn.
17114 (handle_query): Process qSearch:memory packets.
17116 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17118 * regcache.c (registers_length): Remove.
17119 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17120 full register packet.
17121 * regcache.h (registers_length): Remove prototype.
17122 * server.h (PBUFSIZ): Define to 16384.
17124 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17126 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17127 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17128 powerpc-64l.o, and powerpc-altivec64l.o.
17129 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17130 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17131 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17132 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17133 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17136 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17137 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17138 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17139 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17140 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17141 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17142 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17143 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17144 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17145 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17148 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17149 (init_registers_powerpc_32l): ... this new prototype.
17150 (init_registers_powerpc_32): Remove, replace by ...
17151 (init_registers_powerpc_altivec32l): ... this new prototype.
17152 (init_registers_powerpc_e500): Remove, replace by ...
17153 (init_registers_powerpc_e500l): ... this new prototype.
17154 (init_registers_ppc64): Remove, replace by ...
17155 (init_registers_powerpc_64l): ... this new prototype.
17156 (init_registers_powerpc_64): Remove, replace by ...
17157 (init_registers_powerpc_altivec64l): ... this new prototype.
17158 (ppc_num_regs): Set to 73.
17159 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17160 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17161 (ppc_cannot_store_register): Handle orig_r3 and trap.
17162 (ppc_arch_setup): Update init_registers_... calls.
17163 (ppc_fill_gregset): Handle orig_r3 and trap.
17165 * inferiors.c (clear_inferiors): Reset current_inferior.
17167 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17169 * acinclude.m4: Add override.m4.
17170 * configure: Regenerate.
17172 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17174 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17175 initial call to init_register_ppc64.
17177 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17179 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17180 single powerpc*-*-linux* case.
17181 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17183 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17185 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17186 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17188 * linux-ppc-low.c: Include <elf.h>.
17189 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17190 (ppc_hwcap): New global variable.
17191 (ppc_regmap): Remove __SPE__ #ifdef sections.
17192 (ppc_regmap_e500): New global variable.
17193 (ppc_cannot_store_register): Update __SPE__ special case.
17194 (ppc_get_hwcap): New function.
17195 (ppc_arch_setup): Use it to determine whether inferior supports
17196 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17197 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17198 Do not access registers if target does not support AltiVec.
17199 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17200 Do not access registers if target does not support SPE.
17201 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17203 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17205 * linux-low.c (disabled_regsets, num_regsets): New.
17206 (use_regsets_p): Delete.
17207 (linux_wait_for_process): Clear disabled_regsets.
17208 (regsets_fetch_inferior_registers): Check and set it.
17209 (regsets_store_inferior_registers): Likewise.
17210 (linux_fetch_registers, linux_store_registers): Do not use
17212 (initialize_low): Allocate disabled_regsets.
17214 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17216 * Makefile.in (LIBOBJS): New.
17217 (OBS): Use LIBOBJS.
17218 (memmem.o): New rule.
17219 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17220 * configure: Regenerated.
17222 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17224 * server.c (handle_query): Never return "unsupported" for
17225 qXfer:features:read queries.
17227 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17229 * server.c (get_features_xml): Fix inverted condition.
17230 (handle_query): Always support qXfer:feature:read.
17232 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17234 * server.c (wrapper_argv): New.
17235 (start_inferior): Handle wrapper_argv. If set, expect an extra
17237 (gdbserver_usage): Document --wrapper.
17238 (main): Parse --wrapper.
17240 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17242 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17243 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17244 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17245 (ppc_set_pc): Likewise.
17246 (ppc_arch_setup): New function.
17247 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17248 of collect_register.
17249 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17251 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17253 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17254 instead of linux-ppc64-low.o.
17255 * linux-ppc64-low.c: Remove file.
17256 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17257 (linux-ppc64-low.o): Remove rule.
17259 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17260 (init_registers_powerpc_64): Likewise.
17261 (ppc_regmap): Conditionally define depending on __powerpc64__.
17262 (ppc_cannot_store_register): Do not special-case "fpscr" when
17263 compiled on __powerpc64__.
17264 (ppc_collect_ptrace_register): New function.
17265 (ppc_supply_ptrace_register): New function.
17266 (ppc_breakpoint): Change type to "unsigned int".
17267 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17268 (the_low_target): Conditionally provide initializers for the
17269 arch_setup member depending on __powerpc64__. Install
17270 collect_ptrace_register and supply_ptrace_register members.
17272 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17274 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17275 * server.c (gdbserver_xmltarget): Define.
17276 (get_features_xml): Use it to replace "target.xml" and arch_string.
17278 * configure.srv: Remove srv_xmltarget. Add XML files that were
17279 mentioned there to srv_xmlfiles instead. Remove conditional tests
17280 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17281 srv_xmlfiles and srv_regobj to include all possible choices.
17282 * configure.ac (srv_xmltarget): Remove.
17283 (srv_xmlfiles): Do not add "target.xml".
17284 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17285 checks for supplementary target information.
17286 * configure: Regenerate.
17287 * Makefile.in (XML_TARGET): Remove.
17288 (target.xml): Remove rule.
17289 (clean): Do not clean up target.xml.
17290 (.PRECIOUS): Do not mention target.xml.
17292 * target.h (struct target_ops): Remove arch_string member.
17293 * linux-low.c (linux_arch_string): Remove.
17294 (linux_target_ops): Remove arch_string initializer.
17295 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17296 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17297 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17298 * spu-low.c (spu_arch_string): Remove.
17299 (spu_target_ops): Remove arch_string initializer.
17300 * win32-low.c (win32_arch_string): Remove.
17301 (win32_target_ops): Remove arch_string initializer.
17302 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17303 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17304 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17306 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17308 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17309 by collect_ptrace_register and supply_ptrace_register hooks.
17310 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17311 instead of checking for the_low_target.left_pad_xfer.
17312 (usr_store_inferior_registers): Use collect_ptrace_register callback
17313 instead of checking for the_low_target.left_pad_xfer.
17315 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17316 (s390_supply_ptrace_register): Likewise.
17317 (s390_fill_gregset): Call s390_collect_ptrace_register.
17318 (the_low_target): Update.
17320 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17321 (ppc_supply_ptrace_register): Likewise.
17322 (the_low_target): Update.
17324 * linux-i386-low.c (the_low_target): Update.
17325 * linux-x86-64-low.c (the_low_target): Update.
17327 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17329 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17330 reg-s390.o and reg-s390x.o.
17332 * linux-low.c (new_inferior): New global variable.
17333 (linux_create_inferior, linux_attach): Set it.
17334 (linux_wait_for_process): Call the_low_target.arch_setup after the
17335 target has stopped for the first time.
17336 (initialize_low): Do not call the_low_target.arch_setup.
17338 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17339 (s390_set_pc): Likewise.
17340 (s390_arch_setup): New function.
17341 (the_low_target): Use s390_arch_setup as arch_setup routine.
17343 * regcache.c (realloc_register_cache): New function.
17344 (set_register_cache): Call it for each existing regcache.
17346 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17348 * server.h (init_registers): Remove prototype.
17350 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17351 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17352 instead of init_registers ().
17353 * linux-arm-low.c (init_registers_arm): Add prototype.
17354 (init_registers_arm_with_iwmmxt): Likewise.
17355 (the_low_target): Add initializer for arch_setup field.
17356 * linux-cris-low.c (init_registers_cris): Add prototype.
17357 (the_low_target): Add initializer for arch_setup field.
17358 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17359 (the_low_target): Add initializer for arch_setup field.
17360 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17361 (the_low_target): Add initializer for arch_setup field.
17362 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17363 (the_low_target): Add initializer for arch_setup field.
17364 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17365 (the_low_target): Add initializer for arch_setup field.
17366 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17367 (the_low_target): Add initializer for arch_setup field.
17368 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17369 (init_registers_mips64_linux): Likewise.
17370 (the_low_target): Add initializer for arch_setup field.
17371 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17372 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17373 (the_low_target): Add initializer for arch_setup field.
17374 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17375 (init_registers_powerpc_64): Likewise.
17376 (the_low_target): Add initializer for arch_setup field.
17377 * linux-s390-low.c (init_registers_s390): Add prototype.
17378 (init_registers_s390x): Likewise.
17379 (the_low_target): Add initializer for arch_setup field.
17380 * linux-sh-low.c (init_registers_sh): Add prototype.
17381 (the_low_target): Add initializer for arch_setup field.
17382 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17383 (the_low_target): Add initializer for arch_setup field.
17384 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17385 (the_low_target): Add initializer for arch_setup field.
17387 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17388 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17389 instead of init_registers ().
17390 * win32-arm-low.c (init_registers_arm): Add prototype.
17391 (the_low_target): Add initializer for arch_setup field.
17392 * win32-i386-low.c (init_registers_i386): Add prototype.
17393 (the_low_target): Add initializer for arch_setup field.
17395 * spu-low.c (init_registers_spu): Add prototype.
17396 (initialize_low): Call initialie_registers_spu () instead of
17397 initialize_registers ().
17399 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17401 * server.c (handle_v_requests): When handling the vRun and vAttach
17402 packets, if already debugging a process, don't kill it. Return an
17405 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17407 * server.c (handle_query): Correct length check.
17409 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17411 * win32-low.c (do_initial_child_stuff): Add process handle
17412 parameter. Set current_process_handle and current_process_id from the
17413 parameters. Clear globals.
17414 (win32_create_inferior): Don't set current_process_handle and
17415 current_process_id here. Instead pass them on the call to
17416 do_initial_child_stuff.
17417 (win32_attach): Likewise.
17418 (win32_clear_inferiors): New.
17419 (win32_kill): Don't close the current process handle or the
17420 current thread handle here. Instead call win32_clear_inferiors.
17421 (win32_detach): Don't open a new handle to the process. Call
17422 win32_clear_inferiors.
17423 (win32_join): Don't rely on current_process_handle; open a new
17424 handle using the process id.
17425 (win32_wait): Call win32_clear_inferiors when the inferior process
17428 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17430 * server.c (monitor_show_help): Add "exit".
17432 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17434 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17435 (clean): Add reg-xtensa.c.
17436 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17437 * configure.srv (xtensa*-*-linux*) New target.
17438 * linux-xtensa-low.c: New.
17439 * xtensa-xtregs.c: New.
17441 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17443 * hostio.c: Don't include errno.h.
17444 (errno_to_fileio_errno): Move to hostio-errno.
17445 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17446 error number outputting to the target->hostio_last_error callback.
17447 (hostio_packet_error): Use FILEIO_EINVAL directly.
17448 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17449 calls to hostio_error.
17450 * hostio-errno.c: New.
17451 * server.h (hostio_last_error_from_errno): Declare.
17452 * target.h (target_ops): Add hostio_last_error member.
17453 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17454 as hostio_last_error handler.
17455 * spu-low.c (spu_target_ops): Likewise.
17456 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17457 (wince_hostio_last_error): New functions.
17458 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17459 as hostio_last_error handler.
17460 (win32_target_ops) [!_WIN32_WCE]: Register
17461 hostio_last_error_from_errno as hostio_last_error handler.
17462 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17463 (hostio-errno.o): New rule.
17464 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17465 * configure.srv (srv_hostio_err_objs): New variable. Default to
17467 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17468 * configure: Regenerate.
17470 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17472 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17473 (linux_kill, linux_detach): Clean up the process list.
17474 * remote-utils.c (remote_open): Improve port number parsing.
17475 (putpkt_binary, input_interrupt): Only send interrupts if the target
17477 * server.c (extended_protocol): Make static.
17478 (attached): Define earlier.
17479 (exit_requested, response_needed, program_argv): New variables.
17480 (target_running): New.
17481 (start_inferior): Clear attached here.
17482 (attach_inferior): Set attached here.
17483 (require_running): Define.
17484 (handle_query): Use require_running and target_running. Implement
17486 (handle_v_attach, handle_v_run): New.
17487 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17488 (gdbserver_usage): Update.
17489 (main): Redo argument parsing. Handle --debug and --multi. Handle
17490 --attach along with other options or after the port. Save
17491 program_argv. Support no initial program. Resynchronize
17492 communication with GDB after an error. Handle "monitor exit".
17493 Use require_running and target_running. Always allow the extended
17494 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17495 restart in extended mode.
17496 * README: Refer to the GDB manual. Update --attach usage.
17498 2007-12-20 Andreas Schwab <schwab@suse.de>
17500 * linux-low.c (STACK_SIZE): Define.
17501 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17502 (linux_test_for_tracefork): Likewise.
17504 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17506 * linux-low.c (linux_wait_for_event): Update messages. Do not
17507 reinsert auto-delete breakpoints.
17508 * mem-break.c (struct breakpoint): Change return type of handler to
17510 (set_breakpoint_at): Update handler type.
17511 (reinsert_breakpoint_handler): Return 1 instead of calling
17513 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17515 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17516 * mem-break.h (set_breakpoint_at): Update handler type.
17517 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17518 * win32-low.c (auto_delete_breakpoint): New.
17519 (get_child_debug_event): Use it.
17521 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17523 * configure.ac: Check for pread and pwrite.
17524 * hostio.c (handle_pread): Fall back to lseek and read.
17525 (handle_pwrite): Fall back to lseek and write.
17526 * config.in, configure: Regenerated.
17528 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17530 * server.c (myresume): Add own_buf argument.
17531 (main): Update calls.
17533 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17535 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17536 * remote-utils.c (remote_open): Do not call disable_async_io.
17537 (block_async_io): Delete.
17538 (unblock_async_io): Make static.
17539 (initialize_async_io): New.
17540 * server.c (handle_v_cont): Handle async I/O here.
17541 (myresume): Likewise. Move other common resume tasks here...
17542 (main): ... from here. Call initialize_async_io. Disable async
17543 I/O before the main loop.
17544 * server.h (initialize_async_io): Declare.
17545 (block_async_io, unblock_async_io): Delete prototypes.
17546 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17548 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17550 * remote-utils.c (readchar): Allow binary data in received messages.
17552 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17554 * win32-low.c (attaching): New global.
17555 (win32_create_inferior): Clear the `attaching' global.
17556 (win32_attach): Set the `attaching' global.
17557 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17558 attaching. Only set a breakpoint at the entry point if not
17561 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17563 * server.c (main): Don't report dll events on the initial
17564 connection on attaches.
17566 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17568 * server.c (main): Relax numerical bases supported for the pid of
17569 the --attach command line argument.
17571 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17573 * win32-low.c (win32_attach): Call OpenProcess before
17574 DebugActiveProcess, not after. Add last error output to error
17577 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17579 * win32-low.c (win32_get_thread_context)
17580 (win32_set_thread_context): New functions.
17581 (thread_rec): Use win32_get_thread_context.
17582 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17583 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17586 2007-12-03 Leo Zayas
17587 Pedro Alves <pedro_alves@portugalmail.pt>
17589 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17591 (child_add_thread): Minor cleanup.
17592 (child_continue): Resume artificially suspended threads before
17593 calling ContinueDebugEvent.
17594 (suspend_one_thread): New.
17595 (fake_breakpoint_event): New.
17596 (get_child_debug_event): Change return type to int. Check here if
17597 gdb sent an interrupt request. If a soft interrupt was requested,
17598 fake a breakpoint event. Return 0 if there is no event to handle,
17600 (win32_wait): Don't check here if gdb sent an interrupt request.
17601 Ensure there is a valid event to handle.
17602 (win32_request_interrupt): Add soft interruption method as last
17605 2007-12-03 Leo Zayas
17606 Pedro Alves <pedro_alves@portugalmail.pt>
17608 * win32-low.h (win32_thread_info): Add descriptions to the
17609 structure members. Replace `suspend_count' counter by a
17611 * win32-low.c (thread_rec): Update condition of when to get the
17612 context from the inferior. Rely on ContextFlags being set if it
17613 has already been retrieved. Only suspend the inferior thread if
17614 we haven't already. Warn if that fails.
17615 (continue_one_thread): s/suspend_count/suspended/. Only call
17616 ResumeThread once. Warn if that fails.
17618 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17620 * win32-low.c (win32_wait): Don't read from the inferior when it
17621 has already exited.
17623 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17625 * Makefile.in (win32_low_h): New variable.
17626 (win32-low.o): Add dependency on $(win32_low_h).
17627 (win32-arm-low.o, win32-i386-low.o): New rules.
17629 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17631 * hostio.c: Correct copyright year.
17633 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17635 * Makefile.in (OBS): Add hostio.o.
17636 (hostio.o): New rule.
17637 * server.h (handle_vFile): Declare.
17638 * hostio.c: New file.
17639 * server.c (handle_v_requests): Take packet_len and new_packet_len
17640 for binary packets. Call handle_vFile.
17641 (main): Update call to handle_v_requests.
17643 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17645 * linux-low.c: Include <sched.h>.
17647 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17649 * linux-low.c (linux_tracefork_grandchild): New.
17650 (linux_tracefork_child): Use clone.
17651 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17653 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17655 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17657 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17659 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17661 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17663 * inferiors.c (change_inferior_id): Delete.
17664 (add_pid_to_list, pull_pid_from_list): New.
17665 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17666 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17667 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17668 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17669 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17670 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17671 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17672 (using_threads): Always set to 1.
17673 (handle_extended_wait): New.
17674 (add_process): Do not set TID.
17675 (linux_create_inferior): Set must_set_ptrace_flags.
17676 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17677 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17678 (linux_thread_alive): Rename TID argument to LWPID.
17679 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17680 (linux_wait_for_event): Do not use TID or check using_threads. Update
17681 call to dead_thread_notify. Call handle_extended_wait.
17682 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17683 (send_sigstop): Delete sigstop_sent.
17684 (wait_for_sigstop): Avoid TID.
17685 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17686 (linux_test_for_tracefork): New.
17687 (linux_lookup_signals): Use thread_db_active and
17688 linux_supports_tracefork_flag.
17689 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17690 * linux-low.h (get_process_thread): Avoid TID.
17691 (struct process_ifo): Move thread_known and tid to the end. Remove
17693 (linux_attach_lwp, thread_db_init): Update prototypes.
17694 * server.h (change_inferior_id): Delete prototype.
17695 (add_pid_to_list, pull_pid_from_list): New prototypes.
17696 * thread-db.c (thread_db_use_events): New.
17697 (find_first_thread): Rename to...
17698 (find_one_thread): ...this. Update callers and messages. Do not
17699 call fatal. Check thread_db_use_events. Do not call
17700 change_inferior_id or new_thread_notify.
17701 (maybe_attach_thread): Update. Do not call new_thread_notify.
17702 (thread_db_init): Set thread_db_use_events. Check use_events.
17703 * utils.c (fatal, warning): Correct message prefix.
17705 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17707 * Makefile.in (clean): Remove new files.
17708 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17709 (powerpc-64.o, powerpc-64.c): New rules.
17710 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17711 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17713 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17715 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17716 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17717 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17718 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17719 (target_regsets): Add AltiVec and SPE register sets.
17720 * configure.ac: Check for AltiVec and SPE.
17721 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17722 (ppc_fill_vrregset, ppc_store_vrregset): New.
17723 (target_regsets): Add AltiVec register set.
17724 * configure: Regenerated.
17726 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17728 * linux-low.c (O_LARGEFILE): Define.
17729 (linux_read_memory): Use /proc/PID/mem.
17730 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17731 * configure, config.in: Regenerated.
17733 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17735 * linux-low.c (linux_wait_for_event): Do not pass signals while
17738 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17740 * win32-low.c (create_process): New.
17741 (win32_create_inferior): Use create_process instead of
17742 CreateProcess. If create_process failed retry appending an ".exe"
17743 suffix. Store the GetLastError result immediatelly after
17744 create_process calls and use it on the call to error.
17746 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17748 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17750 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17752 * configure.ac: Switch license to GPLv3.
17754 2007-08-01 Michael Snyder <msnyder@access-company.com>
17756 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17758 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17760 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17762 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17763 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17764 CloseToolhelp32Snapshot.
17765 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17766 CloseToolhelp32Snapshot.
17768 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17770 * server.c (main): Check for inferior exit before main loop.
17772 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17774 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17775 instead of on tmp_desc.
17777 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17778 Daniel Jacobowitz <dan@codesourcery.com>
17780 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17781 (add_thread): Minor cleanups.
17782 (clear_inferiors): Move lower in the file. Clear the DLL
17784 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17785 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17786 (xml_escape_text): New.
17787 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17789 (handle_v_cont): Report errors.
17790 (gdbserver_version): Update.
17791 (main): Correct size of own_buf. Do not report initial DLL events.
17792 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17793 (unloaded_dll, xml_escape_text): New.
17794 * win32-low.c (enum target_waitkind): Update comments.
17795 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17796 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17797 (win32_EnumProcessModules, win32_GetModuleInformation)
17798 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17799 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17800 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17801 (win32_Module32First, win32_Module32Next, load_toolhelp)
17802 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17803 (get_child_debug_event): Handle DLL events.
17804 (win32_wait): Likewise.
17806 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17808 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17809 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17811 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17813 * win32-low.c (handle_output_debug_string): Ignore event if not
17816 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17818 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17820 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17822 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17824 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17826 * inferiors.c (change_inferior_id): Add comment.
17827 * linux-low.c (check_removed_breakpoint): Add an early
17828 prototype. Improve debug output.
17829 (linux_attach): Doc update.
17830 (linux_detach_one_process, linux_detach): Clean up before releasing
17832 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17833 * linux-low.h (struct process_info): Doc improvement.
17834 * mem-break.c (delete_all_breakpoints): New.
17835 * mem-break.h (delete_all_breakpoints): New prototype.
17836 * thread-db.c (find_first_thread): New.
17837 (thread_db_create_event): Call it instead of
17838 thread_db_find_new_threads. Clean up unused variables.
17839 (maybe_attach_thread): Remove first thread handling.
17840 (thread_db_find_new_threads): Use find_first_thread.
17841 (thread_db_get_tls_address): Likewise.
17843 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17845 * thread-db.c (thread_db_find_new_threads): Add prototype.
17846 (thread_db_create_event): Check for the main thread before adding
17848 (maybe_attach_thread): Only enable event reporting if TID == 0.
17849 (thread_db_get_tls_address): Check for new threads.
17851 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17853 * linux-low.c (linux_create_inferior): Try execv before execvp.
17854 * spu-low.c (spu_create_inferior): Likewise.
17856 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17858 * linux-low.c (linux_create_inferior): Change execv to execvp.
17859 * spu-low.c (spu_create_inferior): Likewies.
17861 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17863 * Makefile.in (clean): Clean new files instead of deleted ones.
17864 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17865 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17867 * configure.srv: Specify XML files and new regformats for MIPS and
17869 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17870 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17871 an entry for the restart register.
17872 (mips_cannot_fetch_register, mips_cannot_store_register)
17873 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17874 register names to match the XML descriptions.
17875 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17876 restart register instead of $0.
17878 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17879 Markus Deuling <deuling@de.ibm.com>
17881 * remote-utils.c (decode_xfer_write): New function.
17882 * server.h (decode_xfer_write): Add prototype.
17883 * server.c (handle_query): Add PACKET_LEN argument. Support
17884 qXfer:spu:read and qXfer:spu:write packets.
17885 (main): Pass packet_len to handle_query.
17886 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17887 * target.h (target_ops): Add qxfer_spu.
17889 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17891 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17892 accessing non-seekable spufs files.
17894 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17896 * server.c (handle_query): Add reply for qC packet.
17898 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17899 Leo Zayas <lerele@champenstudios@com>
17901 * server.h (check_remote_input_interrupt_request): New function.
17902 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17903 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17904 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17905 (check_remote_input_interrupt_request): New function.
17906 * server.h (check_remote_input_interrupt_request): Declare.
17907 * win32-low.c (winapi_DebugBreakProcess,
17908 winapi_GenerateConsoleCtrlEvent): New typedefs.
17909 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17911 (win32_wait): Check for remote interrupt request
17912 with check_remote_input_interrupt_request.
17913 (win32_request_interrupt): New function.
17914 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17918 * win32-low.c (debug_registers_changed,
17919 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17920 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17921 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17922 (thread_rec): Get context using the low target.
17923 (child_add_thread): Call thread_added on the low target,
17924 which does the same thing.
17926 (do_initial_child_stuff): Remove debug registers references.
17927 Set context using the low target. Resume threads after
17928 setting the contexts.
17929 (child_continue): Remove dead variable. Remove debug
17930 registers references.
17931 (child_fetch_inferior_registers): Go through the low target.
17932 (do_child_store_inferior_registers): Remove.
17933 (child_store_inferior_registers): Go through the low target.
17934 (win32_resume): Remove debug registers references.
17935 Set context using the low target.
17936 (handle_exception): Change return type to void. Don't record
17937 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17938 first chance exception.
17939 (get_child_debug_event): Change return type to void. Remove
17940 goto loop. Always return after waiting for debug event.
17941 (win32_wait): Convert to switch statement. Handle spurious
17944 * win32-i386-low.c (debug_registers_changed,
17945 debug_registers_used): New.
17946 (initial_stuff): Rename to ...
17947 (i386_initial_stuff): ... this. Clear debug registers
17949 (store_debug_registers): Delete.
17950 (i386_get_thread_context): New.
17951 (load_debug_registers): Delete.
17952 (i386_set_thread_context): New.
17953 (i386_thread_added): New.
17954 (single_step): Rename to ...
17955 (i386_single_step): ... this.
17956 (do_fetch_inferior_registers): Rename to ...
17957 (i386_fetch_inferior_register): ... this.
17958 (i386_store_inferior_register): New.
17959 (the_low_target): Adapt to new interface.
17961 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17962 (arm_get_thread_context): New.
17963 (arm_set_thread_context): New.
17965 (do_fetch_inferior_registers): Rename to ...
17966 (arm_fetch_inferior_register): ... this.
17967 (arm_store_inferior_register): New.
17968 (arm_wince_breakpoint): Reimplement as unsigned long.
17969 (arm_wince_breakpoint_len): Define.
17970 (the_low_target): Adapt to new interface.
17972 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17973 load_debug_registers. Add get_thread_context, set_thread_context,
17974 thread_added and store_inferior_register. Rename
17975 fetch_inferior_registers to fetch_inferior_register.
17976 (regptr): Remove declaration.
17978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17980 * linux-low.c (linux_detach): Change return type to int. Return 0.
17981 * spu-low.c (spu_detach): Likewise.
17983 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17985 * target.h (target_ops): Change return type of detach to int.
17987 (join_inferior): New.
17988 * server.c (main): Don't skip detach support on mingw32.
17989 If the inferior doesn't support detaching return error.
17990 Call join_inferior instead of using waitpid.
17991 * linux-low.c (linux_join): New.
17992 (linux_target_op): Add linux_join.
17993 * spu-low.c (spu_join): New.
17994 (spu_target_ops): Add spu_join.
17995 * win32-low.c (win32_detach): Adapt to new interface.
17996 Reopen current_process_handle before detaching. Issue a child
17997 resume before detaching.
17999 (win32_target_op): Add win32_join.
18001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18003 * win32-low.c (win32-attach): Fix return value.
18004 * target.h (target_ops): Describe ATTACH return values.
18006 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18008 * win32-low.c (GETPROCADDRESS): Define.
18009 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18010 (winapi_DebugSetProcessKillOnExit): Likewise.
18011 (win32_create_inferior): Force usage of ansi CreateProcessA.
18012 (win32_attach): Use GETPROCADDRESS.
18013 (win32_detach): Likewise.
18015 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18017 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18019 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18021 * win32-low.c: Commit leftover changes from 2007-03-29.
18023 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18025 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18026 fields short instead of int. Add explicit padding.
18027 (i387_cache_to_fsave): Remove unnecessary casts.
18028 (i387_fsave_to_cache): Doc fix.
18029 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18031 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18033 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18034 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18036 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18038 * configure.srv (arm*-*-mingw32ce*): Move near the other
18041 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18043 * configure.ac: Add errno checking.
18044 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18045 sys/file.h and malloc.h.
18046 (AC_CHECK_DECLS): Add perror.
18047 (srv_mingwce): Handle.
18048 * configure.srv (i[34567]86-*-cygwin*): Add
18049 win32-i386-low.o to srv_tgtobj.
18050 (i[34567]86-*-mingw*): Likewise.
18051 (arm*-*-mingw32ce*): Add case.
18052 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18053 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18054 [__MINGW32CE__] (strerror): New function.
18055 [__MINGW32CE__] (errno): Define to GetLastError.
18056 [__MINGW32CE__] (COUNTOF): New macro.
18057 (remote_open): Remove extra close call.
18058 * mem-break.c (delete_breakpoint_at): New function.
18059 * mem-break.h (delete_breakpoint_at): Declare.
18060 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18061 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18062 [USE_WIN32API] (read, write): Add char* casts.
18063 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18064 * server.h: Include wincecompat.h on Windows CE.
18065 [HAVE_ERRNO_H]: Check.
18066 (perror): Declare if not declared.
18067 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18068 (perror_with_name): Remove errno declaration.
18069 * wincecompat.h: New.
18070 * wincecompat.c: New.
18071 * win32-low.h: New.
18072 * win32-arm-low.c: New.
18073 * win32-i386-low.c: New.
18074 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18075 (OUTMSG2): Make it safe.
18077 (COUNTOF): New macro.
18078 (NUM_REGS): Get it from the low target.
18079 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18080 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18081 (thread_rec): Let low target handle debug registers.
18082 (child_add_thread): Likewise.
18083 (child_init_thread_list): Likewise.
18084 (continue_one_thread): Likewise.
18086 (do_child_fetch_inferior_registers): Move to ...
18087 * win32-i386-low.c: ... here, and rename to ...
18088 (do_fetch_inferior_registers): ... this.
18089 * win32-low.c (child_fetch_inferior_registers):
18090 Go through the low target.
18091 (do_child_store_inferior_registers): Use regptr.
18092 (strwinerror): New function.
18093 (win32_create_inferior): Handle Windows CE.
18094 Use strwinerror instead of strerror on Windows error
18095 codes. Add program to the error output.
18096 Don't close the main thread handle on Windows CE.
18097 (win32_attach): Use coredll.dll on Windows CE.
18098 (win32_kill): Close current process and current
18100 (win32_detach): Use coredll.dll on Windows CE.
18101 (win32_resume): Let low target handle debug registers, and
18103 (handle_exception): Add/Remove initial breakpoint. Avoid
18104 non-existant WSTOPSIG on Windows CE.
18105 (win32_read_inferior_memory): Cast to remove warning.
18106 (win32_arch_string): Go through the low target.
18107 (initialize_low): Call set_breakpoint_data with the low
18108 target's breakpoint.
18109 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18110 FOP_REGNUM, mappings): Move to ...
18111 * win32-i386-low.c: ... here.
18112 * win32-low.c (win32_thread_info): Move to ...
18113 * win32-low.h: ... here.
18114 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18115 win32-arm-low.c and wincecompat.c.
18116 (all:): Add $EXEEXT.
18117 (install-only:): Likewise.
18118 (gdbserver:): Likewise.
18119 (gdbreplay:): Likewise.
18120 * config.in: Regenerate.
18121 * configure: Regenerate.
18123 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18125 * win32-low.c: Rename typedef thread_info to
18126 win32_thread_info throughout.
18128 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18130 * win32-i386-low.c: Rename to ...
18131 * win32-low.c: ... this.
18132 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18133 * Makefile.in: Likewise.
18135 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18137 * remote-utils.c (monitor_output): Constify msg parameter.
18138 * server.h (monitor_output): Likewise.
18139 * win32-i386-low.c (handle_output_debug_string): New.
18140 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18141 handle_output_debug_string.
18142 (get_child_debug_event): Likewise.
18144 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18146 * server.c (main): Correct strtoul check.
18148 2007-03-27 Jon Ringle <jon@ringle.org>
18150 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18152 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18154 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18156 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18158 * terminal.h: Check HAVE_SGTTY_H.
18160 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18162 * remote-utils.c (remote_open): Print out the assigned port number.
18164 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18166 * remote-utils.c (monitor_output): New function.
18167 * server.c (debug_threads): Define here.
18168 (monitor_show_help): New function.
18169 (handle_query): Handle qRcmd.
18170 (main): Do not handle 'd' packet.
18171 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18172 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18175 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18177 * Makefile.in (EXEEXT): New.
18178 (clean): Use $(EXEEXT).
18180 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18182 * target.h (target_ops): Rename send_signal to request_interrupt,
18183 and remove enum target_signal parameter.
18184 * linux-low.c (linux_request_interrupt): Rename from
18185 linux_send_signal, and always send SIGINT.
18186 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18187 and always send SIGINT.
18188 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18190 (input_interrupt): Likewise.
18192 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18194 * server.c (get_features_xml): Check if target implemented
18196 * win32-i386-low.c (win32_arch_string): New.
18197 (win32_target_ops): Add win32_arch_string as arch_string member.
18199 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18201 * spu-low.c (spu_arch_string): New.
18202 (spu_target_ops): Add spu_arch_string.
18204 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18206 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18207 * configure.ac: Do not check for terminal.h.
18208 * configure, config.in: Regenerated.
18210 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18212 * Makefile.in (OBS): Add $(XML_BUILTIN).
18213 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18215 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18216 (arm-with-iwmmxt.c): New.
18217 * config.in, configure: Regenerate.
18218 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18219 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18220 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18221 (arm*-*-linux*): Add iWMMXt and regset support.
18222 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18223 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18224 (arm_store_wmmxregset, target_regsets): New.
18225 * server.c (get_features_xml): Take annex argument. Check builtin
18227 (handle_query): Handle multiple annexes.
18229 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18231 * remote-utils.c [USE_WIN32API] (read, write): Define.
18232 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18235 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18237 * linux-i386-low.c (the_low_target): Set arch_string.
18238 * linux-x86-64-low.c (the_low_target): Likewise.
18239 * linux-low.c (linux_arch_string): New.
18240 (linux_target_ops): Add it.
18241 * linux-low.h (struct linux_target_ops): Add arch_string.
18242 * server.c (write_qxfer_response): Use const void * for DATA.
18243 (get_features_xml): New.
18244 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18245 * target.h (struct target_ops): Add arch_string method.
18247 2007-01-03 Denis Pilat <denis.pilat@st.com>
18248 Daniel Jacobowitz <dan@codesourcery.com>
18250 * linux-low.c (linux_kill): Handle being called with no threads.
18251 * win32-i386-low.c (win32_kill): Likewise.
18252 (get_child_debug_event): Clear current_process_handle.
18254 2006-12-30 Denis PILAT <denis.pilat@st.com>
18255 Daniel Jacobowitz <dan@codesourcery.com>
18257 * remote-utils.c (remote_open): Check the type of specified
18258 serial port devices before opening them.
18259 * server.c (main): Kill the inferior if an error occurs during
18260 the first remote_open.
18262 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18264 * README: Update supported targets.
18266 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18268 * Makefile.in (clean): Remove reg-mips64.c.
18269 (reg-mips64.c, reg-mips64.o): New rules.
18270 * configure.srv: Handle mips64. Include regset support for mips.
18271 * linux-mips-low.c (union mips_register): New.
18272 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18273 (mips_breakpoint, mips_breakpoint_at): Use int.
18274 (mips_collect_register, mips_supply_register)
18275 (mips_collect_register_32bit, mips_supply_register_32bit)
18276 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18277 (mips_store_fpregset, target_regsets): New.
18278 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18280 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18282 * configure.srv: Add target "spu*-*-*".
18283 * Makefile.in (clean): Remove reg-spu.c.
18284 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18285 * spu-low.c: New file.
18287 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18289 * configure.ac: Correct td_thr_tls_get_addr test.
18290 * configure: Regenerated.
18292 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18294 * linux-low.c (linux_wait_for_event): Reformat. Use the
18295 pass_signals array.
18296 * remote-utils.c (decode_address_to_semicolon): New.
18297 * server.c (pass_signals, handle_general_set): New.
18298 (handle_query): Mention QPassSignals for qSupported.
18299 (main): Call handle_general_set.
18300 * server.h (pass_signals, decode_address_to_semicolon): New.
18302 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18304 * server.c (handle_query): Correct error handling for read_auxv.
18306 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18308 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18309 and srv_linux_thread_db to yes.
18310 * linux-s390-low.c (s390_fill_gregset): New function.
18311 (target_regsets): Define data structure.
18313 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18315 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18316 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18317 * config.in, configure: Regenerated.
18318 * inferiors.c (gdb_id_to_thread): New function.
18319 (gdb_id_to_thread_id): Use it.
18320 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18321 * linux-low.h (struct process_info): Add th member.
18322 (thread_db_get_tls_address): New prototype.
18323 * remote-utils.c (decode_address): Make non-static.
18324 * server.c (handle_query): Handle qGetTLSAddr.
18325 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18326 * target.h (struct target_ops): Add get_tls_address.
18327 * thread-db.c (maybe_attach_thread): Save the thread handle.
18328 (thread_db_get_tls_address): New.
18330 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18332 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18333 (linux_resume_one_process): Take a siginfo_t *. Update all
18334 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18335 (struct pending_signals): Add a siginfo_t.
18336 (linux_wait_for_process): Always set last_status.
18337 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18338 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18339 * linux-low.h (struct process_info): Add last_status.
18341 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18343 * remote-utils.c (try_rle): New function.
18344 (putpkt_binary): Use it.
18346 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18348 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18349 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18350 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18351 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18352 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18355 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18357 * server.c (terminal_fd): New variable.
18358 (old_foreground_pgrp): Likewise.
18359 (restore_old_foreground_pgrp): New function.
18360 (start_inferior): Record the terminal file descriptor in terminal_fd
18361 and its original foreground group in old_foreground_pgrp. Register
18362 restore_old_foreground_pgrp with atexit().
18364 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18366 * server.c (handle_query): Correct qPart to qXfer.
18368 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18370 * configure.ac: Check for more headers which are missing on
18371 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18372 * configure.srv: Add Cygwin and mingw32.
18373 * remote-utils.c: Don't include headers unconditionally which
18374 are missing on mingw32. Include <winsock.h> for mingw32.
18375 (remote_open): Adjust for mingw32 support. Flush
18376 standard error after writing to it.
18377 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18378 (unblock_async_io, enable_async_io, disable_async_io)
18379 (readchar, getpkt): Update for Winsock support.
18380 (prepare_resume_reply): Expect a protocol signal number.
18381 * server.c: Disable <sys/wait.h> on mingw32.
18382 (start_inferior): Adjust for mingw32 support. Flush
18383 standard error after writing to it.
18384 (attach_inferior): Likewise. Use protocol signal
18386 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18388 * win32-i386-low.c: New file.
18389 * Makefile.in (XM_CLIBS): Set.
18390 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18391 (win32-i386-low.o): New dependency rule.
18392 * linux-low.c (linux_wait): Use target signal numbers.
18393 * target.h (struct target_ops): Doc fix.
18394 * server.h (target_signal_to_name): New prototype.
18395 * gdbreplay.c: Don't include headers unconditionally which
18396 are missing on mingw32. Include <winsock.h> for mingw32.
18397 (remote_close, remote_open): Adjust for Winsock support.
18398 * configure, config.in: Regenerated.
18400 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18402 * server.c (decode_xfer_read, write_qxfer_response): New.
18403 (handle_query): Take a packet length argument. Handle
18404 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18405 the qSupported response.
18406 (main): Update call to handle_query.
18408 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18410 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18411 (putpkt_binary): Renamed from putpkt and adjusted for binary
18413 (putpkt): New wrapper for putpkt_binary.
18414 (readchar): Don't mask off the high bit.
18415 (decode_X_packet): New function.
18416 * server.c (main): Call putpkt_binary if a handler sets the packet
18417 length. Save the length of the incoming packet. Handle 'X'.
18418 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18420 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18422 * server.c (handle_query): Handle qSupported.
18424 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18426 * remote-utils.c (all_symbols_looked_up): New variable.
18427 (look_up_one_symbol): Check it.
18428 * server.h (look_up_one_symbol): New declaration.
18429 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18431 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18433 * Makefile.in (linux-arm-low.o): Update dependencies.
18434 * linux-arm-low.c: Include "gdb_proc_service.h".
18435 (PTRACE_GET_THREAD_AREA): Define.
18436 (ps_get_thread_area): New function.
18438 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18440 * configure.srv (m68k*-*-uclinux*): New target.
18441 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18442 (linux_resume_one_process): Remove extraneous cast.
18443 (linux_read_offsets): New.
18444 (linux_target_op): Add linux_read_offsets on mmuless systems.
18445 * server.c (handle_query): Add qOffsets logic.
18446 * target.h (struct target_ops): Add read_offsets.
18448 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18450 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18451 (PTRACE_GET_THREAD_AREA): Define.
18452 (ps_get_thread_area): New function.
18453 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18454 (linux-x86-64-low.o): Update.
18456 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18458 * configure.ac: Remove checks for prfpregset_t.
18459 * gdb_proc_service.h: New file.
18460 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18461 new "gdb_proc_service.h".
18462 * proc-service.c: Likewise.
18463 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18464 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18465 * Makefile.in (gdb_proc_service_h): Updated.
18466 * configure, config.in: Regenerated.
18468 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18470 * remote-utils.c (prepare_resume_reply): Move declaration
18471 of gdb_id_from_wait to the top of the block.
18473 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18475 * linux-low.c (regsets_store_inferior_registers): Read the regset
18476 from the target before filling it.
18478 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18480 * server.c (attach_inferior): Return SIGTRAP for a successful
18483 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18485 * Makefile.in (OBS): Add version.o.
18486 (STAGESTUFF): Delete.
18487 (version.o): Add dependencies.
18488 (version.c): Replace rule.
18489 (clean): Remove version.c.
18490 * server.c (gdbserver_version): New.
18491 (gdbserver_usage): Use printf.
18492 (main): Handle --version and --help.
18493 * server.h (version, host_name): Add declarations.
18495 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18507 * linux-x86-64-low.c:
18509 * linux-s390-low.c:
18510 * linux-ppc64-low.c:
18512 * linux-mips-low.c:
18513 * linux-m68k-low.c:
18514 * linux-m32r-low.c:
18517 * linux-ia64-low.c:
18518 * linux-i386-low.c:
18519 * linux-crisv32-low.c:
18531 * gdbserver.1: Add (C) after Copyright. Update the FSF
18534 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18536 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18537 (arm_breakpoint_at): Recognize both breakpoints.
18538 (the_low_target): Use the correct breakpoint instruction.
18540 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18542 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18543 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18544 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18545 (the_low_target): Update.
18547 2005-10-25 Andreas Schwab <schwab@suse.de>
18549 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18551 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18552 (ia64_num_regs): Reduce to 462.
18554 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18556 * acinclude.m4: Correct quoting.
18557 * aclocal.m4: Regenerated.
18559 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18560 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18561 (thread_db_init): Call thread_db_err_str.
18562 * configure.ac: Check for TD_VERSION.
18563 * config.in, configure: Regenerated.
18565 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18567 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18569 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18571 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18572 is not available. Define HAVE_PTRACE_GETREGS if it is.
18573 * config.in, configure: Regenerated.
18574 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18575 * linux-i386-low.c, linux-m68k-low.c: Update to use
18576 HAVE_PTRACE_GETREGS.
18577 * linux-low.c (regsets_fetch_inferior_registers)
18578 (regsets_store_inferior_registers): Only return 0 if we processed
18580 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18581 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18583 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18585 * inferiors.c (struct thread_info): Add gdb_id.
18586 (add_thread): Add gdb_id argument.
18587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18588 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18589 calls to add_thread.
18590 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18591 * server.c (handle_query): Use thread_to_gdb_id.
18592 (handle_v_cont, main): Use gdb_id_to_thread_id.
18593 * server.h (add_thread): Update prototype.
18594 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18597 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18599 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18600 left-padded registers.
18601 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18602 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18604 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18606 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18607 * configure: Regenerate.
18608 * config.in: Regenerate.
18609 * server.h (NEED_DECLARATION_STRERROR):
18610 Replace with !HAVE_DECL_STRERROR.
18612 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18614 * linux-low.c (linux_wait, linux_send_signal): Don't test
18615 an unsigned long variable for > 0 if it could be MAX_ULONG.
18616 * server.c (myresume): Likewise.
18617 * target.c (set_desired_inferior): Likewise.
18619 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18621 * configure.ac: Simplify and improve check for socklen_t.
18622 * configure, config.in: Regenerate.
18624 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18626 * acconfig.h: Remove.
18627 * configure.ac: Add a test for socklen_t. Use three-argument
18628 AC_DEFINE throughout.
18629 * config.in: Regenerated using autoheader 2.59.
18630 * configure: Regenerated.
18632 * gdbreplay.c (socklen_t): Provide a default.
18633 (remote_open): Use socklen_t.
18634 * remote-utils.c (socklen_t): Provide a default.
18635 (remote_open): Use socklen_t.
18636 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18639 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18641 * linux-low.c (linux_read_memory, linux_write_memory)
18642 (linux_read_auxv): Likewise.
18643 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18644 (check_mem_write): Likewise.
18645 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18647 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18648 (registers_from_string, register_data): Likewise.
18649 * server.c (handle_query, main): Likewise.
18650 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18651 (decode_M_packet): Likewise.
18652 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18653 * target.h (struct target_ops): Update read_memory, write_memory,
18655 (read_inferior_memory, write_inferior_memory): Update.
18656 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18657 to unsigned char *.
18658 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18659 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18660 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18661 linux-s390-low.c, linux-sh-low.c: Update for changes in
18662 read_inferior_memory and the_low_target->breakpoint.
18664 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18666 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18667 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18668 * configure.srv: Add powerpc64-*-linux*.
18669 * linux-ppc64-low.c: New file.
18671 2005-05-23 Orjan Friberg <orjanf@axis.com>
18673 * linux-cris-low.c: New file with support for CRIS.
18674 * linux-crisv32-low.c: Ditto for CRISv32.
18675 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18676 (clean): Add reg-cris.c and reg-crisv32.c.
18677 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18678 reg-crisv32.o, and reg-crisv32.c to make rules.
18679 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18680 recognized targets.
18682 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18684 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18685 of sizeof (PTRACE_XFER_TYPE).
18686 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18688 2005-05-12 Orjan Friberg <orjanf@axis.com>
18690 * target.h (struct target_ops): Add insert_watchpoint,
18691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18692 pointers for hardware watchpoint support.
18693 * linux-low.h (struct linux_target_ops): Ditto.
18694 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18695 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18696 to linux_target_ops.
18697 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18699 * server.c (main): Recognize 'Z' and 'z' packets.
18701 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18703 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18704 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18705 (the_low_target): Add new members.
18707 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18709 * proc-service.c (ps_lgetregs): Search all_processes instead of
18712 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18714 * server.c (start_inferior): Change return type to int.
18715 (attach_inferior): Change sigptr to int *.
18716 (handle_v_cont, handle_v_requests): Change signal to int *.
18717 (main): Change signal to int.
18719 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18721 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18722 * configure.srv: Add m32r*-*-linux*.
18723 * linux-m32r-low.c: New file.
18725 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18727 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18729 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18731 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18732 Take unsigned long arguments for PIDs.
18733 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18734 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18735 (wait_for_sigstop, linux_resume_one_process)
18736 (regsets_fetch_inferior_registers, linux_send_signal)
18737 (linux_read_auxv): Likewise. Update the types of variables holding
18738 PIDs. Update format string specifiers.
18739 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18740 * remote-utils.c (prepare_resume_reply): Likewise.
18741 * server.c (cont_thread, general_thread, step_thread)
18742 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18744 (handle_query): Update format specifiers.
18745 (handle_v_cont, main): Use strtoul for thread IDs.
18746 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18747 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18748 (general_thread, step_thread, thread_from_wait)
18749 (old_thread_from_wait): Update.
18750 * target.h (struct thread_resume): Use unsigned long for THREAD.
18751 (struct target_ops): Use unsigned long for arguments to attach and
18754 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18756 * acinclude.m4: Include bfd/bfd.m4 directly.
18757 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18758 <agriffis@toolchain.org>.
18759 * aclocal.m4, configure: Regenerated.
18761 2005-01-07 Andrew Cagney <cagney@gnu.org>
18763 * configure.ac: Rename configure.in, require autoconf 2.59.
18764 * configure: Re-generate.
18766 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18768 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18769 LIBS when finished.
18770 * aclocal.m4: Regenerated.
18771 * configure: Regenerated.
18773 2004-11-21 Andreas Schwab <schwab@suse.de>
18775 * linux-m68k-low.c (m68k_num_gregs): Define.
18776 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18777 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18778 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18779 (m68k_breakpoint_at): New. Add to the_low_target.
18781 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18782 srv_linux_thread_db to yes.
18784 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18786 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18787 (ARCH_SET_FS): Likewise.
18788 (ARCH_GET_FS): Likewise.
18789 (ARCH_GET_GS): Likewise.
18791 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18793 * linux-i386-low.c (ps_get_thread_area): New.
18794 * linux-x86-64-low.c (ps_get_thread_area): New.
18795 * linux-low.c: Include <sys/syscall.h>.
18796 (linux_kill_one_process): Don't kill the first thread here.
18797 (linux_kill): Kill the first thread here.
18798 (kill_lwp): New function.
18799 (send_sigstop, linux_send_signal): Use it.
18800 * proc-service.c: Clean up #ifdefs.
18801 (fpregset_info): Delete.
18802 (ps_lgetregs): Update and enable implementation.
18803 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18805 * remote-utils.c (struct sym_cache, symbol_cache): New.
18806 (input_interrupt): Print a clearer message.
18807 (async_io_enabled): New variable.
18808 (enable_async_io, disable_async_io): Use it. Update comments.
18809 (look_up_one_symbol): Use the symbol cache.
18810 * thread-db.c (thread_db_look_up_symbols): New function.
18811 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18813 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18815 * configure.in: Test for -rdynamic.
18816 * configure: Regenerated.
18817 * Makefile (INTERNAL_LDFLAGS): New.
18818 (gdbserver, gdbreplay): Use it.
18820 2004-09-02 Andrew Cagney <cagney@gnu.org>
18822 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18824 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18826 * linux-low.c (linux_wait): Clear all_processes list also.
18828 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18830 * linux-low.c: Include <errno.h>. Remove extern declaration of
18833 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18835 * gdbreplay.c, server.h, utils.c: Update copyright years.
18837 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18839 * server.c (main): Print child status or termination signal from
18840 variable 'signal', not 'sig'.
18842 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18844 * linux-low.c (linux_read_memory): Change return type to
18845 int. Check for and return error from ptrace().
18846 * target.c (read_inferior_memory): Change return type to int. Pass
18847 back return status from the_target->read_memory().
18848 * target.h (struct target_ops): Adapt *read_memory() prototype.
18850 (read_inferior_memory): Adapt prototype.
18851 * server.c (main): Return an error packet if
18852 read_inferior_memory() returns an error.
18854 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18856 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18857 Unify with other clean targets.
18859 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18861 * server.c (handle_v_cont): Call set_desired_inferior.
18863 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18865 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18867 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18869 * linux-low.c (linux_wait): Unblock async I/O.
18870 (linux_resume): Block and enable async I/O.
18871 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18872 * server.h (block_async_io, unblock_async_io): Add prototypes.
18874 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18876 * remote-utils.c (remote_open): Print a status notice after
18877 opening a TCP port.
18878 * server.c (attach_inferior): Print a status notice after
18881 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18883 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18885 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18887 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18889 * server.c, target.h: Update copyright years.
18891 2004-02-25 Roland McGrath <roland@redhat.com>
18893 * target.h (struct target_ops): New member `read_auxv'.
18894 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18895 * linux-low.c (linux_read_auxv): New function.
18896 (linux_target_ops): Initialize `read_auxv' member to that.
18898 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18900 Committed by Jim Blandy <jimb@redhat.com>.
18902 * linux-s390-low.c (s390_num_regs): Update.
18903 (s390_regmap): Remove control registers. Use __s390x__ predefine
18904 instead of GPR_SIZE to distiguish s390 and s390x targets.
18906 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18908 * linux-low.c: Update copyright year.
18909 (check_removed_breakpoint): Clear pending_is_breakpoint.
18910 (linux_set_resume_request, linux_queue_one_thread)
18911 (resume_status_pending_p): New functions.
18912 (linux_continue_one_thread): Use process->resume.
18913 (linux_resume): Only resume threads if there are no pending events.
18914 * linux-low.h (struct process_info): Add resume request
18917 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18919 * regcache.c (new_register_cache): Clear the allocated register
18920 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18922 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18924 * linux-low.c (linux_resume): Take a struct thread_resume *
18926 (linux_wait): Update call.
18927 (resume_ptr): New static variable.
18928 (linux_continue_one_thread): Renamed from
18929 linux_continue_one_process. Use resume_ptr.
18930 (linux_resume): Use linux_continue_one_thread.
18931 * server.c (handle_v_cont, handle_v_requests): New functions.
18932 (myresume): New function.
18933 (main): Handle 'v' case.
18934 * target.h (struct thread_resume): New type.
18935 (struct target_ops): Change argument of "resume" to struct
18937 (myresume): Delete macro.
18939 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18941 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18942 (uninstall): Support DESTDIR.
18944 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18946 * configure.srv: Add xscale*linux copy of arm*linux entry.
18948 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18950 * linux-arm-low.c (arm_reinsert_addr): New function.
18951 (the_low_target): Add arm_reinsert_addr.
18953 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18955 * mem-break.c: Remove whitespace at end of file.
18957 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18959 * configure.in: Check whether we need to prototype strerror.
18960 * server.h: Optionally prototype strerror.
18961 * gdbreplay.c (perror_with_name): Use strerror.
18962 * linux-low.c (linux_attach_lwp): Use strerror.
18963 * utils.c (perror_with_name): Use strerror.
18964 * config.in, configure: Regenerated.
18966 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18968 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18969 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18971 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18973 * Makefile.in (SFILES): Update.
18974 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18975 low-sun3.c: Remove files.
18977 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18979 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18980 (linux_detach_one_process, linux_detach): New functions.
18981 (linux_target_ops): Add linux_detach.
18982 * server.c (main): Handle 'D' packet.
18983 * target.h (struct target_ops): Add "detach" member.
18984 (detach_inferior): Define.
18986 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18988 From Kelley Cook <kelleycook@wideopenwest.com>:
18989 * configure.srv: Accept i[34567]86 variants.
18991 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18993 * linux-low.c (linux_wait_for_event): Correct comment typos.
18994 (linux_resume_one_process): Call check_removed_breakpoint.
18995 (linux_send_signal): New function.
18996 (linux_target_ops): Add linux_send_signal.
18997 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18999 * target.h (struct target_ops): Add send_signal.
19001 2003-05-29 Jim Blandy <jimb@redhat.com>
19003 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19004 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19005 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19006 away part of the register's value.
19008 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19010 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19011 (linux_wait_for_event, linux_init_signals): Likewise.
19013 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19015 * configure.in: Check for stdlib.h.
19016 * configure: Regenerated.
19017 * config.in: Regenerated.
19019 2003-01-04 Andreas Schwab <schwab@suse.de>
19021 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19023 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19025 * Makefile.in: Remove obsolete code.
19027 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19029 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19030 defined(PT_FPR0_HI).
19032 2002-11-17 Stuart Hughes <seh@zee2.com>
19034 * linux-arm-low.c (arm_num_regs): Increase.
19035 (arm_regmap): Include status register.
19037 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19039 * linux-low.c (register_addr): Remove incorrect -1 check.
19041 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19043 * linux-low.c (linux_create_inferior): Call setpgid. Return
19045 (unstopped_p, linux_signal_pid): Remove.
19046 (linux_target_ops): Remove linux_signal_pid.
19047 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19048 global instead of target method.
19049 * target.h (struct target_ops): Remove signal_pid. Update comment
19050 for create_inferior.
19051 * server.c (signal_pid): New variable.
19052 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19053 gdbserver. Set the child to be the foreground process group.
19054 (attach_inferior): Set signal_pid.
19056 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19058 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19060 2002-08-20 Jim Blandy <jimb@redhat.com>
19062 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19065 2002-08-01 Andrew Cagney <cagney@redhat.com>
19067 * Makefile.in: Make chill references obsolete.
19069 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19071 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19072 * configure: Regenerate.
19073 * config.in: Regenerate.
19075 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19077 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19078 (perror_with_name, remote_close, remote_open, expect, play): Static.
19080 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19082 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19083 byte offsets instead of an array of indexes.
19084 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19086 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19088 * regcache.c: Add comment.
19090 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19092 * thread-db.c: New file.
19093 * proc-service.c: New file.
19094 * acinclude.m4: New file.
19095 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19096 proc-service.o, and thread-db.o.
19097 (linux-low.o): Add USE_THREAD_DB.
19098 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19099 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19100 * aclocal.m4: Regenerated.
19101 * config.in: Regenerated.
19102 * configure: Regenerated.
19103 * configure.in: Check for proc_service.h, sys/procfs.h,
19104 thread_db.h, and linux/elf.h headrs.
19105 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19106 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19107 Check for -lthread_db and thread support.
19108 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19109 PowerPC, and SuperH.
19110 * i387-fp.c: Constify arguments.
19111 * i387-fp.h: Likewise.
19112 * inferiors.c: (struct thread_info): Renamed from
19113 `struct inferior_info'. Remove PID member. Use generic inferior
19114 list header. All uses updated.
19115 (inferiors, signal_pid): Removed.
19116 (all_threads): New variable.
19117 (get_thread): Define.
19118 (add_inferior_to_list): New function.
19119 (for_each_inferior): New function.
19120 (change_inferior_id): New function.
19121 (add_inferior): Removed.
19122 (remove_inferior): New function.
19123 (add_thread): New function.
19124 (free_one_thread): New function.
19125 (remove_thread): New function.
19126 (clear_inferiors): Use for_each_inferior and free_one_thread.
19127 (find_inferior): New function.
19128 (find_inferior_id): New function.
19129 (inferior_target_data): Update argument type.
19130 (set_inferior_target_data): Likewise.
19131 (inferior_regcache_data): Likewise.
19132 (set_inferior_regcache_data): Likewise.
19133 * linux-low.c (linux_bp_reinsert): Remove.
19134 (all_processes, stopping_threads, using_thrads)
19135 (struct pending_signals, debug_threads, pid_of): New.
19136 (inferior_pid): Replace with macro.
19137 (struct inferior_linux_data): Remove.
19138 (get_stop_pc, add_process): New functions.
19139 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19140 Use add_process and add_thread.
19141 (linux_attach_lwp): New function, based on old linux_attach. Use
19142 add_process and add_thread. Set stop_expected for new threads.
19143 (linux_attach): New function.
19144 (linux_kill_one_process): New function.
19145 (linux_kill): Kill all LWPs.
19146 (linux_thread_alive): Use find_inferior_id.
19147 (check_removed_breakpoints, status_pending_p): New functions.
19148 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19149 Update. Use WNOHANG. Wait for cloned processes also. Update process
19150 struct for the found process.
19151 (linux_wait_for_event): New function.
19152 (linux_wait): Use it. Support LWPs.
19153 (send_sigstop, wait_for_sigstop, stop_all_processes)
19154 (linux_resume_one_process, linux_continue_one_process): New functions.
19155 (linux_resume): Support LWPs.
19156 (REGISTER_RAW_SIZE): Remove.
19157 (fetch_register): Use register_size instead. Call supply_register.
19158 (usr_store_inferior_registers): Likewise. Call collect_register.
19159 Fix recursive case.
19160 (regsets_fetch_inferior_registers): Improve error message.
19161 (regsets_store_inferior_registers): Add debugging.
19162 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19163 (unstopped_p, linux_signal_pid): New functions.
19164 (linux_target_ops): Add linux_signal_pid.
19165 (linux_init_signals): New function.
19166 (initialize_low): Call it. Initialize using_threads.
19167 * regcache.c (inferior_regcache_data): Add valid
19169 (get_regcache): Fetch registers lazily. Add fetch argument
19170 and update all callers.
19171 (regcache_invalidate_one, regcache_invalidate): New
19173 (new_register_cache): Renamed from create_register_cache.
19174 Return the new regcache.
19175 (free_register_cache): Change argument to a void *.
19176 (registers_to_string, registers_from_string): Call get_regcache
19177 with fetch flag set.
19178 (register_data): Make static. Pass fetch flag to get_regcache.
19179 (supply_register): Call get_regcache with fetch flag clear.
19180 (collect_register): Call get_regcache with fetch flag set.
19181 (collect_register_as_string): New function.
19182 * regcache.h: Update.
19183 * remote-utils.c (putpkt): Flush after debug output and use
19185 Handle input interrupts while waiting for an ACK.
19186 (input_interrupt): Use signal_pid method.
19187 (getpkt): Flush after debug output and use stderr.
19188 (outreg): Use collect_register_as_string.
19189 (new_thread_notify, dead_thread_notify): New functions.
19190 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19191 and general_thread.
19192 (look_up_one_symbol): Flush after debug output.
19193 * server.c (step_thread, server_waiting): New variables.
19194 (start_inferior): Don't use signal_pid. Update call to mywait.
19195 (attach_inferior): Update call to mywait.
19196 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19197 (main): Don't fetch/store registers explicitly. Use
19198 set_desired_inferior. Support proposed ``Hs'' packet. Update
19200 * server.h: Update.
19201 (struct inferior_list, struct_inferior_list_entry): New.
19202 * target.c (set_desired_inferior): New.
19203 (write_inferior_memory): Constify.
19204 (mywait): New function.
19205 * target.h: Update.
19206 (struct target_ops): New signal_pid method.
19207 (mywait): Removed macro, added prototype.
19209 * linux-low.h (regset_func): Removed.
19210 (regset_fill_func, regset_store_func): New.
19211 (enum regset_type): New.
19212 (struct regset_info): Add type field. Use new operation types.
19213 (struct linux_target_ops): stop_pc renamed to get_pc.
19214 Add decr_pc_after_break and breakpoint_at.
19215 (get_process, get_thread_proess, get_process_thread)
19216 (strut process_info, all_processes, linux_attach_lwp)
19217 (thread_db_init): New.
19219 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19220 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19221 (the_low_target): Add new members.
19222 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19223 (i386_store_fpxregset): Constify.
19224 (target_regsets): Add new kind identifier.
19225 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19226 (i386_set_pc): Add debugging.
19227 (i386_breakpoint_at): New function.
19228 (the_low_target): Add new members.
19229 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19230 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19231 (mips_breakpoint_at): New.
19232 (the_low_target): Add new members.
19233 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19234 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19235 (the_low_target): Add new members.
19236 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19237 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19238 (the_low_target): Add new members.
19239 * linux-x86-64-low.c (target_regsets): Add new kind
19242 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19244 From Martin Pool <mbp@samba.org>:
19245 * server.c (gdbserver_usage): New function.
19248 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19250 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19251 stop_at -> stop_pc.
19253 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19255 * Makefile.in: Remove obsolete code.
19257 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19259 * linux-low.c (regsets_fetch_inferior_registers),
19260 (regsets_store_inferior_registers): Removed cast to int from
19262 * regcache.h: Added declaration of struct inferior_info.
19264 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19266 * inferiors.c (struct inferior_info): Add regcache_data.
19267 (add_inferior): Call create_register_cache.
19268 (clear_inferiors): Call free_register_cache.
19269 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19270 * regcache.c (struct inferior_regcache_data): New.
19271 (registers): Remove.
19272 (get_regcache): New function.
19273 (create_register_cache, free_register_cache): New functions.
19274 (set_register_cache): Don't initialize the register cache here.
19275 (registers_to_string, registers_from_string, register_data): Call
19277 * regcache.h: Add prototypes.
19278 * server.h: Likewise.
19280 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19282 * mem-break.c: New file.
19283 * mem-break.h: New file.
19284 * Makefile.in: Add mem-break.o rule; update server.h
19286 * inferiors.c (struct inferior_info): Add target_data
19288 (clear_inferiors): Free target_data member if set.
19289 (inferior_target_data, set_inferior_target_data): New functions.
19290 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19291 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19292 * linux-low.c (linux_bp_reinsert): New variable.
19293 (struct inferior_linux_data): New.
19294 (linux_create_inferior): Use set_inferior_target_data.
19295 (linux_attach): Likewise. Call add_inferior.
19296 (linux_wait_for_one_inferior): New function.
19297 (linux_wait): Call it.
19298 (linux_write_memory): Add const.
19299 (initialize_low): Call set_breakpoint_data.
19300 * linux-low.h (struct linux_target_ops): Add breakpoint
19302 * server.c (attach_inferior): Remove extra add_inferior
19304 * server.h: Include mem-break.h. Update inferior.c
19306 * target.c (read_inferior_memory)
19307 (write_inferior_memory): New functions.
19308 * target.h (read_inferior_memory)
19309 (write_inferior_memory): Change macros to prototypes.
19310 (struct target_ops): Update comments. Add const to write_memory
19313 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19315 * linux-low.c (usr_store_inferior_registers): Support
19316 registers which are allowed to fail to store.
19317 * linux-low.h (linux_target_ops): Likewise.
19318 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19319 (ppc_cannot_store_register): FPSCR may not be storable.
19321 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19323 * server.h: Include <string.h> if HAVE_STRING_H.
19324 * ChangeLog: Correct paths in last ChangeLog entry.
19326 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19328 * linux-low.h: Remove obsolete prototypes.
19329 (struct linux_target_ops): New.
19330 (extern the_low_target): New.
19331 * linux-low.c (num_regs, regmap): Remove declarations.
19332 (register_addr): Use the_low_target explicitly.
19333 (fetch_register): Likewise.
19334 (usr_fetch_inferior_registers): Likewise.
19335 (usr_store_inferior_registers): Likewise.
19336 * linux-arm-low.c (num_regs): Remove.
19337 (arm_num_regs): Define.
19338 (arm_regmap): Renamed from regmap, made static.
19339 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19341 (arm_cannot_store_register): Renamed from cannot_store_register,
19343 (the_low_target): New.
19344 * linux-i386-low.c (num_regs): Remove.
19345 (i386_num_regs): Define.
19346 (i386_regmap): Renamed from regmap, made static.
19347 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19349 (i386_cannot_store_register): Renamed from cannot_store_register,
19351 (the_low_target): New.
19352 * linux-ia64-low.c (num_regs): Remove.
19353 (ia64_num_regs): Define.
19354 (ia64_regmap): Renamed from regmap, made static.
19355 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19357 (ia64_cannot_store_register): Renamed from cannot_store_register,
19359 (the_low_target): New.
19360 * linux-m68k-low.c (num_regs): Remove.
19361 (m68k_num_regs): Define.
19362 (m68k_regmap): Renamed from regmap, made static.
19363 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19365 (m68k_cannot_store_register): Renamed from cannot_store_register,
19367 (the_low_target): New.
19368 * linux-mips-low.c (num_regs): Remove.
19369 (mips_num_regs): Define.
19370 (mips_regmap): Renamed from regmap, made static.
19371 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19373 (mips_cannot_store_register): Renamed from cannot_store_register,
19375 (the_low_target): New.
19376 * linux-ppc-low.c (num_regs): Remove.
19377 (ppc_num_regs): Define.
19378 (ppc_regmap): Renamed from regmap, made static.
19379 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19381 (ppc_cannot_store_register): Renamed from cannot_store_register,
19383 (the_low_target): New.
19384 * linux-s390-low.c (num_regs): Remove.
19385 (s390_num_regs): Define.
19386 (s390_regmap): Renamed from regmap, made static.
19387 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19389 (s390_cannot_store_register): Renamed from cannot_store_register,
19391 (the_low_target): New.
19392 * linux-sh-low.c (num_regs): Remove.
19393 (sh_num_regs): Define.
19394 (sh_regmap): Renamed from regmap, made static.
19395 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19397 (sh_cannot_store_register): Renamed from cannot_store_register,
19399 (the_low_target): New.
19400 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19401 (the_low_target): New.
19403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19405 * Makefile.in: Add stamp-h target.
19406 * configure.in: Create stamp-h.
19407 * configure: Regenerated.
19409 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19411 * inferiors.c: New file.
19412 * target.c: New file.
19413 * target.h: New file.
19414 * Makefile.in: Add target.o and inferiors.o. Update
19416 * linux-low.c (inferior_pid): New static variable,
19417 moved from server.c.
19418 (linux_create_inferior): Renamed from create_inferior.
19419 Call add_inferior. Return 0 on success instead of a PID.
19420 (linux_attach): Renamed from myattach.
19421 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19422 (linux_thread_alive): Renamed from mythread_alive.
19423 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19425 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19426 (regsets_store_inferior_registers): Correct error message.
19427 Add missing ``return 0''.
19428 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19429 (linux_store_registers): Renamed from store_inferior_registers.
19430 (linux_read_memory): Renamed from read_inferior_memory.
19431 (linux_write_memory): Renamed from write_inferior_memory.
19432 (linux_target_ops): New structure.
19433 (initialize_low): Call set_target_ops ().
19434 * remote-utils.c (unhexify): New function.
19435 (hexify): New function.
19436 (input_interrupt): Send signals to ``signal_pid''.
19437 * server.c (inferior_pid): Remove.
19438 (start_inferior): Update create_inferior call.
19439 (attach_inferior): Call add_inferior.
19440 (handle_query): New function.
19441 (main): Call handle_query for `q' packets.
19442 * server.h: Include "target.h". Remove obsolete prototypes.
19443 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19447 * Makefile.in: Add WARN_CFLAGS. Update configury
19449 * configure.in: Check for <string.h>
19450 * configure: Regenerate.
19451 * config.in: Regenerate.
19452 * gdbreplay.c: Include needed system headers.
19453 (remote_open): Remove strchr prototype.
19454 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19455 * regcache.c (supply_register): Change buf argument to const void *.
19456 (supply_register_by_name): Likewise.
19457 (collect_register): Change buf argument to void *.
19458 (collect_register_by_name): Likewise.
19459 * regcache.h: Add missing prototypes.
19460 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19461 * server.c (handle_query): New function.
19462 (attached): New static variable, moved out of main.
19463 (main): Quiet longjmp clobber warnings.
19464 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19465 * utils.c (error): Remove NORETURN.