1 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
3 * config.in: Re-generate.
4 * configure: Re-generate.
6 2020-03-17 Kamil Rytarowski <n54@gmx.com>
8 * regcache.cc (find_register_by_number): Update.
9 * tdesc.cc (init_target_desc): Likewise.
10 * tdesc.h (target_desc::reg_defs): Likewise.
12 2020-03-12 Tom Tromey <tom@tromey.com>
15 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
16 (WIN32APILIBS): New subst.
17 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
19 (gdbsupport/%.o): Remove target.
20 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
21 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
22 (WIN32APILIBS): New variable.
23 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
24 (gdbreplay$(EXEEXT)): Likewise.
26 2020-03-12 Tom Tromey <tom@tromey.com>
28 * config.in, configure: Rebuild.
29 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
30 * acinclude.m4: Include gettext-sister.m4.
31 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
33 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
34 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
36 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
38 * acinclude.m4: Update path to selftest.m4.
40 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
42 * configure.ac: Don't source bfd/development.sh, move
44 * configure: Re-generate.
46 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
48 * configure: Re-generate.
50 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
52 * configure: Re-generate.
54 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
56 * .dir-locals.el: New file.
58 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
60 * .gitattributes: New file.
62 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
64 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
65 reply into an S reply.
66 * server.cc (disable_packet_T): New global.
67 (captured_main): Set new global when appropriate.
68 * server.h (disable_packet_T): Declare.
70 2020-02-21 Tom Tromey <tom@tromey.com>
72 * Makefile.in (mostlyclean): New target.
74 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
76 * target.h (struct process_stratum_target): Remove.
77 (class process_target): Rename to ...
78 (class process_stratum_target): ... this.
79 * linux-low.h (class linux_process_target): Derive from
80 'process_stratum_target'.
81 * linux-low.cc (linux_target_ops): Remove.
82 (initialize_low): Set the_target to the singleton instance of
84 * lynx-low.h (class lynx_process_target): Derive from
85 'process_stratum_target'.
86 * lynx-low.cc (lynx_target_ops): Remove.
87 (initialize_low): Set the_target to the singleton instance of
89 * nto-low.h (class nto_process_target): Derive from
90 'process_stratum_target'.
91 * nto-low.cc (nto_target_ops): Remove.
92 (initialize_low): Set the_target to the singleton instance of
94 * win32-low.h (class win32_process_target): Derive from
95 'process_stratum_target'.
96 * win32-low.cc (win32_target_ops): Remove.
97 (initialize_low): Set the_target to the singleton instance of
100 Replace 'the_target->pt' with 'the_target' in the uses below.
102 * hostio.cc (hostio_error)
107 * linux-aarch32-low.cc (arm_breakpoint_at)
108 * linux-aarch64-low.cc (aarch64_breakpoint_at)
109 * linux-arm-low.cc (arm_sigreturn_next_pc)
111 (arm_get_syscall_trapinfo)
112 * linux-cris-low.cc (cris_breakpoint_at)
113 * linux-crisv32-low.cc (cris_breakpoint_at)
114 * linux-low.cc (handle_extended_wait)
117 (linux_process_target::breakpoint_kind_from_pc)
119 * linux-m32r-low.cc (m32r_breakpoint_at)
120 * linux-mips-low.cc (mips_breakpoint_at)
121 * linux-nios2-low.cc (nios2_breakpoint_at)
122 * linux-ppc-low.cc (ppc_breakpoint_at)
123 * linux-s390-low.cc (s390_get_hwcap)
124 * linux-sh-low.cc (sh_breakpoint_at)
125 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
126 (sparc_store_gregset_from_stack)
127 (sparc_breakpoint_at)
128 * linux-tic6x-low.cc (tic6x_breakpoint_at)
129 * linux-tile-low.cc (tile_breakpoint_at)
130 * linux-x86-low.cc (x86_breakpoint_at)
131 * linux-xtensa-low.cc (xtensa_breakpoint_at)
132 * mem-break.cc (bp_size)
134 (insert_memory_breakpoint)
135 (set_raw_breakpoint_at)
136 (delete_raw_breakpoint)
138 (uninsert_raw_breakpoint)
139 (reinsert_raw_breakpoint)
140 (validate_inserted_breakpoint)
141 * regcache.cc (regcache_read_pc)
143 * remote-utils.cc (putpkt_binary_1)
146 (prepare_resume_reply)
147 * server.cc (handle_general_set)
150 (handle_qxfer_exec_file)
151 (handle_qxfer_libraries_svr4)
152 (handle_qxfer_osdata)
153 (handle_qxfer_siginfo)
158 (queue_stop_reply_callback)
160 * target.cc (prepare_to_access_memory)
161 (done_accessing_memory)
162 (read_inferior_memory)
163 (target_write_memory)
164 (target_stop_and_wait)
166 (target_mourn_inferior)
167 (target_continue_no_signal)
169 (target_supports_multi_process)
172 (target_create_inferior)
173 (target_post_create_inferior)
175 (target_supports_fork_events)
176 (target_supports_vfork_events)
177 (target_supports_exec_events)
178 (target_handle_new_gdb_connection)
181 (fetch_inferior_registers)
182 (store_inferior_registers)
184 (target_supports_non_stop)
186 (target_process_qsupported)
187 (target_supports_catch_syscall)
188 (target_get_ipa_tdesc_idx)
189 (target_supports_tracepoints)
190 (target_supports_fast_tracepoints)
191 (target_get_min_fast_tracepoint_insn_len)
192 (target_thread_stopped)
195 (target_stabilize_threads)
196 (target_install_fast_tracepoint_jump_pad)
198 (target_supports_disable_randomization)
199 (target_supports_agent)
200 (target_enable_btrace)
201 (target_disable_btrace)
203 (target_read_btrace_conf)
204 (target_supports_range_stepping)
205 (target_supports_stopped_by_sw_breakpoint)
206 (target_stopped_by_sw_breakpoint)
207 (target_supports_stopped_by_hw_breakpoint)
208 (target_supports_hardware_single_step)
209 (target_stopped_by_hw_breakpoint)
210 (target_breakpoint_kind_from_pc)
211 (target_breakpoint_kind_from_current_state)
212 (target_supports_software_single_step)
213 (target_core_of_thread)
215 (target_thread_handle)
216 * win32-low.cc (do_initial_child_stuff)
218 Rename target op default definitions listed below.
220 * target.cc (process_target::post_create_inferior): Rename as ...
221 (process_stratum_target::post_create_inferior): ... this.
222 (process_target::prepare_to_access_memory): Rename as ...
223 (process_stratum_target::prepare_to_access_memory): ... this.
224 (process_target::done_accessing_memory): Rename as ...
225 (process_stratum_target::done_accessing_memory): ... this.
226 (process_target::look_up_symbols): Rename as ...
227 (process_stratum_target::look_up_symbols): ... this.
228 (process_target::supports_read_auxv): Rename as ...
229 (process_stratum_target::supports_read_auxv): ... this.
230 (process_target::read_auxv): Rename as ...
231 (process_stratum_target::read_auxv): ... this.
232 (process_target::supports_z_point_type): Rename as ...
233 (process_stratum_target::supports_z_point_type): ... this.
234 (process_target::insert_point): Rename as ...
235 (process_stratum_target::insert_point): ... this.
236 (process_target::remove_point): Rename as ...
237 (process_stratum_target::remove_point): ... this.
238 (process_target::stopped_by_sw_breakpoint): Rename as ...
239 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
240 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
241 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
242 (process_target::stopped_by_hw_breakpoint): Rename as ...
243 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
244 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
245 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
246 (process_target::supports_hardware_single_step): Rename as ...
247 (process_stratum_target::supports_hardware_single_step): ... this.
248 (process_target::stopped_by_watchpoint): Rename as ...
249 (process_stratum_target::stopped_by_watchpoint): ... this.
250 (process_target::stopped_data_address): Rename as ...
251 (process_stratum_target::stopped_data_address): ... this.
252 (process_target::supports_read_offsets): Rename as ...
253 (process_stratum_target::supports_read_offsets): ... this.
254 (process_target::read_offsets): Rename as ...
255 (process_stratum_target::read_offsets): ... this.
256 (process_target::supports_get_tls_address): Rename as ...
257 (process_stratum_target::supports_get_tls_address): ... this.
258 (process_target::get_tls_address): Rename as ...
259 (process_stratum_target::get_tls_address): ... this.
260 (process_target::hostio_last_error): Rename as ...
261 (process_stratum_target::hostio_last_error): ... this.
262 (process_target::supports_qxfer_osdata): Rename as ...
263 (process_stratum_target::supports_qxfer_osdata): ... this.
264 (process_target::qxfer_osdata): Rename as ...
265 (process_stratum_target::qxfer_osdata): ... this.
266 (process_target::supports_qxfer_siginfo): Rename as ...
267 (process_stratum_target::supports_qxfer_siginfo): ... this.
268 (process_target::qxfer_siginfo): Rename as ...
269 (process_stratum_target::qxfer_siginfo): ... this.
270 (process_target::supports_non_stop): Rename as ...
271 (process_stratum_target::supports_non_stop): ... this.
272 (process_target::async): Rename as ...
273 (process_stratum_target::async): ... this.
274 (process_target::start_non_stop): Rename as ...
275 (process_stratum_target::start_non_stop): ... this.
276 (process_target::supports_multi_process): Rename as ...
277 (process_stratum_target::supports_multi_process): ... this.
278 (process_target::supports_fork_events): Rename as ...
279 (process_stratum_target::supports_fork_events): ... this.
280 (process_target::supports_vfork_events): Rename as ...
281 (process_stratum_target::supports_vfork_events): ... this.
282 (process_target::supports_exec_events): Rename as ...
283 (process_stratum_target::supports_exec_events): ... this.
284 (process_target::handle_new_gdb_connection): Rename as ...
285 (process_stratum_target::handle_new_gdb_connection): ... this.
286 (process_target::handle_monitor_command): Rename as ...
287 (process_stratum_target::handle_monitor_command): ... this.
288 (process_target::core_of_thread): Rename as ...
289 (process_stratum_target::core_of_thread): ... this.
290 (process_target::supports_read_loadmap): Rename as ...
291 (process_stratum_target::supports_read_loadmap): ... this.
292 (process_target::read_loadmap): Rename as ...
293 (process_stratum_target::read_loadmap): ... this.
294 (process_target::process_qsupported): Rename as ...
295 (process_stratum_target::process_qsupported): ... this.
296 (process_target::supports_tracepoints): Rename as ...
297 (process_stratum_target::supports_tracepoints): ... this.
298 (process_target::read_pc): Rename as ...
299 (process_stratum_target::read_pc): ... this.
300 (process_target::write_pc): Rename as ...
301 (process_stratum_target::write_pc): ... this.
302 (process_target::supports_thread_stopped): Rename as ...
303 (process_stratum_target::supports_thread_stopped): ... this.
304 (process_target::thread_stopped): Rename as ...
305 (process_stratum_target::thread_stopped): ... this.
306 (process_target::supports_get_tib_address): Rename as ...
307 (process_stratum_target::supports_get_tib_address): ... this.
308 (process_target::get_tib_address): Rename as ...
309 (process_stratum_target::get_tib_address): ... this.
310 (process_target::pause_all): Rename as ...
311 (process_stratum_target::pause_all): ... this.
312 (process_target::unpause_all): Rename as ...
313 (process_stratum_target::unpause_all): ... this.
314 (process_target::stabilize_threads): Rename as ...
315 (process_stratum_target::stabilize_threads): ... this.
316 (process_target::supports_fast_tracepoints): Rename as ...
317 (process_stratum_target::supports_fast_tracepoints): ... this.
318 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
319 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
320 (process_target::emit_ops): Rename as ...
321 (process_stratum_target::emit_ops): ... this.
322 (process_target::supports_disable_randomization): Rename as ...
323 (process_stratum_target::supports_disable_randomization): ... this.
324 (process_target::supports_qxfer_libraries_svr4): Rename as ...
325 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
326 (process_target::qxfer_libraries_svr4): Rename as ...
327 (process_stratum_target::qxfer_libraries_svr4): ... this.
328 (process_target::supports_agent): Rename as ...
329 (process_stratum_target::supports_agent): ... this.
330 (process_target::enable_btrace): Rename as ...
331 (process_stratum_target::enable_btrace): ... this.
332 (process_target::disable_btrace): Rename as ...
333 (process_stratum_target::disable_btrace): ... this.
334 (process_target::read_btrace): Rename as ...
335 (process_stratum_target::read_btrace): ... this.
336 (process_target::read_btrace_conf): Rename as ...
337 (process_stratum_target::read_btrace_conf): ... this.
338 (process_target::supports_range_stepping): Rename as ...
339 (process_stratum_target::supports_range_stepping): ... this.
340 (process_target::supports_pid_to_exec_file): Rename as ...
341 (process_stratum_target::supports_pid_to_exec_file): ... this.
342 (process_target::pid_to_exec_file): Rename as ...
343 (process_stratum_target::pid_to_exec_file): ... this.
344 (process_target::supports_multifs): Rename as ...
345 (process_stratum_target::supports_multifs): ... this.
346 (process_target::multifs_open): Rename as ...
347 (process_stratum_target::multifs_open): ... this.
348 (process_target::multifs_unlink): Rename as ...
349 (process_stratum_target::multifs_unlink): ... this.
350 (process_target::multifs_readlink): Rename as ...
351 (process_stratum_target::multifs_readlink): ... this.
352 (process_target::breakpoint_kind_from_pc): Rename as ...
353 (process_stratum_target::breakpoint_kind_from_pc): ... this.
354 (process_target::breakpoint_kind_from_current_state): Rename as ...
355 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
356 (process_target::thread_name): Rename as ...
357 (process_stratum_target::thread_name): ... this.
358 (process_target::thread_handle): Rename as ...
359 (process_stratum_target::thread_handle): ... this.
360 (process_target::supports_software_single_step): Rename as ...
361 (process_stratum_target::supports_software_single_step): ... this.
362 (process_target::supports_catch_syscall): Rename as ...
363 (process_stratum_target::supports_catch_syscall): ... this.
364 (process_target::get_ipa_tdesc_idx): Rename as ...
365 (process_stratum_target::get_ipa_tdesc_idx): ... this.
367 2020-02-20 Pedro Alves <palves@redhat.com>
369 * target.cc (set_target_ops): Simply copy the given target pointer
370 instead of creating a copy of the pointed object.
372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
374 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
377 * target.h (struct process_stratum_target): Remove the target op.
378 (class process_target): Add the target op.
379 (target_get_ipa_tdesc_idx): Update the macro.
380 * target.cc (process_target::get_ipa_tdesc_idx): Define.
382 Update the derived classes and callers below.
384 * linux-low.cc (linux_target_ops): Update.
385 (linux_get_ipa_tdesc_idx): Turn into ...
386 (linux_process_target::get_ipa_tdesc_idx): ... this.
387 * linux-low.h (class linux_process_target): Update.
388 * lynx-low.cc (lynx_target_ops): Update.
389 * nto-low.cc (nto_target_ops): Update.
390 * win32-low.cc (win32_target_ops): Update.
392 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
394 Turn process_stratum_target's supports_catch_syscall op into a
395 method of process_target.
397 * target.h (struct process_stratum_target): Remove the target op.
398 (class process_target): Add the target op.
399 (target_supports_catch_syscall): Update the macro.
400 * target.cc (process_target::supports_catch_syscall): Define.
402 Update the derived classes and callers below.
404 * linux-low.cc (linux_target_ops): Update.
405 (linux_supports_catch_syscall): Turn into ...
406 (linux_process_target::supports_catch_syscall): ... this.
407 * linux-low.h (class linux_process_target): Update.
408 * lynx-low.cc (lynx_target_ops): Update.
409 * nto-low.cc (nto_target_ops): Update.
410 * win32-low.cc (win32_target_ops): Update.
412 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
414 Turn process_stratum_target's supports_software_single_step op
415 into a method of process_target.
417 * target.h (struct process_stratum_target): Remove the target op.
418 (class process_target): Add the target op.
419 (target_supports_software_single_step): Update the macro.
420 * target.cc (process_target::supports_software_single_step): Define.
422 Update the derived classes and callers below.
424 * linux-low.cc (linux_target_ops): Update.
425 (linux_supports_software_single_step): Turn into ...
426 (linux_process_target::supports_software_single_step): ... this.
427 * linux-low.h (class linux_process_target): Update.
428 * lynx-low.cc (lynx_target_ops): Update.
429 * nto-low.cc (nto_target_ops): Update.
430 * win32-low.cc (win32_target_ops): Update.
432 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
434 Turn process_stratum_target's thread_name and thread_handle ops
435 into methods of process_target.
437 * target.h (struct process_stratum_target): Remove the target ops.
438 (class process_target): Add the target ops.
439 (target_thread_name): Update the macro.
440 (target_thread_handle): Update the macro.
441 * target.cc (process_target::thread_name): Define.
442 (process_target::thread_handle): Define.
444 Update the derived classes and callers below.
446 * linux-low.cc (linux_target_ops): Update.
447 (linux_process_target::thread_name): Define.
448 (linux_process_target::thread_handle): Define.
449 * linux-low.h (class linux_process_target): Update.
450 * lynx-low.cc (lynx_target_ops): Update.
451 * nto-low.cc (nto_target_ops): Update.
452 * win32-low.cc (win32_target_ops): Update.
454 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
456 Turn process_stratum_target's breakpoint_kind_from_pc,
457 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
458 ops into methods of process_target.
460 * target.h (struct process_stratum_target): Remove the target op.
461 (class process_target): Add the target op.
462 (target_breakpoint_kind_from_pc): Update the macro.
463 (target_breakpoint_kind_from_current_state): Update the macro.
464 (default_breakpoint_kind_from_pc): Remove declaration.
465 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
466 (process_target::breakpoint_kind_from_pc): ... this.
467 (process_target::breakpoint_kind_from_current_state): Define.
469 Update the derived classes and callers below.
471 * mem-break.cc (bp_size): Update.
473 * linux-low.cc (linux_target_ops): Update.
474 (linux_wait_1): Update.
475 (linux_breakpoint_kind_from_pc): Turn into ...
476 (linux_process_target::breakpoint_kind_from_pc): ... this.
477 (linux_sw_breakpoint_from_kind): Turn into ...
478 (linux_process_target::sw_breakpoint_from_kind): ... this.
479 (linux_breakpoint_kind_from_current_state): Turn into ...
480 (linux_process_target::breakpoint_kind_from_current_state): ... this.
481 * linux-low.h (class linux_process_target): Update.
482 * lynx-low.cc (lynx_target_ops): Update.
483 (lynx_process_target::sw_breakpoint_from_kind): Define.
484 * lynx-low.h (class lynx_process_target): Update.
485 * nto-low.cc (nto_target_ops): Update.
486 (nto_sw_breakpoint_from_kind): Turn into ...
487 (nto_process_target::sw_breakpoint_from_kind): ... this.
488 * nto-low.h (class nto_process_target): Update.
489 * win32-low.cc (win32_target_ops): Update.
490 (win32_sw_breakpoint_from_kind): Turn into ...
491 (win32_process_target::sw_breakpoint_from_kind): ... this.
492 * win32-low.h (class win32_process_target): Update.
494 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
496 Turn process_stratum_target's multifs_open, multifs_readlink,
497 multifs_unlink ops into methods of process_target.
499 * target.h (struct process_stratum_target): Remove the target ops.
500 (class process_target): Add the target ops. Also add
502 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
504 (process_target::supports_multifs): Define.
505 (process_target::multifs_open): Define.
506 (process_target::multifs_readlink): Define.
507 (process_target::multifs_unlink): Define.
509 Update the derived classes and callers below.
511 * hostio.cc (handle_setfs): Update.
512 (handle_open): Update.
513 (handle_unlink): Update.
514 (handle_readlink): Update.
515 * linux-low.cc (linux_target_ops): Update.
516 (linux_process_target::supports_multifs): Define.
517 (linux_process_target::multifs_open): Define.
518 (linux_process_target::multifs_readlink): Define.
519 (linux_process_target::multifs_unlink): Define.
520 * linux-low.h (class linux_process_target): Update.
521 * lynx-low.cc (lynx_target_ops): Update.
522 * nto-low.cc (nto_target_ops): Update.
523 * win32-low.cc (win32_target_ops): Update.
525 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
527 Turn process_stratum_target's pid_to_exec_file op into a method
530 * target.h (struct process_stratum_target): Remove the target op.
531 (class process_target): Add the target op. Also add
532 'supports_pid_to_exec_file'.
533 * target.cc (process_target::pid_to_exec_file): Define.
534 (process_target::supports_pid_to_exec_file): Define.
536 Update the derived classes and callers below.
538 * server.cc (handle_qxfer_exec_file): Update.
539 (handle_query): Update.
540 * linux-low.cc (linux_target_ops): Update.
541 (linux_process_target::supports_pid_to_exec_file): Define.
542 (linux_process_target::pid_to_exec_file): Define.
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_range_stepping 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_supports_range_stepping): Update the macro.
556 * target.cc (process_target::supports_range_stepping): Define.
558 Update the derived classes and callers below.
560 * linux-low.cc (linux_target_ops): Update.
561 (linux_supports_range_stepping): Turn into ...
562 (linux_process_target::supports_range_stepping): ... 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 btrace-related ops (enable_btrace,
571 disable_btrace, read_btrace, read_btrace_conf) into methods of
574 * target.h (struct process_stratum_target): Remove the target ops.
575 (class process_target): Add the target ops.
576 (target_enable_btrace): Update.
577 (target_disable_btrace): Update.
578 (target_read_btrace): Update.
579 (target_read_btrace_conf): Update.
580 * target.cc (process_target::enable_btrace): Define.
581 (process_target::disable_btrace): Define.
582 (process_target::read_btrace): Define.
583 (process_target::read_btrace_conf): Define.
585 Update the derived classes and callers below.
587 * linux-low.cc (linux_target_ops): Update.
588 (linux_process_target:enable_btrace): Define as a wrapper around
590 (linux_low_disable_btrace): Turn into ...
591 (linux_process_target::disable_btrace): ... this.
592 (linux_low_read_btrace): Turn into ...
593 (linux_process_target::read_btrace): ... this.
594 (linux_low_btrace_conf): Turn into ...
595 (linux_process_target::read_btrace_conf): ... this.
596 * linux-low.h (class linux_process_target): Update.
597 * lynx-low.cc (lynx_target_ops): Update.
598 * nto-low.cc (nto_target_ops): Update.
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 supports_agent op into a method of
606 * target.h (struct process_stratum_target): Remove the target op.
607 (class process_target): Add the target op.
608 (target_supports_agent): Update the macro.
609 * target.cc (process_target::supports_agent): Define.
611 Update the derived classes and callers below.
613 * linux-low.cc (linux_target_ops): Update.
614 (linux_supports_agent): Turn into ...
615 (linux_process_target::supports_agent): ... this.
616 * linux-low.h (class linux_process_target): Update.
617 * lynx-low.cc (lynx_target_ops): Update.
618 * nto-low.cc (nto_target_ops): Update.
619 * win32-low.cc (win32_target_ops): Update.
621 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
623 Turn process_stratum_target's qxfer_libraries_svr4 op into a
624 method of process_target.
626 * target.h (struct process_stratum_target): Remove the target op.
627 (class process_target): Add the target op. Also add
628 'supports_qxfer_libraries_svr4'.
629 * target.cc (process_target::qxfer_libraries_svr4): Define.
630 (process_target::supports_qxfer_libraries_svr4): Define.
632 Update the derived classes and callers below.
634 * server.cc (handle_qxfer_libraries_svr4): Update.
635 (handle_query): Update.
636 * linux-low.cc (linux_target_ops): Update.
637 (linux_process_target::supports_qxfer_libraries_svr4): Define.
638 (linux_qxfer_libraries_svr4): Turn into ...
639 (linux_process_target::qxfer_libraries_svr4): ... this.
640 * linux-low.h (class linux_process_target): Update.
641 * lynx-low.cc (lynx_target_ops): Update.
642 * nto-low.cc (nto_target_ops): Update.
643 * win32-low.cc (win32_target_ops): Update.
645 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
647 Turn process_stratum_target's supports_disable_randomization op
648 into a method of process_target.
650 * target.h (struct process_stratum_target): Remove the target op.
651 (class process_target): Add the target op.
652 (target_supports_disable_randomization): Update the macro.
653 * target.cc (process_target::supports_disable_randomization): Define.
655 Update the derived classes and callers below.
657 * linux-low.cc (linux_target_ops): Update.
658 (linux_supports_disable_randomization): Turn into ...
659 (linux_process_target::supports_disable_randomization): ... this.
660 * linux-low.h (class linux_process_target): Update.
661 * lynx-low.cc (lynx_target_ops): Update.
662 * nto-low.cc (nto_target_ops): Update.
663 * win32-low.cc (win32_target_ops): Update.
665 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
667 Turn process_stratum_target's emit_ops op into a method of
670 * target.h (struct process_stratum_target): Remove the target op.
671 (class process_target): Add the target op.
672 (target_emit_ops): Update the macro.
673 * target.cc (process_target::emit_ops): Define.
675 Update the derived classes and callers below.
677 * linux-low.cc (linux_target_ops): Update.
678 (linux_emit_ops): Turn into ...
679 (linux_process_target::emit_ops): ... this.
680 * linux-low.h (class linux_process_target): Update.
681 * lynx-low.cc (lynx_target_ops): Update.
682 * nto-low.cc (nto_target_ops): Update.
683 * win32-low.cc (win32_target_ops): Update.
685 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
687 Turn process_stratum_target's install_fast_tracepoint_jump_pad
688 and get_min_fast_tracepoint_insn_len ops into methods of
691 * target.h (struct process_stratum_target): Remove the target ops.
692 (class process_target): Add the target ops. Also add
693 'supports_fast_tracepoints'.
694 (target_supports_fast_tracepoints): Update the macro.
695 (target_get_min_fast_tracepoint_insn_len): Update the macro.
696 (install_fast_tracepoint_jump_pad): Update and rename the macro
698 (target_install_fast_tracepoint_jump_pad): ... this.
699 * target.cc (process_target::supports_fast_tracepoints): Define.
700 (process_target::install_fast_tracepoint_jump_pad): Define.
701 (process_target::get_min_fast_tracepoint_insn_len): Define.
703 Update the derived classes and callers below.
705 * tracepoint.cc (install_fast_tracepoint): Update.
706 * linux-low.cc (linux_target_ops): Update.
707 (linux_process_target::supports_fast_tracepoints): Define.
708 (linux_install_fast_tracepoint_jump_pad): Turn into ...
709 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
710 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
711 (linux_process_target::get_min_fast_tracepoint_insn_len): ... 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 stabilize_threads op into a
720 method of process_target.
722 * target.h (struct process_stratum_target): Remove the target op.
723 (class process_target): Add the target op.
724 (target_stabilize_threads): Update the macro.
725 * target.cc (process_target::stabilize_threads): Define.
727 Update the derived classes and callers below.
729 * server.cc (handle_status): Update.
730 * tracepoint.cc (cmd_qtdp): Update.
731 (cmd_qtstart): Update.
732 * linux-low.cc (linux_target_ops): Update.
733 (linux_stabilize_threads): Turn into ...
734 (linux_process_target::stabilize_threads): ... this.
735 (linux_wait_1): Update.
736 * linux-low.h (class linux_process_target): Update.
737 * lynx-low.cc (lynx_target_ops): Update.
738 * nto-low.cc (nto_target_ops): Update.
739 * win32-low.cc (win32_target_ops): Update.
741 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
743 Turn process_stratum_target's pause_all and unpause_all ops
744 into methods of process_target.
746 * target.h (struct process_stratum_target): Remove the target ops.
747 (class process_target): Add the target ops.
748 (pause_all): Update the macro and rename to...
749 (target_pause_all): ... this.
750 (unpause_all): Update the macro and rename to...
751 (target_unpause_all): ... this.
752 * target.cc (process_target::pause_all): Define.
753 (process_target::unpause_all): Define.
755 Update the derived classes and callers below.
757 * server.cc (handle_status): Update.
758 * tracepoint.cc (clear_installed_tracepoints): Update.
760 (cmd_qtstart): Update.
761 (stop_tracing): Update.
762 (cmd_qtstatus): Update.
763 (upload_fast_traceframes): Update.
764 (run_inferior_command): Update.
765 * linux-low.cc (linux_target_ops): Update.
766 (linux_pause_all): Turn into ...
767 (linux_process_target::pause_all): ... this.
768 (linux_unpause_all): Turn into ...
769 (linux_process_target::unpause_all): ... this.
770 (linux_process_target::prepare_to_access_memory): Update.
771 (linux_process_target::done_accessing_memory): Update.
772 * linux-low.h (class linux_process_target): Update.
773 * lynx-low.cc (lynx_target_ops): Update.
774 * nto-low.cc (nto_target_ops): Update.
775 * win32-low.cc (win32_target_ops): Update.
777 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
779 Turn process_stratum_target's get_tib_address op into a method of
782 * target.h (struct process_stratum_target): Remove the target op.
783 (class process_target): Add the target op. Also add
784 'supports_get_tib_address'.
785 * target.cc (process_target::get_tib_address): Define.
786 (process_target::supports_get_tib_address): Define.
788 Update the derived classes and callers below.
790 * server.cc (handle_query): Update.
791 * linux-low.cc (win32_target_ops): Update.
792 * lynx-low.cc (lynx_target_ops): Update.
793 * nto-low.cc (nto_target_ops): Update.
794 * win32-low.cc (win32_target_ops): Update.
795 (win32_process_target::supports_get_tib_address): Define.
796 (win32_get_tib_address): Turn into ...
797 (win32_process_target::get_tib_address): ... this.
798 * win32-low.h (class win32_process_target): Update.
800 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
802 Turn process_stratum_target's thread_stopped op into a method of
805 * target.h (struct process_stratum_target): Remove the target op.
806 (class process_target): Add the target op. Also add
807 'supports_thread_stopped'.
808 (target_thread_stopped): Update the macro.
809 * target.cc (process_target::thread_stopped): Define.
810 (process_target::supports_thread_stopped): Define.
811 (prepare_to_access_memory): Update.
813 Update the derived classes and callers below.
815 * server.cc (queue_stop_reply_callback): Update.
816 * linux-low.cc (linux_target_ops): Update.
817 (linux_process_target::supports_thread_stopped): Define.
818 (linux_thread_stopped): Turn into ...
819 (linux_process_target::thread_stopped): ... this.
820 * linux-low.h (class linux_process_target): Update.
821 * lynx-low.cc (lynx_target_ops): Update.
822 * nto-low.cc (nto_target_ops): Update.
823 * win32-low.cc (win32_target_ops): Update.
825 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
827 Turn process_stratum_target's read_pc and write_pc ops into
828 methods of process_target.
830 * target.h (struct process_stratum_target): Remove the target ops.
831 (class process_target): Add the target ops.
832 * target.cc (process_target::read_pc): Define.
833 (process_target::write_pc): Define.
835 Update the derived classes and callers below.
837 * regcache.cc (regcache_read_pc): Update.
838 (regcache_write_pc): Update.
839 * linux-low.cc (linux_target_ops): Update.
840 (linux_read_pc): Turn into ...
841 (linux_process_target::read_pc): ... this.
842 (linux_write_pc): Turn into ...
843 (linux_process_target::write_pc): ... this.
844 * linux-low.h (class linux_process_target): Update.
845 * lynx-low.cc (lynx_target_ops): Update.
846 * nto-low.cc (nto_target_ops): Update.
847 * win32-low.cc (win32_target_ops): Update.
849 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
851 Turn process_stratum_target's supports_tracepoints op into a
852 method of process_target.
854 * target.h (struct process_stratum_target): Remove the target op.
855 (class process_target): Add the target op.
856 (target_supports_tracepoints): Update the macro.
857 * target.cc (process_target::supports_tracepoints): Define.
859 Update the derived classes and callers below.
861 * linux-low.cc (linux_target_ops): Update.
862 (linux_supports_tracepoints): Turn into ...
863 (linux_process_target::supports_tracepoints): ... this.
864 * linux-low.h (class linux_process_target): Update.
865 * lynx-low.cc (lynx_target_ops): Update.
866 * nto-low.cc (nto_target_ops): Update.
867 * win32-low.cc (win32_target_ops): Update.
869 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
871 Turn process_stratum_target's process_qsupported op into a method
874 * target.h (struct process_stratum_target): Remove the target op.
875 (class process_target): Add the target op.
876 (target_process_qsupported): Update the macro.
877 * target.cc (process_target::process_qsupported): Define.
879 Update the derived classes and callers below.
881 * linux-low.cc (linux_target_ops): Update.
882 (linux_process_qsupported): Turn into ...
883 (linux_process_target::process_qsupported): ... this.
884 * linux-low.h (class linux_process_target): Update.
885 * lynx-low.cc (lynx_target_ops): Update.
886 * nto-low.cc (nto_target_ops): Update.
887 * win32-low.cc (win32_target_ops): Update.
889 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
891 Turn process_stratum_target's read_loadmap op into a method of
894 * target.h (struct process_stratum_target): Remove the target op.
895 (class process_target): Add the target op. Also add
896 'supports_read_loadmap'.
897 * target.cc (process_target::read_loadmap): Define.
898 (process_target::supports_read_loadmap): Define.
900 Update the derived classes and callers below.
902 * server.cc (handle_qxfer_fdpic): Update.
903 (handle_query): Update.
904 * linux-low.cc (linux_target_ops): Update.
905 (linux_process_target::supports_read_loadmap): Define.
906 (linux_read_loadmap): Turn into ...
907 (linux_process_target::read_loadmap): ... this.
908 * linux-low.h (class linux_process_target): Update.
909 * lynx-low.cc (lynx_target_ops): Update.
910 * nto-low.cc (nto_target_ops): Update.
911 * win32-low.cc (win32_target_ops): Update.
913 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
915 Turn process_stratum_target's core_of_thread op into a method of
918 * target.h (struct process_stratum_target): Remove the target op.
919 (class process_target): Add the target op.
920 (target_core_of_thread): Update the macro.
921 * target.cc (process_target::core_of_thread): Define.
923 Update the derived classes and callers below.
925 * linux-low.cc (linux_target_ops): Update.
926 (linux_process_target::core_of_thread): Define.
927 * linux-low.h (class linux_process_target): Update.
928 * lynx-low.cc (lynx_target_ops): Update.
929 * nto-low.cc (nto_target_ops): Update.
930 * win32-low.cc (win32_target_ops): Update.
932 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
934 Turn process_stratum_target's handle_monitor_command op into a
935 method of process_target.
937 * target.h (struct process_stratum_target): Remove the target op.
938 (class process_target): Add the target op.
939 (target_handle_monitor_command): Update the macro.
940 * target.cc (process_target::handle_monitor_command): Define.
942 Update the derived classes and callers below.
944 * server.cc (handle_query): Update.
945 * linux-low.cc (linux_target_ops): Update.
946 (linux_process_target::handle_monitor_command): Define.
947 * linux-low.h (class linux_process_target): Update.
948 * lynx-low.cc (lynx_target_ops): Update.
949 * nto-low.cc (nto_target_ops): Update.
950 * win32-low.cc (win32_target_ops): Update.
952 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
954 Turn process_stratum_target's handle_new_gdb_connection op into a
955 method of process_target.
957 * target.h (struct process_stratum_target): Remove the target op.
958 (class process_target): Add the target op.
959 (target_handle_new_gdb_connection): Update the macro.
960 * target.cc (process_target::handle_new_gdb_connection): Define.
962 Update the derived classes and callers below.
964 * linux-low.cc (linux_target_ops): Update.
965 (linux_handle_new_gdb_connection): Turn into ...
966 (linux_process_target::handle_new_gdb_connection): ... this.
967 * linux-low.h (class linux_process_target): Update.
968 * lynx-low.cc (lynx_target_ops): Update.
969 * nto-low.cc (nto_target_ops): Update.
970 * win32-low.cc (win32_target_ops): Update.
972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
974 Turn process_stratum_target's supports_fork_events,
975 supports_vfork_events, and supports_exec_events ops into methods
978 * target.h (struct process_stratum_target): Remove the target ops.
979 (class process_target): Add the target ops.
980 (target_supports_fork_events): Update the macro.
981 (target_supports_vfork_events): Update the macro.
982 (target_supports_exec_events): Update the macro.
983 * target.cc (process_target::supports_fork_events): Define.
984 (process_target::supports_vfork_events): Define.
985 (process_target::supports_exec_events): Define.
987 Update the derived classes and callers below.
989 * linux-low.cc (linux_target_ops): Update.
990 (linux_supports_fork_events): Turn into ...
991 (linux_process_target::supports_fork_events): ... this.
992 (linux_supports_vfork_events): Turn into ...
993 (linux_process_target::supports_vfork_events): ... this.
994 (linux_supports_exec_events): Turn into ...
995 (linux_process_target::supports_exec_events): ... this.
996 * linux-low.h (class linux_process_target): Update.
997 * lynx-low.cc (lynx_target_ops): Update.
998 * nto-low.cc (nto_target_ops): Update.
999 * win32-low.cc (win32_target_ops): Update.
1001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1003 Turn process_stratum_target's supports_multi_process op into a
1004 method of process_target.
1006 * target.h (struct process_stratum_target): Remove the target op.
1007 (class process_target): Add the target op.
1008 * target.cc (process_target::supports_multi_process): Define.
1009 (target_supports_multi_process): Update.
1011 Update the derived classes and callers below.
1013 * linux-low.cc (linux_target_ops): Update.
1014 (linux_supports_multi_process): Turn into ...
1015 (linux_process_target::supports_multi_process): ... this.
1016 * linux-low.h (class linux_process_target): Update.
1017 * lynx-low.cc (lynx_target_ops): Update.
1018 * nto-low.cc (nto_target_ops): Update.
1019 * win32-low.cc (win32_target_ops): Update.
1021 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1023 Turn process_stratum_target's supports_non_stop, async, and
1024 start_non_stop ops into methods of process_target.
1026 * target.h (struct process_stratum_target): Remove the target ops.
1027 (class process_target): Add the target ops.
1028 (target_supports_non_stop): Update the macro.
1029 (target_async): Update the macro.
1030 (start_non_stop): Remove declaration.
1031 * target.cc (process_target::supports_non_stop): Define.
1032 (process_target::async): Define.
1033 (process_target::start_non_stop): Define.
1034 (start_non_stop): Remove.
1036 Update the derived classes and callers below.
1038 * server.cc (handle_qxfer_siginfo): Update.
1039 (handle_query): Update.
1040 * linux-low.cc (linux_target_ops): Update.
1041 (linux_supports_non_stop): Turn into ...
1042 (linux_process_target::supports_non_stop): ... this.
1043 (linux_async): Turn into ...
1044 (linux_process_target::async): ... this.
1045 (linux_start_non_stop): Turn into ...
1046 (linux_process_target::start_non_stop): ... this.
1047 * linux-low.h (class linux_process_target): Update.
1048 * lynx-low.cc (lynx_target_ops): Update.
1049 * nto-low.cc (nto_target_ops): Update.
1050 (nto_supports_non_stop): Remove; rely on the default behavior
1052 * win32-low.cc (win32_target_ops): Update.
1054 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1056 Turn process_stratum_target's qxfer_siginfo op into a method of
1059 * target.h (struct process_stratum_target): Remove the target op.
1060 (class process_target): Add the target op. Also add
1061 'supports_qxfer_siginfo'.
1062 * target.cc (process_target::qxfer_siginfo): Define.
1063 (process_target::supports_qxfer_siginfo): Define.
1065 Update the derived classes and callers below.
1067 * server.cc (handle_qxfer_siginfo): Update.
1068 (handle_query): Update.
1069 * linux-low.cc (linux_target_ops): Update.
1070 (linux_process_target::supports_qxfer_siginfo): Define.
1071 (linux_xfer_siginfo): Turn into ...
1072 (linux_process_target::qxfer_siginfo): ... this.
1073 * linux-low.h (class linux_process_target): Update.
1074 * lynx-low.cc (lynx_target_ops): Update.
1075 * nto-low.cc (nto_target_ops): Update.
1076 * win32-low.cc (win32_target_ops): Update.
1078 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1080 Turn process_stratum_target's qxfer_osdata op into a method of
1083 * target.h (struct process_stratum_target): Remove the target op.
1084 (class process_target): Add the target op. Also add
1085 'supports_qxfer_osdata'.
1086 * target.cc (process_target::qxfer_osdata): Define.
1087 (process_target::supports_qxfer_osdata): Define.
1089 Update the derived classes and callers below.
1091 * server.cc (handle_qxfer_osdata): Update.
1092 (handle_query): Update.
1093 * linux-low.cc (linux_target_ops): Update.
1094 (linux_process_target::supports_qxfer_osdata): Define.
1095 (linux_qxfer_osdata): Turn into ...
1096 (linux_process_target::qxfer_osdata): ... this.
1097 * linux-low.h (class linux_process_target): Update.
1098 * lynx-low.cc (lynx_target_ops): Update.
1099 * nto-low.cc (nto_target_ops): Update.
1100 * win32-low.cc (win32_target_ops): Update.
1102 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1104 Turn process_stratum_target's hostio_last_error op into a
1105 method of process_target.
1107 * target.h (struct process_stratum_target): Remove the target op.
1108 (class process_target): Add the target op.
1109 * target.cc: Add "hostio.h" to includes.
1110 (process_target::hostio_last_error): Define.
1112 Update the derived classes and callers below.
1114 * hostio.cc (hostio_error): Update.
1115 * linux-low.cc: Remove "hostio.h" from includes.
1116 (linux_target_ops): Update.
1117 * lynx-low.cc (lynx_target_ops): Update.
1118 * nto-low.cc (nto_target_ops): Update.
1119 * win32-low.h (class win32_process_target): Update.
1120 * win32-low.cc (win32_target_ops): Update.
1121 (wince_hostio_last_error): Turn into ...
1122 (win32_process_target::hostio_last_error): ... this.
1124 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1126 Turn process_stratum_target's get_tls_address op into a method of
1129 * target.h (struct process_stratum_target): Remove the target op.
1130 (class process_target): Add the target op. Also add
1131 'supports_get_tls_address'.
1132 * target.cc (process_target::get_tls_address): Define.
1133 (process_target::supports_get_tls_address): Define.
1135 Update the derived classes and callers below.
1137 * server.cc (handle_query): Update.
1138 * linux-low.cc (linux_target_ops): Update.
1139 (linux_process_target::supports_get_tls_address): Define.
1140 (linux_process_target::get_tls_address): Define.
1141 * linux-low.h (class linux_process_target): Update.
1142 * lynx-low.cc (lynx_target_ops): Update.
1143 * nto-low.cc (nto_target_ops): Update.
1144 * win32-low.cc (win32_target_ops): Update.
1146 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1148 Turn process_stratum_target's read_offsets op into a method of
1151 * target.h (struct process_stratum_target): Remove the target op.
1152 (class process_target): Add the target op. Also add
1153 'supports_read_offsets'.
1154 * target.cc (process_target::read_offsets): Define.
1155 (process_target::supports_read_offsets): Define.
1157 Update the derived classes and callers below.
1159 * server.cc (handle_query): Update.
1160 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
1161 (linux_target_ops): Update.
1162 (linux_process_target::supports_read_offsets): Define.
1163 (linux_read_offsets): Turn into ...
1164 (linux_process_target::read_offsets): ... this.
1165 * linux-low.h (class linux_process_target): Update.
1166 * lynx-low.cc (lynx_target_ops): Update.
1167 * nto-low.cc (nto_target_ops): Update.
1168 * win32-low.cc (win32_target_ops): Update.
1170 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1172 Turn process_stratum_target's stopped_by_watchpoint and
1173 stopped_data_address ops into methods of process_target.
1175 * target.h (struct process_stratum_target): Remove the target ops.
1176 (class process_target): Add the target ops.
1177 * target.cc (process_target::stopped_by_watchpoint): Define.
1178 (process_target::stopped_data_address): Define.
1180 Update the derived classes and callers below.
1182 * remote-utils.cc (prepare_resume_reply): Update.
1183 * linux-low.cc (linux_target_ops): Update.
1184 (linux_stopped_by_watchpoint): Turn into ...
1185 (linux_process_target::stopped_by_watchpoint): ... this.
1186 (linux_stopped_data_address): Turn into ...
1187 (linux_process_target::stopped_data_address): ... this.
1188 * linux-low.h (class linux_process_target): Update.
1189 * lynx-low.cc (lynx_target_ops): Update.
1190 * nto-low.cc (nto_target_ops): Update.
1191 (nto_stopped_by_watchpoint): Turn into ...
1192 (nto_process_target::stopped_by_watchpoint): ... this.
1193 (nto_stopped_data_address): Turn into ...
1194 (nto_process_target::stopped_data_address): ... this.
1195 * nto-low.h (class nto_process_target): Update.
1196 * win32-low.cc (win32_target_ops): Update.
1197 (win32_stopped_by_watchpoint): Turn into ...
1198 (win32_process_target::stopped_by_watchpoint): ... this.
1199 (win32_stopped_data_address): Turn into ...
1200 (win32_process_target::stopped_data_address): ... this.
1201 * win32-low.h (class win32_process_target): Update.
1203 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1205 Turn process_stratum_target's supports_hardware_single_step op into
1206 a method of process_target.
1208 * target.h (struct process_stratum_target): Remove the target op.
1209 (class process_target): Add the target op.
1210 (target_supports_hardware_single_step): Update the macro.
1211 (target_can_do_hardware_single_step): Remove declaration.
1212 * target.cc (process_target::supports_hardware_single_step): Define.
1213 (target_can_do_hardware_single_step): Remove.
1215 Update the derived classes and callers below.
1217 * linux-low.h (class linux_process_target): Update.
1218 * linux-low.cc (linux_target_ops): Update.
1219 (linux_supports_hardware_single_step): Turn into ...
1220 (linux_process_target::supports_hardware_single_step): ... this.
1221 * lynx-low.h (class lynx_process_target): Update.
1222 * lynx-low.cc (lynx_target_ops): Update.
1223 (lynx_process_target::supports_hardware_single_step): Define.
1224 * nto-low.h (class nto_process_target): Update.
1225 * nto-low.cc (nto_target_ops): Update.
1226 (nto_process_target::supports_hardware_single_step): Define.
1227 * win32-low.h (class win32_process_target): Update.
1228 * win32-low.cc (win32_target_ops): Update.
1229 (win32_process_target::supports_hardware_single_step): Define.
1231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1233 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
1234 ops into methods of process_target.
1236 * target.h (struct process_stratum_target): Remove the target ops.
1237 (class process_target): Add the target ops.
1238 (target_stopped_by_hw_breakpoint): Update the macro.
1239 (target_supports_stopped_by_hw_breakpoint): Update the macro.
1240 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
1241 (process_target::supports_stopped_by_hw_breakpoint): Define.
1243 Update the derived classes and callers below.
1245 * linux-low.cc (linux_target_ops): Update.
1246 (linux_stopped_by_hw_breakpoint): Turn into ...
1247 (linux_process_target::stopped_by_hw_breakpoint): ... this.
1248 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
1249 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
1250 * linux-low.h (class linux_process_target): Update.
1251 * lynx-low.cc (lynx_target_ops): Update.
1252 * nto-low.cc (nto_target_ops): Update.
1253 * win32-low.cc (win32_target_ops): Update.
1255 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1257 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
1258 ops into methods of process_target.
1260 * target.h (struct process_stratum_target): Remove the target ops.
1261 (class process_target): Add the target ops.
1262 (target_stopped_by_sw_breakpoint): Update the macro.
1263 (target_supports_stopped_by_sw_breakpoint): Update the macro.
1264 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
1265 (process_target::supports_stopped_by_sw_breakpoint): Define.
1267 Update the derived classes and callers below.
1269 * linux-low.cc (linux_target_ops): Update.
1270 (linux_stopped_by_sw_breakpoint): Turn into ...
1271 (linux_process_target::stopped_by_sw_breakpoint): ... this.
1272 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
1273 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
1274 * linux-low.h (class linux_process_target): Update.
1275 * lynx-low.cc (lynx_target_ops): Update.
1276 * nto-low.cc (nto_target_ops): Update.
1277 * win32-low.cc (win32_target_ops): Update.
1279 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1281 Turn process_stratum_target's insert_point and remove_point ops
1282 into methods of process_target.
1284 * target.h (struct process_stratum_target): Remove the target ops.
1285 (class process_target): Add the target ops.
1286 * target.cc (process_target::insert_point): Define.
1287 (process_target::remove_point): Define.
1289 Update the derived classes and callers below.
1291 * mem-break.cc (set_raw_breakpoint_at): Update.
1292 (delete_raw_breakpoint): Update.
1293 (uninsert_raw_breakpoint): Update.
1294 (reinsert_raw_breakpoint): Update.
1295 * linux-low.cc (linux_target_ops): Update.
1296 (linux_insert_point): Turn into ...
1297 (linux_process_target::insert_point): ... this.
1298 (linux_remove_point): Turn into ...
1299 (linux_process_target::remove_point): ... this.
1300 * linux-low.h (class linux_process_target): Update.
1301 * lynx-low.cc (lynx_target_ops): Update.
1302 * nto-low.cc (nto_target_ops): Update.
1303 (nto_insert_point): Turn into ...
1304 (nto_process_target::insert_point): ... this.
1305 (nto_remove_point): Turn into ...
1306 (nto_process_target::remove_point): ... this.
1307 * nto-low.h (class nto_process_target): Update.
1308 * win32-low.cc (win32_target_ops): Update.
1309 (win32_insert_point): Turn into ...
1310 (win32_process_target::insert_point): ... this.
1311 (win32_remove_point): Turn into ...
1312 (win32_process_target::remove_point): ... this.
1313 * win32-low.h (class win32_process_target): Update.
1315 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1317 Turn process_stratum_target's supports_z_point_type op into a
1318 method of process_target.
1320 * target.h (struct process_stratum_target): Remove the target op.
1321 (class process_target): Add the target op.
1322 * target.cc (process_target::supports_z_point_type): Define.
1324 Update the derived classes and callers below.
1326 * mem-break.cc (z_type_supported): Update.
1327 * linux-low.cc (linux_target_ops): Update.
1328 (linux_supports_z_point_type): Turn into ...
1329 (linux_process_target::supports_z_point_type): ... this.
1330 * linux-low.h (class linux_process_target): Update.
1331 * lynx-low.cc (lynx_target_ops): Update.
1332 * nto-low.cc (nto_target_ops): Update.
1333 (nto_supports_z_point_type): Turn into ...
1334 (nto_process_target::supports_z_point_type): ... this.
1335 * nto-low.h (class nto_process_target): Update.
1336 * win32-low.cc (win32_target_ops): Update.
1337 (win32_supports_z_point_type): Turn into ...
1338 (win32_process_target::supports_z_point_type): ... this.
1339 * win32-low.h (class win32_process_target): Update.
1341 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1343 Turn process_stratum_target's read_auxv op into a method of
1346 * target.h (class process_stratum_target): Remove the target op.
1347 (struct process_target): Add the target op. Also add
1348 'supports_read_auxv'.
1349 * target.cc (process_target::read_auxv): Define.
1350 (process_target::supports_read_auxv): Define.
1352 Update the derived classes and callers below.
1354 * server.cc (handle_qxfer_auxv): Update.
1355 (handle_query): Update.
1356 * linux-low.cc (linux_target_ops): Update.
1357 (linux_process_target::supports_read_auxv): Define.
1358 (linux_read_auxv): Turn into ...
1359 (linux_process_target::read_auxv): ... this.
1360 * linux-low.h (class linux_process_target): Update.
1361 * lynx-low.cc (lynx_target_ops): Update.
1362 * nto-low.cc (nto_target_ops): Update.
1363 (nto_process_target::supports_read_auxv): Define.
1364 (nto_read_auxv): Turn into ...
1365 (nto_process_target::read_auxv): ... this.
1366 * nto-low.h (class nto_process_target): Update.
1367 * win32-low.cc (win32_target_ops): Update.
1369 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1371 Turn process_stratum_target's request_interrupt op into a method of
1374 * target.h (struct process_stratum_target): Remove the target op.
1375 (class process_target): Add the target op.
1377 Update the derived classes and callers below.
1379 * remote-utils.cc (putpkt_binary_1): Update.
1380 (input_interrupt): Update.
1382 * server.cc (handle_v_requests): Update.
1383 * linux-low.cc (linux_target_ops): Update.
1384 (linux_request_interrupt): Turn into ...
1385 (linux_process_target::request_interrupt): ... this.
1386 * linux-low.h (class linux_process_target): Update.
1387 * lynx-low.cc (lynx_target_ops): Update.
1388 (lynx_request_interrupt): Turn into ...
1389 (lynx_process_target::request_interrupt): ... this.
1390 * lynx-low.h (class lynx_process_target): Update.
1391 * nto-low.cc (nto_target_ops): Update.
1392 (nto_request_interrupt): Turn into ...
1393 (nto_process_target::request_interrupt): ... this.
1394 * nto-low.h (class nto_process_target): Update.
1395 * win32-low.cc (win32_target_ops): Update.
1396 (win32_request_interrupt): Turn into ...
1397 (win32_process_target::request_interrupt): ... this.
1398 * win32-low.h (class win32_process_target): Update.
1400 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1402 Turn process_stratum_target's look_up_symbols op into a method of
1405 * target.h (struct process_stratum_target): Remove the target op.
1406 (class process_target): Add the target op.
1407 * target.cc (process_target::look_up_symbols): Define.
1409 Update the derived classes and callers below.
1411 * server.cc (handle_query): Update.
1412 * linux-low.cc (linux_target_ops): Update.
1413 (linux_look_up_symbols): Turn into ...
1414 (linux_process_target::look_up_symbols): ... this.
1415 * linux-low.h (class linux_process_target): Update.
1416 * lynx-low.cc (lynx_target_ops): Update.
1417 * nto-low.cc (nto_target_ops): Update.
1418 * win32-low.cc (win32_target_ops): Update.
1420 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1422 Turn process_stratum_target's read_memory and write_memory
1423 ops into methods of process_target.
1425 * target.h (struct process_stratum_target): Remove the target ops.
1426 (class process_target): Add the target ops.
1428 Update the derived classes and callers below.
1430 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1431 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1432 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1433 (arm_get_syscall_trapinfo): Update.
1434 * linux-cris-low.cc (cris_breakpoint_at): Update.
1435 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1436 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1437 * linux-mips-low.cc (mips_breakpoint_at): Update.
1438 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1439 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1440 * linux-sh-low.cc (sh_breakpoint_at): Update.
1441 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1442 (sparc_store_gregset_from_stack): Update.
1443 (sparc_breakpoint_at): Update.
1444 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1445 * linux-tile-low.cc (tile_breakpoint_at): Update.
1446 * linux-x86-low.cc (x86_breakpoint_at): Update.
1447 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1448 * mem-brea.cc (insert_memory_breakpoint): Update.
1449 (validate_inserted_breakpoint): Update.
1450 * target.cc (read_inferior_memory): Update.
1451 (target_write_memory): Update.
1452 * linux-low.cc (linux_target_ops): Update.
1453 (linux_read_memory): Make a wrapper around the read_memory target
1455 (linux_process_target::read_memory): Rename from linux_read_memory.
1456 (linux_write_memory): Turn into ...
1457 (linux_process_target::write_memory): ... this.
1458 * linux-low.h (class linux_process_target): Update.
1459 * lynx-low.cc (lynx_target_ops): Update.
1460 (lynx_read_memory): Turn into ...
1461 (lynx_process_target::read_memory): ... this.
1462 (lynx_write_memory): Turn into ...
1463 (lynx_process_target::write_memory): ... this.
1464 * lynx-low.h (class lynx_process_target): Update.
1465 * nto-low.cc (nto_target_ops): Update.
1466 (nto_read_memory): Turn into ...
1467 (nto_process_target::read_memory): ... this.
1468 (nto_write_memory): Turn into ...
1469 (nto_process_target::write_memory): ... this.
1470 * nto-low.h (class nto_process_target): Update.
1471 * win32-low.cc (win32_target_ops): Update.
1472 (win32_read_inferior_memory): Turn into ...
1473 (win32_process_target::read_memory): ... this.
1474 (win32_write_inferior_memory): Turn into ...
1475 (win32_process_target::write_memory): ... this.
1476 * win32-low.h (class win32_process_target): Update.
1478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1480 Turn process_stratum_target's prepare_to_access_memory and
1481 done_accessing_memory ops into methods of process_target.
1483 * target.h (struct process_stratum_target): Remove the target ops.
1484 (class process_target): Add the target ops.
1485 * target.cc (process_target::prepare_to_access_memory): Define.
1486 (process_target::done_accessing_memory): Define.
1487 (prepare_to_access_memory): Update.
1488 (done_accessing_memory): Update.
1490 Update the derived classes and callers below.
1492 * linux-low.cc (linux_target_ops): Update.
1493 (linux_prepare_to_access_memory): Turn into ...
1494 (linux_process_target::prepare_to_access_memory): ... this.
1495 (linux_done_accessing_memory): Turn into ...
1496 (linux_process_target::done_accessing_memory): ... this.
1497 * linux-low.h (class linux_process_target): Update.
1498 * lynx-low.cc (lynx_target_ops): Update.
1499 * nto-low.cc (nto_target_ops): Update.
1500 * win32-low.cc (win32_target_ops): Update.
1502 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1504 Turn process_stratum_target's fetch_registers and store_registers
1505 ops into methods of process_target.
1507 * target.h (struct process_stratum_target): Remove the target ops.
1508 (class process_target): Add the target ops.
1509 (fetch_inferior_registers): Update the macro.
1510 (store_inferior_registers): Update the macro.
1512 Update the derived classes and callers below.
1514 * linux-low.cc (linux_target_ops): Update.
1515 (linux_fetch_registers): Turn into ...
1516 (linux_process_target::fetch_registers): ... this.
1517 (linux_store_registers): Turn into ...
1518 (linux_process_target::store_registers): ... this.
1519 * linux-low.h (class linux_process_target): Update.
1520 * lynx-low.cc (lynx_target_ops): Update.
1521 (lynx_fetch_registers): Turn into ...
1522 (lynx_process_target::fetch_registers): ... this.
1523 (lynx_store_registers): Turn into ...
1524 (lynx_process_target::store_registers): ... this.
1525 * lynx-low.h (class lynx_process_target): Update.
1526 * nto-low.cc (nto_target_ops): Update.
1527 (nto_fetch_registers): Turn into ...
1528 (nto_process_target::fetch_registers): ... this.
1529 (nto_store_registers): Turn into ...
1530 (nto_process_target::store_registers): ... this.
1531 * nto-low.h (class nto_process_target): Update.
1532 * win32-low.cc (win32_target_ops): Update.
1533 (win32_fetch_inferior_registers): Turn into ...
1534 (win32_process_target::fetch_registers): ... this.
1535 (win32_store_inferior_registers): Turn into ...
1536 (win32_process_target::store_registers): ... this.
1537 * win32-low.h (class win32_process_target): Update.
1539 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1541 Turn process_stratum_target's wait op into a method of
1544 * target.h (struct process_stratum_target): Remove the target op.
1545 (class process_target): Add the target op.
1547 Update the derived classes and callers below.
1549 * target.cc (target_wait): Update.
1550 * linux-low.cc (linux_target_ops): Update.
1551 (linux_wait): Turn into ...
1552 (linux_process_target::wait): ... this.
1553 * linux-low.h (class linux_process_target): Update.
1554 * lynx-low.cc (lynx_target_ops): Update.
1555 (lynx_wait): Turn into ...
1556 (lynx_process_target::wait): ... this.
1557 * lynx-low.h (class lynx_process_target): Update.
1558 * nto-low.cc (nto_target_ops): Update.
1559 (nto_wait): Turn into ...
1560 (nto_process_target::wait): ... this.
1561 * nto-low.h (class nto_process_target): Update.
1562 * win32-low.cc (win32_target_ops): Update.
1563 (win32_wait): Turn into ...
1564 (win32_process_target::wait): ... this.
1565 (do_initial_child_stuff): Update.
1566 * win32-low.h (class win32_process_target): Update.
1568 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1570 Turn process_stratum_target's resume op into a method of
1573 * target.h (struct process_stratum_target): Remove the target op.
1574 (class process_target): Add the target op.
1576 Update the derived classes and callers below.
1578 * server.cc (resume): Update.
1579 * target.cc (target_stop_and_wait): Update.
1580 (target_continue_no_signal): Update.
1581 (target_continue): Update.
1582 * linux-low.cc (linux_target_ops): Update.
1583 (linux_resume): Turn into ...
1584 (linux_process_target::resume): ... this.
1585 * linux-low.h (class linux_process_target): Update.
1586 * lynx-low.cc (lynx_target_ops): Update.
1587 (lynx_resume): Turn into ...
1588 (lynx_process_target::resume): ... this.
1589 * lynx-low.h (class lynx_process_target): Update.
1590 * nto-low.cc (nto_target_ops): Update.
1591 (nto_resume): Turn into ...
1592 (nto_process_target::resume): ... this.
1593 * nto-low.h (class nto_process_target): Update.
1594 * win32-low.cc (win32_target_ops): Update.
1595 (win32_resume): Turn into ...
1596 (win32_process_target::resume): ... this.
1597 (win32_process_target::detach): Update.
1598 (do_initial_child_stuff): Update.
1599 * win32-low.h (class win32_process_target): Update.
1601 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1603 Turn process_stratum_target's thread_alive op into a method of
1606 * target.h (struct process_stratum_target): Remove the target op.
1607 (class process_target): Add the target op.
1608 (mythread_alive): Update the macro.
1610 Update the derived classes and callers below.
1612 * linux-low.cc (linux_target_ops): Update.
1613 (linux_thread_alive): Turn into ...
1614 (linux_process_target::thread_alive): ... this.
1615 (wait_for_sigstop): Update.
1616 * linux-low.h (class linux_process_target): Update.
1617 * lynx-low.cc (lynx_target_ops): Update.
1618 (lynx_thread_alive): Turn into ...
1619 (lynx_process_target::thread_alive): ... this.
1620 * lynx-low.h (class lynx_process_target): Update.
1621 * nto-low.cc (nto_target_ops): Update.
1622 (nto_thread_alive): Turn into ...
1623 (nto_process_target::thread_alive): ... this.
1624 * nto-low.h (class nto_process_target): Update.
1625 * win32-low.cc (win32_target_ops): Update.
1626 (win32_thread_alive): Turn into ...
1627 (win32_process_target::thread_alive): ... this.
1628 * win32-low.h (class win32_process_target): Update.
1630 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1632 Turn process_stratum_target's join op into a method of
1635 * target.h (struct process_stratum_target): Remove the target op.
1636 (class process_target): Add the target op.
1637 (join_inferior): Update the macro.
1639 Update the derived classes and callers below.
1641 * linux-low.cc (linux_target_ops): Update.
1642 (linux_join): Turn into ...
1643 (linux_process_target::join): ... this.
1644 * linux-low.h (class linux_process_target): Update.
1645 * lynx-low.cc (lynx_target_ops): Update.
1646 (lynx_join): Turn into ...
1647 (lynx_process_target::join): ... this.
1648 * lynx-low.h (class lynx_process_target): Update.
1649 * nto-low.cc (nto_target_ops): Update.
1650 (nto_process_target::join): Define.
1651 * nto-low.h (class nto_process_target): Update.
1652 * win32-low.cc (win32_target_ops): Update.
1653 (win32_join): Turn into ...
1654 (win32_process_target::join): ... this.
1655 * win32-low.h (class win32_process_target): Update.
1657 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1659 Turn process_stratum_target's mourn op into a method of
1662 * target.h (struct process_stratum_target): Remove the target op.
1663 (class process_target): Add the target op.
1665 Update the derived classes and callers below.
1667 * target.cc (target_mourn_inferior): Update.
1668 * linux-low.cc (linux_target_ops): Update.
1669 (linux_mourn): Turn into ...
1670 (linux_process_target::mourn): ... this.
1671 (handle_extended_wait): Update.
1672 (linux_process_target::kill): Update.
1673 (linux_process_target::detach): Update.
1674 * linux-low.h (class linux_process_target): Update.
1675 * lynx-low.cc (lynx_target_ops): Update.
1676 (lynx_mourn): Turn into ...
1677 (lynx_process_target::mourn): ... this.
1678 * lynx-low.h (class lynx_process_target): Update.
1679 * nto-low.cc (nto_target_ops): Update.
1680 (nto_mourn): Turn into ...
1681 (nto_process_target::mourn): ... this.
1682 * nto-low.h (class nto_process_target): Update.
1683 * win32-low.cc (win32_target_ops): Update.
1684 (win32_mourn): Turn into ...
1685 (win32_process_target::mourn): ... this.
1686 * win32-low.h (class win32_process_target): Update.
1688 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1690 Turn process_stratum_target's detach op into a method of
1693 * target.h (struct process_stratum_target): Remove the target op.
1694 (class process_target): Add the target op.
1695 (detach_inferior): Update the macro.
1697 Update the derived classes and callers below.
1699 * linux-low.cc (linux_target_ops): Update.
1700 (linux_detach): Turn into ...
1701 (linux_process_target::detach): ... this.
1702 * linux-low.h (class linux_process_target): Update.
1703 * lynx-low.cc (lynx_target_ops): Update.
1704 (lynx_detach): Turn into ...
1705 (lynx_process_target::detach): ... this.
1706 * lynx-low.h (class lynx_process_target): Update.
1707 * nto-low.cc (nto_target_ops): Update.
1708 (nto_detach): Turn into ...
1709 (nto_process_target::detach): ... this.
1710 * nto-low.h (class nto_process_target): Update.
1711 * win32-low.cc (win32_target_ops): Update.
1712 (win32_detach): Turn into ...
1713 (win32_process_target::detach): ... this.
1714 * win32-low.h (class win32_process_target): Update.
1716 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1718 Turn process_stratum_target's kill op into a method of
1721 * target.h (struct process_stratum_target): Remove the target op.
1722 (class process_target): Add the target op.
1724 Update the derived classes and callers below.
1726 * target.cc (kill_inferior): Update.
1727 * linux-low.cc (linux_target_ops): Update.
1728 (linux_kill): Turn into ...
1729 (linux_process_target::kill): ... this.
1730 * linux-low.h (class linux_process_target): Update.
1731 * lynx-low.cc (lynx_target_ops): Update.
1732 (lynx_kill): Turn into ...
1733 (lynx_process_target::kill): ... this.
1734 * lynx-low.h (class lynx_process_target): Update.
1735 * nto-low.cc (nto_target_ops): Update.
1736 (nto_kill): Turn into ...
1737 (nto_process_target::kill): ... this.
1738 * nto-low.h (class nto_process_target): Update.
1739 * win32-low.cc (win32_target_ops): Update.
1740 (win32_kill): Turn into ...
1741 (win32_process_target::kill): ... this.
1742 * win32-low.h (class win32_process_target): Update.
1744 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1746 Turn process_stratum_target's attach op into a method of
1749 * target.h (struct process_stratum_target): Remove the target op.
1750 (class process_target): Add the target op.
1751 (myattach): Update the macro.
1753 Update the derived classes and callers below.
1755 * linux-low.cc (linux_target_ops): Update.
1756 (linux_attach): Turn into ...
1757 (linux_process_target::attach): ... this.
1758 * linux-low.h (class linux_process_target): Update.
1759 * lynx-low.cc (lynx_target_ops): Update.
1760 (lynx_attach): Turn into ...
1761 (lynx_process_target::attach): ... this.
1762 * lynx-low.h (class lynx_process_target): Update.
1763 * nto-low.cc (nto_target_ops): Update.
1764 (nto_attach): Turn into ...
1765 (nto_process_target::attach): ... this.
1766 * nto-low.h (class nto_process_target): Update.
1767 * win32-low.cc (win32_target_ops): Update.
1768 (win32_attach): Turn into ...
1769 (win32_process_target::attach): ... this.
1770 * win32-low.h (class win32_process_target): Update.
1772 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1774 Turn process_stratum_target's post_create_inferior op into a method
1777 * target.h (struct process_stratum_target): Remove the target op.
1778 (class process_target): Add the target op.
1779 (target_post_create_inferior): Update the macro.
1780 * target.cc (process_target::post_create_inferior): Define.
1782 Update the derived classes and callers below.
1784 * linux-low.cc (linux_target_ops): Update.
1785 (linux_post_create_inferior): Turn into ...
1786 (linux_process_target::post_create_inferior): ... this.
1787 * linux-low.h (class linux_process_target): Update.
1788 * lynx-low.cc (lynx_target_ops): Update.
1789 * nto-low.cc (nto_target_ops): Update.
1790 * win32-low.cc (win32_target_ops): Update.
1792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1794 Turn process_stratum_target's create_inferior op into a method of
1797 * target.h (struct process_stratum_target): Remove the target op.
1798 (class process_target): Add the target op.
1799 (create_inferior): Rename the macro to ...
1800 (target_create_inferior): ... this.
1802 Update the derived classes and callers below.
1804 * server.cc (handle_v_run): Update.
1805 (captured_main): Update.
1806 (process_serial_event): Update.
1807 * linux-low.cc (linux_target_ops): Update.
1808 (linux_create_inferior): Turn into ...
1809 (linux_process_target::create_inferior): ... this.
1810 * linux-low.h (class linux_process_target): Update.
1811 * lynx-low.cc (lynx_target_ops): Update.
1812 (lynx_create_inferior): Turn into ...
1813 (lynx_process_target::create_inferior): ... this.
1814 * lynx-low.h (class lynx_process_target): Update.
1815 * nto-low.cc (nto_target_ops): Update.
1816 (nto_create_inferior): Turn into ...
1817 (nto_process_target::create_inferior): ... this.
1818 * nto-low.h (class nto_process_target): Update.
1819 * win32-low.cc (win32_target_ops): Update.
1820 (win32_create_inferior): Turn into ...
1821 (win32_process_target::create_inferior): ... this.
1822 * win32-low.h (class win32_process_target): Update.
1824 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1826 * target.h (class process_target): New class definition.
1827 (struct process_stratum_target) <pt>: New field with type
1829 * linux-low.h (class linux_process_target): Define as a derived
1830 class of 'process_target'.
1831 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1833 * lynx-low.h (class lynx_process_target): Define as a derived
1834 class of 'process_target'.
1835 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1837 * nto-low.h (class nto_process_target): Define as a derived
1838 class of 'process_target'.
1839 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1841 * win32-low.h (class win32_process_target): Define as a derived
1842 class of 'process_target'.
1843 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1846 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1848 * configure: Regenerate.
1850 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1851 Andrew Burgess <andrew.burgess@embecosm.com>
1853 * linux-riscv-low.cc: New file.
1854 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1855 and nat/riscv-linux-tdesc.c.
1856 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1857 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1860 2020-02-14 Tom Tromey <tom@tromey.com>
1862 * acinclude.m4: Don't include acx_configure_dir.m4.
1863 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1864 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1865 (all, install-only, uninstall, clean-info, clean)
1866 (maintainer-clean): Don't recurse.
1867 (subdir_do, all-lib): Remove.
1868 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1870 (generated_files): Update.
1871 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1872 * configure: Rebuild.
1873 * configure.ac: Don't configure gnulib or libiberty.
1876 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1878 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1879 preparing the command line for CreateProcess.
1880 (win32_create_inferior): Reflect the program name in debugging
1881 output that shows the process and its command line.
1883 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1885 * Makefile.in: Rename source files from .c to .cc.
1886 * %.c: Rename to %.cc.
1887 * configure.ac: Rename server.c to server.cc.
1888 * configure: Re-generate.
1890 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1892 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1894 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1896 * win32-low.c (win32_create_inferior): Set signal_pid.
1898 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1899 Pedro Alves <palves@redhat.com>
1901 Skip building gdbserver in a cross-configuration.
1902 * configure.srv: Set $gdbserver_host depending on whether $target
1903 is $host. Use $gdbserver_host instead of $host.
1905 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1907 * configure: Re-generate.
1909 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1911 * configure: Re-generate.
1913 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1915 * acinclude.m4: Update warning.m4 path.
1917 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1919 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1920 (handle_exception): Set siginfo_er.
1921 (win32_xfer_siginfo): New function.
1923 2020-02-07 Tom Tromey <tom@tromey.com>
1924 Pedro Alves <palves@redhat.com>
1926 * README: Update build documentation.
1927 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1929 * configure.ac: Update paths.
1930 * configure: Rebuild.
1931 * acinclude.m4: Update paths.
1932 * Makefile.in: Update include paths.
1933 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1934 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1935 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1936 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1937 (%-generated.c): Update paths.
1938 * Move entire directory from ../gdb/gdbserver.
1940 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1942 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1944 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1946 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1947 assignment instead of srv_linux_obj.
1949 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1951 * server.c (handle_qxfer_libraries): Write segment-address with
1954 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1956 * Makefile.in (install-strip): New target.
1957 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1958 * aclocal.m4: Regenerate.
1959 * configure: Regenerate.
1960 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1962 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1964 * Makefile.in (SFILES): Adjust paths to point to real files.
1965 (OBS): Move waitstatus.o to target/waitstatus.o.
1966 (TAGS): Transform paths appropriately.
1968 (nat/%.o): ... this pattern rule.
1970 (target/%.o): ... this pattern rule.
1971 * configure.srv: Adjust paths throughout to include nat/ prefix
1972 with the revant files.
1973 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1974 * configure: Regenerate.
1976 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1978 * Makefile.in (TAGS): Remove config files from the recipe.
1980 2020-01-14 Tom Tromey <tom@tromey.com>
1982 * configure: Rebuild.
1983 * configure.ac: Remove any checks that were added to common.m4.
1984 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1987 2020-01-14 Tom Tromey <tom@tromey.com>
1989 * server.h: Include config.h.
1990 * gdbreplay.c: Include config.h.
1991 * configure: Rebuild.
1992 * configure.ac: Don't source common.host.
1993 * acinclude.m4: Update path.
1994 * Makefile.in (INCSUPPORT): New variable.
1995 (INCLUDE_CFLAGS): Add INCSUPPORT.
1996 (SFILES): Update paths.
1997 (version-generated.c): Update path to create-version.sh.
1998 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
2000 2020-01-14 Tom Tromey <tom@tromey.com>
2002 * configure.ac (LIBS): Use WIN32APILIBS.
2003 (USE_WIN32API): Don't define.
2004 * configure: Rebuild.
2006 2020-01-14 Tom Tromey <tom@tromey.com>
2008 * configure: Rebuild.
2010 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2012 * Makefile.in (%-generated.c): Remove rule for files from
2015 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2017 * configure: Re-generate.
2019 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2021 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
2023 * tracepoint.c (stop_tracing, flush_trace_buffer,
2024 about_to_request_buffer_space, get_trace_state_variable_value,
2025 set_trace_state_variable_value, gdb_collect): Add declaration.
2027 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2029 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
2030 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
2031 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
2032 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
2033 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
2036 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2038 * inferiors.c: Include gdbsupport/common-inferior.h.
2040 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2042 * hostio-errno.c: Include hostio.h.
2044 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2046 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
2049 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2051 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
2052 * linux-arm-tdesc.h: Include arch/arm.h.
2054 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2056 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
2058 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2060 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2061 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2063 2020-01-10 Pedro Alves <palves@redhat.com>
2065 * fork-child.c (post_fork_inferior): Pass target down to
2067 * inferiors.c (switch_to_thread): Add process_stratum_target
2069 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2070 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2071 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2072 * remote-utils.c (prepare_resume_reply): Pass the target to
2074 * target.c (the_target): Now a process_stratum_target.
2075 (done_accessing_memory): Pass the target to switch_to_thread.
2076 (set_target_ops): Ajust to use process_stratum_target.
2077 * target.h (struct target_ops): Rename to ...
2078 (struct process_stratum_target): ... this.
2079 (the_target, set_target_ops): Adjust.
2080 (prepare_to_access_memory): Adjust comment.
2081 * win32-low.c (child_xfer_memory): Adjust to use
2082 process_stratum_target.
2083 (win32_target_ops): Now a process_stratum_target.
2085 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2086 Pedro Alves <palves@redhat.com>
2088 * win32-low.c (get_child_debug_event): Extract the fatal exception
2089 from the exit status and convert to the equivalent Posix signal
2091 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2092 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2094 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2096 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2098 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2100 * server.c (gdbserver_version): Change copyright year to 2020.
2101 * gdbreplay.c (gdbreplay_version): Likewise.
2103 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2105 * configure: Regenerate.
2106 * configure.ac: Quote variable arguments of test.
2108 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2110 * Makefile.in: Fix build with GNU Make 3.81
2112 2019-12-16 Tom Tromey <tromey@adacore.com>
2114 * server.c (get_exec_file): Constify result.
2116 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2118 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2119 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2120 * config.in: Regenerate.
2121 * configure: Regenerate.
2122 * configure.ac: Don't check for strerror.
2123 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2124 Call safe_strerror instead of strerror.
2125 * server.h (strerror): Remove this now-unnecessary declaration.
2126 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2128 (gdb_agent_helper_thread): Likewise.
2129 * utils.c (perror_with_name): Likewise.
2131 2019-11-26 Tom Tromey <tom@tromey.com>
2133 * configure, config.in: Rebuild.
2135 2019-11-26 Tom Tromey <tom@tromey.com>
2137 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2138 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2140 * configure, config.in: Rebuild.
2142 2019-11-26 Tom Tromey <tom@tromey.com>
2144 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2145 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2146 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2147 * acinclude.m4: Include ax_pthread.m4.
2148 * config.in, configure: Rebuild.
2150 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2152 * debug.c (debug_set_output): Call safe_strerror instead of
2154 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
2155 (linux_kill_one_lwp): Likewise.
2156 (linux_detach_one_lwp): Likewise.
2157 (linux_wait_for_event_filtered): Likewise.
2158 (store_register): Likewise.
2159 * lynx-low.c (lynx_attach): Likewise.
2160 * mem-break.c (insert_memory_breakpoint): Likewise.
2161 (remove_memory_breakpoint): Likewise.
2162 (delete_fast_tracepoint_jump): Likewise.
2163 (set_fast_tracepoint_jump): Likewise.
2164 (uninsert_fast_tracepoint_jumps_at): Likewise.
2165 (reinsert_fast_tracepoint_jumps_at): Likewise.
2166 * nto-low.c (nto_xfer_memory): Likewise.
2167 (nto_resume): Likewise.
2169 2019-11-20 Luis Machado <luis.machado@linaro.org>
2171 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
2172 instead of register count.
2173 * tdesc.c (tdesc_contains_feature): New function.
2174 * tdesc.h (tdesc_contains_feature): New prototype.
2176 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2178 * Makefile.in: Add safe-strerror.c.
2179 * configure: Regenerate.
2180 * configure.ac: Don't source common.host.
2182 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2184 * config.in: Regenerate.
2185 * configure: Regenerate.
2187 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2189 * ax.c (ax_printf): Handle size_t_arg.
2191 2019-11-06 Christian Biesinger <cbiesinger@google.com>
2193 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
2194 * mi/mi-main.c (output_cores): Likewise.
2195 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
2196 (linux_xfer_osdata_modules): Likewise.
2197 * remote.c (register_remote_support_xml): Likewise.
2198 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
2199 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
2201 2019-11-01 Christian Biesinger <cbiesinger@google.com>
2203 * configure: Regenerate.
2204 * configure.ac: Remove check for strerror_r.
2206 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2208 * config.in: Regenerate.
2209 * configure: Regenerate.
2210 * configure.ac: Also check for strerror_r.
2212 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2214 * ax.h (debug_agent): Remove duplicate declaration.
2216 2019-10-26 Tom de Vries <tdevries@suse.de>
2218 * linux-aarch64-low.c: Fix typos in comments.
2219 * linux-arm-low.c: Same.
2220 * linux-low.c: Same.
2221 * linux-ppc-low.c: Same.
2222 * proc-service.c: Same.
2225 * tracepoint.c: Same.
2226 * win32-low.c: Same.
2228 2019-10-25 Tom Tromey <tromey@adacore.com>
2230 * utils.c (xstrdup): Remove.
2232 2019-10-23 Tom Tromey <tom@tromey.com>
2234 * configure, config.in: Rebuild.
2236 2019-10-23 Tom Tromey <tom@tromey.com>
2238 * configure: Rebuild.
2239 * acinclude.m4: Use m4_include, not sinclude.
2241 2019-10-17 Tom Tromey <tromey@adacore.com>
2243 * configure: Rebuild.
2244 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
2245 in AC_CONFIG_FILES invocation.
2246 * Makefile.in (stamp-h, Makefile): Use new-style config.status
2249 2019-10-16 Christian Biesinger <cbiesinger@google.com>
2251 * server.c: Include xml-builtin.h.
2252 (get_xml_features): Don't declare xml_builtins here.
2254 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2256 * Makefile.in: Remove references to vec-ipa.o.
2258 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2260 * Makefile.in: Remove references to vec.c.
2262 2019-10-02 Christian Biesinger <cbiesinger@google.com>
2264 * server.c (server_waiting): Change to bool.
2265 (extended_protocol): Likewise.
2266 (response_needed): Likewise.
2267 (exit_requested): Likewise.
2268 (run_once): Likewise.
2269 (report_no_resumed): Likewise.
2270 (non_stop): Likewise.
2271 (disable_packet_vCont): Likewise.
2272 (disable_packet_Tthread): Likewise.
2273 (disable_packet_qC): Likewise.
2274 (disable_packet_qfThreadInfo): Likewise.
2275 (handle_general_set): Update.
2276 (handle_detach): Update.
2277 (handle_monitor_command): Update.
2278 (handle_query): Update.
2279 (captured_main): Update.
2280 (process_serial_event): Update.
2281 * server.h (server_waiting): Change to bool.
2282 (disable_packet_vCont): Likewise.
2283 (disable_packet_Tthread): Likewise.
2284 (disable_packet_qC): Likewise.
2285 (disable_packet_qfThreadInfo): Likewise.
2286 (run_once): Likewise.
2287 (non_stop): Likewise.
2288 * target.c (target_stop_and_wait): Update.
2290 2019-10-02 Tom Tromey <tromey@adacore.com>
2292 * Makefile.in (SFILES): Add common-inferior.c.
2293 (OBS): Add common-inferior.o.
2294 * server.c (startup_with_shell): Don't define.
2296 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
2298 * linux-low.c (linux_low_read_btrace): Update for change to
2301 2019-09-20 Christian Biesinger <cbiesinger@google.com>
2303 * debug.c (debug_threads): Remove comment in favor of the header.
2304 * debug.h (using_threads): Add declaration.
2305 (debug_threads): Add comment.
2306 * linux-aarch64-low.c: Include debug.h and remove declaration of
2308 * nto-low.c: Likewise.
2309 * remote-utils.c: Likewise.
2310 * thread-db.c: Likewise.
2312 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2314 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
2315 and powerpc-cell64l-ipa.o.
2316 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
2317 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
2318 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
2321 * spu-low.c: Remove file.
2323 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
2324 (parse_spufs_run): Remove.
2325 (ppc_get_pc): Remove Cell/B.E. support.
2326 (ppc_set_pc): Likewise.
2327 (ppc_breakpoint_at): Likewise.
2328 (ppc_arch_setup): Likewise.
2329 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
2330 tdesc_powerpc_cell32l.
2331 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
2332 or init_registers_powerpc_cell32l.
2333 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
2334 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
2335 or init_registers_powerpc_cell32l.
2336 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
2337 (init_registers_powerpc_cell32l): Remove prototype.
2338 (init_registers_powerpc_cell64l): Likewise.
2340 * target.h (struct target_ops): Remove qxfer_spu member.
2341 * server.c (handle_qxfer_spu): Remove.
2342 (qxfer_packets): Remove entry for "spu".
2343 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
2344 * linux-low.c (SPUFS_MAGIC): Remove.
2345 (spu_enumerate_spu_ids): Remove.
2346 (linux_qxfer_spu): Remove.
2347 (linux_target_ops): Remove qxfer_spu member.
2348 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
2349 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
2350 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
2352 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
2354 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
2355 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
2356 * config.in: Regenerate.
2357 * configure: Regenerate.
2359 2019-08-15 Tom Tromey <tromey@adacore.com>
2361 * target.c (target_write_memory): Use gdb::byte_vector.
2363 2019-08-15 Tom Tromey <tromey@adacore.com>
2365 * tracepoint.c (write_inferior_data_pointer)
2366 (write_inferior_integer, write_inferior_int8)
2367 (write_inferior_uinteger, m_tracepoint_action_download)
2368 (r_tracepoint_action_download, x_tracepoint_action_download)
2369 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2370 (download_agent_expr, download_tracepoint_1)
2371 (download_trace_state_variables, upload_fast_traceframes): Update.
2372 * server.c (gdb_write_memory): Update.
2373 * remote-utils.c (relocate_instruction): Update.
2374 * proc-service.c (ps_pdwrite): Update.
2375 * mem-break.c (remove_memory_breakpoint)
2376 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2377 (uninsert_fast_tracepoint_jumps_at)
2378 (reinsert_fast_tracepoint_jumps_at): Update.
2379 * linux-x86-low.c (append_insns)
2380 (i386_install_fast_tracepoint_jump_pad)
2381 (amd64_write_goto_address, i386_write_goto_address): Update.
2382 * linux-s390-low.c (append_insns, s390_write_goto_address):
2384 * linux-ppc-low.c (ppc_relocate_instruction)
2385 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2386 (ppc_write_goto_address): Update.
2387 * linux-aarch64-low.c (append_insns): Update.
2388 * target.h (struct target_ops): Update.
2389 (write_inferior_memory): Don't declare.
2390 * target.c (target_write_memory): Rename from
2391 write_inferior_memory. Remove old target_write_memory.
2393 2019-08-15 Tom Tromey <tromey@adacore.com>
2395 * target.c (write_inferior_memory): Use std::vector.
2397 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2400 * configure.ac: Drop enable-libmcheck support.
2401 * configure, config.in: Rebuild.
2402 * acinclude.m4: Don't include it.
2404 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2406 * configure.srv: Remove Arm xml files.
2408 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2410 * configure.srv: Add new files. Remove xml generated files.
2411 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2413 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2414 * linux-aarch32-tdesc.c: New file.
2415 * linux-aarch32-tdesc.h: New file.
2416 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2417 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2418 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2419 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2420 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2421 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2422 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2423 (arm_read_description): Call arm_linux_read_description.
2424 (initialize_low_arch): Don't init registers.
2425 * linux-arm-tdesc.c: New file.
2426 * linux-arm-tdesc.h: New file.
2428 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2430 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2431 Move counter inside for.
2432 (arm_read_description): Check ptrace earlier.
2433 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2435 2019-07-09 Tom Tromey <tom@tromey.com>
2437 * configure: Rebuild.
2438 * configure.ac: Change common to gdbsupport.
2439 * acinclude.m4: Change common to gdbsupport.
2440 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2441 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2442 common to gdbsupport.
2443 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2444 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2445 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2446 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2447 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2448 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2449 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2450 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2451 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2452 common to gdbsupport.
2454 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2456 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2458 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2460 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2462 * configure.srv: Remove legacy xml.
2463 * linux-aarch64-low.c (initialize_low_arch): Remove
2464 initialize_low_tdesc call.
2465 * linux-aarch64-tdesc-selftest.c: Remove file.
2466 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2467 * linux-x86-low.c (initialize_low_arch): Remove
2468 initialize_low_tdesc call.
2469 * linux-x86-tdesc-selftest.c: Remove file.
2470 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2472 2019-06-20 Tom de Vries <tdevries@suse.de>
2474 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2475 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2477 2019-06-19 Tom de Vries <tdevries@suse.de>
2479 * debug.h (debug_write): Change return type to ssize_t.
2480 * debug.c (debug_write): Same.
2482 2019-06-14 Tom Tromey <tom@tromey.com>
2484 * configure.ac: Use new path to gnulib.
2485 * configure: Rebuild.
2486 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2489 2019-06-11 Tom Tromey <tom@tromey.com>
2491 * Makefile.in (SFILES): Add alloc.c.
2493 (IPA_OBJS): Add alloc-ipa.o.
2494 (alloc-ipa.o): New target.
2495 (%.o: ../%.c): New pattern rule.
2497 2019-06-10 Tom Tromey <tromey@adacore.com>
2499 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2500 end warning with a newline.
2501 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2503 * thread-db.c (attach_thread): Don't end warning with a newline.
2504 (thread_db_notice_clone): Likewise.
2505 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2507 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2508 end warning with a newline.
2510 2019-06-04 Pedro Alves <palves@redhat.com>
2512 * server.c (captured_main): Use make_unique_xstrdup.
2514 2019-06-02 Tom Tromey <tom@tromey.com>
2516 * gdbreplay.c (fromhex): Remove.
2517 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2519 2019-05-29 Tom Tromey <tromey@adacore.com>
2521 * configure: Rebuild.
2523 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2525 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2526 sign extension code on 32-bit builds.
2528 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2531 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2533 2019-04-19 Tom Tromey <tom@tromey.com>
2535 * server.c (struct vstop_notif): Derive from notif_event.
2537 (queue_stop_reply): Update.
2538 (remove_all_on_match_ptid): Change type. Rewrite.
2539 (discard_queued_stop_replies): Rewrite.
2540 (in_queued_stop_replies_ptid): Change type.
2541 (in_queued_stop_replies): Rewrite.
2542 (notif_stop): Update.
2543 (queue_stop_reply_callback): Update.
2544 (captured_main): Don't call initialize_notif.
2545 (push_stop_notification): Update.
2546 * notif.c (notif_write_event, handle_notif_ack)
2547 (notif_event_enque, notif_push): Update.
2548 (notif_event_xfree, initialize_notif): Remove.
2549 * notif.h (struct notif_event): Include <list>, not
2551 (struct notif_server) <queue>: Now a std::list.
2552 (notif_event_p): Remove typedef.
2553 (initialize_notif): Don't declare.
2554 (struct notif_event): Add virtual destructor.
2556 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2558 * ax.c (ax_vdebug): Call debug_printf.
2559 * debug.c (debug_write): New function.
2560 * debug.h (debug_write): New declaration.
2561 * linux-low.c (sigchld_handler): Call debug_write.
2563 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2565 * debug.c (debug_set_output): New function.
2566 (debug_vprintf): Send output to debug_file.
2567 (debug_flush): Likewise.
2568 * debug.h (debug_set_output): New declaration.
2569 * server.c (handle_monitor_command): Add debug-file option.
2570 (captured_main): Likewise.
2572 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2574 * debug.c (remote_debug): Add definition.
2575 * debug.h (remote_debug): Add declaration.
2576 * hostio.c (remote_debug): Remove declaration.
2577 * remote-utils.c (struct ui_file): Likewise.
2578 (remote_debug): Likewise.
2579 * remote-utils.h (remote_debug): Likewise,
2580 * server.c (remote_debug): Remove definition.
2582 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2584 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2585 when using a 64-bit gdbserver.
2587 2019-04-09 Tom Tromey <tromey@adacore.com>
2589 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2591 2019-04-08 Tom Tromey <tom@tromey.com>
2593 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2595 (linux_resume_one_lwp): Likewise.
2597 2019-04-08 Tom Tromey <tom@tromey.com>
2599 * gdbreplay.c: Update.
2600 * linux-low.c: Update.
2603 2019-04-08 Tom Tromey <tom@tromey.com>
2605 * server.c: Use C++ exception handling.
2606 * linux-low.c: Use C++ exception handling.
2607 * gdbreplay.c: Use C++ exception handling.
2609 2019-04-08 Tom Tromey <tom@tromey.com>
2611 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2612 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2613 (captured_main, main): Update.
2614 * gdbreplay.c (main): Update.
2616 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2618 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2619 value in argument pointer, return 1 if the entry is found and 0
2620 otherwise. Move comment.
2621 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2622 * linux-low.h (linux_get_auxv): Declare.
2623 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2625 2019-04-05 Tom Tromey <tromey@adacore.com>
2627 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2630 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2632 * linux-low.c (AT_HWCAP2): Add define if not already included.
2634 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2636 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2637 (aarch64_arch_setup): Call linux_get_hwcap.
2638 * linux-arm-low.c (arm_get_hwcap): Remove function.
2639 (arm_read_description): Call linux_get_hwcap.
2640 * linux-low.c (linux_get_auxv): New function.
2641 (linux_get_hwcap): Likewise.
2642 (linux_get_hwcap2): Likewise.
2643 * linux-low.h (linux_get_hwcap): New declaration.
2644 (linux_get_hwcap2): Likewise.
2645 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2646 (ppc_arch_setup): Call linux_get_hwcap.
2647 * linux-s390-low.c (s390_get_hwcap): Remove function.
2648 (s390_arch_setup): Call linux_get_hwcap.
2650 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2651 Jiong Wang <jiong.wang@arm.com>
2653 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2654 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2656 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2658 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2659 Jiong Wang <jiong.wang@arm.com>
2661 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2662 (aarch64_get_hwcap): New function.
2663 (aarch64_arch_setup): Read APIA hwcap.
2665 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2666 Jiong Wang <jiong.wang@arm.com>
2668 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2669 (initialize_low_tracepoint): Likewise.
2670 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2671 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2672 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2673 (aarch64_linux_read_description): Likewise.
2674 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2676 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2678 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2679 i386_create_target_description for 'segments' parameter.
2680 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2681 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2682 * win32-i386-low.c (i386_arch_setup): Likewise.
2684 2019-03-12 Tom Tromey <tromey@adacore.com>
2686 * linux-low.c (iterate_over_lwps): Update.
2688 2019-03-06 Tom Tromey <tom@tromey.com>
2690 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2691 (captured_main): Use SCOPE_EXIT.
2693 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2695 * configure.srv: Use '$enable_unittest' instead of '$development'
2696 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2699 2019-02-27 Tom Tromey <tromey@adacore.com>
2701 * gdbreplay.c (logchar): Handle \r\n.
2703 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2705 * linux-low.c (linux_attach): Add process before lwp.
2706 * server.c (attach_inferior): Check if already attached.
2708 2019-02-07 Tom Tromey <tom@tromey.com>
2710 * x86-tdesc.h: Rename include guard.
2711 * x86-low.h: Add include guard.
2712 * wincecompat.h: Rename include guard.
2713 * win32-low.h: Add include guard.
2714 * utils.h: Rename include guard.
2715 * tracepoint.h: Rename include guard.
2716 * tdesc.h: Rename include guard.
2717 * target.h: Rename include guard.
2718 * server.h: Rename include guard.
2719 * remote-utils.h: Rename include guard.
2720 * regcache.h: Rename include guard.
2721 * nto-low.h: Rename include guard.
2722 * notif.h: Add include guard.
2723 * mem-break.h: Rename include guard.
2724 * lynx-low.h: Add include guard.
2725 * linux-x86-tdesc.h: Add include guard.
2726 * linux-s390-tdesc.h: Add include guard.
2727 * linux-ppc-tdesc-init.h: Add include guard.
2728 * linux-low.h: Add include guard.
2729 * linux-aarch64-tdesc.h: Add include guard.
2730 * linux-aarch32-low.h: Add include guard.
2731 * inferiors.h: Rename include guard.
2732 * i387-fp.h: Rename include guard.
2733 * hostio.h: Rename include guard.
2734 * gdbthread.h: Rename include guard.
2735 * gdb_proc_service.h: Rename include guard.
2736 * event-loop.h: Rename include guard.
2737 * dll.h: Rename include guard.
2738 * debug.h: Rename include guard.
2739 * ax.h: Rename include guard.
2741 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2744 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2745 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2747 2019-01-25 Tom Tromey <tom@tromey.com>
2749 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2751 2019-01-25 Tom Tromey <tom@tromey.com>
2753 * win32-low.c: Fix common/ includes.
2754 * win32-i386-low.c: Fix common/ includes.
2755 * tracepoint.c: Fix common/ includes.
2756 * thread-db.c: Fix common/ includes.
2757 * target.h: Fix common/ includes.
2758 * symbol.c: Fix common/ includes.
2759 * spu-low.c: Fix common/ includes.
2760 * server.h: Fix common/ includes.
2761 * server.c: Fix common/ includes.
2762 * remote-utils.c: Fix common/ includes.
2763 * regcache.h: Fix common/ includes.
2764 * regcache.c: Fix common/ includes.
2765 * nto-x86-low.c: Fix common/ includes.
2766 * notif.h: Fix common/ includes.
2767 * mem-break.h: Fix common/ includes.
2768 * lynx-low.c: Fix common/ includes.
2769 * lynx-i386-low.c: Fix common/ includes.
2770 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2771 * linux-x86-low.c: Fix common/ includes.
2772 * linux-low.c: Fix common/ includes.
2773 * inferiors.h: Fix common/ includes.
2774 * i387-fp.c: Fix common/ includes.
2775 * hostio.c: Fix common/ includes.
2776 * hostio-errno.c: Fix common/ includes.
2777 * gdbthread.h: Fix common/ includes.
2778 * gdbreplay.c: Fix common/ includes.
2779 * fork-child.c: Fix common/ includes.
2780 * event-loop.c: Fix common/ includes.
2782 (enum gdb_agent_op): Fix common/ includes.
2784 2019-01-21 Tom Tromey <tom@tromey.com>
2786 * tracepoint.c: Fix includes.
2787 * remote-utils.c: Fix includes.
2788 * linux-x86-low.c: Fix includes.
2790 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2792 * gdbreplay.c (gdbreplay_version): Update copyright year in
2794 * server.c (gdbserver_version): Likewise.
2796 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2798 * linux-low.c (add_lwp): Switch ordering.
2800 2018-11-29 Tom Tromey <tom@tromey.com>
2802 * win32-low.c (win32_join): Take pid, not process.
2803 * target.h (struct target_ops) <join>: Change argument type.
2804 (join_inferior): Change argument name.
2805 * spu-low.c (spu_join): Take pid, not process.
2806 * server.c (handle_detach): Preserve pid before destroying
2808 * lynx-low.c (lynx_join): Take pid, not process.
2809 * linux-low.c (linux_join): Take pid, not process.
2811 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2813 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2814 (aarch64_cannot_fetch_register): Likewise.
2815 (struct linux_target_ops): Update references.
2817 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2819 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2821 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2823 * configure.srv (ipa_ppc_linux_regobj): Add
2824 powerpc-isa207-htm-vsx32l-ipa.o and
2825 powerpc-isa207-htm-vsx64l-ipa.o.
2826 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2827 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2828 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2829 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2830 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2831 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2832 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2833 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2834 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2835 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2836 (init_registers_powerpc_isa207_htm_vsx32l)
2837 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2838 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2839 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2840 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2841 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2842 (ppc_store_tm_ctarregset): New functions.
2843 (ppc_regsets): Add entries for HTM regsets.
2844 (ppc_arch_setup): Set htm in features struct when needed. Set
2845 sizes for the HTM regsets.
2846 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2847 (initialize_low_arch): Call
2848 init_registers_powerpc_isa207_htm_vsx32l and
2849 init_registers_powerpc_isa207_htm_vsx64l.
2850 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2851 PPC_TDESC_ISA207_HTM_VSX.
2852 (initialize_low_tracepoint): Call
2853 init_registers_powerpc_isa207_htm_vsx32l and
2854 init_registers_powerpc_isa207_htm_vsx64l.
2856 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2858 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2859 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2860 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2861 (ppc_store_pmuregset): New functions.
2862 (ppc_regsets): Add entries for ebb and pmu regsets.
2863 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2864 pmu regsets are available. Set sizes for these regsets.
2866 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2868 * configure.srv (ipa_ppc_linux_regobj): Add
2869 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2870 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2871 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2872 rs6000/powerpc-isa207-vsx32l.xml, and
2873 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2874 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2875 <PPC_TDESC_ISA207_VSX>: New enum value.
2876 (init_registers_powerpc_isa207_vsx32l): Declare.
2877 (init_registers_powerpc_isa207_vsx64l): Declare.
2878 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2879 (ppc_store_tarregset): New function.
2880 (ppc_regsets): Add entry for the TAR regset.
2881 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2882 size for the TAR regsets.
2883 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2884 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2885 and init_registers_powerpc_isa207_vsx64l.
2886 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2887 (initialize_low_tracepoint): Call
2888 init_registers_powerpc_isa207_vsx32l and
2889 init_registers_powerpc_isa207_vsx64l.
2891 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2892 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2894 * configure.srv (ipa_ppc_linux_regobj): Add
2895 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2896 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2897 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2898 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2899 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2900 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2901 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2902 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2903 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2904 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2905 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2906 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2907 (ppc_hwcap): Add comment.
2908 (ppc_hwcap2): New global.
2909 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2910 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2911 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2912 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2913 when needed. Set sizes for the the DSCR and PPR regsets.
2914 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2915 (initialize_low_arch): Call
2916 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2917 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2918 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2919 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2920 (initialize_low_tracepoint): Call
2921 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2922 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2924 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2926 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2928 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2929 Simon Marchi <simark@simark.ca>
2931 * acinclude.m4: Include "../selftest.m4".
2932 * configure: Regenerate.
2933 * configure.ac: Use "GDB_AC_SELFTEST".
2934 * configure.srv: Use "$enable_unittests" instead of
2935 "$development" when checking whether unit tests have been
2937 * server.c (captured_main): Update message informing that
2938 selftests have been disabled.
2940 2018-10-04 Tom Tromey <tom@tromey.com>
2942 * configure: Rebuild.
2944 2018-10-04 Tom Tromey <tom@tromey.com>
2946 * server.c (handle_status): Rename inner "thread".
2947 (process_serial_event): Declare "res" in 'm' case.
2948 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2949 (iterate_over_lwps): Rename inner "thread".
2950 (linux_qxfer_libraries_svr4): Rename inner "len".
2951 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2953 2018-10-01 Gary Benson <gbenson@redhat.com>
2955 * gdb_proc_service.h: Moved common code to
2956 common/gdb_proc_service.h.
2958 2018-10-01 Gary Benson <gbenson@redhat.com>
2960 * gdb_proc_service.h: Synchronize comments and whitespace with
2961 GDB's version of this file.
2963 2018-09-25 Tom Tromey <tom@tromey.com>
2965 * configure: Rebuild.
2966 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2968 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2970 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2971 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2972 ($(IPA_LIB)): Sort IPA_OBJS.
2974 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2976 * Makefile.in: Remove references to $(ADD_DEPS).
2978 2018-09-16 Tom Tromey <tom@tromey.com>
2980 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2982 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2985 2018-09-05 Tom Tromey <tom@tromey.com>
2987 * configure: Rebuild.
2989 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2992 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2994 2018-08-27 Tom Tromey <tom@tromey.com>
2997 * configure: Rebuild.
2999 2018-08-27 Tom Tromey <tom@tromey.com>
3001 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
3002 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
3003 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
3004 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
3005 (s390x_emit_stack_adjust): Add casts to unsigned char.
3007 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
3011 * server.h (struct client_state) <disable_randomization>:
3014 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3016 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
3018 (mips_supply_ptrace_register): Likewise.
3020 2018-07-22 Tom Tromey <tom@tromey.com>
3022 * configure: Rebuild.
3024 2018-07-22 Tom Tromey <tom@tromey.com>
3026 * win32-low.c (win32_create_inferior): Remove unused variables.
3027 * gdbreplay.c (remote_open): Remove unused variable.
3028 * remote-utils.c (remote_prepare): Remove unused variable.
3029 * x86-tdesc.h (X86_TDESC_H): Define.
3030 (amd64_expedite_regs): Define conditionally.
3031 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
3032 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
3033 * remote-utils.c (readchar): Remove unused variable.
3035 2018-07-13 Pedro Alves <palves@redhat.com>
3037 * linux-low.c (linux_kill): Change parameter to process_info
3038 pointer instead of pid. Adjust.
3039 * lynx-low.c (lynx_kill): Likewise.
3040 * nto-low.c (nto_kill): Likewise.
3041 * spu-low.c (spu_kill): Likewise.
3042 * win32-low.c (win32_kill): Likewise.
3043 * server.c (handle_v_kill, kill_inferior_callback)
3044 (detach_or_kill_for_exit): Adjust.
3045 * target.c (kill_inferior): Change parameter to process_info
3046 pointer instead of pid. Adjust.
3047 * target.h (struct target_ops) <kill>: Change parameter to
3048 process_info pointer instead of pid. Adjust all implementations
3050 (kill_inferior): Likewise.
3052 2018-07-13 Pedro Alves <palves@redhat.com>
3054 * linux-low.c (linux_detach, linux_join): Change parameter to
3055 process_info pointer instead of pid. Adjust.
3056 * lynx-low.c (lynx_detach, lynx_join): Likewise.
3057 * nto-low.c (nto_detach): Likewise.
3058 * spu-low.c (spu_detach, spu_join): Likewise.
3059 * win32-low.c (win32_detach, win32_join): Likewise.
3060 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3061 * target.h (struct target_ops) <detach, join>: Change parameter to
3062 process_info pointer instead of pid. Adjust all implementations
3064 (detach_inferior, join_inferior): Rename 'pid' parameter to
3067 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3068 Jan Kratochvil <jan.kratochvil@redhat.com>
3069 Paul Fertser <fercerpav@gmail.com>
3070 Tsutomu Seki <sekiriki@gmail.com>
3072 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3073 (OBS): Add 'common/netstuff.o'.
3074 (GDBREPLAY_OBS): Likewise.
3075 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3076 (remote_open): Implement support for IPv6
3078 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3080 (handle_accept_event): Accept connections from IPv6 sources.
3081 (remote_prepare): Handle IPv6-style hostnames; implement
3082 support for IPv6 connections.
3083 (remote_open): Implement support for printing connections from
3086 2018-07-11 Pedro Alves <palves@redhat.com>
3089 * mem-break.c (any_persistent_commands): Add process_info
3090 parameter and use it instead of relying on the current process.
3091 Change return type to bool.
3092 * mem-break.h (any_persistent_commands): Add process_info
3093 parameter and change return type to bool.
3094 * server.c (handle_detach): Remove require_running_or_return call.
3095 Look up the process_info for the process we're about to detach.
3096 If not found, return back error to GDB. Adjust
3097 any_persistent_commands call to pass down a process pointer.
3099 2018-07-11 Pedro Alves <palves@redhat.com>
3101 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3102 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3103 instead of collect_register_by_name.
3104 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3105 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3107 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3108 Pedro Alves <palves@redhat.com>
3110 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3112 2018-07-03 Tom Tromey <tom@tromey.com>
3114 * linux-low.c: Update.
3115 * lynx-low.c: Update.
3116 * mem-break.c: Update.
3117 * nto-low.c: Update.
3118 * remote-utils.c: Update.
3120 * spu-low.c: Update.
3122 * win32-low.c: Update.
3124 2018-07-03 Tom Tromey <tom@tromey.com>
3128 2018-07-03 Tom Tromey <tom@tromey.com>
3130 * linux-low.c: Update.
3132 2018-07-03 Tom Tromey <tom@tromey.com>
3136 2018-07-03 Tom Tromey <tom@tromey.com>
3138 * linux-low.c: Update.
3139 * linux-mips-low.c: Update.
3140 * lynx-low.c: Update.
3141 * nto-low.c: Update.
3142 * remote-utils.c: Update.
3144 * spu-low.c: Update.
3146 * thread-db.c: Update.
3148 2018-07-03 Tom Tromey <tom@tromey.com>
3150 * linux-low.c: Update.
3151 * linux-mips-low.c: Update.
3152 * lynx-low.c: Update.
3153 * mem-break.c: Update.
3154 * nto-low.c: Update.
3155 * remote-utils.c: Update.
3157 * spu-low.c: Update.
3159 * tracepoint.c: Update.
3161 2018-07-03 Tom Tromey <tom@tromey.com>
3163 * linux-low.c: Update.
3164 * linux-ppc-low.c: Update.
3165 * linux-x86-low.c: Update.
3166 * proc-service.c: Update.
3168 * spu-low.c: Update.
3169 * thread-db.c: Update.
3170 * win32-low.c: Update.
3172 2018-07-03 Tom Tromey <tom@tromey.com>
3174 * linux-low.c: Update.
3175 * lynx-low.c: Update.
3176 * nto-low.c: Update.
3177 * remote-utils.c: Update.
3178 * spu-low.c: Update.
3179 * thread-db.c: Update.
3180 * win32-low.c: Update.
3182 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3184 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
3185 parameter in call to 'amd64_create_target_description'.
3187 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3189 * x86-tdesc.h: Remove executable permission flag.
3191 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3193 * configure.ac: Remove AC_PREREQ, add missing quoting.
3194 * configure: Re-generate.
3195 * config.in: Re-generate.
3196 * aclocal.m4: Re-generate.
3198 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3200 * tracepoint.h (current_traceframe): Remove declaration.
3202 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3204 * linux-aarch64-low.c (is_sve_tdesc): New function.
3205 (aarch64_sve_regs_copy_to_regcache): Likewise.
3206 (aarch64_sve_regs_copy_from_regcache): Likewise.
3207 (aarch64_regs_info): Add SVE checks.
3208 (initialize_low_arch): Initialize SVE.
3210 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3212 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
3214 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3216 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
3217 (initialize_low_tracepoint): Likewise
3218 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
3219 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
3221 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
3223 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
3225 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3227 * server.h (PBUFSIZ): Increase size
3229 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3231 * regcache.c (regcache::raw_compare): New function.
3232 * regcache.h (regcache::raw_compare): New declaration.
3234 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3236 * regcache.c (new_register_cache): Use new.
3237 (free_register_cache): Use delete.
3238 (register_data): Use const.
3239 (supply_register): Move body inside regcache.
3240 (regcache::raw_supply): New override function.
3241 (collect_register): Move body inside regcache.
3242 (regcache::raw_collect): New override function.
3243 (regcache::get_register_status): New override function.
3244 * regcache.h (struct regcache): Inherit from reg_buffer_common.
3246 2018-06-09 Tom Tromey <tom@tromey.com>
3248 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
3250 (event_queue): Use std::queue.
3251 (gdb_event_xfree): Remove.
3252 (initialize_event_loop, process_event, wait_for_event): Update.
3254 2018-06-08 Stan Cox <scox@redhat.com>
3256 * win32-low.c (win32_create_inferior): last_ptid and last_status
3257 moved to client_state.
3259 2018-06-08 Pedro Alves <palves@redhat.com>
3261 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
3262 common/common-exceptions.o, common/common-utils.o,
3263 common/errors.o, common/print-utils.o and utils.o.
3264 * gdbreplay.c: Include "common-defs.h" instead of the two
3265 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
3266 string.h or alloca.h.
3267 (perror_with_name): Delete.
3268 (remote_open): Use xstrdup instead of strdup.
3269 (main): Rename to ...
3270 (captured_main): ... this.
3273 2018-06-08 Tom Tromey <tom@tromey.com>
3275 * linux-low.c (linux_low_read_btrace): Update.
3277 2018-06-04 Stan Cox <scox@redhat.com>
3279 * server.h (struct client_state): New.
3280 * server.c (cont_thread, general_thread, multi_process)
3281 (report_fork_events, report_vfork_events, report_exec_events)
3282 (report_thread_events, swbreak_feature, hwbreak_feature)
3283 (vCont_supported, disable_randomization, pass_signals)
3284 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
3285 Moved to client_state.
3286 * remote-utils.c (remote_debug, noack_mode)
3287 (transport_is_reliable): Moved to client_state.
3288 * tracepoint.c (current_traceframe): Moved to client_state.
3291 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
3292 linux-low.c, remote-utils.h, target.c: Use client_state.
3294 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3296 * configure.srv: Add new c/h file.
3298 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3300 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
3303 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3305 * gdb.arch/mips-fpregset-core.exp: New test.
3306 * gdb.arch/mips-fpregset-core.c: New test source.
3308 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
3311 * hostio.c (require_int): Do not report overflow for integers
3312 between 0xfffffff and 0x7fffffff.
3314 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3316 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
3317 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
3318 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
3320 (the_low_target): Wire them.
3322 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3324 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
3325 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
3326 mode. Call collect_register_by_name with vscr using
3327 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
3328 (ppc_store_vrregset): Add and set vscr_offset variable as in
3329 ppc_fill_vrregset. Call supply_register_by_name with vscr using
3332 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3334 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3335 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
3336 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
3338 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3340 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
3341 (ppc_store_vsxregset): Likewise.
3342 (ppc_fill_vrregset): Likewise.
3343 (ppc_store_vrregset): Likewise.
3344 (ppc_fill_evrregset): Likewise.
3345 (ppc_store_evrregset): Likewise.
3346 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
3347 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
3350 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3352 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
3353 wordsize of the inferior. Call ppc_linux_target_wordsize.
3355 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3357 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
3358 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
3359 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
3360 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3361 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3362 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3363 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3364 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3365 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3366 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3367 (tdesc_powerpc_e500l): Remove.
3368 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3369 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3370 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3371 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3373 (ppc_arch_setup): Remove target description matching code. Fill a
3374 ppc_linux_features struct and call ppc_linux_match_description
3377 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3379 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3380 width of the requested register exceeds the width of the
3382 (mips_cannot_store_register): Likewise.
3384 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3386 * linux-mips-low.c (mips_fetch_register): New function. Update
3388 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3389 (the_low_target): Wire `mips_fetch_register'.
3391 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3393 * lynx-i386-low.c (LYNXOS_178): New macro.
3394 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3395 the layout on LynxOS-178.
3396 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3397 handle floating point registers that are not supported by
3400 2018-05-10 Tom Tromey <tom@tromey.com>
3402 * configure: Rebuild.
3404 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3407 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3408 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3409 Use it to set the expedite_regs field in the given tdesc.
3410 * x86-tdesc.h: New file.
3411 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3412 Adjust following the addition of the new expedite_regs parameter
3413 to init_target_desc.
3414 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3415 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3416 (i386_linux_read_description, amd64_linux_read_description):
3417 Adjust following the addition of the new expedite_regs parameter
3418 to init_target_desc.
3419 * lynx-i386-low.c: #include "x86-tdesc.h".
3420 (lynx_i386_arch_setup): Adjust following the addition of the new
3421 expedite_regs parameter to init_target_desc.
3422 * nto-x86-low.c: #include "x86-tdesc.h".
3423 (nto_x86_arch_setup): Adjust following the addition of the new
3424 expedite_regs parameter to init_target_desc.
3425 * win32-i386-low.c: #include "x86-tdesc.h".
3426 (i386_arch_setup): Adjust following the addition of the new
3427 expedite_regs parameter to init_target_desc.
3429 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3432 * win32-low.c (win32_create_inferior): Add call to my_wait
3433 setting last_status global.
3435 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3438 * win32-low.c (create_process): Only call gdb_tilde_expand if
3439 inferior_cwd is not NULL.
3441 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3443 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3444 registers to the cache if their values have changed.
3445 (i387_xsave_to_cache): Provide default values for x87 control
3446 registers when these features are available, but disabled.
3447 * regcache.c (supply_register_by_name_zeroed): New function.
3448 * regcache.h (supply_register_by_name_zeroed): Declare new
3451 2018-05-07 Tom Tromey <tom@tromey.com>
3453 * configure: Rebuild.
3455 2018-05-04 Tom Tromey <tom@tromey.com>
3457 * configure: Rebuild.
3459 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3460 Pedro Alves <palves@redhat.com>
3462 * linux-aarch64-low.c (aarch64_stopped_data_address):
3465 2018-04-27 Tom Tromey <tom@tromey.com>
3467 * configure: Rebuild.
3469 2018-04-23 Tom Tromey <tom@tromey.com>
3471 * configure: Rebuild.
3473 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3475 * Makefile.in (depcomp): Add "..".
3476 (all_deps_files): New and use it.
3478 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3480 * configure.srv (aarch64*-*-linux*): Don't include xml.
3481 (i[34567]86-*-cygwin*): Likewise.
3482 (i[34567]86-*-linux*): Likewise.
3483 (i[34567]86-*-lynxos*): Likewise.
3484 (i[34567]86-*-mingw32ce*): Likewise.
3485 (i[34567]86-*-mingw*): Likewise.
3486 (i[34567]86-*-nto*): Likewise.
3487 (tic6x-*-uclinux): Likewise.
3488 (x86_64-*-linux*): Likewise.
3489 (x86_64-*-mingw*): Likewise.
3490 (x86_64-*-cygwin*): Likewise.
3492 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3494 * tdesc.c: Remove xml parameter.
3496 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3498 * server.c (get_features_xml): Remove cast.
3499 * tdesc.c (void target_desc::accept): Fill in function.
3500 (tdesc_get_features_xml): Remove old xml creation.
3501 (print_xml_feature::visit_pre): Add xml vistor.
3502 * tdesc.h (struct target_desc): Make xmltarget mutable.
3503 (tdesc_get_features_xml): Remove declaration.
3505 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3507 * tdesc.c (tdesc_architecture_name): Add new function.
3508 (tdesc_osabi_name): Likewise.
3509 (tdesc_get_features_xml): Use new functions.
3511 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3513 * tdesc.c (tdesc_create_flags): Remove.
3514 (tdesc_add_flag): Likewise.
3515 (tdesc_named_type): Likewise.
3516 (tdesc_create_union): Likewise.
3517 (tdesc_create_struct): Likewise.
3518 (tdesc_create_vector): Likewise.
3519 (tdesc_add_bitfield): Likewise.
3520 (tdesc_add_field): Likewise.
3521 (tdesc_set_struct_size): Likewise.
3523 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3525 * tdesc.c (~target_desc): Remove implictly deleted items.
3526 (init_target_desc): Iterate all features.
3527 (tdesc_get_features_xml): Use vector.
3528 (tdesc_create_feature): Create feature.
3529 * tdesc.h (tdesc_feature) Remove
3530 (target_desc): Add features.
3532 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3534 * Makefile.in: Add common/tdesc.c
3535 * tdesc.c (init_target_desc): init all reg_defs from register
3537 (tdesc_create_reg): Create tdesc_reg.
3538 * tdesc.h (tdesc_feature): Add register vector.
3540 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3542 * tdesc.h (struct target_desc) <features>: Change type to
3543 std::vector<std::string>.
3544 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3546 (tdesc_get_features_xml): Likewise.
3547 (tdesc_create_feature): Likewise.
3549 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3551 * regcache.c (find_register_by_number): Return a ref.
3552 (find_regno): Use references.
3553 (register_size): Likewise.
3554 (register_data): Likewise.
3555 * tdesc.c (target_desc::~target_desc): Remove free calls.
3556 (target_desc::operator==): Use std::vector compare.
3557 (init_target_desc): Use reference.
3558 (tdesc_create_reg): Use reg constructors.
3559 * tdesc.h (struct target_desc): Replace pointer with object.
3561 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3563 * regcache.c (find_register_by_number): Make static.
3564 (find_regno): Use find_register_by_number
3565 * regcache.h (struct reg): Remove declaration.
3567 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3569 * tdesc.c (target_desc::~target_desc): Move to here.
3570 (target_desc::operator==): Likewise.
3571 * tdesc.h (target_desc::~target_desc): Move from here.
3572 (target_desc::operator==): Likewise.
3574 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3576 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3578 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3580 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3582 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3583 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3584 and init_registers_s390_gs_linux64.
3586 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3588 * linux-s390-low.c (s390_fill_gs): Remove function.
3589 (s390_fill_gsbc): Remove function.
3590 (s390_regsets): Set fill functions for the guarded storage regsets
3593 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3595 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3596 the word size. Add comment.
3597 (s390_get_wordsize): New function.
3598 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3599 pswm with it. Instead, use s390_get_wordsize to determine the
3600 word size first and derive the correct tdesc from that directly.
3602 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3604 * Makefile.in: Include silent-rules.mk.
3605 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3606 (COMPILE): Add ECHO_CXX.
3607 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3608 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3609 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3610 (version-generated.c): Add ECHO_GEN.
3611 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3612 (IPAGENT_COMPILE): Add ECHO_CXX.
3613 (%-generated.c): Add ECHO_REGDAT.
3615 2018-03-14 Tom Tromey <tom@tromey.com>
3618 * ax.c (ax_printf): Special case for NULL.
3620 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3622 * linux-low.c (linux_qxfer_libraries_svr4): Use
3623 xml_escape_text_append.
3625 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3627 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3629 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3631 * server.c (handle_general_set): Remove unnecessary xstrdup.
3633 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3635 * server.c (parse_debug_format_options): Adjust to
3636 delim_string_to_char_ptr_vec changes.
3637 * thread-db.c (thread_db_load_search): Adjust to
3638 dirnames_to_char_ptr_vec changes.
3640 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3642 * target.h (target_enable_btrace, target_disable_btrace)
3643 (target_read_btrace, target_read_btrace_conf): Turn macro into
3644 inline function. Throw error if target method is not defined.
3645 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3646 check for btrace target method. Be prepared to handle exceptions
3647 from btrace target methods.
3649 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3651 * server.c (captured_main): Change order of error message printed
3652 when the current working directory cannot be found.
3654 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3656 * server.c: Include "filenames.h" and "pathstuff.h".
3657 (program_name): Delete variable.
3658 (program_path): New anonymous class.
3659 (get_exec_wrapper): Use "program_path" instead of
3661 (handle_v_run): Likewise.
3662 (captured_main): Likewise.
3663 (process_serial_event): Likewise.
3665 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3667 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3668 (OBJS): Add "pathstuff.o".
3669 * server.c (current_directory): New global variable.
3670 (captured_main): Initialize "current_directory".
3672 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3674 * tdesc.c: Use common/tdesc.h.
3675 * tdesc.h: Likewise.
3677 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3678 Simon Marchi <simon.marchi@ericsson.com>
3680 * Makefile.in: Switch order of make rules.
3682 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3684 * Makefile.in: Add common directory in build.
3685 * configure.ac: Add common reference.
3686 * configure: Regenerate.
3688 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3690 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3691 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3692 * spu-low.c (spu_target_ops): Likewise.
3693 * win32-low.c (win32_target_ops): Likewise.
3694 * server.c (supported_btrace_packets): Report packets unconditionally.
3695 * target.h (target_ops) <supports_btrace>: Remove.
3696 (target_supports_btrace): Remove.
3698 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3700 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3701 (handle_btrace_disable): Change return type to void. Use exceptions
3703 (handle_btrace_general_set): Catch exception and copy message to
3706 2018-02-08 Tom Tromey <tom@tromey.com>
3708 * linux-low.c (install_software_single_step_breakpoints): Use
3709 make_scoped_restore.
3710 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3711 (do_restore_current_thread_cleanup): Remove.
3712 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3715 2018-02-08 Tom Tromey <tom@tromey.com>
3717 * mem-break.c (set_raw_breakpoint_at): Use
3718 gdb::unique_xmalloc_ptr.
3720 2018-01-30 Pedro Alves <palves@redhat.com>
3723 * target.c (target_terminal::terminal_state): Rename to ...
3724 (target_terminal::m_terminal_state): ... this.
3726 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3728 * linux-low.c (handle_extended_wait): Surround call to
3729 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3731 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3733 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3734 linux_ptrace_attach_fail_reason_string now returning an
3736 (linux_attach): Likewise.
3737 * thread-db.c (attach_thread): Likewise.
3739 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3742 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3743 checking for fs_base/gs_base fields in struct user_regs_struct.
3744 * configure: Regenerate.
3746 2018-01-16 Yao Qi <yao.qi@linaro.org>
3749 * linux-low.c (fetch_register): Call supply_register instead of
3752 2018-01-08 Yao Qi <yao.qi@linaro.org>
3753 Simon Marchi <simon.marchi@ericsson.com>
3755 * Makefile.in (OBS): Remove selftest.o.
3756 * configure.ac: Set srv_selftest_objs if $development is true.
3757 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3758 * configure: Re-generated.
3759 * server.c (captured_main): Wrap variable selftest_filter with
3762 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3764 * server.c (parse_debug_format_options): Return std::string.
3765 (handle_monitor_command, captured_main): Adjust.
3767 2018-01-05 Pedro Alves <palves@redhat.com>
3770 * server.c (captured_main): Pass quiet=false to
3771 save_original_signals_state.
3773 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3775 * gdbreplay.c (gdbreplay_version): Update copyright year in
3777 * server.c (gdbserver_version): Likewise.
3779 2017-12-08 Tom Tromey <tom@tromey.com>
3781 * ax.c (ax_printf): Update.
3783 2017-12-07 Yao Qi <yao.qi@linaro.org>
3785 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3786 aarch64_linux_read_description.
3787 * linux-amd64-ipa.c (idx2mask): New array.
3788 (get_ipa_tdesc): Move idx2mask out.
3789 (initialize_low_tracepoint): Initialize target descriptions.
3790 * linux-i386-ipa.c (idx2mask): New array.
3791 (get_ipa_tdesc): Move idx2mask out.
3792 (initialize_low_tracepoint): Initialize target descriptions.
3794 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3796 * tdesc.c (struct tdesc_type): Change return type.
3797 (tdesc_add_flag): Change parameter type.
3798 (tdesc_add_bitfield): Likewise.
3799 (tdesc_add_field): Likewise.
3800 (tdesc_set_struct_size): Likewise.
3802 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3804 * regcache.c (registers_to_string): Remove unused variable.
3806 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3808 * inferiors.c (for_each_inferior_with_data): Remove.
3809 * inferiors.h (for_each_inferior_with_data): Remove.
3810 * server.c (handle_qxfer_threads_worker): Change parameter type.
3811 (handle_qxfer_threads_proper): Use for_each_thread.
3813 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3815 * inferiors.c (for_each_inferior): Remove.
3816 (clear_inferiors): Use for_each_thread.
3817 * inferiors.h (for_each_inferior): Remove.
3818 * linux-low.c (linux_wait_for_event_filtered): Use
3820 (linux_stabilize_threads): Likewise.
3821 * regcache.c (regcache_release): Likewise.
3822 * server.c (gdb_wants_all_threads_stopped): Likewise.
3823 (clear_pending_status_callback): Remove.
3824 (handle_status): Use for_each_thread.
3825 (captured_main): Likewise.
3826 * win32-low.c (child_init_thread_list): Likewise.
3827 (win32_clear_inferiors): Likewise.
3828 (fake_breakpoint_event): Likewise.
3830 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3832 * inferiors.h (find_inferior): Remove.
3833 * inferiors.c (find_inferior): Remove.
3835 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3837 * linux-low.c (resume_status_pending_p): Update comment.
3838 (need_step_over_p): Update comment.
3840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3842 * linux-low.c (proceed_one_lwp): Return void, change parameter
3844 (unsuspend_and_proceed_one_lwp): Likewise.
3845 (proceed_all_lwps): Use for_each_thread.
3846 (unstop_all_lwps): Likewise.
3848 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3850 * linux-low.c (linux_resume_one_thread): Return void, take
3852 (linux_resume): Use for_each_thread.
3854 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3856 * linux-low.c (send_sigstop_callback): Return void, change
3857 parameter type. Rename to...
3858 (send_sigstop): ... this.
3859 (suspend_and_send_sigstop_callback): Return void, change parameter
3861 (suspend_and_send_sigstop): ... this.
3862 (stop_all_lwps): Use for_each_thread.
3864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3866 * linux-low.c (lwp_running): Return bool, remove unused
3868 (linux_stabilize_threads): Use find_thread.
3870 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3872 * linux-low.c (select_singlestep_lwp_callback): Remove.
3873 (count_events_callback): Remove.
3874 (select_event_lwp_callback): Remove.
3875 (select_event_lwp): Use find_thread/for_each_thread.
3877 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3879 * linux-low.c (not_stopped_callback): Return bool, take filter
3881 (linux_wait_for_event_filtered): Use find_thread.
3882 (linux_wait_1): Likewise.
3884 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3886 * linux-low.c (same_lwp): Remove.
3887 (find_lwp_pid): Use find_thread.
3889 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3891 * linux-low.c (delete_lwp_callback): Remove.
3892 (linux_mourn): Use for_each_thread.
3894 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3896 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3897 args parameter, don't check for pid.
3898 (linux_detach): Use for_each_thread.
3900 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3902 * linux-low.c (struct counter): Remove.
3903 (second_thread_of_pid_p): Remove.
3904 (last_thread_of_process_p): Use find_thread.
3906 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3908 * inferiors.c (find_inferior_in_random): Remove.
3909 * inferiors.h (find_inferior_in_random): Remove.
3910 * linux-low.c (status_pending_p_callback): Return bool, accept
3911 parameter ptid directly.
3912 (linux_wait_for_event_filtered): Use find_thread_in_random.
3913 (linux_wait_1): Likewise.
3915 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3917 * inferiors.c (find_inferior_id): Remove.
3918 (find_thread_ptid): Move implemention from find_inferior_id to
3920 * inferiors.h (find_inferior_id): Remove.
3921 * server.c (handle_status): Use find_thread_ptid.
3922 (process_serial_event): Likewise.
3923 * thread-db.c (find_one_thread): Likewise.
3924 (thread_db_thread_handle): Likewise.
3925 * win32-low.c (thread_rec): Likewise.
3926 (child_delete_thread): Likewise.
3927 (win32_thread_alive): Likewise.
3928 (get_child_debug_event): Likewise.
3930 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3932 * linux-mips-low.c (update_watch_registers_callback): Return
3933 void, remove pid_p parameter, don't check for pid.
3934 (mips_insert_point, mips_remove_point): Use for_each_thread.
3936 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3938 * lynx.low (lynx_delete_thread_callback): Remove.
3939 (lynx_mourn): Use for_each_thread.
3941 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3943 * regcache.c (regcache_invalidate_one): Remove.
3944 (regcache_invalidate_pid): use for_each_thread.
3946 2017-11-26 Tom Tromey <tom@tromey.com>
3948 * linux-low.c (linux_create_inferior): Update.
3950 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3952 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3954 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3956 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3957 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3958 * linux-aarch64-tdesc-selftest.c: New file.
3959 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3961 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3963 * configure.srv: Add new file.
3964 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3965 * linux-aarch64-tdesc-selftest.c: New file.
3966 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3968 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3970 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3971 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3972 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3974 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3976 * configure.srv: Add new files.
3977 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3978 aarch64_linux_read_description.
3979 * linux-aarch64-low.c (aarch64_linux_read_description):
3980 Merge with aarch64_arch_setup.
3981 (aarch64_arch_setup): Call aarch64_linux_read_description.
3982 * linux-aarch64-tdesc.c: New file.
3983 * linux-aarch64-tdesc.h: New file.
3985 2017-11-24 Yao Qi <yao.qi@linaro.org>
3987 * configure.srv: Set $srv_regobj for tic6x-linux.
3988 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3989 (tic6x_read_description): Move some code to tic6x_arch_setup.
3990 (tic6x_tdesc_test): New function.
3991 (initialize_low_arch): Call selftests::register_test.
3993 2017-11-22 Yao Qi <yao.qi@linaro.org>
3995 * remote-utils.c (prepare_resume_reply): Use memcpy.
3997 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3999 * linux-low.c (kill_one_lwp_callback): Return void, take
4000 argument directly, don't filter on pid.
4001 (linux_kill): Use for_each_thread.
4003 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4005 * linux-low.c (need_step_over_p): Return bool, remove dummy
4007 (linux_resume, proceed_all_lwps): Use find_thread.
4009 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4011 * linux-low.c (resume_status_pending_p): Return bool, remove
4013 (linux_resume): Use find_thread.
4015 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4017 * linux-low.c (struct thread_resume_array): Remove.
4018 (linux_set_resume_request): Return void, take arguments
4020 (linux_resume): Use for_each_thread.
4022 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4024 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
4025 return bool, remove data argument.
4026 (linux_stabilize_threads): Use find_thread.
4028 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4030 * linux-low.c (unsuspend_one_lwp): Remove.
4031 (unsuspend_all_lwps): Use for_each_thread, inline code from
4034 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4036 * gdbthread.h (find_thread): Add overload with ptid_t filter.
4037 * linux-low.c (struct iterate_over_lwps_args): Remove.
4038 (iterate_over_lwps_filter): Remove.
4039 (iterate_over_lwps): Use find_thread.
4041 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4043 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
4044 (linux_handle_new_gdb_connection): Use for_each_thread, inline
4045 code from reset_lwp_ptrace_options_callback.
4047 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4049 * linux-arm-low.c (struct update_registers_data): Remove.
4050 (update_registers_callback): Return void, take arguments
4051 directly, don't check thread's pid.
4052 (arm_insert_point, arm_remove_point): Use for_each_thread.
4054 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4056 * win32-low.c (continue_one_thread): Return void, take argument
4058 (child_continue): Use for_each_thread.
4060 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4062 * win32-i386-low.c (update_debug_registers_callback): Rename
4064 (update_debug_registers): ... this, return void, remove pid_p arg.
4065 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4067 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4069 * inferiors.h (struct process_info): Add constructor, initialize
4071 <syscalls_to_catch>: Change type to std::vector<int>.
4072 * inferiors.c (add_process): Allocate process_info with new.
4073 (remove_process): Free process_info with delete.
4074 * linux-low.c (handle_extended_wait): Adjust.
4075 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4076 * server.c (handle_general_set): Adjust.
4078 2017-11-16 Pedro Alves <palves@redhat.com>
4080 * remote-utils.c (remote_close): Block SIGIO signals instead of
4081 uninstalling the SIGIO handler.
4083 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4085 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4087 2017-11-16 Yao Qi <yao.qi@linaro.org>
4089 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4090 (tic6x_store_gregset): Likewise.
4091 (tic6x_usrregs_info): Move it up.
4093 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4095 * Makefile.in: Update arch rules.
4096 * configure.srv: Explicitly mark arch/ files.
4098 2017-11-13 Andreas Schwab <schwab@suse.de>
4100 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4102 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4104 2017-11-06 Pedro Alves <palves@redhat.com>
4106 * config.in, configure: Regenerate.
4108 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4110 * target.c (struct thread_search): Remove.
4111 (thread_search_callback): Remove.
4112 (prepare_to_access_memory): Use for_each_thread instead of
4113 find_inferior. Inline code from thread_search_callback.
4115 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4117 * server.c (struct visit_actioned_threads_data): Remove.
4118 (visit_actioned_threads): Change prototype to take arguments
4120 (resume): Use find_thread instead of find_inferior.
4122 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4124 * server.c (queue_stop_reply_callback): Change prototype, return
4126 (find_status_pending_thread_callback): Remove.
4127 (handle_status): Replace find_inferior with find_thread and
4130 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4132 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4134 (aarch64_store_gregset): Likewise.
4135 (aarch64_fill_fpregset): Likewise.
4136 (aarch64_store_fpregset): Likewise.
4138 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4140 * gdbthread.h (find_thread, for_each_thread): New functions.
4141 * inferiors.c (thread_of_pid): Remove.
4142 (find_any_thread_of_pid): Use find_thread.
4143 * linux-low.c (num_lwps): Use for_each_thread.
4145 2017-10-17 Yao Qi <yao.qi@linaro.org>
4147 * Makefile.in: Remove one rule.
4148 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4150 2017-10-17 Yao Qi <yao.qi@linaro.org>
4152 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4153 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
4155 2017-10-17 Yao Qi <yao.qi@linaro.org>
4157 * configure.srv: Rename arm.o with arch/arm.o.
4159 2017-10-17 Yao Qi <yao.qi@linaro.org>
4161 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4162 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
4163 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
4164 (arch-i386.o, arch-amd64.o): Remove rules.
4165 (arch/%.o): New rule.
4166 Update POSTCOMPILE and COMPILE.pre.
4167 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4168 * configure: Re-generated.
4169 * configure.srv: Replace arch-i386.o with arch/i386.o.
4170 Replace arch-amd64.o with arch/amd64.o.
4172 2017-10-16 Yao Qi <yao.qi@linaro.org>
4174 * configure: Regenerated.
4176 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4178 * inferiors.h: (struct inferior_list): Remove.
4179 (struct inferior_list_entry); Remove.
4180 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
4181 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
4182 get_first_inferior): Remove.
4183 (for_each_inferior, for_each_inferior_with_data, find_inferior,
4184 find_inferior_id, find_inferior_in_random): Change signature.
4185 * inferiors.c (all_threads): Change type to
4186 std::list<thread_info *>.
4187 (get_thread): Remove macro.
4188 (find_inferior, find_inferior_id): Change signature, implement
4190 (find_inferior_in_random): Change signature, implement using
4191 find_thread_in_random.
4192 (for_each_inferior, for_each_inferior_with_data): Change
4193 signature, implement using for_each_thread.
4194 (add_inferior_to_list, remove_inferior): Remove.
4195 (add_thread, get_first_thread, thread_of_pid,
4196 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
4197 (get_first_inferior, one_inferior_p, clear_inferior_list):
4199 (clear_inferiors, get_thread_process): Update.
4200 * gdbthread.h: Include <list>.
4201 (struct thread_info) <entry>: Remove field.
4203 (all_threads): Change type to std::list<thread_info *>.
4204 (get_first_inferior): Add doc.
4205 (find_thread, for_each_thread, find_thread_in_random): New
4207 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
4208 * linux-arm-low.c (update_registers_callback): Update.
4209 * linux-low.c (second_thread_of_pid_p): Update.
4210 (kill_one_lwp_callback, linux_detach_lwp_callback,
4211 delete_lwp_callback, status_pending_p_callback, same_lwp,
4212 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
4213 iterate_over_lwps, not_stopped_callback,
4214 resume_stopped_resumed_lwps, count_events_callback,
4215 select_singlestep_lwp_callback, select_event_lwp_callback,
4216 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
4217 suspend_and_send_sigstop_callback, wait_for_sigstop,
4218 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
4219 lwp_running, linux_set_resume_request, resume_status_pending_p,
4220 need_step_over_p, start_step_over, linux_resume_one_thread,
4221 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
4222 reset_lwp_ptrace_options_callback): Update.
4223 * linux-mips-low.c (update_watch_registers_callback): Update.
4224 * regcache.c (regcache_invalidate_one, regcache_invalidate):
4226 (free_register_cache_thread_one): Remove.
4227 (regcache_release): Update.
4228 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
4229 handle_qxfer_threads_worker): Update.
4230 (handle_query): Update, use list iterator.
4231 (visit_actioned_threads, handle_pending_status,
4232 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
4233 clear_pending_status_callback, set_pending_status_callback,
4234 find_status_pending_thread_callback, handle_status,
4235 process_serial_event): Update.
4236 * target.c (thread_search_callback): Update.
4237 * thread-db.c (thread_db_get_tls_address): Update.
4238 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
4240 * win32-i386-low.c (update_debug_registers_callback): Update.
4241 * win32-low.c (delete_thread_info, child_delete_thread,
4242 continue_one_thread, suspend_one_thread,
4243 get_child_debug_event): Adjust.
4245 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4247 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4248 * inferiors.h: Include <list>.
4249 (struct process_info) <entry>: Remove field.
4251 (pid_of): Change macro to function.
4252 (ptid_of, lwpid_of): Remove macro.
4253 (all_processes): Change type to std::list<process_info *>.
4254 (ALL_PROCESSES): Remove macro.
4255 (for_each_process, find_process): New function.
4256 * inferiors.c (all_processes): Change type to
4257 std::list<process_info *>.
4258 (find_thread_process): Adjust.
4259 (add_process): Likewise.
4260 (remove_process): Likewise.
4261 (find_process_pid): Likewise.
4262 (get_first_process): Likewise.
4263 (started_inferior_callback): Remove.
4264 (have_started_inferiors_p): Adjust.
4265 (attached_inferior_callback): Remove.
4266 (have_attached_inferiors_p): Adjust.
4267 * linux-low.c (check_zombie_leaders): Likewise.
4268 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
4269 (x86_linux_update_xmltarget): Adjust.
4270 * server.c (handle_query): Likewise.
4271 (gdb_reattached_process): Remove.
4272 (handle_status): Adjust.
4273 (kill_inferior_callback): Likewise.
4274 (detach_or_kill_inferior): Remove.
4275 (print_started_pid): Likewise.
4276 (print_attached_pid): Likewise.
4277 (detach_or_kill_for_exit): Update.
4278 (process_serial_event): Likewise.
4279 * linux-arm-low.c (arm_new_fork): Likewise.
4281 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4283 * dll.h: Include <list>.
4284 (struct dll_info): Add constructor.
4285 <entry>: Remove field.
4286 (all_dlls): Change type to std::list<dll_info>.
4287 * dll.c: Include <algorithm>.
4288 (get_dll): Remove macro.
4289 (all_dlls): Change type to std::list<dll_info *>.
4290 (free_one_dll): Remove.
4291 (match_dll): Likewise.
4292 (loaded_dll): Adjust.
4293 (unloaded_dll): Adjust to all_dlls type change, use
4294 std::find_if. Inline code from match_dll.
4295 (clear_dlls): Adjust to all_dlls type change.
4296 * server.c (emit_dll_description): Remove.
4297 (handle_qxfer_libraries): Adjust to all_dlls type change,
4298 integrate emit_dll_description's functionality.
4300 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4302 * linux-low.h (struct linux_target_ops) <delete_process>: New
4304 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
4305 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
4306 (struct linux_target_ops): Add delete_process callback.
4307 * linux-arm-low.c (arm_delete_process): New.
4308 (struct linux_target_ops): Add delete_process callback.
4309 * linux-bfin-low.c (struct linux_target_ops): Likewise.
4310 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
4311 * linux-m32r-low.c (struct linux_target_ops): Likewise.
4312 * linux-mips-low.c (mips_linux_delete_process): New.
4313 (struct linux_target_ops): Add delete_process callback.
4314 * linux-ppc-low.c (struct linux_target_ops): Likewise.
4315 * linux-s390-low.c (struct linux_target_ops): Likewise.
4316 * linux-sh-low.c (struct linux_target_ops): Likewise.
4317 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
4318 * linux-tile-low.c (struct linux_target_ops): Likewise.
4319 * linux-x86-low.c (x86_linux_delete_process): New.
4320 (struct linux_target_ops): Add delete_process callback.
4321 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
4323 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4325 * linux-aarch64-low.c (the_low_target): Add thread delete
4327 * linux-arm-low.c (arm_delete_thread): New function.
4328 (the_low_target): Add thread delete callback.
4329 * linux-bfin-low.c (the_low_target): Likewise.
4330 * linux-crisv32-low.c (the_low_target): Likewise.
4331 * linux-low.c (delete_lwp): Invoke delete_thread callback if
4333 * linux-low.h (struct linux_target_ops) <delete_thread>: New
4335 * linux-m32r-low.c (the_low_target): Add thread delete callback.
4336 * linux-mips-low.c (mips_linux_delete_thread): New function.
4337 (the_low_target): Add thread delete callback.
4338 * linux-ppc-low.c (the_low_target): Likewise.
4339 * linux-s390-low.c (the_low_target): Likewise.
4340 * linux-sh-low.c (the_low_target): Likewise.
4341 * linux-tic6x-low.c (the_low_target): Likewise.
4342 * linux-tile-low.c (the_low_target): Likewise.
4343 * linux-x86-low.c (the_low_target): Likewise.
4344 * linux-xtensa-low.c (the_low_target): Likewise.
4346 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
4348 * win32-low.c: Include "common-inferior.h".
4350 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4352 * inferiors.c (set_inferior_cwd): New function.
4353 * server.c (handle_general_set): Handle QSetWorkingDir packet.
4354 (handle_query): Inform that QSetWorkingDir is supported.
4355 * win32-low.c (create_process): Pass the inferior's cwd to
4358 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4360 * inferiors.c (current_inferior_cwd): New global variable.
4361 (get_inferior_cwd): New function.
4362 * inferiors.h (struct process_info) <cwd>: New field.
4364 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4366 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4367 (OBS): Add gdb_tilde_expand.o.
4369 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4371 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4372 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4374 2017-09-29 Pedro Alves <palves@redhat.com>
4376 * ax.c (gdb_parse_agent_expr): Constify.
4377 * ax.h (gdb_parse_agent_expr): Constify.
4378 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4380 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4381 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4382 * remote-utils.h (read_ptid): Constify.
4383 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4384 (process_point_options, process_serial_event): Constify.
4385 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4386 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4387 (cmd_qtbuffer): Constify.
4389 2017-09-29 Pedro Alves <palves@redhat.com>
4391 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4394 2017-09-29 Pedro Alves <palves@redhat.com>
4396 * linux-low.c (handle_extended_wait): Pass parent thread instead
4397 of process to thread_db_notice_clone.
4398 * linux-low.h (thread_db_notice_clone): Replace parent process
4399 parameter with parent thread parameter.
4400 * thread-db.c (find_one_thread): Add comment.
4401 (thread_db_notice_clone): Replace parent process parameter with
4402 parent thread parameter. Temporarily switch to the parent thread.
4404 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4406 * gdbthread.h: Include "common-gdbthread.h".
4407 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4408 "if" when validating the ptid.
4409 * remote-utils.c: Include "gdbthread.h".
4410 (prepare_resume_reply): Use "switch_to_thread".
4411 * target.c (done_accessing_memory): Likewise.
4413 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4415 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4416 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4417 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4418 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4419 s390x-gs-linux64-ipa.o to ipa_obj.
4420 * linux-s390-low.c (HWCAP_S390_GS): New define.
4421 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4423 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4424 (s390_arch_setup): Check for guarded-storage support and choose
4426 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4427 init_registers_s390x_gs_linux64.
4428 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4430 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4431 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4433 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4435 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4437 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4439 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4440 (thread_db_thread_handle): Declare.
4441 * linux-low.c (linux_target_ops): Initialize thread_handle.
4442 * server.c (handle_qxfer_threads_worker): Add support for
4444 * target.h (struct target_ops): Add new function pointer,
4446 (target_thread_handle): Define.
4447 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4449 (thread_db_thread_handle): New function.
4451 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4453 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4454 * linux-low.h (thread_db_notice_clone): Declare.
4455 * thread-db.c (thread_db_notice_clone): New function.
4457 2017-09-21 Pedro Alves <palves@redhat.com>
4459 * server.c (gdb_read_memory, handle_status, process_serial_event)
4460 (handle_serial_event, handle_target_event): Adjust to
4461 set_desired_thread prototype change.
4462 * target.c (set_desired_thread): Remove 'use_general' parameter
4464 * target.h (set_desired_thread): Remove 'use_general' parameter.
4466 2017-09-20 Tom Tromey <tom@tromey.com>
4468 * target.c (target_terminal::terminal_state): Define.
4469 (target_terminal::init): Rename from target_terminal_init.
4470 (target_terminal::inferior): Rename from
4471 target_terminal_inferior.
4472 (target_terminal::ours): Rename from target_terminal_ours.
4473 (target_terminal::ours_for_output, target_terminal::info): New.
4475 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4477 * server.c (accumulate_file_name_length): Remove.
4478 (emit_dll_description): Adjust to std::string change.
4479 (handle_qxfer_libraries): Use std::string to hold document.
4481 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4483 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4484 return type of xml_escape_text.
4485 * server.c (emit_dll_description): Likewise.
4487 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4489 * server.c (captured_main): Accept argument for --selftest.
4490 Update run_tests call.
4491 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4492 when registering selftests.
4494 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4496 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4497 instead of "VEC" for "target_desc.reg_defs".
4498 (regcache_cpy): Likewise.
4499 (registers_to_string): Likewise.
4500 (registers_from_string): Likewise.
4501 (find_regno): Likewise.
4502 (supply_regblock): Likewise.
4503 (regcache_raw_read_unsigned): Likewise.
4504 * tdesc.c (init_target_desc): Likewise.
4505 (tdesc_create_reg): Likewise.
4506 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4507 (struct target_desc) <reg_defs>: Convert to "std::vector".
4508 (target_desc): Do not initialize "reg_defs".
4509 (~target_desc): Update code to use "std::vector" instead of "VEC"
4510 for "target_desc.reg_defs".
4511 (operator==): Likewise.
4513 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4515 * inferiors.h (thread_to_gdb_id): Remove.
4516 * inferiors.c (thread_to_gdb_id): Remove.
4517 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4518 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4519 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4521 * nto-low.c (nto_fetch_registers, nto_store_registers,
4522 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4524 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4526 * inferiors.h (gdb_id_to_thread_id): Remove.
4527 * inferiors.c (gdb_id_to_thread_id): Remove.
4528 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4529 removal. Move pid declaration closer to where it's used.
4531 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4533 * server.c (handle_detach): New function.
4534 (process_serial_event): Move code out, call handle_detach.
4536 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4538 * server.c (require_running): Rename to ...
4539 (require_running_or_return): ... this ...
4540 (require_running_or_break): ... and this.
4541 (handle_query, process_serial_event): Adjust.
4543 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4545 * linux-low.c (linux_set_resume_request): Remove unused
4548 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4550 * server.c (first_thread_of): Remove.
4551 (process_serial_event): Replace usage of first_thread_of with
4552 find_any_thread_of_pid.
4553 * tracepoint.c (same_process_p): Remove.
4554 (gdb_agent_about_to_close): Replace usage of same_process_p with
4555 find_any_thread_of_pid.
4556 * linux-x86-low.c (same_process_callback): Remove.
4557 (x86_arch_setup_process_callback): Replace usage of
4558 same_process_callback with find_any_thread_of_pid.
4559 * thread-db.c (any_thread_of): Remove.
4560 (switch_to_process): Replace usage of any_thread_of with
4561 find_any_thread_of_pid.
4562 * inferiors.c (thread_pid_matches_callback): Remove.
4563 (find_thread_process): Adjust to use find_any_thread_of_pid.
4565 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4567 * regcache.c (get_thread_regcache): Guard calls to "memset"
4570 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4572 * linux-low.c (handle_extended_wait): Use
4573 "allocate_target_description" instead of "XNEW".
4574 * linux-x86-low.c (initialize_low_arch): Likewise.
4576 2017-09-05 Yao Qi <yao.qi@linaro.org>
4578 * configure.srv (srv_i386_regobj): Remove.
4579 (srv_amd64_regobj): Remove.
4580 (srv_regobj): Set it to "" for x86 non-linux targets.
4581 * linux-x86-tdesc.c (i386_linux_read_description):
4582 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4583 (init_registers_i386): Remove the declaration.
4584 (tdesc_i386): Remove the declaration.
4585 (lynx_i386_arch_setup): Call i386_create_target_description.
4586 * nto-x86-low.c: Likewise.
4587 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4588 [!__x86_64__]: include arch/i386.h.
4589 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4591 2017-09-05 Yao Qi <yao.qi@linaro.org>
4593 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4594 i386/amd64-XXX-linux from it.
4596 2017-09-05 Yao Qi <yao.qi@linaro.org>
4598 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4600 (ipa_amd64_linux_regobj): Remove.
4601 (ipa_x32_linux_regobj): Remove.
4603 2017-09-05 Yao Qi <yao.qi@linaro.org>
4605 * Makefile.in (arch-amd64.o): New rule.
4606 * configure.srv: Append arch-amd64.o.
4607 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4608 (get_ipa_tdesc): Call amd64_linux_read_description.
4609 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4610 and init_registers_amd64_XXX.
4611 * linux-x86-low.c (x86_linux_read_description): Call
4612 amd64_linux_read_description.
4613 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4614 (initialize_low_arch): Don't call init_registers_x32_XXX and
4615 init_registers_amd64_XXX.
4616 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4617 and tdesc_amd64_XXX.
4618 [__x86_64__] (amd64_tdesc_test): New function.
4619 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4620 and init_registers_amd64_XXX.
4621 * linux-x86-tdesc.c: Include arch/amd64.h.
4622 (xcr0_to_tdesc_idx): New function.
4623 (i386_linux_read_description): New function.
4624 (amd64_get_ipa_tdesc_idx): New function.
4625 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4626 (amd64_get_ipa_tdesc): Declare.
4628 2017-09-05 Yao Qi <yao.qi@linaro.org>
4630 * configure.srv (srv_i386_linux_xmlfiles): Remove
4631 i386/i386-XXX-linux.xml from it.
4633 2017-09-05 Yao Qi <yao.qi@linaro.org>
4635 * configure.srv: Set srv_i386_linux_regobj empty if $development
4637 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4638 initialize_low_tdesc.
4639 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4640 with #if initialize_low_tdesc.
4641 * linux-x86-tdesc-selftest.c: New file.
4642 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4644 2017-09-05 Yao Qi <yao.qi@linaro.org>
4646 * Makefile.in (arch-i386.o): New rule.
4647 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4648 (x86_64-*-linux*): Likewise.
4649 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4650 include arch/i386.h.
4651 (i386_linux_read_description): Remove code and call
4652 i386_create_target_description.
4653 * tdesc.c (allocate_target_description): New function.
4654 * tdesc.h (set_tdesc_architecture): Remove declaration.
4655 (set_tdesc_osabi): Likewise.
4657 2017-09-05 Yao Qi <yao.qi@linaro.org>
4659 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4660 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4661 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4663 * server.c (get_features_xml): Call tdesc_get_features_xml.
4664 * tdesc.c (set_tdesc_architecture): New function.
4665 (set_tdesc_osabi): New function.
4666 (tdesc_get_features_xml): New function.
4667 (tdesc_create_feature): Add an argument.
4668 * tdesc.h (struct target_desc) <features>: New field.
4669 <arch, osabi>: New field.
4670 (~target_desc): xfree features, arch, and osabi.
4671 (target_desc::oerator==): Don't compare .xmltarget.
4672 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4673 (set_tdesc_osabi): Likewise.
4674 (tdesc_get_features_xml): Likewise.
4676 2017-09-05 Yao Qi <yao.qi@linaro.org>
4678 * linux-x86-tdesc.c: Include selftest.h.
4679 (i386_tdesc_test): New function.
4680 (initialize_low_tdesc): Call selftests::register_test.
4681 * tdesc.h: Include regdef.h.
4682 (target_desc): Override operator == and !=.
4684 2017-09-05 Yao Qi <yao.qi@linaro.org>
4686 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4687 (ipa_obj): Likewise.
4688 * linux-i386-ipa.c: Include common/x86-xstate.h
4689 (get_ipa_tdesc): Call i386_linux_read_description.
4690 (initialize_low_tracepoint): Don't call init_registers_XXX
4691 functions, call initialize_low_tdesc instead.
4692 * linux-x86-low.c (x86_linux_read_description): Call
4693 i386_linux_read_description.
4694 (initialize_low_arch): Don't call init_registers_i386_XXX
4695 functions, call initialize_low_tdesc.
4696 * linux-x86-tdesc.c: New file.
4697 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4698 (i386_get_ipa_tdesc_idx): Declare.
4699 (i386_get_ipa_tdesc): Declare.
4700 (initialize_low_tdesc): Declare.
4702 2017-09-05 Yao Qi <yao.qi@linaro.org>
4704 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4707 2017-09-05 Yao Qi <yao.qi@linaro.org>
4709 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4710 * regcache.c (get_thread_regcache): Use VEC_length.
4711 (init_register_cache): Likewise.
4712 (regcache_cpy): Likewise.
4713 (registers_to_string): Iterate reg_defs via VEC_iterate.
4714 (find_regno): Likewise.
4715 (find_register_by_number): Use VEC_index.
4716 (register_size): Call find_register_by_number.
4717 (register_data): Call find_register_by_number.
4718 (supply_regblock): Use VEC_length.
4719 (regcache_raw_read_unsigned): Likewise.
4720 * tdesc.c (init_target_desc): Iterate reg_defs via
4722 (default_description): Update initializer.
4723 (copy_target_description): Don't update field num_registers.
4724 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4725 <num_registers>: Remove.
4727 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4729 * Makefile.in (.SECONDARY): Define target.
4731 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4733 * linux-low.c (linux_wait_1): Adjust.
4734 * server.c (queue_stop_reply_callback): Adjust.
4736 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4738 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4739 QEnvironmentUnset and QEnvironmentReset packets.
4740 (handle_query): Inform remote that QEnvironmentHexEncoded,
4741 QEnvironmentUnset and QEnvironmentReset are supported.
4743 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4745 * inferiors.h (inferior_target_data): Rename to ...
4746 (thread_target_data): ... this.
4747 (inferior_regcache_data): Rename to ...
4748 (thread_regcache_data): ... this.
4749 (set_inferior_regcache_data): Rename to ...
4750 (set_thread_regcache_data): ... this.
4751 * inferiors.c (inferior_target_data): Rename to ...
4752 (thread_target_data): ... this.
4753 (inferior_regcache_data): Rename to ...
4754 (thread_regcache_data): ... this.
4755 (set_inferior_regcache_data): Rename to ...
4756 (set_thread_regcache_data): ... this.
4757 (free_one_thread): Update.
4758 * linux-low.h (get_thread_lwp): Update.
4759 * regcache.c (get_thread_regcache): Update.
4760 (regcache_invalidate_thread): Update.
4761 (free_register_cache_thread): Update.
4762 * win32-i386-low.c (update_debug_registers_callback): Update.
4763 (win32_get_current_dr): Update.
4764 * win32-low.c (thread_rec): Update.
4765 (delete_thread_info): Update.
4766 (continue_one_thread): Update.
4767 (suspend_one_thread): Update.
4769 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4771 * inferiors.c (set_inferior_target_data): Remove.
4772 * inferiors.h (set_inferior_target_data): Remove.
4774 2017-08-18 Yao Qi <yao.qi@linaro.org>
4776 * Makefile.in (OBS): Add selftest.o.
4777 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4778 * configure, config.in: Re-generated.
4779 * server.c: Include common/sefltest.h.
4780 (captured_main): Handle option --selftest.
4782 2017-08-09 Yao Qi <yao.qi@linaro.org>
4784 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4785 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4786 i386-avx-mpx.o and i386-mmx.o.
4787 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4788 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4789 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4790 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4791 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4792 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4793 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4794 i386/amd64-avx-mpx.xml.
4796 2017-08-09 Yao Qi <yao.qi@linaro.org>
4798 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4799 and x32-avx-avx512.o.
4800 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4801 i386/x32-avx-avx512.xml.
4803 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4805 * tracepoint.h (enum class fast_tpoint_collect_result): New
4807 (fast_tracepoint_collecting): Change return type to
4808 fast_tpoint_collect_result.
4809 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4810 * linux-low.h: Include tracepoint.h.
4811 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4812 fast_tpoint_collect_result.
4813 * linux-low.c (handle_tracepoints): Adjust.
4814 (linux_fast_tracepoint_collecting): Change return type to
4815 fast_tpoint_collect_result.
4816 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4817 linux_wait_1, stuck_in_jump_pad_callback,
4818 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4819 proceed_one_lwp): Adjust to type change.
4821 2017-07-10 Yao Qi <yao.qi@linaro.org>
4823 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4825 2017-06-29 Yao Qi <yao.qi@linaro.org>
4827 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4829 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4831 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4833 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4835 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4837 * linux-low.c (linux_create_inferior): Adjust code to access the
4838 environment information via 'gdb_environ' class.
4839 * lynx-low.c (lynx_create_inferior): Likewise.
4840 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4841 (get_environ): Return a pointer to 'our_environ'.
4842 (captured_main): Initialize 'our_environ'.
4843 * server.h (get_environ): Adjust prototype.
4844 * spu-low.c (spu_create_inferior): Adjust code to access the
4845 environment information via 'gdb_environ' class.
4847 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4849 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4850 usage of "register" keyword.
4852 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4854 * configure: Re-generate.
4856 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4858 * configure: Re-generate.
4860 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4862 * Makefile.in (COMPILE.pre): Add "-x c++".
4864 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4866 * fork-child.c: Conditionally include <signal.h>.
4868 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4870 * server.c (handle_general_set): Handle new packet
4871 "QStartupWithShell".
4872 (handle_query): Add "QStartupWithShell" to the list of supported
4874 (gdbserver_usage): Add help text explaining the
4875 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4877 (captured_main): Recognize and act upon the presence of the new
4880 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4881 Pedro Alves <palves@redhat.com>
4883 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4884 * configure: Regenerate.
4885 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4887 (i[34567]86-*-lynxos*): Likewise.
4888 (spu*-*-*): Likewise.
4889 * fork-child.c: New file.
4890 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4892 (linux_ptrace_fun): New function.
4893 (linux_create_inferior): Adjust function prototype to reflect
4894 change on "target.h". Adjust function code to use
4896 (linux_request_interrupt): Delete "signal_pid".
4897 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4898 (lynx_ptrace_fun): New function.
4899 (lynx_create_inferior): Adjust function prototype to reflect
4900 change on "target.h". Adjust function code to use
4902 * nto-low.c (nto_create_inferior): Adjust function prototype and
4903 code to reflect change on "target.h". Update comments.
4904 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4905 "common-terminal.h" and "environ.h".
4906 (terminal_fd): Moved to fork-child.c.
4907 (old_foreground_pgrp): Likewise.
4908 (restore_old_foreground_pgrp): Likewise.
4909 (last_status): Make it global.
4910 (last_ptid): Likewise.
4911 (our_environ): New variable.
4912 (startup_with_shell): Likewise.
4913 (program_name): Likewise.
4914 (program_argv): Rename to...
4915 (program_args): ...this.
4916 (wrapper_argv): New variable.
4917 (start_inferior): Delete function.
4918 (get_exec_wrapper): New function.
4919 (get_exec_file): Likewise.
4920 (get_environ): Likewise.
4921 (prefork_hook): Likewise.
4922 (post_fork_inferior): Likewise.
4923 (postfork_hook): Likewise.
4924 (postfork_child_hook): Likewise.
4925 (handle_v_run): Update code to deal with arguments coming from the
4926 remote host. Update calls from "start_inferior" to
4928 (captured_main): Likewise. Initialize environment variable. Call
4930 * server.h (post_fork_inferior): New prototype.
4931 (get_environ): Likewise.
4932 (last_status): Declare.
4933 (last_ptid): Likewise.
4934 (signal_pid): Likewise.
4935 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4936 (spu_ptrace_fun): New function.
4937 (spu_create_inferior): Adjust function prototype to reflect change
4938 on "target.h". Adjust function code to use "fork_inferior".
4939 * target.c (target_terminal_init): New function.
4940 (target_terminal_inferior): Likewise.
4941 (target_terminal_ours): Likewise.
4942 * target.h: Include <vector>.
4943 (struct target_ops) <create_inferior>: Update prototype.
4944 (create_inferior): Update macro.
4945 * utils.c (gdb_flush_out_err): New function.
4946 * win32-low.c (win32_create_inferior): Adjust function prototype
4947 and code to reflect change on "target.h".
4949 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4951 * inferiors.c (switch_to_thread): New function.
4953 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4955 * Makefile.in (SFILE): Add "common/job-control.c".
4956 (OBS): Add "job-control.o".
4958 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4960 * Makefile: Remove "@host_makefile_frag@".
4962 2017-05-05 Pedro Alves <palves@redhat.com>
4964 * configure: Regenerate.
4966 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4968 * configure: Regenerate.
4970 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4972 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4973 software_single_step change of return type to
4974 std::vector<CORE_ADDR>.
4975 * linux-low.c (install_software_single_step_breakpoints):
4977 * linux-low.h (install_software_single_step_breakpoints):
4980 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4982 * remote-utils.c: Include "gdb_termios.h" instead of
4984 * terminal.h: Delete file.
4986 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4988 * server.c: Include <vector>.
4989 <program_argv, wrapper_argv>: Convert to std::vector.
4990 (start_inferior): Rewrite function to use C++.
4991 (handle_v_run): Likewise. Update code that calculates the argv
4992 based on the vRun packet; use C++.
4993 (captured_main): Likewise.
4995 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4997 * server.c (handle_v_cont): Initialize thread_resume::thread
5000 2017-04-05 Pedro Alves <palves@redhat.com>
5002 * configure: Regenerate.
5004 2017-04-05 Pedro Alves <palves@redhat.com>
5006 * gdbreplay.c (sync_error): Constify.
5007 * linux-x86-low.c (push_opcode): Constify.
5009 2017-04-05 Pedro Alves <palves@redhat.com>
5011 * win32-low.c (get_child_debug_event)
5012 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
5013 Report TARGET_WAITKIND_SPURIOUS instead.
5015 2017-04-05 Pedro Alves <palves@redhat.com>
5017 * remote-utils.c (remote_prepare, remote_open): Constify.
5018 * remote-utils.h (remote_prepare, remote_open): Constify.
5019 * server.c (captured_main): Constify 'port' handling.
5021 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
5023 * Makefile.in (clean): Clear .deps.
5025 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
5027 * .gitignore: Remove generated files, replace with wildcard.
5028 * (clean): Replace removal of generated files with wildcard.
5029 (version.c): Replace with...
5030 (version-generated.c): ...this.
5031 (xml-builtin.c): Replace with...
5032 (xml-builtin-generated.c): ...this.
5033 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
5034 (%.c: *regformats*): Replace with...
5035 (%-generated.c: *regformats*): ...this.
5037 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5039 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
5040 (xtensa_fill_gregset): Call collect_register_by_name for
5042 (xtensa_store_gregset): Call supply_register_by_name for
5045 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5047 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
5048 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
5049 (xtensa_store_gregset): Call supply_register for all registers in
5050 a0_regnum..a0_regnum + C0_NREGS range.
5052 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5054 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
5055 (ax-ipa.o: ax.c): Remove.
5056 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
5057 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
5058 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
5059 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
5060 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5062 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5064 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5065 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5066 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5067 (errors-ipa.o: ../common/errors.c): Remove.
5068 (format-ipa.o: ../common/format.c): Remove.
5069 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5071 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5073 * Makefile.in (%-ipa.o: %.c): New rule.
5074 (tracepoint-ipa.o: tracepoint.c): Remove.
5075 (utils-ipa.o: utils.c): Remove.
5076 (remote-utils-ipa.o: remote-utils.c): Remove.
5077 (regcache-ipa.o: regcache.c): Remove.
5078 (i386-linux-ipa.o: i386-linux.c): Remove.
5079 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5080 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5081 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5082 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5083 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5084 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5085 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5086 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5087 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5088 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5089 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5090 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5091 (aarch64-ipa.o: aarch64.c): Remove.
5092 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5093 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5094 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5095 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5096 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5097 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5098 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5099 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5100 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5101 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5102 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5103 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5104 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5105 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5106 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5107 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5108 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5109 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5110 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5111 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5112 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5113 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5114 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5115 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5116 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5117 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5118 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5119 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5120 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5121 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5122 (tdesc-ipa.o: tdesc.c): Remove.
5123 (x32-linux-ipa.o: x32-linux.c): Remove.
5124 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5125 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5127 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5129 * Makefile.in (%.o: ../arch/%.c): New rule.
5130 (arm.o: ../arch/arm.c): Remove.
5131 (arm-linux.o: ../arch/arm-linux.c): Remove.
5132 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5133 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5135 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5137 * Makefile.in (%.o: ../nat/%.c): New rule.
5138 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5139 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5140 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5141 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5142 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5143 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5144 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5145 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5146 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5147 (linux-personality.o: ../nat/linux-personality.c): Remove.
5148 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5149 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5150 (x86-linux.o: ../nat/x86-linux.c): Remove.
5151 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
5152 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
5154 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5156 * Makefile.in (%.o: ../common/%.c): New rule.
5157 (signals.o: ../common/signals.c): Remove.
5158 (print-utils.o: ../common/print-utils.c): Remove.
5159 (rsp-low.o: ../common/rsp-low.c): Remove.
5160 (common-utils.o: ../common/common-utils.c): Remove.
5161 (posix-strerror.o: ../common/posix-strerror.c): Remove.
5162 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
5163 (vec.o: ../common/vec.c): Remove.
5164 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
5165 (xml-utils.o: ../common/xml-utils.c): Remove.
5166 (ptid.o: ../common/ptid.c): Remove.
5167 (buffer.o: ../common/buffer.c): Remove.
5168 (format.o: ../common/format.c): Remove.
5169 (filestuff.o: ../common/filestuff.c): Remove.
5170 (agent.o: ../common/agent.c): Remove.
5171 (errors.o: ../common/errors.c): Remove.
5172 (environ.o: ../common/environ.c): Remove.
5173 (common-debug.o: ../common/common-debug.c): Remove.
5174 (cleanups.o: ../common/cleanups.c): Remove.
5175 (common-exceptions.o: ../common/common-exceptions.c): Remove.
5176 (fileio.o: ../common/fileio.c): Remove.
5177 (common-regcache.o: ../common/common-regcache.c): Remove.
5178 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
5179 (new-op.o: ../common/new-op.c): Remove.
5180 (btrace-common.o: ../common/btrace-common.c): Remove.
5182 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5184 * Makefile.in (%.o: ../target/%.c): New rule.
5185 (waitstatus.o: ../target/waitstatus.c): Remove.
5187 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5190 (%.c: ../regformats/%.dat,
5191 (%.c: ../regformats/arm/%.dat,
5192 (%.c: ../regformats/i386/%.dat,
5193 (%.c: ../regformats/rs6000/%.dat): New rules.
5194 (aarch64.c): Remove.
5195 (reg-arm.c): Remove.
5196 (arm-with-iwmmxt.c): Remove.
5197 (arm-with-vfpv2.c): Remove.
5198 (arm-with-vfpv3.c): Remove.
5199 (arm-with-neon.c): Remove.
5200 (reg-bfin.c): Remove.
5201 (reg-cris.c): Remove.
5202 (reg-crisv32.c): Remove.
5204 (i386-linux.c): Remove.
5205 (i386-avx.c): Remove.
5206 (i386-avx-linux.c): Remove.
5207 (i386-avx-avx512.c): Remove.
5208 (i386-avx-avx512-linux.c): Remove.
5209 (i386-mpx.c): Remove.
5210 (i386-mpx-linux.c): Remove.
5211 (i386-avx-mpx-avx512-pku.c): Remove.
5212 (i386-avx-mpx-avx512-pku-linux.c): Remove.
5213 (i386-avx-mpx.c): Remove.
5214 (i386-avx-mpx-linux.c): Remove.
5215 (i386-mmx.c): Remove.
5216 (i386-mmx-linux.c): Remove.
5217 (reg-ia64.c): Remove.
5218 (reg-m32r.c): Remove.
5219 (reg-m68k.c): Remove.
5221 (mips-linux.c): Remove.
5222 (mips-dsp-linux.c): Remove.
5223 (mips64-linux.c): Remove.
5224 (mips64-dsp-linux.c): Remove.
5225 (nios2-linux.c): Remove.
5226 (powerpc-32.c): Remove.
5227 (powerpc-32l.c): Remove.
5228 (powerpc-altivec32l.c): Remove.
5229 (powerpc-cell32l.c): Remove.
5230 (powerpc-vsx32l.c): Remove.
5231 (powerpc-isa205-32l.c): Remove.
5232 (powerpc-isa205-altivec32l.c): Remove.
5233 (powerpc-isa205-vsx32l.c): Remove.
5234 (powerpc-e500l.c): Remove.
5235 (powerpc-64l.c): Remove.
5236 (powerpc-altivec64l.c): Remove.
5237 (powerpc-cell64l.c): Remove.
5238 (powerpc-vsx64l.c): Remove.
5239 (powerpc-isa205-64l.c): Remove.
5240 (powerpc-isa205-altivec64l.c): Remove.
5241 (powerpc-isa205-vsx64l.c): Remove.
5242 (s390-linux32.c): Remove.
5243 (s390-linux32v1.c): Remove.
5244 (s390-linux32v2.c): Remove.
5245 (s390-linux64.c): Remove.
5246 (s390-linux64v1.c): Remove.
5247 (s390-linux64v2.c): Remove.
5248 (s390-te-linux64.c): Remove.
5249 (s390-vx-linux64.c): Remove.
5250 (s390-tevx-linux64.c): Remove.
5251 (s390x-linux64.c): Remove.
5252 (s390x-linux64v1.c): Remove.
5253 (s390x-linux64v2.c): Remove.
5254 (s390x-te-linux64.c): Remove.
5255 (s390x-vx-linux64.c): Remove.
5256 (s390x-tevx-linux64.c): Remove.
5257 (tic6x-c64xp-linux.c): Remove.
5258 (tic6x-c64x-linux.c): Remove.
5259 (tic6x-c62x-linux.c): Remove.
5261 (reg-sparc64.c): Remove.
5262 (reg-spu.c): Remove.
5264 (amd64-linux.c): Remove.
5265 (amd64-avx.c): Remove.
5266 (amd64-avx-linux.c): Remove.
5267 (amd64-avx-avx512.c): Remove.
5268 (amd64-avx-avx512-linux.c): Remove.
5269 (amd64-mpx.c): Remove.
5270 (amd64-mpx-linux.c): Remove.
5271 (amd64-avx-mpx-avx512-pku.c): Remove.
5272 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
5273 (amd64-avx-mpx.c): Remove.
5274 (amd64-avx-mpx-linux.c): Remove.
5276 (x32-linux.c): Remove.
5277 (x32-avx.c): Remove.
5278 (x32-avx-linux.c): Remove.
5279 (x32-avx-avx512.c): Remove.
5280 (x32-avx-avx512-linux.c): Remove.
5281 (reg-xtensa.c): Remove.
5282 (reg-tilegx.c): Remove.
5283 (reg-tilegx32.c): Remove.
5285 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5287 * Makefile.in (SFILES): Add "common/environ.c".
5288 (OBJS): Add "common/environ.h".
5290 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5292 * configure.ac: Check if the fs_base and gs_base members of
5293 `struct user_regs_struct' exist.
5294 * config.in: Regenerated.
5295 * configure: Likewise.
5297 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
5299 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
5301 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
5302 (get_next_pcs_syscall_next_pc): Likewise.
5304 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
5306 * win32-i386-low.c: Fix incorrect reference to a couple source files.
5307 * nto-x86-low.c: Likewise.
5309 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
5311 * Makefile.in: Include disable-implicit-rules.mk.
5313 2016-11-23 Pedro Alves <palves@redhat.com>
5315 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
5316 (debug_vprintf): Use std::chrono::steady_clock instead of
5317 gettimeofday. Use '.' instead of ':'.
5318 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
5319 (get_timestamp): Use std::chrono::steady_clock instead of
5322 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5324 * Makefile.in: Fix whitespace formatting.
5326 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5328 * Makefile.in (SFILES, OBS): Flatten list and order
5331 2016-11-23 Pedro Alves <palves@redhat.com>
5333 * event-loop.c (handle_file_event): Use warning.
5334 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
5335 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5338 2016-11-23 Pedro Alves <palves@redhat.com>
5340 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
5342 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
5343 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
5344 debug_printf and debug_flush for debug output.
5345 * server.c (handle_general_set): Likewise.
5346 * thread-db.c (try_thread_db_load): Use debug_printf for debug
5349 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5351 * Makefile.in (.c.o): Replace rule with ...
5352 (%.o: %.c): ... this one.
5354 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5356 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
5357 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5359 * configure.ac: Remove checks for the make program.
5360 * configure: Re-generate.
5362 2016-10-28 Pedro Alves <palves@redhat.com>
5364 * Makefile.in (CXX_DIALECT): Get from configure.
5365 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5366 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5367 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5368 * config.in: Regenerate.
5369 * configure: Regenerate.
5371 2016-10-27 Yao Qi <yao.qi@linaro.org>
5373 * linux-low.c (linux_supports_range_stepping): Return true if
5374 can_software_single_step return true.
5376 2016-10-27 Yao Qi <yao.qi@linaro.org>
5378 * inferiors.c (find_inferior_in_random): New function.
5379 * inferiors.h (find_inferior_in_random): Declare.
5380 * linux-low.c (linux_wait_for_event_filtered): Call
5381 find_inferior_in_random instead of find_inferior.
5383 2016-10-27 Yao Qi <yao.qi@linaro.org>
5385 * linux-low.c (linux_wait_1): If single-step breakpoints are
5386 inserted, remove them.
5388 2016-10-26 Pedro Alves <palves@redhat.com>
5390 * linux-low.c (handle_extended_wait): Link parent/child fork
5392 (linux_wait_1): Unlink them.
5393 (linux_set_resume_request): Ignore resume requests for
5394 already-resumed and unhandled fork child threads.
5395 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5396 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5398 (handle_v_requests) <vCont>: Don't call require_running.
5399 * server.h (in_queued_stop_replies): New declaration.
5401 2016-10-24 Yao Qi <yao.qi@linaro.org>
5404 * linux-aarch64-low.c (append_insns): Cast the return value to
5407 2016-10-10 Yao Qi <yao.qi@linaro.org>
5409 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5411 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5413 * target.c (target_supports_multi_process): New function, moved
5415 * target.h (target_supports_multi_process): ... here. Remove
5418 2016-10-05 Tom Tromey <tom@tromey.com>
5421 * tracepoint.c (handle_tracepoint_bkpts): Check
5422 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5424 2016-10-05 Yao Qi <yao.qi@linaro.org>
5426 * configure.srv: Update the path of arm-*.xml files.
5428 2016-10-05 Terry Guo <terry.guo@arm.com>
5429 Yao Qi <yao.qi@linaro.org>
5431 * Makefile.in: Adjust the path of rules.
5432 * configure.srv: Update the path of xml files.
5433 * regformats/arm-with-iwmmxt.dat: Regenerated.
5434 * regformats/arm-with-neon.dat: Likewise.
5435 * regformats/arm-with-vfpv2.dat: Likewise.
5436 * regformats/arm-with-vfpv3.dat Likewise.
5438 2016-09-30 Yao Qi <yao.qi@linaro.org>
5441 * target.c (target_stop_and_wait): Don't call
5442 target_continue_no_signal, use resume_stop instead.
5444 2016-09-26 Yao Qi <yao.qi@linaro.org>
5446 * linux-low.c (linux_wait_1): Call debug_exit.
5448 2016-09-23 Pedro Alves <palves@redhat.com>
5450 * Makefile.in (SFILES): Add common/new-op.c.
5451 (OBS): Add common/new-op.o.
5452 (new-op.o): New rule.
5454 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5456 * .gitinore: Ignore more files.
5458 2016-09-21 Yao Qi <yao.qi@linaro.org>
5460 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5463 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5465 * server.c (start_inferior): Call target_mourn_inferior instead of
5466 mourn_inferior; pass ptid_t argument to it.
5468 (handle_target_event): Likewise.
5469 * target.c (target_mourn_inferior): New function.
5470 * target.h (mourn_inferior): Delete macro.
5472 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5474 * linux-low.c (lwp_is_stepping): New function.
5476 2016-09-06 Carl Love <cel@us.ibm.com>
5478 * server.c (start_inferior): Fixed comment, requested comment change
5479 didn't get updated correctly. Removed reference to ptrace () call as
5480 it is only true on Linux systems.
5482 2016-09-06 Carl Love <cel@us.ibm.com>
5484 * server.c (start_inferior): Do not call
5485 function target_post_create_inferior () if the
5486 inferior process has already exited.
5488 2016-09-05 Pedro Alves <palves@redhat.com>
5490 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5491 (COMPILE.pre, CC_LD): Use CXX directly.
5492 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5493 * acinclude.m4: Don't include build-with-cxx.m4.
5494 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5495 * configure: Regenerate.
5497 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5500 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5501 call writing data to own_buf.
5503 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5505 * target.c (mywait): Call target_wait instead of
5507 (target_wait): New function.
5509 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5511 * server.c (start_inferior): New variable 'ptid'. Replace calls
5512 to the_target->resume by target_continue{,_no_signal}, depending
5514 * target.c (target_stop_and_wait): Call target_continue_no_signal
5515 instead of the_target->resume.
5516 (target_continue): New function.
5518 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5520 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5522 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5525 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5527 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5528 * linux-arm-low.c (ps_get_thread_area): Likewise.
5529 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5530 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5531 * linux-mips-low.c (ps_get_thread_area): Likewise.
5532 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5533 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5534 * linux-x86-low.c (ps_get_thread_area): Likewise.
5535 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5537 2016-08-19 Pedro Alves <palves@redhat.com>
5539 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5541 2016-08-19 Pedro Alves <palves@redhat.com>
5543 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5544 comment. Use memcpy instead of casting through unsigned long.
5546 2016-08-19 Pedro Alves <palves@redhat.com>
5548 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5549 allocating around 0x80000000.
5551 2016-08-19 Pedro Alves <palves@redhat.com>
5554 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5555 (x32-avx512-linux-ipa.o): New rules.
5556 * configure.ac (x86_64-*-linux*): New x32 check.
5557 * configure.srv (ipa_x32_linux_regobj): New.
5558 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5559 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5561 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5563 * configure: Regenerate.
5565 2016-08-09 Pedro Alves <palves@redhat.com>
5568 * Makefile.in (OBS): Add signals-state-save-restore.o.
5569 (signals-state-save-restore.o): New rule.
5570 * config.in: Regenerate.
5571 * configure: Regenerate.
5572 * linux-low.c: Include "signals-state-save-restore.h".
5573 (linux_create_inferior): Call
5574 restore_original_signals_state.
5575 * server.c: Include "dispositions-save-restore.h".
5576 (captured_main): Call save_original_signals_state.
5578 2016-08-05 Pedro Alves <palves@redhat.com>
5580 * configure: Regenerate.
5582 2016-08-04 Yao Qi <yao.qi@linaro.org>
5584 * linux-low.c (regsets_fetch_inferior_registers): Check
5585 errno is ESRCH or not.
5587 2016-08-02 Yao Qi <yao.qi@linaro.org>
5589 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5590 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5591 (thread_db_load_search): Update.
5592 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5593 td_ta_set_event and td_ta_event_getmsg.
5595 2016-07-26 Pedro Alves <palves@redhat.com>
5598 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5599 of unsigned long for 64-bit registers and use uint32_t instead of
5600 unsigned int for 32-bit registers.
5602 2016-07-26 Pedro Alves <palves@redhat.com>
5604 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5607 2016-07-21 Tom Tromey <tom@tromey.com>
5609 * configure: Rebuild.
5611 2016-07-21 Yao Qi <yao.qi@linaro.org>
5613 * mem-break.c (find_gdb_breakpoint): Cast bp to
5614 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5616 2016-07-21 Yao Qi <yao.qi@linaro.org>
5618 * server.c (handle_v_requests): Support s and S actions
5619 if target_supports_software_single_step return true.
5621 2016-07-21 Yao Qi <yao.qi@linaro.org>
5623 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5624 is resume_step, call maybe_hw_step.
5625 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5627 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5629 (proceed_one_lwp): If resume request is resume_step, install
5630 reinsert breakpoints and call maybe_hw_step.
5632 2016-07-21 Yao Qi <yao.qi@linaro.org>
5634 * linux-low.c (proceed_one_lwp): Declare.
5635 (linux_resume_one_thread): Remove local variable 'step'.
5636 Lift code enqueue signal. Call proceed_one_lwp instead of
5637 linux_resume_one_lwp.
5639 2016-07-21 Yao Qi <yao.qi@linaro.org>
5641 * linux-low.c (linux_resume_one_thread): Call
5642 enqueue_pending_signal.
5644 2016-07-21 Yao Qi <yao.qi@linaro.org>
5646 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5647 * inferiors.c (do_restore_current_thread_cleanup): New function.
5648 (make_cleanup_restore_current_thread): Likewise.
5649 * linux-low.c (install_software_single_step_breakpoints): Call
5650 make_cleanup_restore_current_thread. Switch current_thread to
5653 2016-07-21 Yao Qi <yao.qi@linaro.org>
5655 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5656 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5657 (clone_one_breakpoint): Likewise.
5658 (delete_reinsert_breakpoints): Change parameter to thread.
5660 (has_reinsert_breakpoints): Likewise.
5661 (uninsert_reinsert_breakpoints): Likewise.
5662 (reinsert_reinsert_breakpoints): Likewise.
5663 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5664 (delete_reinsert_breakpoints): Likewise.
5665 (reinsert_reinsert_breakpoints): Likewise.
5666 (uninsert_reinsert_breakpoints): Likewise.
5667 (has_reinsert_breakpoints): Likewise.
5669 2016-07-21 Yao Qi <yao.qi@linaro.org>
5671 * inferiors.c (get_thread_process): Make parameter const.
5672 * inferiors.h (get_thread_process): Update declaration.
5673 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5674 Add new parameters child_thread and parent_thread. Callers
5676 * mem-break.h (clone_all_breakpoints): Update declaration.
5678 2016-07-21 Yao Qi <yao.qi@linaro.org>
5680 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5681 <command_list, handler>: Remove.
5682 (struct gdb_breakpoint): New.
5683 (struct other_breakpoint): New.
5684 (struct reinsert_breakpoint): New.
5685 (is_gdb_breakpoint): New function.
5686 (any_persistent_commands): Update command_list if
5687 is_gdb_breakpoint returns true.
5688 (set_breakpoint): Create breakpoints according to their types.
5689 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5690 (set_gdb_breakpoint_1): Likewise.
5691 (set_gdb_breakpoint): Likewise.
5692 (clear_breakpoint_conditions): Change parameter type to
5693 'struct gdb_breakpoint *'.
5694 (clear_breakpoint_commands): Likewise.
5695 (clear_breakpoint_conditions_and_commands): Likewise.
5696 (add_condition_to_breakpoint): Likewise.
5697 (add_breakpoint_condition): Likewise.
5698 (add_commands_to_breakpoint): Likewise.
5699 (check_breakpoints): Check other_breakpoint.
5700 (clone_one_breakpoint): Clone breakpopint according to its type.
5701 * mem-break.h (struct gdb_breakpoint): Declare.
5702 (set_gdb_breakpoint): Update declaration.
5703 (clear_breakpoint_conditions_and_commands): Likewise.
5704 (add_breakpoint_condition): Likewise.
5705 (add_breakpoint_commands): Likewise.
5706 * server.c (process_point_options): Change parameter type to
5707 'struct gdb_breakpoint *'.
5709 2016-07-21 Yao Qi <yao.qi@linaro.org>
5711 * mem-break.c (set_breakpoint_at): Rename it to ...
5712 (set_breakpoint_type_at): ... it.
5713 (set_breakpoint_at): Call set_breakpoint_type_at.
5714 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5715 * mem-break.h (set_breakpoint_at): Update comments.
5717 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5719 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5721 (nios2_store_gregset): Likewise.
5723 2016-07-01 Pedro Alves <palves@redhat.com>
5724 Antoine Tremblay <antoine.tremblay@ericsson.com>
5726 * linux-low.c: Change interface to take the target lwp_info
5727 pointer directly and return void. Handle detaching from a zombie
5729 (linux_detach_lwp_callback): New function.
5730 (linux_detach): Detach from the leader thread after detaching from
5733 2016-06-28 Yao Qi <yao.qi@linaro.org>
5735 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5736 for variable new_offset.
5737 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5738 (aarch64_ftrace_insn_reloc_cb): Likewise.
5739 (aarch64_ftrace_insn_reloc_tb): Likewise.
5740 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5741 PRIx64 instead of PRIx32.
5743 2016-06-28 Yao Qi <yao.qi@linaro.org>
5745 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5746 (the_low_target): Install arm_get_syscall_trapinfo.
5748 2016-06-28 Yao Qi <yao.qi@linaro.org>
5750 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5752 (the_low_target): Install aarch64_get_syscall_trapinfo.
5754 2016-06-28 Yao Qi <yao.qi@linaro.org>
5756 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5758 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5759 Remove parameter sysno.
5760 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5763 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5765 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5766 (s390_emit_ne_goto): Likewise.
5767 (s390_emit_lt_goto): Likewise.
5768 (s390_emit_le_goto): Likewise.
5769 (s390_emit_gt_goto): Likewise.
5770 (s390_emit_ge_goto): Likewise.
5771 (s390x_emit_eq_goto): Likewise.
5772 (s390x_emit_ne_goto): Likewise.
5773 (s390x_emit_lt_goto): Likewise.
5774 (s390x_emit_le_goto): Likewise.
5775 (s390x_emit_gt_goto): Likewise.
5776 (s390x_emit_ge_goto): Likewise.
5777 (s390_emit_ops_impl): Mark variable static.
5778 (s390x_emit_ops): Likewise.
5780 2016-06-17 Yao Qi <yao.qi@linaro.org>
5782 * linux-low.c (handle_extended_wait): Call
5783 uninsert_reinsert_breakpoints for the parent process. Remove
5784 reinsert breakpoints from the child process. Reinsert them to
5785 the parent process when vfork is done.
5786 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5787 (reinsert_reinsert_breakpoints): New function.
5788 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5789 (reinsert_reinsert_breakpoints): Declare.
5791 2016-06-17 Yao Qi <yao.qi@linaro.org>
5793 * linux-low.c (handle_extended_wait): If the parent is doing
5794 step-over, remove the reinsert breakpoints from the forked child.
5796 2016-06-17 Yao Qi <yao.qi@linaro.org>
5798 * linux-low.c (unsuspend_all_lwps): Declare.
5799 (linux_low_filter_event): If thread exited, call finish_step_over.
5800 If step-over is finished, unsuspend other threads.
5802 2016-06-17 Yao Qi <yao.qi@linaro.org>
5804 * linux-low.c (linux_resume_one_lwp_throw): Assert
5805 has_reinsert_breakpoints returns false.
5806 * mem-break.c (delete_disabled_breakpoints): Assert
5807 bp type isn't reinsert_breakpoint.
5809 2016-06-17 Yao Qi <yao.qi@linaro.org>
5811 * linux-low.c (maybe_hw_step): New function.
5812 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5813 (finish_step_over): Switch current_thread to lwp temporarily,
5814 and assert has_reinsert_breakpoints returns true.
5815 (proceed_one_lwp): Call maybe_hw_step.
5816 * mem-break.c (has_reinsert_breakpoints): New function.
5817 * mem-break.h (has_reinsert_breakpoints): Declare.
5819 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5821 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5823 2016-05-17 Yao Qi <yao.qi@linaro.org>
5825 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5826 instead of find_inferior.
5828 2016-05-05 Yao Qi <yao.qi@linaro.org>
5830 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5831 Initialize res to zero.
5833 2016-05-05 Yao Qi <yao.qi@linaro.org>
5835 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5838 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5840 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5841 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5842 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5844 2016-04-28 Par Olsson <par.olsson@windriver.com>
5845 Simon Marchi <simon.marchi@ericsson.com>
5847 * tracepoint.c (write_inferior_int8): New function.
5848 (cmd_qtenable_disable): Write enable flag using
5849 write_inferior_int8.
5851 2016-04-25 Yao Qi <yao.qi@linaro.org>
5853 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5854 (need_step_over_p): Return zero if the LWP has pending signals
5855 can be delivered on software single step target.
5857 2016-04-25 Yao Qi <yao.qi@linaro.org>
5859 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5860 return instead of error.
5862 2016-04-22 Yao Qi <yao.qi@linaro.org>
5864 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5867 2016-04-22 Yao Qi <yao.qi@linaro.org>
5869 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5870 signal when stepping over breakpoint with software single
5873 2016-04-21 Pedro Alves <palves@redhat.com>
5875 * linux-s390-low.c (s390_collect_ptrace_register)
5876 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5878 (s390_check_regset): Use void * instead of gdb_byte *.
5880 2016-04-20 Pedro Alves <palves@redhat.com>
5882 * configure: Renegerate.
5884 2016-04-20 Yao Qi <yao.qi@linaro.org>
5886 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5887 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5889 (arm_store_gregset): Likewise.
5891 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5893 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5894 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5895 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5896 (amd64-avx-mpx-linux.c): New rules.
5897 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5898 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5899 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5900 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5901 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5902 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5903 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5904 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5905 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5906 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5907 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5908 * linux-x86-low.c (x86_linux_read_description): Add case for
5909 X86_XSTATE_AVX_MPX_MASK.
5910 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5911 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5912 init_registers_i386_avx_mpx_linux.
5913 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5914 (initialize_low_tracepoint): Call
5915 init_registers_i386_avx_mpx_linux.
5916 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5917 (initialize_low_tracepoint): Call
5918 init_registers_amd64_avx_mpx_linux.
5919 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5920 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5921 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5924 2016-04-18 Pedro Alves <palves@redhat.com>
5926 * configure: Regenerate.
5928 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5930 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5931 (aarch64_emit_sub): Likewise.
5933 2016-04-12 Pedro Alves <palves@redhat.com>
5935 * utils.c (prepare_to_throw_exception): Delete.
5937 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5939 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5941 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5943 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5945 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5947 * linux-aarch64-ipa.c: Add <elf.h> include.
5948 * linux-ppc-ipa.c: Add <elf.h> include.
5949 * linux-s390-ipa.c: Add <elf.h> include.
5951 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5953 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5954 (get_raw_reg_ptr): Likewise.
5955 (get_trace_state_variable_value_ptr): Likewise.
5956 (set_trace_state_variable_value_ptr): Likewise.
5957 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5960 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5961 Marcin Kościelnicki <koriakin@0x04.net>
5964 * linux-ppc-low.c (emit_insns): New function.
5965 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5966 (ppc_emit_prologue): New function.
5967 (ppc_emit_epilogue): New function.
5968 (ppc_emit_add): New function.
5969 (ppc_emit_sub): New function.
5970 (ppc_emit_mul): New function.
5971 (ppc_emit_lsh): New function.
5972 (ppc_emit_rsh_signed): New function.
5973 (ppc_emit_rsh_unsigned): New function.
5974 (ppc_emit_ext): New function.
5975 (ppc_emit_zero_ext): New function.
5976 (ppc_emit_log_not): New function.
5977 (ppc_emit_bit_and): New function.
5978 (ppc_emit_bit_or): New function.
5979 (ppc_emit_bit_xor): New function.
5980 (ppc_emit_bit_not): New function.
5981 (ppc_emit_equal): New function.
5982 (ppc_emit_less_signed): New function.
5983 (ppc_emit_less_unsigned): New function.
5984 (ppc_emit_ref): New function.
5985 (ppc_emit_const): New function.
5986 (ppc_emit_reg): New function.
5987 (ppc_emit_pop): New function.
5988 (ppc_emit_stack_flush): New function.
5989 (ppc_emit_swap): New function.
5990 (ppc_emit_stack_adjust): New function.
5991 (ppc_emit_call): New function.
5992 (ppc_emit_int_call_1): New function.
5993 (ppc_emit_void_call_2): New function.
5994 (ppc_emit_if_goto): New function.
5995 (ppc_emit_goto): New function.
5996 (ppc_emit_eq_goto): New function.
5997 (ppc_emit_ne_goto): New function.
5998 (ppc_emit_lt_goto): New function.
5999 (ppc_emit_le_goto): New function.
6000 (ppc_emit_gt_goto): New function.
6001 (ppc_emit_ge_goto): New function.
6002 (ppc_write_goto_address): New function.
6003 (ppc_emit_ops_impl): New static variable.
6004 (ppc64v1_emit_prologue): New function.
6005 (ppc64v2_emit_prologue): New function.
6006 (ppc64_emit_epilogue): New function.
6007 (ppc64_emit_add): New function.
6008 (ppc64_emit_sub): New function.
6009 (ppc64_emit_mul): New function.
6010 (ppc64_emit_lsh): New function.
6011 (ppc64_emit_rsh_signed): New function.
6012 (ppc64_emit_rsh_unsigned): New function.
6013 (ppc64_emit_ext): New function.
6014 (ppc64_emit_zero_ext): New function.
6015 (ppc64_emit_log_not): New function.
6016 (ppc64_emit_bit_and): New function.
6017 (ppc64_emit_bit_or): New function.
6018 (ppc64_emit_bit_xor): New function.
6019 (ppc64_emit_bit_not): New function.
6020 (ppc64_emit_equal): New function.
6021 (ppc64_emit_less_signed): New function.
6022 (ppc64_emit_less_unsigned): New function.
6023 (ppc64_emit_ref): New function.
6024 (ppc64_emit_const): New function.
6025 (ppc64v1_emit_reg): New function.
6026 (ppc64v2_emit_reg): New function.
6027 (ppc64_emit_pop): New function.
6028 (ppc64_emit_stack_flush): New function.
6029 (ppc64_emit_swap): New function.
6030 (ppc64v1_emit_call): New function.
6031 (ppc64v2_emit_call): New function.
6032 (ppc64v1_emit_int_call_1): New function.
6033 (ppc64v2_emit_int_call_1): New function.
6034 (ppc64v1_emit_void_call_2): New function.
6035 (ppc64v2_emit_void_call_2): New function.
6036 (ppc64_emit_if_goto): New function.
6037 (ppc64_emit_eq_goto): New function.
6038 (ppc64_emit_ne_goto): New function.
6039 (ppc64_emit_lt_goto): New function.
6040 (ppc64_emit_le_goto): New function.
6041 (ppc64_emit_gt_goto): New function.
6042 (ppc64_emit_ge_goto): New function.
6043 (ppc64v1_emit_ops_impl): New static variable.
6044 (ppc64v2_emit_ops_impl): New static variable.
6045 (ppc_emit_ops): New function.
6046 (linux_low_target): Wire in ppc_emit_ops.
6048 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
6049 Marcin Kościelnicki <koriakin@0x04.net>
6052 * Makefile.in: Add powerpc-*-ipa.o
6053 * configure.srv: Add ipa_obj for powerpc*-linux.
6054 * linux-ppc-ipa.c: New file.
6055 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
6057 (PPC_FIELD): New macro.
6058 (PPC_SEXT): New macro.
6059 (PPC_OP6): New macro.
6060 (PPC_BO): New macro.
6061 (PPC_LI): New macro.
6062 (PPC_BD): New macro.
6063 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6064 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6065 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6066 (ppc_get_thread_area): New function.
6067 (is_elfv2_inferior): New function.
6068 (gen_ds_form): New function.
6069 (GEN_STD): New macro.
6070 (GEN_STDU): New macro.
6071 (GEN_LD): New macro.
6072 (GEN_LDU): New macro.
6073 (gen_d_form): New function.
6074 (GEN_ADDI): New macro.
6075 (GEN_ADDIS): New macro.
6076 (GEN_LI): New macro.
6077 (GEN_LIS): New macro.
6078 (GEN_ORI): New macro.
6079 (GEN_ORIS): New macro.
6080 (GEN_LWZ): New macro.
6081 (GEN_STW): New macro.
6082 (GEN_STWU): New macro.
6083 (gen_xfx_form): New function.
6084 (GEN_MFSPR): New macro.
6085 (GEN_MTSPR): New macro.
6086 (GEN_MFCR): New macro.
6087 (GEN_MTCR): New macro.
6088 (GEN_SYNC): New macro.
6089 (GEN_LWSYNC): New macro.
6090 (gen_x_form): New function.
6091 (GEN_OR): New macro.
6092 (GEN_MR): New macro.
6093 (GEN_LWARX): New macro.
6094 (GEN_STWCX): New macro.
6095 (GEN_CMPW): New macro.
6096 (gen_md_form): New function.
6097 (GEN_RLDICL): New macro.
6098 (GEN_RLDICR): New macro.
6099 (gen_i_form): New function.
6101 (GEN_BL): New macro.
6102 (gen_b_form): New function.
6103 (GEN_BNE): New macro.
6104 (GEN_LOAD): New macro.
6105 (GEN_STORE): New macro.
6106 (gen_limm): New function.
6107 (gen_atomic_xchg): New function.
6108 (gen_call): New function.
6109 (ppc_relocate_instruction): New function.
6110 (ppc_install_fast_tracepoint_jump_pad): New function.
6111 (ppc_get_min_fast_tracepoint_insn_len): New function.
6112 (ppc_get_ipa_tdesc_idx): New function.
6113 (the_low_target): Wire in the new functions.
6114 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6116 * linux-ppc-tdesc.h: New file.
6118 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6120 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6121 (alloc_jump_pad_buffer): New function.
6122 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6123 (alloc_jump_pad_buffer): New function.
6124 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6125 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6126 (alloc_jump_pad_buffer): New function.
6127 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6128 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6129 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6130 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6132 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6134 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6135 * linux-amd64-ipa.c: Likewise.
6136 * linux-i386-ipa.c: Likewise.
6137 * linux-s390-ipa.c: Likewise.
6138 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6139 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6140 set_trace_state_variable_value_ptr.
6141 (struct ipa_sym_addresses): Likewise.
6142 (symbol_list): Likewise.
6143 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6144 accessing gdb_collect directly.
6145 (gdb_collect_ptr_type): New typedef.
6146 (get_raw_reg_ptr_type): New typedef.
6147 (get_trace_state_variable_value_ptr_type): New typedef.
6148 (set_trace_state_variable_value_ptr_type): New typedef.
6149 (gdb_collect_ptr): New global.
6150 (get_raw_reg_ptr): New global.
6151 (get_trace_state_variable_value_ptr): New global.
6152 (set_trace_state_variable_value_ptr): New global.
6153 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
6154 accessing get_raw_reg directly.
6155 (get_get_tsv_func_addr): Likewise for
6156 get_trace_state_variable_value_ptr.
6157 (get_set_tsv_func_addr): Likewise for
6158 set_trace_state_variable_value_ptr.
6159 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
6161 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
6163 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
6165 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6167 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
6169 (relocate_instruction): Remove own_buf.
6170 * server.c (own_buf): Make global.
6171 (handle_v_requests): Make global.
6172 * server.h (own_buf): New declaration.
6173 (handle_v_requests): New prototype.
6175 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6178 * linux-s390-low.c (add_insns): New function.
6179 (s390_emit_prologue): New function.
6180 (s390_emit_epilogue): New function.
6181 (s390_emit_add): New function.
6182 (s390_emit_sub): New function.
6183 (s390_emit_mul): New function.
6184 (s390_emit_lsh): New function.
6185 (s390_emit_rsh_signed): New function.
6186 (s390_emit_rsh_unsigned): New function.
6187 (s390_emit_ext): New function.
6188 (s390_emit_log_not): New function.
6189 (s390_emit_bit_and): New function.
6190 (s390_emit_bit_or): New function.
6191 (s390_emit_bit_xor): New function.
6192 (s390_emit_bit_not): New function.
6193 (s390_emit_equal): New function.
6194 (s390_emit_less_signed): New function.
6195 (s390_emit_less_unsigned): New function.
6196 (s390_emit_ref): New function.
6197 (s390_emit_if_goto): New function.
6198 (s390_emit_goto): New function.
6199 (s390_write_goto_address): New function.
6200 (s390_emit_litpool): New function.
6201 (s390_emit_const): New function.
6202 (s390_emit_call): New function.
6203 (s390_emit_reg): New function.
6204 (s390_emit_pop): New function.
6205 (s390_emit_stack_flush): New function.
6206 (s390_emit_zero_ext): New function.
6207 (s390_emit_swap): New function.
6208 (s390_emit_stack_adjust): New function.
6209 (s390_emit_set_r2): New function.
6210 (s390_emit_int_call_1): New function.
6211 (s390_emit_void_call_2): New function.
6212 (s390_emit_eq_goto): New function.
6213 (s390_emit_ne_goto): New function.
6214 (s390_emit_lt_goto): New function.
6215 (s390_emit_le_goto): New function.
6216 (s390_emit_gt_goto): New function.
6217 (s390_emit_ge_goto): New function.
6218 (s390x_emit_prologue): New function.
6219 (s390x_emit_epilogue): New function.
6220 (s390x_emit_add): New function.
6221 (s390x_emit_sub): New function.
6222 (s390x_emit_mul): New function.
6223 (s390x_emit_lsh): New function.
6224 (s390x_emit_rsh_signed): New function.
6225 (s390x_emit_rsh_unsigned): New function.
6226 (s390x_emit_ext): New function.
6227 (s390x_emit_log_not): New function.
6228 (s390x_emit_bit_and): New function.
6229 (s390x_emit_bit_or): New function.
6230 (s390x_emit_bit_xor): New function.
6231 (s390x_emit_bit_not): New function.
6232 (s390x_emit_equal): New function.
6233 (s390x_emit_less_signed): New function.
6234 (s390x_emit_less_unsigned): New function.
6235 (s390x_emit_ref): New function.
6236 (s390x_emit_if_goto): New function.
6237 (s390x_emit_const): New function.
6238 (s390x_emit_call): New function.
6239 (s390x_emit_reg): New function.
6240 (s390x_emit_pop): New function.
6241 (s390x_emit_stack_flush): New function.
6242 (s390x_emit_zero_ext): New function.
6243 (s390x_emit_swap): New function.
6244 (s390x_emit_stack_adjust): New function.
6245 (s390x_emit_int_call_1): New function.
6246 (s390x_emit_void_call_2): New function.
6247 (s390x_emit_eq_goto): New function.
6248 (s390x_emit_ne_goto): New function.
6249 (s390x_emit_lt_goto): New function.
6250 (s390x_emit_le_goto): New function.
6251 (s390x_emit_gt_goto): New function.
6252 (s390x_emit_ge_goto): New function.
6253 (s390_emit_ops): New function.
6254 (struct linux_target_ops): Fill in emit_ops hook.
6256 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6259 * Makefile.in: Add s390 IPA files.
6260 * configure.srv: Build IPA for s390.
6261 * linux-s390-ipa.c: New file.
6262 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
6263 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
6264 (tdesc_s390_linux32): Likewise.
6265 (init_registers_s390_linux32v1): Likewise.
6266 (tdesc_s390_linux32v1): Likewise.
6267 (init_registers_s390_linux32v2): Likewise.
6268 (tdesc_s390_linux32v2): Likewise.
6269 (init_registers_s390_linux64): Likewise.
6270 (tdesc_s390_linux64): Likewise.
6271 (init_registers_s390_linux64v1): Likewise.
6272 (tdesc_s390_linux64v1): Likewise.
6273 (init_registers_s390_linux64v2): Likewise.
6274 (tdesc_s390_linux64v2): Likewise.
6275 (init_registers_s390_te_linux64): Likewise.
6276 (tdesc_s390_te_linux64): Likewise.
6277 (init_registers_s390_vx_linux64): Likewise.
6278 (tdesc_s390_vx_linux64): Likewise.
6279 (init_registers_s390_tevx_linux64): Likewise.
6280 (tdesc_s390_tevx_linux64): Likewise.
6281 (init_registers_s390x_linux64): Likewise.
6282 (tdesc_s390x_linux64): Likewise.
6283 (init_registers_s390x_linux64v1): Likewise.
6284 (tdesc_s390x_linux64v1): Likewise.
6285 (init_registers_s390x_linux64v2): Likewise.
6286 (tdesc_s390x_linux64v2): Likewise.
6287 (init_registers_s390x_te_linux64): Likewise.
6288 (tdesc_s390x_te_linux64): Likewise.
6289 (init_registers_s390x_vx_linux64): Likewise.
6290 (tdesc_s390x_vx_linux64): Likewise.
6291 (init_registers_s390x_tevx_linux64): Likewise.
6292 (tdesc_s390x_tevx_linux64): Likewise.
6293 (have_hwcap_s390_vx): New static variable.
6294 (s390_arch_setup): Fill have_hwcap_s390_vx.
6295 (s390_get_thread_area): New function.
6296 (s390_ft_entry_gpr_esa): New const.
6297 (s390_ft_entry_gpr_zarch): New const.
6298 (s390_ft_entry_misc): New const.
6299 (s390_ft_entry_fr): New const.
6300 (s390_ft_entry_vr): New const.
6301 (s390_ft_main_31): New const.
6302 (s390_ft_main_64): New const.
6303 (s390_ft_exit_fr): New const.
6304 (s390_ft_exit_vr): New const.
6305 (s390_ft_exit_misc): New const.
6306 (s390_ft_exit_gpr_esa): New const.
6307 (s390_ft_exit_gpr_zarch): New const.
6308 (append_insns): New function.
6309 (s390_relocate_instruction): New function.
6310 (s390_install_fast_tracepoint_jump_pad): New function.
6311 (s390_get_min_fast_tracepoint_insn_len): New function.
6312 (s390_get_ipa_tdesc_idx): New function.
6313 (struct linux_target_ops): Wire in the above functions.
6314 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
6315 * linux-s390-tdesc.h: New file.
6317 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6319 * linux-s390-low.c (s390_supports_tracepoints): New function.
6320 (struct linux_target_ops): Fill supports_tracepoints hook.
6322 2016-03-18 Yao Qi <yao.qi@linaro.org>
6324 * linux-low.c (lwp_signal_can_be_delivered): New function.
6325 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
6327 2016-03-18 Yao Qi <yao.qi@linaro.org>
6329 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
6330 0 if signal is enqueued. Remove 'signal' from one debugging
6331 message. Move one debugging message to some lines below.
6332 Remove code setting 'signal' to 0.
6334 2016-03-18 Yao Qi <yao.qi@linaro.org>
6336 * linux-low.c (linux_low_filter_event): Remove redundant
6337 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
6339 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
6341 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
6342 (struct linux_target_ops): Wire in the above.
6344 2016-03-03 Yao Qi <yao.qi@linaro.org>
6346 * linux-low.c: Update comments to start_step_over.
6348 2016-03-03 Yao Qi <yao.qi@linaro.org>
6351 * linux-low.c (handle_extended_wait): Set child suspended
6352 if event_lwp->bp_reinsert isn't zero.
6354 2016-03-02 Yao Qi <yao.qi@linaro.org>
6356 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
6357 enqueue_pending_signal.
6359 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
6361 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
6364 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6366 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6367 (s390_regmap_3264) [!__s390x__]: New global.
6368 (s390_collect_ptrace_register): Skip map entries containing -1.
6369 (s390_supply_ptrace_register): Ditto.
6370 (s390_fill_gprs_high): New function.
6371 (s390_store_gprs_high): New function.
6372 (s390_regsets): Add NT_S390_HIGH_GPRS.
6373 (s390_get_hwcap): Enable on 31-bit.
6374 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6375 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6376 Detect NT_S390_HIGH_GPRS.
6377 (s390_usrregs_info_3264): Enable on 31-bit.
6378 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6379 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6381 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6384 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6385 * configure.srv: Ditto.
6386 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6387 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6388 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6389 (init_registers_amd64_linux): Remove prototype.
6390 (tdesc_amd64_linux): Remove declaration.
6391 (get_ipa_tdesc): New function.
6392 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6393 initialize remaining tdescs.
6394 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6395 (init_registers_i386_linux): Remove prototype.
6396 (tdesc_i386_linux): Remove declaration.
6397 (get_ipa_tdesc): New function.
6398 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6399 initialize remaining tdescs.
6400 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6401 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6402 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6403 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6404 (x86_get_ipa_tdesc_idx): New function.
6405 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6406 * linux-x86-tdesc.h: New file.
6407 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6408 (target_get_ipa_tdesc_idx): New macro.
6409 * tracepoint.c (ipa_tdesc_idx): New macro.
6410 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6411 (symbol_list): Add ipa_tdesc_idx.
6412 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6413 (ipa_tdesc): Remove.
6414 (ipa_tdesc_idx): New variable.
6415 (get_context_regcache): Use get_ipa_tdesc.
6416 (gdb_collect): Ditto.
6418 * tracepoint.h (get_ipa_tdesc): New prototype.
6419 (ipa_tdesc): Remove.
6421 2016-02-24 Pedro Alves <palves@redhat.com>
6423 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6424 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6425 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6426 Factor out common code between the USE_SIGTRAP_SIGINFO and
6427 !USE_SIGTRAP_SIGINFO blocks.
6428 (linux_low_filter_event): Call save_stop_reason instead of
6429 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6431 (linux_wait_1): Update comments.
6433 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6435 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6436 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6437 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6438 ppc_insert_point, ppc_remove_point.
6440 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6442 * linux-s390-low.c (s390_supports_z_point_type): New function.
6443 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6445 2016-02-16 Yao Qi <yao.qi@linaro.org>
6447 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6448 PC. Get pc from regcache_read_pc.
6450 2016-02-12 Yao Qi <yao.qi@linaro.org>
6452 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6453 or linux_get_pc_32bit.
6454 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6456 2016-02-12 Yao Qi <yao.qi@linaro.org>
6458 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6459 arm_linux_get_next_pcs_fixup.
6461 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6463 * tracepoint.c (x_tracepoint_action_download): Change
6464 write_inferior_data_ptr to write_inferior_data_pointer.
6465 (cmd_qtstart): Likewise.
6466 (write_inferior_data_ptr): Remove.
6467 (download_agent_expr): Change write_inferior_data_ptr to
6468 write_inferior_data_pointer.
6469 (download_tracepoint_1): Likewise.
6470 (download_tracepoint): Likewise.
6471 (download_trace_state_variables): Likewise.
6473 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6474 Marcin Kościelnicki <koriakin@0x04.net>
6476 * tracepoint.c (struct tracepoint_action_ops): Remove.
6477 (struct tracepoint_action): Remove ops.
6478 (m_tracepoint_action_download, r_tracepoint_action_download)
6479 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6480 size and offset accordingly.
6481 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6482 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6483 (tracepoint_action_send, tracepoint_action_download): New functions.
6484 Helpers for trace action handlers.
6485 (add_tracepoint_action): Remove setup actions ops.
6486 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6488 2016-02-10 Yao Qi <yao.qi@linaro.org>
6490 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6492 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6494 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6496 * configure: Regenerate.
6498 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6500 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6501 void * to gdb_byte *.
6502 * linux-low.c (siginfo_fixup): Likewise.
6503 (linux_xfer_siginfo): Likewise.
6504 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6506 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6508 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6510 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6512 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6514 * linux-x86-low.c [__x86_64__]: Include
6515 "nat/amd64-linux-siginfo.h".
6516 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6517 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6518 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6519 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6520 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6521 (cpt_si_fd, si_timerid, si_overrun): Move from
6522 nat/amd64-linux-siginfo.c.
6523 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6525 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6527 * server.c (skip_to_semicolon): Remove.
6528 (process_point_options): Use strchrnul instead of
6531 2016-01-26 Yao Qi <yao.qi@linaro.org>
6533 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6534 * linux-low.c (install_software_single_step_breakpoints): Don't
6535 call regcache_read_pc.
6536 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6539 2016-01-26 Yao Qi <yao.qi@linaro.org>
6541 * linux-low.c (install_software_single_step_breakpoints): Call
6542 regcache_read_pc instead of get_pc.
6544 2016-01-26 Yao Qi <yao.qi@linaro.org>
6546 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6547 (unblock_async_io): Rename to ...
6548 (block_unblock_async_io): ... it. New function.
6549 (enable_async_io): Don't install SIGIO handler. Unblock it
6551 (disable_async_io): Don't ignore SIGIO. Block it instead.
6552 (initialize_async_io): Install SIGIO handler. Don't call
6555 2016-01-26 Yao Qi <yao.qi@linaro.org>
6557 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6558 first character is '\003', call *the_target->request_interrupt.
6560 2016-01-25 Yao Qi <yao.qi@linaro.org>
6562 * remote-utils.c (new_thread_notify): Remove.
6563 (dead_thread_notify): Likewise.
6564 * remote-utils.h (new_thread_notify): Remove declaration.
6565 (dead_thread_notify): Likewise.
6567 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6569 * gdb.trace/pending.exp: Fix expected message on continue.
6571 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6573 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6574 it works properly on big-endian machines where sizeof (CORE_ADDR)
6577 2016-01-21 Pedro Alves <palves@redhat.com>
6579 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6580 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6581 * configure: Regenerate.
6583 2016-01-21 Yao Qi <yao.qi@linaro.org>
6585 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6586 is_thumb and set it according to CPSR saved on the stack.
6587 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6588 arm_sigreturn_next_pc.
6590 2016-01-18 Yao Qi <yao.qi@linaro.org>
6592 * linux-low.c (linux_set_pc_64bit): New function.
6593 (linux_get_pc_64bit): New function.
6594 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6596 * linux-sparc-low.c (debug_threads): Remove declaration.
6597 (sparc_get_pc): Remove.
6598 (the_low_target): Use linux_get_pc_64bit instead of
6600 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6601 (the_low_target): Use linux_get_pc_64bit and
6604 2016-01-18 Yao Qi <yao.qi@linaro.org>
6606 * linux-arm-low.c (debug_threads): Remove declaration.
6607 (arm_get_pc, arm_set_pc): Remove.
6608 (the_low_target): Use linux_get_pc_32bit and
6610 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6611 (the_low_target): Use linux_get_pc_32bit and
6613 * linux-cris-low.c (debug_threads): Remove declaration.
6614 (cris_get_pc, cris_set_pc,): Remove.
6615 (the_low_target): Use linux_get_pc_32bit and
6617 * linux-crisv32-low.c (debug_threads): Remove declaration.
6618 (cris_get_pc, cris_set_pc): Remove.
6619 (the_low_target): Use linux_get_pc_32bit and
6621 * linux-low.c: Include inttypes.h.
6622 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6623 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6624 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6625 (the_low_target): Use linux_get_pc_32bit and
6627 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6628 (the_low_target): Use linux_get_pc_32bit and
6630 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6631 (the_low_target): Use linux_get_pc_32bit and
6633 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6634 (the_low_target): Use linux_get_pc_32bit and
6636 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6637 (the_low_target): Use linux_get_pc_32bit and
6640 2016-01-18 Gary Benson <gbenson@redhat.com>
6642 * configure.ac (AC_FUNC_FORK): New check.
6643 * config.in: Regenerate.
6644 * configure: Likewise.
6646 2016-01-14 Yao Qi <yao.qi@linaro.org>
6648 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6649 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6650 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6651 arm_get_next_pcs_ctor.
6653 2016-01-12 Josh Stone <jistone@redhat.com>
6654 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6656 * inferiors.h: Include "gdb_vecs.h".
6657 (struct process_info): Add syscalls_to_catch.
6658 * inferiors.c (remove_process): Free syscalls_to_catch.
6659 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6660 syscall_return stops.
6661 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6662 * server.c (handle_general_set): Handle QCatchSyscalls.
6663 (handle_query): Report support for QCatchSyscalls.
6664 * target.h (struct target_ops): Add supports_catch_syscall.
6665 (target_supports_catch_syscall): New macro.
6666 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6667 (struct lwp_info): Add syscall_state.
6668 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6669 Maintain syscall_state and syscalls_to_catch across exec.
6670 (get_syscall_trapinfo): New function, proxy to the_low_target.
6671 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6672 (linux_low_filter_event): Toggle syscall_state entry/return for
6673 syscall traps, and set it ignored for all others.
6674 (gdb_catching_syscalls_p): New function.
6675 (gdb_catch_this_syscall_p): New function.
6676 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6677 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6678 (linux_supports_catch_syscall): New function.
6679 (linux_target_ops): Install it.
6680 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6681 (the_low_target): Install it.
6683 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6685 * acinclude.m4: Include new ../warning.m4 file.
6686 * configure: Regenerated.
6687 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6689 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6691 * ax.c (is_goto_target): Mark static.
6692 * linux-low.c (register_addr): Likewise.
6693 (linux_fetch_registers, linux_store_registers): Likewise.
6694 * mem-break.c (any_persistent_commands): Fix old prototype.
6695 (add_commands_to_breakpoint): Mark static.
6696 * regcache.c (find_register_by_name): Delete unused func.
6697 * remote-utils.c (hex_or_minus_one): Mark static.
6698 * server.c (monitor_show_help): Mark static.
6699 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6700 handle_v_requests): Likewise.
6702 2016-01-12 Pedro Alves <palves@redhat.com>
6704 Remove use of the registered trademark symbol throughout.
6706 2016-01-08 Yao Qi <yao.qi@linaro.org>
6708 * remote-utils.c (getpkt): If c is '\003', call target hook
6711 2016-01-06 Yao Qi <yao.qi@linaro.org>
6713 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6714 linux-aarch32-low.c.
6715 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6716 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6717 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6718 (thumb2_breakpoint): Declare.
6719 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6720 linux-aarch32-low.h.
6721 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6722 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6723 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6725 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6727 * gdbreplay.c (gdbreplay_version): Change copyright year in
6729 * server.c (gdbserver_version): Likewise.
6731 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6733 * server.c (crc32_table): Delete.
6734 (crc32): Use libiberty's xcrc32 function.
6736 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6738 * lynx-low.c (lynx_delete_thread_callback): New function.
6739 (lynx_mourn): Properly delete our process and all of its
6740 threads. Remove call to clear_inferiors.
6742 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6744 * target.c (thread_search_callback): Add check that
6745 the thread_stopped target callback is not NULL before
6748 2015-12-21 Yao Qi <yao.qi@linaro.org>
6750 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6753 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6755 * server.c (handle_query): Call target_supports_software_single_step.
6757 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6759 * linux-low.c (single_step): New function.
6760 (linux_resume_one_lwp_throw): Call single_step.
6761 (start_step_over): Likewise.
6763 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6765 * Makefile.in (SFILES): Append arch/arm-linux.c,
6766 arch/arm-get-next-pcs.c.
6767 (arm-linux.o): New rule.
6768 (arm-get-next-pcs.o): New rule.
6769 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6771 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6772 to linux-aarch32-low.c.
6773 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6774 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6775 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6776 (thumb2_breakpoint_len): Likewise.
6777 (arm_is_thumb_mode): Make non-static.
6778 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6779 from linux-aarch32-low.c.
6780 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6781 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6782 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6783 (thumb2_breakpoint_len): Likewise.
6784 (arm_is_thumb_mode): New declaration.
6785 * linux-arm-low.c: Include arch/arm-linux.h
6786 aarch/arm-get-next-pcs.h, sys/syscall.h.
6787 (get_next_pcs_ops): New struct.
6788 (get_next_pcs_addr_bits_remove): New function.
6789 (get_next_pcs_is_thumb): New function.
6790 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6791 (arm_sigreturn_next_pc): Likewise.
6792 (get_next_pcs_syscall_next_pc): Likewise.
6793 (arm_gdbserver_get_next_pcs): Likewise.
6794 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6796 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6797 * server.h: Include gdb_vecs.h.
6799 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6801 * Makefile.in (SFILES): Append common/common-regcache.c.
6802 (OBS): Append common-regcache.o.
6803 (common-regcache.o): New rule.
6804 * regcache.c (init_register_cache): Initialize cache to
6806 (regcache_raw_read_unsigned): New function.
6807 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6808 register_status enum.
6810 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6812 * linux-aarch64-low.c (the_low_targets): Rename
6813 breakpoint_reinsert_addr to get_next_pcs.
6814 * linux-arm-low.c (the_low_targets): Likewise.
6815 * linux-bfin-low.c (the_low_targets): Likewise.
6816 * linux-cris-low.c (the_low_targets): Likewise.
6817 * linux-crisv32-low.c (the_low_targets): Likewise.
6818 * linux-low.c (can_software_single_step): Likewise.
6819 (install_software_single_step_breakpoints): New function.
6820 (start_step_over): Use install_software_single_step_breakpoints.
6821 * linux-low.h: New CORE_ADDR vector.
6822 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6824 * linux-mips-low.c (the_low_targets): Likewise.
6825 * linux-nios2-low.c (the_low_targets): Likewise.
6826 * linux-sparc-low.c (the_low_targets): Likewise.
6828 2015-12-17 Pedro Alves <palves@redhat.com>
6830 * linux-low.c (linux_kill_one_lwp): Remove references to
6832 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6834 (linux_init_signals): Delete.
6835 (initialize_low): Adjust.
6836 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6838 2015-12-16 Pedro Alves <palves@redhat.com>
6840 * configure.ac (compiler warning flags): When testing a
6841 -Wno-foo option, check whether -Wfoo works instead.
6842 * configure: Regenerate.
6844 2015-12-11 Don Breazeal <donb@codesourcery.com>
6846 * server.c (process_serial_event): Don't exit from gdbserver
6847 in remote mode if there are still active inferiors.
6849 2015-12-11 Yao Qi <yao.qi@linaro.org>
6851 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6852 arm_breakpoint_at if the process is 32-bit.
6854 2015-12-11 Yao Qi <yao.qi@linaro.org>
6856 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6859 2015-12-07 Yao Qi <yao.qi@linaro.org>
6861 * configure.srv: Append arm.o to srv_tgtobj for
6862 aarch64*-*-linux* target.
6863 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6864 from linux-arm-low.c.
6865 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6866 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6867 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6868 (thumb2_breakpoint_len): Likewise.
6869 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6870 (arm_breakpoint_kinds): Likewise.
6871 (arm_breakpoint_kind_from_pc): Likewise.
6872 (arm_sw_breakpoint_from_kind): Likewise.
6873 (arm_breakpoint_kind_from_current_state): Likewise.
6874 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6875 (arm_sw_breakpoint_from_kind): Declare.
6876 (arm_breakpoint_kind_from_current_state): Declare.
6877 (arm_breakpoint_at): Declare.
6878 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6879 arm_sw_breakpoint_from_kind if process is 32-bit.
6880 (aarch64_breakpoint_kind_from_pc): New function.
6881 (aarch64_breakpoint_kind_from_current_state): New function.
6882 (the_low_target): Initialize fields breakpoint_kind_from_pc
6883 and breakpoint_kind_from_current_state.
6884 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6885 linux-aarch32-low.c.
6886 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6887 (arm_breakpoint, arm_breakpoint_len): Likewise.
6888 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6889 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6890 (arm_is_thumb_mode): Likewise.
6891 (arm_breakpoint_at): Likewise.
6892 (arm_breakpoint_kind_from_pc): Likewise.
6893 (arm_sw_breakpoint_from_kind): Likewise.
6894 (arm_breakpoint_kind_from_current_state): Likewise.
6897 2015-08-04 Yao Qi <yao.qi@linaro.org>
6899 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6900 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6901 * server.c (extended_protocol): Remove "static".
6902 * server.h (extended_protocol): Declare it.
6904 2015-12-04 Josh Stone <jistone@redhat.com>
6906 * target.h (struct target_ops) <arch_setup>: Rename to ...
6907 (struct target_ops) <post_create_inferior>: ... this.
6908 (target_arch_setup): Rename to ...
6909 (target_post_create_inferior): ... this, calling post_create_inferior.
6910 * server.c (start_inferior): Update target_arch_setup calls to
6911 target_post_create_inferior.
6912 * linux-low.c (linux_low_ptrace_options): Forward declare.
6913 (linux_arch_setup): Update its comment for general use.
6914 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6915 (struct linux_target_ops): Use linux_post_create_inferior.
6916 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6917 to post_create_inferior.
6918 * nto-low.c (struct nto_target_ops): Likewise.
6919 * spu-low.c (struct spu_target_ops): Likewise.
6920 * win32-low.c (struct win32_target_ops): Likewise.
6922 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6924 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6926 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6928 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6929 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6930 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6931 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6932 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6933 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6934 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6935 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6936 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6937 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6938 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6939 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6941 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6943 * linux-low.c (linux_look_up_symbols): Don't call
6944 linux_supports_traceclone.
6945 * linux-low.h (thread_db_init): Remove use_events argument.
6946 * thread-db.c (thread_db_use_event): Remove global variable.
6947 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6948 (struct thread_db) <td_create_bp>: Remove field.
6949 (thread_db_create_event): Remove function.
6950 (thread_db_enable_reporting): Likewise.
6951 (find_one_thread): Don't check for thread_db_use_events.
6952 (attach_thread): Likewise.
6953 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6954 (try_thread_db_load_1): Don't check for thread_db_use_events.
6955 (thread_db_init): Remove use_events argument and thread events
6957 (remove_thread_event_breakpoints): Remove function.
6958 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6960 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6962 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6964 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6965 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6966 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6967 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6968 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6970 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6973 * linux-low.c (can_hardware_single_step): Use
6974 supports_hardware_single_step.
6975 (can_software_single_step): New function.
6976 (start_step_over): Call can_software_single_step.
6977 (linux_supports_hardware_single_step): New function.
6978 (struct target_ops) <supports_software_single_step>: Initialize.
6979 * linux-low.h (struct linux_target_ops)
6980 <supports_hardware_single_step>: Initialize.
6981 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6982 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6983 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6984 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6985 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6986 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6987 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6988 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6989 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6990 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6992 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6993 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6995 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6996 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6997 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7000 * target.h (struct target_ops): <supports_software_single_step>:
7002 (target_supports_software_single_step): New macro.
7004 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7006 * linux-low.c (linux_wait_1): Fix pc advance condition.
7007 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
7008 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
7010 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7012 * linux-arm-low.c (arm_is_thumb_mode): New function.
7013 (arm_breakpoint_at): Use arm_is_thumb_mode.
7014 (arm_breakpoint_kind_from_current_state): New function.
7015 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
7017 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
7018 (linux_breakpoint_kind_from_current_state): New function.
7019 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
7020 * linux-low.h (struct linux_target_ops)
7021 <breakpoint_kind_from_current_state>: New field.
7022 * target.h (struct target_ops): Likewise.
7023 (target_breakpoint_kind_from_current_state): New macro.
7025 2015-11-30 Pedro Alves <palves@redhat.com>
7027 * linux-low.c (linux_resume): Wake up the event loop before
7030 2015-11-30 Pedro Alves <palves@redhat.com>
7032 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
7034 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
7036 * target.c (struct thread_search): New structure.
7037 (thread_search_callback): New function.
7038 (prev_general_thread): New global.
7039 (prepare_to_access_memory, done_accessing_memory): New functions.
7040 * target.h (prepare_to_access_memory, done_accessing_memory):
7041 Replace macros with function declarations.
7043 2015-11-30 Pedro Alves <palves@redhat.com>
7046 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
7047 report TARGET_WAITKIND_NO_RESUMED.
7048 * remote-utils.c (prepare_resume_reply): Handle
7049 TARGET_WAITKIND_NO_RESUMED.
7050 * server.c (report_no_resumed): New global.
7051 (handle_query) <qSupported>: Handle "no-resumed+". Report
7052 "no-resumed+" support.
7053 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
7054 return error if the client doesn't support no-resumed events.
7055 (push_stop_notification): New function.
7056 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
7057 events if the client supports them.
7059 2015-11-30 Pedro Alves <palves@redhat.com>
7061 * linux-low.c (thread_still_has_status_pending_p): Don't check
7063 (lwp_resumed): New function.
7064 (status_pending_p_callback): Return early if the LWP is not
7065 supposed to be resumed.
7067 2015-11-30 Pedro Alves <palves@redhat.com>
7069 * linux-low.c (handle_extended_wait): Assert that the LWP's
7070 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7071 thread create events, leave the new child's status pending.
7072 (linux_low_filter_event): If GDB wants to hear about thread exit
7073 events, leave the LWP marked dead and don't delete it.
7074 (linux_wait_for_event_filtered): Don't check for thread exit.
7075 (filter_exit_event): New function.
7076 (linux_wait_1): Use it, when returning an exit event.
7077 (linux_resume_one_lwp_throw): Assert that the LWP's
7078 waitstatus is TARGET_WAITKIND_IGNORE.
7079 * remote-utils.c (prepare_resume_reply): Handle
7080 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7081 * server.c (report_thread_events): New global.
7082 (handle_general_set): Handle QThreadEvents.
7083 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7084 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7085 TARGET_WAITKIND_THREAD_EXITED.
7086 * server.h (report_thread_events): Declare.
7088 2015-11-30 Pedro Alves <palves@redhat.com>
7090 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7091 the thread's last_resume_kind was resume_stop.
7093 2015-11-30 Pedro Alves <palves@redhat.com>
7095 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7098 2015-11-30 Pedro Alves <palves@redhat.com>
7100 * server.c (handle_v_requests): Handle vCtrlC.
7102 2015-11-30 Pedro Alves <palves@redhat.com>
7104 * gdbthread.h (find_any_thread_of_pid): Declare.
7105 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7107 * server.c (handle_query): If current_thread is NULL, look for
7108 another thread of the selected process.
7110 2015-11-26 Daniel Colascione <dancol@dancol.org>
7111 Simon Marchi <simon.marchi@ericsson.com>
7113 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7114 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7116 * target.h (struct target_ops) <thread_name>: New field.
7117 (target_thread_name): New macro.
7119 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7121 * regcache.h (regcache_invalidate_pid): Add declaration.
7122 * regcache.c (regcache_invalidate_pid): New function, extracted
7123 from regcache_invalidate.
7124 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7125 Add trivial documentation comment.
7126 * lynx-low.c: Use regcache_invalidate_pid instead of
7127 regcache_invalidate.
7129 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7131 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7132 and Elf64_auxv_t if the target is Android.
7134 2015-11-22 Doug Evans <xdje42@gmail.com>
7136 * target.h: #include <sys/types.h>.
7138 2015-11-19 Pedro Alves <palves@redhat.com>
7140 * linux-low.c (linux_process_qsupported): Change prototype.
7142 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7144 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7145 and adjust to loop over all features.
7146 * server.c (handle_query) <qSupported>: Adjust to call
7147 target_process_qsupported once, passing it a vector of unprocessed
7149 * target.h (struct target_ops) <process_qsupported>: Change
7151 (target_process_qsupported): Adjust.
7153 2015-11-19 Pedro Alves <palves@redhat.com>
7155 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
7157 * configure: Regenerate.
7159 2015-11-19 Pedro Alves <palves@redhat.com>
7161 * configure: Regenerate.
7163 2015-11-19 Yao Qi <yao.qi@linaro.org>
7165 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
7168 2015-11-19 Yao Qi <yao.qi@linaro.org>
7170 * linux-aarch64-low.c (enum aarch64_operand_type): New.
7171 (struct aarch64_operand): Move enum out.
7173 2015-11-19 Yao Qi <yao.qi@linaro.org>
7175 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
7176 struct user_fpsimd_state *.
7177 (aarch64_store_fpregset): Likewise.
7179 2015-11-19 Yao Qi <yao.qi@linaro.org>
7181 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
7182 struct user_pt_regs *.
7183 (aarch64_store_gregset): Likewise.
7185 2015-11-18 Pedro Alves <palves@redhat.com>
7187 * Makefile.in (all_object_files): Add $IPA_OBJS.
7189 2015-11-17 Pedro Alves <palves@redhat.com>
7191 * win32-low.c (win32_resume): Use gdb_signal_from_host,
7192 GDB_SIGNAL_0 and gdb_signal_to_string.
7194 2015-11-17 Pedro Alves <palves@redhat.com>
7196 * win32-low.c (handle_output_debug_string): Remove parameter.
7197 (win32_kill): Remove our_status local and adjust call to
7198 handle_output_debug_string.
7199 (get_child_debug_event): Adjust call to
7200 handle_output_debug_string.
7202 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7204 * linux-mips-low.c (mips_fill_gregset): Add cast.
7205 (mips_store_gregset): Likewise.
7206 (mips_fill_fpregset): Likewise.
7207 (mips_store_fpregset): Likewise.
7209 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7211 * linux-mips-low.c (mips_add_watchpoint): Rename private to
7214 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7216 * linux-mips-low.c (mips_linux_new_thread): Change type of
7217 watch_type to enum target_hw_bp_type.
7219 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7221 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
7222 Change return type to arm_hwbp_type.
7224 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7226 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
7227 (arm_store_gregset): Likewise.
7228 * linux-arm-low.c (arm_get_hwcap): Likewise.
7229 (arm_read_description): Likewise.
7231 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7233 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
7235 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7237 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
7238 (ppc_fill_vsxregset): Likewise.
7239 (ppc_store_vsxregset): Likewise.
7240 (ppc_fill_vrregset): Likewise.
7241 (ppc_store_vrregset): Likewise.
7242 (ppc_fill_evrregset): Likewise.
7243 (ppc_store_evrregset): Likewise.
7245 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7247 * linux-ppc-low.c (ppc_usrregs_info): Remove
7248 forward-declaration.
7249 (ppc_arch_setup): Move lower in file.
7251 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
7253 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
7254 (ps_pdwrite): Likewise.
7256 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7258 * linux-arm-low.c (arm_new_thread): Move pointer dereference
7259 to after assert checks.
7261 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7263 * proc-service.c (ps_pdread): Add/adjust casts.
7264 (ps_pdwrite): Add/adjust casts.
7266 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7268 * server.c (handle_search_memory_1): Cast return value of
7271 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7273 * server.c (write_qxfer_response): Change type of data to
7276 2015-10-29 Pedro Alves <palves@redhat.com>
7278 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
7280 2015-10-29 Pedro Alves <palves@redhat.com>
7282 * tracepoint.c (clear_installed_tracepoints): Add casts.
7284 2015-10-29 Pedro Alves <palves@redhat.com>
7286 * server.c (handle_v_cont, process_serial_event): Add enum
7287 gdb_signal casts to signal parsing code.
7289 2015-10-29 Pedro Alves <palves@redhat.com>
7291 * linux-low.h (NULL_REGSET): Define.
7292 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7293 * linux-arm-low.c (arm_regsets): Likewise.
7294 * linux-crisv32-low.c (cris_regsets): Likewise.
7295 * linux-m68k-low.c (m68k_regsets): Likewise.
7296 * linux-mips-low.c (mips_regsets): Likewise.
7297 * linux-nios2-low.c (nios2_regsets): Likewise.
7298 * linux-ppc-low.c (ppc_regsets): Likewise.
7299 * linux-s390-low.c (s390_regsets): Likewise.
7300 * linux-sh-low.c (sh_regsets): Likewise.
7301 * linux-sparc-low.c (sparc_regsets): Likewise.
7302 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7303 * linux-tile-low.c (tile_regsets): Likewise.
7304 * linux-x86-low.c (x86_regsets): Likewise.
7305 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7307 2015-10-29 Pedro Alves <palves@redhat.com>
7309 * linux-low.h (NULL_REGSET): Define.
7310 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7311 * linux-arm-low.c (arm_regsets): Likewise.
7312 * linux-crisv32-low.c (cris_regsets): Likewise.
7313 * linux-m68k-low.c (m68k_regsets): Likewise.
7314 * linux-mips-low.c (mips_regsets): Likewise.
7315 * linux-nios2-low.c (nios2_regsets): Likewise.
7316 * linux-ppc-low.c (ppc_regsets): Likewise.
7317 * linux-s390-low.c (s390_regsets): Likewise.
7318 * linux-sh-low.c (sh_regsets): Likewise.
7319 * linux-sparc-low.c (sparc_regsets): Likewise.
7320 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7321 * linux-tile-low.c (tile_regsets): Likewise.
7322 * linux-x86-low.c (x86_regsets): Likewise.
7323 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7325 2015-10-26 Doug Evans <dje@google.com>
7327 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
7329 2015-10-26 Doug Evans <dje@google.com>
7331 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
7333 2015-10-26 Doug Evans <dje@google.com>
7335 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
7337 (attach_thread, find_new_threads_callback): Ditto.
7339 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7341 * mem-break.h (set_breakpoint_data): Remove.
7343 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7345 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
7346 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7347 (initialize_low): Remove set_breakpoint_data call.
7348 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7349 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
7350 (initialize_low): Remove set_breakpoint_data call.
7351 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
7352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7353 (initialize_low): Remove set_breakpoint_data call.
7355 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7357 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
7358 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
7359 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
7360 * target.h (target_breakpoint_kind_from_pc): New macro.
7362 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
7364 * linux-low.c (default_breakpoint_kind_from_pc): New function.
7365 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7366 the default breakpoint kind.
7368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7370 * linux-arm-low.c (arm_supports_z_point_type): Add software
7373 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7375 * linux-arm-low.c: Refactor breakpoint definitions.
7376 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7377 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7379 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7381 * Makefile.in: Add arm.c/o.
7382 * configure.srv: Likewise.
7383 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7384 (arm_breakpoint_kind_from_pc): New function.
7385 (arm_sw_breakpoint_from_kind): Return proper kind.
7386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7388 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7390 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7392 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7393 (struct raw_breakpoint) <size>: Remove.
7394 (struct raw_breakpoint) <kind>: Add.
7395 (bp_size): New function.
7396 (bp_opcode): Likewise.
7397 (find_raw_breakpoint_at): Adjust for kind.
7398 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7399 (remove_memory_breakpoint): Adjust for kind call bp_size.
7400 (set_raw_breakpoint_at): Adjust for kind.
7401 (set_breakpoint): Likewise.
7402 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7403 (delete_raw_breakpoint): Adjust for kind.
7404 (delete_breakpoint): Likewise.
7405 (find_gdb_breakpoint): Likewise.
7406 (set_gdb_breakpoint_1): Likewise.
7407 (set_gdb_breakpoint): Likewise.
7408 (delete_gdb_breakpoint_1): Likewise.
7409 (delete_gdb_breakpoint): Likewise.
7410 (uninsert_raw_breakpoint): Likewise.
7411 (reinsert_raw_breakpoint): Likewise.
7412 (set_breakpoint_data): Remove.
7413 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7414 (check_mem_read): Adjust for kind call bp_size.
7415 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7416 (clone_one_breakpoint): Adjust for kind.
7417 * mem-break.h (set_gdb_breakpoint): Likewise.
7418 (delete_gdb_breakpoint): Likewise.
7419 * server.c (process_serial_event): Likewise.
7421 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7423 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7424 (struct linux_target_ops) <breakpoint>: Remove.
7425 (struct linux_target_ops) <breakpoint_len>: Remove.
7426 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7427 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7428 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7429 (arm_sw_breakpoint_from_kind): New function.
7430 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7431 (struct linux_target_ops) <breakpoint>: Remove.
7432 (struct linux_target_ops) <breakpoint_len>: Remove.
7433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7435 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7436 (struct linux_target_ops) <breakpoint>: Remove.
7437 (struct linux_target_ops) <breakpoint_len>: Remove.
7438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7440 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7441 (struct linux_target_ops) <breakpoint>: Remove.
7442 (struct linux_target_ops) <breakpoint_len>: Remove.
7443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7445 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7446 and sw_breakpoint_from_kind to increment the pc.
7447 (linux_breakpoint_kind_from_pc): New function.
7448 (linux_sw_breakpoint_from_kind): New function.
7449 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7450 (initialize_low): Call breakpoint_kind_from_pc and
7451 sw_breakpoint_from_kind to replace breakpoint_data/len.
7452 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7455 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7456 (struct linux_target_ops) <breakpoint>: Remove.
7457 (struct linux_target_ops) <breakpoint_len>: Remove.
7458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7460 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7461 (struct linux_target_ops) <breakpoint>: Remove.
7462 (struct linux_target_ops) <breakpoint_len>: Remove.
7463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7465 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7466 (struct linux_target_ops) <breakpoint>: Remove.
7467 (struct linux_target_ops) <breakpoint_len>: Remove.
7468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7470 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7471 (struct linux_target_ops) <breakpoint>: Remove.
7472 (struct linux_target_ops) <breakpoint_len>: Remove.
7473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7475 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7476 (struct linux_target_ops) <breakpoint>: Remove.
7477 (struct linux_target_ops) <breakpoint_len>: Remove.
7478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7480 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7481 (struct linux_target_ops) <breakpoint>: Remove.
7482 (struct linux_target_ops) <breakpoint_len>: Remove.
7483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7485 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7486 (struct linux_target_ops) <breakpoint>: Remove.
7487 (struct linux_target_ops) <breakpoint_len>: Remove.
7488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7490 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7491 (struct linux_target_ops) <breakpoint>: Remove.
7492 (struct linux_target_ops) <breakpoint_len>: Remove.
7493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7495 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7496 (struct linux_target_ops) <breakpoint>: Remove.
7497 (struct linux_target_ops) <breakpoint_len>: Remove.
7498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7500 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7501 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7502 (struct linux_target_ops) <breakpoint>: Remove.
7503 (struct linux_target_ops) <breakpoint_len>: Remove.
7504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7506 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7507 (struct linux_target_ops) <breakpoint>: Remove.
7508 (struct linux_target_ops) <breakpoint_len>: Remove.
7509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7512 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7514 * linux-cris-low.c (cris_get_pc): Remove void arg.
7516 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7518 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7521 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7523 * inferiors.c (thread_pid_matches_callback): New function.
7524 (find_thread_process): New function.
7525 (remove_thread): Reset current_thread.
7526 (remove_process): Assert threads have been removed first.
7528 2015-10-15 Yao Qi <yao.qi@linaro.org>
7530 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7532 (aarch64_remove_point): Likewise.
7533 * regcache.c (regcache_register_size): New function.
7535 2015-10-12 Yao Qi <yao.qi@linaro.org>
7537 * linux-aarch64-low.c: Update all callers as emit_load_store
7538 is renamed to aarch64_emit_load_store.
7540 2015-10-12 Yao Qi <yao.qi@linaro.org>
7542 * linux-aarch64-low.c: Update all callers of function renaming
7543 from emit_insn to aarch64_emit_insn.
7545 2015-10-12 Yao Qi <yao.qi@linaro.org>
7547 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7548 arch/aarch64-insn.h.
7549 (struct aarch64_memory_operand): Likewise.
7551 (emit_insn): Move to arch/aarch64-insn.c.
7552 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7553 (emit_load_store): Move to arch/aarch64-insn.c.
7554 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7555 (can_encode_int32): Remove.
7557 2015-10-12 Yao Qi <yao.qi@linaro.org>
7559 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7560 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7561 (aarch64_relocate_instruction): Likewise.
7562 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7563 (struct aarch64_insn_visitor): Likewise.
7565 2015-10-12 Yao Qi <yao.qi@linaro.org>
7567 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7568 (struct aarch64_insn_visitor): New.
7569 (struct aarch64_insn_relocation_data): New.
7570 (aarch64_ftrace_insn_reloc_b): New function.
7571 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7572 (aarch64_ftrace_insn_reloc_cb): Likewise.
7573 (aarch64_ftrace_insn_reloc_tb): Likewise.
7574 (aarch64_ftrace_insn_reloc_adr): Likewise.
7575 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7576 (aarch64_ftrace_insn_reloc_others): Likewise.
7578 (aarch64_relocate_instruction): Use visitor.
7580 2015-10-12 Yao Qi <yao.qi@linaro.org>
7582 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7583 int. Add argument buf.
7584 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7585 aarch64_relocate_instruction.
7587 2015-10-12 Yao Qi <yao.qi@linaro.org>
7589 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7590 argument insn. Remove local variable insn. Don't call
7592 (aarch64_install_fast_tracepoint_jump_pad): Call
7595 2015-09-30 Yao Qi <yao.qi@linaro.org>
7597 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7598 (emit_load_store_pair): Likewise.
7600 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7602 * dll.c (match_dll): Add cast(s).
7603 (unloaded_dll): Likewise.
7604 * linux-low.c (second_thread_of_pid_p): Likewise.
7605 (delete_lwp_callback): Likewise.
7606 (count_events_callback): Likewise.
7607 (select_event_lwp_callback): Likewise.
7608 (linux_set_resume_request): Likewise.
7609 * server.c (accumulate_file_name_length): Likewise.
7610 (emit_dll_description): Likewise.
7611 (handle_qxfer_threads_worker): Likewise.
7612 (visit_actioned_threads): Likewise.
7613 * thread-db.c (any_thread_of): Likewise.
7614 * tracepoint.c (same_process_p): Likewise.
7615 (match_blocktype): Likewise.
7616 (build_traceframe_info_xml): Likewise.
7618 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7620 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7622 (gdb_unparse_agent_expr): Likewise.
7623 * hostio.c (require_data): Likewise.
7624 (handle_pread): Likewise.
7625 * linux-low.c (disable_regset): Likewise.
7626 (fetch_register): Likewise.
7627 (store_register): Likewise.
7628 (get_dynamic): Likewise.
7629 (linux_qxfer_libraries_svr4): Likewise.
7630 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7631 (set_fast_tracepoint_jump): Likewise.
7632 (uninsert_fast_tracepoint_jumps_at): Likewise.
7633 (reinsert_fast_tracepoint_jumps_at): Likewise.
7634 (validate_inserted_breakpoint): Likewise.
7635 (clone_agent_expr): Likewise.
7636 * regcache.c (init_register_cache): Likewise.
7637 * remote-utils.c (putpkt_binary_1): Likewise.
7638 (decode_M_packet): Likewise.
7639 (decode_X_packet): Likewise.
7640 (look_up_one_symbol): Likewise.
7641 (relocate_instruction): Likewise.
7642 (monitor_output): Likewise.
7643 * server.c (handle_search_memory): Likewise.
7644 (handle_qxfer_exec_file): Likewise.
7645 (handle_qxfer_libraries): Likewise.
7646 (handle_qxfer): Likewise.
7647 (handle_query): Likewise.
7648 (handle_v_cont): Likewise.
7649 (handle_v_run): Likewise.
7650 (captured_main): Likewise.
7651 * target.c (write_inferior_memory): Likewise.
7652 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7653 * tracepoint.c (init_trace_buffer): Likewise.
7654 (add_tracepoint_action): Likewise.
7655 (add_traceframe): Likewise.
7656 (add_traceframe_block): Likewise.
7657 (cmd_qtdpsrc): Likewise.
7658 (cmd_qtdv): Likewise.
7659 (cmd_qtstatus): Likewise.
7660 (response_source): Likewise.
7661 (response_tsv): Likewise.
7662 (cmd_qtnotes): Likewise.
7663 (gdb_collect): Likewise.
7664 (initialize_tracepoint): Likewise.
7666 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7668 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7669 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7670 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7672 (enum aarch64_condition_codes): New enum.
7673 (w0): New static global.
7676 (struct aarch64_memory_operand) <type>: New
7677 MEMORY_OPERAND_POSTINDEX type.
7678 (postindex_memory_operand): New helper function.
7679 (emit_ret): New function.
7680 (emit_load_store_pair): New function, factored out of emit_stp
7681 with support for MEMORY_OPERAND_POSTINDEX.
7682 (emit_stp): Rewrite using emit_load_store_pair.
7683 (emit_ldp): New function.
7684 (emit_load_store): Likewise.
7685 (emit_ldr): Mention post-index instruction in comment.
7686 (emit_ldrh): New function.
7687 (emit_ldrb): New function.
7688 (emit_ldrsw): Mention post-index instruction in comment.
7689 (emit_str): Likewise.
7690 (emit_subs): New function.
7691 (emit_cmp): Likewise.
7692 (emit_and): Likewise.
7693 (emit_orr): Likewise.
7694 (emit_orn): Likewise.
7695 (emit_eor): Likewise.
7696 (emit_mvn): Likewise.
7697 (emit_lslv): Likewise.
7698 (emit_lsrv): Likewise.
7699 (emit_asrv): Likewise.
7700 (emit_mul): Likewise.
7701 (emit_sbfm): Likewise.
7702 (emit_sbfx): Likewise.
7703 (emit_ubfm): Likewise.
7704 (emit_ubfx): Likewise.
7705 (emit_csinc): Likewise.
7706 (emit_cset): Likewise.
7707 (emit_nop): Likewise.
7708 (emit_ops_insns): New helper function.
7709 (emit_pop): Likewise.
7710 (emit_push): Likewise.
7711 (aarch64_emit_prologue): New function.
7712 (aarch64_emit_epilogue): Likewise.
7713 (aarch64_emit_add): Likewise.
7714 (aarch64_emit_sub): Likewise.
7715 (aarch64_emit_mul): Likewise.
7716 (aarch64_emit_lsh): Likewise.
7717 (aarch64_emit_rsh_signed): Likewise.
7718 (aarch64_emit_rsh_unsigned): Likewise.
7719 (aarch64_emit_ext): Likewise.
7720 (aarch64_emit_log_not): Likewise.
7721 (aarch64_emit_bit_and): Likewise.
7722 (aarch64_emit_bit_or): Likewise.
7723 (aarch64_emit_bit_xor): Likewise.
7724 (aarch64_emit_bit_not): Likewise.
7725 (aarch64_emit_equal): Likewise.
7726 (aarch64_emit_less_signed): Likewise.
7727 (aarch64_emit_less_unsigned): Likewise.
7728 (aarch64_emit_ref): Likewise.
7729 (aarch64_emit_if_goto): Likewise.
7730 (aarch64_emit_goto): Likewise.
7731 (aarch64_write_goto_address): Likewise.
7732 (aarch64_emit_const): Likewise.
7733 (aarch64_emit_call): Likewise.
7734 (aarch64_emit_reg): Likewise.
7735 (aarch64_emit_pop): Likewise.
7736 (aarch64_emit_stack_flush): Likewise.
7737 (aarch64_emit_zero_ext): Likewise.
7738 (aarch64_emit_swap): Likewise.
7739 (aarch64_emit_stack_adjust): Likewise.
7740 (aarch64_emit_int_call_1): Likewise.
7741 (aarch64_emit_void_call_2): Likewise.
7742 (aarch64_emit_eq_goto): Likewise.
7743 (aarch64_emit_ne_goto): Likewise.
7744 (aarch64_emit_lt_goto): Likewise.
7745 (aarch64_emit_le_goto): Likewise.
7746 (aarch64_emit_gt_goto): Likewise.
7747 (aarch64_emit_ge_got): Likewise.
7748 (aarch64_emit_ops_impl): New static global variable.
7749 (aarch64_emit_ops): New target function, return
7750 &aarch64_emit_ops_impl.
7751 (struct linux_target_ops): Install it.
7753 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7755 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7756 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7758 * linux-aarch64-ipa.c: New file.
7759 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7761 (aarch64_get_thread_area): New target method.
7762 (extract_signed_bitfield): New helper function.
7763 (aarch64_decode_ldr_literal): New function.
7764 (enum aarch64_opcodes): New enum.
7765 (struct aarch64_register): New struct.
7766 (struct aarch64_operand): New struct.
7767 (x0): New static global.
7776 (aarch64_register): New helper function.
7777 (register_operand): Likewise.
7778 (immediate_operand): Likewise.
7779 (struct aarch64_memory_operand): New struct.
7780 (offset_memory_operand): New helper function.
7781 (preindex_memory_operand): Likewise.
7782 (enum aarch64_system_control_registers): New enum.
7783 (ENCODE): New macro.
7784 (emit_insn): New helper function.
7785 (emit_b): New function.
7786 (emit_bcond): Likewise.
7787 (emit_cb): Likewise.
7788 (emit_tb): Likewise.
7789 (emit_blr): Likewise.
7790 (emit_stp): Likewise.
7791 (emit_ldp_q_offset): Likewise.
7792 (emit_stp_q_offset): Likewise.
7793 (emit_load_store): Likewise.
7794 (emit_ldr): Likewise.
7795 (emit_ldrsw): Likewise.
7796 (emit_str): Likewise.
7797 (emit_ldaxr): Likewise.
7798 (emit_stxr): Likewise.
7799 (emit_stlr): Likewise.
7800 (emit_data_processing_reg): Likewise.
7801 (emit_data_processing): Likewise.
7802 (emit_add): Likewise.
7803 (emit_sub): Likewise.
7804 (emit_mov): Likewise.
7805 (emit_movk): Likewise.
7806 (emit_mov_addr): Likewise.
7807 (emit_mrs): Likewise.
7808 (emit_msr): Likewise.
7809 (emit_sevl): Likewise.
7810 (emit_wfe): Likewise.
7811 (append_insns): Likewise.
7812 (can_encode_int32_in): New helper function.
7813 (aarch64_relocate_instruction): New function.
7814 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7815 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7816 (struct linux_target_ops): Install aarch64_get_thread_area,
7817 aarch64_install_fast_tracepoint_jump_pad and
7818 aarch64_get_min_fast_tracepoint_insn_len.
7820 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7822 * Makefile.in (aarch64-insn.o): New rule.
7823 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7825 2015-09-21 Yao Qi <yao.qi@linaro.org>
7827 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7829 2015-09-21 Yao Qi <yao.qi@linaro.org>
7831 * tracepoint.c (max_jump_pad_size): Remove.
7833 2015-09-18 Yao Qi <yao.qi@linaro.org>
7835 * linux-aarch64-low.c: Don't include sys/uio.h.
7836 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7838 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7840 * tracepoint.c (eval_result_type): Change prototype.
7841 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7843 2015-09-15 Pedro Alves <palves@redhat.com>
7845 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7846 Check whether to report exec events instead of checking whether
7847 multiprocess is enabled.
7849 2015-09-15 Pedro Alves <palves@redhat.com>
7852 * remote-utils.c (prepare_resume_reply): Merge
7853 TARGET_WAITKIND_VFORK_DONE switch case with the
7854 TARGET_WAITKIND_FORKED case.
7856 2015-09-15 Yao Qi <yao.qi@linaro.org>
7858 * server.c (handle_query): Check string comparison using
7859 "else if" instead of "if".
7861 2015-09-15 Yao Qi <yao.qi@linaro.org>
7863 * server.c (vCont_supported): New global variable.
7864 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7865 matches. Append ";vContSupported+" to own_buf.
7866 (handle_v_requests): Append ";s;S" to own_buf if target supports
7867 hardware single step or vCont_supported is false.
7868 (capture_main): Set vCont_supported to zero.
7870 2015-09-15 Yao Qi <yao.qi@linaro.org>
7872 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7874 (linux_supports_hardware_single_step): ... New function.
7875 (linux_target_ops): Update.
7876 * lynx-low.c (lynx_target_ops): Set field
7877 supports_hardware_single_step to target_can_do_hardware_single_step.
7878 * nto-low.c (nto_target_ops): Likewise.
7879 * spu-low.c (spu_target_ops): Likewise.
7880 * win32-low.c (win32_target_ops): Likewise.
7881 * target.c (target_can_do_hardware_single_step): New function.
7882 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7883 Remove. <supports_hardware_single_step>: New field.
7884 (target_supports_conditional_breakpoints): Remove.
7885 (target_supports_hardware_single_step): New macro.
7886 (target_can_do_hardware_single_step): Declare.
7887 * server.c (handle_query): Use target_supports_hardware_single_step
7888 instead of target_supports_conditional_breakpoints.
7890 2015-09-15 Yao Qi <yao.qi@linaro.org>
7892 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7894 (struct linux_target_ops the_low_target): Install
7895 aarch64_linux_siginfo_fixup.
7897 2015-09-11 Don Breazeal <donb@codesourcery.com>
7898 Luis Machado <lgustavo@codesourcery.com>
7900 * linux-low.c (linux_mourn): Static declaration.
7901 (linux_arch_setup): Move in front of
7902 handle_extended_wait.
7903 (linux_arch_setup_thread): New function.
7904 (handle_extended_wait): Handle exec events. Call
7905 linux_arch_setup_thread. Make event_lwp argument a
7906 pointer-to-a-pointer.
7907 (check_zombie_leaders): Do not check stopped threads.
7908 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7909 (linux_low_filter_event): Add lwp and thread for exec'ing
7910 non-leader thread if leader thread has been deleted.
7911 Refactor code into linux_arch_setup_thread and call it.
7912 Pass child lwp pointer by reference to handle_extended_wait.
7913 (linux_wait_for_event_filtered): Update comment.
7914 (linux_wait_1): Prevent clobbering exec event status.
7915 (linux_supports_exec_events): New function.
7916 (linux_target_ops) <supports_exec_events>: Initialize new member.
7917 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7919 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7920 * server.c (report_exec_events): New global variable.
7921 (handle_query): Handle qSupported query for exec-events feature.
7922 (captured_main): Initialize report_exec_events.
7923 * server.h (report_exec_events): Declare new global variable.
7924 * target.h (struct target_ops) <supports_exec_events>: New
7926 (target_supports_exec_events): New macro.
7927 * win32-low.c (win32_target_ops) <supports_exec_events>:
7928 Initialize new member.
7930 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7932 * linux-low.c (linux_low_enable_btrace): Remove.
7933 (linux_target_ops): Replace linux_low_enable_btrace with
7934 linux_enable_btrace.
7936 2015-09-03 Yao Qi <yao.qi@linaro.org>
7938 * linux-aarch64-low.c (aarch64_insert_point): Call
7939 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7942 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7944 * linux-low.c (check_stopped_by_breakpoint): Use
7945 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7947 2015-08-27 Pedro Alves <palves@redhat.com>
7949 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7951 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7953 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7954 the XNEW-family equivalent.
7955 (compile_bytecodes): Likewise.
7956 * dll.c (loaded_dll): Likewise.
7957 * event-loop.c (append_callback_event): Likewise.
7958 (create_file_handler): Likewise.
7959 (create_file_event): Likewise.
7960 * hostio.c (handle_open): Likewise.
7961 * inferiors.c (add_thread): Likewise.
7962 (add_process): Likewise.
7963 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7964 * linux-arm-low.c (arm_new_process): Likewise.
7965 (arm_new_thread): Likewise.
7966 * linux-low.c (add_to_pid_list): Likewise.
7967 (linux_add_process): Likewise.
7968 (handle_extended_wait): Likewise.
7969 (add_lwp): Likewise.
7970 (enqueue_one_deferred_signal): Likewise.
7971 (enqueue_pending_signal): Likewise.
7972 (linux_resume_one_lwp_throw): Likewise.
7973 (linux_resume_one_thread): Likewise.
7974 (linux_read_memory): Likewise.
7975 (linux_write_memory): Likewise.
7976 * linux-mips-low.c (mips_linux_new_process): Likewise.
7977 (mips_linux_new_thread): Likewise.
7978 (mips_add_watchpoint): Likewise.
7979 * linux-x86-low.c (initialize_low_arch): Likewise.
7980 * lynx-low.c (lynx_add_process): Likewise.
7981 * mem-break.c (set_raw_breakpoint_at): Likewise.
7982 (set_breakpoint): Likewise.
7983 (add_condition_to_breakpoint): Likewise.
7984 (add_commands_to_breakpoint): Likewise.
7985 (clone_agent_expr): Likewise.
7986 (clone_one_breakpoint): Likewise.
7987 * regcache.c (new_register_cache): Likewise.
7988 * remote-utils.c (look_up_one_symbol): Likewise.
7989 * server.c (queue_stop_reply): Likewise.
7990 (start_inferior): Likewise.
7991 (queue_stop_reply_callback): Likewise.
7992 (handle_target_event): Likewise.
7993 * spu-low.c (fetch_ppc_memory): Likewise.
7994 (store_ppc_memory): Likewise.
7995 * target.c (set_target_ops): Likewise.
7996 * thread-db.c (thread_db_load_search): Likewise.
7997 (try_thread_db_load_1): Likewise.
7998 * tracepoint.c (add_tracepoint): Likewise.
7999 (add_tracepoint_action): Likewise.
8000 (create_trace_state_variable): Likewise.
8001 (cmd_qtdpsrc): Likewise.
8002 (cmd_qtro): Likewise.
8003 (add_while_stepping_state): Likewise.
8004 * win32-low.c (child_add_thread): Likewise.
8005 (get_image_name): Likewise.
8007 2015-08-25 Yao Qi <yao.qi@linaro.org>
8009 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
8011 2015-08-25 Yao Qi <yao.qi@linaro.org>
8013 * Makefile.in (aarch64-linux.o): New rule.
8014 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
8016 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
8017 (aarch64_init_debug_reg_state): Make it extern.
8018 (aarch64_linux_prepare_to_resume): Remove.
8020 2015-08-25 Yao Qi <yao.qi@linaro.org>
8022 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
8023 lwp_arch_private_info and ptid_of_lwp.
8025 2015-08-25 Yao Qi <yao.qi@linaro.org>
8027 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
8028 Find proc_info by find_process_pid. All callers updated.
8030 2015-08-25 Yao Qi <yao.qi@linaro.org>
8032 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
8034 (debug_reg_change_callback): Remove.
8035 (aarch64_notify_debug_reg_change): Remove.
8037 2015-08-25 Yao Qi <yao.qi@linaro.org>
8039 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
8040 Call current_lwp_ptid.
8042 2015-08-25 Yao Qi <yao.qi@linaro.org>
8044 * linux-aarch64-low.c (debug_reg_change_callback): Use
8047 2015-08-25 Yao Qi <yao.qi@linaro.org>
8049 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
8051 2015-08-25 Yao Qi <yao.qi@linaro.org>
8053 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
8055 2015-08-25 Yao Qi <yao.qi@linaro.org>
8057 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8060 2015-08-25 Yao Qi <yao.qi@linaro.org>
8062 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8064 (debug_reg_change_callback): Remove argument entry and add argument
8065 lwp. Remove local variable thread. Don't print thread id in the
8066 debugging output. Don't check whether pid of thread equals to pid.
8067 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8068 iterate_over_lwps instead find_inferior.
8070 2015-08-24 Pedro Alves <palves@redhat.com>
8072 * inferiors.c (get_first_process): New function.
8073 * inferiors.h (get_first_process): New declaration.
8074 * remote-utils.c (read_ptid): Default to the first process in the
8075 list, instead of to the current thread's process.
8077 2015-08-24 Pedro Alves <palves@redhat.com>
8079 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8080 * event-loop.c: Likewise.
8081 * remote-utils.c: Likewise.
8082 * tracepoint.c: Likewise.
8084 2015-08-24 Pedro Alves <palves@redhat.com>
8086 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8089 2015-08-21 Pedro Alves <palves@redhat.com>
8091 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8092 instead of literal 1.
8094 2015-08-21 Pedro Alves <palves@redhat.com>
8096 * tdesc.c (default_description): Explicitly zero-initialize.
8098 2015-08-21 Pedro Alves <palves@redhat.com>
8101 * inferiors.c (remove_thread): Discard any pending stop reply for
8103 * server.c (remove_all_on_match_pid): Rename to ...
8104 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8106 (discard_queued_stop_replies): Change parameter to a ptid. Now
8108 (handle_v_kill, kill_inferior_callback, captured_main)
8109 (process_serial_event): Adjust.
8110 * server.h (discard_queued_stop_replies): Declare.
8112 2015-08-21 Pedro Alves <palves@redhat.com>
8114 * linux-low.c (wait_for_sigstop): Always switch to no thread
8115 selected if the previously current thread dies.
8116 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8117 process instead of the current thread's.
8118 * remote-utils.c (input_interrupt): Don't check if there's no
8120 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8121 current thread to the general thread fails, error out.
8122 (handle_qxfer_auxv, handle_qxfer_libraries)
8123 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8124 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8125 (handle_query): Check if there's a thread selected instead of
8126 checking whether there's any thread in the thread list.
8127 (handle_qxfer_threads, handle_qxfer_btrace)
8128 (handle_qxfer_btrace_conf): Don't error out early if there's no
8129 thread in the thread list.
8130 (handle_v_cont, myresume): Don't set the current thread to the
8132 (process_serial_event) <Hg handling>: Also set thread_id if the
8133 previous general thread is still alive.
8134 (process_serial_event) <g/G handling>: If setting the current
8135 thread to the general thread fails, error out.
8136 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8137 thread's lwp instead of the current thread's.
8138 * target.c (set_desired_thread): If the desired thread was not
8139 found, leave the current thread pointing to NULL. Return an int
8140 (boolean) indicating success.
8141 * target.h (set_desired_thread): Change return type to int.
8143 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8145 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8146 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8148 (ps_get_thread_area): New function.
8150 2015-08-19 Gary Benson <gbenson@redhat.com>
8152 * hostio.c (handle_pread): Do not attempt to read more data
8153 than hostio_reply_with_data can fit in a packet.
8155 2015-08-18 Joel Brobecker <brobecker@adacore.com>
8157 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
8159 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
8161 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
8163 2015-08-06 Pedro Alves <palves@redhat.com>
8165 * tracepoint.c (expr_eval_result): Now an int.
8167 2015-08-06 Pedro Alves <palves@redhat.com>
8169 * gdbthread.h (struct regcache): Forward declare.
8170 (struct thread_info) <regcache_data>: Now a struct regcache
8172 * inferiors.c (inferior_regcache_data)
8173 (set_inferior_regcache_data): Now work with struct regcache
8175 * inferiors.h (struct regcache): Forward declare.
8176 (inferior_regcache_data, set_inferior_regcache_data): Now work
8177 with struct regcache pointers.
8178 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
8179 (free_register_cache_thread): Remove struct regcache pointer
8182 2015-08-06 Pedro Alves <palves@redhat.com>
8184 * server.c (captured_main): On error, print the exception message
8185 to stderr, and if run_once is set, throw a quit.
8187 2015-08-06 Pedro Alves <palves@redhat.com>
8189 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
8192 2015-08-06 Pedro Alves <palves@redhat.com>
8194 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
8195 reading beyond the passed in buffer length.
8197 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
8199 * tracepoint.c (symbol_list) <required>: Remove.
8201 2015-08-06 Pedro Alves <palves@redhat.com>
8203 * linux-low.c (handle_extended_wait): Set the fork child's suspend
8204 count if stopping and suspending threads.
8205 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
8206 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
8207 (linux_detach): Complete an ongoing step-over.
8208 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
8210 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
8211 (linux_wait_1): If passing a signal to the inferior after
8212 finishing a step-over, unsuspend and re-resume all lwps. If we
8213 see a single-step event but the thread should be continuing, don't
8214 pass the trap to gdb.
8215 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
8216 internal_error instead of gdb_assert.
8217 (enqueue_pending_signal): New function.
8218 (check_ptrace_stopped_lwp_gone): Add debug output.
8219 (start_step_over): Use internal_error instead of gdb_assert.
8220 (complete_ongoing_step_over): New function.
8221 (linux_resume_one_thread): Don't resume a suspended thread.
8222 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
8225 2015-08-06 Pedro Alves <palves@redhat.com>
8227 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
8228 (linux_thread_alive): Use lwp_is_marked_dead.
8229 (extended_event_reported): Delete.
8230 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
8231 instead of extended_event_reported.
8232 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
8234 (lwp_is_marked_dead): New function.
8235 (lwp_running): Use lwp_is_marked_dead.
8236 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
8239 2015-08-06 Pedro Alves <palves@redhat.com>
8241 * linux-low.c (linux_wait_1): Move fork event output out of the
8242 !report_to_gdb check. Pass event_child->waitstatus to
8243 target_waitstatus_to_string instead of ourstatus.
8245 2015-08-04 Yao Qi <yao.qi@linaro.org>
8247 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
8248 if current_thread is 32 bit.
8250 2015-08-04 Yao Qi <yao.qi@linaro.org>
8252 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8253 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8254 * server.c (extended_protocol): Remove "static".
8255 * server.h (extended_protocol): Declare it.
8257 2015-08-04 Yao Qi <yao.qi@linaro.org>
8259 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
8260 both aarch64 and aarch32.
8261 (aarch64_set_pc): Likewise.
8263 2015-08-04 Yao Qi <yao.qi@linaro.org>
8265 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
8266 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
8267 arm-with-neon.xml to srv_xmlfiles.
8268 * linux-aarch64-low.c: Include linux-aarch32-low.h.
8269 (is_64bit_tdesc): New function.
8270 (aarch64_linux_read_description): New function.
8271 (aarch64_arch_setup): Call aarch64_linux_read_description.
8272 (regs_info): Rename to regs_info_aarch64.
8273 (aarch64_regs_info): Return right regs_info.
8274 (initialize_low_arch): Call initialize_low_arch_aarch32.
8276 2015-08-04 Yao Qi <yao.qi@linaro.org>
8278 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
8279 * linux-aarch32-low.c: New file.
8280 * linux-aarch32-low.h: New file.
8281 * linux-arm-low.c (arm_fill_gregset): Move it to
8282 linux-aarch32-low.c.
8283 (arm_store_gregset): Likewise.
8284 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
8285 (arm_store_vfpregset): Call arm_store_vfpregset_num.
8286 (arm_arch_setup): Check if PTRACE_GETREGSET works.
8287 (regs_info): Rename to regs_info_arm.
8288 (arm_regs_info): Return regs_info_aarch32 if
8289 have_ptrace_getregset is 1 and target description is
8290 arm_with_neon or arm_with_vfpv3.
8291 (initialize_low_arch): Don't call init_registers_arm_with_neon.
8292 Call initialize_low_arch_aarch32 instead.
8294 2015-08-04 Yao Qi <yao.qi@linaro.org>
8296 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
8297 * linux-low.c: ... here.
8298 * linux-low.h (have_ptrace_getregset): Declare it.
8300 2015-08-04 Pedro Alves <palves@redhat.com>
8302 * thread-db.c (struct thread_db): Use new typedefs.
8303 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
8305 (disable_thread_event_reporting): Cast result of dlsym to
8306 destination function pointer type.
8307 (thread_db_mourn): Use td_ta_delete_ftype.
8309 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
8311 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
8313 (CDX_BREAKPOINT): Define for R2.
8314 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
8315 (the_low_target): Add comments.
8317 2015-07-30 Yao Qi <yao.qi@linaro.org>
8319 * linux-arm-low.c (arm_hwcap): Remove it.
8320 (arm_read_description): New local variable arm_hwcap. Don't
8321 set arm_hwcap to zero.
8323 2015-07-30 Yao Qi <yao.qi@linaro.org>
8325 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
8326 Use regcache->tdesc instead.
8327 (arm_store_wmmxregset): Likewise.
8328 (arm_fill_vfpregset): Likewise.
8329 (arm_store_vfpregset): Likewise.
8331 2015-07-30 Yao Qi <yao.qi@linaro.org>
8333 * linux-arm-low.c: Include arch/arm.h.
8334 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
8335 (arm_store_gregset): Likewise.
8337 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8339 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
8340 ptrace's 4th parameter.
8342 2015-07-27 Yao Qi <yao.qi@linaro.org>
8344 * configure.srv (case aarch64*-*-linux*): Don't set
8347 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
8349 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
8351 * linux-arm-low.c: Likewise.
8352 * linux-cris-low.c: Likewise.
8353 * linux-crisv32-low.c: Likewise.
8354 * linux-low.c: Likewise.
8355 * linux-m68k-low.c: Likewise.
8356 * linux-mips-low.c: Likewise.
8357 * linux-nios2-low.c: Likewise.
8358 * linux-s390-low.c: Likewise.
8359 * linux-sparc-low.c: Likewise.
8360 * linux-tic6x-low.c: Likewise.
8361 * linux-tile-low.c: Likewise.
8362 * linux-x86-low.c: Likewise.
8364 2015-07-24 Pedro Alves <palves@redhat.com>
8366 * config.in: Regenerate.
8367 * configure: Regenerate.
8369 2015-07-24 Pedro Alves <palves@redhat.com>
8371 * acinclude.m4: Include ../ptrace.m4.
8372 * configure.ac: Call GDB_AC_PTRACE.
8373 * config.in, configure: Regenerate.
8375 2015-07-24 Yao Qi <yao.qi@linaro.org>
8377 * linux-low.c (linux_create_inferior): Remove setting to
8378 proc->priv->new_inferior.
8379 (linux_attach): Likewise.
8380 (linux_low_filter_event): Likewise.
8381 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8383 2015-07-24 Yao Qi <yao.qi@linaro.org>
8385 * linux-low.c (linux_arch_setup): New function.
8386 (linux_low_filter_event): If proc->tdesc is NULL and
8387 proc->attached is true, call the_low_target.arch_setup.
8388 Otherwise, keep status pending, and return.
8389 (linux_resume_one_lwp_throw): Don't call get_pc if
8390 thread->while_stepping isn't NULL. Don't call
8391 get_thread_regcache if proc->tdesc is NULL.
8392 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8393 (linux_target_ops): Install arch_setup.
8394 * server.c (start_inferior): Call the_target->arch_setup.
8395 * target.h (struct target_ops) <arch_setup>: New field.
8396 (target_arch_setup): New marco.
8397 * lynx-low.c (lynx_target_ops): Update.
8398 * nto-low.c (nto_target_ops): Update.
8399 * spu-low.c (spu_target_ops): Update.
8400 * win32-low.c (win32_target_ops): Update.
8402 2015-07-24 Yao Qi <yao.qi@linaro.org>
8404 * linux-low.c (linux_add_process): Don't set
8405 proc->priv->new_inferior.
8406 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8407 (linux_attach): Likewise.
8409 2015-07-24 Yao Qi <yao.qi@linaro.org>
8411 * server.c (start_inferior): Code refactor.
8413 2015-07-24 Yao Qi <yao.qi@linaro.org>
8415 * server.c (process_serial_event): Set general_thread.
8417 2015-07-21 Yao Qi <yao.qi@linaro.org>
8419 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8420 aarch64_linux_get_debug_reg_capacity.
8422 2015-07-17 Yao Qi <yao.qi@linaro.org>
8424 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8425 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8426 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8427 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8428 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8429 (AARCH64_HWP_ALIGNMENT): Likewise.
8430 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8431 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8432 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8433 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8434 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8435 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8436 (struct aarch64_debug_reg_state): Likewise.
8437 (struct arch_lwp_info): Likewise.
8438 (aarch64_align_watchpoint): Likewise.
8439 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8440 (aarch64_watchpoint_length): Likewise.
8441 (aarch64_point_encode_ctrl_reg): Likewise
8442 (aarch64_point_is_aligned): Likewise.
8443 (aarch64_align_watchpoint): Likewise.
8444 (aarch64_linux_set_debug_regs):
8445 (aarch64_dr_state_insert_one_point): Likewise.
8446 (aarch64_dr_state_remove_one_point): Likewise.
8447 (aarch64_handle_breakpoint): Likewise.
8448 (aarch64_handle_aligned_watchpoint): Likewise.
8449 (aarch64_handle_unaligned_watchpoint): Likewise.
8450 (aarch64_handle_watchpoint): Likewise.
8452 2015-07-17 Yao Qi <yao.qi@linaro.org>
8454 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8455 and don't aarch64_get_debug_reg_state. All callers update.
8456 (aarch64_handle_aligned_watchpoint): Likewise.
8457 (aarch64_handle_unaligned_watchpoint): Likewise.
8458 (aarch64_handle_watchpoint): Likewise.
8459 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8460 (aarch64_remove_point): Likewise.
8462 2015-07-17 Yao Qi <yao.qi@linaro.org>
8464 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8466 (aarch64_handle_unaligned_watchpoint): Likewise.
8468 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8470 Revert the previous 3 commits:
8471 Move gdb_regex* to common/
8472 Move linux_find_memory_regions_full & co.
8473 gdbserver build-id attribute generator
8475 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8476 Jan Kratochvil <jan.kratochvil@redhat.com>
8478 gdbserver build-id attribute generator.
8479 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8480 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8481 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8483 (get_dynamic): Use find_pdhr to traverse program headers.
8484 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8485 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8486 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8487 (get_hex_build_id): New.
8488 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8489 to reply XML document.
8491 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8492 Jan Kratochvil <jan.kratochvil@redhat.com>
8494 * target.c: Include target/target-utils.h and fcntl.h.
8495 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8496 (target_fileio_read_stralloc): New functions.
8498 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8500 * Makefile.in (OBS): Add gdb_regex.o.
8502 * config.in: Rebuilt.
8503 * configure: Rebuilt.
8505 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8506 Jan Kratochvil <jan.kratochvil@redhat.com>
8508 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8509 * Makefile.in (OBS): Add target-utils.o.
8510 (linux-maps.o, target-utils.o): New.
8511 * configure.srv (srv_linux_obj): Add linux-maps.o.
8513 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8515 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8517 (the_low_target): Install it.
8519 2015-07-14 Pedro Alves <palves@redhat.com>
8521 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8522 Instead, ignore ECHILD, and throw an error for other errnos.
8524 2015-07-10 Pedro Alves <palves@redhat.com>
8526 * event-loop.c (struct callback_event) <data>: Change type to
8527 gdb_client_data instance instead of gdb_client_data pointer.
8528 (append_callback_event): Adjust.
8530 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8532 * linux-aarch64-low.c: Add comments for each linux_target_ops
8533 method. Remove comments already covered in target_ops and
8534 linux_target_ops definitions.
8535 (the_low_target): Add comments for each unimplemented method.
8537 2015-07-09 Yao Qi <yao.qi@linaro.org>
8539 * linux-aarch64-low.c (aarch64_regmap): Remove.
8540 (aarch64_usrregs_info): Remove.
8541 (regs_info): Set field usrregs to NULL.
8543 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8545 * linux-low.c: Include "rsp-low.h"
8546 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8547 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8548 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8549 (handle_btrace_enable_pt): New.
8550 (handle_btrace_general_set): Support "pt".
8551 (handle_btrace_conf_general_set): Support "pt:size".
8553 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8555 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8558 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8560 * linux-aarch64-low.c: Remove comment about endianness.
8561 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8562 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8565 2015-06-24 Gary Benson <gbenson@redhat.com>
8567 * linux-i386-ipa.c (stdint.h): Do not include.
8568 * lynx-i386-low.c (stdint.h): Likewise.
8569 * lynx-ppc-low.c (stdint.h): Likewise.
8570 * mem-break.c (stdint.h): Likewise.
8571 * thread-db.c (stdint.h): Likewise.
8572 * tracepoint.c (stdint.h): Likewise.
8573 * win32-low.c (stdint.h): Likewise.
8575 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8577 * server.c (write_qxfer_response): Update call to
8578 remote_escape_output.
8580 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8581 Jan Kratochvil <jan.kratochvil@redhat.com>
8583 Merge multiple hex conversions.
8584 * gdbreplay.c (tohex): Rename to 'fromhex'.
8585 (logchar): Use fromhex.
8587 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8589 * server.c (handle_qxfer_libraries): Set `version' attribute for
8592 2015-06-10 Gary Benson <gbenson@redhat.com>
8594 * target.h (struct target_ops) <multifs_open>: New field.
8595 <multifs_unlink>: Likewise.
8596 <multifs_readlink>: Likewise.
8597 * linux-low.c (nat/linux-namespaces.h): New include.
8598 (linux_target_ops): Initialize the_target->multifs_open,
8599 the_target->multifs_unlink and the_target->multifs_readlink.
8600 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8601 * hostio.c (hostio_fs_pid): New static variable.
8602 (hostio_handle_new_gdb_connection): New function.
8603 (handle_setfs): Likewise.
8604 (handle_open): Use the_target->multifs_open as appropriate.
8605 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8606 (handle_readlink): Use the_target->multifs_readlink as
8608 (handle_vFile): Handle vFile:setfs packets.
8609 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8610 after target_handle_new_gdb_connection.
8612 2015-06-10 Gary Benson <gbenson@redhat.com>
8614 * configure.ac (AC_CHECK_FUNCS): Add setns.
8615 * config.in: Regenerate.
8616 * configure: Likewise.
8617 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8618 (linux-namespaces.o): New rule.
8619 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8621 2015-06-09 Gary Benson <gbenson@redhat.com>
8623 * hostio.c (handle_open): Process mode argument with
8624 fileio_to_host_mode.
8626 2015-06-01 Yao Qi <yao.qi@linaro.org>
8628 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8629 * linux-x86-low.c: Likewise.
8631 2015-05-28 Don Breazeal <donb@codesourcery.com>
8633 * linux-low.c (handle_extended_wait): Initialize
8634 thread_info.last_resume_kind for new fork children.
8636 2015-05-15 Pedro Alves <palves@redhat.com>
8638 * target.h (target_handle_new_gdb_connection): Rewrite using if
8639 wrapped in do/while.
8641 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8643 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8644 * configure, config.in: Regenerate.
8645 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8648 2015-05-12 Don Breazeal <donb@codesourcery.com>
8650 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8651 PTRACE_EVENT_VFORK_DONE.
8652 (linux_low_ptrace_options, extended_event_reported): Add vfork
8654 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8655 and "vforkdone" for RSP 'T' Stop Reply Packet.
8656 * server.h (report_vfork_events): Declare
8659 2015-05-12 Don Breazeal <donb@codesourcery.com>
8661 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8662 (the_low_target) <new_fork>: Initialize new member.
8663 * linux-arm-low.c (arm_new_fork): New function.
8664 (the_low_target) <new_fork>: Initialize new member.
8665 * linux-low.c (handle_extended_wait): Call new target function
8667 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8668 * linux-mips-low.c (mips_add_watchpoint): New function
8669 extracted from mips_insert_point.
8670 (the_low_target) <new_fork>: Initialize new member.
8671 (mips_linux_new_fork): New function.
8672 (mips_insert_point): Call mips_add_watchpoint.
8673 * linux-x86-low.c (x86_linux_new_fork): New function.
8674 (the_low_target) <new_fork>: Initialize new member.
8676 2015-05-12 Don Breazeal <donb@codesourcery.com>
8678 * linux-low.c (handle_extended_wait): Implement return value,
8679 rename argument 'event_child' to 'event_lwp', handle
8680 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8681 (linux_low_ptrace_options): New function.
8682 (linux_low_filter_event): Call linux_low_ptrace_options,
8683 use different argument fo linux_enable_event_reporting,
8684 use return value from handle_extended_wait.
8685 (extended_event_reported): New function.
8686 (linux_wait_1): Call extended_event_reported and set
8687 status to report fork events.
8688 (linux_write_memory): Add pid to debug message.
8689 (reset_lwp_ptrace_options_callback): New function.
8690 (linux_handle_new_gdb_connection): New function.
8691 (linux_target_ops): Initialize new structure member.
8692 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8693 * lynx-low.c: Initialize new structure member.
8694 * remote-utils.c (prepare_resume_reply): Implement stop reason
8695 "fork" for "T" stop message.
8696 * server.c (handle_query): Call handle_new_gdb_connection.
8697 * server.h (report_fork_events): Declare global flag.
8698 * target.h (struct target_ops) <handle_new_gdb_connection>:
8700 (target_handle_new_gdb_connection): New macro.
8701 * win32-low.c: Initialize new structure member.
8703 2015-05-12 Don Breazeal <donb@codesourcery.com>
8705 * mem-break.c (APPEND_TO_LIST): Define macro.
8706 (clone_agent_expr): New function.
8707 (clone_one_breakpoint): New function.
8708 (clone_all_breakpoints): New function.
8709 * mem-break.h: Declare new functions.
8711 2015-05-12 Don Breazeal <donb@codesourcery.com>
8713 * linux-low.c (linux_supports_fork_events): New function.
8714 (linux_supports_vfork_events): New function.
8715 (linux_target_ops): Initialize new structure members.
8716 (initialize_low): Call linux_check_ptrace_features.
8717 * lynx-low.c (lynx_target_ops): Initialize new structure
8719 * server.c (report_fork_events, report_vfork_events):
8721 (handle_query): Add new features to qSupported packet and
8723 (captured_main): Initialize new global variables.
8724 * target.h (struct target_ops) <supports_fork_events>:
8726 <supports_vfork_events>: New member.
8727 (target_supports_fork_events): New macro.
8728 (target_supports_vfork_events): New macro.
8729 * win32-low.c (win32_target_ops): Initialize new structure
8732 2015-05-12 Gary Benson <gbenson@redhat.com>
8734 * server.c (handle_qxfer_exec_file): Use current process
8737 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8739 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8740 Remove HAVE_PTRACE_GETREGS conditionals.
8741 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8742 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8744 2015-05-08 Yao Qi <yao.qi@linaro.org>
8746 * linux-low.c (linux_supports_conditional_breakpoints): New
8748 (linux_target_ops): Install new target method.
8749 * lynx-low.c (lynx_target_ops): Install NULL hook for
8750 supports_conditional_breakpoints.
8751 * nto-low.c (nto_target_ops): Likewise.
8752 * spu-low.c (spu_target_ops): Likewise.
8753 * win32-low.c (win32_target_ops): Likewise.
8754 * server.c (handle_query): Check
8755 target_supports_conditional_breakpoints.
8756 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8758 (target_supports_conditional_breakpoints): New macro.
8760 2015-05-06 Pedro Alves <palves@redhat.com>
8763 * server.c (start_inferior): If the process exits, mourn it.
8765 2015-04-21 Gary Benson <gbenson@redhat.com>
8767 * hostio.c (fileio_open_flags_to_host): Factored out to
8768 fileio_to_host_openflags in common/fileio.c. Single use
8771 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8773 * linux-xtensa-low.c (xtensa_fill_gregset)
8774 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8777 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8779 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8780 (regs_info): Replace usrregs pointer with NULL.
8782 2015-04-17 Gary Benson <gbenson@redhat.com>
8784 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8785 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8786 * server.c (handle_qxfer_exec_file): New function.
8787 (qxfer_packets): Add exec-file entry.
8788 (handle_query): Report qXfer:exec-file:read as supported packet.
8790 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8792 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8794 2015-04-09 Gary Benson <gbenson@redhat.com>
8796 * hostio-errno.c (errno_to_fileio_error): Remove function.
8797 Update caller to use remote_fileio_to_fio_error.
8799 2015-04-09 Yao Qi <yao.qi@linaro.org>
8801 * linux-low.c (linux_insert_point): Call
8802 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8803 (linux_remove_point): Call remove_memory_breakpoint if type is
8805 * linux-x86-low.c (x86_insert_point): Don't call
8806 insert_memory_breakpoint.
8807 (x86_remove_point): Don't call remove_memory_breakpoint.
8809 2015-04-01 Pedro Alves <palves@redhat.com>
8810 Cleber Rosa <crosa@redhat.com>
8812 * server.c (gdbserver_usage): Reorganize and extend the usage
8815 2015-03-24 Pedro Alves <palves@redhat.com>
8817 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8818 output. Also dump TRAP_TRACE.
8819 (linux_low_filter_event): In debug output, distinguish a
8820 resume_stop SIGSTOP from a delayed SIGSTOP.
8822 2015-03-24 Gary Benson <gbenson@redhat.com>
8824 * linux-x86-low.c (x86_linux_new_thread): Moved to
8826 (x86_linux_prepare_to_resume): Likewise.
8828 2015-03-24 Gary Benson <gbenson@redhat.com>
8830 * Makefile.in (x86-linux-dregs.o): New rule.
8831 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8832 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8833 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8834 (x86_linux_dr_get): Likewise.
8835 (x86_linux_dr_set): Likewise.
8836 (update_debug_registers_callback): Likewise.
8837 (x86_linux_dr_set_addr): Likewise.
8838 (x86_linux_dr_get_addr): Likewise.
8839 (x86_linux_dr_set_control): Likewise.
8840 (x86_linux_dr_get_control): Likewise.
8841 (x86_linux_dr_get_status): Likewise.
8842 (x86_linux_update_debug_registers): Likewise.
8844 2015-03-24 Gary Benson <gbenson@redhat.com>
8846 * linux-x86-low.c (x86_linux_update_debug_registers):
8847 New function, factored out from...
8848 (x86_linux_prepare_to_resume): ...this.
8850 2015-03-24 Gary Benson <gbenson@redhat.com>
8852 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8853 (x86_linux_dr_set): Likewise.
8854 (update_debug_registers_callback): Likewise.
8855 (x86_linux_dr_set_addr): Likewise.
8856 (x86_linux_dr_get_addr): Likewise.
8857 (x86_linux_dr_set_control): Likewise.
8858 (x86_linux_dr_get_control): Likewise.
8859 (x86_linux_dr_get_status): Likewise.
8860 (x86_linux_prepare_to_resume): Likewise.
8862 2015-03-24 Gary Benson <gbenson@redhat.com>
8864 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8865 Use perror_with_name. Pass string through gettext.
8866 (x86_linux_dr_set): Likewise.
8868 2015-03-24 Gary Benson <gbenson@redhat.com>
8870 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8871 (x86_linux_dr_set_addr): ...this.
8872 (x86_dr_low_get_addr): Rename to...
8873 (x86_linux_dr_get_addr): ...this.
8874 (x86_dr_low_set_control): Rename to...
8875 (x86_linux_dr_set_control): ...this.
8876 (x86_dr_low_get_control): Rename to...
8877 (x86_linux_dr_get_control): ...this.
8878 (x86_dr_low_get_status): Rename to...
8879 (x86_linux_dr_get_status): ...this.
8880 (x86_dr_low): Update with new function names.
8882 2015-03-24 Gary Benson <gbenson@redhat.com>
8884 * Makefile.in (x86-linux.o): New rule.
8885 * configure.srv: Add x86-linux.o to relevant targets.
8886 * linux-low.c (lwp_set_arch_private_info): New function.
8887 (lwp_arch_private_info): Likewise.
8888 * linux-x86-low.c: Include nat/x86-linux.h.
8889 (arch_lwp_info): Removed structure.
8890 (update_debug_registers_callback):
8891 Use lwp_set_debug_registers_changed.
8892 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8893 and lwp_set_debug_registers_changed.
8894 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8896 2015-03-24 Gary Benson <gbenson@redhat.com>
8898 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8899 * linux-arm-low.c (arm_new_thread): Likewise.
8900 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8901 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8902 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8903 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8905 2015-03-24 Gary Benson <gbenson@redhat.com>
8907 * linux-low.c (ptid_of_lwp): New function.
8908 (lwp_is_stopped): Likewise.
8909 (lwp_stop_reason): Likewise.
8910 * linux-x86-low.c (update_debug_registers_callback):
8912 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8915 2015-03-24 Gary Benson <gbenson@redhat.com>
8917 * linux-low.h (linux_stop_lwp): Remove declaration.
8919 2015-03-24 Gary Benson <gbenson@redhat.com>
8921 * linux-low.h: Include nat/linux-nat.h.
8922 * linux-low.c (iterate_over_lwps_args): New structure.
8923 (iterate_over_lwps_filter): New function.
8924 (iterate_over_lwps): Likewise.
8925 * linux-x86-low.c (update_debug_registers_callback):
8926 Update signature to what iterate_over_lwps expects.
8927 Remove PID check that iterate_over_lwps now performs.
8928 (x86_dr_low_set_addr): Use iterate_over_lwps.
8929 (x86_dr_low_set_control): Likewise.
8931 2015-03-24 Gary Benson <gbenson@redhat.com>
8933 * linux-x86-low.c (x86_debug_reg_state): New function.
8934 (x86_linux_prepare_to_resume): Use the above.
8936 2015-03-24 Gary Benson <gbenson@redhat.com>
8938 * linux-low.c (current_lwp_ptid): New function.
8939 * linux-x86-low.c: Include nat/linux-nat.h.
8940 (x86_dr_low_get_addr): Use current_lwp_ptid.
8941 (x86_dr_low_get_control): Likewise.
8942 (x86_dr_low_get_status): Likewise.
8944 2015-03-20 Pedro Alves <palves@redhat.com>
8946 * tracepoint.c (cmd_qtstatus): Make "str" const.
8948 2015-03-20 Pedro Alves <palves@redhat.com>
8950 * server.c (handle_general_set): Make "req_str" const.
8952 2015-03-19 Pedro Alves <palves@redhat.com>
8954 * linux-low.c (linux_resume_one_lwp): Rename to ...
8955 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8956 instead call perror_with_name.
8957 (check_ptrace_stopped_lwp_gone): New function.
8958 (linux_resume_one_lwp): Reimplement as wrapper around
8959 linux_resume_one_lwp_throw that swallows errors if the LWP is
8962 2015-03-19 Pedro Alves <palves@redhat.com>
8964 * linux-low.c (count_events_callback, select_event_lwp_callback):
8965 No longer check whether the thread has resume_stop as last resume
8968 2015-03-19 Pedro Alves <palves@redhat.com>
8970 * linux-low.c (count_events_callback, select_event_lwp_callback):
8971 Use the lwp's status_pending_p field, not the thread's.
8973 2015-03-19 Pedro Alves <palves@redhat.com>
8975 * linux-low.c (select_event_lwp_callback): Update comments to
8976 no longer mention SIGTRAP.
8978 2015-03-18 Gary Benson <gbenson@redhat.com>
8980 * server.c (handle_query): Do not report vFile:fstat as supported.
8982 2015-03-11 Gary Benson <gbenson@redhat.com>
8984 * hostio.c (sys/types.h): New include.
8985 (sys/stat.h): Likewise.
8986 (common-remote-fileio.h): Likewise.
8987 (handle_fstat): New function.
8988 (handle_vFile): Handle vFile:fstat packets.
8990 2015-03-11 Gary Benson <gbenson@redhat.com>
8992 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8993 struct stat.st_blocks and struct stat.st_blksize.
8994 * configure: Regenerate.
8995 * config.in: Likewise.
8996 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8997 (OBS): Add common-remote-fileio.o.
8998 (common-remote-fileio.o): New rule.
9000 2015-03-09 Pedro Alves <palves@redhat.com>
9002 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
9003 'struct sockaddr' pointer in 'accept' call.
9005 2015-03-09 Pedro Alves <palves@redhat.com>
9008 2015-03-07 Pedro Alves <palves@redhat.com>
9009 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9010 or <winsock2.h> here. Instead include "gdb_socket.h".
9011 (remote_open): Use union gdb_sockaddr_u.
9012 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9013 or <winsock2.h> here. Instead include "gdb_socket.h".
9014 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9015 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9017 (init_named_socket, gdb_agent_helper_thread): Use union
9020 2015-03-07 Pedro Alves <palves@redhat.com>
9022 * configure.ac (build_warnings): Move
9023 -Wdeclaration-after-statement to the C-specific set.
9024 * configure: Regenerate.
9026 2015-03-07 Pedro Alves <palves@redhat.com>
9028 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9029 or <winsock2.h> here. Instead include "gdb_socket.h".
9030 (remote_open): Use union gdb_sockaddr_u.
9031 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9032 or <winsock2.h> here. Instead include "gdb_socket.h".
9033 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9034 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9036 (init_named_socket, gdb_agent_helper_thread): Use union
9039 2015-03-07 Pedro Alves <palves@redhat.com>
9041 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
9044 2015-03-06 Yao Qi <yao.qi@linaro.org>
9046 * linux-aarch64-low.c (aarch64_insert_point): Use
9047 show_debug_regs as a boolean.
9048 (aarch64_remove_point): Likewise.
9050 2015-03-05 Pedro Alves <palves@redhat.com>
9052 * lynx-low.c (lynx_target_ops): Install NULL hooks for
9053 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9054 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
9055 * nto-low.c (nto_target_ops): Likewise.
9056 * spu-low.c (spu_target_ops): Likewise.
9057 * win32-low.c (win32_target_ops): Likewise.
9059 2015-03-04 Pedro Alves <palves@redhat.com>
9061 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9062 Decide whether a breakpoint triggered based on the SIGTRAP's
9064 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9065 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9066 (linux_low_filter_event): Check for breakpoints before checking
9068 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9070 (linux_stopped_by_sw_breakpoint)
9071 (linux_supports_stopped_by_sw_breakpoint)
9072 (linux_stopped_by_hw_breakpoint)
9073 (linux_supports_stopped_by_hw_breakpoint): New functions.
9074 (linux_target_ops): Install new target methods.
9076 2015-03-04 Pedro Alves <palves@redhat.com>
9078 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9079 * server.c (swbreak_feature, hwbreak_feature): New globals.
9080 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9081 (captured_main): Clear swbreak_feature and hwbreak_feature.
9082 * server.h (swbreak_feature, hwbreak_feature): Declare.
9083 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9084 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9085 supports_stopped_by_hw_breakpoint>: New fields.
9086 (target_supports_stopped_by_sw_breakpoint)
9087 (target_stopped_by_sw_breakpoint)
9088 (target_supports_stopped_by_hw_breakpoint)
9089 (target_stopped_by_hw_breakpoint): Declare.
9091 2015-03-04 Pedro Alves <palves@redhat.com>
9093 enum lwp_stop_reason -> enum target_stop_reason
9094 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9095 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9096 (linux_wait_1, stuck_in_jump_pad_callback)
9097 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9098 (linux_stopped_by_watchpoint):
9099 * linux-low.h (enum lwp_stop_reason): Delete.
9100 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9101 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9103 2015-03-04 Yao Qi <yao.qi@linaro.org>
9105 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9107 2015-03-03 Gary Benson <gbenson@redhat.com>
9109 * hostio.c (handle_vFile): Fix prefix lengths.
9111 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9113 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9116 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9118 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9119 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9120 (clean): Add "rm -f" for above C files.
9121 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9122 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9123 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9124 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9125 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9126 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9127 (init_registers_s390x_vx_linux64)
9128 (init_registers_s390x_tevx_linux64)
9129 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9130 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9132 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9133 (s390_store_vxrs_high): New functions.
9134 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9136 (s390_arch_setup): Add logic for selecting one of the new target
9137 descriptions. Activate the new vector regsets if applicable.
9138 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9139 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9140 and init_registers_s390x_tevx_linux64.
9142 2015-03-01 Pedro Alves <palves@redhat.com>
9144 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9147 2015-02-27 Pedro Alves <palves@redhat.com>
9149 * linux-x86-low.c (u_debugreg_offset): New function.
9150 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9152 2015-02-27 Pedro Alves <palves@redhat.com>
9154 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
9155 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
9156 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
9157 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
9158 (ps_lsetfpregs, ps_getpid)
9159 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
9160 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
9161 (ps_lsetxregs, ps_plog): Declare.
9163 2015-02-27 Pedro Alves <palves@redhat.com>
9165 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
9166 IP_AGENT_EXPORT_FUNC.
9167 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
9168 IP_AGENT_EXPORT_FUNC.
9169 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
9170 (IP_AGENT_EXPORT): Delete.
9171 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9172 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9173 (gdb_trampoline_buffer_error, collecting, gdb_collect)
9174 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
9175 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
9176 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
9177 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
9178 (traceframe_read_count, traceframe_write_count)
9179 (traceframes_created, trace_state_variables, get_raw_reg)
9180 (get_trace_state_variable_value, set_trace_state_variable_value)
9181 (ust_loaded, helper_thread_id, cmd_buf): Use
9182 IPA_SYM_EXPORTED_NAME.
9183 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
9184 (tracepoints) Use IP_AGENT_EXPORT_VAR.
9185 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
9186 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9187 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
9188 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
9189 EXTERN_C_PUSH/EXTERN_C_POP.
9190 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
9191 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
9192 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9193 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
9194 (traceframe_write_count, traceframe_read_count)
9195 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
9196 (about_to_request_buffer_space, get_trace_state_variable_value)
9197 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
9198 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
9199 EXTERN_C_PUSH/EXTERN_C_POP.
9200 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
9201 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
9202 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
9203 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9204 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9205 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9206 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
9207 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
9209 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
9210 (IP_AGENT_EXPORT_VAR_DECL): Define.
9212 (gdb_agent_get_raw_reg): Declare.
9214 2015-02-27 Tom Tromey <tromey@redhat.com>
9215 Pedro Alves <palves@redhat.com>
9217 Rename symbols whose names are reserved C++ keywords throughout.
9219 2015-02-27 Pedro Alves <palves@redhat.com>
9221 * Makefile.in (COMPILER): New, get it from autoconf.
9222 (CXX): Get from autoconf instead.
9223 (COMPILE.pre): Use COMPILER.
9224 (CC-LD): Rename to ...
9225 (CC_LD): ... this. Use COMPILER.
9226 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9227 (CXX_FOR_TARGET): Default to g++ instead of gcc.
9228 * acinclude.m4: Include build-with-cxx.m4.
9229 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
9230 Disable -Werror by default if building in C++ mode.
9231 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
9232 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
9233 the C++ compiler. Save/restore CXXFLAGS too.
9234 * configure: Regenerate.
9236 2015-02-27 Pedro Alves <palves@redhat.com>
9238 * acinclude.m4: Include libiberty.m4.
9239 * configure.ac: Call libiberty_INIT.
9240 * config.in, configure: Regenerate.
9242 2015-02-26 Pedro Alves <palves@redhat.com>
9244 * linux-low.c (linux_wait_1): When incrementing the PC past a
9245 program breakpoint always use the_low_target.breakpoint_len as
9246 increment, rather than the maximum between that and
9247 the_low_target.decr_pc_after_break.
9249 2015-02-23 Pedro Alves <palves@redhat.com>
9251 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
9252 thread was doing a step-over; always adjust the PC if
9253 we stepped over a permanent breakpoint.
9254 (linux_wait_1): If we stepped over breakpoint that was on top of a
9255 permanent breakpoint, manually advance the PC past it.
9257 2015-02-23 Pedro Alves <palves@redhat.com>
9259 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
9261 (x86_fill_gregset, x86_store_gregset): Use it when handling
9264 2015-02-20 Pedro Alves <palves@redhat.com>
9266 * thread-db.c: Include "nat/linux-procfs.h".
9267 (thread_db_init): Skip listing new threads if the kernel supports
9268 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
9270 2015-02-20 Pedro Alves <palves@redhat.com>
9272 * linux-low.c (status_pending_p_callback): Use ptid_match.
9274 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
9276 PR breakpoints/16812
9277 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9278 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
9279 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
9281 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9283 PR breakpoints/15956
9284 * tracepoint.c (cmd_qtinit): Add check for current_thread.
9286 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9288 * linux-low.c (linux_low_btrace_conf): Print size.
9289 * server.c (handle_btrace_conf_general_set): New.
9290 (hanle_general_set): Call handle_btrace_conf_general_set.
9291 (handle_query): Report Qbtrace-conf:bts:size as supported.
9293 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9295 * linux-low.c (linux_low_enable_btrace): Update parameters.
9296 (linux_low_btrace_conf): New.
9297 (linux_target_ops)<to_btrace_conf>: Initialize.
9298 * server.c (current_btrace_conf): New.
9299 (handle_btrace_enable): Rename to ...
9300 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
9301 to target_enable_btrace. Update comment. Update users.
9302 (handle_qxfer_btrace_conf): New.
9303 (qxfer_packets): Add btrace-conf entry.
9304 (handle_query): Report qXfer:btrace-conf:read as supported packet.
9305 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
9306 (target_ops)<read_btrace_conf>: New.
9307 (target_enable_btrace): Update parameters.
9308 (target_read_btrace_conf): New.
9310 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9312 * server.c (handle_btrace_general_set): Remove call to
9313 target_supports_btrace.
9314 (supported_btrace_packets): New.
9315 (handle_query): Call supported_btrace_packets.
9316 * target.h: include btrace-common.h.
9317 (btrace_target_info): Removed.
9318 (supports_btrace, target_supports_btrace): Update parameters.
9320 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9322 * Makefile.in (SFILES): Add common/btrace-common.c.
9323 (OBS): Add common/btrace-common.o.
9324 (btrace-common.o): Add build rules.
9325 * linux-low: Include btrace-common.h.
9326 (linux_low_read_btrace): Use struct btrace_data. Call
9327 btrace_data_init and btrace_data_fini.
9329 2015-02-06 Pedro Alves <palves@redhat.com>
9331 * thread-db.c (find_new_threads_callback): Add debug output.
9333 2015-02-04 Pedro Alves <palves@redhat.com>
9335 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
9336 (resume_stopped_resumed_lwps): New function.
9337 (linux_wait_for_event_filtered): Use it.
9339 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9341 * Makefile.in (SFILES): Add linux-personality.c.
9342 (linux-personality.o): New rule.
9343 * configure.srv (srv_linux_obj): Add linux-personality.o to the
9344 list of objects to be built.
9345 * linux-low.c: Include nat/linux-personality.h.
9346 (linux_create_inferior): Remove code to disable address space
9347 randomization (moved to ../nat/linux-personality.c). Create
9348 cleanup to disable address space randomization.
9350 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9352 * Makefile.in (posix-strerror.o): New rule.
9353 (mingw-strerror.o): Likewise.
9354 * configure: Regenerated.
9355 * configure.ac: Source file ../common/common.host. Initialize new
9356 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
9358 2015-01-14 Yao Qi <yao@codesourcery.com>
9360 * Makefile.in (SFILES): Add nat/ppc-linux.c.
9361 (ppc-linux.o): New rule.
9362 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
9363 * configure.ac: AC_CHECK_FUNCS(getauxval).
9364 * config.in: Re-generated.
9365 * configure: Re-generated.
9366 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9367 ppc64_64bit_inferior_p
9369 2015-01-14 Yao Qi <yao@codesourcery.com>
9371 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9372 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9373 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9374 (PT_ORIG_R3, PT_TRAP): Likewise.
9375 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9376 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9377 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9379 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9381 * i387-fp.c (i387_cache_to_xsave): In look over
9382 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9383 zmmh_low_space field by use of zmmh_high_space.
9385 2015-01-09 Pedro Alves <palves@redhat.com>
9387 * linux-low.c (step_over_bkpt): Move higher up in the file.
9388 (handle_extended_wait): Don't store the stop_pc here.
9389 (get_stop_pc): Adjust comments and rename to ...
9390 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9391 stopped for a software breakpoint or hardware breakpoint.
9392 (thread_still_has_status_pending_p): New function.
9393 (status_pending_p_callback): Use
9394 thread_still_has_status_pending_p. If the event is no longer
9395 interesting, resume the LWP.
9396 (handle_tracepoints): Add assert.
9397 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9398 (wstatus_maybe_breakpoint): New function.
9399 (cancel_breakpoint): Delete function.
9400 (check_stopped_by_watchpoint): New function, factored out from
9401 linux_low_filter_event.
9402 (lp_status_maybe_breakpoint): Delete function.
9403 (linux_low_filter_event): Remove filter_ptid argument.
9404 Leave thread group exits pending here. Store the LWP's stop PC.
9405 Always leave events pending.
9406 (linux_wait_for_event_filtered): Pull all events out of the
9407 kernel, and leave them all pending.
9408 (count_events_callback, select_event_lwp_callback): Consider all
9410 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9411 (select_event_lwp): Only give preference to the stepping LWP in
9412 all-stop mode. Adjust comments.
9413 (ignore_event): New function.
9414 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9415 references to cancel_breakpoints. Adjust to renames. Also give
9416 equal priority to all LWPs that have had events in non-stop mode.
9417 If reporting a software breakpoint event, unadjust the LWP's PC.
9418 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9419 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9421 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9422 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9423 (linux_stopped_by_watchpoint): Adjust.
9424 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9425 * linux-low.h (enum lwp_stop_reason): New.
9426 (struct lwp_info) <stop_pc>: Adjust comment.
9427 <stopped_by_watchpoint>: Delete field.
9428 <stop_reason>: New field.
9429 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9430 * mem-break.c (software_breakpoint_inserted_here)
9431 (hardware_breakpoint_inserted_here): New function.
9432 * mem-break.h (software_breakpoint_inserted_here)
9433 (hardware_breakpoint_inserted_here): Declare.
9434 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9435 (cancel_breakpoints): Delete.
9436 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9437 (upload_fast_traceframes): Remove references to
9440 2015-01-09 Pedro Alves <palves@redhat.com>
9442 * thread-db.c (find_new_threads_callback): Ignore thread if the
9443 kernel thread ID is -1.
9445 2015-01-09 Pedro Alves <palves@redhat.com>
9447 * linux-low.c (linux_attach_fail_reason_string): Move to
9448 nat/linux-ptrace.c, and rename.
9449 (linux_attach_lwp): Update comment.
9450 (attach_proc_task_lwp_callback): New function.
9451 (linux_attach): Adjust to rename and use
9452 linux_proc_attach_tgid_threads.
9453 (linux_attach_fail_reason_string): Delete declaration.
9455 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9457 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9458 * server.c (gdbserver_version): Likewise.
9460 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9462 * remote-utils.c: Include ctype.h.
9463 (input_interrupt): Explicitly handle the case when the char
9464 received is the NUL byte. Improve the printing of non-ASCII
9467 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9469 * linux-low.c (linux_low_filter_event): Update call to
9470 linux_enable_event_reporting following the addition of
9471 a new parameter to that function.
9473 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9476 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9477 (AARCH64_FPCR_REGNO): Likewise.
9478 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9479 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9480 (aarch64_store_fpregset): Likewise.
9482 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9484 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9485 Remove FIXME comment about assumption about N.
9487 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9489 * configure.ac: If large-file support is disabled in GDBserver,
9490 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9491 * configure: Regenerate.
9493 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9495 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9496 warning upon ENODATA from ptrace.
9497 * linux-s390-low.c (s390_store_tdb): New.
9498 (s390_regsets): Add regset for NT_S390_TDB.
9500 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9502 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9503 without a fill_function.
9504 * linux-s390-low.c (s390_fill_last_break): Remove.
9505 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9506 (s390_arch_setup): Use regset's size instead of fill_function for
9509 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9511 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9512 the regset's store function when ptrace returned an error.
9513 * regcache.c (get_thread_regcache): Invalidate register cache
9514 before fetching inferior's registers.
9516 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9518 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9519 while-loop as for-loop.
9520 (regsets_store_inferior_registers): Likewise.
9522 2014-11-28 Yao Qi <yao@codesourcery.com>
9524 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9525 * config.in, configure: Re-generate.
9526 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9529 2014-11-21 Yao Qi <yao@codesourcery.com>
9531 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9532 (AC_CHECK_HEADERS): Remove malloc.h.
9533 * configure: Re-generated.
9534 * config.in: Re-generated.
9535 * server.h: Don't include alloca.h and malloc.h.
9536 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9537 Don't include malloc.h.
9539 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9541 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9542 corresponding ERRNO check in same block.
9544 2014-11-12 Pedro Alves <palves@redhat.com>
9546 * server.c (cont_thread): Update comment.
9547 (start_inferior, attach_inferior): No longer clear cont_thread.
9548 (handle_v_cont): No longer set cont_thread.
9549 (captured_main): Clear cont_thread each time a GDB connects.
9551 2014-11-12 Pedro Alves <palves@redhat.com>
9553 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9554 thread, and don't resume all threads if the Hc thread has exited.
9556 2014-11-12 Pedro Alves <palves@redhat.com>
9558 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9559 the process group instead of to a specific LWP.
9561 2014-10-15 Pedro Alves <palves@redhat.com>
9564 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9566 (arm_set_thread_context): Delete.
9567 (the_low_target): Adjust.
9568 * win32-i386-low.c (debug_registers_changed)
9569 (debug_registers_used): Delete.
9570 (update_debug_registers_callback): New function.
9571 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9572 needing to update their debug registers.
9573 (win32_get_current_dr): New function.
9574 (x86_dr_low_get_addr, x86_dr_low_get_control)
9575 (x86_dr_low_get_status): Fetch the debug register from the thread
9577 (i386_initial_stuff): Adjust.
9578 (i386_get_thread_context): Remove current_event parameter. Don't
9579 clear debug_registers_changed nor copy DR values to
9581 (i386_set_thread_context): Delete.
9582 (i386_prepare_to_resume): New function.
9583 (i386_thread_added): Mark the thread as needing to update irs
9585 (the_low_target): Remove i386_set_thread_context and install
9586 i386_prepare_to_resume.
9587 * win32-low.c (win32_get_thread_context): Adjust.
9588 (win32_set_thread_context): Use SetThreadContext
9590 (win32_prepare_to_resume): New function.
9591 (win32_require_context): New function, factored out from ...
9592 (thread_rec): ... this.
9593 (continue_one_thread): Call win32_prepare_to_resume on each thread
9594 we're about to continue.
9595 (win32_resume): Call win32_prepare_to_resume on the event thread.
9596 * win32-low.h (struct win32_thread_info)
9597 <debug_registers_changed>: New field.
9598 (struct win32_target_ops): Change prototype of set_thread_context,
9599 delete set_thread_context and add prepare_to_resume.
9600 (win32_require_context): New declaration.
9602 2014-10-08 Gary Benson <gbenson@redhat.com>
9604 * server.h: Do not include common-exceptions.h.
9606 2014-10-08 Gary Benson <gbenson@redhat.com>
9608 * server.h: Do not include cleanups.h.
9610 2014-09-30 James Hogan <james.hogan@imgtec.com>
9612 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9615 2014-09-23 Yao Qi <yao@codesourcery.com>
9617 * linux-low.c (lp_status_maybe_breakpoint): New function.
9618 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9619 (count_events_callback): Likewise.
9620 (select_event_lwp_callback): Likewise.
9621 (cancel_breakpoints_callback): Likewise.
9623 2014-09-19 Don Breazeal <donb@codesourcery.com>
9625 * linux-low.c (handle_extended_wait): Call
9626 linux_ptrace_get_extended_event.
9627 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9628 linux_is_extended_waitstatus.
9630 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9632 * Makefile.in (CPPFLAGS): Define.
9633 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9634 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9636 2014-09-16 Gary Benson <gbenson@redhat.com>
9638 * inferiors.h (current_inferior): Renamed as...
9639 (current_thread): New variable. All uses updated.
9640 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9641 (maybe_move_out_of_jump_pad): Likewise.
9642 (cancel_breakpoint): Likewise.
9643 (linux_low_filter_event): Likewise.
9644 (wait_for_sigstop): Likewise.
9645 (linux_resume_one_lwp): Likewise.
9646 (need_step_over_p): Likewise.
9647 (start_step_over): Likewise.
9648 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9649 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9650 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9651 and save_inferior as saved_thread.
9652 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9654 (regcache_invalidate_thread): Likewise.
9655 * remote-utils.c (prepare_resume_reply): Likewise.
9656 * thread-db.c (thread_db_get_tls_address): Likewise.
9657 (disable_thread_event_reporting): Likewise.
9658 (remove_thread_event_breakpoints): Likewise.
9659 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9661 * target.h (set_desired_inferior): Renamed as...
9662 (set_desired_thread): New declaration. All uses updated.
9663 * server.c (myresume): Updated comment to reference thread instead
9665 (handle_serial_event): Likewise.
9666 (handle_target_event): Likewise.
9668 2014-09-12 Tom Tromey <tromey@redhat.com>
9669 Gary Benson <gbenson@redhat.com>
9671 * regcache.h: Include common-regcache.h.
9672 (regcache_read_pc): Don't declare.
9673 * regcache.c (get_thread_regcache_for_ptid): New function.
9675 2014-09-11 Tom Tromey <tromey@redhat.com>
9676 Gary Benson <gbenson@redhat.com>
9678 * symbol.c: New file.
9679 * Makefile.in (SFILES): Add symbol.c.
9680 (OBS): Add symbol.o.
9682 2014-09-11 Gary Benson <gbenson@redhat.com>
9684 * target.c (target_stop_ptid, target_continue_ptid): New
9687 2014-09-11 Tom Tromey <tromey@redhat.com>
9688 Gary Benson <gbenson@redhat.com>
9690 * target.h: Include target/target.h.
9691 * target.c (target_read_memory, target_read_uint32)
9692 (target_write_memory): New functions.
9694 2014-09-11 Gary Benson <gbenson@redhat.com>
9696 * server.h (debug_hw_points): Don't declare.
9697 * server.c (debug_hw_points): Don't define. Replace all uses
9698 with show_debug_regs.
9699 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9700 all uses with show_debug_regs.
9702 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9704 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9705 endianness into account.
9706 (ppc_supply_ptrace_register): Likewise.
9708 2014-09-03 James Hogan <james.hogan@imgtec.com>
9710 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9711 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9713 2014-09-03 Gary Benson <gbenson@redhat.com>
9715 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9716 ALL_DEBUG_ADDRESS_REGISTERS.
9718 2014-09-02 Gary Benson <gbenson@redhat.com>
9720 * i386-low.h: Renamed as...
9721 * x86-low.h: New file. All type, function and variable name
9722 prefixes changed from "i386_" to "x86_". All references updated.
9723 * i386-low.c: Renamed as...
9724 * x86-low.c: New file. All type, function and variable name
9725 prefixes changed from "i386_" to "x86_". All references updated.
9727 2014-09-02 Gary Benson <gbenson@redhat.com>
9729 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9730 (x86_linux_new_thread): Likewise.
9732 2014-08-29 Gary Benson <gbenson@redhat.com>
9734 * server.h (setjmp.h): Do not include.
9735 (toplevel): Do not declare.
9736 (common-exceptions.h): Include.
9737 (cleanups.h): Likewise.
9738 * server.c (toplevel): Do not define.
9739 (exit_code): New static global.
9740 (detach_or_kill_for_exit_cleanup): New function.
9741 (main): New function. Original main renamed to...
9742 (captured_main): New function.
9743 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9745 2014-08-29 Gary Benson <gbenson@redhat.com>
9747 * Makefile.in (SFILES): Add common/common-exceptions.c.
9748 (OBS): Add common-exceptions.o.
9749 (common-exceptions.o): New rule.
9750 * utils.c (prepare_to_throw_exception): New function.
9752 2014-08-29 Gary Benson <gbenson@redhat.com>
9754 * config.in: Regenerate.
9755 * configure: Likewise.
9757 2014-08-29 Gary Benson <gbenson@redhat.com>
9759 * Makefile.in (SFILES): Add common/cleanups.c.
9761 (cleanups.o): New rule.
9763 2014-08-29 Gary Benson <gbenson@redhat.com>
9765 * utils.c (internal_vwarning): New function.
9767 2014-08-28 Gary Benson <gbenson@redhat.com>
9769 * utils.h (fatal): Remove declaration.
9770 * utils.c (fatal): Remove function.
9772 2014-08-28 Gary Benson <gbenson@redhat.com>
9774 * tracepoint.c (gdb_agent_init): Replace fatal with
9776 (initialize_tracepoint): Likewise.
9778 2014-08-28 Gary Benson <gbenson@redhat.com>
9780 * remote-utils.c (remote_prepare): Replace fatal with error.
9782 2014-08-28 Gary Benson <gbenson@redhat.com>
9784 * linux-low.c (linux_async): Replace fatal with warning.
9786 (linux_start_non_stop): Return -1 if linux_async failed.
9788 2014-08-28 Gary Benson <gbenson@redhat.com>
9790 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9792 (i386_dr_low_get_addr): Remove vague comment.
9793 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9796 2014-08-28 Gary Benson <gbenson@redhat.com>
9798 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9799 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9801 (linux_resume_one_lwp): Likewise.
9802 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9804 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9805 with internal_error.
9806 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9807 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9808 (find_register_by_name): Replace fatal with internal_error.
9809 (find_regno): Likewise.
9810 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9811 * thread-db.c (thread_db_create_event): Likewise.
9812 (thread_db_load_search): Likewise.
9813 (try_thread_db_load_1): Likewise.
9814 * tracepoint.c (get_jump_space_head): Replace fatal with
9816 (claim_trampoline_space): Likewise.
9817 (have_fast_tracepoint_trampoline_buffer): Likewise.
9818 (cmd_qtstart): Likewise.
9819 (stop_tracing): Likewise.
9820 (fast_tracepoint_collecting): Likewise.
9821 (target_malloc): Likewise.
9822 (download_tracepoint): Likewise.
9823 (download_trace_state_variables): Replace check with gdb_assert.
9824 (upload_fast_traceframes): Replace fatal with internal_error.
9826 2014-08-19 Tom Tromey <tromey@redhat.com>
9827 Gary Benson <gbenson@redhat.com>
9829 * Makefile.in (SFILES): Add common/common-debug.c.
9830 (OBS): Add common-debug.o.
9831 (common-debug.o): New rule.
9832 * debug.h (debug_printf): Don't declare.
9833 * debug.c (debug_printf): Renamed and rewritten as...
9834 (debug_vprintf): New function.
9836 2014-08-19 Gary Benson <gbenson@redhat.com>
9838 * utils.h: Do not include print-utils.h.
9840 2014-08-19 Tom Tromey <tromey@redhat.com>
9841 Gary Benson <gbenson@redhat.com>
9843 * server.h: Add static assertion.
9844 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9846 2014-08-19 Tom Tromey <tromey@redhat.com>
9847 Gary Benson <gbenson@redhat.com>
9849 * Makefile.in (SFILES): Add common/errors.c.
9850 (OBS): Add errors.o.
9851 (IPA_OBS): Add errors-ipa.o.
9852 (errors.o): New rule.
9853 (errors-ipa.o): Likewise.
9854 * utils.h (perror_with_name, error, warning): Don't declare.
9855 * utils.c (warning): Renamed and rewritten as...
9856 (vwarning): New function.
9857 (error): Renamed and rewritten as...
9858 (verror): New function.
9859 (internal_error): Renamed and rewritten as...
9860 (internal_verror): New function.
9862 2014-08-07 Gary Benson <gbenson@redhat.com>
9864 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9865 * configure: Regenerate.
9866 * config.in: Likewise.
9867 * server.h: Do not include errno.h.
9868 * event-loop.c: Likewise.
9869 * hostio-errno.c: Likewise.
9870 * linux-low.c: Likewise.
9871 * remote-utils.c: Likewise.
9872 * spu-low.c: Likewise.
9873 * utils.c: Likewise.
9874 * gdbreplay.c: Unconditionally include errno.h.
9876 2014-08-07 Gary Benson <gbenson@redhat.com>
9878 * server.h: Do not include string.h.
9879 * event-loop.c: Likewise.
9880 * linux-low.c: Likewise.
9881 * regcache.c: Likewise.
9882 * remote-utils.c: Likewise.
9883 * spu-low.c: Likewise.
9884 * utils.c: Likewise.
9886 2014-08-07 Gary Benson <gbenson@redhat.com>
9888 * server.h: Do not include gdb_assert.h.
9890 2014-08-07 Gary Benson <gbenson@redhat.com>
9892 * server.h: Do not include common-utils.h.
9894 2014-08-07 Gary Benson <gbenson@redhat.com>
9896 * server.h: Do not include ptid.h.
9897 * notif.h: Likewise.
9899 2014-08-07 Gary Benson <gbenson@redhat.com>
9901 * server.h: Do not include gdb_locale.h.
9903 2014-08-07 Gary Benson <gbenson@redhat.com>
9905 * server.h: Do not include gdb/signals.h.
9906 * win32-low.c: Likewise.
9908 2014-08-07 Gary Benson <gbenson@redhat.com>
9910 * server.h: Do not include pathmax.h.
9912 2014-08-07 Gary Benson <gbenson@redhat.com>
9914 * server.h: Do not include libiberty.h.
9915 * linux-bfin-low.c: Likewise.
9917 2014-08-07 Gary Benson <gbenson@redhat.com>
9919 * server.h: Do not include ansidecl.h.
9921 2014-08-07 Gary Benson <gbenson@redhat.com>
9923 * linux-x86-low.c: Do not include stddef.h.
9924 * lynx-ppc-low.c: Likewise.
9925 * tracepoint.c: Likewise.
9927 2014-08-07 Gary Benson <gbenson@redhat.com>
9929 * server.h: Do not include stdarg.h.
9930 * nto-low.c: Likewise.
9932 2014-08-07 Gary Benson <gbenson@redhat.com>
9934 * server.h: Do not include stdlib.h.
9935 * inferiors.c: Likewise.
9936 * linux-low.c: Likewise.
9937 * regcache.c: Likewise.
9938 * spu-low.c: Likewise.
9939 * tracepoint.c: Likewise.
9940 * utils.c: Likewise.
9942 2014-08-07 Gary Benson <gbenson@redhat.com>
9944 * server.h: Do not include stdio.h.
9945 * linux-low.c: Likewise.
9946 * remote-utils.c: Likewise.
9947 * spu-low.c: Likewise.
9948 * utils.c: Likewise.
9949 * wincecompat.c: Likewise.
9951 2014-08-06 Gary Benson <gbenson@redhat.com>
9953 * regcache.c (init_register_cache): Move conditionals inside if.
9955 2014-08-06 Gary Benson <gbenson@redhat.com>
9957 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9959 2014-07-31 Gary Benson <gbenson@redhat.com>
9961 * ax.h: Do not include server.h.
9962 * gdbthread.h: Likewise.
9963 * lynx-low.h: Likewise.
9964 * notif.h: Likewise.
9966 2014-07-30 Gary Benson <gbenson@redhat.com>
9968 * server.h: Include common-defs.h.
9969 Do not include config.h or build-gnulib-gdbserver/config.h.
9971 2014-07-30 Gary Benson <gbenson@redhat.com>
9973 * hostio-errno.c: Move server.h to top of includes list.
9974 * inferiors.c: Likewise.
9975 * linux-x86-low.c: Likewise.
9976 * notif.c: Include server.h.
9978 2014-07-24 Tom Tromey <tromey@redhat.com>
9979 Gary Benson <gbenson@redhat.com>
9981 * server.h (CORE_ADDR): Now unsigned.
9983 2014-07-16 Pedro Alves <palves@redhat.com>
9985 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9987 2014-07-15 Pedro Alves <palves@redhat.com>
9989 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9992 2014-07-11 Pedro Alves <palves@redhat.com>
9994 * linux-low.c (kill_wait_lwp): New function, based on
9995 kill_one_lwp_callback, but use my_waitpid directly.
9996 (kill_one_lwp_callback, linux_kill): Use it.
9998 2014-06-23 Pedro Alves <palves@redhat.com>
10000 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
10001 before setting DR0..DR3.
10003 2014-06-20 Gary Benson <gbenson@redhat.com>
10005 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
10006 * configure: Regenerated.
10007 * config.in: Likewise.
10009 2014-06-20 Gary Benson <gbenson@redhat.com>
10011 * Makefile.in (SFILES): Update locations for files moved
10012 from common to nat.
10013 (object file files): Reordered.
10015 2014-06-20 Gary Benson <gbenson@redhat.com>
10017 * i386-low.h (i386_dr_low_can_set_addr): Removed.
10018 (i386_dr_low_set_addr): Likewise.
10019 (i386_dr_low_get_addr): Likewise.
10020 (i386_dr_low_can_set_control): Likewise.
10021 (i386_dr_low_set_control): Likewise.
10022 (i386_dr_low_get_control): Likewise.
10023 (i386_dr_low_get_status): Likewise.
10024 (i386_get_debug_register_length): Likewise.
10025 * linux-x86-low.c (i386_dr_low_set_addr):
10026 Changed signature. Made static.
10027 (i386_dr_low_get_addr): Likewise.
10028 (i386_dr_low_set_control): Likewise.
10029 (i386_dr_low_get_control): Likewise.
10030 (i386_dr_low_get_status): Likewise.
10031 (i386_dr_low): New global variable.
10032 * win32-i386-low.c (i386_dr_low_set_addr):
10033 Changed signature. Made static.
10034 (i386_dr_low_get_addr): Likewise.
10035 (i386_dr_low_set_control): Likewise.
10036 (i386_dr_low_get_control): Likewise.
10037 (i386_dr_low_get_status): Likewise.
10038 (i386_dr_low): New global variable.
10040 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
10042 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
10043 * Makefile.in (AR, AR_FLAGS): Define.
10044 * configure: Regenerate.
10046 2014-06-19 Gary Benson <gbenson@redhat.com>
10048 * Makefile.in (i386-dregs.o): New rule.
10049 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
10050 * i386-low.c (target.h): Remove include.
10051 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
10052 (DR_CONTROL_SHIFT): Likewise.
10053 (DR_CONTROL_SIZE): Likewise.
10054 (DR_RW_EXECUTE): Likewise.
10055 (DR_RW_WRITE): Likewise.
10056 (DR_RW_READ): Likewise.
10057 (DR_RW_IORW): Likewise.
10058 (DR_LEN_1): Likewise.
10059 (DR_LEN_2): Likewise.
10060 (DR_LEN_4): Likewise.
10061 (DR_LEN_8): Likewise.
10062 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10063 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10064 (DR_ENABLE_SIZE): Likewise.
10065 (DR_LOCAL_SLOWDOWN): Likewise.
10066 (DR_GLOBAL_SLOWDOWN): Likewise.
10067 (DR_CONTROL_RESERVED): Likewise.
10068 (I386_DR_CONTROL_MASK): Likewise.
10069 (I386_DR_VACANT): Likewise.
10070 (I386_DR_LOCAL_ENABLE): Likewise.
10071 (I386_DR_GLOBAL_ENABLE): Likewise.
10072 (I386_DR_DISABLE): Likewise.
10073 (I386_DR_SET_RW_LEN): Likewise.
10074 (I386_DR_GET_RW_LEN): Likewise.
10075 (I386_DR_WATCH_HIT): Likewise.
10076 (i386_wp_op_t): Likewise.
10077 (i386_show_dr): Likewise.
10078 (i386_length_and_rw_bits): Likewise.
10079 (i386_insert_aligned_watchpoint): Likewise.
10080 (i386_remove_aligned_watchpoint): Likewise.
10081 (i386_handle_nonaligned_watchpoint): Likewise.
10082 i386_update_inferior_debug_regs(): Likewise.
10083 (i386_dr_insert_watchpoint): Likewise.
10084 (i386_dr_remove_watchpoint): Likewise.
10085 (i386_dr_region_ok_for_watchpoint): Likewise.
10086 (i386_dr_stopped_data_address): Likewise.
10087 (i386_dr_stopped_by_watchpoint): Likewise.
10089 2014-06-19 Gary Benson <gbenson@redhat.com>
10091 * i386-low.c (i386_dr_show): Renamed to
10092 i386_show_dr and made static. All uses updated.
10093 (i386_dr_length_and_rw_bits): Renamed to
10094 i386_length_and_rw_bits and made static.
10096 (i386_dr_insert_aligned_watchpoint): Renamed to
10097 i386_insert_aligned_watchpoint and made static.
10099 (i386_dr_remove_aligned_watchpoint): Renamed to
10100 i386_remove_aligned_watchpoint and made static.
10102 (i386_dr_update_inferior_debug_regs): Renamed to
10103 i386_update_inferior_debug_regs and made static.
10106 2014-06-18 Gary Benson <gbenson@redhat.com>
10108 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10109 (i386_dr_low_can_set_control): Likewise.
10110 (i386_get_debug_register_length): Likewise.
10111 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10112 (i386_dr_low_can_set_control): Likewise.
10113 (i386_get_debug_register_length): Likewise.
10115 2014-06-17 Gary Benson <gbenson@redhat.com>
10117 * i386-low.h (i386-dregs.h): New include.
10118 (DR_FIRSTADDR): Now in i386-dregs.h.
10119 (DR_LASTADDR): Likewise.
10120 (DR_NADDR): Likewise.
10121 (DR_STATUS): Likewise.
10122 (DR_CONTROL): Likewise.
10123 (i386_debug_reg_state): Likewise.
10124 (i386_dr_insert_watchpoint): Likewise.
10125 (i386_dr_remove_watchpoint): Likewise.
10126 (i386_dr_region_ok_for_watchpoint): Likewise.
10127 (i386_dr_stopped_data_address): Likewise.
10128 (i386_dr_stopped_by_watchpoint): Likewise.
10129 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10131 2014-06-18 Gary Benson <gbenson@redhat.com>
10133 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10134 i386_dr_insert_watchpoint.
10135 (i386_low_remove_watchpoint): Renamed to
10136 i386_dr_remove_watchpoint.
10137 (i386_low_region_ok_for_watchpoint): Renamed to
10138 i386_dr_region_ok_for_watchpoint.
10139 (i386_low_stopped_data_address): Renamed to
10140 i386_dr_stopped_data_address.
10141 (i386_low_stopped_by_watchpoint): Renamed to
10142 i386_dr_stopped_by_watchpoint.
10143 * i386-low.c (i386_show_dr): Renamed to
10144 i386_dr_show and made nonstatic. All uses updated.
10145 (i386_length_and_rw_bits): Renamed to
10146 i386_dr_length_and_rw_bits and made nonstatic.
10148 (i386_insert_aligned_watchpoint): Renamed to
10149 i386_dr_insert_aligned_watchpoint and made nonstatic.
10151 (i386_remove_aligned_watchpoint): Renamed to
10152 i386_dr_remove_aligned_watchpoint and made nonstatic.
10154 (i386_update_inferior_debug_regs): Renamed to
10155 i386_dr_update_inferior_debug_regs and made nonstatic.
10157 (i386_low_insert_watchpoint): Renamed to
10158 i386_dr_insert_watchpoint. All uses updated.
10159 (i386_low_remove_watchpoint): Renamed to
10160 i386_dr_remove_watchpoint. All uses updated.
10161 (i386_low_region_ok_for_watchpoint): Renamed to
10162 i386_dr_region_ok_for_watchpoint. All uses updated.
10163 (i386_low_stopped_data_address): Renamed to
10164 i386_dr_stopped_data_address. All uses updated.
10165 (i386_low_stopped_by_watchpoint): Renamed to
10166 i386_dr_stopped_by_watchpoint. All uses updated.
10168 2014-06-18 Gary Benson <gbenson@redhat.com>
10170 * i386-low.c (i386_dr_low_can_set_addr): New macro.
10171 (i386_dr_low_can_set_control): Likewise.
10172 (i386_insert_aligned_watchpoint): New check.
10174 2014-06-18 Gary Benson <gbenson@redhat.com>
10176 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
10179 2014-06-18 Gary Benson <gbenson@redhat.com>
10181 * i386-low.c (i386_length_and_rw_bits): Use internal_error
10182 instead of fatal and error.
10183 (i386_handle_nonaligned_watchpoint): Likewise.
10185 2014-06-18 Gary Benson <gbenson@redhat.com>
10187 * i386-low.c (i386_get_debug_register_length): New macro.
10188 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
10189 (i386_show_dr): Use debug_printf instead of fprintf. Use
10190 phex to format values.
10192 2014-06-18 Gary Benson <gbenson@redhat.com>
10194 * i386-low.h: Comment changes.
10195 * i386-low.c: Likewise.
10197 2014-06-18 Gary Benson <gbenson@redhat.com>
10199 * i386-low.c: Whitespace changes.
10201 2014-06-12 Tom Tromey <tromey@redhat.com>
10203 * utils.c (freeargv): Remove.
10205 2014-06-12 Tom Tromey <tromey@redhat.com>
10207 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
10208 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
10209 (parse_debug_format_options): Likewise.
10210 (gdbserver_usage): Likewise.
10211 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
10212 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
10213 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
10215 ($(LIBGNU)): Depend on libiberty.
10216 (all-lib): Recurse into all subdirs.
10217 (install-only): Invoke "install" target in subdirs.
10218 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
10220 * configure: Rebuild.
10221 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
10222 for vasprintf, vsnprintf, or gettimeofday.
10223 * configure.srv: Don't add safe-ctype.o or lbasename.o to
10226 2014-06-05 Joel Brobecker <brobecker@adacore.com>
10228 * development.sh: Delete.
10229 * Makefile.in (config.status): Adjust dependency on development.sh.
10230 * configure.ac: Adjust development.sh source call.
10231 * configure: Regenerate.
10233 2014-06-02 Pedro Alves <palves@redhat.com>
10235 * ax.c (gdb_free_agent_expr): New function.
10236 * ax.h (gdb_free_agent_expr): New declaration.
10237 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
10239 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
10241 (clear_breakpoint_conditions_and_commands): New function.
10242 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
10243 (clear_breakpoint_conditions_and_commands): New declaration.
10245 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10247 * linux-aarch64-low.c (asm/ptrace.h): Include.
10249 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10251 Fix TLS access for -static -pthread.
10252 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
10253 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
10254 (thread_db_load_search, try_thread_db_load_1): Initialize it.
10256 2014-05-20 Pedro Alves <palves@redhat.com>
10258 * linux-aarch64-low.c (aarch64_insert_point)
10259 (aarch64_remove_point): No longer check whether the type is
10260 supported here. Adjust to new interface.
10261 (the_low_target): Install aarch64_supports_z_point_type as
10262 supports_z_point_type method.
10263 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
10264 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
10265 instead of a Z packet char. Adjust.
10266 (arm_supports_z_point_type): New function.
10267 (arm_insert_point, arm_remove_point): Adjust to new interface.
10268 (the_low_target): Install arm_supports_z_point_type.
10269 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
10270 (cris_insert_point, cris_remove_point): Adjust to new interface.
10271 Don't check whether the type is supported here.
10272 (the_low_target): Install cris_supports_z_point_type.
10273 * linux-low.c (linux_supports_z_point_type): New function.
10274 (linux_insert_point, linux_remove_point): Adjust to new interface.
10275 * linux-low.h (struct linux_target_ops) <insert_point,
10276 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
10277 raw_breakpoint pointer parameter.
10278 <supports_z_point_type>: New method.
10279 * linux-mips-low.c (mips_supports_z_point_type): New function.
10280 (mips_insert_point, mips_remove_point): Adjust to new interface.
10281 Use mips_supports_z_point_type.
10282 (the_low_target): Install mips_supports_z_point_type.
10283 * linux-ppc-low.c (the_low_target): Install NULL as
10284 supports_z_point_type method.
10285 * linux-s390-low.c (the_low_target): Install NULL as
10286 supports_z_point_type method.
10287 * linux-sparc-low.c (the_low_target): Install NULL as
10288 supports_z_point_type method.
10289 * linux-x86-low.c (x86_supports_z_point_type): New function.
10290 (x86_insert_point): Adjust to new insert_point interface. Use
10291 insert_memory_breakpoint. Adjust to new
10292 i386_low_insert_watchpoint interface.
10293 (x86_remove_point): Adjust to remove_point interface. Use
10294 remove_memory_breakpoint. Adjust to new
10295 i386_low_remove_watchpoint interface.
10296 (the_low_target): Install x86_supports_z_point_type.
10297 * lynx-low.c (lynx_target_ops): Install NULL as
10298 supports_z_point_type callback.
10299 * nto-low.c (nto_supports_z_point_type): New.
10300 (nto_insert_point, nto_remove_point): Adjust to new interface.
10301 (nto_target_ops): Install nto_supports_z_point_type.
10302 * mem-break.c: Adjust intro comment.
10303 (struct raw_breakpoint) <raw_type, size>: New fields.
10304 <inserted>: Update comment.
10305 <shlib_disabled>: Delete field.
10306 (enum bkpt_type) <gdb_breakpoint>: Delete value.
10307 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
10308 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
10309 (raw_bkpt_type_to_target_hw_bp_type): New function.
10310 (find_enabled_raw_code_breakpoint_at): New function.
10311 (find_raw_breakpoint_at): New type and size parameters. Use them.
10312 (insert_memory_breakpoint): New function, based off
10313 set_raw_breakpoint_at.
10314 (remove_memory_breakpoint): New function.
10315 (set_raw_breakpoint_at): Reimplement.
10316 (set_breakpoint): New, based on set_breakpoint_at.
10317 (set_breakpoint_at): Reimplement.
10318 (delete_raw_breakpoint): Go through the_target->remove_point
10319 instead of assuming memory breakpoints.
10320 (find_gdb_breakpoint_at): Delete.
10321 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
10322 (find_gdb_breakpoint): New function.
10323 (set_gdb_breakpoint_at): Delete.
10324 (z_type_supported): New function.
10325 (set_gdb_breakpoint_1): New function, loosely based off
10326 set_gdb_breakpoint_at.
10327 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
10328 (delete_gdb_breakpoint_at): Delete.
10329 (delete_gdb_breakpoint_1): New function, loosely based off
10330 delete_gdb_breakpoint_at.
10331 (delete_gdb_breakpoint): New function.
10332 (clear_gdb_breakpoint_conditions): Rename to ...
10333 (clear_breakpoint_conditions): ... this. Don't handle a NULL
10335 (add_condition_to_breakpoint): Make static.
10336 (add_breakpoint_condition): Take a struct breakpoint pointer
10337 instead of an address. Adjust.
10338 (gdb_condition_true_at_breakpoint): Rename to ...
10339 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
10341 (gdb_condition_true_at_breakpoint): Reimplement.
10342 (add_breakpoint_commands): Take a struct breakpoint pointer
10343 instead of an address. Adjust.
10344 (gdb_no_commands_at_breakpoint): Rename to ...
10345 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
10346 parameter. Return true if no breakpoint was found. Change debug
10348 (gdb_no_commands_at_breakpoint): Reimplement.
10349 (run_breakpoint_commands): Rename to ...
10350 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
10351 and change return type to boolean.
10352 (run_breakpoint_commands): New function.
10353 (gdb_breakpoint_here): Also check for Z1 breakpoints.
10354 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
10355 breakpoint. Go through the_target->remove_point instead of
10356 assuming memory breakpoint.
10357 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
10358 software and hardware breakpoints.
10359 (reinsert_raw_breakpoint): Go through the_target->insert_point
10360 instead of assuming memory breakpoint.
10361 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
10362 software and hardware breakpoints.
10363 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
10364 Check both software and hardware breakpoints.
10365 (validate_inserted_breakpoint): Assert the breakpoint is a
10366 software breakpoint. Set the inserted flag to -1 instead of
10367 setting shlib_disabled.
10368 (delete_disabled_breakpoints): Adjust.
10369 (validate_breakpoints): Only validate software breakpoints.
10370 Adjust to inserted flag change.
10371 (check_mem_read, check_mem_write): Skip breakpoint types other
10372 than software breakpoints. Adjust to inserted flag change.
10373 * mem-break.h (enum raw_bkpt_type): New enum.
10374 (raw_breakpoint, struct process_info): Forward declare.
10375 (Z_packet_to_target_hw_bp_type): Delete declaration.
10376 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10377 (set_gdb_breakpoint, delete_gdb_breakpoint)
10378 (clear_breakpoint_conditions): New declarations.
10379 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10380 (breakpoint_inserted_here): Update comment.
10381 (add_breakpoint_condition, add_breakpoint_commands): Replace
10382 address parameter with a breakpoint pointer parameter.
10383 (gdb_breakpoint_here): Update comment.
10384 (delete_gdb_breakpoint_at): Delete.
10385 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10386 * server.c (process_point_options): Take a struct breakpoint
10387 pointer instead of an address. Adjust.
10388 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10389 delete_gdb_breakpoint.
10390 * spu-low.c (spu_target_ops): Install NULL as
10391 supports_z_point_type method.
10392 * target.h: Include mem-break.h.
10393 (struct target_ops) <prepare_to_access_memory>: Update comment.
10394 <supports_z_point_type>: New field.
10395 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10396 instead of a char. Also take a raw breakpoint pointer.
10397 * win32-arm-low.c (the_low_target): Install NULL as
10398 supports_z_point_type.
10399 * win32-i386-low.c (i386_supports_z_point_type): New function.
10400 (i386_insert_point, i386_remove_point): Adjust to new interface.
10401 (the_low_target): Install i386_supports_z_point_type.
10402 * win32-low.c (win32_supports_z_point_type): New function.
10403 (win32_insert_point, win32_remove_point): Adjust to new interface.
10404 (win32_target_ops): Install win32_supports_z_point_type.
10405 * win32-low.h (struct win32_target_ops):
10406 <supports_z_point_type>: New method.
10407 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10408 instead of a char. Also take a raw breakpoint pointer.
10410 2014-05-20 Pedro Alves <palves@redhat.com>
10412 * mem-break.h: Include break-common.h.
10413 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10414 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10415 (Z_packet_to_target_hw_bp_type): New declaration.
10416 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10417 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10418 (Z_PACKET_ACCESS_WP): Delete macros.
10419 (Z_packet_to_hw_type): Delete function.
10420 * i386-low.h: Don't include break-common.h here.
10421 (Z_packet_to_hw_type): Delete declaration.
10422 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10423 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10424 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10425 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10426 * linux-aarch64-low.c: Don't include break-common.h here.
10427 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10428 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10429 (Z_packet_to_target_hw_bp_type): Delete function.
10430 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10432 (mips_insert_point, mips_remove_point): Use
10433 Z_packet_to_target_hw_bp_type.
10435 2014-05-20 Pedro Alves <palves@redhat.com>
10437 * linux-aarch64-low.c: Include break-common.h.
10438 (enum target_point_type): Delete.
10439 (Z_packet_to_point_type): Rename to ...
10440 (Z_packet_to_target_hw_bp_type): ... this, and return a
10441 target_hw_bp_type instead.
10442 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10443 instead of an enum target_point_type.
10444 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10446 (aarch64_dr_state_insert_one_point)
10447 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10448 (aarch64_handle_aligned_watchpoint)
10449 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10450 Take an enum target_hw_bp_type instead of an enum
10452 (aarch64_supports_z_point_type): New function.
10453 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10454 use Z_packet_to_target_hw_bp_type.
10456 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10458 * configure.ac: Only use -Werror by default when DEVELOPMENT
10460 * configure: Regenerate.
10462 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10464 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10465 * linux-x86-low.c (X86_64_USER_REGS): New.
10466 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10468 2014-04-28 Yao Qi <yao@codesourcery.com>
10470 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10473 2014-04-25 Pedro Alves <palves@redhat.com>
10476 * linux-low.c (linux_attach_fail_reason_string): New function.
10477 (linux_attach_lwp): Delete.
10478 (linux_attach_lwp_1): Rename to ...
10479 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10480 argument. Remove "initial" parameter. Return int instead of
10481 void. Don't error or warn here.
10482 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10483 failure to attach to the tgid. Call warning when failing to
10485 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10486 argument. Remove "initial" parameter. Return int instead of
10487 void. Don't error or warn here.
10488 (linux_attach_fail_reason_string): New declaration.
10489 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10490 interface change. Use linux_attach_fail_reason_string.
10492 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10493 Walfred Tedeschi <walfred.tedeschi@intel.com>
10495 * Makefile.in: Added rules to handle new files
10496 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10497 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10498 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10499 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10500 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10501 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10502 x32-avx512-linux.o.
10503 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10504 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10505 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10506 i386/x32-avx512.xml.
10507 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10508 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10509 i386/x32-avx512-linux.xml.
10510 * i387-fp.c (num_avx512_k_registers): New constant for number
10512 (num_avx512_zmmh_low_registers): New constant for number of
10513 lower ZMM registers (0-15).
10514 (num_avx512_zmmh_high_registers): New constant for number of
10515 higher ZMM registers (16-31).
10516 (num_avx512_ymmh_registers): New contant for number of higher
10517 YMM registers (ymm16-31 added by avx521 on x86_64).
10518 (num_avx512_xmm_registers): New constant for number of higher
10519 XMM registers (xmm16-31 added by AVX512 on x86_64).
10520 (struct i387_xsave): Add space for AVX512 registers.
10521 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10522 Add code to handle AVX512 registers.
10523 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10524 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10525 prototypei from generated file.
10526 (tdesc_amd64_avx512_linux): Likewise.
10527 (init_registers_x32_avx512_linux): Likewise.
10528 (tdesc_x32_avx512_linux): Likewise.
10529 (init_registers_i386_avx512_linux): Likewise.
10530 (tdesc_i386_avx512_linux): Likewise.
10531 (x86_64_regmap): Add AVX512 registers.
10532 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10534 (initialize_low_arch): Add code to initialize AVX512 registers.
10536 2014-04-23 Pedro Alves <palves@redhat.com>
10538 * mem-break.c (find_gdb_breakpoint_at): Make static.
10539 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10541 2014-04-23 Pedro Alves <palves@redhat.com>
10543 * i386-low.c: Don't include break-common.h here.
10544 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10545 prototype to take target_hw_bp_type as argument instead of a Z
10547 * i386-low.h: Include break-common.h here.
10548 (Z_packet_to_hw_type): Declare.
10549 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10551 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10552 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10553 (x86_remove_point): Convert the packet number to a
10554 target_hw_bp_type before calling i386_low_remove_watchpoint.
10555 * win32-i386-low.c (i386_insert_point): Convert the packet number
10556 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10557 (i386_remove_point): Convert the packet number to a
10558 target_hw_bp_type before calling i386_low_remove_watchpoint.
10560 2014-04-23 Pedro Alves <palves@redhat.com>
10562 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10564 2014-04-10 Pedro Alves <palves@redhat.com>
10566 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10567 Check if the condition or command is NULL before checking if the
10568 breakpoint is known. On success, return true.
10569 * mem-break.h (add_breakpoint_condition): Document return.
10570 (add_breakpoint_commands): Add describing comment.
10571 * server.c (skip_to_semicolon): New function.
10572 (process_point_options): Use it.
10574 2014-04-09 Pedro Alves <palves@redhat.com>
10576 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10579 2014-02-27 Pedro Alves <palves@redhat.com>
10582 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10584 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10586 (last_thread_of_process_p): Take a PID argument instead of a
10588 (linux_wait_for_lwp): Delete.
10589 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10591 (linux_low_filter_event): New function, party factored out from
10592 linux_wait_for_event.
10593 (linux_wait_for_event): Rename to ...
10594 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10595 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10596 sigsuspend. Check for zombie leaders.
10597 (linux_wait_for_event): Reimplement as wrapper around
10598 linux_wait_for_event_filtered.
10599 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10600 a normal or signal exit is seen, it's the whole process exiting.
10601 (wait_for_sigstop): No longer a for_each_inferior callback.
10602 Rewrite on top of linux_wait_for_event_filtered.
10603 (stop_all_lwps): Call wait_for_sigstop directly.
10604 * server.c (resume, handle_target_event): Handle
10605 TARGET_WAITKIND_NO_RESUMED.
10607 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10609 * win32-low.c (psapi_get_dll_name,
10610 * win32_CreateToolhelp32Snapshot): Delete.
10611 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10612 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10614 (handle_load_dll): Add function description.
10615 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10617 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10619 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10621 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10622 base address when calling win32_add_one_solib.
10623 (handle_load_dll): Delete local variable load_addr.
10624 Remove 0x1000 offset applied to DLL base address when calling
10625 win32_add_one_solib.
10626 (handle_unload_dll): Add comment.
10628 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10630 * win32-low.c (win32_add_all_dlls): Renames
10631 win32_ensure_ntdll_loaded. Rewrite function documentation.
10632 Adjust implementation to always load all DLLs.
10633 Add 0x1000 offset to DLL base address when calling
10634 win32_add_one_solib.
10635 (child_initialization_done): New static global.
10636 (do_initial_child_stuff): Set child_initialization_done to
10637 zero during child initialization, and 1 after. Replace call
10638 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10640 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10641 (handle_unload_dll): Add function documentation.
10642 (get_child_debug_event): Ignore load and unload DLL events
10643 during child initialization.
10645 2014-02-20 Doug Evans <dje@google.com>
10647 Remove global all_lwps.
10648 * inferiors.h (ptid_of): Move here from linux-low.h.
10649 (pid_of, lwpid_of): Ditto.
10650 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10651 parameter is a struct thread_info * now.
10652 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10653 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10654 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10656 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10657 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10658 * linux-arm-low.c (update_registers_callback): Update, "entry"
10659 parameter is a struct thread_info * now.
10660 Fetch lwpid from current_inferior directly.
10661 (arm_insert_point): Pass &all_threads to find_inferior instead of
10663 (arm_remove_point): Ditto.
10664 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10665 (arm_prepare_to_resume): Fetch pid from thread.
10666 (arm_read_description): Fetch lwpid from current_inferior directly.
10667 * linux-low.c (all_lwps): Delete.
10668 (delete_lwp): Delete call to remove_inferior.
10669 (handle_extended_wait): Fetch lwpid from thread.
10670 (add_lwp): Don't set lwp->entry.id. Remove call to
10671 add_inferior_to_list.
10672 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10673 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10674 (kill_one_lwp_callback): Ditto.
10675 (linux_kill): Don't dereference NULL pointer.
10676 Fetch ptid,lwpid from thread.
10677 (get_detach_signal): Fetch ptid from thread.
10678 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10679 Simplify call to regcache_invalidate_thread.
10680 (delete_lwp_callback): Update, "entry" parameter is a
10681 struct thread_info * now. Fetch pid from thread.
10682 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10683 (status_pending_p_callback): Update, "entry" parameter is a
10684 struct thread_info * now. Fetch ptid from thread.
10685 (find_lwp_pid): Update, "entry" parameter is a
10686 struct thread_info * now.
10687 (linux_wait_for_lwp): Fetch pid from thread.
10688 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10689 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10690 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10691 (dequeue_one_deferred_signal): Ditto.
10692 (cancel_breakpoint): Fetch ptid from current_inferior.
10693 (linux_wait_for_event): Pass &all_threads to find_inferior,
10694 not &all_lwps. Fetch ptid, lwpid from thread.
10695 (count_events_callback): Update, "entry" parameter is a
10696 struct thread_info * now.
10697 (select_singlestep_lwp_callback): Ditto.
10698 (select_event_lwp_callback): Ditto.
10699 (cancel_breakpoints_callback): Ditto.
10700 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10702 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10703 (unsuspend_one_lwp): Update, "entry" parameter is a
10704 struct thread_info * now.
10705 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10707 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10708 Fetch lwpid from thread, not lwp.
10709 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10710 Pass &all_threads to find_inferior, not &all_lwps.
10711 (send_sigstop): Fetch lwpid from thread, not lwp.
10712 (send_sigstop_callback): Update, "entry" parameter is a
10713 struct thread_info * now.
10714 (suspend_and_send_sigstop_callback): Ditto.
10715 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10716 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10717 struct thread_info * now.
10718 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10720 (lwp_running): Update, "entry" parameter is a
10721 struct thread_info * now.
10722 (stop_all_lwps): Fetch ptid from thread.
10723 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10724 (linux_resume_one_lwp): Fetch lwpid from thread.
10725 (linux_set_resume_request): Update, "entry" parameter is a
10726 struct thread_info * now. Fetch pid, lwpid from thread.
10727 (resume_status_pending_p): Update, "entry" parameter is a
10728 struct thread_info * now.
10729 (need_step_over_p): Ditto. Fetch lwpid from thread.
10730 (start_step_over): Fetch lwpid from thread.
10731 (linux_resume_one_thread): Update, "entry" parameter is a
10732 struct thread_info * now. Fetch lwpid from thread.
10733 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10734 (proceed_one_lwp): Update, "entry" parameter is a
10735 struct thread_info * now. Fetch lwpid from thread.
10736 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10737 struct thread_info * now.
10738 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10739 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10740 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10742 (regsets_store_inferior_registers): Ditto.
10743 (fetch_register, store_register): Ditto.
10744 (linux_read_memory, linux_write_memory): Ditto.
10745 (linux_request_interrupt): Ditto.
10746 (linux_read_auxv): Ditto.
10747 (linux_xfer_siginfo): Ditto.
10748 (linux_qxfer_spu): Ditto.
10749 (linux_qxfer_libraries_svr4): Ditto.
10750 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10751 moved to inferiors.h.
10753 (get_thread_lwp): Update.
10754 (struct lwp_info): Delete member "entry". Simplify comment for
10756 (all_lwps): Delete.
10757 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10758 current_inferior directly.
10759 (update_watch_registers_callback): Update, "entry" parameter is a
10760 struct thread_info * now. Fetch pid from thread.
10761 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10762 (mips_insert_point): Fetch lwpid from current_inferior.
10763 Pass &all_threads to find_inferior, not &all_lwps.
10764 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10765 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10767 (mips_stopped_data_address): Ditto.
10768 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10770 * linux-tile-low.c (tile_arch_setup): Ditto.
10771 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10772 (update_debug_registers_callback): Update, "entry" parameter is a
10773 struct thread_info * now. Fetch pid from thread.
10774 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10775 Pass &all_threads to find_inferior, not &all_lwps.
10776 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10777 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10778 Pass &all_threads to find_inferior, not &all_lwps.
10779 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10780 (i386_dr_low_get_status): Ditto.
10781 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10782 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10783 (x86_linux_read_description): Ditto.
10784 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10786 2014-02-20 Doug Evans <dje@google.com>
10788 * inferiors.c (get_first_inferior): Fix buglet.
10790 2014-02-19 Doug Evans <dje@google.com>
10792 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10793 * inferiors.c (add_thread): Change result type to struct thread_info *.
10794 All callers updated.
10795 (add_lwp): Call add_thread here instead of in callers.
10796 All callers updated.
10797 * linux-low.h (get_lwp_thread): Rewrite.
10798 (struct lwp_info): New member "thread".
10800 2014-02-19 Doug Evans <dje@google.com>
10802 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10803 All callers updated.
10805 2014-02-19 Doug Evans <dje@google.com>
10807 * inferiors.c (add_thread): Fix whitespace.
10809 2014-02-19 Doug Evans <dje@google.com>
10811 * dll.c (clear_dlls): Replace accessing list implemention details
10813 * gdbthread.h (get_first_thread): Declare.
10814 * inferiors.c (for_each_inferior_with_data): New function.
10815 (get_first_thread): New function.
10816 (find_thread_ptid): Simplify.
10817 (get_first_inferior): New function.
10818 (clear_list): Delete.
10819 (one_inferior_p): New function.
10820 (clear_inferior_list): New function.
10821 (clear_inferiors): Update.
10822 * inferiors.h (for_each_inferior_with_data): Declare.
10823 (clear_inferior_list): Declare.
10824 (one_inferior_p): Declare.
10825 (get_first_inferior): Declare.
10826 * linux-low.c (linux_wait_for_event): Replace accessing list
10827 implemention details with API function.
10828 * server.c (target_running): Ditto.
10829 (accumulate_file_name_length): New function.
10830 (emit_dll_description): New function.
10831 (handle_qxfer_libraries): Replace accessing list implemention
10832 details with API function.
10833 (handle_qxfer_threads_worker): New function.
10834 (handle_qxfer_threads_proper): Replace accessing list implemention
10835 details with API function.
10836 (handle_query): Ditto.
10837 (visit_actioned_threads_callback_ftype): New typedef.
10838 (visit_actioned_threads_data): New struct.
10839 (visit_actioned_threads): Rewrite to be find_inferior callback.
10840 (resume): Call find_inferior.
10841 (handle_status): Replace accessing list implemention
10842 details with API function.
10843 (process_serial_event): Replace accessing list implemention details
10845 * target.c (set_desired_inferior): Replace accessing list implemention
10846 details with API function.
10847 * tracepoint.c (same_process_p): New function.
10848 (gdb_agent_about_to_close): Replace accessing list implemention
10849 details with API function.
10850 * win32-low.c (child_delete_thread): Replace accessing list
10851 implemention details with API function.
10852 (match_dll_by_basename): New function.
10853 (dll_is_loaded_by_basename): New function.
10854 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10855 details call to dll_is_loaded_by_basename.
10857 2014-02-19 Doug Evans <dje@google.com>
10859 * dll.h (struct dll_info): Add comment.
10860 * gdbthread.h (struct thread_info): Add comment.
10861 (current_ptid): Simplify.
10862 * inferiors.c (add_process): Update.
10863 (remove_process): Update.
10864 * inferiors.h (struct process_info): Rename member "head" to "entry".
10865 * linux-low.c (delete_lwp): Update.
10867 (last_thread_of_process_p): Update.
10868 (kill_one_lwp_callback, linux_kill): Update.
10869 (status_pending_p_callback): Update.
10870 (wait_for_sigstop): Update. Simplify read of ptid.
10871 (start_step_over): Update.
10872 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10873 (get_lwp_thread): Update.
10874 (struct lwp_info): Rename member "head" to "entry".
10875 * regcache.h (inferior_list_entry): Delete.
10876 * server.c (kill_inferior_callback): Update.
10877 (detach_or_kill_inferior_callback): Update.
10878 (print_started_pid): Update.
10879 (print_attached_pid): Update.
10880 (process_serial_event): Simplify read of ptid.
10881 * thread-db.c (thread_db_create_event): Update.
10882 (thread_db_get_tls_address): Update.
10883 * win32-low.c (current_inferior_ptid): Simplify.
10885 2014-02-19 Tom Tromey <tromey@redhat.com>
10887 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10889 (target_supports_btrace): Update.
10891 2014-02-14 Yao Qi <yao@codesourcery.com>
10893 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10894 (rsp-low-ipa.o): New target.
10896 2014-02-12 Tom Tromey <tromey@redhat.com>
10898 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10899 convert_ascii_to_int.
10900 * regcache.c (registers_to_string): Likewise.
10901 * remote-utils.c (decode_M_packet): Likewise.
10902 * server.c (process_serial_event): Likewise.
10904 2014-02-12 Tom Tromey <tromey@redhat.com>
10906 * server.c (handle_query, handle_v_run): Use hex2bin, not
10908 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10910 2014-02-12 Tom Tromey <tromey@redhat.com>
10912 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10913 convert_int_to_ascii.
10914 * regcache.c (registers_to_string, collect_register_as_string):
10916 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10918 * server.c (process_serial_event): Likewise.
10919 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10920 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10922 2014-02-12 Tom Tromey <tromey@redhat.com>
10924 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10925 bin2hex, not hexify.
10926 * tracepoint.c (cmd_qtstatus): Likewise.
10928 2014-02-12 Tom Tromey <tromey@redhat.com>
10930 * remote-utils.c (monitor_output): Pass explicit length to
10933 2014-02-12 Tom Tromey <tromey@redhat.com>
10935 * tracepoint.c: Include rsp-low.h.
10936 * server.c: Include rsp-low.h.
10937 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10938 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10940 * remote-utils.c: Include rsp-low.h.
10941 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10942 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10943 (convert_int_to_ascii, convert_ascii_to_int): Move to
10945 * regcache.c: Include rsp-low.h.
10946 * ax.c: Include rsp-low.h.
10947 * Makefile.in (SFILES): Add common/rsp-low.c.
10948 (OBS): Add rsp-low.o.
10949 (rsp-low.o): New target.
10951 2014-02-12 Tom Tromey <tromey@redhat.com>
10953 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10954 Include print-utils.h.
10955 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10956 (plongest, thirty_two, phex_nz): Remove.
10957 * Makefile.in (SFILES): Add common/print-utils.c.
10958 (OBS): Add print-utils.o.
10959 (print-utils-ipa.o): New target.
10960 (print-utils.o): New target.
10961 (IPA_OBJS): Add print-utils-ipa.o.
10963 2014-02-06 Tom Tromey <tromey@redhat.com>
10965 * Makefile.in (SFILES): Fix indentation.
10967 2014-02-05 Doug Evans <dje@google.com>
10969 * linux-low.c (linux_wait_for_event): Improve comment.
10970 (linux_wait_1): Keep current_inferior in sync with event_child.
10972 2014-01-22 Doug Evans <dje@google.com>
10974 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10976 2014-01-22 Doug Evans <dje@google.com>
10978 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10979 * configure: Regenerate.
10980 * config.in: Regenerate.
10981 * Makefile.in (SFILES): Add debug.c.
10982 (OBS): Add debug.o.
10983 * debug.c: New file.
10984 * debug.h: New file.
10985 * linux-aarch64-low.c (*): Update all debugging printfs to use
10986 debug_printf instead of fprintf.
10987 * linux-arm-low.c (*): Ditto.
10988 * linux-cris-low.c (*): Ditto.
10989 * linux-crisv32-low.c (*): Ditto.
10990 * linux-m32r-low.c (*): Ditto.
10991 * linux-sparc-low.c (*): Ditto.
10992 * linux-x86.c (*): Ditto.
10993 * linux-low.c (*): Ditto.
10994 (linux_wait_1): Add calls to debug_enter, debug_exit.
10995 (linux_wait): Remove redundant debugging printf.
10996 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10997 (linux_resume, unstop_all_lwps): Ditto.
10998 * mem-break.c (*): Update all debugging printfs to use
10999 debug_printf instead of fprintf.
11000 * remote-utils.c (*): Ditto.
11001 * thread-db.c (*): Ditto.
11002 * server.c #include <ctype.h>, "gdb_vecs.h".
11003 (debug_threads): Moved to debug.c.
11004 (*): Update all debugging printfs to use debug_printf instead of
11006 (start_inferior): Replace call to fflush with call to debug_flush.
11007 (monitor_show_help): Mention set debug-format.
11008 (parse_debug_format_options): New function.
11009 (handle_monitor_command): Handle "monitor set debug-format".
11010 (gdbserver_usage): Mention --debug-format.
11011 (main): Parse --debug-format.
11012 * server.h (debug_threads): Declaration moved to debug.h.
11013 #include "debug.h".
11014 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
11015 trace_debug_1 that uses debug_printf.
11016 (tracepoint_look_up_symbols): Update all debugging printfs to use
11017 debug_printf instead of fprintf.
11019 2014-01-20 Baruch Siach <baruch@tkos.co.il>
11021 * linux-xtensa-low.c: Include asm/ptrace.h instead of
11024 2014-01-17 Pedro Alves <palves@redhat.com>
11027 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
11028 defined after including gdb_proc_service.h.
11030 2014-01-16 Doug Evans <dje@google.com>
11032 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
11033 (match_dll): Use it.
11035 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
11037 * target.h (target_ops) <read_btrace>: Change parameters and
11038 return type to allow error reporting.
11039 * server.c (handle_qxfer_btrace): Support delta reads. Pass
11040 trace reading errors on.
11041 * linux-low.c (linux_low_read_btrace): Pass trace reading
11043 (linux_low_disable_btrace): New.
11045 2014-01-15 Doug Evans <dje@google.com>
11047 * inferiors.c (thread_id_to_gdb_id): Delete.
11048 * inferiors.h (thread_id_to_gdb_id): Delete.
11050 2014-01-13 Eli Zaretskii <eliz@gnu.org>
11052 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
11053 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
11056 2014-01-08 Pedro Alves <palves@redhat.com>
11058 * server.c (handle_status): Don't discard previous queued stop
11059 replies or thread's pending status here.
11060 (main) <disconnection>: Do it here instead.
11062 2014-01-08 Pedro Alves <palves@redhat.com>
11064 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11065 * server.c (visit_actioned_threads, handle_pending_status): New
11067 (handle_v_cont): Factor out parts to ...
11068 (resume): ... this new function. If in all-stop, and a thread
11069 being resumed has a pending status, report it without actually
11071 (myresume): Adjust to use the new 'resume' function.
11072 (clear_pending_status_callback, set_pending_status_callback)
11073 (find_status_pending_thread_callback): New functions.
11074 (handle_status): Handle the case of multiple threads having
11075 interesting statuses to report. Report threads' real last signal
11076 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11077 with an interesting thread to report the status for, instead of
11078 always reporting the status of the first thread.
11080 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11082 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11083 * gdbreplay.c (gdbreplay_version): Likewise.
11085 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11087 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11088 iov.iov_len with the real length in use.
11090 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11092 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11093 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11094 for all targets that use win32-low.c.
11095 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11096 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11098 2013-12-13 Pedro Alves <palves@redhat.com>
11100 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11101 if equal to TARGET_WAITKIND_LOADED.
11102 * win32-low.c (cached_status): New static global.
11103 (win32_wait): Add declaration.
11104 (do_initial_child_stuff): Flush all initial pending debug events
11105 up to the initial breakpoint.
11106 (win32_wait): If CACHED_STATUS was set, return that instead
11107 of doing a real wait. Remove the code resuming the execution
11108 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11109 during the initial phase. Also remove the code changing
11110 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11111 TARGET_WAITKIND_STOPPED.
11113 2013-12-11 Yao Qi <yao@codesourcery.com>
11115 * notif.c (handle_notif_ack): Return 0 if no notification
11118 2013-11-20 Doug Evans <dje@google.com>
11120 * linux-low.c (linux_set_resume_request): Fix comment.
11122 2013-11-20 Doug Evans <dje@google.com>
11124 * linux-low.c (resume_status_pending_p): Tweak comment.
11126 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11128 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11129 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11130 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11131 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11132 (srv_amd64_regobj): Add amd64-mpx.o.
11133 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11134 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11135 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11136 * i387-fp.c (num_pl_bnd_register) Added constant.
11137 (num_pl_bnd_cfg_registers) Added constant.
11138 (struct i387_xsave) Added reserved area and MPX fields.
11139 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11140 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11142 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11143 (init_registers_amd64_mpx_linux): Declare new function.
11144 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11145 (x86_64_regmap): Add MPX registers.
11146 (x86_linux_read_description): Add MPX case.
11147 (initialize_low_arch): Initialize MPX targets.
11149 2013-11-18 Tom Tromey <tromey@redhat.com>
11151 * configure: Rebuild.
11152 * configure.ac: Don't check for stdlib.h.
11153 * gdbreplay.c: Unconditionally include stdlib.h.
11155 2013-11-18 Tom Tromey <tromey@redhat.com>
11157 * config.in: Rebuild.
11158 * configure: Rebuild.
11159 * configure.ac: Don't use AC_HEADER_DIRENT.
11161 2013-11-18 Tom Tromey <tromey@redhat.com>
11163 * server.h: Don't check HAVE_STRING_H.
11164 * gdbreplay.c: Don't check HAVE_STRING_H.
11165 * configure: Rebuild.
11167 2013-11-18 Tom Tromey <tromey@redhat.com>
11169 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
11172 2013-11-08 Tom Tromey <tromey@redhat.com>
11174 * configure, config.in: Rebuild.
11175 * configure.ac: Remove unused configury.
11177 2013-11-08 Tom Tromey <tromey@redhat.com>
11179 * acinclude.m4: Include common.m4, codeset.m4.
11180 * configure, config.in: Rebuild.
11181 * configure.ac: Use GDB_AC_COMMON.
11183 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
11185 * linux-s390-low.c (HWCAP_S390_TE): New define.
11186 (s390_arch_setup): Consider the TE field in the HWCAP for
11187 determining 'have_regset_tdb'.
11189 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
11192 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
11195 2013-10-02 Pedro Alves <palves@redhat.com>
11197 * server.c (process_serial_event): Don't output "GDBserver
11198 exiting" if GDB is connected through stdio.
11199 * target.c (mywait): Likewise, be silent if GDB is connected
11202 2013-10-01 Joel Brobecker <brobecker@adacore.com>
11204 * lynx-low.c (lynx_add_threads_after_attach): New function.
11205 (lynx_attach): Remove call to add_thread. Add call to
11206 lynx_add_threads_after_attach instead.
11208 2013-09-28 Mike Frysinger <vapier@gentoo.org>
11210 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
11211 * config.in, configure: Regenerated.
11213 2013-09-18 Yao Qi <yao@codesourcery.com>
11216 * server.c (start_inferior): Clear 'resume_info'.
11218 2013-09-16 Jiong Wang <jiwang@tilera.com>
11220 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
11223 2013-09-16 Jiong Wang <jiwang@tilera.com>
11225 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
11226 linux-tile-low.o to srv_tgtobj.
11228 2013-09-16 Will Newton <will.newton@linaro.org>
11230 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
11233 2013-09-06 Pedro Alves <palves@redhat.com>
11235 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
11236 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
11237 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11238 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
11239 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
11240 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
11242 2013-09-06 Pedro Alves <palves@redhat.com>
11244 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
11245 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
11247 2013-09-06 Pedro Alves <palves@redhat.com>
11249 * linux-amd64-ipa.c: Include tracepoint.h.
11250 * linux-i386-ipa.c: Include tracepoint.h.
11252 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11254 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
11255 (ps_get_thread_area): New function.
11257 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11259 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
11260 (initialize_low_arch): Call init_registers_crisv32 rather than
11261 init_register_crisv32.
11263 2013-09-05 Pedro Alves <palves@redhat.com>
11265 * server.h (handle_vFile, hostio_last_error_from_errno): Move
11267 * hostio.h: ... this new file.
11268 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
11269 win32-low.c: Include hostio.h.
11271 2013-09-05 Pedro Alves <palves@redhat.com>
11273 * server.h (gdb_client_data, handler_func, callback_handler_func)
11274 (delete_file_handler, add_file_handler, append_callback_event)
11275 (delete_callback_event, start_event_loop, initialize_event_loop):
11276 Move to event-loop.h and include it.
11277 * event-loop.h: New file.
11279 2013-09-05 Pedro Alves <palves@redhat.com>
11281 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
11282 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
11283 (loaded_dll, unloaded_dll): Move to ...
11284 * dll.h: ... this new file.
11285 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
11287 2013-09-05 Pedro Alves <palves@redhat.com>
11289 * server.h (current_process, get_thread_process, all_processes)
11290 (add_inferior_to_list, for_each_inferior, current_inferior)
11291 (remove_inferior, add_process, remove_process, find_process_pid)
11292 (have_started_inferiors_p, have_attached_inferiors_p)
11293 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
11294 (clear_inferiors, find_inferior, find_inferior_id)
11295 (inferior_target_data, set_inferior_target_data)
11296 (inferior_regcache_data, set_inferior_regcache_data): Move to
11297 inferiors.h, and include it.
11298 * inferiors.h: New file.
11300 2013-09-05 Pedro Alves <palves@redhat.com>
11302 * server.h (struct emit_ops, current_insn_ptr, emit_error):
11306 2013-09-05 Pedro Alves <palves@redhat.com>
11308 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
11310 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
11311 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
11312 (handle_tracepoint_general_set, handle_tracepoint_query)
11313 (tracepoint_finished_step, tracepoint_was_hit)
11314 (release_while_stepping_state_list, current_traceframe)
11315 (in_readonly_region, traceframe_read_mem)
11316 (fetch_traceframe_registers, traceframe_read_sdata)
11317 (traceframe_read_info, struct fast_tpoint_collect_status)
11318 (fast_tracepoint_collecting, force_unlock_trace_buffer)
11319 (handle_tracepoit_bkpts, initialize_low_tracepoint)
11320 (supply_fast_tracepoint_registers)
11321 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
11322 (ipa_tdesc, claim_trampoline_space)
11323 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
11324 (agent_mem_read, agent_get_trace_state_variable_value)
11325 (agent_set_trace_state_variable_value, agent_tsv_read)
11326 (agent_mem_read_string, get_raw_reg_func_addr)
11327 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
11328 * tracepoint.h: ... this new file.
11330 2013-09-05 Pedro Alves <palves@redhat.com>
11332 * server.h (perror_with_name, error, fatal, warning, paddress)
11333 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
11335 * utils.h: New file.
11337 2013-09-05 Pedro Alves <palves@redhat.com>
11339 * server.h (remote_debug, noack_mode, transport_is_reliable)
11340 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
11341 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
11342 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
11343 (write_enn, initialize_async_io, enable_async_io)
11344 (disable_async_io, check_remote_input_interrupt_request)
11345 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
11346 (dead_thread_notify, prepare_resume_reply)
11347 (decode_address_to_semicolon, decode_address, decode_m_packet)
11348 (decode_M_packet, decode_X_packet, decode_xfer_write)
11349 (decode_search_memory_packet, unhexify, hexify)
11350 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
11351 (look_up_one_symbol, relocate_instruction)
11352 (monitor_output): Move to remote-utils.h, and include it.
11353 * remote-utils.h: New file.
11355 2013-09-05 Pedro Alves <palves@redhat.com>
11357 * server.h (_): Delete.
11359 2013-09-02 Pedro Alves <palves@redhat.com>
11361 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
11362 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
11364 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
11366 2013-09-02 Pierre Muller <muller@sourceware.org>
11368 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11369 or WriteProcessMemory complete successfully and handle
11370 ERROR_PARTIAL_COPY error.
11372 2013-09-02 Pedro Alves <palves@redhat.com>
11374 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11375 error instead of EIO.
11377 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11380 * linux-low.c: Include filestuff.h.
11381 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11382 * lynx-low.c: Include filestuff.h.
11383 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11384 * server.c: Include filestuff.h.
11385 (main): Call notice_open_fds.
11386 * spu-low.c: Include filestuff.h.
11387 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11389 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11391 * Makefile.in: Explain why ../target and ../nat are not
11392 listed as include file search paths.
11393 (linux-waitpid.o): New object file rule.
11394 * configure.srv (srv_native_linux_obj): New variable.
11395 Replace all occurrences of linux native object files with
11396 $srv_native_linux_obj.
11397 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11398 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11399 (linux_enable_event_reporting): Remove declaration.
11400 (my_waitpid): Moved to common/linux-waitpid.c.
11401 (linux_wait_for_event): Pass ptid when calling
11402 linux_enable_event_reporting.
11403 (linux_supports_tracefork_flag): Remove.
11404 (linux_enable_event_reporting): Likewise.
11405 (linux_tracefork_grandchild): Remove.
11406 (STACK_SIZE): Moved to common/linux-ptrace.c.
11407 (linux_tracefork_child): Remove.
11408 (linux_test_for_tracefork): Remove.
11409 (linux_look_up_symbols): Call linux_supports_traceclone.
11410 (initialize_low): Remove call to linux_test_for_tracefork.
11411 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11412 common/linux-ptrace.h.
11413 (PTRACE_TYPE_ARG4): Likewise.
11414 Include linux-ptrace.h.
11416 2013-08-21 Pedro Alves <palves@redhat.com>
11418 * config.in: Renegerate.
11420 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11422 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11423 (SFILES): Remove $(srcdir)/common/target-common.c and
11424 add $(srcdir)/target/waitstatus.c.
11425 (OBS): Remove target-common.o and add waitstatus.o.
11426 (server_h): Remove $(srcdir)/../common/target-common.h and
11427 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11428 and $(srcdir)/../target/waitstatus.h.
11429 (target-common.o): Remove.
11430 (waitstatus.o): New target object file.
11431 * target.h: Do not include target-common.h and
11432 include target/resume.h, target/wait.h and
11433 target/waitstatus.h.
11435 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11437 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11438 to PTRACE_TYPE_ARG3.
11439 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11440 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11442 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11443 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11445 2013-07-27 Jie Zhang <jie@codesourcery.com>
11446 Daniel Jacobowitz <dan@codesourcery.com>
11447 Yao Qi <yao@codesourcery.com>
11449 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11450 (mips-linux-watch.o): New rule.
11451 (mips_linux_watch_h): New variable.
11452 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11454 * linux-mips-low.c: Include mips-linux-watch.h.
11455 (struct arch_process_info, struct arch_lwp_info): New.
11456 (update_watch_registers_callback): New function.
11457 (mips_linux_new_process, mips_linux_new_thread) New functions.
11458 (mips_linux_prepare_to_resume, mips_insert_point): New
11460 (mips_remove_point, mips_stopped_by_watchpoint): New
11462 (rsp_bp_type_to_target_hw_bp_type): New function.
11463 (mips_stopped_data_address): New function.
11464 (the_low_target): Add watchpoint support functions.
11466 2013-07-27 Yao Qi <yao@codesourcery.com>
11468 * i386-low.c: Include break-common.h.
11469 (enum target_hw_bp_type): Remove.
11471 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11473 * Makefile.in (SFILES): /common/target-common.c.
11474 (OBS): Add target-common.o.
11475 (server_h): Add $(srcdir)/../common/target-common.h.
11476 (target-common.o): New target.
11477 * server.c (queue_stop_reply_callback): Free
11478 status string after use.
11479 * target.c (target_waitstatus_to_string): Remove.
11480 * target.h: Include target-common.h.
11481 (resume_kind): Likewise.
11482 (target_waitkind): Likewise.
11483 (target_waitstatus): Likewise.
11484 (TARGET_WNOHANG): Likewise.
11486 2013-07-04 Yao Qi <yao@codesourcery.com>
11488 * Makefile.in (host_alias): Use @host_noncanonical@.
11489 (target_alias): Use @target_noncanonical@.
11490 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11491 ACX_NONCANONICAL_HOST.
11492 * configure: Regenerated.
11495 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11497 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11498 * configure: Rebuild.
11499 * Makefile.in (version_host, version_target): Get from configure.
11500 (version.c): Use $(version_host) and $(version_target).
11502 2013-07-03 Pedro Alves <palves@redhat.com>
11504 * Makefile.in (config.status): Depend on development.sh.
11505 * acinclude.m4: Include libmcheck.m4.
11506 * configure: Regenerate.
11508 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11510 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11511 attribute inside the parentheses.
11512 (winapi_DebugSetProcessKillOnExit): Ditto.
11513 (winapi_DebugBreakProcess): Ditto.
11514 (winapi_GenerateConsoleCtrlEvent): Ditto.
11516 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11518 * notif.h (notif_event): Add a dummy member to avoid compiler
11521 2013-07-01 Pedro Alves <palves@redhat.com>
11523 * hostio.c (HOSTIO_PATH_MAX): Define.
11524 (require_filename, handle_open, handle_unlink, handle_readlink):
11527 2013-07-01 Pedro Alves <palves@redhat.com>
11529 * server.h: Include "pathmax.h".
11530 * linux-low.c: Don't include sys/param.h.
11531 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11533 * win32-low.c: Don't include sys/param.h.
11534 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11536 2013-07-01 Pedro Alves <palves@redhat.com>
11538 * event-loop.c: Don't check HAVE_UNISTD_H before including
11540 * gdbreplay.c: Likewise.
11541 * remote-utils.c: Likewise.
11542 * server.c: Likewise.
11543 * configure.ac: Don't check for unistd.h.
11544 * configure: Regenerate.
11546 2013-06-28 Tom Tromey <tromey@redhat.com>
11548 * Makefile.in (version.c): Use version.in, not
11551 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11553 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11554 * configure: Rebuild.
11555 * Makefile.in (version_host, version_target): Get from configure.
11556 (version.c): Use $(version_host) and $(version_target).
11558 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11560 Fix trace-status to output user name without trailing colon.
11561 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11563 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11565 Fix trace-status to output proper start-time and stop-time.
11566 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11567 output start time and stop time in hex as gdb expects.
11569 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11571 * tracepoint.c (build_traceframe_info_xml): Output trace state
11572 variables present in the trace buffer.
11574 2013-06-24 Tom Tromey <tromey@redhat.com>
11576 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11578 (version.o): Remove.
11579 * gdbreplay.c: Include version.h.
11580 (version, host_name): Don't declare.
11581 * server.h: Include version.h.
11582 (version, host_name): Don't declare.
11584 2013-06-12 Pedro Alves <palves@redhat.com>
11586 * linux-x86-low.c (linux_is_elf64): Delete global.
11587 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11588 with local linux_pid_exe_is_elf_64_file use.
11590 2013-06-11 Pedro Alves <palves@redhat.com>
11592 * linux-low.c (regset_disabled, disable_regset): New functions.
11593 (regsets_fetch_inferior_registers)
11594 (regsets_store_inferior_registers): Use them.
11595 (initialize_regsets_info); Don't allocate the disabled_regsets
11597 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11600 2013-06-11 Pedro Alves <palves@redhat.com>
11602 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11605 2013-06-11 Pedro Alves <palves@redhat.com>
11607 * linux-x86-low.c (initialize_low_arch): Call
11608 init_registers_x32_avx_linux.
11610 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11612 Fix compatibility with Android Bionic.
11613 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11616 2013-06-07 Pedro Alves <palves@redhat.com>
11619 * Makefile.in (OBS): Add tdesc.o.
11620 (IPA_OBJS): Add tdesc-ipa.o.
11621 (tdesc-ipa.o): New rule.
11622 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11624 * linux-low.c (new_inferior): Delete.
11625 (disabled_regsets, num_regsets): Delete.
11626 (linux_add_process): Adjust to set the new per-process
11628 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11629 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11630 was a stop. When calling arch_setup, switch the current inferior
11631 to the thread that got an event.
11632 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11633 (regsets_fetch_inferior_registers)
11634 (regsets_store_inferior_registers): New regsets_info parameter.
11636 (linux_register_in_regsets): New regs_info parameter. Adjust to
11638 (register_addr, fetch_register, store_register): New usrregs_info
11639 parameter. Adjust to use it.
11640 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11641 parameter regs_info. Adjust to use it.
11642 (linux_fetch_registers): Get the current inferior's regs_info, and
11644 (linux_store_registers): Ditto.
11645 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11646 (initialize_low): Don't initialize the target_regsets here. Call
11647 initialize_low_arch.
11648 * linux-low.h (target_regsets): Delete declaration.
11649 (struct regsets_info): New.
11650 (struct usrregs_info): New.
11651 (struct regs_info): New.
11652 (struct process_info_private) <new_inferior>: New field.
11653 (struct linux_target_ops): Delete the num_regs, regmap, and
11654 regset_bitmap fields. New field regs_info.
11655 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11656 * i387-fp.c (num_xmm_registers): Delete.
11657 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11658 calls to new interface.
11659 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11660 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11661 Infer the number of xmm registers from the regcache's target
11663 * i387-fp.h (num_xmm_registers): Delete.
11664 * inferiors.c (add_thread): Don't install the thread's regcache
11666 * proc-service.c (gregset_info): Fetch the current inferior's
11667 regs_info. Adjust to use it.
11668 * regcache.c: Include tdesc.h.
11669 (register_bytes, reg_defs, num_registers)
11670 (gdbserver_expedite_regs): Delete.
11671 (get_thread_regcache): If the thread doesn't have a regcache yet,
11672 create one, instead of aborting gdbserver.
11673 (regcache_invalidate_one): Rename to ...
11674 (regcache_invalidate_thread): ... this.
11675 (regcache_invalidate_one): New.
11676 (regcache_invalidate): Only invalidate registers of the current
11678 (init_register_cache): Add target_desc parameter, and use it.
11679 (new_register_cache): Ditto. Assert the target description has a
11680 non zero registers_size.
11681 (regcache_cpy): Add assertions. Adjust.
11682 (realloc_register_cache, set_register_cache): Delete.
11683 (registers_to_string, registers_from_string): Adjust.
11684 (find_register_by_name, find_regno, find_register_by_number)
11685 (register_cache_size): Add target_desc parameter, and use it.
11686 (free_register_cache_thread, free_register_cache_thread_one)
11687 (regcache_release, register_cache_size): New.
11688 (register_size): Add target_desc parameter, and use it.
11689 (register_data, supply_register, supply_register_zeroed)
11690 (supply_regblock, supply_register_by_name, collect_register)
11691 (collect_register_as_string, collect_register_by_name): Adjust.
11692 * regcache.h (struct target_desc): Forward declare.
11693 (struct regcache) <tdesc>: New field.
11694 (init_register_cache, new_register_cache): Add target_desc
11696 (regcache_invalidate_thread): Declare.
11697 (regcache_invalidate_one): Delete declaration.
11698 (regcache_release): Declare.
11699 (find_register_by_number, register_cache_size, register_size)
11700 (find_regno): Add target_desc parameter.
11701 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11703 * remote-utils.c: Include tdesc.h.
11704 (outreg, prepare_resume_reply): Adjust.
11705 * server.c: Include tdesc.h.
11706 (gdbserver_xmltarget): Delete declaration.
11707 (get_features_xml, process_serial_event): Adjust.
11708 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11710 (struct process_info) <tdesc>: New field.
11711 (ipa_tdesc): Declare.
11712 * tdesc.c: New file.
11713 * tdesc.h: New file.
11714 * tracepoint.c: Include tdesc.h.
11715 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11716 (get_context_regcache): Adjust to pass ipa_tdesc down.
11717 (do_action_at_tracepoint): Adjust to get the register cache size
11718 from the context regcache's description.
11719 (traceframe_walk_blocks): Adjust to get the register cache size
11720 from the current trace frame's description.
11721 (traceframe_get_pc): Adjust to get current trace frame's
11722 description and pass it down.
11723 (gdb_collect): Adjust to get the register cache size from the
11725 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11726 (gdbserver_xmltarget): Delete.
11727 (initialize_low_tracepoint): Set the ipa's target description.
11728 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11729 (initialize_low_tracepoint): Set the ipa's target description.
11730 * linux-x86-low.c: Include tdesc.h.
11731 [__x86_64__] (is_64bit_tdesc): New.
11732 (ps_get_thread_area, x86_get_thread_area): Use it.
11733 (i386_cannot_store_register): Rename to ...
11734 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11735 (i386_cannot_fetch_register): Rename to ...
11736 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11737 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11739 (target_regsets): Rename to ...
11740 (x86_regsets): ... this.
11741 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11743 (x86_siginfo_fixup): Use is_64bit_tdesc.
11744 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11745 (tdesc_x32_avx_linux, tdesc_x32_linux)
11746 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11748 (x86_linux_update_xmltarget): Delete.
11749 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11750 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11751 (AMD64_LINUX_USER64_CS): New.
11752 (x86_linux_read_description): New, based on
11753 x86_linux_update_xmltarget.
11754 (same_process_callback): New.
11755 (x86_arch_setup_process_callback): New.
11756 (x86_linux_update_xmltarget): New.
11757 (x86_regsets_info): New.
11758 (amd64_linux_regs_info): New.
11759 (i386_linux_usrregs_info): New.
11760 (i386_linux_regs_info): New.
11761 (x86_linux_regs_info): New.
11762 (x86_arch_setup): Reimplement.
11763 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11764 (x86_emit_ops): Ditto.
11765 (the_low_target): Adjust. Install x86_linux_regs_info,
11766 x86_cannot_fetch_register, and x86_cannot_store_register.
11767 (initialize_low_arch): New.
11768 * linux-ia64-low.c (tdesc_ia64): Declare.
11769 (ia64_fetch_register): Adjust.
11770 (ia64_usrregs_info, regs_info): New globals.
11771 (ia64_regs_info): New function.
11772 (the_low_target): Adjust.
11773 (initialize_low_arch): New function.
11774 * linux-sparc-low.c (tdesc_sparc64): Declare.
11775 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11777 (sparc_arch_setup): New function.
11778 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11779 (the_low_target): Adjust.
11780 (initialize_low_arch): New function.
11781 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11782 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11783 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11784 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11785 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11786 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11787 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11788 (tdesc_powerpc_isa205_vsx64l): Declare.
11789 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11790 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11791 (ppc_set_pc, ppc_get_hwcap): Adjust.
11792 (ppc_usrregs_info): Forward declare.
11793 (!__powerpc64__) ppc_regmap_adjusted: New global.
11794 (ppc_arch_setup): Adjust to the current process'es target
11796 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11797 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11798 (ppc_store_evrregset): Adjust.
11799 (target_regsets): Rename to ...
11800 (ppc_regsets): ... this, and make static.
11801 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11802 (ppc_regs_info): New function.
11803 (the_low_target): Adjust.
11804 (initialize_low_arch): New function.
11805 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11806 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11807 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11808 (tdesc_s390x_linux64v2): Declare.
11809 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11810 (s390_fill_gregset, s390_store_last_break): Adjust.
11811 (target_regsets): Rename to ...
11812 (s390_regsets): ... this, and make static.
11813 (s390_get_pc, s390_set_pc): Adjust.
11814 (s390_get_hwcap): New target_desc parameter, and use it.
11815 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11816 (s390_arch_setup): Adjust to set the current process'es target
11817 description. Don't adjust the regmap.
11818 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11819 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11820 (regs_info_3264): New globals.
11821 (s390_regs_info): New function.
11822 (the_low_target): Adjust.
11823 (initialize_low_arch): New function.
11824 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11825 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11826 [__mips64] (init_registers_mips_linux)
11827 (init_registers_mips_dsp_linux): Delete defines.
11828 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11829 (have_dsp): New global.
11830 (mips_read_description): New, based on mips_arch_setup.
11831 (mips_arch_setup): Reimplement.
11832 (get_usrregs_info): New function.
11833 (mips_cannot_fetch_register, mips_cannot_store_register)
11834 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11835 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11836 (target_regsets): Rename to ...
11837 (mips_regsets): ... this, and make static.
11838 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11839 (dsp_regs_info, regs_info): New globals.
11840 (mips_regs_info): New function.
11841 (the_low_target): Adjust.
11842 (initialize_low_arch): New function.
11843 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11844 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11846 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11847 (arm_read_description): New, with bits factored from
11849 (arm_arch_setup): Reimplement.
11850 (target_regsets): Rename to ...
11851 (arm_regsets): ... this, and make static.
11852 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11853 (arm_regs_info): New function.
11854 (the_low_target): Adjust.
11855 (initialize_low_arch): New function.
11856 * linux-m68k-low.c (tdesc_m68k): Declare.
11857 (target_regsets): Rename to ...
11858 (m68k_regsets): ... this, and make static.
11859 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11860 (m68k_regs_info): New function.
11861 (m68k_arch_setup): New function.
11862 (the_low_target): Adjust.
11863 (initialize_low_arch): New function.
11864 * linux-sh-low.c (tdesc_sharch): Declare.
11865 (target_regsets): Rename to ...
11866 (sh_regsets): ... this, and make static.
11867 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11868 (sh_regs_info, sh_arch_setup): New functions.
11869 (the_low_target): Adjust.
11870 (initialize_low_arch): New function.
11871 * linux-bfin-low.c (tdesc_bfin): Declare.
11872 (bfin_arch_setup): New function.
11873 (bfin_usrregs_info, regs_info): New globals.
11874 (bfin_regs_info): New function.
11875 (the_low_target): Adjust.
11876 (initialize_low_arch): New function.
11877 * linux-cris-low.c (tdesc_cris): Declare.
11878 (cris_arch_setup): New function.
11879 (cris_usrregs_info, regs_info): New globals.
11880 (cris_regs_info): New function.
11881 (the_low_target): Adjust.
11882 (initialize_low_arch): New function.
11883 * linux-cris-low.c (tdesc_crisv32): Declare.
11884 (cris_arch_setup): New function.
11885 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11886 (cris_regs_info): New function.
11887 (the_low_target): Adjust.
11888 (initialize_low_arch): New function.
11889 * linux-m32r-low.c (tdesc_m32r): Declare.
11890 (m32r_arch_setup): New function.
11891 (m32r_usrregs_info, regs_info): New globals.
11892 (m32r_regs_info): Adjust.
11893 (initialize_low_arch): New function.
11894 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11895 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11896 (tic6x_usrregs_info): Forward declare.
11897 (tic6x_read_description): New function, based on ...
11898 (tic6x_arch_setup): ... this. Reimplement.
11899 (target_regsets): Rename to ...
11900 (tic6x_regsets): ... this, and make static.
11901 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11902 (tic6x_regs_info): New function.
11903 (the_low_target): Adjust.
11904 (initialize_low_arch): New function.
11905 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11906 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11907 (target_regsets): Rename to ...
11908 (xtensa_regsets): ... this, and make static.
11909 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11911 (xtensa_arch_setup, xtensa_regs_info): New functions.
11912 (the_low_target): Adjust.
11913 (initialize_low_arch): New function.
11914 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11915 (nios2_arch_setup): Set the current process'es tdesc.
11916 (target_regsets): Rename to ...
11917 (nios2_regsets): ... this.
11918 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11919 (nios2_regs_info): New function.
11920 (the_low_target): Adjust.
11921 (initialize_low_arch): New function.
11922 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11923 (aarch64_arch_setup): Set the current process'es tdesc.
11924 (target_regsets): Rename to ...
11925 (aarch64_regsets): ... this.
11926 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11927 (aarch64_regs_info): New function.
11928 (the_low_target): Adjust.
11929 (initialize_low_arch): New function.
11930 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11932 (target_regsets): Rename to ...
11933 (tile_regsets): ... this.
11934 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11935 (tile_regs_info): New function.
11936 (tile_arch_setup): Set the current process'es tdesc.
11937 (the_low_target): Adjust.
11938 (initialize_low_arch): New function.
11939 * spu-low.c (tdesc_spu): Declare.
11940 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11941 * win32-arm-low.c (tdesc_arm): Declare.
11942 (arm_arch_setup): New function.
11943 (the_low_target): Install arm_arch_setup instead of
11944 init_registers_arm.
11945 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11946 (init_windows_x86): Rename to ...
11947 (i386_arch_setup): ... this. Set `win32_tdesc'.
11948 (the_low_target): Adjust.
11949 * win32-low.c (win32_tdesc): New global.
11950 (child_add_thread): Don't create the thread cache here.
11951 (do_initial_child_stuff): Set the new process'es tdesc.
11952 * win32-low.h (struct target_desc): Forward declare.
11953 (win32_tdesc): Declare.
11954 * lynx-i386-low.c (tdesc_i386): Declare global.
11955 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11956 * lynx-low.c (lynx_tdesc): New global.
11957 (lynx_add_process): Set the new process'es tdesc.
11958 * lynx-low.h (struct target_desc): Forward declare.
11959 (lynx_tdesc): Declare global.
11960 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11961 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11962 * nto-low.c (nto_tdesc): New global.
11963 (do_attach): Set the new process'es tdesc.
11964 * nto-low.h (struct target_desc): Forward declare.
11965 (nto_tdesc): Declare.
11966 * nto-x86-low.c (tdesc_i386): Declare.
11967 (nto_x86_arch_setup): Set `nto_tdesc'.
11969 2013-06-04 Gary Benson <gbenson@redhat.com>
11971 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11972 to qSupported response when appropriate.
11973 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11974 with nonzero-length annex.
11975 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11976 arguments supplied in annex.
11978 2013-05-31 Doug Evans <dje@google.com>
11981 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11982 64 bits in 64-cross-32 environment.
11984 2013-05-28 Pedro Alves <palves@redhat.com>
11986 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11987 (aarch64-without-fpu.c): Delete rule.
11988 * configure.srv (aarch64*-*-linux*): Remove references to
11989 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11990 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11993 2013-05-24 Pedro Alves <palves@redhat.com>
11995 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11996 instead of strchr/decode_address. Error if the range isn't split
11997 with a ','. Don't assume there's be a ':' in the action.
11999 2013-05-23 Yao Qi <yao@codesourcery.com>
12000 Pedro Alves <palves@redhat.com>
12002 * linux-low.c (lwp_in_step_range): New function.
12003 (linux_wait_1): If the thread was range stepping and stopped
12004 outside the stepping range, report the stop to GDB. Otherwise,
12005 continue stepping. Add range stepping debug output.
12006 (linux_set_resume_request): Copy the step range from the resume
12007 request to the lwp.
12008 (linux_supports_range_stepping): New.
12009 (linux_target_ops) <supports_range_stepping>: Set to
12010 linux_supports_range_stepping.
12011 * linux-low.h (struct linux_target_ops)
12012 <supports_range_stepping>: New field.
12013 (struct lwp_info) <step_range_start, step_range_end>: New fields.
12014 * linux-x86-low.c (x86_supports_range_stepping): New.
12015 (the_low_target) <supports_range_stepping>: Set to
12016 x86_supports_range_stepping.
12017 * server.c (handle_v_cont): Handle 'r' action.
12018 (handle_v_requests): Append ";r" if the target supports range
12020 * target.h (struct thread_resume) <step_range_start,
12021 step_range_end>: New fields.
12022 (struct target_ops) <supports_range_stepping>:
12024 (target_supports_range_stepping): New macro.
12026 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12028 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
12029 confusion in comment.
12031 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12033 * lynx-low.c (struct process_info_private): New type.
12034 (lynx_add_process): New function.
12035 (lynx_create_inferior, lynx_attach): Replace calls to
12036 add_process by calls to lynx_add_process.
12037 (lynx_resume): If PTID is null, then try using
12038 current_process()->private->last_wait_event_ptid.
12040 (lynx_clear_inferiors): Delete. The contents of that function
12041 has been inlined in lynx_mourn;
12042 (lynx_wait_1): Save the ptid in the process's private data.
12043 (lynx_mourn): Free the process' private data. Replace call
12044 to lynx_clear_inferiors by call to clear_inferiors.
12046 2013-05-17 Yao Qi <yao@codesourcery.com>
12048 * i386-low.c (i386_length_and_rw_bits): Move the comment to
12051 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
12053 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
12054 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
12055 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
12056 PT_TEXT_END_ADDR guards. Update comments.
12057 (linux_target_op) <read_offsets>: Conditionally define to
12058 linux_read_offsets if the target is UCLIBC and if it defines
12059 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
12061 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12062 Andrew Jenner <andrew@codesourcery.com>
12064 * Makefile.in (SFILES): Add linux-nios2-low.c.
12065 (clean): Add action to delete nios2-linux.c.
12066 (nios2-linux.c): New rule.
12067 * configure.srv: Add nios2*-*-linux*.
12068 * linux-nios2-low.c: New.
12070 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12072 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12074 2013-04-25 Hui Zhu <hui@codesourcery.com>
12077 * ax.c (ax_printf): Add fflush.
12079 2013-04-22 Tom Tromey <tromey@redhat.com>
12081 * Makefile.in (SFILES): Add filestuff.c.
12082 (OBS): Add filestuff.o.
12083 (filestuff.o): New target.
12084 * config.in, configure: Rebuild.
12085 * configure.ac: Check for fdwalk, pipe2.
12087 2013-04-17 Pedro Alves <palves@redhat.com>
12089 * configure.ac (USE_THREAD_DB): Delete variable.
12090 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12091 Don't AC_SUBST USE_THREAD_DB.
12092 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12093 * config.in, configure: Regenerate.
12095 2013-04-16 Pedro Alves <palves@redhat.com>
12097 * linux-low.h (struct lwp_info) <thread_known>: Move under
12098 the USE_THREAD_DB #ifdef.
12100 2013-04-16 Pedro Alves <palves@redhat.com>
12102 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12103 (linux-low.o): Delete rule.
12104 * linux-low.h: Always include "gdb_thread_db.h" instead of
12105 conditionally including thread_db.h.
12106 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12109 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12111 * Makefile.in (install-only): Fix make install regression.
12113 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12115 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12116 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12118 * gdbserver.1: Remove.
12120 2013-03-22 Pedro Alves <palves@redhat.com>
12122 * linux-low.c (handle_extended_wait): Don't call
12123 linux_enable_event_reporting.
12125 2013-03-15 Tony Theodore <tonyt@logyst.com>
12128 * Makefile.in (SHELL): Use @SHELL@.
12130 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12132 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12135 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12137 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12138 Remove extraneous NULL element.
12140 2013-03-13 Yao Qi <yao@codesourcery.com>
12142 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12143 'V' block in trace frame.
12145 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12147 * target.h (struct target_ops): Add btrace ops.
12148 (target_supports_btrace): New macro.
12149 (target_enable_btrace): New macro.
12150 (target_disable_btrace): New macro.
12151 (target_read_btrace): New macro.
12152 * gdbthread.h (struct thread_info): Add btrace field.
12153 * server.c: Include btrace-common.h.
12154 (handle_btrace_general_set): New function.
12155 (handle_btrace_enable): New function.
12156 (handle_btrace_disable): New function.
12157 (handle_general_set): Call handle_btrace_general_set.
12158 (handle_qxfer_btrace): New function.
12159 (struct qxfer qxfer_packets[]): Add btrace entry.
12160 * inferiors.c (remove_thread): Disable btrace.
12161 * linux-low: Include linux-btrace.h.
12162 (linux_low_enable_btrace): New function.
12163 (linux_low_read_btrace): New function.
12164 (linux_target_ops): Add btrace ops.
12165 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
12166 Add srv_linux_btrace=yes.
12167 (x86_64-*-linux*): Add linux-btrace.o.
12168 Add srv_linux_btrace=yes.
12169 * configure.ac: Define HAVE_LINUX_BTRACE.
12170 * config.in: Regenerated.
12171 * configure: Regenerated.
12173 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12175 * server.c (handle_qxfer): Preserve error message if -3 is
12177 (qxfer): Document the -3 return value.
12179 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12181 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
12182 (linux_btrace_h): New variable.
12183 (linux-btrace.o): New rule.
12185 2013-03-08 Stan Shebs <stan@codesourcery.com>
12186 Hafiz Abid Qadeer <abidh@codesourcery.com>
12188 * tracepoint.c (trace_buffer_size): New global.
12189 (DEFAULT_TRACE_BUFFER_SIZE): New define.
12190 (init_trace_buffer): Change to one-argument function. Allocate
12191 trace buffer memory.
12192 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
12193 handle QTBuffer:size packet.
12194 (cmd_bigqtbuffer_size): New function.
12195 (initialize_tracepoint): Call init_trace_buffer with
12196 DEFAULT_TRACE_BUFFER_SIZE.
12197 * server.c (handle_query): Add QTBuffer:size in the
12200 2013-03-07 Yao Qi <yao@codesourcery.com>
12202 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
12203 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
12205 (cmd_qtsp): Adjust condition. Do post increment.
12206 Set cur_action and cur_step_action back to 0.
12208 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
12211 * linux-low.c (linux_write_memory): Return early success if LEN is
12214 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
12216 * configure.srv: Add x86_64-*-cygwin* as target.
12218 2013-02-28 Tom Tromey <tromey@redhat.com>
12220 * configure.ac: Invoke AC_SYS_LARGEFILE.
12221 * configure, config.in: Rebuild.
12223 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
12225 * win32-low.c: Throughout, fix format strings and casts of
12226 printf-like functions to avoid type related warnings on all
12228 (get_child_debug_event): Print dwDebugEventCode as hex since
12229 that's how it's usually documented.
12231 2013-02-28 Yao Qi <yao@codesourcery.com>
12233 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
12236 2013-02-27 Jiong Wang <jiwang@tilera.com>
12238 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
12239 (reg-tilegx32.c): New rule.
12240 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
12241 * linux-tile-low.c (tile_arch_setup): New function. Invoke
12242 different register info initializer according to elf class.
12243 (init_registers_tilgx32): New function. The tilegx32 register info
12245 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
12246 (tile_store_gregset): Likewise.
12248 2013-02-27 Yao Qi <yao@codesourcery.com>
12250 * server.c (process_point_options): Print debug message when
12251 debug_threads is true.
12253 2013-02-26 Yao Qi <yao@codesourcery.com>
12255 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
12257 2013-02-19 Pedro Alves <palves@redhat.com>
12258 Kai Tietz <ktietz@redhat.com>
12262 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
12263 instead of strtoul to extract address from packet.
12264 (process_serial_event) <'z'>: Likewise.
12266 2013-02-18 Yao Qi <yao@codesourcery.com>
12268 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
12270 2013-02-14 Pedro Alves <palves@redhat.com>
12274 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
12275 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
12277 2013-02-14 Pedro Alves <palves@redhat.com>
12279 * tracepoint.c (cmd_qtdpsrc): Use savestring.
12281 2013-02-14 Pedro Alves <palves@redhat.com>
12283 * tracepoint.c (save_string): Delete.
12284 (add_tracepoint_action): Use savestring instead of save_string.
12286 2013-02-12 Pedro Alves <palves@redhat.com>
12288 * linux-xtensa-low.c: Ditto.
12289 * xtensa-xtregs.c: Ditto.
12291 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
12293 * thread-db.c (thread_db_get_tls_address): NULL pointer check
12296 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12298 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
12299 aarch64_num_wp_regs and aarch64_num_bp_regs to
12300 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
12302 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12304 * linux-aarch64-low.c (ps_get_thread_area): Replace
12305 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
12307 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
12308 Marcus Shawcroft <marcus.shawcroft@arm.com>
12309 Nigel Stephens <nigel.stephens@arm.com>
12310 Yufeng Zhang <yufeng.zhang@arm.com>
12312 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
12313 (aarch64.c, aarch64-without-fpu.c): New targets.
12314 * configure.srv (aarch64*-*-linux*): New.
12315 * linux-aarch64-low.c: New file.
12317 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
12319 * linux-low.c (handle_extended_wait, linux_create_inferior)
12320 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
12321 (dequeue_one_deferred_signal, linux_resume_one_thread)
12322 (fetch_register, linux_write_memory, linux_enable_event_reporting)
12323 (linux_tracefork_grandchild, linux_test_for_tracefork)
12324 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
12325 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
12326 where the argument is 0.
12328 2013-01-25 Yao Qi <yao@codesourcery.com>
12330 * event-loop.c: Include "queue.h".
12331 (gdb_event_p): New typedef.
12332 (struct gdb_event) <next_event>: Remove.
12333 (event_queue): Change to QUEUE(gdb_event_p).
12334 (async_queue_event): Remove.
12335 (gdb_event_xfree): New.
12336 (initialize_event_loop): New.
12337 (process_event): Use API from QUEUE.
12338 (wait_for_event): Likewise.
12339 * server.c (main): Call initialize_event_loop.
12340 * server.h (initialize_event_loop): Declare.
12342 2013-01-18 Yao Qi <yao@codesourcery.com>
12344 * ax.h (struct eval_agent_expr_context): New.
12345 (gdb_eval_agent_expr): Update declaration.
12346 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
12347 TFRAME. Add new argument CTX.
12348 * server.h (struct eval_agent_expr_context): Declare.
12349 (agent_mem_read, agent_tsv_read): Update declaration.
12350 (agent_mem_read_string): Likewise.
12351 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
12352 (add_traceframe_block): Add new argument TPOINT.
12353 Increase TPOINT->traceframe_usage.
12354 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
12355 eval_tracepoint_agent_expr.
12356 (condition_true_at_tracepoint): Likewise.
12357 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
12358 (agent_mem_read_string, agent_tsv_read): Likewise.
12360 2013-01-16 Yao Qi <yao@codesourcery.com>
12362 * linux-low.c (linux_resume_one_lwp): Don't check
12363 'lwp->bp_reinsert != 0'.
12365 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12366 Pedro Alves <palves@redhat.com>
12368 * lynx-low.c (ptrace_request_to_str): Define a temporary
12369 macro and use it to simplify this function's implementation.
12371 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12373 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12376 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12378 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12380 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12382 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12384 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12386 * lynx-low.c (lynx_resume): Use the resume_info parameter
12387 to determine the ptid for the lynx_ptrace call, unless
12388 it is equal to minus_one_ptid, in which case we use the
12389 ptid of the current_inferior.
12390 (lynx_wait_1): After having received a thread create/exit
12391 event, resume the inferior's execution using the signaling
12392 thread's ptid, rather than the old ptid.
12394 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12396 * lynx-low.c (lynx_resume): Delete variable ret.
12398 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12400 * gdbreplay.c (gdbreplay_version): Update copyright year.
12401 * server.c (gdbserver_version): Likewise.
12403 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12405 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12408 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12410 * lynx-low.c (ptrace_request_to_str): Add handling for
12411 PTRACE_GETTRACESIG.
12413 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12415 * lynx-low.c (lynx_attach): Delete variable new_process.
12417 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12419 * lynx-low.c (lynx_create_inferior): Delete variable
12422 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12424 * lynx-low.c (ptrace_request_to_str): Do not handle
12425 PTRACE_GETTHREADLIST if this macro does not exist.
12427 2012-12-15 Yao Qi <yao@codesourcery.com>
12429 * Makefile.in (OBS): Add notif.o.
12430 * notif.c, notif.h: New.
12431 * server.c: Include "notif.h".
12432 (struct vstop_notif) <next>: Remove.
12434 (queue_stop_reply): Update.
12435 (push_event, send_next_stop_reply): Remove.
12436 (discard_queued_stop_replies): Update.
12437 (notif_stop): New variable.
12438 (handle_v_stopped): Remove.
12439 (handle_v_requests): Don't call handle_v_stopped. Call
12440 handle_ack_notif instead.
12441 (queue_stop_reply_callback): Call notif_event_enque instead
12442 of queue_stop_reply.
12443 (handle_status): Don't call send_next_stop_reply, call
12444 notif_write_event instead.
12445 (kill_inferior_callback): Likewise.
12446 (detach_or_kill_inferior_callback): Likewise.
12447 (main): Call initialize_notif.
12448 (process_serial_event): Call QUEUE_is_empty.
12449 (handle_target_event): Call notif_push instead of push event.
12450 * server.h (push_event): Remove declaration.
12452 2012-12-10 Tom Tromey <tromey@redhat.com>
12454 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12455 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12458 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12459 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12460 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12461 (amd64-linux-ipa.o, ax.o): Rewrite.
12462 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12463 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12464 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12465 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12466 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12467 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12468 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12469 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12470 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12471 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12472 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12473 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12474 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12475 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12476 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12477 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12478 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12479 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12480 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12481 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12482 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12483 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12484 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12485 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12486 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12487 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12488 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12489 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12490 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12491 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12492 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12493 (reg-tilegx.o): Remove.
12494 (all_object_files): New macro.
12495 Include .deps files.
12496 * aclocal.m4, configure: Rebuild.
12497 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12498 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12499 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12501 2012-12-05 Tom Tromey <tromey@redhat.com>
12504 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12506 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12508 * configure.ac: Check for linux/perf_event.h.
12509 * config.in: Regenerated.
12510 * configure: Regenerated.
12512 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12514 * hostio.c (handle_readlink): Decrease buffer size
12515 parameter passed to readlink by one byte.
12517 2012-11-26 Yao Qi <yao@codesourcery.com>
12519 * configure.ac (build_warnings): Append '-Wempty-body'.
12520 * configure: Regenerated.
12521 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12524 2012-11-15 Pierre Muller <muller@sourceware.org>
12526 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12527 * config.in: Regenerate.
12528 * configure: Regenerate.
12529 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12530 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12531 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12532 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12534 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12535 instead of <sys/wait.h> header.
12536 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12538 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12540 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12541 (various make rules): Remove -DGDBSERVER
12543 2012-11-09 Yao Qi <yao@codesourcery.com>
12545 * spu-low.c (current_ptid): Move it to ..
12546 * gdbthread.h: ... here. New.
12547 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12548 * server.c (myresume, process_serial_event): Likewise.
12549 * thread-db.c (thread_db_find_new_threads): Likewise.
12550 * tracepoint.c (run_inferior_command): Likewise.
12552 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12554 * server.c (handle_search_memory_1): Include access length in
12557 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12559 * linux-crisv32-low.c: Fix compile errors.
12561 2012-09-04 Yao Qi <yao@codesourcery.com>
12563 * tracepoint.c (cmd_qtsv): Adjust debug message.
12564 Don't check CUR_TPOINT.
12566 2012-08-28 Yao Qi <yao@codesourcery.com>
12568 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12569 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12570 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12571 Remove declarations of xmalloc, xreallloc, xstrdup and
12573 * Makefile.in (libiberty_h): New.
12574 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12575 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12577 2012-08-23 Yao Qi <yao@codesourcery.com>
12579 * server.h: Remove declaration of 'xsnprintf'.
12581 2012-08-22 Keith Seitz <keiths@redhat.com>
12583 * server.h: Include build-gnulib-gbserver/config.h.
12584 * gdbreplay.c: Likewise.
12586 2012-08-08 Doug Evans <dje@google.com>
12588 * Makefile.in (SFILES): Add gdb_vecs.c.
12589 (OBS): Add gdb_vecs.o.
12590 (gdb_vecs_h, host_defs_h): New variables.
12591 (thread-db.o): Add $(gdb_vecs_h) dependency.
12592 (gdb_vecs.o): New rule.
12593 * thread-db.c: #include "gdb_vecs.h".
12594 (thread_db_load_search): Use a vector to iterate over path elements.
12595 Handle text appearing after "$pdir".
12597 * configure.ac: Add check for strstr.
12598 * config.in: Regenerate.
12599 * configure: Regenerate.
12601 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12603 * hostio.c (handle_pread): If pread fails, fall back to attempting
12605 (handle_pwrite): Likewise for pwrite.
12607 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12609 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12610 between unsupported TYPE and unimplementable ADDR/LEN combination.
12611 (arm_insert_point): Act on new return value.
12613 2012-07-31 Pedro Alves <palves@redhat.com>
12615 * server.c (process_point_options): Only skip tokens if we find
12616 one that is unrecognized. Don't treat 'X' specially while
12617 skipping unrecognized tokens.
12619 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12621 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12622 to 4-byte-align HW breakpoint addresses for Thumb.
12624 2012-07-27 Yao Qi <yao@codesourcery.com>
12628 * server.h: Declare gdb_agent_about_to_close.
12629 * target.c (kill_inferior): Include "agent.h".
12630 New. Send command 'kill'.
12631 * target.h (kill_inferior): Removed macro.
12632 * tracepoint.c (gdb_agent_about_to_close): New.
12633 (gdb_agent_helper_thread): Handle command 'close'.
12634 Wait endlessly until the inferior stops.
12635 Install gdb_agent_remove_socket to atexit hook.
12636 (agent_socket_name): New static variable.
12637 (gdb_agent_socket_init): Replace local variable 'name' with
12638 'agent_socket_name'.
12639 (gdb_agent_remove_socket): New.
12641 2012-07-27 Yao Qi <yao@codesourcery.com>
12643 * server.c (process_point_options): Stop at 'X' when parsing.
12645 2012-07-19 Michael Eager <eager@eagercon.com>
12647 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12649 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12650 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12651 hardware breakpoint.
12653 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12655 * gdbserver/linux-low.c (initialize_low): Call
12656 linux_ptrace_init_warnings.
12658 2012-07-02 Doug Evans <dje@google.com>
12660 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12663 2012-07-02 Stan Shebs <stan@codesourcery.com>
12665 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12666 (ax.o): Add it to build rule.
12668 (OBS): Add format.o.
12669 (IPA_OBS): Add format.o.
12670 * server.c (handle_query): Claim support for breakpoint commands.
12671 (process_point_options): Add command case.
12672 (process_serial_event): Leave running if there are printfs in
12674 * mem-break.h (any_persistent_commands): Declare.
12675 (add_breakpoint_commands): Declare.
12676 (gdb_no_commands_at_breakpoint): Declare.
12677 (run_breakpoint_commands): Declare.
12678 * mem-break.c (struct point_command_list): New struct.
12679 (struct breakpoint): New field command_list.
12680 (any_persistent_commands): New function.
12681 (add_commands_to_breakpoint): New function.
12682 (add_breakpoint_commands): New function.
12683 (gdb_no_commands_at_breakpoint): New function.
12684 (run_breakpoint_commands): New function.
12685 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12687 * ax.c: Include format.h.
12688 (ax_printf): New function.
12689 (gdb_eval_agent_expr): Add printf opcode.
12691 2012-06-13 Yao Qi <yao@codesourcery.com>
12693 * server.c (start_inferior): Remove duplicated writes to fields
12694 'last_resume_kind' and 'last_status' of 'current_inferior'.
12696 2012-06-12 Yao Qi <yao@codesourcery.com>
12697 Pedro Alves <palves@redhat.com>
12699 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12701 * server.c (handle_v_cont): Extend comment.
12703 2012-06-11 Yao Qi <yao@codesourcery.com>
12705 * linux-low.c (linux_attach): Add 'static'.
12707 2012-06-06 Yao Qi <yao@codesourcery.com>
12709 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12711 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12713 Fix gcc -flto compilation warning.
12714 * server.c (main): Make variable multi_mode and attach volatile.
12716 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12718 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12719 if the platform doesn't know about it.
12721 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12723 * Makefile.in (SFILES): Add linux-tile-low.c.
12724 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12725 * configure.srv: Handle tilegx-*-linux*.
12726 * linux-tile-low.c: New file.
12728 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12730 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12732 2012-05-24 Pedro Alves <palves@redhat.com>
12736 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12738 2012-05-24 Pedro Alves <palves@redhat.com>
12742 Replace target_signal with gdb_signal throughout.
12744 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12746 * linux-low.c (linux_store_registers): Avoid the copying sequence
12747 when no data has been retrieved by ptrace.
12749 2012-05-22 Will Deacon <will.deacon@arm.com>
12751 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12752 Include asm/ptrace.h.
12753 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12756 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12758 * linux-low.c (linux_store_registers): Don't re-retrieve data
12759 with ptrace that has already been obtained from /proc. Always
12760 copy any data retrieved with ptrace to the buffer supplied.
12762 2012-05-11 Yao Qi <yao@codesourcery.com>
12763 Pedro Alves <palves@redhat.com>
12765 * linux-low.c (enum stopping_threads_kind): New.
12766 (stopping_threads): Change type to `enum stopping_threads_kind'.
12767 (handle_extended_wait): If stopping and suspending threads, leave
12768 the new_lwp suspended too.
12769 (linux_wait_for_event): Adjust.
12770 (stop_all_lwps): Set `stopping_threads' to
12771 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12772 whether we're suspending threads or just stopping them. Assert no
12775 2012-04-29 Yao Qi <yao@codesourcery.com>
12777 * server.h: Move some code to ...
12778 * gdbthread.h: ... here. New.
12779 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12780 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12781 (nto-low.o, win32-low.o): Likewise.
12782 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12783 * regcache.c, remote-utils.c, server.c: Likewise.
12784 * target.c, tracepoint.c, win32-low.c: Likewise.
12786 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12788 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12789 (PTRACE_ARG4_TYPE): Likewise.
12790 (PTRACE_XFER_TYPE): Likewise.
12791 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12792 ptrace to PTRACE_ARG3_TYPE.
12793 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12794 (PTRACE_ARG4_TYPE): Likewise.
12795 (PTRACE_XFER_TYPE): Likewise.
12796 (linux_detach_one_lwp): Cast fourth argument of
12797 ptrace to long then PTRACE_ARG4_TYPE.
12798 (regsets_fetch_inferior_registers): Cast third argument of
12799 ptrace to long then PTRACE_ARG3_TYPE.
12800 (regsets_store_inferior_registers): Likewise.
12802 2012-04-20 Pedro Alves <palves@redhat.com>
12804 * configure: Regenerate.
12806 2012-04-19 Pedro Alves <palves@redhat.com>
12808 * Makefile.in (GNULIB_BUILDDIR): New.
12809 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12810 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12811 (all, install-only, uninstall, clean-info, all-lib, clean): No
12812 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12813 (maintainer-clean realclean distclean): Use subdir_do.
12815 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12816 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12817 * acinclude.m4: Include acx_configure_dir.m4.
12818 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12819 calls. Call AC_PROG_RANLIB. Configure gnulib using
12822 (GNULIB_STDINT_H): Adjust.
12823 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12824 * gdbreplay.c: Include build-gnulib/config.h.
12825 * server.h: Likewise.
12826 * aclocal.m4: Regenerate.
12827 * config.in: Regenerate.
12828 * configure: Regenerate.
12830 2012-04-19 Pedro Alves <palves@redhat.com>
12832 * Makefile.in (LIBGNU, INCGNU): Adjust.
12833 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12834 (all, install-only, uninstall, clean-info, all-lib, clean)
12835 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12836 * configure.ac: Adjust AC_OUTPUT output.
12837 * aclocal.m4: Regenerate.
12838 * configure: Regenerate.
12840 2012-04-19 Pedro Alves <palves@redhat.com>
12842 * Makefile.in (generated_files): New.
12843 (server_h): Remove the explicit dependency on config.h, and depend
12844 on $generated_files.
12846 2012-04-19 Pedro Alves <palves@redhat.com>
12848 * Makefile.in (INCGNU): Add -Ignulib.
12850 2012-04-19 Pedro Alves <palves@redhat.com>
12852 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12853 (INCGNU): ... this, and spell out -I here.
12854 (GNULIB_LIB): Rename to ...
12855 (LIBGNU): ... this.
12856 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12858 2012-04-19 Pedro Alves <palves@redhat.com>
12860 * config.in: Regenerate.
12862 2012-04-19 Pedro Alves <palves@redhat.com>
12864 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12865 * server.h (memmem): Remove declaration.
12866 * config.in: Regenerate.
12867 * configure: Regenerate.
12869 2012-04-19 Yao Qi <yao@codesourcery.com>
12871 * Makefile.in (SFILES): Add common/vec.c.
12875 2012-04-19 Yao Qi <yao@codesourcery.com>
12877 * remote-utils.c (prepare_resume_reply): Replace with macro
12878 target_core_of_thread.
12879 * server.c (handle_qxfer_threads_proper): Likewise.
12880 * target.h (traget_core_of_thread): New macro.
12882 2012-04-18 Pedro Alves <palves@redhat.com>
12884 * aclocal.m4: Regenerate.
12885 * configure: Regenerate.
12887 2012-04-16 Yao Qi <yao@codesourcery.com>
12889 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12890 duplicated on address.
12892 2012-04-16 Yao Qi <yao@codesourcery.com>
12894 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12895 (struct tracepoint_action_ops) <send>: New field.
12896 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12897 (agent_expr_send, x_tracepoint_action_send): New.
12898 (l_tracepoint_action_send): New.
12899 (cmd_qtdp): Download and install tracepoint
12900 according to `use_agent'.
12901 (run_inferior_command): Add one more parameter `len'.
12903 (tracepoint_send_agent): New.
12904 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12906 2012-04-16 Yao Qi <yao@codesourcery.com>
12908 * tracepoint.c (download_tracepoints): Moved to ...
12909 (cmd_qtstart): ... here.
12911 2012-04-14 Yao Qi <yao@codesourcery.com>
12913 * tracepoint.c: Include inttypes.h.
12914 (struct collect_memory_action): Use sized types.
12915 (struct tracepoint): Likewise.
12916 (cmd_qtdp, stop_tracing): Update print specifiers.
12917 (cmd_qtp, response_tracepoint): Likewise.
12918 (collect_data_at_tracepoint): Likewise.
12919 (collect_data_at_step): Likewise.
12921 2012-04-14 Yao Qi <yao@codesourcery.com>
12923 Import gnulib module inttypes.
12924 * aclocal.m4, config.in, configure: Regenerated.
12926 2012-04-14 Yao Qi <yao@codesourcery.com>
12928 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12929 Makefile and config.status at last.
12931 2012-04-13 Yao Qi <yao@codesourcery.com>
12933 * tracepoint.c: Include stdint.h unconditionally.
12935 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12937 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12938 on BFD_HAVE_SYS_PROCFS_TYPE.
12939 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12940 * configure: Regenerate.
12941 * config.in: Likewise.
12943 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12945 * Makefile.in (clean): Also remove x32.c x32-linux.c
12946 x32-avx.c x32-avx-linux.c.
12947 (x32.o): New target.
12949 (x32-linux.o): Likewise.
12950 (x32-linux.c): Likewise.
12951 (x32-avx.o): Likewise.
12952 (x32-avx.c): Likewise.
12953 (x32-avx-linux.o): Likewise.
12954 (x32-avx-linux.c): Likewise.
12956 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12957 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12958 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12959 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12960 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12961 i386/x32-avx-linux.xml.
12963 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12964 (init_registers_x32_avx_linux): Likwise.
12965 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12966 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12968 2012-04-13 Pedro Alves <palves@redhat.com>
12970 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12971 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12972 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12973 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12976 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12978 * linux-x86-low.c (compat_x32_clock_t): New.
12979 (compat_x32_siginfo_t): Likewise.
12980 (compat_x32_siginfo_from_siginfo): Likewise.
12981 (siginfo_from_compat_x32_siginfo): Likewise.
12982 (linux_is_elf64): Likewise.
12983 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12984 and siginfo_from_compat_x32_siginfo for x32.
12985 (x86_arch_setup): Set linux_is_elf64.
12987 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12990 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12992 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12993 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12994 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12995 compatible with process.
12997 2012-04-12 Yao Qi <yao@codesourcery.com>
12999 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
13000 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
13001 (install-only, install-info, clean): Handle sub dir gnulib.
13002 (all-lib, am--refresh): New targets.
13003 (memmem.o): Remove target.
13004 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
13005 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
13006 (AC_REPLACE_FUNCS): Remove memmem.
13007 Invoke gl_INIT and AM_INIT_AUTOMAKE.
13008 (AC_OUTPUT): Generate Makefile in gnulib/.
13009 * aclocal.m4, config.in, configure: Regenerated.
13011 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
13013 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
13015 2012-04-05 Pedro Alves <palves@redhat.com>
13017 -Werror=strict-aliasing
13019 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
13022 2012-04-04 Pedro Alves <palves@redhat.com>
13024 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13025 (sparc_store_gregset_from_stack, sparc_store_gregset)
13026 (sparc_breakpoint_at): Fix formatting.
13028 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13030 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
13032 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
13033 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
13034 * config.in: Regenerate.
13035 * configure: Likewise.
13037 2012-03-29 Pedro Alves <palves@redhat.com>
13039 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
13040 Correct ptrace arguments.
13042 2012-03-28 Pedro Alves <palves@redhat.com>
13044 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
13045 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
13046 (IA64_FR1_REGNUM): New defines.
13047 (ia64_fetch_register): New.
13048 (the_low_target): Install it.
13049 * linux-low.h (struct linux_target_ops) <fetch_register>: New
13051 * linux-low.c (linux_fetch_registers): Try the
13052 the_low_target.fetch_register hook first.
13054 * linux-arm-low.c (the_low_target): Adjust.
13055 * linux-bfin-low.c (the_low_target): Adjust.
13056 * linux-cris-low.c (the_low_target): Adjust.
13057 * linux-crisv32-low.c (the_low_target): Adjust.
13058 * linux-m32r-low.c (the_low_target): Adjust.
13059 * linux-m68k-low.c (the_low_target): Adjust.
13060 * linux-mips-low.c (the_low_target): Adjust.
13061 * linux-ppc-low.c (the_low_target): Adjust.
13062 * linux-s390-low.c (the_low_target): Adjust.
13063 * linux-sh-low.c (the_low_target): Adjust.
13064 * linux-sparc-low.c (the_low_target): Adjust.
13065 * linux-tic6x-low.c (the_low_target): Adjust.
13066 * linux-x86-low.c (the_low_target): Adjust.
13067 * linux-xtensa-low.c (the_low_target): Adjust.
13069 2012-03-26 Pedro Alves <palves@redhat.com>
13071 * server.c (handle_qxfer_libraries): Don't bail early if
13072 the_target->qxfer_libraries_svr4 is not NULL.
13074 2012-03-26 Pedro Alves <palves@redhat.com>
13076 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13078 2012-03-23 Pedro Alves <palves@redhat.com>
13080 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13081 "library-list-svr4" element's start tag when the the DSO list is
13084 2012-03-23 Pedro Alves <palves@redhat.com>
13086 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13087 a variable whose type size is the same as the inferior's pointer
13090 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13092 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13094 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13095 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13096 * linux-low.h: Include <signal.h>.
13097 (struct siginfo): Remove forward declaration.
13098 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13101 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13103 * .gitignore: Ignore more files.
13105 2012-03-19 Pedro Alves <palves@redhat.com>
13106 Jan Kratochvil <jan.kratochvil@redhat.com>
13108 * server.c (cont_thread, general_thread): Add describing comments.
13109 (start_inferior): Clear `cont_thread'.
13110 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13113 2012-03-15 Yao Qi <yao@codesourcery.com>
13115 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13117 (cmd_qtdp): ... here.
13119 2012-03-15 Yao Qi <yao@codesourcery.com>
13121 * tracepoint.c (struct tracepoint_action_ops): New.
13122 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13123 (m_tracepoint_action_download): New.
13124 (r_tracepoint_action_download): New.
13125 (x_tracepoint_action_download): New.
13126 (l_tracepoint_action_download): New.
13127 (add_tracepoint_action): Install `action->ops' according type.
13128 (download_tracepoint_1): Move code `download' function pointer
13129 of various tracepoint_action_ops.
13131 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13133 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13134 linux_ptrace_attach_warnings.
13136 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13138 * Makefile.in (linux-ptrace.o): New.
13139 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13140 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13141 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13142 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13143 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13145 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13147 2012-03-08 Yao Qi <yao@codesourcery.com>
13148 Pedro Alves <palves@redhat.com>
13150 Fix PR server/13392.
13151 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
13152 offset of JMP insn.
13153 * tracepoint.c (remove_tracepoint): New.
13154 (cmd_qtdp): Call remove_tracepoint when failed to install.
13156 2012-03-07 Pedro Alves <palves@redhat.com>
13158 * linux-low.c (get_detach_signal): New.
13159 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
13160 Pass on pending signals to PTRACE_DETACH. Check the result of the
13162 * server.c (program_signals, program_signals_p): New.
13163 (handle_general_set): Handle QProgramSignals.
13164 * server.h (program_signals, program_signals_p): Declare.
13166 2012-03-05 Pedro Alves <palves@redhat.com>
13167 Jan Kratochvil <jan.kratochvil@redhat.com>
13169 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
13172 2012-03-03 Yao Qi <yao@codesourcery.com>
13174 * tracepoint.c (tracepoint_look_up_symbols): Update call to
13175 agent_look_up_symbols.
13177 2012-03-03 Yao Qi <yao@codesourcery.com>
13179 * Makefile.in (linux-low.o): Keep dependence on agent.h.
13180 (linux-x86-low.o): Likewise.
13181 * server.h: Remove in_process_agent_loaded.
13182 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
13186 2012-03-03 Yao Qi <yao@codesourcery.com>
13188 * tracepoint.c (gdb_agent_capability): New global.
13189 (in_process_agent_loaded_ust): Renamed to
13190 `in_process_agent_supports_ust'.
13192 (in_process_agent_supports_ust): Call agent_capability_check.
13193 (clear_installed_tracepoints): Assert that agent supports
13196 2012-03-03 Yao Qi <yao@codesourcery.com>
13198 * linux-low.c (linux_supports_agent): New.
13199 (linux_target_ops): Initialize field `supports_agent' with
13200 linux_supports_agent.
13201 * target.h (struct target_ops) <supports_agent>: New.
13202 (target_supports_agent): New macro.
13203 * server.c (handle_general_set): Handle packet 'QAgent'.
13204 (handle_query): Send `QAgent+'.
13205 * Makefile.in (server.o): Depends on agent.h.
13207 2012-03-03 Yao Qi <yao@codesourcery.com>
13209 * Makefile.in (OBS): Add agent.o.
13210 Add new rule for agent.o.
13211 Track dependence of tracepoint.c on agent.h.
13212 * tracepoint.c (run_inferior_command_1):
13213 (run_inferior_command): Call agent_run_command.
13214 (gdb_ust_connect_sync_socket): Deleted. Move it to
13216 (resume_thread, stop_thread): Likewise.
13217 (gdb_ust_socket_init): Renamed to ...
13218 (gdb_agent_socket_init): ... New.
13219 (gdb_ust_thread): Renamed to ...
13220 (gdb_agent_helper_thread): ... New.
13221 (gdb_ust_init): Move some code to ...
13222 (gdb_agent_init): ... here. New.
13223 [HAVE_UST]: Call gdb_ust_init.
13224 (initialize_tracepoint_ftlib): Call gdb_agent_init.
13225 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
13226 * config.in, configure: Regenerated.
13228 2012-03-02 Pedro Alves <palves@redhat.com>
13230 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
13231 * linux-low.c (struct simple_pid_list): New.
13232 (stopped_pids): New a struct simple_pid_list pointer.
13233 (add_to_pid_list, pull_pid_from_list): New.
13234 (handle_extended_wait): Don't assume the first signal new children
13235 report is SIGSTOP. Adjust call to pull_pid_from_list.
13236 (linux_wait_for_lwp): Adjust.
13238 2012-03-02 Yao Qi <yao@codesourcery.com>
13240 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
13243 2012-03-02 Yao Qi <yao@codesourcery.com>
13245 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
13246 `stop_pc' and `tpoint'. Update caller.
13248 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
13250 * linux-low.h (linux_target_ops): Add regset_bitmap member.
13251 * linux-low.c (use_linux_regsets): New macro.
13252 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
13253 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
13254 (linux_register_in_regsets): New function.
13255 (usr_fetch_inferior_registers): Skip registers covered by
13257 (usr_store_inferior_registers): Likewise.
13258 (usr_fetch_inferior_registers): New macro.
13259 (usr_store_inferior_registers): Likewise.
13260 (linux_fetch_registers): Handle mixed regset/non-regset targets.
13261 (linux_store_registers): Likewise.
13262 * linux-mips-low.c (init_registers_mips_dsp_linux): New
13264 (init_registers_mips64_dsp_linux): Likewise.
13265 (init_registers_mips_linux): New macro.
13266 (init_registers_mips_dsp_linux): Likewise.
13267 (mips_dsp_num_regs): Likewise.
13268 (DSP_BASE, DSP_CONTROL): New fallback macros.
13269 (mips_base_regs): New macro.
13270 (mips_regmap): Use it. Fix the size.
13271 (mips_dsp_regmap): New variable.
13272 (mips_dsp_regset_bitmap): Likewise.
13273 (mips_arch_setup): New function.
13274 (mips_cannot_fetch_register): Use the_low_target.regmap rather
13276 (mips_cannot_store_register): Likewise.
13277 (the_low_target): Update .arch_setup, .num_regs and .regmap
13278 initializers. Add .regset_bitmap initializer.
13279 * linux-arm-low.c (the_low_target): Add .regset_bitmap
13281 * linux-bfin-low.c (the_low_target): Likewise.
13282 * linux-cris-low.c (the_low_target): Likewise.
13283 * linux-crisv32-low.c (the_low_target): Likewise.
13284 * linux-ia64-low.c (the_low_target): Likewise.
13285 * linux-m32r-low.c (the_low_target): Likewise.
13286 * linux-m68k-low.c (the_low_target): Likewise.
13287 * linux-ppc-low.c (the_low_target): Likewise.
13288 * linux-s390-low.c (the_low_target): Likewise.
13289 * linux-sh-low.c (the_low_target): Likewise.
13290 * linux-sparc-low.c (the_low_target): Likewise.
13291 * linux-tic6x-low.c (the_low_target): Likewise.
13292 * linux-x86-low.c (the_low_target): Likewise.
13293 * linux-xtensa-low.c (the_low_target): Likewise.
13294 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
13295 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
13296 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
13298 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
13299 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
13301 2012-02-29 Yao Qi <yao@codesourcery.com>
13302 Pedro Alves <palves@redhat.com>
13304 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
13305 `step_over_finished' is true.
13307 2012-02-27 Pedro Alves <palves@redhat.com>
13309 * linux-low.c (pid_is_stopped): Delete, moved to common/.
13310 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
13312 2012-02-27 Pedro Alves <palves@redhat.com>
13315 * linux-low.c (pid_is_stopped): New.
13316 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
13318 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
13320 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
13323 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13325 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
13327 2012-02-24 Luis Machado <lgustavo@codesourcery>
13329 * server.c (handle_query): Advertise support for target-side
13330 breakpoint condition evaluation.
13331 (process_point_options): New function.
13332 (process_serial_event): When inserting a breakpoint, check for
13333 a target-side condition that should be evaluated.
13335 * mem-break.c: Include regcache.h and ax.h.
13336 (point_cond_list_t): New data structure.
13337 (breakpoint) <cond_list>: New field.
13338 (find_gdb_breakpoint_at): Make non-static.
13339 (delete_gdb_breakpoint_at): Clear any target-side
13341 (clear_gdb_breakpoint_conditions): New function.
13342 (add_condition_to_breakpoint): Likewise.
13343 (add_breakpoint_condition): Likewise.
13344 (gdb_condition_true_at_breakpoint): Likewise.
13345 (gdb_breakpoint_here): Return result directly instead
13346 of going through a local variable.
13348 * mem-break.h (find_gdb_breakpoint_at): New prototype.
13349 (clear_gdb_breakpoint_conditions): Likewise.
13350 (add_breakpoint_condition): Likewise.
13351 (gdb_condition_true_at_breakpoint): Likewise.
13353 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
13354 (need_step_over_p): Take target-side breakpoint condition into
13357 2012-02-24 Luis Machado <lgustavo@codesourcery>
13359 * server.h: Include tracepoint.h.
13360 (agent_mem_read, agent_get_trace_state_variable_value,
13361 agent_set_trace_state_variable_value,
13362 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
13363 get_set_tsv_func_addr): New prototypes.
13365 * ax.h: New include file.
13366 * ax.c: New source file.
13368 * tracepoint.c: Include ax.h.
13369 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13370 agent_expr, eval_result_type): Move to ax.h.
13371 (parse_agent_expr): Rename to ...
13372 (gdb_parse_agent_expr): ... this, make it non-static and move
13374 (unparse_agent_expr) Rename to ...
13375 (gdb_unparse_agent_expr): ... this, make it non-static and move
13377 (eval_agent_expr): Rename to ...
13378 (eval_tracepoint_agent_expr): ... this.
13379 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13380 forward declarations.
13381 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13382 (agent_get_trace_state_variable_value): New function.
13383 (agent_set_trace_state_variable_value): New function.
13384 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13385 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13386 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13387 (condition_true_at_tracepoint): Likewise.
13388 (parse_agent_expr): Rename to ...
13389 (gdb_parse_agent_expr): ... this and move to ax.c.
13390 (unparse_agent_expr): Rename to ...
13391 (gdb_unparse_agent_expr): ... this and move to ax.c.
13392 (gdb_agent_op_name): Move to ax.c.
13393 (eval_agent_expr): Rename to ...
13394 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13396 (eval_tracepoint_agent_expr): New function.
13397 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13399 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13401 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13402 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13403 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13404 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13405 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13406 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13407 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13408 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13409 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13410 (compile_bytecodes): Remove forward declaration.
13411 (is_goto_target): Move to ax.c.
13412 (compile_bytecodes): Move to ax.c and call
13413 agent_get_trace_state_variable_value (...) and
13414 agent_set_trace_state_variable_value (...).
13416 * Makefile.in: Update ax.c and IPA dependencies.
13418 2012-02-24 Pedro Alves <palves@redhat.com>
13420 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13421 (cmd_bigqtbuffer_circular): ... this. Only handle
13422 'QTBuffer:circular:'.
13423 (handle_tracepoint_general_set): Adjust.
13425 2012-02-16 Yao Qi <yao@codesourcery.com>
13427 * inferiors.c: Move code to ...
13428 * dll.c: .... here. New.
13429 * server.h: Declare clear_dlls.
13430 * Makefile.in (SFILES): Add dll.c.
13434 2012-02-11 Yao Qi <yao@codesourcery.com>
13436 * server.c: (handle_monitor_command): Add a new parameter
13438 (handle_query): Update caller.
13440 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13442 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13443 * configure, config.in: Regenerate.
13444 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13447 2012-02-02 Pedro Alves <palves@redhat.com>
13449 Try SIGKILL first, then PTRACE_KILL.
13450 * linux-low.c (linux_kill_one_lwp): New.
13451 (linux_kill_one_lwp): Rename to ...
13452 (kill_one_lwp_callback): ... this. Use the new
13453 linux_kill_one_lwp.
13455 2012-02-02 Pedro Alves <palves@redhat.com>
13457 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13460 2012-01-27 Pedro Alves <palves@redhat.com>
13462 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13463 (elf_64_file_p): Make static.
13464 (linux_pid_exe_is_elf_64_file): New.
13465 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13466 Delete declarations.
13467 (linux_pid_exe_is_elf_64_file): Declare.
13468 * linux-x86-low.c (x86_arch_setup): Use
13469 linux_pid_exe_is_elf_64_file.
13471 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13473 * linux-low.c (linux_wait_for_event_1): Rename to ...
13474 (linux_wait_for_event): ... here and merge it with former
13475 linux_wait_for_event - new variable wait_ptid, use it.
13476 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13478 2012-01-23 Pedro Alves <palves@redhat.com>
13480 * server.c (main): Avoid yet another case of infinite loop while
13481 detaching/killing after a longjmp.
13483 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13486 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13488 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13490 * hostio.c (handle_readlink): New function.
13491 (handle_vFile): Call it to handle "vFile:readlink" packets.
13493 2012-01-20 Pedro Alves <palves@redhat.com>
13494 Ulrich Weigand <ulrich.weigand@linaro.org>
13496 * server.c (handle_v_requests): Only support vAttach and vRun to
13497 start multiple processes when in extended protocol mode.
13499 2012-01-17 Pedro Alves <palves@redhat.com>
13501 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13502 memalign plus mprotect to allocate the scratch buffer.
13504 2012-01-13 Pedro Alves <palves@redhat.com>
13506 * server.c (attach_inferior): Clear `cont_thread'.
13508 2012-01-13 Pedro Alves <palves@redhat.com>
13510 * server.c (main): Avoid infinite loop while detaching/killing
13513 2012-01-09 Doug Evans <dje@google.com>
13515 * server.c (start_inferior): Set last_ptid in --wrapper case.
13517 2012-01-06 Yao Qi <yao@codesourcery.com>
13519 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13521 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13523 2012-01-04 Yao Qi <yao@codesourcery.com>
13525 * tracepoint.c (cmd_qtdp): Print debug message
13526 for static tracepoint.
13528 2012-01-04 Yao Qi <yao@codesourcery.com>
13530 * tracepoint.c (trace_vdebug): Differentiate debug message
13531 between gdbserver and IPA.
13533 2012-01-03 Yao Qi <yao@codesourcery.com>
13535 * tracepoint.c (tracepoint_was_hit): Don't collect for
13538 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13540 * terminal.h: Reformat copyright header.
13542 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13544 * server.c (gdbserver_version): Update copyright year.
13545 * gdbreplay.c (gdbreplay_version): Likewise.
13547 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13549 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13552 2011-12-18 Hui Zhu <teawater@gmail.com>
13553 * linux-low.c (linux_create_inferior): Save return value to ret.
13555 2011-12-18 Hui Zhu <teawater@gmail.com>
13557 * linux-low.c (linux_create_inferior): Save return value to ret.
13559 2011-12-16 Doug Evans <dje@google.com>
13561 * linux-low.c (linux_create_inferior): If stdio connection,
13562 redirect stdin from /dev/null, stdout to stderr.
13563 * remote-utils.c (remote_is_stdio): New static global.
13564 (remote_connection_is_stdio): New function.
13565 (remote_prepare): Handle stdio connection.
13566 (remote_open): Ditto.
13567 (remote_close): Don't close stdin for stdio connections.
13568 (read_prim,write_prim): New functions. Replace all calls to
13569 read/write to these.
13570 * server.c (main): Watch for "-" argument. Move call to
13571 remote_prepare before start_inferior.
13572 * server.h (STDIO_CONNECTION_NAME): New macro.
13573 (remote_connection_is_stdio): Declare.
13575 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13576 in debugging output.
13578 2011-12-15 Yao Qi <yao@codesourcery.com>
13580 * tracepoint.c: Include sys/syscall.h.
13581 (gdb_ust_thread): Remove preprocessor conditional.
13583 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13585 * linux-low.c (linux_detach_one_lwp): Call
13586 the_low_target.prepare_to_resume before detaching.
13588 2011-12-14 Yao Qi <yao@codesourcery.com>
13590 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13593 2011-12-14 Yao Qi <yao@codesourcery.com>
13595 * i386-low.c (i386_low_stopped_data_address): Initialize local
13596 variable `control'.
13598 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13602 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13603 DR_CONTROL unless necessary. Extend comments.
13604 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13605 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13607 2011-12-13 Yao Qi <yao@codesourcery.com>
13609 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13611 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13613 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13615 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13616 Print new debug message for such case.
13618 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13620 Fix overlapping memcpy.
13621 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13622 the read_inferior_memory transfer.
13623 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13624 write_inferior_memory transfer.
13625 (set_fast_tracepoint_jump): New variable buf. Use it for the
13626 read_inferior_memory and write_inferior_memory transfers.
13627 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13628 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13629 Use it for the write_inferior_memory transfer.
13630 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13633 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13635 * linux-low.c (fetch_register, store_register): Make code
13636 consistent, fix formatting.
13638 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13640 * linux-low.c (usr_store_inferior_registers): Factor out code
13641 to handle individual registers into...
13642 (store_register): ... this new function.
13644 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13646 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13647 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13648 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13649 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13650 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13651 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13652 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13653 (srv_xmlfiles): Add new XML files.
13655 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13657 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13658 (init_registers_s390_linux32v1): Add prototype.
13659 (init_registers_s390_linux32v2): Likewise.
13660 (init_registers_s390_linux64v1): Likewise.
13661 (init_registers_s390_linux64v2): Likewise.
13662 (init_registers_s390x_linux64v1): Likewise.
13663 (init_registers_s390x_linux64v2): Likewise.
13664 (s390_num_regs): Increment to 52.
13665 (s390_regmap): Add orig_r2 register.
13666 (s390_num_regs_3264): Increment to 68.
13667 (s390_regmap_3264): Add orig_r2 register.
13668 (s390_collect_ptrace_register): Handle orig_r2 register.
13669 (s390_supply_ptrace_register): Likewise.
13670 (s390_fill_last_break): New function.
13671 (s390_store_last_break): Likewise.
13672 (s390_fill_system_call): New function.
13673 (s390_store_system_call): Likewise.
13674 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13676 (s390_check_regset): New function.
13677 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13678 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13679 Update target_regsets for available register sets.
13681 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13682 Jan Kratochvil <jan.kratochvil@redhat.com>
13684 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13685 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13687 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13688 * linux-low.h (struct process_info_private): New member r_debug.
13689 * server.c (handle_qxfer_libraries): Call
13690 the_target->qxfer_libraries_svr4.
13691 (handle_qxfer_libraries_svr4): New function.
13692 (qxfer_packets): New entry "libraries-svr4".
13693 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13694 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13695 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13696 PACKET_qXfer_libraries_svr4.
13698 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13700 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13701 PSW address/mask between 8-byte and 16-byte formats.
13702 (s390_supply_ptrace_register): Likewise.
13703 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13704 basic addressing mode bit.
13706 2011-11-24 Stan Shebs <stan@codesourcery.com>
13708 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13710 2011-11-17 Stan Shebs <stan@codesourcery.com>
13712 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13713 (tracing_start_time): New global.
13714 (tracing_stop_time): New global.
13715 (tracing_user_name): New global.
13716 (tracing_notes): New global.
13717 (tracing_stop_note): New global.
13718 (cmd_qtstart): Set traceframe_usage, start_time.
13719 (stop_tracing): Set stop_time.
13720 (cmd_qtstatus): Report additional status.
13721 (cmd_qtp): New function.
13722 (handle_tracepoint_query): Call it.
13723 (cmd_qtnotes): New function.
13724 (handle_tracepoint_general_set): Call it.
13725 (get_timestamp): Rename from tsv_get_timestamp.
13727 2011-11-14 Stan Shebs <stan@codesourcery.com>
13728 Kwok Cheung Yeung <kcy@codesourcery.com>
13730 * linux-x86-low.c (small_jump_insn): New.
13731 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13732 trampoline and error message, build a trampoline and issue a small
13733 jump instruction to it.
13734 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13735 trampoline and error message.
13736 (x86_get_min_fast_tracepoint_insn_len): New.
13737 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13738 * linux-low.h (struct linux_target_ops): Add arguments to
13739 install_fast_tracepoint_jump_pad operation, add new operation.
13740 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13742 (linux_get_min_fast_tracepoint_insn_len): New function.
13743 (linux_target_op): Add new operation.
13744 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13745 (gdb_trampoline_buffer_end): Ditto.
13746 (gdb_trampoline_buffer_error): Ditto.
13747 (struct ipa_sym_addresses): Add fields for new IPA variables.
13748 (symbol_list): Add entries for new IPA variables.
13749 (struct tracepoint): Add fields to hold the address range of the
13750 trampoline used by the tracepoint.
13751 (trampoline_buffer_head): New static variable.
13752 (trampoline_buffer_tail): Ditto.
13753 (claim_trampoline_space): New function.
13754 (have_fast_tracepoint_trampoline_buffer): New function.
13755 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13757 (install_fast_tracepoint): Ditto, also add error buffer argument.
13758 (cmd_qtminftpilen): New function.
13759 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13760 (fast_tracepoint_from_trampoline_address): New function.
13761 (fast_tracepoint_collecting): Handle trampoline as part of jump
13763 (set_trampoline_buffer_space): New function.
13764 (initialize_tracepoint): Initialize new IPA variables.
13765 * target.h (struct target_ops): Add arguments to
13766 install_fast_tracepoint_jump_pad operation, add new
13767 get_min_fast_tracepoint_insn_len operation.
13768 (target_get_min_fast_tracepoint_insn_len): New.
13769 (install_fast_tracepoint_jump_pad): Add arguments.
13770 * server.h (IPA_BUFSIZ): Define.
13771 * linux-i386-ipa.c: Include extra header files.
13772 (initialize_fast_tracepoint_trampoline_buffer): New function.
13773 (initialize_low_tracepoint): Call it.
13774 * server.h (set_trampoline_buffer_space): Declare.
13775 (claim_trampoline_space): Ditto.
13776 (have_fast_tracepoint_trampoline_buffer): Ditto.
13778 2011-11-14 Yao Qi <yao@codesourcery.com>
13780 * server.c (handle_query): Handle InstallInTrace for qSupported.
13781 * tracepoint.c (add_tracepoint): Sort list.
13782 (install_tracepoint, download_tracepoint): New.
13783 (cmd_qtdp): Call them to install and download tracepoints.
13784 (sort_tracepoints): Removed.
13785 (cmd_qtstart): Update.
13787 2011-11-14 Yao Qi <yao@codesourcery.com>
13789 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13790 * mem-break.h: Declare.
13791 * tracepoint.c (cmd_qtstart): Move some code to ...
13792 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13794 (download_tracepoints): Move some code to ...
13795 (download_tracepoint_1): ... here. New.
13797 2011-11-08 Yao Qi <yao@codesourcery.com>
13799 * remote-utils.c (relocate_instruction): A comment fix.
13801 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13803 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13804 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13805 dr_status_mirror and dr_control_mirror from debug_reg_state.
13806 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13807 (i386_initial_stuff): Remove use of deleted globals.
13808 (i386_get_thread_context, i386_set_thread_context,
13809 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13810 from debug_reg_state.
13812 2011-11-05 Yao Qi <yao@codesourcery.com>
13814 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13815 address as TPOINT's.
13817 2011-11-02 Stan Shebs <stan@codesourcery.com>
13819 * tracepoint.c (agent_mem_read_string): New function.
13820 (eval_agent_expr): Call it for tracenz.
13821 * server.c (handle_query): Report support for tracenz.
13823 2011-11-02 Yao Qi <yao@codesourcery.com>
13825 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13827 2011-11-02 Yao Qi <yao@codesourcery.com>
13829 * target.h: Fix a typo in comment.
13831 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13833 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13834 clobber the breakpoints' shadows with fast tracepoint jumps.
13835 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13836 * target.c (write_inferior_memory): Also pass MYADDR down to
13839 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13841 * configure.ac: Check support for personality routine.
13842 * configure: Regenerate.
13843 * config.in: Likewise.
13844 * linux-low.c: Include <sys/personality.h>.
13845 Define ADDR_NO_RANDOMIZE if necessary.
13846 (linux_create_inferior): Disable address space randomization when
13847 forking inferior, if requested.
13848 (linux_supports_disable_randomization): New function.
13849 (linux_target_ops): Install it.
13850 * server.h (disable_randomization): Declare.
13851 * server.c (disable_randomization): New global variable.
13852 (handle_general_set): Handle QDisableRandomization.
13853 (handle_query): Likewise for qSupported.
13854 (main): Support --disable-randomization and --no-disable-randomization
13855 command line arguments.
13856 * target.h (struct target_ops): Add supports_disable_randomization.
13857 (target_supports_disable_randomization): New macro.
13859 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13861 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13863 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13864 [!PT_GETDSBT] (target_loadmap): New definition.
13865 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13866 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13867 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13868 and PT_GETDSBT to LINUX_LOADMAP.
13869 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13870 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13872 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13874 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13875 (arm_linux_hwbp_cap): New static variable.
13876 (arm_linux_get_hwbp_cap): Replace by ...
13877 (arm_linux_init_hwbp_cap): ... this new function.
13878 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13879 (arm_linux_get_hw_watchpoint_count): Likewise.
13880 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13881 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13882 (arm_prepare_to_resume): Use perror_with_name instead of error.
13884 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13886 * linux-arm-low.c: Include <signal.h>.
13887 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13888 (struct arm_linux_hwbp_cap): New data type.
13889 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13890 (struct arm_linux_hw_breakpoint): New data type.
13891 (MAX_BPTS, MAX_WPTS): Define.
13892 (struct arch_process_info, struct arch_lwp_info): New data types.
13893 (arm_linux_get_hwbp_cap): New function.
13894 (arm_linux_get_hw_breakpoint_count): Likewise.
13895 (arm_linux_get_hw_watchpoint_count): Likewise.
13896 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13897 (arm_hwbp_control_initialize): Likewise.
13898 (arm_hwbp_control_is_enabled): Likewise.
13899 (arm_hwbp_control_is_initialized): Likewise.
13900 (arm_hwbp_control_disable): Likewise.
13901 (arm_linux_hw_breakpoint_equal): Likewise.
13902 (arm_linux_hw_point_initialize): Likewise.
13903 (struct update_registers_data): New data structure.
13904 (update_registers_callback: New function.
13905 (arm_insert_point): Likewise.
13906 (arm_remove_point): Likewise.
13907 (arm_stopped_by_watchpoint): Likewise.
13908 (arm_stopped_data_address): Likewise.
13909 (arm_new_process): Likewise.
13910 (arm_new_thread): Likewise.
13911 (arm_prepare_to_resume): Likewise.
13912 (the_low_target): Register arm_insert_point, arm_remove_point,
13913 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13914 arm_new_thread, and arm_prepare_to_resume.
13916 2011-09-15 Stan Shebs <stan@codesourcery.com>
13918 * server.h (struct emit_ops): Add compare-goto fields.
13919 * tracepoint.c (gdb_agent_op_sizes): New table.
13920 (emit_eq_goto): New function.
13921 (emit_ne_goto): New function.
13922 (emit_lt_goto): New function.
13923 (emit_le_goto): New function.
13924 (emit_gt_goto): New function.
13925 (emit_ge_goto): New function.
13926 (is_goto_target): New function.
13927 (compile_bytecodes): Recognize special cases of compare-goto
13928 combinations and call specialized emitters for them.
13929 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13930 (amd64_emit_ne_goto): New function.
13931 (amd64_emit_lt_goto): New function.
13932 (amd64_emit_le_goto): New function.
13933 (amd64_emit_gt_goto): New function.
13934 (amd64_emit_ge_goto): New function.
13935 (amd64_emit_ops): Add the new functions.
13936 (i386_emit_eq_goto): New function.
13937 (i386_emit_ne_goto): New function.
13938 (i386_emit_lt_goto): New function.
13939 (i386_emit_le_goto): New function.
13940 (i386_emit_gt_goto): New function.
13941 (i386_emit_ge_goto): New function.
13942 (i386_emit_ops): Add the new functions.
13944 2011-09-08 Stan Shebs <stan@codesourcery.com>
13946 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13947 (i386_emit_epilogue): Restore %ebx.
13949 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13951 * server.c (step_thread): Remove definition.
13952 (process_serial_event): Don't handle Hs.
13953 * server.h (step_thread): Remove declaration.
13954 * target.c (set_desired_inferior): Remove use of step_thread.
13956 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13958 * linux-low.c: Include linux-procfs.h.
13959 (linux_attach_lwp_1): Update comments.
13960 (linux_attach): Scan for existing threads when attaching to a
13961 process that is the tgid.
13962 * Makefile.in: Update dependencies.
13964 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13966 * configure.srv: Add linux-procfs.o dependencies.
13968 2011-08-14 Yao Qi <yao@codesourcery.com>
13970 * target.h (struct target_ops): Fix indent.
13971 * win32-low.c (win32_target_ops): Fix comment.
13973 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13974 Yao Qi <yao@codesourcery.com>
13976 * Makefile.in (clean): Remove tic6x-*.c files.
13977 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13978 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13979 (tic6x-c64xp-linux.c): Likewise.
13980 * configure.srv: Add support for tic6x-*-uclinux.
13981 * linux-tic6x-low.c: New.
13982 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13984 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13985 Yao Qi <yao@codesourcery.com>
13987 * target.h (struct target_ops): Add read_loadmap.
13988 * linux-low.c (struct target_loadseg): New type.
13989 (struct target_loadmap): New type.
13990 (linux_read_loadmap): New function.
13991 (linux_target_ops): Add linux_read_loadmap.
13992 * server.c (handle_query): Support qXfer:fdpic:read packet.
13993 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13996 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13998 * win32-low.c: Include <stdint.h>.
14000 2011-07-22 Pedro Alves <pedro@codesourcery.com>
14002 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
14003 to the inferior here.
14004 (i386_remove_aligned_watchpoint): Ditto.
14005 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
14006 fit part of the watchpoint in the debug registers.
14007 (i386_update_inferior_debug_regs): New.
14008 (i386_low_insert_watchpoint): Work on a local mirror of the debug
14009 registers, and only update the inferior on success.
14010 (i386_low_remove_watchpoint): Ditto.
14012 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
14014 * linux-low.c (compare_ints, unique, list_threads, show_process,
14015 linux_core_of_thread): Delete.
14016 (linux_target_ops): Change linux_core_of_thread to
14017 linux_common_core_of_thread.
14018 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
14019 * utils.c (malloc_failure): Change type of argument.
14020 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
14021 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
14022 common/linux-osdata.c, common/ptid.c and common/buffer.c.
14023 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
14024 (IPA_OBJS): Add common-utils-ipa.o.
14025 (ptid_h, linux_osdata_h): New macros.
14026 (server_h): Add common/common-utils.h, common/xml-utils.h,
14027 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
14029 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
14030 ptid.o, buffer.o): New rules.
14031 (linux-low.o): Add common/linux-osdata.h as a dependency.
14032 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
14033 * configure.ac: Add AC_HEADER_DIRENT check.
14034 * config.in: Regenerate.
14035 * configure: Regenerate.
14036 * remote-utils.c (xml_escape_text): Delete.
14037 (buffer_grow, buffer_free, buffer_init, buffer_finish,
14038 buffer_xml_printf): Move to common/buffer.c.
14039 * server.c (main): Remove call to initialize_inferiors.
14040 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
14041 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
14042 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
14043 internal_error, gdb_assert, gdb_assert_fail): Delete.
14044 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
14045 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
14047 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
14048 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
14049 initialize_inferiors): Delete.
14051 2011-07-20 Pedro Alves <pedro@codesourcery.com>
14053 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
14056 2011-05-31 Pedro Alves <pedro@codesourcery.com>
14058 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
14060 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14062 2011-05-26 Yao Qi <yao@codesourcery.com>
14064 * Makefile.in (thread-db.o): Track dependence to
14065 common/gdb_thread_db.h.
14066 * thread-db.c: include gdb_thread_db.h from right place.
14068 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14070 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14071 __FILE__ and __LINE__ to internal_error.
14073 2011-05-13 Doug Evans <dje@google.com>
14075 * thread-db.c (try_thread_db_load_from_sdir): New function.
14076 (try_thread_db_load_from_dir): New function.
14077 (thread_db_load_search): Handle $sdir, ignore $pdir.
14078 Remove trying of system directories if search of
14079 libthread-db-search-path fails, that is now done via $sdir.
14081 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14083 * server.c (handle_query): Add EnableDisableTracepoints to the list
14084 of supported features.
14085 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14087 (cmd_qtenable_disable): New.
14088 (cmd_qtstart): Install tracepoints even if disabled.
14089 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14090 receiving a QTEnable or QTDisable packet.
14091 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14092 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14094 (gdb_probe): Skip data collection if static tracepoint is disabled.
14096 2011-05-10 Doug Evans <dje@google.com>
14098 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14100 2011-05-04 Doug Evans <dje@google.com>
14102 * linux-low.c (linux_join): Skip process lookup.
14103 * spu-low.c (spu_join): Ditto.
14104 * server.c (join_inferiors_callback): Delete.
14105 (process_serial_event): For 'D' packet (detach) call join_inferior
14108 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14110 * README: Don't mention xscale*-*-linux*.
14111 * configure.srv (xscale*-*-linux*): Don't handle target.
14113 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14115 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14117 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14118 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14119 (i386_emit_void_call_2): Likewise.
14121 2011-04-26 Yao Qi <yao@codesourcery.com>
14123 * linux-low.c: Move common macros to linux-ptrace.h.
14124 Include linux-ptrace.h.
14125 * Makefile.in (linux_ptrace_h): New.
14126 (linux-low.o): Depends on linux-ptrace.h.
14128 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14130 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14131 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14132 (remote_prepare): New function with most of the TCP code from ...
14133 (remote_open): ... here. Detect PORT here unconditionally. Move also
14134 setting transport_is_reliable.
14135 * server.c (run_once): New variable.
14136 (gdbserver_usage): Document it.
14137 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14138 the first run if RUN_ONCE.
14139 * server.h (run_once, remote_prepare): New declarations.
14141 2011-04-19 Tom Tromey <tromey@redhat.com>
14143 * win32-low.c (handle_load_dll): Remove duplicate "the".
14145 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14147 Remove support for old Cygwin 1.5 versions.
14148 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14149 function to avoid warning.
14150 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14153 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14155 * gdbserver/server.h (Macro _): Define it if not available.
14157 2011-03-14 Michael Snyder <msnyder@vmware.com>
14159 * hostio.c (handle_close): Remove unnecessary null test.
14161 2011-03-10 Joel Brobecker <brobecker@adacore.com>
14163 * Makefile.in (maintainer-clean realclean distclean): Remove
14164 "make ... subdir_do" command.
14166 2011-03-10 Michael Snyder <msnyder@vmware.com>
14168 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
14170 * server.c (handle_v_run): Free alloced buffer on early return.
14172 2011-03-09 Yao Qi <yao@codesourcery.com>
14175 2011-03-04 Yao Qi <yao@codesourcery.com>
14177 * Makefile.in: Remove GNU make feature --directory.
14179 2011-03-05 Yao Qi <yao@codesourcery.com>
14181 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14182 (subdir_do): New make target. Copied from gdb/Makefile.
14183 (maintainer-clean, realclean, distclean, clean): Call corresponding
14184 make targets in common/Makefile.
14186 2011-02-11 Yao Qi <yao@codesourcery.com>
14188 * configure.ac: Call AC_PROG_RANLIB.
14189 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14190 * configure: Regenerate.
14192 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14194 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
14196 2011-03-06 Yao Qi <yao@codesourcery.com>
14198 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
14200 2011-03-05 Yao Qi <yao@codesourcery.com>
14202 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14203 (subdir_do): New make target. Copied from gdb/Makefile.
14204 (maintainer-clean, realclean, distclean, clean): Call corresponding
14205 make targets in common/Makefile.
14207 2011-03-04 Yao Qi <yao@codesourcery.com>
14209 * Makefile.in: Remove GNU make feature --directory.
14211 2011-03-04 Michael Snyder <msnyder@vmware.com>
14213 * server.c (queue_stop_reply): Call xmalloc not malloc.
14215 2011-03-02 Michael Snyder <msnyder@vmware.com>
14217 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
14219 2011-02-28 Michael Snyder <msnyder@vmware.com>
14221 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
14222 (cmd_qtframe): Ditto.
14223 (cmd_qtbuffer): Ditto.
14224 (cmd_bigqtbuffer): Ditto.
14226 * utils.c (decimal2str): Initialize 'width' to nine, then
14227 don't mess with it.
14229 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14231 * hostio.c (require_data): Free *data, not data.
14233 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14235 * hostio.c (require_data): Use free, not xfree.
14237 2011-02-27 Michael Snyder <msnyder@vmware.com>
14239 * server.c (handle_query): Discard unused value.
14241 * hostio.c (require_data): Free malloc memory before returning
14244 2011-02-26 Michael Snyder <msnyder@vmware.com>
14246 * linux-low.c (list_threads): Call closedir for dirent.
14248 2011-02-27 Michael Snyder <msnyder@vmware.com>
14250 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
14251 a case statement falls through.
14253 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
14255 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
14258 2011-02-26 Michael Snyder <msnyder@vmware.com>
14260 * utils.c (decimal2str): Eliminate dead code and dead param.
14261 (pulongest): Drop dead param from call to decimal2str.
14264 2011-02-24 Joel Brobecker <brobecker@adacore.com>
14266 Revert the following patch (not approved yet):
14267 2011-02-21 Hui Zhu <teawater@gmail.com>
14268 * tracepoint.c (tp_printf): New function.
14269 (eval_agent_expr): Handle gdb_agent_op_printf.
14271 2011-02-21 Hui Zhu <teawater@gmail.com>
14273 * tracepoint.c (tp_printf): New function.
14274 (eval_agent_expr): Handle gdb_agent_op_printf.
14276 2011-02-18 Tom Tromey <tromey@redhat.com>
14278 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
14279 (tracepoint.o): Likewise.
14280 * tracepoint.c (enum gdb_agent_op): Use ax.def.
14281 (gdb_agent_op_names): Likewise.
14283 2011-02-18 Tom Tromey <tromey@redhat.com>
14285 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
14286 gdb_agent_op_rot>: New constants.
14287 (gdb_agent_op_names): Add pick and roll.
14288 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
14291 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
14293 * aclocal.m4: Regenerated with aclocal-1.11.1.
14295 2011-02-14 Pedro Alves <pedro@codesourcery.com>
14297 * server.c (handle_qxfer_traceframe_info): New.
14298 (qxfer_packets): Register "traceframe-info".
14299 (handle_query): Report support for qXfer:traceframe-info:read+.
14300 * tracepoint.c (match_blocktype): New.
14301 (traceframe_find_block_type): Rename to ...
14302 (traceframe_walk_blocks): ... this. Add callback filter argument,
14304 (traceframe_find_block_type): New, reimplemented on top of
14305 traceframe_walk_blocks.
14306 (build_traceframe_info_xml): New.
14307 (traceframe_read_info): New.
14308 * server.h (traceframe_read_info): Declare.
14310 2011-02-11 Yao Qi <yao@codesourcery.com>
14312 * configure.ac: Call AC_PROG_RANLIB.
14313 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14314 * configure: Regenerate.
14316 2011-02-07 Pedro Alves <pedro@codesourcery.com>
14318 * server.c (gdb_read_memory): Change return semantics to allow
14320 (handle_search_memory_1): Adjust.
14321 (process_serial_event) <'m' packet>: Handle partial transfers.
14322 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
14324 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14326 * regcache.c (init_register_cache): Initialize
14327 regcache->register_status.
14328 (free_register_cache): Release regcache->register_status.
14329 (regcache_cpy): Copy register_status.
14330 (registers_to_string): Print 'x's for unavailable registers.
14331 (supply_register): Mark the register's status valid or
14332 unavailable, depending on whether a buffer was passed in or not.
14333 (supply_register_zeroed): New.
14334 (supply_regblock): Mark the registers' status valid or
14335 unavailable, depending on whether a buffer was passed in or not.
14336 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
14337 (struct regcache): New `register_status' field.
14338 (supply_register_zeroed): Declare.
14339 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
14340 supply_register_zeroed, rather than passing a NULL buffer to
14342 * tracepoint.c (fetch_traceframe_registers): Update comment.
14344 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14346 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
14349 2011-01-25 Pedro Alves <pedro@codesourcery.com>
14351 * server.h (decode_xfer_write): Change prototype.
14352 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
14353 and don't extract the annex here.
14354 * server.c (decode_xfer_read): Remove `annex' parameter,
14355 and don't extract the annex here.
14356 (decode_xfer): New.
14357 (struct qxfer): New.
14358 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
14359 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
14360 (handle_qxfer_statictrace): New functions, abstracted out from
14361 handle_query, and made to use the struct qxfer interface.
14362 (handle_threads_qxfer_proper): Rename to ...
14363 (handle_qxfer_threads_proper): ... this.
14364 (handle_threads_qxfer): Rename to ...
14365 (handle_qxfer_threads): ... this. Adjust.
14366 (qxfer_packets): New array.
14367 (handle_qxfer): New function.
14368 (handle_query): Use handle_qxfer.
14370 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14372 * gdbreplay.c: Shorten lines of >= 80 columns.
14373 * linux-low.c: Ditto.
14374 * linux-ppc-low.c: Ditto.
14375 * linux-s390-low.c: Ditto.
14376 * linux-sparc-low.c: Ditto.
14377 * linux-x86-low.c: Ditto.
14378 * linux-xtensa-low.c: Ditto.
14379 * mem-break.c: Ditto.
14380 * nto-low.c: Ditto.
14381 * regcache.h: Ditto.
14382 * remote-utils.c: Ditto.
14385 * thread-db.c: Ditto.
14386 * tracepoint.c: Ditto.
14388 * win32-low.h: Ditto.
14390 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14392 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14395 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14397 * server.c (gdbserver_version): Update copyright year in version
14399 * gdbreplay.c (gdbreplay_version): Ditto.
14401 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14403 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14404 * linux-bfin-low.c: New file.
14405 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14406 PT_DATA_ADDR for BFIN targets.
14407 * Makefile.in (SFILES): Add linux-bfin-low.c.
14408 (clean): Remove reg-bfin.c.
14409 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14410 * README: Mention supported Blackfin targets.
14412 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14414 * .gitignore: New file.
14416 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14418 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14420 2010-10-22 Jie Zhang <jie@codesourcery.com>
14422 * Makefile.in: Add FLAGS_TO_PASS variable.
14423 (install): Remove dependency of install-only and recursively
14424 invoke make for install-only.
14426 2010-10-04 Doug Evans <dje@google.com>
14428 * Makefile.in (uninstall): Use $(DESTDIR).
14430 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14434 * linux-x86-low.c (compat_siginfo_from_siginfo)
14435 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14436 si_code is < 0. Check for si_code == SI_TIMER before checking for
14439 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14441 * lynx-i386-low.c: New file.
14442 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14444 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14446 * lynx-low.c (ptrace_request_to_str): Remove handling for
14447 request values that have been removed in LynxOS 5.x.
14449 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14451 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14454 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14456 * configure.ac: Add --enable-inprocess-agent option.
14457 * configure: Rebuilt.
14459 2010-09-06 Yao Qi <yao@codesourcery.com>
14461 * linux-low.c (linux_kill): Remove unused variable.
14462 (linux_stabilize_threads): Likewise.
14463 * server.c (start_inferior): Likewise.
14464 (queue_stop_reply_callback): Likewise.
14465 * tracepoint.c (do_action_at_tracepoint): Likewise.
14467 2010-09-06 Yao Qi <yao@codesourcery.com>
14469 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14472 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14474 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14476 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14478 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14481 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14483 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14484 gdbserver/lynx-ppc-low.c: New files.
14485 * Makefile.in (lynx_low_h): New variable.
14486 (lynx-low.o, lynx-ppc-low.o): New rules.
14487 * configure.ac: On LynxOS, link with -lnetinet.
14488 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14489 * configure: regenerate.
14491 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14493 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14494 * configure.ac: Add check for vasprintf and vsnprintf.
14495 * configure, config.in: Regenerate.
14496 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14498 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14500 * gdbreplay.c: Move include of alloca.h up, next to include of
14502 * server.h: Add include of malloc.h.
14503 * mem-break.c: Remove include of malloc.h.
14504 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14506 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14508 * Makefile.in (memmem.o): Build with -Wno-error.
14510 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14512 * utils.c (xsnprintf): Make non-static.
14513 * server.h: Add xsnprintf declaration.
14514 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14515 replace calls to snprintf by calls to xsnprintf throughout.
14517 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14519 * configure.ac: Add configure check for alloca.
14520 * configure, config.in: Regenerate.
14521 * server.h: Include alloca.h if it exists.
14522 * gdbreplay.c: Include alloca.h if it exists.
14524 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14526 * linux-low.c (__SIGRTMIN): Define if not already defined.
14527 (linux_create_inferior): Check for __ANDROID__ rather than
14529 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14530 are already deferred.
14531 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14532 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14533 stopped and already has a pending signal to report.
14534 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14535 a pending signal to report or is moving out of a jump pad.
14536 (linux_init_signals): Check for __ANDROID__ rather than
14539 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14541 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14542 debug_threads check. Avoid a linear search when not doing debug
14545 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14547 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14548 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14549 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14550 (process_event): Change local fd's type to gdb_fildes_t.
14551 (create_file_handler): Adjust prototype.
14552 (delete_file_handler): Adjust prototype.
14553 (handle_file_event): Adjust prototype. Use pfildes.
14554 (create_file_event): Adjsut prototype.
14555 * remote-utils.c (remote_desc, listen_desc): Change type to
14557 * server.h: New gdb_fildes_t typedef.
14558 [USE_WIN32API]: Include winsock2.h.
14559 (delete_file_handler, add_file_handler): Adjust prototypes.
14560 (pfildes): Declare.
14561 * utils.c (pfildes): New.
14563 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14565 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14566 * configure: Regenerate.
14568 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14570 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14571 (linux_done_accessing_memory): ... this.
14572 (linux_target_ops): Adjust.
14573 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14574 * nto-low.c (nto_target_ops): Adjust comment.
14575 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14576 * spu-low.c (spu_target_ops): Adjust comment.
14577 * target.h (target_ops): Rename unprepare_to_access_memory field
14578 to done_accessing_memory.
14579 (unprepare_to_access_memory): Rename to ...
14580 (done_accessing_memory): ... this.
14582 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14584 * linux-low.c (linux_prepare_to_access_memory): New.
14585 (linux_unprepare_to_access_memory): New.
14586 (linux_target_ops): Install them.
14587 * server.c (read_memory): Rename to ...
14588 (gdb_read_memory): ... this. Use
14589 prepare_to_access_memory/prepare_to_access_memory.
14590 (write_memory): Rename to ...
14591 (gdb_write_memory): ... this. Use
14592 prepare_to_access_memory/prepare_to_access_memory.
14593 (handle_search_memory_1): Adjust.
14594 (process_serial_event): Adjust.
14595 * target.h (struct target_ops): New fields
14596 prepare_to_access_memory and unprepare_to_access_memory.
14597 (prepare_to_access_memory, unprepare_to_access_memory): New.
14598 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14599 prepare_to_access_memory/prepare_to_access_memory.
14600 * nto-low.c (nto_target_ops): Adjust.
14601 * spu-low.c (spu_target_ops): Adjust.
14602 * win32-low.c (win32_target_ops): Adjust.
14604 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14606 * Makefile.in (WARN_CFLAGS): Get it from configure.
14607 (WERROR_CFLAGS): New.
14608 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14609 * configure.ac: Introduce --enable-werror, which adds -Werror to
14610 the compiler command line. Enabled by default. Disable with
14611 --disable-werror. Add -Wdeclaration-after-statement
14612 Wpointer-arith and -Wformat-nonliteral to warning flags.
14613 * configure: Regenerate.
14615 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14617 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14619 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14621 * gdbreplay.c (remote_error): New.
14623 (expect): Use gdbchar. Check for error reading from GDB.
14624 Clarify sync error output.
14625 (play): Check for errors writing to GDB.
14626 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14627 * remote-utils.c (getpkt): Check for errors writing to the remote
14630 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14632 * linux-low.c (linux_wait_1): Move non-debugging code out of
14633 `debug_threads' control.
14635 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14637 * linux-low.c (linux_wait_1): Don't set last_status here.
14638 * server.c (push_event, queue_stop_reply_callback): Assert we're
14639 not pushing a TARGET_WAITKIND_IGNORE event.
14640 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14641 (myresume, handle_target_event): Set the thread's last_resume_kind
14642 and last_status from the target returned status.
14644 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14648 * linux-x86-low.c (update_debug_registers_callback): New.
14649 (i386_dr_low_set_addr): Use it.
14650 (i386_dr_low_get_addr): New.
14651 (i386_dr_low_set_control): Use update_debug_registers_callback.
14652 (i386_dr_low_get_control): New.
14653 (i386_dr_low_get_status): Adjust.
14654 * linux-low.c (linux_stop_lwp): New.
14655 * linux-low.h (linux_stop_lwp): Declare.
14657 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14658 argument instead of a i386_debug_reg_state.
14659 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14660 a i386_debug_reg_state.
14661 (i386_insert_aligned_watchpoint): Adjust.
14662 (i386_remove_aligned_watchpoint): Adjust.
14663 (i386_low_stopped_data_address): Read the debug registers from the
14664 inferior instead of from the mirrors.
14665 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14666 (i386_dr_low_get_addr): Declare.
14667 (i386_dr_low_get_control): Declare.
14668 (i386_dr_low_get_status): Change prototype.
14670 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14671 (i386_dr_low_get_addr): New.
14672 (i386_dr_low_get_control): New.
14673 (i386_dr_low_get_status): Adjust prototype. Return
14675 (i386_initial_stuff): Clear dr_status_mirror and
14677 (i386_get_thread_context): Adjust.
14678 (i386_set_thread_context): Adjust.
14679 (i386_thread_added): Adjust.
14681 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14683 * linux-low.h (linux_thread_area): Delete declaration.
14685 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14687 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14688 after its termination.
14690 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14692 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14693 (gdb_wants_all_stopped): Delete.
14694 (linux_wait_1): Don't call them.
14695 * server.c (handle_v_cont): Tag all threads as want-stopped.
14696 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14697 stopped as "client-wants-stopped".
14699 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14701 * Makefile.in (signals_h): New.
14702 (server_h): Depend on it.
14703 (server.o): Don't depend on $(signals_def).
14704 (signals.o): Depend on $(signals_def).
14706 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14708 * Makefile.in (signals_def): New.
14709 (server_h): Append include/gdb/signals.h and signals_def.
14710 (server.o): Append signals_def.
14712 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14714 * server.c (handle_target_event): Use target_signal_to_host for
14715 resume_info.sig initialization.
14716 * target.h (struct thread_resume) <sig>: New comment.
14718 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14720 * server.c (handle_query): strcpy() the returned string from paddress()
14721 instead of sprintf().
14722 * utils.c (paddress): Return phex_nz().
14724 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14726 * server.c (handle_v_cont): Call mourn_inferior if process
14728 (myresume): Likewise.
14730 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14732 Static tracepoints, and integration with UST.
14734 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14735 * mem-break.c (uninsert_all_breakpoints)
14736 (reinsert_all_breakpoints): New.
14737 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14738 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14739 (gdb_agent_ust_loaded, helper_thread_id)
14740 (gdb_agent_helper_thread_id): New macros.
14741 (struct ipa_sym_addresses): Add addr_ust_loaded,
14742 addr_helper_thread_id, addr_cmd_buf.
14743 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14744 (in_process_agent_loaded_ust): New.
14745 (write_e_ust_not_loaded): New.
14746 (maybe_write_ipa_ust_not_loaded): New.
14747 (struct collect_static_trace_data_action): New.
14748 (enum tracepoint_type) <static_tracepoint>: New.
14749 (struct tracepoint) <handle>: Mention static tracepoints.
14750 (struct static_tracepoint_ctx): New.
14751 (CMD_BUF_SIZE): New.
14752 (add_tracepoint_action): Handle static tracepoint actions.
14753 (unprobe_marker_at): New.
14754 (clear_installed_tracepoints): Handle static tracepoints.
14755 (cmd_qtdp): Handle static tracepoints.
14756 (probe_marker_at): New.
14757 (cmd_qtstart): Handle static tracepoints.
14758 (response_tracepoint): Handle static tracepoints.
14759 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14760 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14761 (get_context_regcache): Handle static tracepoints.
14762 (do_action_at_tracepoint): Handle static tracepoint actions.
14763 (traceframe_find_block_type): Handle static trace data blocks.
14764 (traceframe_read_sdata): New.
14765 (download_tracepoints): Download static tracepoint actions.
14766 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14767 (GDB_PROBE_NAME): New.
14769 (GET_UST_SYM): New.
14772 (ust_marker_to_static_tracepoint): New.
14774 (collect_ust_data_at_tracepoint): New.
14775 (gdb_ust_probe): New.
14776 (UNIX_PATH_MAX, SOCK_DIR): New.
14777 (gdb_ust_connect_sync_socket): New.
14778 (resume_thread, stop_thread): New.
14779 (run_inferior_command): New.
14780 (init_named_socket): New.
14781 (gdb_ust_socket_init): New.
14782 (cstr_to_hexstr): New.
14784 (first_marker, next_marker): New.
14785 (response_ust_marker): New.
14786 (cmd_qtfstm, cmd_qtsstm): New.
14787 (unprobe_marker_at, probe_marker_at): New.
14788 (cmd_qtstmat, gdb_ust_thread): New.
14789 (gdb_ust_init): New.
14790 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14791 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14792 (ST_REGENTRY): New.
14793 (x86_64_st_collect_regmap): New.
14794 (X86_64_NUM_ST_COLLECT_GREGS): New.
14795 (AMD64_RIP_REGNUM): New.
14796 (supply_static_tracepoint_registers): New.
14797 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14798 (ST_REGENTRY): New.
14799 (i386_st_collect_regmap): New.
14800 (i386_NUM_ST_COLLECT_GREGS): New.
14801 (supply_static_tracepoint_registers): New.
14802 * server.c (handle_query): Handle qXfer:statictrace:read.
14803 <qSupported>: Report support for StaticTracepoints, and
14804 qXfer:statictrace:read features.
14805 * server.h (traceframe_read_sdata)
14806 (supply_static_tracepoint_registers): Declare.
14807 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14808 (unpack_varlen_hex): Include in IPA build.
14809 * Makefile.in (ustlibs, ustinc): New.
14810 (IPA_OBJS): Add remote-utils-ipa.o.
14811 ($(IPA_LIB)): Link -ldl and -lpthread.
14813 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14814 * config.in, configure: Regenerate.
14816 2010-06-20 Ian Lance Taylor <iant@google.com>
14817 Pedro Alves <pedro@codesourcery.com>
14819 * linux-x86-low.c (always_true): Delete.
14820 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14821 trying to fool the compiler with always_true.
14823 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14825 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14826 conditions in gdbserver.
14828 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14830 * spu-low.c (spu_read_memory): Wrap around local store limit.
14831 (spu_write_memory): Likewise.
14833 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14835 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14836 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14838 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14840 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14841 uses with LONGEST uses.
14843 2010-06-14 Stan Shebs <stan@codesourcery.com>
14844 Pedro Alves <pedro@codesourcery.com>
14848 * linux-x86-low.c: Include limits.h.
14850 (always_true): New.
14853 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14854 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14855 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14856 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14857 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14858 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14859 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14860 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14861 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14862 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14863 (amd64_emit_void_call_2): New.
14864 (amd64_emit_ops): New.
14865 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14866 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14867 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14868 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14869 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14870 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14871 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14872 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14873 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14874 (i386_emit_stack_adjust, i386_emit_int_call_1)
14875 (i386_emit_void_call_2): New.
14876 (i386_emit_ops): New.
14877 (x86_emit_ops): New.
14878 (the_low_target): Install x86_emit_ops.
14879 * server.h (struct emit_ops): New.
14880 (get_raw_reg_func_addr): Declare.
14881 (current_insn_ptr, emit_error): Declare.
14882 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14883 (set_trace_state_variable_value): New defines.
14884 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14885 addr_get_trace_state_variable_value and
14886 addr_set_trace_state_variable_value.
14887 (symbol_list): New fields for get_raw_reg,
14888 get_trace_state_variable_value and set_trace_state_variable_value.
14889 (condfn): New typedef.
14890 (struct tracepoint): New field `compiled_cond'.
14891 (do_action_at_tracepoint): Clear compiled_cond.
14892 (get_trace_state_variable_value, set_trace_state_variable_value):
14894 (condition_true_at_tracepoint): If there's a compiled condition,
14896 (current_insn_ptr, emit_error): New globals.
14897 (struct bytecode_address): New.
14898 (get_raw_reg_func_addr): New.
14899 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14900 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14901 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14902 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14903 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14904 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14905 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14906 (compile_tracepoint_condition, compile_bytecodes): New.
14907 * target.h (emit_ops): Forward declare.
14908 (struct target_ops): New field emit_ops.
14909 (target_emit_ops): New.
14910 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14911 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14912 * linux-low.c (linux_emit_ops): New.
14913 (linux_target_ops): Install it.
14914 * linux-low.h (struct linux_target_ops): New field emit_ops.
14916 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14918 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14919 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14921 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14922 Stan Shebs <stan@codesourcery.com>
14924 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14925 (all): Depend on $(extra_libraries).
14926 (install-only): Install the IPA.
14927 (IPA_OBJS, IPA_LIB): New.
14928 (clean): Remove the IPA lib.
14929 (IPAGENT_CFLAGS): New.
14930 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14931 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14932 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14933 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14934 * configure.ac: Check for atomic builtins support in the compiler.
14935 (IPA_DEPFILES, extra_libraries): Define.
14936 * configure.srv (ipa_obj): Add description.
14937 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14938 (i[34567]86-*-linux*): Set ipa_obj.
14939 (x86_64-*-linux*): Set ipa_obj.
14940 * linux-low.c (stabilizing_threads): New.
14941 (supports_fast_tracepoints): New.
14942 (linux_detach): Stabilize threads before detaching.
14943 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14944 the lwp is either not stabilizing, or is moving out of a jump pad.
14945 (linux_fast_tracepoint_collecting): New.
14946 (maybe_move_out_of_jump_pad): New.
14947 (enqueue_one_deferred_signal): New.
14948 (dequeue_one_deferred_signal): New.
14949 (linux_wait_for_event_1): If moving out of a jump pad, defer
14950 pending signals to later.
14951 (linux_stabilize_threads): New.
14952 (linux_wait_1): Check if threads need moving out of jump pads, and
14954 (stuck_in_jump_pad_callback): New.
14955 (move_out_of_jump_pad_callback): New.
14956 (lwp_running): New.
14957 (linux_resume_one_lwp): Handle moving out of jump pads.
14958 (linux_set_resume_request): Dequeue deferred signals.
14959 (need_step_over_p): Also step over fast tracepoint jumps.
14960 (start_step_over): Also uninsert fast tracepoint jumps.
14961 (finish_step_over): Also reinsert fast tracepoint jumps.
14962 (linux_install_fast_tracepoint_jump): New.
14963 (linux_target_ops): Install linux_stabilize_threads and
14964 linux_install_fast_tracepoint_jump_pad.
14965 * linux-low.h (linux_target_ops) <get_thread_area,
14966 install_fast_tracepoint_jump_pad>: New fields.
14967 (struct lwp_info) <collecting_fast_tracepoint,
14968 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14969 (linux_get_thread_area): Declare.
14970 * linux-x86-low.c (jump_insn): New.
14971 (x86_get_thread_area): New.
14972 (append_insns): New.
14973 (push_opcode): New.
14974 (amd64_install_fast_tracepoint_jump_pad): New.
14975 (i386_install_fast_tracepoint_jump_pad): New.
14976 (x86_install_fast_tracepoint_jump_pad): New.
14977 (the_low_target): Install x86_get_thread_area and
14978 x86_install_fast_tracepoint_jump_pad.
14979 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14980 (struct fast_tracepoint_jump): New.
14981 (fast_tracepoint_jump_insn): New.
14982 (fast_tracepoint_jump_shadow): New.
14983 (find_fast_tracepoint_jump_at): New.
14984 (fast_tracepoint_jump_here): New.
14985 (delete_fast_tracepoint_jump): New.
14986 (set_fast_tracepoint_jump): New.
14987 (uninsert_fast_tracepoint_jumps_at): New.
14988 (reinsert_fast_tracepoint_jumps_at): New.
14989 (set_breakpoint_at): Use write_inferior_memory.
14990 (uninsert_raw_breakpoint): Use write_inferior_memory.
14991 (check_mem_read): Mask out fast tracepoint jumps.
14992 (check_mem_write): Mask out fast tracepoint jumps.
14993 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14994 (set_fast_tracepoint_jump): Declare.
14995 (delete_fast_tracepoint_jump)
14996 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14997 (reinsert_fast_tracepoint_jumps_at): Declare.
14998 * regcache.c: Don't compile many functions when building the
14999 in-process agent library.
15000 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
15001 the register buffer in the heap.
15002 (free_register_cache): If the register buffer isn't owned by the
15003 regcache, don't free it.
15004 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
15005 pre-existing register caches.
15006 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
15008 (convert_ascii_to_int): : Constify `from' parameter type.
15009 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
15010 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
15011 the needed buffer in-place.
15012 (relocate_instruction): New.
15013 * server.c (handle_query) <qSymbols>: If the target supports
15014 tracepoints, give it a chance of looking up symbols. Report
15015 support for fast tracepoints.
15016 (handle_status): Stabilize threads.
15017 (process_serial_event): Adjust.
15018 * server.h (struct fast_tracepoint_jump): Forward declare.
15019 (struct process_info) <fast_tracepoint_jumps>: New field.
15020 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
15021 (decode_X_packet, decode_M_packet): Adjust.
15022 (relocate_instruction): Declare.
15023 (in_process_agent_loaded): Declare.
15024 (tracepoint_look_up_symbols): Declare.
15025 (struct fast_tpoint_collect_status): Declare.
15026 (fast_tracepoint_collecting): Declare.
15027 (force_unlock_trace_buffer): Declare.
15028 (handle_tracepoint_bkpts): Declare.
15029 (initialize_low_tracepoint)
15030 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
15031 * target.h (struct target_ops) <stabilize_threads,
15032 install_fast_tracepoint_jump_pad>: New fields.
15033 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
15034 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
15035 [HAVE_STDINT_H]: Include stdint.h.
15036 (trace_debug_1): Rename to ...
15037 (trace_vdebug): ... this.
15038 (trace_debug): Rename to ...
15039 (trace_debug_1): ... this. Add `level' parameter.
15040 (trace_debug): New.
15041 (ATTR_USED, ATTR_NOINLINE): New.
15042 (IP_AGENT_EXPORT): New.
15043 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
15044 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
15045 (about_to_request_buffer_space, trace_buffer_is_full)
15046 (stopping_tracepoint, expr_eval_result, error_tracepoint)
15047 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
15048 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
15049 (traceframe_write_count, traceframes_created)
15050 (trace_state_variables)
15051 New renaming defines.
15052 (struct ipa_sym_addresses): New.
15053 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
15054 (symbol_list): New.
15055 (ipa_sym_addrs): New.
15056 (all_tracepoint_symbols_looked_up): New.
15057 (in_process_agent_loaded): New.
15058 (write_e_ipa_not_loaded): New.
15059 (maybe_write_ipa_not_loaded): New.
15060 (tracepoint_look_up_symbols): New.
15061 (debug_threads) [IN_PROCESS_AGENT]: New.
15062 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15063 (UNKNOWN_SIDE_EFFECTS): New.
15064 (stop_tracing): New.
15065 (flush_trace_buffer): New.
15066 (stop_tracing_bkpt): New.
15067 (flush_trace_buffer_bkpt): New.
15068 (read_inferior_integer): New.
15069 (read_inferior_uinteger): New.
15070 (read_inferior_data_pointer): New.
15071 (write_inferior_data_pointer): New.
15072 (write_inferior_integer): New.
15073 (write_inferior_uinteger): New.
15074 (struct collect_static_trace_data_action): Delete.
15075 (enum tracepoint_type): New.
15076 (struct tracepoint) <type>: New field `type'.
15077 <actions_str, step_actions, step_actions_str>: Only include in
15079 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15080 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15081 (tracepoints): Use IP_AGENT_EXPORT.
15082 (last_tracepoint): Don't include in the IPA.
15083 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15084 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15085 (alloced_trace_state_variables): New.
15086 (trace_state_variables): Use IP_AGENT_EXPORT.
15087 (traceframe_t): Delete unused variable.
15088 (circular_trace_buffer): Don't include in the IPA.
15089 (trace_buffer_start): Delete.
15090 (struct trace_buffer_control): New.
15091 (trace_buffer_free): Delete.
15092 (struct ipa_trace_buffer_control): New.
15093 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15094 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15096 (trace_buffer_ctrl): New.
15097 (TRACE_BUFFER_CTRL_CURR): New.
15098 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15099 Reimplement as macros.
15100 (trace_buffer_wrap): Delete.
15101 (traceframe_write_count, traceframe_read_count)
15102 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15103 (struct tracepoint_hit_ctx) <type>: New field.
15104 (struct fast_tracepoint_ctx): New.
15105 (memory_barrier): New.
15107 (record_tracepoint_error): Update atomically in the IPA.
15108 (clear_inferior_trace_buffer): New.
15109 (about_to_request_buffer_space): New.
15110 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15111 updating the same buffer.
15112 (add_tracepoint): Default the tracepoint's type to trap
15113 tracepoint, and orig_size to -1.
15114 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15115 internal variables.
15116 (create_trace_state_variable): New parameter `gdb'. Handle it.
15117 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15118 (cmd_qtdp): Handle fast tracepoints.
15119 (cmd_qtdv): Adjust.
15120 (max_jump_pad_size): New.
15121 (gdb_jump_pad_head): New.
15122 (get_jump_space_head): New.
15123 (claim_jump_space): New.
15124 (sort_tracepoints): New.
15125 (MAX_JUMP_SIZE): New.
15126 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15128 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15129 support. Upload fast traceframes, and delete internal IPA
15131 (stop_tracing_handler): New.
15132 (flush_trace_buffer_handler): New.
15133 (cmd_qtstop): Upload fast tracepoints.
15134 (response_tracepoint): Handle fast tracepoints.
15135 (tracepoint_finished_step): Upload fast traceframes. Set the
15136 tracepoint hit context's tracepoint type.
15137 (handle_tracepoint_bkpts): New.
15138 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15139 type. Add comment about fast tracepoints.
15140 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15141 non-existing action_str field.
15142 (get_context_regcache): Handle fast tracepoints.
15143 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15145 (fast_tracepoint_from_jump_pad_address): New.
15146 (fast_tracepoint_from_ipa_tpoint_address): New.
15147 (collecting_t): New.
15148 (force_unlock_trace_buffer): New.
15149 (fast_tracepoint_collecting): New.
15151 (gdb_collect): New.
15152 (write_inferior_data_ptr): New.
15153 (target_tp_heap): New.
15154 (target_malloc): New.
15155 (download_agent_expr): New.
15157 (download_tracepoints): New.
15158 (download_trace_state_variables): New.
15159 (upload_fast_traceframes): New.
15160 (IPA_FIRST_TRACEFRAME): New.
15161 (IPA_NEXT_TRACEFRAME_1): New.
15162 (IPA_NEXT_TRACEFRAME): New.
15163 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
15164 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
15165 (gdb_jump_pad_buffer_end): New.
15166 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
15167 (initialize_tracepoint): Adjust.
15168 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
15169 buffer. Initialize the low module.
15170 * utils.c (PREFIX, TOOLNAME): New.
15171 (malloc_failure): Use PREFIX.
15172 (error): In the IPA, an error causes an exit.
15173 (fatal, warning): Use PREFIX.
15174 (internal_error): Use TOOLNAME.
15175 (NUMCELLS): Increase to 10.
15176 * configure, config.in: Regenerate.
15178 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15180 * server.c (handle_query) <qSupported>: Do two passes over the
15181 qSupported string to avoid nesting strtok.
15183 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15185 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
15187 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
15188 -Wl,--dynamic-list.
15189 * configure: Regenerate.
15190 * proc-service.list: New.
15192 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15194 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
15197 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
15199 * gdbreplay.c (remote_open): Check error return from socket() call by
15200 its equality to -1 not by it being negative.
15201 * remote-utils.c (remote_open): Likewise.
15203 2010-05-23 Pedro Alves <pedro@codesourcery.com>
15205 * config.h: Regenerate.
15207 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15209 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
15210 doesn't provide PTRACE_GET_THREAD_AREA.
15212 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15214 * linux-m68k-low.c: Include <asm/ptrace.h>
15215 (ps_get_thread_area): Implement.
15217 2010-05-03 Doug Evans <dje@google.com>
15219 * event-loop.c (struct callback_event): New struct.
15220 (callback_list): New global.
15221 (append_callback_event, delete_callback_event): New functions.
15222 (process_callback): New function.
15223 (start_event_loop): Call it.
15224 * remote-utils.c (NOT_SCHEDULED): Define.
15225 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
15226 moved out of readchar.
15227 (readchar): Rewrite. Call reschedule before returning.
15228 (reset_readchar): New function.
15229 (remote_close): Call it.
15230 (process_remaining, reschedule): New functions.
15231 * server.h (callback_handler_func): New typedef.
15232 (append_callback_event, delete_callback_event): Declare.
15234 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15236 * proc-service.c (ps_pglobal_lookup): Use
15237 thread_db_look_up_one_symbol.
15238 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
15239 parameter. Use it instead of all_symbols_looked_up.
15240 * server.h (struct process_info) <all_symbols_looked_up>: Delete
15242 (all_symbols_looked_up): Don't declare.
15243 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
15244 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
15246 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
15247 Set all_symbols_looked_up here.
15248 (thread_db_look_up_one_symbol): New.
15249 (thread_db_get_tls_address): Adjust.
15250 (thread_db_load_search, try_thread_db_load_1): Always allocate the
15251 thread_db object on the heap, and tentatively set it in the
15253 (thread_db_init): Don't set all_symbols_looked_up here.
15254 * linux-low.h (thread_db_look_up_one_symbol): Declare.
15256 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15258 * linux-low.c (linux_kill, linux_detach): Adjust.
15259 (status_pending_p_callback): Remove redundant statement. Check
15260 for !TARGET_WAITIKIND_IGNORE, instead of
15261 TARGET_WAITKIND_STOPPED.
15262 (handle_tracepoints): Make sure LWP is locked. Adjust.
15263 (linux_wait_for_event_1): Adjust.
15264 (linux_cancel_breakpoints): New.
15265 (unsuspend_one_lwp): New.
15266 (unsuspend_all_lwps): New.
15267 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
15268 (send_sigstop_callback): Change return type to int, add new
15269 `except' parameter and handle it.
15270 (suspend_and_send_sigstop_callback): New.
15271 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
15272 pass them down. If SUSPEND, also increment the lwp's suspend
15274 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
15275 (need_step_over_p): Don't consider suspended LWPs.
15276 (start_step_over): Adjust.
15277 (proceed_one_lwp): Change return type to int, add new `except'
15278 parameter and handle it.
15279 (unsuspend_and_proceed_one_lwp): New.
15280 (proceed_all_lwps): Use find_inferior instead of
15282 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
15283 also decrement the suspend count of LWPs. Pass `except' down,
15284 instead of hacking its suspend count.
15285 (linux_pause_all): Add `freeze' parameter. Adjust.
15286 (linux_unpause_all): New.
15287 (linux_target_ops): Install linux_unpause_all.
15288 * server.c (handle_status): Adjust.
15289 * target.h (struct target_ops): New fields `unpause_all' and
15290 `cancel_breakpoints'. Add new parameter to `pause_all'.
15291 (pause_all): Add new `freeze' parameter.
15292 (unpause_all): New.
15293 (cancel_breakpoints): New.
15294 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
15295 cancel breakpoints.
15296 (cmd_qtstart): Pause threads.
15297 (stop_tracing): Pause threads, and cancel breakpoints.
15298 * win32-low.c (win32_target_ops): Adjust.
15300 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15302 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
15303 the inferior right away from here...
15304 (linux_wait_1): ... to here, and adjust to check the thread's
15305 last_resume_kind instead of the lwp's step or stop_expected flags.
15307 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15309 * README: Use consistent `GDB' and `GDBserver' spellings.
15311 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15313 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
15314 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
15315 (linux_detach_one_lwp): Assume the lwp is stopped.
15316 (any_thread_of): Delete.
15317 (linux_detach): Stop all lwps here. Don't blindly delete all
15319 (delete_lwp_callback): New.
15320 (linux_mourn): Delete all lwps of the process that is gone.
15321 (linux_wait_1): Don't delete the last lwp of the process here.
15322 * mem-break.h (mark_breakpoints_out): Declare.
15323 * mem-break.c (mark_breakpoints_out): New.
15324 (free_all_breakpoints): Use it.
15325 * server.c (handle_target_event): If the process is gone, mark
15327 * thread-db.c (struct thread_db) <create_bp>: New field.
15328 (thread_db_enable_reporting): Fix prototype. Store a thread event
15329 breakpoint reference in the thread_db struct.
15330 (thread_db_load_search): Clear the thread_db object.
15331 (try_thread_db_load_1): Ditto.
15332 (switch_to_process): New.
15333 (disable_thread_event_reporting): Use it.
15334 (remove_thread_event_breakpoints): New.
15335 (thread_db_detach, thread_db_mourn): Use it.
15337 2010-05-01 Pedro Alves <pedro@codesourcery.com>
15339 * linux-low.c (linux_enable_event_reporting): New.
15340 (linux_wait_for_event_1, handle_extended_wait): Use it.
15342 2010-04-30 Pedro Alves <pedro@codesourcery.com>
15344 * linux-low.c (linux_kill_one_lwp, linux_kill)
15345 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
15346 (send_sigstop): Take an lwp_info as parameter instead. Queue a
15347 SIGSTOP even if the LWP is stopped.
15348 (send_sigstop_callback): New.
15349 (stop_all_lwps): Use send_sigstop_callback instead.
15350 (linux_resume_one_thread): Adjust.
15351 (proceed_one_lwp): Still proceed an LWP that the client has
15352 requested to stop, if we haven't reported it as stopped yet. Make
15353 sure that LWPs the client want stopped, have a pending SIGSTOP.
15355 2010-04-26 Doug Evans <dje@google.com>
15357 * server.c (handle_general_set): Make static.
15359 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
15360 Print received char after testing for error/eof instead of before.
15361 (input_interrupt): Tweak comment.
15363 2010-04-23 Doug Evans <dje@google.com>
15365 * server.c (start_inferior): Print inferior argv if --debug.
15367 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15369 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15370 * nto-x86-low.c: Include server.h
15372 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15374 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15375 be consistent with other sources of this directory.
15376 (init_registers_amd64): Correct name of source file of this function
15379 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15381 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15382 64-bit executables.
15384 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15386 * win32-i386-low.c: Add 64-bit support.
15387 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15388 (init_registers_amd64): Declare.
15389 (mappings): Add 64-bit version of array.
15390 (init_windows_x86): New function.
15391 (the_low_target): Change init_arch field to init_windows_x86.
15393 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15395 * win32-low.c: Adapt to support also 64-bit architecture.
15396 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15397 (get_image_name): Use SIZE_T type for local variable `done'.
15398 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15399 (toolhelp_get_dll_name): Idem.
15400 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15401 Use uintptr_t typecast to avoid warning.
15402 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15403 (handle_exception): Use phex_nz to avoid warning.
15404 (win32_wait): Remove unused local variable `process'.
15406 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15408 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15411 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15413 * configure.ac: Use `ws2_32' library for srv_mingw.
15414 * configure: Regenerate.
15415 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15416 * remote-utils.c: Likewise.
15418 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15420 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15421 if __x86_64__ is defined.
15423 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15425 * configure: Regenerate.
15427 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15429 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15430 * target.h (target_ops): New get_tib_address field.
15431 * win32-low.h (win32_thread_info): Add thread_local_base field.
15432 * win32-low.c (child_add_thread): Add tlb argument.
15433 Set thread_local_base field to TLB.
15434 (get_child_debug_event): Adapt to child_add_thread change.
15435 (win32_get_tib_address): New function.
15436 (win32_target_ops): Set get_tib_address field to
15437 win32_get_tib_address.
15438 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15440 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15442 * linux-low.c (linux_mourn): Also remove the process.
15443 * server.c (handle_target_event): Don't remove the process here.
15444 * nto-low.c (nto_mourn): New.
15445 (nto_target_ops): Install it.
15446 * spu-low.c (spu_mourn): New.
15447 (spu_target_ops): Install it.
15448 * win32-low.c (win32_mourn): New.
15449 (win32_target_ops): Install it.
15451 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15453 * server.h (buffer_xml_printf): Remove redundant `;'.
15455 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15457 * regcache.c (set_register_cache): Invalidate regcaches before
15458 changing the register cache layout.
15459 (regcache_invalidate_one): Allow a NULL regcache.
15460 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15461 regcaches before changing the register cache layout or the target
15464 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15466 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15467 variable warning on Linux/x86-64.
15469 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15471 GDBserver disconnected tracing support.
15473 * linux-low.c (linux_remove_process): Delete.
15474 (add_lwp): Don't set last_resume_kind here.
15475 (linux_kill): Use `mourn'.
15476 (linux_detach): Use `thread_db_detach', and `mourn'.
15477 (linux_mourn): New.
15478 (linux_attach_lwp_1): Adjust comment.
15479 (linux_attach): last_resume_kind moved the thread_info; adjust.
15480 (status_pending_p_callback): Adjust.
15481 (linux_wait_for_event_1): Adjust.
15482 (count_events_callback, select_singlestep_lwp_callback)
15483 (select_event_lwp_callback, cancel_breakpoints_callback)
15484 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15485 (proceed_one_lwp): Adjust.
15486 (linux_async): Add debug output.
15487 (linux_thread_stopped): New.
15488 (linux_pause_all): New.
15489 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15491 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15492 (thread_db_free): Delete declaration.
15493 (thread_db_detach, thread_db_mourn): Declare.
15494 * thread-db.c (thread_db_init): Use thread_db_mourn.
15495 (thread_db_free): Delete, split in two.
15496 (disable_thread_event_reporting): New.
15497 (thread_db_detach): New.
15498 (thread_db_mourn): New.
15500 * server.h (struct thread_info) <last_resume_kind>: New field.
15501 <attached>: Add comment.
15502 <gdb_detached>: New field.
15503 (handler_func): Change return type to int.
15504 (handle_serial_event, handle_target_event): Ditto.
15505 (gdb_connected): Declare.
15507 (disconnected_tracing): Declare.
15508 (stop_tracing): Declare.
15510 * server.c (handle_query) <qSupported>: Report support for
15511 disconnected tracing.
15512 (queue_stop_reply_callback): Account for running threads.
15513 (gdb_wants_thread_stopped): New.
15514 (gdb_wants_all_threads_stopped): New.
15515 (gdb_reattached_process): New.
15516 (handle_status): Clear the `gdb_detached' flag of all processes.
15517 In all-stop, stop all threads.
15518 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15519 (process_serial_event): If the remote connection breaks, or if an
15520 exit was forced with "monitor exit", force an event loop exit.
15521 Handle disconnected tracing on detach.
15522 (handle_serial_event): Adjust.
15523 (handle_target_event): If GDB isn't connected, forward events back
15524 to the inferior, unless the last process exited, in which case,
15525 exit gdbserver. Adjust interface.
15527 * remote-utils.c (remote_open): Don't block in accept. Instead
15528 register an event loop source on the listen socket file
15529 descriptor. Refactor bits into ...
15530 (listen_desc): ... this new global.
15531 (gdb_connected): ... this new function.
15532 (enable_async_notification): ... this new function.
15533 (handle_accept_event): ... this new function.
15534 (remote_close): Clear remote_desc.
15536 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15538 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15540 (mourn_inferior): Define.
15541 (target_process_qsupported): Avoid the dangling else problem.
15542 (thread_stopped): Define.
15543 (pause_all): Define.
15544 (target_waitstatus_to_string): Declare.
15545 * target.c (target_waitstatus_to_string): New.
15547 * tracepoint.c (tracing): Make extern.
15548 (disconnected_tracing): New.
15549 (stop_tracing): Make extern. Handle tracing stops due to GDB
15551 (cmd_qtdisconnected): New.
15552 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15553 (handle_tracepoint_general_set): Handle QTDisconnected.
15555 * event-loop.c (event_handler_func): Change return type to int.
15556 (process_event): Bail out if the event handler wants the event
15558 (handle_file_event): Ditto.
15559 (start_event_loop): Bail out if the event handler wants the event
15562 * nto-low.c (nto_target_ops): Adjust.
15563 * spu-low.c (spu_wait): Don't remove the process here.
15564 (spu_target_ops): Adjust.
15565 * win32-low.c (win32_wait): Don't remove the process here.
15566 (win32_target_ops): Adjust.
15568 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15570 * regcache.c (realloc_register_cache): Invalidate inferior's
15571 regcache before recreating it.
15573 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15575 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15577 2010-04-09 Stan Shebs <stan@codesourcery.com>
15578 Pedro Alves <pedro@codesourcery.com>
15580 * server.h (LONGEST): New.
15581 (struct thread_info) <while_stepping>: New field.
15582 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15584 (initialize_tracepoint, handle_tracepoint_general_set)
15585 (handle_tracepoint_query, tracepoint_finished_step)
15586 (tracepoint_was_hit, release_while_stepping_state_list):
15587 (current_traceframe): Declare.
15588 * server.c (handle_general_set): Handle tracepoint packets.
15589 (read_memory): New.
15590 (write_memory): New.
15591 (handle_search_memory_1): Use read_memory.
15592 (handle_query): Report support for conditional tracepoints, trace
15593 state variables, and tracepoint sources. Handle tracepoint
15595 (main): Initialize the tracepoints module.
15596 (process_serial_event): Handle traceframe reads/writes.
15598 * linux-low.c (handle_tracepoints): New.
15599 (linux_wait_1): Call it.
15600 (linux_resume_one_lwp): Handle while-stepping.
15601 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15602 (linux_target_ops): Install them.
15603 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15605 * linux-x86-low.c (x86_supports_tracepoints): New.
15606 (the_low_target). Install it.
15608 * mem-break.h (delete_breakpoint): Declare.
15609 * mem-break.c (delete_breakpoint): Make external.
15611 * target.h (struct target_ops): Add `supports_tracepoints',
15612 `read_pc', and `write_pc' fields.
15613 (target_supports_tracepoints): Define.
15614 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15617 * regcache.h (struct regcache) <registers_owned>: New field.
15618 (init_register_cache, regcache_cpy): Declare.
15619 (regcache_read_pc, regcache_write_pc): Declare.
15620 (register_cache_size): Declare.
15621 (supply_regblock): Declare.
15622 * regcache.c (init_register_cache): New.
15623 (new_register_cache): Use it.
15624 (regcache_cpy): New.
15625 (register_cache_size): New.
15626 (supply_regblock): New.
15627 (regcache_read_pc, regcache_write_pc): New.
15629 * tracepoint.c: New.
15631 * Makefile.in (OBS): Add tracepoint.o.
15632 (tracepoint.o): New rule.
15634 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15636 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15638 (i386-mmx.c): Likewise.
15639 (i386-mmx-linux.o): Likewise.
15640 (i386-mmx-linux.c): Likewise.
15642 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15643 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15644 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15645 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15647 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15648 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15649 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15651 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15653 * Makefile.in (clean): Updated.
15655 (i386-avx.c): Likewise.
15656 (i386-avx-linux.o): Likewise.
15657 (i386-avx-linux.c): Likewise.
15658 (amd64-avx.o): Likewise.
15659 (amd64-avx.c): Likewise.
15660 (amd64-avx-linux.o): Likewise.
15661 (amd64-avx-linux.c): Likewise.
15663 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15664 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15665 (srv_amd64_regobj): Add amd64-avx.o.
15666 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15667 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15668 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15669 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15670 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15671 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15672 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15674 * i387-fp.c: Include "i386-xstate.h".
15676 (i387_cache_to_xsave): Likewise.
15677 (i387_xsave_to_cache): Likewise.
15678 (x86_xcr0): Likewise.
15680 * i387-fp.h (i387_cache_to_xsave): Likewise.
15681 (i387_xsave_to_cache): Likewise.
15682 (x86_xcr0): Likewise.
15684 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15685 * linux-crisv32-low.c (target_regsets): Likewise.
15686 * linux-m68k-low.c (target_regsets): Likewise.
15687 * linux-mips-low.c (target_regsets): Likewise.
15688 * linux-ppc-low.c (target_regsets): Likewise.
15689 * linux-s390-low.c (target_regsets): Likewise.
15690 * linux-sh-low.c (target_regsets): Likewise.
15691 * linux-sparc-low.c (target_regsets): Likewise.
15692 * linux-xtensa-low.c (target_regsets): Likewise.
15694 * linux-low.c: Include <sys/uio.h>.
15695 (regsets_fetch_inferior_registers): Support nt_type.
15696 (regsets_store_inferior_registers): Likewise.
15697 (linux_process_qsupported): New.
15698 (linux_target_ops): Add linux_process_qsupported.
15700 * linux-low.h (regset_info): Add nt_type.
15701 (linux_target_ops): Add process_qsupported.
15703 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15705 (init_registers_i386_avx_linux): New.
15706 (init_registers_amd64_avx_linux): Likewise.
15707 (xmltarget_i386_linux_no_xml): Likewise.
15708 (xmltarget_amd64_linux_no_xml): Likewise.
15709 (PTRACE_GETREGSET): Likewise.
15710 (PTRACE_SETREGSET): Likewise.
15711 (x86_fill_xstateregset): Likewise.
15712 (x86_store_xstateregset): Likewise.
15713 (use_xml): Likewise.
15714 (x86_linux_update_xmltarget): Likewise.
15715 (x86_linux_process_qsupported): Likewise.
15716 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15717 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15718 init_registers_i386_linux here. Call
15719 x86_linux_update_xmltarget.
15720 (the_low_target): Add x86_linux_process_qsupported.
15722 * server.c (handle_query): Call target_process_qsupported.
15724 * target.h (target_ops): Add process_qsupported.
15725 (target_process_qsupported): New.
15727 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15729 * inferiors.c (add_thread): Set last_status kind to
15730 TARGET_WAITKIND_IGNORE.
15731 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15732 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15733 (linux_wait_1): Move `thread' local definition to block that uses
15734 it. Don't NULL initialize `event_child'.
15735 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15736 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15737 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15739 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15741 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15742 an extended waitstatus, or by a watchpoint.
15743 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15744 thread was stepping or has been stopped by a watchpoint.
15746 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15748 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15749 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15750 of another, then delete the previous, and validate all
15752 (validate_inserted_breakpoint): New.
15753 (delete_disabled_breakpoints): New.
15754 (validate_breakpoints): New.
15755 (check_mem_read): Validate breakpoints before trusting their
15756 shadow. Delete disabled breakpoints.
15757 (check_mem_write): Validate breakpoints before trusting they
15758 should be inserted. Delete disabled breakpoints.
15759 * mem-break.h (validate_breakpoints):
15760 * server.c (handle_query): Validate breakpoints when we see a
15763 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15765 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15766 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15767 if we could tell there's a GDB breakpoint at stop_pc.
15768 (need_step_over_p): Don't do a step over if we find a GDB
15769 breakpoint at the resume PC.
15771 * mem-break.c (struct raw_breakpoint): New.
15772 (enum bkpt_type): New type `gdb_breakpoint'.
15773 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15774 fields. New field `raw'.
15775 (find_raw_breakpoint_at): New.
15776 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15777 breakpoint instead.
15778 (set_breakpoint_at): Adjust.
15779 (delete_raw_breakpoint): New.
15780 (release_breakpoint): New.
15781 (delete_breakpoint): Rename to...
15782 (delete_breakpoint_1): ... this. Add proc parameter. Use
15783 release_breakpoint. Return ENOENT.
15784 (delete_breakpoint): Reimplement.
15785 (find_breakpoint_at): Delete.
15786 (find_gdb_breakpoint_at): New.
15787 (delete_breakpoint_at): Delete.
15788 (set_gdb_breakpoint_at): New.
15789 (delete_gdb_breakpoint_at): New.
15790 (gdb_breakpoint_here): New.
15791 (set_reinsert_breakpoint): Use release_breakpoint.
15792 (uninsert_breakpoint): Rename to ...
15793 (uninsert_raw_breakpoint): ... this.
15794 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15795 (reinsert_raw_breakpoint): Change parameter type to
15797 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15799 (check_breakpoints): Adjust. Use release_breakpoint.
15800 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15801 (breakpoint_inserted_here): Ditto.
15802 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15803 Don't trust the breakpoint's shadow if it is not inserted.
15804 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15805 (delete_all_breakpoints): Adjust.
15806 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15807 use delete_breakpoint_1.
15809 * mem-break.h (breakpoints_supported): Delete declaration.
15810 (set_gdb_breakpoint_at): Declare.
15811 (gdb_breakpoint_here): Declare.
15812 (delete_breakpoint_at): Delete.
15813 (delete_gdb_breakpoint_at): Declare.
15815 * server.h (struct raw_breakpoint): Forward declare.
15816 (struct process_info): New field `raw_breakpoints'.
15818 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15821 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15823 * linux-low.c (status_pending_p_callback): Fix comment.
15824 (linux_wait_for_event_1): Move most of the internal breakpoint
15825 handling from here...
15826 (linux_wait_1): ... to here.
15827 (count_events_callback): New.
15828 (select_singlestep_lwp_callback): New.
15829 (select_event_lwp_callback): New.
15830 (cancel_breakpoints_callback): New.
15831 (select_event_lwp): New.
15832 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15833 priority to all LWPs that have had events that should be reported
15834 to the client. Cancel breakpoints when about to reporting the
15835 event to the client, not while stopping lwps. No longer cancel
15836 finished single-steps here.
15837 (cancel_finished_single_step): Delete.
15838 (cancel_finished_single_steps): Delete.
15840 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15842 * mem-break.c (enum bkpt_type): New.
15843 (struct breakpoint): New field `type'.
15844 (set_breakpoint_at): Change return type to struct breakpoint
15845 pointer. Set type to `other_breakpoint' by default.
15846 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15847 in the breakpoint list.
15848 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15849 (reinsert_breakpoint): Rename to ...
15850 (reinsert_raw_breakpoint): ... this.
15851 (reinsert_breakpoints_at): Adjust.
15852 * mem-break.h (struct breakpoint): Declare.
15853 (set_breakpoint_at): Change return type to struct breakpoint
15856 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15858 * server.c (handle_query): Assign, not compare.
15860 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15862 Teach linux gdbserver to step-over-breakpoints.
15864 * linux-low.c (can_hardware_single_step): New.
15865 (supports_breakpoints): New.
15866 (handle_extended_wait): If stopping threads, read the stop pc of
15867 the new cloned LWP.
15869 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15870 low target doesn't support retrieving the PC.
15871 (add_lwp): Set last_resume_kind to resume_continue.
15872 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15873 (linux_attach): Don't clear stop_expected. Set the lwp's
15874 last_resume_kind to resume_stop.
15875 (linux_detach_one_lwp): Don't check for removed breakpoints.
15876 (check_removed_breakpoint): Delete.
15877 (status_pending_p): Rename to ...
15878 (status_pending_p_callback): ... this. Don't check for removed
15879 breakpoints. Don't consider threads that are stopped from GDB's
15881 (linux_wait_for_lwp): Always read the stop_pc here.
15882 (cancel_breakpoint): New.
15883 (step_over_bkpt): New global.
15884 (linux_wait_for_event_1): Implement stepping over breakpoints.
15885 (gdb_wants_lwp_stopped): New.
15886 (gdb_wants_all_stopped): New.
15887 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15888 single-step traps here. Store the thread's last reported target
15890 (send_sigstop): Don't clear stop_expected. Always set it,
15892 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15893 (cancel_finished_single_step): New.
15894 (cancel_finished_single_steps): New.
15895 (wait_for_sigstop): Don't cancel finished single-step traps here.
15896 (linux_resume_one_lwp): Don't check for removed breakpoints.
15897 Don't set `step' on non-hardware step archs.
15898 (linux_set_resume_request): Ignore resume_stop requests if already
15899 stopping or stopped. Set the lwp's last_resume_kind.
15900 (resume_status_pending_p): Don't check for removed breakpoints.
15901 (need_step_over_p): New.
15902 (start_step_over): New.
15903 (finish_step_over): New.
15904 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15905 requests. Clear the thread's last reported target waitstatus.
15906 Don't use the `suspended' flag. Don't consider pending breakpoints.
15907 (linux_resume): Start a step-over if necessary.
15908 (proceed_one_lwp): New.
15909 (proceed_all_lwps): New.
15910 (unstop_all_lwps): New.
15911 * linux-low.h (struct lwp_info): Rewrite comment for the
15912 `suspended' flag. Add the `stop_pc' field. Delete the
15913 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15914 Add `'last_resume_kind' and `need_step_over' fields.
15915 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15916 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15917 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15918 (set_raw_breakpoint_at): New.
15919 (set_breakpoint_at): Rewrite to use it.
15920 (reinsert_breakpoint_handler): Delete.
15921 (set_reinsert_breakpoint): New.
15922 (reinsert_breakpoint_by_bp): Delete.
15923 (delete_reinsert_breakpoints): New.
15924 (uninsert_breakpoint): Rewrite.
15925 (uninsert_breakpoints_at): New.
15926 (reinsert_breakpoint): Rewrite.
15927 (reinsert_breakpoints_at): New.
15928 (check_breakpoints): Rewrite.
15929 (breakpoint_here): New.
15930 (breakpoint_inserted_here): New.
15931 (check_mem_read): Adjust.
15932 * mem-break.h (breakpoints_supported, breakpoint_here)
15933 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15934 (reinsert_breakpoint_by_bp): Delete declaration.
15935 (delete_reinsert_breakpoints): Declare.
15936 (reinsert_breakpoint): Delete declaration.
15937 (reinsert_breakpoints_at): Declare.
15938 (uninsert_breakpoint): Delete declaration.
15939 (uninsert_breakpoints_at): Declare.
15940 (check_breakpoints): Adjust prototype.
15941 * server.h: Adjust include order.
15942 (struct thread_info): Declare here. Add a `last_status' field.
15944 2010-03-23 Michael Snyder <msnyder@vmware.com>
15946 * server.c (crc32): New function.
15947 (handle_query): Add handling for 'qCRC:' request.
15949 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15951 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15952 lwp had been stopped by a watchpoint.
15954 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15956 * server.h (internal_error): Declare.
15957 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15958 * utils.c (internal_error): New function.
15960 2010-03-15 Andreas Schwab <schwab@redhat.com>
15962 * configure.srv: Fix typo setting srv_regobj.
15964 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15966 * linux-low.c (fetch_register): Avoid passing a non string literal
15968 (usr_store_inferior_registers): Ditto.
15970 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15972 * linux-low.c (linux_write_memory): Bail out early if peeking
15975 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15977 * linux-low.h (struct lwp_info): New fields
15978 `stopped_by_watchpoint' and `stopped_data_address'.
15979 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15980 here, and cache them in the lwp object.
15981 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15983 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15985 (linux_stopped_by_watchpoint): Rewrite.
15986 (linux_stopped_data_address): Rewrite.
15988 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15990 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15991 switching the current inferior, not before.
15993 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15995 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15996 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15997 i386-linux.c and amd64-linux.c.
15998 (reg-i386.o): Removed.
15999 (reg-i386.c): Likewise.
16000 (reg-i386-linux.o): Likewise.
16001 (reg-i386-linux.c): Likewise.
16002 (reg-x86-64.o): Likewise.
16003 (reg-x86-64.c): Likewise.
16004 (reg-x86-64-linux.o): Likewise.
16005 (reg-x86-64-linux.c): Likewise.
16007 (i386.c): Likewise.
16008 (i386-linux.o): Likewise.
16009 (i386-linux.c): Likewise.
16010 (amd64.o): Likewise.
16011 (amd64.c): Likewise.
16012 (amd64-linux.o): Likewise.
16013 (amd64-linux.c): Likewise.
16015 * configure.srv (srv_i386_regobj): New.
16016 (srv_i386_linux_regobj): Likewise.
16017 (srv_amd64_regobj): Likewise.
16018 (srv_amd64_linux_regobj): Likewise.
16019 (srv_i386_32bit_xmlfiles): Likewise.
16020 (srv_i386_64bit_xmlfiles): Likewise.
16021 (srv_i386_xmlfiles): Likewise.
16022 (srv_amd64_xmlfiles): Likewise.
16023 (srv_i386_linux_xmlfiles): Likewise.
16024 (srv_amd64_linux_xmlfiles): Likewise.
16025 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
16026 srv_xmlfiles to $srv_i386_xmlfiles.
16027 (i[34567]86-*-mingw32ce*): Likewise.
16028 (i[34567]86-*-mingw*): Likewise.
16029 (i[34567]86-*-nto*): Likewise.
16030 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
16031 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
16032 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
16033 (x86_64-*-linux*): Likewise.
16035 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
16036 (init_registers_amd64_linux): New.
16037 (x86_arch_setup): Replace init_registers_x86_64_linux with
16038 init_registers_amd64_linux.
16040 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
16042 * configure.ac: Check for libdl. If it is not available link against
16043 static libthread_db.
16044 * configure: Regenerate.
16046 2010-02-22 Pedro Alves <pedro@codesourcery.com>
16050 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
16051 handing a read watchpoint.
16052 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
16054 2010-02-12 Doug Evans <dje@google.com>
16056 * linux-low.c (linux_supports_tracefork_flag): Document.
16057 (linux_look_up_symbols): Add comment.
16059 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
16061 * regcache.c (supply_register): Clear regcache if buf is NULL.
16063 2010-02-02 Nicolas Roche <roche@sourceware.org>
16064 Joel Brobecker <brobecker@adacore.com>
16066 * inferiors.c (find_inferior): Add function documentation.
16067 (unloaded_dll): Handle the case where the unloaded dll has not
16068 been previously registered in the dll list.
16070 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16072 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16073 (thumb2_breakpoint): New.
16074 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16076 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16078 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16079 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16082 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16084 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16086 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16088 * linux-s390-low.c (s390_collect_ptrace_register)
16089 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16091 2010-01-21 Doug Evans <dje@google.com>
16093 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16094 (PTRACE_ARG4_TYPE): New macro.
16095 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16096 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16097 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16098 (usr_store_inferior_registers): Ditto.
16099 (linux_read_memory, linux_write_memory): Ditto.
16100 (linux_test_for_tracefork): Ditto.
16102 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16103 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16105 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16107 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16110 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16112 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16113 prototype to take a regcache. Adjust.
16115 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16117 * regcache.h (struct thread_info): Forward declare.
16118 (struct regcache): New.
16119 (new_register_cache): Adjust prototype.
16120 (get_thread_regcache): Declare.
16121 (free_register_cache): Adjust prototype.
16122 (registers_to_string, registers_from_string): Ditto.
16123 (supply_register, supply_register_by_name, collect_register)
16124 (collect_register_as_string, collect_register_by_name): Ditto.
16125 * regcache.c (struct inferior_regcache_data): Delete.
16126 (get_regcache): Rename to ...
16127 (get_thread_regcache): ... this. Adjust. Switch inferior before
16128 fetching registers.
16129 (regcache_invalidate_one): Adjust.
16130 (regcache_invalidate): Fix prototype.
16131 (new_register_cache): Return the new register cache.
16132 (free_register_cache): Change prototype.
16133 (realloc_register_cache): Adjust.
16134 (registers_to_string): Change prototype to take a regcache. Adjust.
16135 (registers_from_string): Ditto.
16136 (register_data): Ditto.
16137 (supply_register): Ditto.
16138 (supply_register_by_name): Ditto.
16139 (collect_register): Ditto.
16140 (collect_register_as_string): Ditto.
16141 (collect_register_by_name): Ditto.
16142 * server.c (process_serial_event): Adjust.
16143 * linux-low.h (regset_fill_func, regset_store_func): Change
16145 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16147 * linux-low.c (get_stop_pc): Adjust.
16148 (check_removed_breakpoint): Adjust.
16149 (linux_wait_for_event): Adjust.
16150 (linux_resume_one_lwp): Adjust.
16151 (fetch_register): Add regcache parameter. Adjust.
16152 (usr_store_inferior_registers): Ditto.
16153 (regsets_fetch_inferior_registers): Ditto.
16154 (regsets_store_inferior_registers): Ditto.
16155 (linux_fetch_registers, linux_store_registers): Ditto.
16156 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
16158 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
16160 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
16161 prototype to take a regcache.
16162 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
16163 * remote-utils.c (convert_ascii_to_int, outreg)
16164 (prepare_resume_reply): Change prototype to take a regcache.
16166 * target.h (struct target_ops) <fetch_registers, store_registers>:
16167 Change prototype to take a regcache.
16168 (fetch_inferior_registers, store_inferior_registers): Change
16169 prototype to take a regcache. Adjust.
16170 * proc-service.c (ps_lgetregs): Adjust.
16171 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
16172 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
16173 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
16174 take a regcache. Adjust.
16175 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
16176 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
16177 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
16178 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
16179 * linux-cris-low.c (cris_get_pc, cris_set_pc)
16180 (cris_cannot_fetch_register):
16181 (cris_breakpoint_at): Change prototype to take a regcache.
16183 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
16184 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
16185 to take a regcache. Adjust.
16186 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
16188 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
16189 take a regcache. Adjust.
16190 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
16191 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
16192 (m68k_set_pc): Change prototype to take a regcache. Adjust.
16193 * linux-mips-low.c (mips_get_pc):
16194 (mips_set_pc): Change prototype to take a regcache. Adjust.
16195 (mips_reinsert_addr): Adjust.
16196 (mips_collect_register): Change prototype to take a regcache.
16198 (mips_supply_register):
16199 (mips_collect_register_32bit, mips_supply_register_32bit)
16200 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16201 (mips_store_fpregset): Ditto.
16202 * linux-ppc-low.c (ppc_supply_ptrace_register)
16203 (ppc_supply_ptrace_register): Ditto.
16204 (parse_spufs_run): Adjust.
16205 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
16206 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
16207 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
16208 take a regcache. Adjust.
16209 * linux-s390-low.c (s390_collect_ptrace_register)
16210 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
16211 (s390_set_pc): Change prototype to take a regcache. Adjust.
16212 (s390_arch_setup): Adjust.
16213 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
16214 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
16215 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
16216 (sparc_fill_gregset, sparc_store_gregset_from_stack)
16217 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
16219 (sparc_breakpoint_at): Adjust.
16220 * linux-xtensa-low.c (xtensa_fill_gregset):
16221 (xtensa_store_gregset):
16222 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
16223 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
16224 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
16225 prototype to take a regcache. Adjust.
16226 * win32-arm-low.c (arm_fetch_inferior_register)
16227 (arm_store_inferior_register): Change prototype to take a
16229 * win32-i386-low.c (i386_fetch_inferior_register)
16230 (i386_store_inferior_register): Change prototype to take a
16232 * win32-low.c (child_fetch_inferior_registers)
16233 (child_store_inferior_registers): Change prototype to take a
16235 (win32_wait): Adjust.
16236 (win32_fetch_inferior_registers): Change prototype to take a
16238 (win32_store_inferior_registers): Adjust.
16239 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
16240 store_inferior_register>: Change prototype to take a regcache.
16242 2010-01-20 Doug Evans <dje@google.com>
16244 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
16246 (linux_wait_for_event1, linux_init_signals): Ditto.
16247 (W_STOPCODE): Provide definition if missing.
16249 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
16251 * linux-low.c (linux_core_of_thread): New.
16252 (compare_ints, show_process, list_threads): New.
16253 (linux_qxfer_osdata): Report threads and cores.
16254 (linux_target_op): Register linux_core_of_thread.
16255 * remote-utils.c (prepare_resume_reply): Report the core.
16256 (buffer_xml_printf): Support %d specifier.
16257 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
16259 (handle_query): Handle qXfer:threads. Announce availability
16261 * target.h (struct target_ops): New field core_of_thread.
16263 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
16265 * Makefile.in (clean): Remove new generated files.
16266 (reg-s390.o, reg-s390.c): Remove rules.
16267 (reg-s390x.o, reg-s390x.c): Likewise.
16268 (s390-linux32.o, s390-linux32.c): Add rules.
16269 (s390-linux64.o, s390-linux64.c): Likewise.
16270 (s390x-linux64.o, s390x-linux64.c): Likewise.
16271 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
16272 * linux-s390-low.c: Include <elf.h>.
16273 (HWCAP_S390_HIGH_GPRS): Define if undefined.
16274 (init_registers_s390): Remove prototype.
16275 (init_registers_s390x): Likewise.
16276 (init_registers_s390_linux32): Add prototype.
16277 (init_registers_s390_linux64): Likewise.
16278 (init_registers_s390x_linux64): Likewise.
16279 (s390_num_regs_3264): New define.
16280 (s390_regmap_3264): New global variable.
16281 (s390_cannot_fetch_register): Remove obsolete check.
16282 (s390_cannot_store_register): Likewise.
16283 (s390_collect_ptrace_register): Handle upper/lower register halves.
16284 (s390_supply_ptrace_register): Likewise.
16285 (s390_fill_gregset): Update to register number changes.
16286 (s390_get_hwcap): New routine.
16287 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
16288 Install appropriate regmap and register set.
16290 2010-01-01 Joel Brobecker <brobecker@adacore.com>
16292 * server.c (gdbserver_version): Update copyright year to 2010.
16293 * gdbreplay.c (gdbreplay_version): Likewise.
16295 2009-12-28 Doug Evans <dje@google.com>
16297 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
16298 elf/external.h. Include <elf.h> instead but only if necessary.
16300 2009-12-28 Pedro Alves <pedro@codesourcery.com>
16302 * linux-low.c (linux_remove_process): Remove `detaching'
16303 parameter. Don't release/detach from thread_db here.
16304 (linux_kill): Release/detach from thread_db here, ...
16305 (linux_detach): ... and here, before actually detaching.
16306 (linux_wait_1): ... and here, when a process exits.
16307 * thread-db.c (any_thread_of): New.
16308 (thread_db_free): Switch the current inferior to a thread of the
16311 2009-12-21 Doug Evans <dje@google.com>
16313 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
16315 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
16316 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
16317 warning ifndef __NR_tkill. Move setting of errno there too.
16318 Delete unnecessary resetting of errno after syscall.
16319 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
16321 * configure.ac: Check for dladdr.
16322 * config.in: Regenerate.
16323 * configure: Regenerate.
16324 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
16325 (try_thread_db_load): Update.
16327 * linux-low.c (my_waitpid): Delete unnecessary prototype.
16329 2009-12-18 Doug Evans <dje@google.com>
16331 * event-loop.c: Include unistd.h if it exists.
16333 * linux-low.c (my_waitpid): Move definition away from being in
16334 between linux_tracefork_child/linux_test_for_tracefork.
16336 * gdb_proc_service.h (psaddr_t): Fix type.
16337 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
16338 signature to match glibc.
16340 2009-12-16 Doug Evans <dje@google.com>
16342 * linux-low.c (linux_read_memory): Fix argument to read.
16344 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16346 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
16347 events, don't leave current_inferior pointing at null.
16349 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16351 * win32-low.c (LOG): Delete.
16352 (OUTMSG): Output to stderr.
16353 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
16354 on compile time LOG macro.
16355 (win32_wait): Fix debug output.
16357 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16359 * win32-low.c (win32_add_one_solib): If the dll name is
16360 "ntdll.dll", prepend the system directory to the dll path.
16362 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
16364 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
16366 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
16367 Vladimir Prus <vladimir@codesourcery.com>
16369 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16370 * configure.ac: Check for __mcoldfire__ and set
16371 gdb_cv_m68k_is_coldfire.
16372 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16373 reg-cf.o and reg-m68k.o.
16374 * configure: Regenerated.
16376 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16378 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16379 Pass it to thread_db_free.
16380 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16381 proper `detaching' argument to linux_remove_process.
16382 * linux-low.h (thread_db_free): Add `detaching' parameter.
16383 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16385 (thread_db_free): Add `detaching' parameter. Only
16386 call td_ta_clear_event if detaching from process.
16388 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16390 * thread-db.c (thread_db_free): Fix typo.
16392 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16395 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16397 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16399 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16400 with an i686 compiler.
16401 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16403 * configure: Rebuilt.
16405 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16409 * server.c (handle_search_memory_1): Correct read_addr initialization
16410 in loop for searching subsequent chunks.
16412 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16414 * configure.ac: New --with-libthread-db option.
16415 * thread-db.c: Allow direct dependence on libthread_db.
16416 (thread_db_free): Adjust.
16417 * config.in: Regenerate.
16418 * configure: Likewise.
16420 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16423 * thread-db.c (attach_thread): New function.
16424 (maybe_attach_thread): Return success/failure.
16425 (find_new_threads_callback): Adjust.
16426 (thread_db_find_new_threads): Loop until no new threads.
16428 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16430 * proc-service.c (ps_lgetregs): Formatting.
16432 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16434 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16435 * configure.ac: Adjust.
16436 * linux-low.h (struct process_info_private): Move members to struct
16438 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16439 * linux-low.c (linux_remove_process): Adjust.
16440 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16441 * server.c (handle_query): Move code ...
16442 (handle_monitor_command): ... here. New function.
16443 * target.h (struct target_ops): New member.
16444 * thread-db.c (struct thread_db): New.
16445 (libthread_db_search_path): New variable.
16446 (thread_db_create_event, thread_db_enable_reporting)
16447 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16448 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16449 (try_thread_db_load_1, dladdr_to_soname): New functions.
16450 (try_thread_db_load, thread_db_load_search): New functions.
16451 (thread_db_init): Search for libthread_db.
16452 (thread_db_free): New function.
16453 (thread_db_handle_monitor_command): Likewise.
16454 * config.in: Regenerate.
16455 * configure: Regenerate.
16457 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16459 * spu-low.c (spu_kill): Wait for inferior to terminate.
16460 Call clear_inferiors.
16461 (spu_detach): Call clear_inferiors.
16463 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16465 * aclocal.m4: Regenerate.
16466 * config.in: Likewise.
16467 * configure: Likewise.
16469 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16471 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16472 (parse_spufs_run): New function.
16473 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16474 (ppc_breakpoint_at): Handle SPU breakpoints.
16476 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16478 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16479 (SPUFS_MAGIC): Define.
16480 (spu_enumerate_spu_ids): New function.
16481 (linux_qxfer_spu): New function.
16482 (linux_target_ops): Install linux_qxfer_spu.
16484 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16486 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16487 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16488 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16489 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16490 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16491 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16492 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16493 (init_registers_powerpc_cell32l): Add prototype.
16494 (init_registers_powerpc_cell64l): Likewise.
16495 (ppc_arch_setup): Detect Cell/B.E. architecture.
16497 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16499 * Makefile.in (datarootdir): New variable.
16501 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16503 * linux-low.c (linux_write_memory): Update debugging output.
16504 * Makefile.in (clean): Add new descriptions.
16505 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16506 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16507 * configure.srv: Add new files for arm*-*-linux*.
16508 * linux-arm-low.c: Add new declarations.
16509 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16510 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16511 (HWCAP_VFPv3D16): New.
16512 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16513 instead of __IWMMXT__.
16514 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16515 (arm_arch_setup): New.
16516 (target_regsets): Remove #ifdef. Add VFP regset.
16517 (the_low_target): Use arm_arch_setup.
16519 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16521 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16522 the main thread again.
16524 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16526 Adding Neutrino gdbserver.
16527 * configure: Regenerated.
16528 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16529 * configure.srv (i[34567]86-*-nto*): New target.
16530 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16531 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16532 (nto_comctrl) [__QNX__]: New function.
16533 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16535 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16537 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16540 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16541 Pedro Alves <pedro@codesourcery.com>
16543 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16544 don't support CONTEXT_EXTENDED_REGISTERS.
16545 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16546 (the_low_target): Install them.
16547 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16548 failing with ERROR_PIPE_NOT_CONNECTED.
16550 2009-06-30 Doug Evans <dje@google.com>
16551 Pierre Muller <muller@ics.u-strasbg.fr>
16553 Add h/w watchpoint support to x86-linux, win32-i386.
16554 * Makefile.in (SFILES): Add i386-low.c
16555 (i386_low_h): Define.
16556 (i386-low.o): Add dependencies.
16557 (linux-x86-low.o): Add i386-low.h dependency.
16558 (win32-i386-low.o): Ditto.
16559 * i386-low.c: New file.
16560 * i386-low.h: New file.
16561 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16562 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16563 * linux-low.c (linux_add_process): Initialize arch_private.
16564 (linux_remove_process): Free arch_private.
16565 (add_lwp): Initialize arch_private.
16566 (delete_lwp): Free arch_private.
16567 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16569 * linux-low.h (process_info_private): New member arch_private.
16570 (lwp_info): New member arch_private.
16571 (linux_target_ops): New members new_process, new_thread,
16573 (ptid_of): New macro.
16574 * linux-x86-low.c: Include stddef.h, i386-low.h.
16575 (arch_process_info): New struct.
16576 (arch_lwp_info): New struct.
16577 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16578 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16579 (i386_dr_low_get_status): New function.
16580 (x86_insert_point, x86_remove_point): New functions.
16581 (x86_stopped_by_watchpoint): New function.
16582 (x86_stopped_data_address): New function.
16583 (x86_linux_new_process, x86_linux_new_thread): New functions.
16584 (x86_linux_prepare_to_resume): New function.
16585 (the_low_target): Add entries for insert_point, remove_point,
16586 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16588 * server.c (debug_hw_points): New global.
16589 (monitor_show_help): Document set debug-hw-points.
16590 (handle_query): Process "set debug-hw-points".
16591 * server.h (debug_hw_points): Declare.
16592 (paddress): Declare.
16593 * utils.c (NUMCELLS, CELLSIZE): New macros.
16594 (get_sell, xsnprintf, paddress): New functions.
16595 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16596 remove_point, stopped_by_watchpoint, stopped_data_address.
16597 * win32-i386-low.c: Include i386-low.h.
16598 (debug_reg_state): Replaces dr.
16599 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16600 (i386_dr_low_get_status): New function.
16601 (i386_insert_point, i386_remove_point): New functions.
16602 (i386_stopped_by_watchpoint): New function.
16603 (i386_stopped_data_address): New function.
16604 (i386_initial_stuff): Update.
16605 (get_thread_context,set_thread_context,i386_thread_added): Update.
16606 (the_low_target): Add entries for insert_point,
16607 remove_point, stopped_by_watchpoint, stopped_data_address.
16608 * win32-low.c (win32_insert_watchpoint): New function.
16609 (win32_remove_watchpoint): New function.
16610 (win32_stopped_by_watchpoint): New function.
16611 (win32_stopped_data_address): New function.
16612 (win32_target_ops): Add entries for insert_watchpoint,
16613 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16614 * win32-low.h (win32_target_ops): New members insert_point,
16615 remove_point, stopped_by_watchpoint, stopped_data_address.
16617 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16619 * server.c (process_serial_event): Re-return unsupported, not
16620 error, if the type isn't recognized. Re-allow supporting only
16621 insert or remove packets. Also call require_running for
16622 breakpoints. Add missing break statement to default case. Tidy.
16623 * target.h (struct target_ops): Rename insert_watchpoint to
16624 insert_point, and remove_watchpoint to remove_point.
16626 * linux-low.h (struct linux_target_ops): Likewise.
16627 * linux-low.c (linux_insert_watchpoint): Rename to ...
16628 (linux_insert_point): ... this. Adjust.
16629 (linux_remove_watchpoint): Rename to ...
16630 (linux_remove_point): ... this. Adjust.
16631 (linux_target_ops): Adjust.
16632 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16633 (cris_insert_point): ... this.
16634 (cris_remove_watchpoint): Rename to ...
16635 (cris_remove_point): ... this.
16636 (the_low_target): Adjust.
16638 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16640 * server.c (handle_v_kill): Pass signal_pid to
16641 kill_inferior if multi_process is zero.
16643 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16645 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16646 * target.h (target_ops): Comment for *_watchpoint to make it clear
16647 the functions can get types '0' and '1'.
16649 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16651 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16652 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16653 * regcache.c (get_regcache): Likewise.
16654 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16655 * win32-low.c (child_fetch_inferior_registers): Remove check for
16658 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16659 Pedro Alves <pedro@codesourcery.com>
16661 * target.h (struct target_ops) <supports_multi_process>: New
16663 (target_supports_multi_process): New.
16664 * server.c (handle_query): Even if GDB reports support, only
16665 enable multi-process if the target also supports it. Report
16666 multi-process support only if the target backend supports it.
16667 * linux-low.c (linux_supports_multi_process): New function.
16668 (linux_target_ops): Install it as target_supports_multi_process
16671 2009-05-24 Doug Evans <dje@google.com>
16673 Global renaming of find_thread_pid to find_thread_ptid.
16674 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16675 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16676 All callers updated.
16678 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16679 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16682 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16683 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16684 (linux_resume_one_lwp): Ditto.
16686 2009-05-23 Doug Evans <dje@google.com>
16688 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16689 from struct inferior_list_entry * to struct lwp_info *.
16690 All callers updated.
16692 2009-05-13 Doug Evans <dje@google.com>
16694 * linux-x86-low.c: Don't include assert.h.
16695 (x86_siginfo_fixup): Use fatal, not assert.
16696 (x86_arch_setup): Fix comment.
16698 2009-05-12 Doug Evans <dje@google.com>
16700 Biarch support for i386/amd64 gdbserver.
16701 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16702 Add linux-x86-low.c.
16703 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16704 (linux-x86-low.o): Add.
16705 * linux-x86-64-low.c: Delete.
16706 * linux-i386-low.c: Delete.
16707 * linux-x86-low.c: New file.
16708 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16710 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16712 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16713 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16714 (linux_child_pid_to_exec_file): New function.
16715 (elf_64_header_p, elf_64_file_p): New functions.
16716 (siginfo_fixup): New function.
16717 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16718 give target a chance to convert layout.
16719 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16720 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16722 2009-05-07 Doug Evans <dje@google.com>
16724 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16725 (regsets_store_inferior_registers): Ditto.
16727 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16731 * linux-low.c (must_set_ptrace_flags): Delete.
16732 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16734 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16735 `lwp->must_set_ptrace_flags' instead.
16736 (linux_wait_for_event_1): Set ptrace options here.
16737 (linux_wait_1): ... not here.
16739 2009-04-30 Doug Evans <dje@google.com>
16741 * inferiors.c (started_inferior_callback): New function.
16742 (attached_inferior_callback): New function.
16743 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16744 * server.c (print_started_pid, print_attached_pid): New functions.
16745 (detach_or_kill_for_exit): New function.
16746 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16747 * server.h (have_started_inferiors_p): Declare.
16748 (have_attached_inferiors_p): Declare.
16750 * inferiors.c (remove_process): Fix memory leak, free process.
16751 * linux-low.c (linux_remove_process): New function.
16752 (linux_kill): Call it instead of remove_process.
16753 (linux_detach, linux_wait_1): Ditto.
16755 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16757 * configure.srv: Add x86 Windows CE target.
16759 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16761 * inferiors.c (get_thread_process): Make global.
16762 * server.h (get_thread_process): Add prototype.
16763 * thread-db.c (find_one_thread): Use get_thread_process
16764 instead of current_process.
16765 (thread_db_get_tls_address): Do not crash if called when
16766 thread layer is not yet initialized.
16768 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16770 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16771 * spu-low.c (current_tid): Rename to ...
16772 (current_ptid): ... this.
16773 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16774 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16775 ptid_get_lwp (current_ptid) instead of current_tid.
16776 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16777 instead of current_tid. Use find_process_pid to verify pid
16778 argument is valid. Pass proper argument to remove_process.
16779 (spu_thread_alive): Compare current_ptid instead of current_tid.
16780 (spu_resume): Likewise.
16782 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16784 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16787 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16789 Implement the multiprocess extensions, and add linux multiprocess
16792 * server.h (ULONGEST): Declare.
16793 (struct ptid, ptid_t): New.
16794 (minus_one_ptid, null_ptid): Declare.
16795 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16796 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16797 (struct inferior_list_entry): Change `id' type from unsigned from
16799 (struct sym_cache, struct breakpoint, struct
16800 process_info_private): Forward declare.
16801 (struct process_info): Declare.
16802 (current_process): Declare.
16803 (all_processes): Declare.
16804 (initialize_inferiors): Declare.
16805 (add_thread): Adjust to use ptid_t.
16806 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16807 (add_process, remove_process, find_thread_pid): Declare.
16808 (find_inferior_id): Adjust to use ptid_t.
16809 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16810 (multi_process): Declare.
16811 (push_event): Adjust to use ptid_t.
16812 (read_ptid, write_ptid): Declare.
16813 (prepare_resume_reply): Adjust to use ptid_t.
16814 (clear_symbol_cache): Declare.
16815 * inferiors.c (all_processes): New.
16816 (null_ptid, minus_one_ptid): New.
16817 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16818 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16819 (add_thread): Change unsigned long to ptid. Remove gdb_id
16821 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16822 (gdb_id_to_thread): Rename to ...
16823 (find_thread_pid): ... this. Change unsigned long to ptid.
16824 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16825 (loaded_dll, pull_pid_from_list): Adjust.
16826 (add_process, remove_process, find_process_pid)
16827 (get_thread_process, current_process, initialize_inferiors): New.
16828 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16829 (struct target_waitstatus) <related_pid>: Ditto.
16830 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16831 return type to int.
16832 (struct target_ops) <join>: Add `pid' argument.
16833 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16834 (struct target_ops) <wait>: Add `ptid' field. Change return type
16836 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16837 (mywait): Add `ptid' argument. Change return type to ptid_t.
16838 (target_pid_to_str): Declare.
16839 * target.c (set_desired_inferior): Adjust to use ptids.
16840 (mywait): Add new `ptid' argument. Adjust.
16841 (target_pid_to_str): New.
16842 * mem-break.h (free_all_breakpoints): Declare.
16843 * mem-break.c (breakpoints): Delelete.
16844 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16845 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16846 to use per-process breakpoint list.
16847 (free_all_breakpoints): New.
16848 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16849 (symbol_cache, all_symbols_looked_up): Delete.
16851 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16853 (prepare_resume_reply): Change ptid argument's type from unsigned
16854 long to ptid_t. Adjust. Implement W;process and X;process.
16855 (free_sym_cache, clear_symbol_cache): New.
16856 (look_up_one_symbol): Adjust to per-process symbol cache. *
16857 * server.c (cont_thread, general_thread, step_thread): Change type
16859 (attached): Delete.
16860 (multi_process): New.
16861 (last_ptid): Change type to ptid_t.
16862 (struct vstop_notif) <ptid>: Change type to ptid_t.
16863 (queue_stop_reply, push_event): Change `ptid' argument's type to
16865 (discard_queued_stop_replies): Add `pid' argument.
16866 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16867 changes. Don't reference the `attached' global.
16868 (attach_inferior): Adjust to mywait interface changes.
16869 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16870 features. Handle and report "multiprocess+". Handle
16872 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16874 (handle_v_kill): New.
16875 (handle_v_stopped): Adjust to use target_pid_to_str.
16876 (handle_v_requests): Allow multiple attaches and runs when
16877 multiprocess extensions are in effect. Handle "vKill".
16878 (myresume): Adjust to use ptids.
16879 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16880 (handle_status): Adjust to discard_queued_stop_replies interface
16882 (first_thread_of, kill_inferior_callback)
16883 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16884 (main): Call initialize_inferiors. Adjust to use ptids, killing
16885 and detaching from all inferiors. Handle multiprocess packet
16887 * linux-low.h: Include gdb_proc_service.h.
16888 (struct process_info_private): New.
16889 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16890 <lwpid_of>: Use ptid_get_lwp.
16891 (get_lwp_thread): Adjust.
16892 (struct lwp_info): Add `dead' member.
16893 (find_lwp_pid): Declare.
16894 * linux-low.c (thread_db_active): Delete.
16895 (new_inferior): Adjust comment.
16896 (inferior_pid): Delete.
16897 (linux_add_process): New.
16898 (handle_extended_wait): Adjust.
16899 (add_lwp): Change unsigned long to ptid.
16900 (linux_create_inferior): Add process to processes table. Adjust
16901 to use ptids. Don't set new_inferior here.
16902 (linux_attach_lwp): Rename to ...
16903 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16904 it. Adjust to use ptids.
16905 (linux_attach_lwp): New.
16906 (linux_attach): Add process to processes table. Don't set
16908 (struct counter): New.
16909 (second_thread_of_pid_p, last_thread_of_process_p): New.
16910 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16911 multiple processes.
16912 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16913 processes. Remove process from process table.
16914 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16915 to multiple processes.
16916 (any_thread_of): New.
16917 (linux_detach): Add `pid' argument, and handle it. Remove process
16918 from processes table.
16919 (linux_join): Add `pid' argument. Handle it.
16920 (linux_thread_alive): Change unsighed long argument to ptid_t.
16921 Consider dead lwps as not being alive.
16922 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16923 threads we're not interested in.
16924 (same_lwp, find_lwp_pid): New.
16925 (linux_wait_for_lwp): Change `pid' argument's type from int to
16927 (linux_wait_for_event): Rename to ...
16928 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16929 from int to ptid_t. Adjust.
16930 (linux_wait_for_event): New.
16931 (linux_wait_1): Add `ptid' argument. Change return type to
16932 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16933 that exit from the process table.
16934 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16936 (mark_lwp_dead): New.
16937 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16938 stopping all threads, mark its main lwp as dead.
16939 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16941 (fetch_register, usr_store_inferior_registers)
16942 (regsets_fetch_inferior_registers)
16943 (regsets_store_inferior_registers, linux_read_memory)
16944 (linux_write_memory): Inline `inferior_pid'.
16945 (linux_look_up_symbols): Adjust to use per-process
16946 `thread_db_active'.
16947 (linux_request_interrupt): Adjust to use ptids.
16948 (linux_read_auxv): Inline `inferior_pid'.
16949 (initialize_low): Don't reference thread_db_active.
16950 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16951 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16952 (ps_getpid): Return the pid of the current inferior.
16953 * thread-db.c (proc_handle, thread_agent): Delete.
16954 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16956 (find_one_thread): Change argument type to ptid_t. Adjust to
16958 (maybe_attach_thread): Adjust to per-process data and ptids.
16959 (thread_db_find_new_threads): Ditto.
16960 (thread_db_init): Ditto.
16961 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16962 processes table. Adjust to use ptids.
16963 (spu_kill, spu_detach): Adjust interface. Remove process from
16965 (spu_join, spu_thread_alive): Adjust interface.
16966 (spu_wait): Adjust interface. Remove process from processes
16967 table. Adjust to use ptids.
16968 * win32-low.c (current_inferior_tid): Delete.
16969 (current_inferior_ptid): New.
16970 (debug_event_ptid): New.
16971 (thread_rec): Take a ptid. Adjust.
16972 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16973 (child_delete_thread): Ditto.
16974 (do_initial_child_stuff): Add `attached' argument. Add process to
16976 (child_fetch_inferior_registers, child_store_inferior_registers):
16978 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16979 (win32_attach): Pass 1 to do_initial_child_stuff.
16980 (win32_kill): Adjust interface. Remove process from processes
16982 (win32_detach): Ditto.
16983 (win32_join): Adjust interface.
16984 (win32_thread_alive): Take a ptid.
16985 (win32_resume): Adjust to use ptids.
16986 (get_child_debug_event): Ditto.
16987 (win32_wait): Adjust interface. Remove exiting process from
16990 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16992 Non-stop mode support.
16994 * server.h (non_stop): Declare.
16995 (gdb_client_data, handler_func): Declare.
16996 (delete_file_handler, add_file_handler, start_event_loop):
16998 (handle_serial_event, handle_target_event, push_event)
16999 (putpkt_notif): Declare.
17000 * target.h (enum resume_kind): New.
17001 (struct thread_resume): Replace `step' field by `kind' field.
17002 (TARGET_WNOHANG): Define.
17003 (struct target_ops) <wait>: Add `options' argument.
17004 <supports_non_stop, async, start_non_stop>: New fields.
17005 (target_supports_non_stop, target_async): New.
17006 (start_non_stop): Declare.
17007 (mywait): Add `options' argument.
17008 * target.c (mywait): Add `options' argument. Print child exit
17009 notifications here.
17010 (start_non_stop): New.
17011 * server.c (non_stop, own_buf, mem_buf): New globals.
17012 (struct vstop_notif): New.
17013 (notif_queue): New global.
17014 (queue_stop_reply, push_event, discard_queued_stop_replies)
17015 (send_next_stop_reply): New.
17016 (start_inferior): Adjust to use resume_kind. Adjust to mywait
17018 (attach_inferior): In non-stop mode, don't wait for the target
17020 (handle_general_set): Handle QNonStop.
17021 (handle_query): When handling qC, return the current general
17022 thread, instead of the first thread of the list.
17023 (handle_query): If the backend supports non-stop mode, include
17024 QNonStop+ in the qSupported query response.
17025 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
17027 (handle_v_attach, handle_v_run): Handle non-stop mode.
17028 (handle_v_stopped): New.
17029 (handle_v_requests): Report support for vCont;t. Handle vStopped.
17030 (myresume): Adjust to use resume_kind. Handle non-stop.
17031 (queue_stop_reply_callback): New.
17032 (handle_status): Handle non-stop mode.
17033 (main): Clear non_stop flag on reconnection. Use the event-loop.
17034 Refactor serial protocol handling from here ...
17035 (process_serial_event): ... to this new function. When GDB
17036 selects any thread, select one here. In non-stop mode, wait until
17037 GDB acks all pending events before exiting.
17038 (handle_serial_event, handle_target_event): New.
17039 * remote-utils.c (remote_open): Install remote_desc in the event
17041 (remote_close): Remove remote_desc from the event loop.
17042 (putpkt_binary): Rename to...
17043 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
17044 (putpkt_binary): New as wrapper around putpkt_binary_1.
17045 (putpkt_notif): New.
17046 (prepare_resume_reply): In non-stop mode, don't change the
17048 * event-loop.c: New.
17049 * Makefile.in (OBJ): Add event-loop.o.
17050 (event-loop.o): New rule.
17052 * linux-low.h (pid_of): Moved here.
17054 (get_lwp_thread): Use lwpid_of.
17055 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
17056 * linux-low.c (pid_of): Delete.
17057 (inferior_pid): Use lwpid_of.
17058 (linux_event_pipe): New.
17059 (target_is_async_p): New.
17061 (handle_extended_wait): Use lwpid_of.
17062 (add_lwp): Don't set lwpid field.
17063 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17064 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17065 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17066 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17067 first. Adjust to linux_wait_for_event interface changes. Use
17069 (linux_detach): Don't delete the main lwp here.
17070 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17071 (status_pending_p): Don't consider explicitly suspended lwps.
17072 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17073 pointer. Add OPTIONS argument. Change return type to int. Use
17074 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17075 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17076 pointer. Add status pointer argument. Return a pid instead of a
17077 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17078 changes. In non-stop mode, don't switch to a random thread.
17079 (linux_wait): Rename to...
17080 (linux_wait_1): ... this. Add target_options argument, and handle
17081 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17082 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17083 clean exit and signal exit code. Don't stop all threads in
17084 non-stop mode. In all-stop mode, only stop all threads when
17085 reporting a stop to GDB. Handle explicit thread stop requests.
17086 (async_file_flush, async_file_mark): New.
17088 (send_sigstop): Use lwpid_of.
17089 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17090 interface changes. In non-stop mode, don't switch to a random
17092 (linux_resume_one_lwp): Use lwpid_of.
17093 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17094 (linux_resume_one_thread): ... this. Handle resume_stop. In
17095 non-stop mode, don't look for pending flag in all threads.
17096 (resume_status_pending_p): Don't consider explicitly suspended
17098 (my_waitpid): Reimplement. Emulate __WALL.
17099 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17101 (sigchld_handler, linux_supports_non_stop, linux_async)
17102 (linux_start_non_stop): New.
17103 (linux_target_ops): Register linux_supports_non_stop, linux_async
17104 and linux_start_non_stop.
17105 (initialize_low): Install SIGCHLD handler.
17106 * thread-db.c (thread_db_create_event, find_one_thread)
17107 (thread_db_get_tls_address): Use lwpid_of.
17108 * win32-low.c (win32_detach): Adjust to use resume_kind.
17109 (win32_wait): Add `options' argument.
17110 * spu-low.c (spu_resume): Adjust to use resume_kind.
17111 (spu_wait): Add `options' argument.
17113 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17115 Decouple target code from remote protocol.
17117 * target.h (enum target_waitkind): New.
17118 (struct target_waitstatus): New.
17119 (struct target_ops) <wait>: Return an unsigned long. Take a
17120 target_waitstatus pointer instead of a char pointer.
17121 (mywait): Likewise.
17122 * target.c (mywait): Change prototype to return an unsigned long.
17123 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17124 * server.h (thread_from_wait, old_thread_from_wait): Delete
17126 (prepare_resume_reply): Change prototype to take a
17128 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17129 (last_status, last_ptid): New.
17130 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17131 pid instead of a signal.
17132 (attach_inferior): Remove "status" and "signal" parameters.
17134 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17136 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17137 (handle_v_requests, myresume): Remove "status" and "signal"
17138 parameters. Adjust.
17139 (handle_status): New.
17140 (main): Delete local `status'. Adjust.
17141 * remote-utils.c: Include target.h.
17142 (prepare_resume_reply): Change prototype to take a
17143 target_waitstatus. Adjust.
17145 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17147 * spu-low.c (spu_wait): Adjust.
17148 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17150 (win32_wait): Adjust.
17152 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17154 * target.h (struct thread_resume): Delete leave_stopped member.
17155 (struct target_ops): Add a `n' argument to the `resume' callback.
17156 * server.c (start_inferior): Adjust.
17157 (handle_v_cont, myresume): Adjust.
17158 * linux-low.c (check_removed_breakpoint): Adjust to resume
17159 interface change, and to removed leave_stopped field.
17160 (resume_ptr): Delete.
17161 (struct thread_resume_array): New.
17162 (linux_set_resume_request): Add new `arg' parameter. Adjust to
17163 resume interface change.
17164 (linux_continue_one_thread, linux_queue_one_thread)
17165 (resume_status_pending_p): Check if the resume field is NULL
17166 instead of checking the leave_stopped member.
17167 (linux_resume): Adjust to the target resume interface change.
17168 * spu-low.c (spu_resume): Adjust to the target resume interface
17170 * win32-low.c (win32_detach, win32_resume): Ditto.
17172 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17174 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
17176 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
17178 (linux_continue_one_thread): Only preserve the stepping flag if
17179 there's a pending breakpoint.
17181 2009-03-31 Pedro Alves <pedro@codesourcery.com>
17183 * server.c (main): After the inferior having exited, call
17184 remote_close before exiting gdbserver.
17186 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
17188 Fix size of FPSCR in Power 7 processors.
17189 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
17190 (PPC_FEATURE_HAS_DFP): New #define.
17191 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
17194 2009-03-23 Pedro Alves <pedro@codesourcery.com>
17196 * server.c (handle_query) Whitespace and formatting.
17198 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17200 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
17201 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
17202 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
17203 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
17204 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
17205 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
17206 Makefile.in, configure.ac: Fix whitespace throughout.
17207 * configure: Regenerate.
17209 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17211 * inferiors.c (find_inferior): Make it safe for the callback
17212 function to delete the currently iterated inferior.
17214 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17216 * Makefile.in (linuw_low_h): Move higher.
17217 (thread-db.o): Depend on $(linux_low_h).
17219 2009-03-17 Pedro Alves <pedro@codesourcery.com>
17221 Rename "process" to "lwp" throughout.
17223 * linux-low.c (all_processes): Rename to...
17224 (all_lwps): ... this.
17225 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
17226 (add_process): Rename to ...
17227 (add_lwp): ... this. Adjust.
17228 (linux_create_inferior): Adjust.
17229 (linux_attach_lwp): Adjust.
17230 (linux_attach): Adjust.
17231 (linux_kill_one_process): Rename to ...
17232 (linux_kill_one_lwp): ... this. Adjust.
17233 (linux_kill): Adjust.
17234 (linux_detach_one_process): Rename to ...
17235 (linux_detach_one_lwp): ... this. Adjust.
17236 (linux_detach): Adjust.
17237 (check_removed_breakpoint): Adjust.
17238 (status_pending_p): Adjust.
17239 (linux_wait_for_process): Rename to ...
17240 (linux_wait_for_lwp): ... this. Adjust.
17241 (linux_wait_for_event): Adjust.
17242 (send_sigstop): Adjust.
17243 (wait_for_sigstop): Adjust.
17244 (stop_all_processes): Rename to ...
17245 (stop_all_lwps): ... this.
17246 (linux_resume_one_process): Rename to ...
17247 (linux_resume_one_lwp): ... this. Adjust.
17248 (linux_set_resume_request, linux_continue_one_thread)
17249 (linux_queue_one_thread, resume_status_pending_p)
17250 (usr_store_inferior_registers, regsets_store_inferior_registers)
17251 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17253 * linux-low.h (get_process): Rename to ...
17254 (get_lwp): ... this. Adjust.
17255 (get_thread_process): Rename to ...
17256 (get_thread_lwp): ... this. Adjust.
17257 (get_process_thread): Rename to ...
17258 (get_lwp_thread): ... this. Adjust.
17259 (struct process_info): Rename to ...
17260 (struct lwp_info): ... this.
17261 (all_processes): Rename to ...
17262 (all_lwps): ... this.
17263 * proc-service.c (ps_lgetregs): Adjust.
17264 * thread-db.c (thread_db_create_event, find_one_thread)
17265 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
17267 2009-03-14 Pedro Alves <pedro@codesourcery.com>
17269 * server.c (handle_query): Handle "qAttached".
17271 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
17273 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
17274 GPLv3, update license URL.
17276 2009-03-01 Doug Evans <dje@google.com>
17278 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
17279 (server_h): Add gdb_signals.h.
17280 (signals.o): Update.
17281 * server.h (target_signal_from_host,target_signal_to_host_p)
17282 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
17284 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
17286 * remote-utils.c (getpkt): Also generate remote-debug
17287 information if noack_mode is set.
17289 2009-02-06 Pedro Alves <pedro@codesourcery.com>
17291 * server.c (handle_query): Report qXfer:siginfo:read and
17292 qXfer:siginfo:write as supported and handle them.
17293 * target.h (struct target_ops) <qxfer_siginfo>: New field.
17294 * linux-low.c (linux_xfer_siginfo): New.
17295 (linux_target_ops): Set it.
17297 2009-01-26 Pedro Alves <pedro@codesourcery.com>
17299 * server.c (gdbserver_usage): Mention --remote-debug.
17300 (main): Accept '--remote-debug' switch.
17302 2009-01-18 Doug Evans <dje@google.com>
17304 * regcache.c (new_register_cache): No need to check result of xcalloc.
17305 * server.c (handle_search_memory): Back out calls to xmalloc,
17306 result is checked and error is returned to user upon failure.
17307 (handle_query): Ditto. Add more checks for result of malloc.
17308 (handle_v_cont): Check result of malloc, report error back to
17310 (handle_v_run): Ditto. Call freeargv.
17311 * server.h (freeargv): Declare.
17312 * utils.c (freeargv): New fn.
17314 2009-01-15 Doug Evans <dje@google.com>
17316 * gdbreplay.c (perror_with_name): Make arg const char *.
17317 * server.h (target_signal_to_name): Make return type const char *.
17318 * thread-db.c (thread_db_err_str): Make return type const char *.
17319 * utils.c (perror_with_name): Make arg const char *.
17321 2009-01-14 Pedro Alves <pedro@codesourcery.com>
17323 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
17324 when handling a EXIT_PROCESS_DEBUG_EVENT.
17326 2009-01-06 Joel Brobecker <brobecker@adacore.com>
17328 * gdbreplay.c (gdbreplay_version): Update copyright year.
17329 * server.c (gdbserver_version): Likewise.
17331 2009-01-05 Doug Evans <dje@google.com>
17333 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
17334 (handle_extended_wait): Improve comment.
17336 2008-12-13 Doug Evans <dje@google.com>
17338 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
17339 * server.h (ATTR_MALLOC): New macro.
17340 (xmalloc,xcalloc,xstrdup): Declare.
17341 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
17342 * inferiors.c: Ditto.
17343 * linux-low.c: Ditto.
17344 * mem-break.c: Ditto.
17345 * regcache.c: Ditto.
17346 * remote-utils.c: Ditto.
17349 * win32-low.c: Ditto.
17351 2008-12-12 Doug Evans <dje@google.com>
17353 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
17354 in debugging printf.
17356 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
17358 2008-12-09 Doug Evans <dje@google.com>
17360 * linux-low.h (struct process_info): Delete member tid, unused.
17361 * thread-db.c (find_one_thread): Update.
17362 (maybe_attach_thread): Update.
17364 2008-12-02 Pedro Alves <pedro@codesourcery.com>
17366 * target.h (struct target_ops): Add qxfer_osdata member.
17367 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17369 (linux_qxfer_osdata): New functions.
17370 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17372 * server.c (handle_query): Handle "qXfer:osdata:read:".
17373 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17374 (buffer_xml_printf): New functions.
17375 * server.h (struct buffer): New.
17376 (buffer_grow_str, buffer_grow_str0): New macros.
17377 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17378 (buffer_xml_printf): Declare.
17380 2008-11-24 Doug Evans <dje@google.com>
17382 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17384 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17386 * server.c (handle_v_run): Always use the supplied argument list.
17388 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17390 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17391 (xtensa_regmap_table): Add entry for scompare1.
17393 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17395 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17396 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17397 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17398 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17399 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17400 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17401 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17402 XML target descriptions.
17403 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17404 when inferior is running on an ISA 2.05 or later processor. Add
17405 special case to return offset for full 64-bit slot of FPSCR when
17408 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17410 * Makefile.in (SFILES, clean): Added sparc64 files.
17411 (reg-sparc64.o, reg-sparc64.c): New.
17412 * configure.srv (sparc*-*-linux*): New configuration.
17413 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17414 syscall arguments for SPARC.
17415 (regsets_store_inferior_registers): Likewise.
17416 * linux-sparc-low.c: New file.
17418 2008-10-21 Doug Evans <dje@google.com>
17420 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17421 (READLINE_DIR,READLINE_DEP): Delete.
17422 (INTERNAL_CFLAGS): Update.
17423 (LINTFLAGS): Update.
17425 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17427 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17428 whole argv from the last run, not just argv[0].
17430 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17432 * regcache.c (new_register_cache): Return NULL if the register
17433 cache size isn't known yet.
17434 (free_register_cache): Avoid dereferencing a NULL regcache.
17436 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17438 * configure.srv: Merge MIPS and MIPS64.
17440 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17442 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17444 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17446 * Makefile.in: Add required vsx dependencies.
17448 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17449 Declare init_registers_powerpc_vsx32l.
17450 Declare init_registers_powerpc_vsx64l.
17451 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17452 (ppc_arch_setup): Check for VSX in hwcap.
17453 (ppc_fill_vsxregset): New function.
17454 (ppc_store_vsxregset): New function.
17455 Add new VSX entry in regset_info target_regsets.
17457 * configure.srv: Add new VSX dependencies.
17459 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17461 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17462 (remote_open): Set or clear transport_is_reliable.
17463 (putpkt_binary): Don't expect acks in noack mode.
17464 (getpkt): Don't send ack/nac in noack mode.
17465 * server.c (handle_general_set): Handle QStartNoAckMode.
17466 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17468 (main): Reset noack_mode on every connection.
17469 * server.h (noack_mode): Declare.
17471 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17473 * Makefile.in (GDBREPLAY_OBS): New variable.
17474 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17476 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17477 Daniel Jacobowitz <dan@codesourcery.com>
17479 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17480 (usr_store_inferior_registers): Likewise.
17481 (regsets_store_inferior_registers): Likewise.
17483 2008-07-31 Rolf Jansen <rj@surtec.com>
17484 Pedro Alves <pedro@codesourcery.com>
17486 * configure.ac: Check for memmem declaration.
17487 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17488 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17489 (disable_packet_qfThreadInfo): Unconditionally compile.
17490 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17491 * configure, config.in: Regenerate.
17493 2008-07-28 Doug Kwan <dougkwan@google.com>
17495 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17496 (linux_write_memory): Remove declaration of errno.
17498 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17500 * linux-low.c (handle_extended_wait): Do not use "status"
17501 variable uninitialized.
17503 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17505 * server.c (handle_v_attach): Inhibit reporting dll changes.
17507 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17509 * remote-utils.c (prepare_resume_reply): If requested, don't
17510 output "thread:TID" in the T stop reply.
17512 * server.c (disable_packet_vCont, disable_packet_Tthread)
17513 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17514 (handle_query): If requested, disable support for qC, qfThreadInfo
17516 (handle_v_requests): If requested, disable support for vCont.
17517 (gdbserver_show_disableable): New.
17518 (main): Handle --disable-packet and --disable-packet=LIST.
17520 * server.h (disable_packet_vCont, disable_packet_Tthread)
17521 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17523 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17525 * server.c (gdbserver_usage): Mention --version.
17527 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17529 * Makefile.in (gdbreplay.o): New rule.
17531 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17533 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17534 message, not gdbserver.
17536 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17537 Nathan Sidwell <nathan@codesourcery.com>
17538 Joseph Myers <joseph@codesourcery.com>
17540 * acinclude.m4: Include ../../config/acx.m4.
17541 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17542 * configure, config.in: Regenerate.
17543 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17544 * server.c (gdbserver_version): Print PKGVERSION.
17545 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17546 (main): Adjust gdbserver_usage calls.
17547 * gdbreplay.c (version, host_name): Add declarations.
17548 (gdbreplay_version, gdbreplay_usage): New.
17549 (main): Accept --version and --help options.
17551 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17553 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17554 (arm_breakpoint_at): Handle Thumb.
17555 (the_low_target): Add comment.
17557 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17559 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17561 2008-05-09 Doug Evans <dje@google.com>
17563 * server.h (decode_search_memory_packet): Declare.
17564 * remote-utils.c (decode_search_memory_packet): New fn.
17565 * server.c (handle_search_memory_1): New fn.
17566 (handle_search_memory): New fn.
17567 (handle_query): Process qSearch:memory packets.
17569 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17571 * regcache.c (registers_length): Remove.
17572 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17573 full register packet.
17574 * regcache.h (registers_length): Remove prototype.
17575 * server.h (PBUFSIZ): Define to 16384.
17577 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17579 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17580 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17581 powerpc-64l.o, and powerpc-altivec64l.o.
17582 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17583 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17584 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17585 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17586 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17589 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17590 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17591 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17592 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17593 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17594 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17595 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17596 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17597 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17598 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17601 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17602 (init_registers_powerpc_32l): ... this new prototype.
17603 (init_registers_powerpc_32): Remove, replace by ...
17604 (init_registers_powerpc_altivec32l): ... this new prototype.
17605 (init_registers_powerpc_e500): Remove, replace by ...
17606 (init_registers_powerpc_e500l): ... this new prototype.
17607 (init_registers_ppc64): Remove, replace by ...
17608 (init_registers_powerpc_64l): ... this new prototype.
17609 (init_registers_powerpc_64): Remove, replace by ...
17610 (init_registers_powerpc_altivec64l): ... this new prototype.
17611 (ppc_num_regs): Set to 73.
17612 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17613 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17614 (ppc_cannot_store_register): Handle orig_r3 and trap.
17615 (ppc_arch_setup): Update init_registers_... calls.
17616 (ppc_fill_gregset): Handle orig_r3 and trap.
17618 * inferiors.c (clear_inferiors): Reset current_inferior.
17620 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17622 * acinclude.m4: Add override.m4.
17623 * configure: Regenerate.
17625 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17627 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17628 initial call to init_register_ppc64.
17630 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17632 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17633 single powerpc*-*-linux* case.
17634 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17636 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17638 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17639 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17641 * linux-ppc-low.c: Include <elf.h>.
17642 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17643 (ppc_hwcap): New global variable.
17644 (ppc_regmap): Remove __SPE__ #ifdef sections.
17645 (ppc_regmap_e500): New global variable.
17646 (ppc_cannot_store_register): Update __SPE__ special case.
17647 (ppc_get_hwcap): New function.
17648 (ppc_arch_setup): Use it to determine whether inferior supports
17649 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17650 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17651 Do not access registers if target does not support AltiVec.
17652 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17653 Do not access registers if target does not support SPE.
17654 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17656 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17658 * linux-low.c (disabled_regsets, num_regsets): New.
17659 (use_regsets_p): Delete.
17660 (linux_wait_for_process): Clear disabled_regsets.
17661 (regsets_fetch_inferior_registers): Check and set it.
17662 (regsets_store_inferior_registers): Likewise.
17663 (linux_fetch_registers, linux_store_registers): Do not use
17665 (initialize_low): Allocate disabled_regsets.
17667 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17669 * Makefile.in (LIBOBJS): New.
17670 (OBS): Use LIBOBJS.
17671 (memmem.o): New rule.
17672 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17673 * configure: Regenerated.
17675 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17677 * server.c (handle_query): Never return "unsupported" for
17678 qXfer:features:read queries.
17680 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17682 * server.c (get_features_xml): Fix inverted condition.
17683 (handle_query): Always support qXfer:feature:read.
17685 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17687 * server.c (wrapper_argv): New.
17688 (start_inferior): Handle wrapper_argv. If set, expect an extra
17690 (gdbserver_usage): Document --wrapper.
17691 (main): Parse --wrapper.
17693 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17695 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17696 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17697 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17698 (ppc_set_pc): Likewise.
17699 (ppc_arch_setup): New function.
17700 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17701 of collect_register.
17702 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17704 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17706 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17707 instead of linux-ppc64-low.o.
17708 * linux-ppc64-low.c: Remove file.
17709 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17710 (linux-ppc64-low.o): Remove rule.
17712 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17713 (init_registers_powerpc_64): Likewise.
17714 (ppc_regmap): Conditionally define depending on __powerpc64__.
17715 (ppc_cannot_store_register): Do not special-case "fpscr" when
17716 compiled on __powerpc64__.
17717 (ppc_collect_ptrace_register): New function.
17718 (ppc_supply_ptrace_register): New function.
17719 (ppc_breakpoint): Change type to "unsigned int".
17720 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17721 (the_low_target): Conditionally provide initializers for the
17722 arch_setup member depending on __powerpc64__. Install
17723 collect_ptrace_register and supply_ptrace_register members.
17725 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17727 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17728 * server.c (gdbserver_xmltarget): Define.
17729 (get_features_xml): Use it to replace "target.xml" and arch_string.
17731 * configure.srv: Remove srv_xmltarget. Add XML files that were
17732 mentioned there to srv_xmlfiles instead. Remove conditional tests
17733 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17734 srv_xmlfiles and srv_regobj to include all possible choices.
17735 * configure.ac (srv_xmltarget): Remove.
17736 (srv_xmlfiles): Do not add "target.xml".
17737 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17738 checks for supplementary target information.
17739 * configure: Regenerate.
17740 * Makefile.in (XML_TARGET): Remove.
17741 (target.xml): Remove rule.
17742 (clean): Do not clean up target.xml.
17743 (.PRECIOUS): Do not mention target.xml.
17745 * target.h (struct target_ops): Remove arch_string member.
17746 * linux-low.c (linux_arch_string): Remove.
17747 (linux_target_ops): Remove arch_string initializer.
17748 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17749 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17750 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17751 * spu-low.c (spu_arch_string): Remove.
17752 (spu_target_ops): Remove arch_string initializer.
17753 * win32-low.c (win32_arch_string): Remove.
17754 (win32_target_ops): Remove arch_string initializer.
17755 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17756 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17757 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17759 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17761 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17762 by collect_ptrace_register and supply_ptrace_register hooks.
17763 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17764 instead of checking for the_low_target.left_pad_xfer.
17765 (usr_store_inferior_registers): Use collect_ptrace_register callback
17766 instead of checking for the_low_target.left_pad_xfer.
17768 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17769 (s390_supply_ptrace_register): Likewise.
17770 (s390_fill_gregset): Call s390_collect_ptrace_register.
17771 (the_low_target): Update.
17773 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17774 (ppc_supply_ptrace_register): Likewise.
17775 (the_low_target): Update.
17777 * linux-i386-low.c (the_low_target): Update.
17778 * linux-x86-64-low.c (the_low_target): Update.
17780 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17782 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17783 reg-s390.o and reg-s390x.o.
17785 * linux-low.c (new_inferior): New global variable.
17786 (linux_create_inferior, linux_attach): Set it.
17787 (linux_wait_for_process): Call the_low_target.arch_setup after the
17788 target has stopped for the first time.
17789 (initialize_low): Do not call the_low_target.arch_setup.
17791 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17792 (s390_set_pc): Likewise.
17793 (s390_arch_setup): New function.
17794 (the_low_target): Use s390_arch_setup as arch_setup routine.
17796 * regcache.c (realloc_register_cache): New function.
17797 (set_register_cache): Call it for each existing regcache.
17799 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17801 * server.h (init_registers): Remove prototype.
17803 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17804 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17805 instead of init_registers ().
17806 * linux-arm-low.c (init_registers_arm): Add prototype.
17807 (init_registers_arm_with_iwmmxt): Likewise.
17808 (the_low_target): Add initializer for arch_setup field.
17809 * linux-cris-low.c (init_registers_cris): Add prototype.
17810 (the_low_target): Add initializer for arch_setup field.
17811 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17812 (the_low_target): Add initializer for arch_setup field.
17813 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17814 (the_low_target): Add initializer for arch_setup field.
17815 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17816 (the_low_target): Add initializer for arch_setup field.
17817 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17818 (the_low_target): Add initializer for arch_setup field.
17819 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17820 (the_low_target): Add initializer for arch_setup field.
17821 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17822 (init_registers_mips64_linux): Likewise.
17823 (the_low_target): Add initializer for arch_setup field.
17824 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17825 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17826 (the_low_target): Add initializer for arch_setup field.
17827 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17828 (init_registers_powerpc_64): Likewise.
17829 (the_low_target): Add initializer for arch_setup field.
17830 * linux-s390-low.c (init_registers_s390): Add prototype.
17831 (init_registers_s390x): Likewise.
17832 (the_low_target): Add initializer for arch_setup field.
17833 * linux-sh-low.c (init_registers_sh): Add prototype.
17834 (the_low_target): Add initializer for arch_setup field.
17835 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17836 (the_low_target): Add initializer for arch_setup field.
17837 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17838 (the_low_target): Add initializer for arch_setup field.
17840 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17841 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17842 instead of init_registers ().
17843 * win32-arm-low.c (init_registers_arm): Add prototype.
17844 (the_low_target): Add initializer for arch_setup field.
17845 * win32-i386-low.c (init_registers_i386): Add prototype.
17846 (the_low_target): Add initializer for arch_setup field.
17848 * spu-low.c (init_registers_spu): Add prototype.
17849 (initialize_low): Call initialie_registers_spu () instead of
17850 initialize_registers ().
17852 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17854 * server.c (handle_v_requests): When handling the vRun and vAttach
17855 packets, if already debugging a process, don't kill it. Return an
17858 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17860 * server.c (handle_query): Correct length check.
17862 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17864 * win32-low.c (do_initial_child_stuff): Add process handle
17865 parameter. Set current_process_handle and current_process_id from the
17866 parameters. Clear globals.
17867 (win32_create_inferior): Don't set current_process_handle and
17868 current_process_id here. Instead pass them on the call to
17869 do_initial_child_stuff.
17870 (win32_attach): Likewise.
17871 (win32_clear_inferiors): New.
17872 (win32_kill): Don't close the current process handle or the
17873 current thread handle here. Instead call win32_clear_inferiors.
17874 (win32_detach): Don't open a new handle to the process. Call
17875 win32_clear_inferiors.
17876 (win32_join): Don't rely on current_process_handle; open a new
17877 handle using the process id.
17878 (win32_wait): Call win32_clear_inferiors when the inferior process
17881 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17883 * server.c (monitor_show_help): Add "exit".
17885 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17887 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17888 (clean): Add reg-xtensa.c.
17889 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17890 * configure.srv (xtensa*-*-linux*) New target.
17891 * linux-xtensa-low.c: New.
17892 * xtensa-xtregs.c: New.
17894 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17896 * hostio.c: Don't include errno.h.
17897 (errno_to_fileio_errno): Move to hostio-errno.
17898 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17899 error number outputting to the target->hostio_last_error callback.
17900 (hostio_packet_error): Use FILEIO_EINVAL directly.
17901 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17902 calls to hostio_error.
17903 * hostio-errno.c: New.
17904 * server.h (hostio_last_error_from_errno): Declare.
17905 * target.h (target_ops): Add hostio_last_error member.
17906 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17907 as hostio_last_error handler.
17908 * spu-low.c (spu_target_ops): Likewise.
17909 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17910 (wince_hostio_last_error): New functions.
17911 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17912 as hostio_last_error handler.
17913 (win32_target_ops) [!_WIN32_WCE]: Register
17914 hostio_last_error_from_errno as hostio_last_error handler.
17915 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17916 (hostio-errno.o): New rule.
17917 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17918 * configure.srv (srv_hostio_err_objs): New variable. Default to
17920 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17921 * configure: Regenerate.
17923 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17925 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17926 (linux_kill, linux_detach): Clean up the process list.
17927 * remote-utils.c (remote_open): Improve port number parsing.
17928 (putpkt_binary, input_interrupt): Only send interrupts if the target
17930 * server.c (extended_protocol): Make static.
17931 (attached): Define earlier.
17932 (exit_requested, response_needed, program_argv): New variables.
17933 (target_running): New.
17934 (start_inferior): Clear attached here.
17935 (attach_inferior): Set attached here.
17936 (require_running): Define.
17937 (handle_query): Use require_running and target_running. Implement
17939 (handle_v_attach, handle_v_run): New.
17940 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17941 (gdbserver_usage): Update.
17942 (main): Redo argument parsing. Handle --debug and --multi. Handle
17943 --attach along with other options or after the port. Save
17944 program_argv. Support no initial program. Resynchronize
17945 communication with GDB after an error. Handle "monitor exit".
17946 Use require_running and target_running. Always allow the extended
17947 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17948 restart in extended mode.
17949 * README: Refer to the GDB manual. Update --attach usage.
17951 2007-12-20 Andreas Schwab <schwab@suse.de>
17953 * linux-low.c (STACK_SIZE): Define.
17954 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17955 (linux_test_for_tracefork): Likewise.
17957 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17959 * linux-low.c (linux_wait_for_event): Update messages. Do not
17960 reinsert auto-delete breakpoints.
17961 * mem-break.c (struct breakpoint): Change return type of handler to
17963 (set_breakpoint_at): Update handler type.
17964 (reinsert_breakpoint_handler): Return 1 instead of calling
17966 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17968 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17969 * mem-break.h (set_breakpoint_at): Update handler type.
17970 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17971 * win32-low.c (auto_delete_breakpoint): New.
17972 (get_child_debug_event): Use it.
17974 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17976 * configure.ac: Check for pread and pwrite.
17977 * hostio.c (handle_pread): Fall back to lseek and read.
17978 (handle_pwrite): Fall back to lseek and write.
17979 * config.in, configure: Regenerated.
17981 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17983 * server.c (myresume): Add own_buf argument.
17984 (main): Update calls.
17986 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17988 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17989 * remote-utils.c (remote_open): Do not call disable_async_io.
17990 (block_async_io): Delete.
17991 (unblock_async_io): Make static.
17992 (initialize_async_io): New.
17993 * server.c (handle_v_cont): Handle async I/O here.
17994 (myresume): Likewise. Move other common resume tasks here...
17995 (main): ... from here. Call initialize_async_io. Disable async
17996 I/O before the main loop.
17997 * server.h (initialize_async_io): Declare.
17998 (block_async_io, unblock_async_io): Delete prototypes.
17999 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
18001 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
18003 * remote-utils.c (readchar): Allow binary data in received messages.
18005 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18007 * win32-low.c (attaching): New global.
18008 (win32_create_inferior): Clear the `attaching' global.
18009 (win32_attach): Set the `attaching' global.
18010 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
18011 attaching. Only set a breakpoint at the entry point if not
18014 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18016 * server.c (main): Don't report dll events on the initial
18017 connection on attaches.
18019 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18021 * server.c (main): Relax numerical bases supported for the pid of
18022 the --attach command line argument.
18024 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18026 * win32-low.c (win32_attach): Call OpenProcess before
18027 DebugActiveProcess, not after. Add last error output to error
18030 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18032 * win32-low.c (win32_get_thread_context)
18033 (win32_set_thread_context): New functions.
18034 (thread_rec): Use win32_get_thread_context.
18035 (continue_one_thread, win32_resume): Use win32_set_thread_context.
18036 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
18039 2007-12-03 Leo Zayas
18040 Pedro Alves <pedro_alves@portugalmail.pt>
18042 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
18044 (child_add_thread): Minor cleanup.
18045 (child_continue): Resume artificially suspended threads before
18046 calling ContinueDebugEvent.
18047 (suspend_one_thread): New.
18048 (fake_breakpoint_event): New.
18049 (get_child_debug_event): Change return type to int. Check here if
18050 gdb sent an interrupt request. If a soft interrupt was requested,
18051 fake a breakpoint event. Return 0 if there is no event to handle,
18053 (win32_wait): Don't check here if gdb sent an interrupt request.
18054 Ensure there is a valid event to handle.
18055 (win32_request_interrupt): Add soft interruption method as last
18058 2007-12-03 Leo Zayas
18059 Pedro Alves <pedro_alves@portugalmail.pt>
18061 * win32-low.h (win32_thread_info): Add descriptions to the
18062 structure members. Replace `suspend_count' counter by a
18064 * win32-low.c (thread_rec): Update condition of when to get the
18065 context from the inferior. Rely on ContextFlags being set if it
18066 has already been retrieved. Only suspend the inferior thread if
18067 we haven't already. Warn if that fails.
18068 (continue_one_thread): s/suspend_count/suspended/. Only call
18069 ResumeThread once. Warn if that fails.
18071 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18073 * win32-low.c (win32_wait): Don't read from the inferior when it
18074 has already exited.
18076 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18078 * Makefile.in (win32_low_h): New variable.
18079 (win32-low.o): Add dependency on $(win32_low_h).
18080 (win32-arm-low.o, win32-i386-low.o): New rules.
18082 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18084 * hostio.c: Correct copyright year.
18086 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18088 * Makefile.in (OBS): Add hostio.o.
18089 (hostio.o): New rule.
18090 * server.h (handle_vFile): Declare.
18091 * hostio.c: New file.
18092 * server.c (handle_v_requests): Take packet_len and new_packet_len
18093 for binary packets. Call handle_vFile.
18094 (main): Update call to handle_v_requests.
18096 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18098 * linux-low.c: Include <sched.h>.
18100 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18102 * linux-low.c (linux_tracefork_grandchild): New.
18103 (linux_tracefork_child): Use clone.
18104 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18106 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18108 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18110 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18112 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18114 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18116 * inferiors.c (change_inferior_id): Delete.
18117 (add_pid_to_list, pull_pid_from_list): New.
18118 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18119 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18120 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18121 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18122 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18123 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18124 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18125 (using_threads): Always set to 1.
18126 (handle_extended_wait): New.
18127 (add_process): Do not set TID.
18128 (linux_create_inferior): Set must_set_ptrace_flags.
18129 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18130 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18131 (linux_thread_alive): Rename TID argument to LWPID.
18132 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18133 (linux_wait_for_event): Do not use TID or check using_threads. Update
18134 call to dead_thread_notify. Call handle_extended_wait.
18135 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18136 (send_sigstop): Delete sigstop_sent.
18137 (wait_for_sigstop): Avoid TID.
18138 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18139 (linux_test_for_tracefork): New.
18140 (linux_lookup_signals): Use thread_db_active and
18141 linux_supports_tracefork_flag.
18142 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18143 * linux-low.h (get_process_thread): Avoid TID.
18144 (struct process_ifo): Move thread_known and tid to the end. Remove
18146 (linux_attach_lwp, thread_db_init): Update prototypes.
18147 * server.h (change_inferior_id): Delete prototype.
18148 (add_pid_to_list, pull_pid_from_list): New prototypes.
18149 * thread-db.c (thread_db_use_events): New.
18150 (find_first_thread): Rename to...
18151 (find_one_thread): ...this. Update callers and messages. Do not
18152 call fatal. Check thread_db_use_events. Do not call
18153 change_inferior_id or new_thread_notify.
18154 (maybe_attach_thread): Update. Do not call new_thread_notify.
18155 (thread_db_init): Set thread_db_use_events. Check use_events.
18156 * utils.c (fatal, warning): Correct message prefix.
18158 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
18160 * Makefile.in (clean): Remove new files.
18161 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
18162 (powerpc-64.o, powerpc-64.c): New rules.
18163 * configure.srv: Use alternate register sets for powerpc64-*-linux*
18164 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
18166 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
18168 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
18169 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
18170 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
18171 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
18172 (target_regsets): Add AltiVec and SPE register sets.
18173 * configure.ac: Check for AltiVec and SPE.
18174 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
18175 (ppc_fill_vrregset, ppc_store_vrregset): New.
18176 (target_regsets): Add AltiVec register set.
18177 * configure: Regenerated.
18179 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
18181 * linux-low.c (O_LARGEFILE): Define.
18182 (linux_read_memory): Use /proc/PID/mem.
18183 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
18184 * configure, config.in: Regenerated.
18186 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18188 * linux-low.c (linux_wait_for_event): Do not pass signals while
18191 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18193 * win32-low.c (create_process): New.
18194 (win32_create_inferior): Use create_process instead of
18195 CreateProcess. If create_process failed retry appending an ".exe"
18196 suffix. Store the GetLastError result immediatelly after
18197 create_process calls and use it on the call to error.
18199 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18201 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
18203 2007-08-23 Joel Brobecker <brobecker@adacore.com>
18205 * configure.ac: Switch license to GPLv3.
18207 2007-08-01 Michael Snyder <msnyder@access-company.com>
18209 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
18211 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
18213 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
18215 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
18216 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
18217 CloseToolhelp32Snapshot.
18218 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
18219 CloseToolhelp32Snapshot.
18221 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
18223 * server.c (main): Check for inferior exit before main loop.
18225 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
18227 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
18228 instead of on tmp_desc.
18230 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
18231 Daniel Jacobowitz <dan@codesourcery.com>
18233 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
18234 (add_thread): Minor cleanups.
18235 (clear_inferiors): Move lower in the file. Clear the DLL
18237 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
18238 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
18239 (xml_escape_text): New.
18240 * server.c (handle_query): Handle qXfer:libraries:read. Report it
18242 (handle_v_cont): Report errors.
18243 (gdbserver_version): Update.
18244 (main): Correct size of own_buf. Do not report initial DLL events.
18245 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
18246 (unloaded_dll, xml_escape_text): New.
18247 * win32-low.c (enum target_waitkind): Update comments.
18248 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
18249 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
18250 (win32_EnumProcessModules, win32_GetModuleInformation)
18251 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
18252 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
18253 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
18254 (win32_Module32First, win32_Module32Next, load_toolhelp)
18255 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
18256 (get_child_debug_event): Handle DLL events.
18257 (win32_wait): Likewise.
18259 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18261 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
18262 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
18264 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18266 * win32-low.c (handle_output_debug_string): Ignore event if not
18269 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18271 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
18273 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
18275 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
18277 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
18279 * inferiors.c (change_inferior_id): Add comment.
18280 * linux-low.c (check_removed_breakpoint): Add an early
18281 prototype. Improve debug output.
18282 (linux_attach): Doc update.
18283 (linux_detach_one_process, linux_detach): Clean up before releasing
18285 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
18286 * linux-low.h (struct process_info): Doc improvement.
18287 * mem-break.c (delete_all_breakpoints): New.
18288 * mem-break.h (delete_all_breakpoints): New prototype.
18289 * thread-db.c (find_first_thread): New.
18290 (thread_db_create_event): Call it instead of
18291 thread_db_find_new_threads. Clean up unused variables.
18292 (maybe_attach_thread): Remove first thread handling.
18293 (thread_db_find_new_threads): Use find_first_thread.
18294 (thread_db_get_tls_address): Likewise.
18296 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
18298 * thread-db.c (thread_db_find_new_threads): Add prototype.
18299 (thread_db_create_event): Check for the main thread before adding
18301 (maybe_attach_thread): Only enable event reporting if TID == 0.
18302 (thread_db_get_tls_address): Check for new threads.
18304 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
18306 * linux-low.c (linux_create_inferior): Try execv before execvp.
18307 * spu-low.c (spu_create_inferior): Likewise.
18309 2007-06-13 Mike Frysinger <vapier@gentoo.org>
18311 * linux-low.c (linux_create_inferior): Change execv to execvp.
18312 * spu-low.c (spu_create_inferior): Likewies.
18314 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
18316 * Makefile.in (clean): Clean new files instead of deleted ones.
18317 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
18318 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
18320 * configure.srv: Specify XML files and new regformats for MIPS and
18322 * linux-mips-low.c (mips_num_regs): Set to only used registers.
18323 (mips_regmap): Do not fetch $0. Remove unused registers. Add
18324 an entry for the restart register.
18325 (mips_cannot_fetch_register, mips_cannot_store_register)
18326 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
18327 register names to match the XML descriptions.
18328 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
18329 restart register instead of $0.
18331 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18332 Markus Deuling <deuling@de.ibm.com>
18334 * remote-utils.c (decode_xfer_write): New function.
18335 * server.h (decode_xfer_write): Add prototype.
18336 * server.c (handle_query): Add PACKET_LEN argument. Support
18337 qXfer:spu:read and qXfer:spu:write packets.
18338 (main): Pass packet_len to handle_query.
18339 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
18340 * target.h (target_ops): Add qxfer_spu.
18342 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18344 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
18345 accessing non-seekable spufs files.
18347 2007-05-16 Markus Deuling <deuling@de.ibm.com>
18349 * server.c (handle_query): Add reply for qC packet.
18351 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18352 Leo Zayas <lerele@champenstudios@com>
18354 * server.h (check_remote_input_interrupt_request): New function.
18355 * remote_utils.c (INVALID_DESCRIPTOR): New define.
18356 (remote_desc): Initialize with INVALID_DESCRIPTOR.
18357 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
18358 (check_remote_input_interrupt_request): New function.
18359 * server.h (check_remote_input_interrupt_request): Declare.
18360 * win32-low.c (winapi_DebugBreakProcess,
18361 winapi_GenerateConsoleCtrlEvent): New typedefs.
18362 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
18364 (win32_wait): Check for remote interrupt request
18365 with check_remote_input_interrupt_request.
18366 (win32_request_interrupt): New function.
18367 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18369 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18371 * win32-low.c (debug_registers_changed,
18372 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18373 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18374 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18375 (thread_rec): Get context using the low target.
18376 (child_add_thread): Call thread_added on the low target,
18377 which does the same thing.
18379 (do_initial_child_stuff): Remove debug registers references.
18380 Set context using the low target. Resume threads after
18381 setting the contexts.
18382 (child_continue): Remove dead variable. Remove debug
18383 registers references.
18384 (child_fetch_inferior_registers): Go through the low target.
18385 (do_child_store_inferior_registers): Remove.
18386 (child_store_inferior_registers): Go through the low target.
18387 (win32_resume): Remove debug registers references.
18388 Set context using the low target.
18389 (handle_exception): Change return type to void. Don't record
18390 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18391 first chance exception.
18392 (get_child_debug_event): Change return type to void. Remove
18393 goto loop. Always return after waiting for debug event.
18394 (win32_wait): Convert to switch statement. Handle spurious
18397 * win32-i386-low.c (debug_registers_changed,
18398 debug_registers_used): New.
18399 (initial_stuff): Rename to ...
18400 (i386_initial_stuff): ... this. Clear debug registers
18402 (store_debug_registers): Delete.
18403 (i386_get_thread_context): New.
18404 (load_debug_registers): Delete.
18405 (i386_set_thread_context): New.
18406 (i386_thread_added): New.
18407 (single_step): Rename to ...
18408 (i386_single_step): ... this.
18409 (do_fetch_inferior_registers): Rename to ...
18410 (i386_fetch_inferior_register): ... this.
18411 (i386_store_inferior_register): New.
18412 (the_low_target): Adapt to new interface.
18414 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18415 (arm_get_thread_context): New.
18416 (arm_set_thread_context): New.
18418 (do_fetch_inferior_registers): Rename to ...
18419 (arm_fetch_inferior_register): ... this.
18420 (arm_store_inferior_register): New.
18421 (arm_wince_breakpoint): Reimplement as unsigned long.
18422 (arm_wince_breakpoint_len): Define.
18423 (the_low_target): Adapt to new interface.
18425 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18426 load_debug_registers. Add get_thread_context, set_thread_context,
18427 thread_added and store_inferior_register. Rename
18428 fetch_inferior_registers to fetch_inferior_register.
18429 (regptr): Remove declaration.
18431 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18433 * linux-low.c (linux_detach): Change return type to int. Return 0.
18434 * spu-low.c (spu_detach): Likewise.
18436 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18438 * target.h (target_ops): Change return type of detach to int.
18440 (join_inferior): New.
18441 * server.c (main): Don't skip detach support on mingw32.
18442 If the inferior doesn't support detaching return error.
18443 Call join_inferior instead of using waitpid.
18444 * linux-low.c (linux_join): New.
18445 (linux_target_op): Add linux_join.
18446 * spu-low.c (spu_join): New.
18447 (spu_target_ops): Add spu_join.
18448 * win32-low.c (win32_detach): Adapt to new interface.
18449 Reopen current_process_handle before detaching. Issue a child
18450 resume before detaching.
18452 (win32_target_op): Add win32_join.
18454 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18456 * win32-low.c (win32-attach): Fix return value.
18457 * target.h (target_ops): Describe ATTACH return values.
18459 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18461 * win32-low.c (GETPROCADDRESS): Define.
18462 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18463 (winapi_DebugSetProcessKillOnExit): Likewise.
18464 (win32_create_inferior): Force usage of ansi CreateProcessA.
18465 (win32_attach): Use GETPROCADDRESS.
18466 (win32_detach): Likewise.
18468 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18470 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18472 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18474 * win32-low.c: Commit leftover changes from 2007-03-29.
18476 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18478 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18479 fields short instead of int. Add explicit padding.
18480 (i387_cache_to_fsave): Remove unnecessary casts.
18481 (i387_fsave_to_cache): Doc fix.
18482 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18484 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18486 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18487 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18489 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18491 * configure.srv (arm*-*-mingw32ce*): Move near the other
18494 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18496 * configure.ac: Add errno checking.
18497 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18498 sys/file.h and malloc.h.
18499 (AC_CHECK_DECLS): Add perror.
18500 (srv_mingwce): Handle.
18501 * configure.srv (i[34567]86-*-cygwin*): Add
18502 win32-i386-low.o to srv_tgtobj.
18503 (i[34567]86-*-mingw*): Likewise.
18504 (arm*-*-mingw32ce*): Add case.
18505 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18506 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18507 [__MINGW32CE__] (strerror): New function.
18508 [__MINGW32CE__] (errno): Define to GetLastError.
18509 [__MINGW32CE__] (COUNTOF): New macro.
18510 (remote_open): Remove extra close call.
18511 * mem-break.c (delete_breakpoint_at): New function.
18512 * mem-break.h (delete_breakpoint_at): Declare.
18513 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18514 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18515 [USE_WIN32API] (read, write): Add char* casts.
18516 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18517 * server.h: Include wincecompat.h on Windows CE.
18518 [HAVE_ERRNO_H]: Check.
18519 (perror): Declare if not declared.
18520 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18521 (perror_with_name): Remove errno declaration.
18522 * wincecompat.h: New.
18523 * wincecompat.c: New.
18524 * win32-low.h: New.
18525 * win32-arm-low.c: New.
18526 * win32-i386-low.c: New.
18527 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18528 (OUTMSG2): Make it safe.
18530 (COUNTOF): New macro.
18531 (NUM_REGS): Get it from the low target.
18532 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18533 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18534 (thread_rec): Let low target handle debug registers.
18535 (child_add_thread): Likewise.
18536 (child_init_thread_list): Likewise.
18537 (continue_one_thread): Likewise.
18539 (do_child_fetch_inferior_registers): Move to ...
18540 * win32-i386-low.c: ... here, and rename to ...
18541 (do_fetch_inferior_registers): ... this.
18542 * win32-low.c (child_fetch_inferior_registers):
18543 Go through the low target.
18544 (do_child_store_inferior_registers): Use regptr.
18545 (strwinerror): New function.
18546 (win32_create_inferior): Handle Windows CE.
18547 Use strwinerror instead of strerror on Windows error
18548 codes. Add program to the error output.
18549 Don't close the main thread handle on Windows CE.
18550 (win32_attach): Use coredll.dll on Windows CE.
18551 (win32_kill): Close current process and current
18553 (win32_detach): Use coredll.dll on Windows CE.
18554 (win32_resume): Let low target handle debug registers, and
18556 (handle_exception): Add/Remove initial breakpoint. Avoid
18557 non-existant WSTOPSIG on Windows CE.
18558 (win32_read_inferior_memory): Cast to remove warning.
18559 (win32_arch_string): Go through the low target.
18560 (initialize_low): Call set_breakpoint_data with the low
18561 target's breakpoint.
18562 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18563 FOP_REGNUM, mappings): Move to ...
18564 * win32-i386-low.c: ... here.
18565 * win32-low.c (win32_thread_info): Move to ...
18566 * win32-low.h: ... here.
18567 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18568 win32-arm-low.c and wincecompat.c.
18569 (all:): Add $EXEEXT.
18570 (install-only:): Likewise.
18571 (gdbserver:): Likewise.
18572 (gdbreplay:): Likewise.
18573 * config.in: Regenerate.
18574 * configure: Regenerate.
18576 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18578 * win32-low.c: Rename typedef thread_info to
18579 win32_thread_info throughout.
18581 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18583 * win32-i386-low.c: Rename to ...
18584 * win32-low.c: ... this.
18585 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18586 * Makefile.in: Likewise.
18588 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18590 * remote-utils.c (monitor_output): Constify msg parameter.
18591 * server.h (monitor_output): Likewise.
18592 * win32-i386-low.c (handle_output_debug_string): New.
18593 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18594 handle_output_debug_string.
18595 (get_child_debug_event): Likewise.
18597 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18599 * server.c (main): Correct strtoul check.
18601 2007-03-27 Jon Ringle <jon@ringle.org>
18603 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18605 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18607 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18609 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18611 * terminal.h: Check HAVE_SGTTY_H.
18613 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18615 * remote-utils.c (remote_open): Print out the assigned port number.
18617 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18619 * remote-utils.c (monitor_output): New function.
18620 * server.c (debug_threads): Define here.
18621 (monitor_show_help): New function.
18622 (handle_query): Handle qRcmd.
18623 (main): Do not handle 'd' packet.
18624 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18625 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18628 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18630 * Makefile.in (EXEEXT): New.
18631 (clean): Use $(EXEEXT).
18633 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18635 * target.h (target_ops): Rename send_signal to request_interrupt,
18636 and remove enum target_signal parameter.
18637 * linux-low.c (linux_request_interrupt): Rename from
18638 linux_send_signal, and always send SIGINT.
18639 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18640 and always send SIGINT.
18641 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18643 (input_interrupt): Likewise.
18645 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18647 * server.c (get_features_xml): Check if target implemented
18649 * win32-i386-low.c (win32_arch_string): New.
18650 (win32_target_ops): Add win32_arch_string as arch_string member.
18652 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18654 * spu-low.c (spu_arch_string): New.
18655 (spu_target_ops): Add spu_arch_string.
18657 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18659 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18660 * configure.ac: Do not check for terminal.h.
18661 * configure, config.in: Regenerated.
18663 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18665 * Makefile.in (OBS): Add $(XML_BUILTIN).
18666 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18668 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18669 (arm-with-iwmmxt.c): New.
18670 * config.in, configure: Regenerate.
18671 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18672 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18673 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18674 (arm*-*-linux*): Add iWMMXt and regset support.
18675 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18676 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18677 (arm_store_wmmxregset, target_regsets): New.
18678 * server.c (get_features_xml): Take annex argument. Check builtin
18680 (handle_query): Handle multiple annexes.
18682 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18684 * remote-utils.c [USE_WIN32API] (read, write): Define.
18685 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18688 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18690 * linux-i386-low.c (the_low_target): Set arch_string.
18691 * linux-x86-64-low.c (the_low_target): Likewise.
18692 * linux-low.c (linux_arch_string): New.
18693 (linux_target_ops): Add it.
18694 * linux-low.h (struct linux_target_ops): Add arch_string.
18695 * server.c (write_qxfer_response): Use const void * for DATA.
18696 (get_features_xml): New.
18697 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18698 * target.h (struct target_ops): Add arch_string method.
18700 2007-01-03 Denis Pilat <denis.pilat@st.com>
18701 Daniel Jacobowitz <dan@codesourcery.com>
18703 * linux-low.c (linux_kill): Handle being called with no threads.
18704 * win32-i386-low.c (win32_kill): Likewise.
18705 (get_child_debug_event): Clear current_process_handle.
18707 2006-12-30 Denis PILAT <denis.pilat@st.com>
18708 Daniel Jacobowitz <dan@codesourcery.com>
18710 * remote-utils.c (remote_open): Check the type of specified
18711 serial port devices before opening them.
18712 * server.c (main): Kill the inferior if an error occurs during
18713 the first remote_open.
18715 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18717 * README: Update supported targets.
18719 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18721 * Makefile.in (clean): Remove reg-mips64.c.
18722 (reg-mips64.c, reg-mips64.o): New rules.
18723 * configure.srv: Handle mips64. Include regset support for mips.
18724 * linux-mips-low.c (union mips_register): New.
18725 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18726 (mips_breakpoint, mips_breakpoint_at): Use int.
18727 (mips_collect_register, mips_supply_register)
18728 (mips_collect_register_32bit, mips_supply_register_32bit)
18729 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18730 (mips_store_fpregset, target_regsets): New.
18731 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18733 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18735 * configure.srv: Add target "spu*-*-*".
18736 * Makefile.in (clean): Remove reg-spu.c.
18737 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18738 * spu-low.c: New file.
18740 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18742 * configure.ac: Correct td_thr_tls_get_addr test.
18743 * configure: Regenerated.
18745 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18747 * linux-low.c (linux_wait_for_event): Reformat. Use the
18748 pass_signals array.
18749 * remote-utils.c (decode_address_to_semicolon): New.
18750 * server.c (pass_signals, handle_general_set): New.
18751 (handle_query): Mention QPassSignals for qSupported.
18752 (main): Call handle_general_set.
18753 * server.h (pass_signals, decode_address_to_semicolon): New.
18755 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18757 * server.c (handle_query): Correct error handling for read_auxv.
18759 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18761 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18762 and srv_linux_thread_db to yes.
18763 * linux-s390-low.c (s390_fill_gregset): New function.
18764 (target_regsets): Define data structure.
18766 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18768 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18769 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18770 * config.in, configure: Regenerated.
18771 * inferiors.c (gdb_id_to_thread): New function.
18772 (gdb_id_to_thread_id): Use it.
18773 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18774 * linux-low.h (struct process_info): Add th member.
18775 (thread_db_get_tls_address): New prototype.
18776 * remote-utils.c (decode_address): Make non-static.
18777 * server.c (handle_query): Handle qGetTLSAddr.
18778 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18779 * target.h (struct target_ops): Add get_tls_address.
18780 * thread-db.c (maybe_attach_thread): Save the thread handle.
18781 (thread_db_get_tls_address): New.
18783 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18785 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18786 (linux_resume_one_process): Take a siginfo_t *. Update all
18787 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18788 (struct pending_signals): Add a siginfo_t.
18789 (linux_wait_for_process): Always set last_status.
18790 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18791 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18792 * linux-low.h (struct process_info): Add last_status.
18794 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18796 * remote-utils.c (try_rle): New function.
18797 (putpkt_binary): Use it.
18799 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18801 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18802 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18803 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18804 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18805 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18808 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18810 * server.c (terminal_fd): New variable.
18811 (old_foreground_pgrp): Likewise.
18812 (restore_old_foreground_pgrp): New function.
18813 (start_inferior): Record the terminal file descriptor in terminal_fd
18814 and its original foreground group in old_foreground_pgrp. Register
18815 restore_old_foreground_pgrp with atexit().
18817 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18819 * server.c (handle_query): Correct qPart to qXfer.
18821 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18823 * configure.ac: Check for more headers which are missing on
18824 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18825 * configure.srv: Add Cygwin and mingw32.
18826 * remote-utils.c: Don't include headers unconditionally which
18827 are missing on mingw32. Include <winsock.h> for mingw32.
18828 (remote_open): Adjust for mingw32 support. Flush
18829 standard error after writing to it.
18830 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18831 (unblock_async_io, enable_async_io, disable_async_io)
18832 (readchar, getpkt): Update for Winsock support.
18833 (prepare_resume_reply): Expect a protocol signal number.
18834 * server.c: Disable <sys/wait.h> on mingw32.
18835 (start_inferior): Adjust for mingw32 support. Flush
18836 standard error after writing to it.
18837 (attach_inferior): Likewise. Use protocol signal
18839 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18841 * win32-i386-low.c: New file.
18842 * Makefile.in (XM_CLIBS): Set.
18843 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18844 (win32-i386-low.o): New dependency rule.
18845 * linux-low.c (linux_wait): Use target signal numbers.
18846 * target.h (struct target_ops): Doc fix.
18847 * server.h (target_signal_to_name): New prototype.
18848 * gdbreplay.c: Don't include headers unconditionally which
18849 are missing on mingw32. Include <winsock.h> for mingw32.
18850 (remote_close, remote_open): Adjust for Winsock support.
18851 * configure, config.in: Regenerated.
18853 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18855 * server.c (decode_xfer_read, write_qxfer_response): New.
18856 (handle_query): Take a packet length argument. Handle
18857 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18858 the qSupported response.
18859 (main): Update call to handle_query.
18861 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18863 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18864 (putpkt_binary): Renamed from putpkt and adjusted for binary
18866 (putpkt): New wrapper for putpkt_binary.
18867 (readchar): Don't mask off the high bit.
18868 (decode_X_packet): New function.
18869 * server.c (main): Call putpkt_binary if a handler sets the packet
18870 length. Save the length of the incoming packet. Handle 'X'.
18871 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18873 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18875 * server.c (handle_query): Handle qSupported.
18877 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18879 * remote-utils.c (all_symbols_looked_up): New variable.
18880 (look_up_one_symbol): Check it.
18881 * server.h (look_up_one_symbol): New declaration.
18882 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18884 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18886 * Makefile.in (linux-arm-low.o): Update dependencies.
18887 * linux-arm-low.c: Include "gdb_proc_service.h".
18888 (PTRACE_GET_THREAD_AREA): Define.
18889 (ps_get_thread_area): New function.
18891 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18893 * configure.srv (m68k*-*-uclinux*): New target.
18894 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18895 (linux_resume_one_process): Remove extraneous cast.
18896 (linux_read_offsets): New.
18897 (linux_target_op): Add linux_read_offsets on mmuless systems.
18898 * server.c (handle_query): Add qOffsets logic.
18899 * target.h (struct target_ops): Add read_offsets.
18901 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18903 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18904 (PTRACE_GET_THREAD_AREA): Define.
18905 (ps_get_thread_area): New function.
18906 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18907 (linux-x86-64-low.o): Update.
18909 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18911 * configure.ac: Remove checks for prfpregset_t.
18912 * gdb_proc_service.h: New file.
18913 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18914 new "gdb_proc_service.h".
18915 * proc-service.c: Likewise.
18916 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18917 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18918 * Makefile.in (gdb_proc_service_h): Updated.
18919 * configure, config.in: Regenerated.
18921 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18923 * remote-utils.c (prepare_resume_reply): Move declaration
18924 of gdb_id_from_wait to the top of the block.
18926 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18928 * linux-low.c (regsets_store_inferior_registers): Read the regset
18929 from the target before filling it.
18931 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18933 * server.c (attach_inferior): Return SIGTRAP for a successful
18936 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18938 * Makefile.in (OBS): Add version.o.
18939 (STAGESTUFF): Delete.
18940 (version.o): Add dependencies.
18941 (version.c): Replace rule.
18942 (clean): Remove version.c.
18943 * server.c (gdbserver_version): New.
18944 (gdbserver_usage): Use printf.
18945 (main): Handle --version and --help.
18946 * server.h (version, host_name): Add declarations.
18948 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18960 * linux-x86-64-low.c:
18962 * linux-s390-low.c:
18963 * linux-ppc64-low.c:
18965 * linux-mips-low.c:
18966 * linux-m68k-low.c:
18967 * linux-m32r-low.c:
18970 * linux-ia64-low.c:
18971 * linux-i386-low.c:
18972 * linux-crisv32-low.c:
18984 * gdbserver.1: Add (C) after Copyright. Update the FSF
18987 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18989 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18990 (arm_breakpoint_at): Recognize both breakpoints.
18991 (the_low_target): Use the correct breakpoint instruction.
18993 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18995 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18996 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18997 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18998 (the_low_target): Update.
19000 2005-10-25 Andreas Schwab <schwab@suse.de>
19002 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
19004 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
19005 (ia64_num_regs): Reduce to 462.
19007 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
19009 * acinclude.m4: Correct quoting.
19010 * aclocal.m4: Regenerated.
19012 Suggested by SZOKOVACS Robert <szo@ies.hu>:
19013 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
19014 (thread_db_init): Call thread_db_err_str.
19015 * configure.ac: Check for TD_VERSION.
19016 * config.in, configure: Regenerated.
19018 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19020 * server.h (error, fatal, warning): Add ATTR_FORMAT.
19022 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19024 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
19025 is not available. Define HAVE_PTRACE_GETREGS if it is.
19026 * config.in, configure: Regenerated.
19027 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
19028 * linux-i386-low.c, linux-m68k-low.c: Update to use
19029 HAVE_PTRACE_GETREGS.
19030 * linux-low.c (regsets_fetch_inferior_registers)
19031 (regsets_store_inferior_registers): Only return 0 if we processed
19033 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
19034 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
19036 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19038 * inferiors.c (struct thread_info): Add gdb_id.
19039 (add_thread): Add gdb_id argument.
19040 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
19041 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
19042 calls to add_thread.
19043 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
19044 * server.c (handle_query): Use thread_to_gdb_id.
19045 (handle_v_cont, main): Use gdb_id_to_thread_id.
19046 * server.h (add_thread): Update prototype.
19047 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
19050 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19052 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
19053 left-padded registers.
19054 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
19055 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
19057 2005-07-01 Steve Ellcey <sje@cup.hp.com>
19059 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
19060 * configure: Regenerate.
19061 * config.in: Regenerate.
19062 * server.h (NEED_DECLARATION_STRERROR):
19063 Replace with !HAVE_DECL_STRERROR.
19065 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19067 * linux-low.c (linux_wait, linux_send_signal): Don't test
19068 an unsigned long variable for > 0 if it could be MAX_ULONG.
19069 * server.c (myresume): Likewise.
19070 * target.c (set_desired_inferior): Likewise.
19072 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19074 * configure.ac: Simplify and improve check for socklen_t.
19075 * configure, config.in: Regenerate.
19077 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19079 * acconfig.h: Remove.
19080 * configure.ac: Add a test for socklen_t. Use three-argument
19081 AC_DEFINE throughout.
19082 * config.in: Regenerated using autoheader 2.59.
19083 * configure: Regenerated.
19085 * gdbreplay.c (socklen_t): Provide a default.
19086 (remote_open): Use socklen_t.
19087 * remote-utils.c (socklen_t): Provide a default.
19088 (remote_open): Use socklen_t.
19089 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19092 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19094 * linux-low.c (linux_read_memory, linux_write_memory)
19095 (linux_read_auxv): Likewise.
19096 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19097 (check_mem_write): Likewise.
19098 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19100 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19101 (registers_from_string, register_data): Likewise.
19102 * server.c (handle_query, main): Likewise.
19103 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19104 (decode_M_packet): Likewise.
19105 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19106 * target.h (struct target_ops): Update read_memory, write_memory,
19108 (read_inferior_memory, write_inferior_memory): Update.
19109 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19110 to unsigned char *.
19111 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19112 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19113 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19114 linux-s390-low.c, linux-sh-low.c: Update for changes in
19115 read_inferior_memory and the_low_target->breakpoint.
19117 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19119 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19120 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19121 * configure.srv: Add powerpc64-*-linux*.
19122 * linux-ppc64-low.c: New file.
19124 2005-05-23 Orjan Friberg <orjanf@axis.com>
19126 * linux-cris-low.c: New file with support for CRIS.
19127 * linux-crisv32-low.c: Ditto for CRISv32.
19128 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19129 (clean): Add reg-cris.c and reg-crisv32.c.
19130 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19131 reg-crisv32.o, and reg-crisv32.c to make rules.
19132 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19133 recognized targets.
19135 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19137 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19138 of sizeof (PTRACE_XFER_TYPE).
19139 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19141 2005-05-12 Orjan Friberg <orjanf@axis.com>
19143 * target.h (struct target_ops): Add insert_watchpoint,
19144 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19145 pointers for hardware watchpoint support.
19146 * linux-low.h (struct linux_target_ops): Ditto.
19147 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19148 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19149 to linux_target_ops.
19150 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19152 * server.c (main): Recognize 'Z' and 'z' packets.
19154 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
19156 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
19157 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
19158 (the_low_target): Add new members.
19160 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19162 * proc-service.c (ps_lgetregs): Search all_processes instead of
19165 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19167 * server.c (start_inferior): Change return type to int.
19168 (attach_inferior): Change sigptr to int *.
19169 (handle_v_cont, handle_v_requests): Change signal to int *.
19170 (main): Change signal to int.
19172 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
19174 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
19175 * configure.srv: Add m32r*-*-linux*.
19176 * linux-m32r-low.c: New file.
19178 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
19180 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
19182 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19184 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
19185 Take unsigned long arguments for PIDs.
19186 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
19187 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
19188 (wait_for_sigstop, linux_resume_one_process)
19189 (regsets_fetch_inferior_registers, linux_send_signal)
19190 (linux_read_auxv): Likewise. Update the types of variables holding
19191 PIDs. Update format string specifiers.
19192 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
19193 * remote-utils.c (prepare_resume_reply): Likewise.
19194 * server.c (cont_thread, general_thread, step_thread)
19195 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
19197 (handle_query): Update format specifiers.
19198 (handle_v_cont, main): Use strtoul for thread IDs.
19199 * server.h (struct inferior_list_entry): Use unsigned long for ID.
19200 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
19201 (general_thread, step_thread, thread_from_wait)
19202 (old_thread_from_wait): Update.
19203 * target.h (struct thread_resume): Use unsigned long for THREAD.
19204 (struct target_ops): Use unsigned long for arguments to attach and
19207 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
19209 * acinclude.m4: Include bfd/bfd.m4 directly.
19210 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
19211 <agriffis@toolchain.org>.
19212 * aclocal.m4, configure: Regenerated.
19214 2005-01-07 Andrew Cagney <cagney@gnu.org>
19216 * configure.ac: Rename configure.in, require autoconf 2.59.
19217 * configure: Re-generate.
19219 2004-12-08 Daniel Jacobowitz <dan@debian.org>
19221 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
19222 LIBS when finished.
19223 * aclocal.m4: Regenerated.
19224 * configure: Regenerated.
19226 2004-11-21 Andreas Schwab <schwab@suse.de>
19228 * linux-m68k-low.c (m68k_num_gregs): Define.
19229 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
19230 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
19231 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
19232 (m68k_breakpoint_at): New. Add to the_low_target.
19234 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
19235 srv_linux_thread_db to yes.
19237 2004-10-20 Joel Brobecker <brobecker@gnat.com>
19239 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
19240 (ARCH_SET_FS): Likewise.
19241 (ARCH_GET_FS): Likewise.
19242 (ARCH_GET_GS): Likewise.
19244 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19246 * linux-i386-low.c (ps_get_thread_area): New.
19247 * linux-x86-64-low.c (ps_get_thread_area): New.
19248 * linux-low.c: Include <sys/syscall.h>.
19249 (linux_kill_one_process): Don't kill the first thread here.
19250 (linux_kill): Kill the first thread here.
19251 (kill_lwp): New function.
19252 (send_sigstop, linux_send_signal): Use it.
19253 * proc-service.c: Clean up #ifdefs.
19254 (fpregset_info): Delete.
19255 (ps_lgetregs): Update and enable implementation.
19256 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
19258 * remote-utils.c (struct sym_cache, symbol_cache): New.
19259 (input_interrupt): Print a clearer message.
19260 (async_io_enabled): New variable.
19261 (enable_async_io, disable_async_io): Use it. Update comments.
19262 (look_up_one_symbol): Use the symbol cache.
19263 * thread-db.c (thread_db_look_up_symbols): New function.
19264 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
19266 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19268 * configure.in: Test for -rdynamic.
19269 * configure: Regenerated.
19270 * Makefile (INTERNAL_LDFLAGS): New.
19271 (gdbserver, gdbreplay): Use it.
19273 2004-09-02 Andrew Cagney <cagney@gnu.org>
19275 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
19277 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
19279 * linux-low.c (linux_wait): Clear all_processes list also.
19281 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19283 * linux-low.c: Include <errno.h>. Remove extern declaration of
19286 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19288 * gdbreplay.c, server.h, utils.c: Update copyright years.
19290 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19292 * server.c (main): Print child status or termination signal from
19293 variable 'signal', not 'sig'.
19295 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19297 * linux-low.c (linux_read_memory): Change return type to
19298 int. Check for and return error from ptrace().
19299 * target.c (read_inferior_memory): Change return type to int. Pass
19300 back return status from the_target->read_memory().
19301 * target.h (struct target_ops): Adapt *read_memory() prototype.
19303 (read_inferior_memory): Adapt prototype.
19304 * server.c (main): Return an error packet if
19305 read_inferior_memory() returns an error.
19307 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
19309 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
19310 Unify with other clean targets.
19312 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19314 * server.c (handle_v_cont): Call set_desired_inferior.
19316 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19318 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
19320 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19322 * linux-low.c (linux_wait): Unblock async I/O.
19323 (linux_resume): Block and enable async I/O.
19324 * remote-utils.c (block_async_io, unblock_async_io): New functions.
19325 * server.h (block_async_io, unblock_async_io): Add prototypes.
19327 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19329 * remote-utils.c (remote_open): Print a status notice after
19330 opening a TCP port.
19331 * server.c (attach_inferior): Print a status notice after
19334 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19336 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
19338 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
19340 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
19342 * server.c, target.h: Update copyright years.
19344 2004-02-25 Roland McGrath <roland@redhat.com>
19346 * target.h (struct target_ops): New member `read_auxv'.
19347 * server.c (handle_query): Handle qPart:auxv:read: query using that.
19348 * linux-low.c (linux_read_auxv): New function.
19349 (linux_target_ops): Initialize `read_auxv' member to that.
19351 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
19353 Committed by Jim Blandy <jimb@redhat.com>.
19355 * linux-s390-low.c (s390_num_regs): Update.
19356 (s390_regmap): Remove control registers. Use __s390x__ predefine
19357 instead of GPR_SIZE to distiguish s390 and s390x targets.
19359 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
19361 * linux-low.c: Update copyright year.
19362 (check_removed_breakpoint): Clear pending_is_breakpoint.
19363 (linux_set_resume_request, linux_queue_one_thread)
19364 (resume_status_pending_p): New functions.
19365 (linux_continue_one_thread): Use process->resume.
19366 (linux_resume): Only resume threads if there are no pending events.
19367 * linux-low.h (struct process_info): Add resume request
19370 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19372 * regcache.c (new_register_cache): Clear the allocated register
19373 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19375 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19377 * linux-low.c (linux_resume): Take a struct thread_resume *
19379 (linux_wait): Update call.
19380 (resume_ptr): New static variable.
19381 (linux_continue_one_thread): Renamed from
19382 linux_continue_one_process. Use resume_ptr.
19383 (linux_resume): Use linux_continue_one_thread.
19384 * server.c (handle_v_cont, handle_v_requests): New functions.
19385 (myresume): New function.
19386 (main): Handle 'v' case.
19387 * target.h (struct thread_resume): New type.
19388 (struct target_ops): Change argument of "resume" to struct
19390 (myresume): Delete macro.
19392 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19394 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19395 (uninstall): Support DESTDIR.
19397 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19399 * configure.srv: Add xscale*linux copy of arm*linux entry.
19401 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19403 * linux-arm-low.c (arm_reinsert_addr): New function.
19404 (the_low_target): Add arm_reinsert_addr.
19406 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19408 * mem-break.c: Remove whitespace at end of file.
19410 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19412 * configure.in: Check whether we need to prototype strerror.
19413 * server.h: Optionally prototype strerror.
19414 * gdbreplay.c (perror_with_name): Use strerror.
19415 * linux-low.c (linux_attach_lwp): Use strerror.
19416 * utils.c (perror_with_name): Use strerror.
19417 * config.in, configure: Regenerated.
19419 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19421 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19422 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19424 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19426 * Makefile.in (SFILES): Update.
19427 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19428 low-sun3.c: Remove files.
19430 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19432 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19433 (linux_detach_one_process, linux_detach): New functions.
19434 (linux_target_ops): Add linux_detach.
19435 * server.c (main): Handle 'D' packet.
19436 * target.h (struct target_ops): Add "detach" member.
19437 (detach_inferior): Define.
19439 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19441 From Kelley Cook <kelleycook@wideopenwest.com>:
19442 * configure.srv: Accept i[34567]86 variants.
19444 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19446 * linux-low.c (linux_wait_for_event): Correct comment typos.
19447 (linux_resume_one_process): Call check_removed_breakpoint.
19448 (linux_send_signal): New function.
19449 (linux_target_ops): Add linux_send_signal.
19450 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19452 * target.h (struct target_ops): Add send_signal.
19454 2003-05-29 Jim Blandy <jimb@redhat.com>
19456 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19457 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19458 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19459 away part of the register's value.
19461 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19463 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19464 (linux_wait_for_event, linux_init_signals): Likewise.
19466 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19468 * configure.in: Check for stdlib.h.
19469 * configure: Regenerated.
19470 * config.in: Regenerated.
19472 2003-01-04 Andreas Schwab <schwab@suse.de>
19474 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19476 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19478 * Makefile.in: Remove obsolete code.
19480 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19482 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19483 defined(PT_FPR0_HI).
19485 2002-11-17 Stuart Hughes <seh@zee2.com>
19487 * linux-arm-low.c (arm_num_regs): Increase.
19488 (arm_regmap): Include status register.
19490 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19492 * linux-low.c (register_addr): Remove incorrect -1 check.
19494 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19496 * linux-low.c (linux_create_inferior): Call setpgid. Return
19498 (unstopped_p, linux_signal_pid): Remove.
19499 (linux_target_ops): Remove linux_signal_pid.
19500 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19501 global instead of target method.
19502 * target.h (struct target_ops): Remove signal_pid. Update comment
19503 for create_inferior.
19504 * server.c (signal_pid): New variable.
19505 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19506 gdbserver. Set the child to be the foreground process group.
19507 (attach_inferior): Set signal_pid.
19509 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19511 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19513 2002-08-20 Jim Blandy <jimb@redhat.com>
19515 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19518 2002-08-01 Andrew Cagney <cagney@redhat.com>
19520 * Makefile.in: Make chill references obsolete.
19522 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19524 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19525 * configure: Regenerate.
19526 * config.in: Regenerate.
19528 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19530 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19531 (perror_with_name, remote_close, remote_open, expect, play): Static.
19533 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19535 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19536 byte offsets instead of an array of indexes.
19537 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19539 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19541 * regcache.c: Add comment.
19543 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19545 * thread-db.c: New file.
19546 * proc-service.c: New file.
19547 * acinclude.m4: New file.
19548 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19549 proc-service.o, and thread-db.o.
19550 (linux-low.o): Add USE_THREAD_DB.
19551 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19552 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19553 * aclocal.m4: Regenerated.
19554 * config.in: Regenerated.
19555 * configure: Regenerated.
19556 * configure.in: Check for proc_service.h, sys/procfs.h,
19557 thread_db.h, and linux/elf.h headrs.
19558 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19559 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19560 Check for -lthread_db and thread support.
19561 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19562 PowerPC, and SuperH.
19563 * i387-fp.c: Constify arguments.
19564 * i387-fp.h: Likewise.
19565 * inferiors.c: (struct thread_info): Renamed from
19566 `struct inferior_info'. Remove PID member. Use generic inferior
19567 list header. All uses updated.
19568 (inferiors, signal_pid): Removed.
19569 (all_threads): New variable.
19570 (get_thread): Define.
19571 (add_inferior_to_list): New function.
19572 (for_each_inferior): New function.
19573 (change_inferior_id): New function.
19574 (add_inferior): Removed.
19575 (remove_inferior): New function.
19576 (add_thread): New function.
19577 (free_one_thread): New function.
19578 (remove_thread): New function.
19579 (clear_inferiors): Use for_each_inferior and free_one_thread.
19580 (find_inferior): New function.
19581 (find_inferior_id): New function.
19582 (inferior_target_data): Update argument type.
19583 (set_inferior_target_data): Likewise.
19584 (inferior_regcache_data): Likewise.
19585 (set_inferior_regcache_data): Likewise.
19586 * linux-low.c (linux_bp_reinsert): Remove.
19587 (all_processes, stopping_threads, using_thrads)
19588 (struct pending_signals, debug_threads, pid_of): New.
19589 (inferior_pid): Replace with macro.
19590 (struct inferior_linux_data): Remove.
19591 (get_stop_pc, add_process): New functions.
19592 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19593 Use add_process and add_thread.
19594 (linux_attach_lwp): New function, based on old linux_attach. Use
19595 add_process and add_thread. Set stop_expected for new threads.
19596 (linux_attach): New function.
19597 (linux_kill_one_process): New function.
19598 (linux_kill): Kill all LWPs.
19599 (linux_thread_alive): Use find_inferior_id.
19600 (check_removed_breakpoints, status_pending_p): New functions.
19601 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19602 Update. Use WNOHANG. Wait for cloned processes also. Update process
19603 struct for the found process.
19604 (linux_wait_for_event): New function.
19605 (linux_wait): Use it. Support LWPs.
19606 (send_sigstop, wait_for_sigstop, stop_all_processes)
19607 (linux_resume_one_process, linux_continue_one_process): New functions.
19608 (linux_resume): Support LWPs.
19609 (REGISTER_RAW_SIZE): Remove.
19610 (fetch_register): Use register_size instead. Call supply_register.
19611 (usr_store_inferior_registers): Likewise. Call collect_register.
19612 Fix recursive case.
19613 (regsets_fetch_inferior_registers): Improve error message.
19614 (regsets_store_inferior_registers): Add debugging.
19615 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19616 (unstopped_p, linux_signal_pid): New functions.
19617 (linux_target_ops): Add linux_signal_pid.
19618 (linux_init_signals): New function.
19619 (initialize_low): Call it. Initialize using_threads.
19620 * regcache.c (inferior_regcache_data): Add valid
19622 (get_regcache): Fetch registers lazily. Add fetch argument
19623 and update all callers.
19624 (regcache_invalidate_one, regcache_invalidate): New
19626 (new_register_cache): Renamed from create_register_cache.
19627 Return the new regcache.
19628 (free_register_cache): Change argument to a void *.
19629 (registers_to_string, registers_from_string): Call get_regcache
19630 with fetch flag set.
19631 (register_data): Make static. Pass fetch flag to get_regcache.
19632 (supply_register): Call get_regcache with fetch flag clear.
19633 (collect_register): Call get_regcache with fetch flag set.
19634 (collect_register_as_string): New function.
19635 * regcache.h: Update.
19636 * remote-utils.c (putpkt): Flush after debug output and use
19638 Handle input interrupts while waiting for an ACK.
19639 (input_interrupt): Use signal_pid method.
19640 (getpkt): Flush after debug output and use stderr.
19641 (outreg): Use collect_register_as_string.
19642 (new_thread_notify, dead_thread_notify): New functions.
19643 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19644 and general_thread.
19645 (look_up_one_symbol): Flush after debug output.
19646 * server.c (step_thread, server_waiting): New variables.
19647 (start_inferior): Don't use signal_pid. Update call to mywait.
19648 (attach_inferior): Update call to mywait.
19649 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19650 (main): Don't fetch/store registers explicitly. Use
19651 set_desired_inferior. Support proposed ``Hs'' packet. Update
19653 * server.h: Update.
19654 (struct inferior_list, struct_inferior_list_entry): New.
19655 * target.c (set_desired_inferior): New.
19656 (write_inferior_memory): Constify.
19657 (mywait): New function.
19658 * target.h: Update.
19659 (struct target_ops): New signal_pid method.
19660 (mywait): Removed macro, added prototype.
19662 * linux-low.h (regset_func): Removed.
19663 (regset_fill_func, regset_store_func): New.
19664 (enum regset_type): New.
19665 (struct regset_info): Add type field. Use new operation types.
19666 (struct linux_target_ops): stop_pc renamed to get_pc.
19667 Add decr_pc_after_break and breakpoint_at.
19668 (get_process, get_thread_proess, get_process_thread)
19669 (strut process_info, all_processes, linux_attach_lwp)
19670 (thread_db_init): New.
19672 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19673 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19674 (the_low_target): Add new members.
19675 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19676 (i386_store_fpxregset): Constify.
19677 (target_regsets): Add new kind identifier.
19678 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19679 (i386_set_pc): Add debugging.
19680 (i386_breakpoint_at): New function.
19681 (the_low_target): Add new members.
19682 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19683 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19684 (mips_breakpoint_at): New.
19685 (the_low_target): Add new members.
19686 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19687 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19688 (the_low_target): Add new members.
19689 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19690 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19691 (the_low_target): Add new members.
19692 * linux-x86-64-low.c (target_regsets): Add new kind
19695 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19697 From Martin Pool <mbp@samba.org>:
19698 * server.c (gdbserver_usage): New function.
19701 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19703 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19704 stop_at -> stop_pc.
19706 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19708 * Makefile.in: Remove obsolete code.
19710 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19712 * linux-low.c (regsets_fetch_inferior_registers),
19713 (regsets_store_inferior_registers): Removed cast to int from
19715 * regcache.h: Added declaration of struct inferior_info.
19717 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19719 * inferiors.c (struct inferior_info): Add regcache_data.
19720 (add_inferior): Call create_register_cache.
19721 (clear_inferiors): Call free_register_cache.
19722 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19723 * regcache.c (struct inferior_regcache_data): New.
19724 (registers): Remove.
19725 (get_regcache): New function.
19726 (create_register_cache, free_register_cache): New functions.
19727 (set_register_cache): Don't initialize the register cache here.
19728 (registers_to_string, registers_from_string, register_data): Call
19730 * regcache.h: Add prototypes.
19731 * server.h: Likewise.
19733 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19735 * mem-break.c: New file.
19736 * mem-break.h: New file.
19737 * Makefile.in: Add mem-break.o rule; update server.h
19739 * inferiors.c (struct inferior_info): Add target_data
19741 (clear_inferiors): Free target_data member if set.
19742 (inferior_target_data, set_inferior_target_data): New functions.
19743 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19744 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19745 * linux-low.c (linux_bp_reinsert): New variable.
19746 (struct inferior_linux_data): New.
19747 (linux_create_inferior): Use set_inferior_target_data.
19748 (linux_attach): Likewise. Call add_inferior.
19749 (linux_wait_for_one_inferior): New function.
19750 (linux_wait): Call it.
19751 (linux_write_memory): Add const.
19752 (initialize_low): Call set_breakpoint_data.
19753 * linux-low.h (struct linux_target_ops): Add breakpoint
19755 * server.c (attach_inferior): Remove extra add_inferior
19757 * server.h: Include mem-break.h. Update inferior.c
19759 * target.c (read_inferior_memory)
19760 (write_inferior_memory): New functions.
19761 * target.h (read_inferior_memory)
19762 (write_inferior_memory): Change macros to prototypes.
19763 (struct target_ops): Update comments. Add const to write_memory
19766 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19768 * linux-low.c (usr_store_inferior_registers): Support
19769 registers which are allowed to fail to store.
19770 * linux-low.h (linux_target_ops): Likewise.
19771 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19772 (ppc_cannot_store_register): FPSCR may not be storable.
19774 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19776 * server.h: Include <string.h> if HAVE_STRING_H.
19777 * ChangeLog: Correct paths in last ChangeLog entry.
19779 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19781 * linux-low.h: Remove obsolete prototypes.
19782 (struct linux_target_ops): New.
19783 (extern the_low_target): New.
19784 * linux-low.c (num_regs, regmap): Remove declarations.
19785 (register_addr): Use the_low_target explicitly.
19786 (fetch_register): Likewise.
19787 (usr_fetch_inferior_registers): Likewise.
19788 (usr_store_inferior_registers): Likewise.
19789 * linux-arm-low.c (num_regs): Remove.
19790 (arm_num_regs): Define.
19791 (arm_regmap): Renamed from regmap, made static.
19792 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19794 (arm_cannot_store_register): Renamed from cannot_store_register,
19796 (the_low_target): New.
19797 * linux-i386-low.c (num_regs): Remove.
19798 (i386_num_regs): Define.
19799 (i386_regmap): Renamed from regmap, made static.
19800 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19802 (i386_cannot_store_register): Renamed from cannot_store_register,
19804 (the_low_target): New.
19805 * linux-ia64-low.c (num_regs): Remove.
19806 (ia64_num_regs): Define.
19807 (ia64_regmap): Renamed from regmap, made static.
19808 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19810 (ia64_cannot_store_register): Renamed from cannot_store_register,
19812 (the_low_target): New.
19813 * linux-m68k-low.c (num_regs): Remove.
19814 (m68k_num_regs): Define.
19815 (m68k_regmap): Renamed from regmap, made static.
19816 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19818 (m68k_cannot_store_register): Renamed from cannot_store_register,
19820 (the_low_target): New.
19821 * linux-mips-low.c (num_regs): Remove.
19822 (mips_num_regs): Define.
19823 (mips_regmap): Renamed from regmap, made static.
19824 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19826 (mips_cannot_store_register): Renamed from cannot_store_register,
19828 (the_low_target): New.
19829 * linux-ppc-low.c (num_regs): Remove.
19830 (ppc_num_regs): Define.
19831 (ppc_regmap): Renamed from regmap, made static.
19832 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19834 (ppc_cannot_store_register): Renamed from cannot_store_register,
19836 (the_low_target): New.
19837 * linux-s390-low.c (num_regs): Remove.
19838 (s390_num_regs): Define.
19839 (s390_regmap): Renamed from regmap, made static.
19840 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19842 (s390_cannot_store_register): Renamed from cannot_store_register,
19844 (the_low_target): New.
19845 * linux-sh-low.c (num_regs): Remove.
19846 (sh_num_regs): Define.
19847 (sh_regmap): Renamed from regmap, made static.
19848 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19850 (sh_cannot_store_register): Renamed from cannot_store_register,
19852 (the_low_target): New.
19853 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19854 (the_low_target): New.
19856 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19858 * Makefile.in: Add stamp-h target.
19859 * configure.in: Create stamp-h.
19860 * configure: Regenerated.
19862 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19864 * inferiors.c: New file.
19865 * target.c: New file.
19866 * target.h: New file.
19867 * Makefile.in: Add target.o and inferiors.o. Update
19869 * linux-low.c (inferior_pid): New static variable,
19870 moved from server.c.
19871 (linux_create_inferior): Renamed from create_inferior.
19872 Call add_inferior. Return 0 on success instead of a PID.
19873 (linux_attach): Renamed from myattach.
19874 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19875 (linux_thread_alive): Renamed from mythread_alive.
19876 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19878 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19879 (regsets_store_inferior_registers): Correct error message.
19880 Add missing ``return 0''.
19881 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19882 (linux_store_registers): Renamed from store_inferior_registers.
19883 (linux_read_memory): Renamed from read_inferior_memory.
19884 (linux_write_memory): Renamed from write_inferior_memory.
19885 (linux_target_ops): New structure.
19886 (initialize_low): Call set_target_ops ().
19887 * remote-utils.c (unhexify): New function.
19888 (hexify): New function.
19889 (input_interrupt): Send signals to ``signal_pid''.
19890 * server.c (inferior_pid): Remove.
19891 (start_inferior): Update create_inferior call.
19892 (attach_inferior): Call add_inferior.
19893 (handle_query): New function.
19894 (main): Call handle_query for `q' packets.
19895 * server.h: Include "target.h". Remove obsolete prototypes.
19896 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19898 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19900 * Makefile.in: Add WARN_CFLAGS. Update configury
19902 * configure.in: Check for <string.h>
19903 * configure: Regenerate.
19904 * config.in: Regenerate.
19905 * gdbreplay.c: Include needed system headers.
19906 (remote_open): Remove strchr prototype.
19907 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19908 * regcache.c (supply_register): Change buf argument to const void *.
19909 (supply_register_by_name): Likewise.
19910 (collect_register): Change buf argument to void *.
19911 (collect_register_by_name): Likewise.
19912 * regcache.h: Add missing prototypes.
19913 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19914 * server.c (handle_query): New function.
19915 (attached): New static variable, moved out of main.
19916 (main): Quiet longjmp clobber warnings.
19917 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19918 * utils.c (error): Remove NORETURN.